browser-rpc 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -32
- package/dist/index.js +49 -3
- package/package.json +1 -1
- package/web-dist/assets/{add-Bt6ug9as.js → add-CSurud0_.js} +1 -1
- package/web-dist/assets/{all-wallets-ClkSG7YV.js → all-wallets-CuPxktej.js} +1 -1
- package/web-dist/assets/{app-store-BnzgCmML.js → app-store-Bh7SMjK6.js} +1 -1
- package/web-dist/assets/{apple-D3CNMHuT.js → apple-C4EgoShq.js} +1 -1
- package/web-dist/assets/{arrow-bottom-BrYwqDZR.js → arrow-bottom-CzdtCJaR.js} +1 -1
- package/web-dist/assets/{arrow-bottom-circle-CBoHFkqN.js → arrow-bottom-circle-CzKcAzTC.js} +1 -1
- package/web-dist/assets/{arrow-left-CHVgplmz.js → arrow-left-DCA-23-P.js} +1 -1
- package/web-dist/assets/{arrow-right-Do5EdrXQ.js → arrow-right-DjWMZCbU.js} +1 -1
- package/web-dist/assets/{arrow-top-BOPLd2d5.js → arrow-top-DdmR7t9T.js} +1 -1
- package/web-dist/assets/{bank-DafdJl1O.js → bank-C_5L-YDS.js} +1 -1
- package/web-dist/assets/{basic-CLeG2Fx1.js → basic-CqHaUvPy.js} +1 -1
- package/web-dist/assets/{browser-DRuHXezx.js → browser-DrecPVgr.js} +1 -1
- package/web-dist/assets/{card-YgaTGJnf.js → card-B8Kpmq0P.js} +1 -1
- package/web-dist/assets/{ccip-ConwrR6S.js → ccip-DULOFBuD.js} +1 -1
- package/web-dist/assets/{ccip-B4x4TU0w.js → ccip-JXkAn6l_.js} +1 -1
- package/web-dist/assets/{checkmark-bold-b4BEKMa-.js → checkmark-bold-C5CQv-Aa.js} +1 -1
- package/web-dist/assets/{checkmark-Dgr_oUfC.js → checkmark-pd5FsFzg.js} +1 -1
- package/web-dist/assets/{chevron-bottom-BlzLXicX.js → chevron-bottom-BLvDr8vF.js} +1 -1
- package/web-dist/assets/{chevron-left-DWsjEedN.js → chevron-left-Bn5fXcit.js} +1 -1
- package/web-dist/assets/{chevron-right-B-GnUH_e.js → chevron-right-Bp7Npo8k.js} +1 -1
- package/web-dist/assets/{chevron-top-lK6t2THp.js → chevron-top-DC_l4mwZ.js} +1 -1
- package/web-dist/assets/{chrome-store-CbBGk8YS.js → chrome-store-B0wZ3pqA.js} +1 -1
- package/web-dist/assets/{clock-ByEA0e_s.js → clock-l4cNQcqu.js} +1 -1
- package/web-dist/assets/{close-BxDaavrr.js → close-DGUe_y81.js} +1 -1
- package/web-dist/assets/{coinPlaceholder-B9aaOU5j.js → coinPlaceholder-BP01UQKP.js} +1 -1
- package/web-dist/assets/{compass-CBP6oSW9.js → compass-o-R_PR5i.js} +1 -1
- package/web-dist/assets/{copy-Dp304nbr.js → copy-BAr81PLi.js} +1 -1
- package/web-dist/assets/{core-Bf6VrE6v.js → core-D7szIsgf.js} +4 -4
- package/web-dist/assets/{cursor-WUohjLCE.js → cursor-D3GZTRrk.js} +1 -1
- package/web-dist/assets/{cursor-transparent-CutfCQQz.js → cursor-transparent-DljOOQBY.js} +1 -1
- package/web-dist/assets/{desktop-kZiy9C-p.js → desktop-jiAHOLvJ.js} +1 -1
- package/web-dist/assets/{disconnect-CG5TDY_m.js → disconnect-CS8uxHay.js} +1 -1
- package/web-dist/assets/{discord-JyHSI7q0.js → discord-DHnKyemy.js} +1 -1
- package/web-dist/assets/{etherscan-CyB1NBm9.js → etherscan-CVkxPkFS.js} +1 -1
- package/web-dist/assets/{exclamation-triangle-7y5nglSL.js → exclamation-triangle-CS4ruWfK.js} +1 -1
- package/web-dist/assets/{extension-BjB3--xE.js → extension-DnLfOwO6.js} +1 -1
- package/web-dist/assets/{external-link-BW0O7z6_.js → external-link-D-P_33dB.js} +1 -1
- package/web-dist/assets/{facebook-682BXGmP.js → facebook-jLzamRKN.js} +1 -1
- package/web-dist/assets/{farcaster-BOaaCMAh.js → farcaster-B4A0ZZeM.js} +1 -1
- package/web-dist/assets/{filters-DFWbfLJh.js → filters-2IeJyFyu.js} +1 -1
- package/web-dist/assets/{github-DpRqYyal.js → github-CYDpN-_e.js} +1 -1
- package/web-dist/assets/{google-CgUt7hYq.js → google-BZkNEgmj.js} +1 -1
- package/web-dist/assets/{help-circle-DwVgKpjs.js → help-circle-DMZ8-Cna.js} +1 -1
- package/web-dist/assets/{id-BaTvs6Gs.js → id-38gfBvri.js} +1 -1
- package/web-dist/assets/{image-BieDxoY2.js → image-C9_OStLn.js} +1 -1
- package/web-dist/assets/{index-C4Lbscxg.js → index--LSQjR_2.js} +66 -66
- package/web-dist/assets/{index-GJH9xypQ.css → index-CCSv1eAh.css} +1 -1
- package/web-dist/assets/{index-CteTNahN.js → index-Ccy1t-C4.js} +4 -4
- package/web-dist/assets/{index-aVimijSo.js → index-Cg8hiVbn.js} +3 -3
- package/web-dist/assets/{index-C5m0fBnu.js → index-CiTEL--Y.js} +1 -1
- package/web-dist/assets/{index-DgKl8WD4.js → index-QgYpnbyq.js} +1 -1
- package/web-dist/assets/{index-Burh8TwV.js → index-dCn6axXg.js} +1 -1
- package/web-dist/assets/{index.es-Me6_HSoS.js → index.es-C1H8G2CD.js} +4 -4
- package/web-dist/assets/{info-circle-Dgdf-_kY.js → info-circle-BTNeoxa6.js} +1 -1
- package/web-dist/assets/{info-CaUhPhOk.js → info-n2qoFrAe.js} +1 -1
- package/web-dist/assets/{lightbulb-h5NbP99t.js → lightbulb-Clk-Jmgu.js} +1 -1
- package/web-dist/assets/{mail-DUTW6gdU.js → mail-Cds1jWOG.js} +1 -1
- package/web-dist/assets/{mobile-BFFFlSgH.js → mobile-3m8bvDwV.js} +1 -1
- package/web-dist/assets/{more-s9g8TvGr.js → more-D4wapBmR.js} +1 -1
- package/web-dist/assets/{network-placeholder-DBVOULy6.js → network-placeholder-Byofvks3.js} +1 -1
- package/web-dist/assets/{nftPlaceholder-D8q6GiE5.js → nftPlaceholder-CZSQO35I.js} +1 -1
- package/web-dist/assets/{off-7mG5bayL.js → off-BwFiGI61.js} +1 -1
- package/web-dist/assets/{play-store-BFa605Jk.js → play-store-BGBmqVQP.js} +1 -1
- package/web-dist/assets/{plus-BgZ-WP7A.js → plus-CuD4QENc.js} +1 -1
- package/web-dist/assets/{qr-code-B_1WHzPs.js → qr-code-CmkeyQ3q.js} +1 -1
- package/web-dist/assets/{recycle-horizontal-CuuA7YIy.js → recycle-horizontal-Bro_qysx.js} +1 -1
- package/web-dist/assets/{refresh-CSXbxAuT.js → refresh-Edry900n.js} +1 -1
- package/web-dist/assets/{reown-logo-OK1pdOfH.js → reown-logo-BMZ4Cq9x.js} +1 -1
- package/web-dist/assets/{search-b77MGgNN.js → search-AVAp5Fyx.js} +1 -1
- package/web-dist/assets/{secp256k1-CqlnLpBV.js → secp256k1-BgQIr3rN.js} +1 -1
- package/web-dist/assets/{secp256k1-xC50DJGj.js → secp256k1-DekXzlV8.js} +1 -1
- package/web-dist/assets/{send-DlJtxaMX.js → send-4MYVLgeW.js} +1 -1
- package/web-dist/assets/{swapHorizontal-BmG4i-CJ.js → swapHorizontal-cVSOFLpi.js} +1 -1
- package/web-dist/assets/{swapHorizontalBold-CrnzAaq6.js → swapHorizontalBold-Bw-7VNbr.js} +1 -1
- package/web-dist/assets/{swapHorizontalMedium-DuPE93B2.js → swapHorizontalMedium-mcrKCBp-.js} +1 -1
- package/web-dist/assets/{swapHorizontalRoundedBold-clkEaP-W.js → swapHorizontalRoundedBold-BDxAi3q4.js} +1 -1
- package/web-dist/assets/{swapVertical-DXvCmf9g.js → swapVertical-BcwB3ulc.js} +1 -1
- package/web-dist/assets/{telegram-uHX2mx77.js → telegram-DuHUM8tr.js} +1 -1
- package/web-dist/assets/{three-dots-BoFVtYRM.js → three-dots-Aq6TxP_i.js} +1 -1
- package/web-dist/assets/{twitch-BbZVXa-k.js → twitch-C3_nAU2s.js} +1 -1
- package/web-dist/assets/{twitterIcon-DTDEnPwP.js → twitterIcon-xVvhgLtz.js} +1 -1
- package/web-dist/assets/{verify-DSwt0ow9.js → verify-Bk6Q4N8f.js} +1 -1
- package/web-dist/assets/{verify-filled-Dd2saJZ0.js → verify-filled-P4SRtWaq.js} +1 -1
- package/web-dist/assets/{w3m-modal-Dkca-GXY.js → w3m-modal-BV8xYuAk.js} +1 -1
- package/web-dist/assets/{wallet-DFQUKIzv.js → wallet-Cwos8iS9.js} +1 -1
- package/web-dist/assets/{wallet-placeholder-DBESmMOJ.js → wallet-placeholder-DZOZgWPG.js} +1 -1
- package/web-dist/assets/{walletconnect-Byk_h0ya.js → walletconnect-BEXWbbOU.js} +1 -1
- package/web-dist/assets/{warning-circle-BjOhgUMO.js → warning-circle-BjUwobMn.js} +1 -1
- package/web-dist/assets/{x-qhswnC92.js → x-CwzeXSXa.js} +1 -1
- package/web-dist/index.html +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as lr,m as ft,t as Yd,n as Xd,h as e0}from"./index-C4Lbscxg.js";import{r as Ln}from"./events-DQ172AOg.js";var Yn={},gr={},mr={},Ha;function t0(){if(Ha)return mr;Ha=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.walletLogo=void 0;const e=(t,n)=>{let r;switch(t){case"standard":return r=n,`data:image/svg+xml,%3Csvg width='${n}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=n,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${n}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=n,`data:image/svg+xml,%3Csvg width='${n}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};return mr.walletLogo=e,mr}var yr={},Wa;function r0(){return Wa||(Wa=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.LINK_API_URL=void 0,yr.LINK_API_URL="https://www.walletlink.org"),yr}var ae={},Tn={exports:{}};const n0={},i0=Object.freeze(Object.defineProperty({__proto__:null,default:n0},Symbol.toStringTag,{value:"Module"})),ua=lr(i0);var s0=Tn.exports,$a;function Nn(){return $a||($a=1,(function(e){(function(t,n){function r(q,g){if(!q)throw new Error(g||"Assertion failed")}function h(q,g){q.super_=g;var R=function(){};R.prototype=g.prototype,q.prototype=new R,q.prototype.constructor=q}function i(q,g,R){if(i.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((g==="le"||g==="be")&&(R=g,g=10),this._init(q||0,g||10,R||"be"))}typeof t=="object"?t.exports=i:n.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ua.Buffer}catch{}i.isBN=function(g){return g instanceof i?!0:g!==null&&typeof g=="object"&&g.constructor.wordSize===i.wordSize&&Array.isArray(g.words)},i.max=function(g,R){return g.cmp(R)>0?g:R},i.min=function(g,R){return g.cmp(R)<0?g:R},i.prototype._init=function(g,R,C){if(typeof g=="number")return this._initNumber(g,R,C);if(typeof g=="object")return this._initArray(g,R,C);R==="hex"&&(R=16),r(R===(R|0)&&R>=2&&R<=36),g=g.toString().replace(/\s+/g,"");var M=0;g[0]==="-"&&(M++,this.negative=1),M<g.length&&(R===16?this._parseHex(g,M,C):(this._parseBase(g,R,M),C==="le"&&this._initArray(this.toArray(),R,C)))},i.prototype._initNumber=function(g,R,C){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[g&67108863],this.length=1):g<4503599627370496?(this.words=[g&67108863,g/67108864&67108863],this.length=2):(r(g<9007199254740992),this.words=[g&67108863,g/67108864&67108863,1],this.length=3),C==="le"&&this._initArray(this.toArray(),R,C)},i.prototype._initArray=function(g,R,C){if(r(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var A,L,j=0;if(C==="be")for(M=g.length-1,A=0;M>=0;M-=3)L=g[M]|g[M-1]<<8|g[M-2]<<16,this.words[A]|=L<<j&67108863,this.words[A+1]=L>>>26-j&67108863,j+=24,j>=26&&(j-=26,A++);else if(C==="le")for(M=0,A=0;M<g.length;M+=3)L=g[M]|g[M+1]<<8|g[M+2]<<16,this.words[A]|=L<<j&67108863,this.words[A+1]=L>>>26-j&67108863,j+=24,j>=26&&(j-=26,A++);return this._strip()};function o(q,g){var R=q.charCodeAt(g);if(R>=48&&R<=57)return R-48;if(R>=65&&R<=70)return R-55;if(R>=97&&R<=102)return R-87;r(!1,"Invalid character in "+q)}function d(q,g,R){var C=o(q,R);return R-1>=g&&(C|=o(q,R-1)<<4),C}i.prototype._parseHex=function(g,R,C){this.length=Math.ceil((g.length-R)/6),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var A=0,L=0,j;if(C==="be")for(M=g.length-1;M>=R;M-=2)j=d(g,R,M)<<A,this.words[L]|=j&67108863,A>=18?(A-=18,L+=1,this.words[L]|=j>>>26):A+=8;else{var T=g.length-R;for(M=T%2===0?R+1:R;M<g.length;M+=2)j=d(g,R,M)<<A,this.words[L]|=j&67108863,A>=18?(A-=18,L+=1,this.words[L]|=j>>>26):A+=8}this._strip()};function c(q,g,R,C){for(var M=0,A=0,L=Math.min(q.length,R),j=g;j<L;j++){var T=q.charCodeAt(j)-48;M*=C,T>=49?A=T-49+10:T>=17?A=T-17+10:A=T,r(T>=0&&A<C,"Invalid character"),M+=A}return M}i.prototype._parseBase=function(g,R,C){this.words=[0],this.length=1;for(var M=0,A=1;A<=67108863;A*=R)M++;M--,A=A/R|0;for(var L=g.length-C,j=L%M,T=Math.min(L,L-j)+C,w=0,N=C;N<T;N+=M)w=c(g,N,N+M,R),this.imuln(A),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w);if(j!==0){var te=1;for(w=c(g,N,g.length,R),N=0;N<j;N++)te*=R;this.imuln(te),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w)}this._strip()},i.prototype.copy=function(g){g.words=new Array(this.length);for(var R=0;R<this.length;R++)g.words[R]=this.words[R];g.length=this.length,g.negative=this.negative,g.red=this.red};function p(q,g){q.words=g.words,q.length=g.length,q.negative=g.negative,q.red=g.red}if(i.prototype._move=function(g){p(g,this)},i.prototype.clone=function(){var g=new i(null);return this.copy(g),g},i.prototype._expand=function(g){for(;this.length<g;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch{i.prototype.inspect=s}else i.prototype.inspect=s;function s(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(g,R){g=g||10,R=R|0||1;var C;if(g===16||g==="hex"){C="";for(var M=0,A=0,L=0;L<this.length;L++){var j=this.words[L],T=((j<<M|A)&16777215).toString(16);A=j>>>24-M&16777215,M+=2,M>=26&&(M-=26,L--),A!==0||L!==this.length-1?C=f[6-T.length]+T+C:C=T+C}for(A!==0&&(C=A.toString(16)+C);C.length%R!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(g===(g|0)&&g>=2&&g<=36){var w=u[g],N=m[g];C="";var te=this.clone();for(te.negative=0;!te.isZero();){var Y=te.modrn(N).toString(g);te=te.idivn(N),te.isZero()?C=Y+C:C=f[w-Y.length]+Y+C}for(this.isZero()&&(C="0"+C);C.length%R!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=this.words[1]*67108864:this.length===3&&this.words[2]===1?g+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(g,R){return this.toArrayLike(a,g,R)}),i.prototype.toArray=function(g,R){return this.toArrayLike(Array,g,R)};var _=function(g,R){return g.allocUnsafe?g.allocUnsafe(R):new g(R)};i.prototype.toArrayLike=function(g,R,C){this._strip();var M=this.byteLength(),A=C||Math.max(1,M);r(M<=A,"byte array longer than desired length"),r(A>0,"Requested array length <= 0");var L=_(g,A),j=R==="le"?"LE":"BE";return this["_toArrayLike"+j](L,M),L},i.prototype._toArrayLikeLE=function(g,R){for(var C=0,M=0,A=0,L=0;A<this.length;A++){var j=this.words[A]<<L|M;g[C++]=j&255,C<g.length&&(g[C++]=j>>8&255),C<g.length&&(g[C++]=j>>16&255),L===6?(C<g.length&&(g[C++]=j>>24&255),M=0,L=0):(M=j>>>24,L+=2)}if(C<g.length)for(g[C++]=M;C<g.length;)g[C++]=0},i.prototype._toArrayLikeBE=function(g,R){for(var C=g.length-1,M=0,A=0,L=0;A<this.length;A++){var j=this.words[A]<<L|M;g[C--]=j&255,C>=0&&(g[C--]=j>>8&255),C>=0&&(g[C--]=j>>16&255),L===6?(C>=0&&(g[C--]=j>>24&255),M=0,L=0):(M=j>>>24,L+=2)}if(C>=0)for(g[C--]=M;C>=0;)g[C--]=0},Math.clz32?i.prototype._countBits=function(g){return 32-Math.clz32(g)}:i.prototype._countBits=function(g){var R=g,C=0;return R>=4096&&(C+=13,R>>>=13),R>=64&&(C+=7,R>>>=7),R>=8&&(C+=4,R>>>=4),R>=2&&(C+=2,R>>>=2),C+R},i.prototype._zeroBits=function(g){if(g===0)return 26;var R=g,C=0;return(R&8191)===0&&(C+=13,R>>>=13),(R&127)===0&&(C+=7,R>>>=7),(R&15)===0&&(C+=4,R>>>=4),(R&3)===0&&(C+=2,R>>>=2),(R&1)===0&&C++,C},i.prototype.bitLength=function(){var g=this.words[this.length-1],R=this._countBits(g);return(this.length-1)*26+R};function y(q){for(var g=new Array(q.bitLength()),R=0;R<g.length;R++){var C=R/26|0,M=R%26;g[R]=q.words[C]>>>M&1}return g}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,R=0;R<this.length;R++){var C=this._zeroBits(this.words[R]);if(g+=C,C!==26)break}return g},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(g){return this.negative!==0?this.abs().inotn(g).iaddn(1):this.clone()},i.prototype.fromTwos=function(g){return this.testn(g-1)?this.notn(g).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(g){for(;this.length<g.length;)this.words[this.length++]=0;for(var R=0;R<g.length;R++)this.words[R]=this.words[R]|g.words[R];return this._strip()},i.prototype.ior=function(g){return r((this.negative|g.negative)===0),this.iuor(g)},i.prototype.or=function(g){return this.length>g.length?this.clone().ior(g):g.clone().ior(this)},i.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},i.prototype.iuand=function(g){var R;this.length>g.length?R=g:R=this;for(var C=0;C<R.length;C++)this.words[C]=this.words[C]&g.words[C];return this.length=R.length,this._strip()},i.prototype.iand=function(g){return r((this.negative|g.negative)===0),this.iuand(g)},i.prototype.and=function(g){return this.length>g.length?this.clone().iand(g):g.clone().iand(this)},i.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},i.prototype.iuxor=function(g){var R,C;this.length>g.length?(R=this,C=g):(R=g,C=this);for(var M=0;M<C.length;M++)this.words[M]=R.words[M]^C.words[M];if(this!==R)for(;M<R.length;M++)this.words[M]=R.words[M];return this.length=R.length,this._strip()},i.prototype.ixor=function(g){return r((this.negative|g.negative)===0),this.iuxor(g)},i.prototype.xor=function(g){return this.length>g.length?this.clone().ixor(g):g.clone().ixor(this)},i.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},i.prototype.inotn=function(g){r(typeof g=="number"&&g>=0);var R=Math.ceil(g/26)|0,C=g%26;this._expand(R),C>0&&R--;for(var M=0;M<R;M++)this.words[M]=~this.words[M]&67108863;return C>0&&(this.words[M]=~this.words[M]&67108863>>26-C),this._strip()},i.prototype.notn=function(g){return this.clone().inotn(g)},i.prototype.setn=function(g,R){r(typeof g=="number"&&g>=0);var C=g/26|0,M=g%26;return this._expand(C+1),R?this.words[C]=this.words[C]|1<<M:this.words[C]=this.words[C]&~(1<<M),this._strip()},i.prototype.iadd=function(g){var R;if(this.negative!==0&&g.negative===0)return this.negative=0,R=this.isub(g),this.negative^=1,this._normSign();if(this.negative===0&&g.negative!==0)return g.negative=0,R=this.isub(g),g.negative=1,R._normSign();var C,M;this.length>g.length?(C=this,M=g):(C=g,M=this);for(var A=0,L=0;L<M.length;L++)R=(C.words[L]|0)+(M.words[L]|0)+A,this.words[L]=R&67108863,A=R>>>26;for(;A!==0&&L<C.length;L++)R=(C.words[L]|0)+A,this.words[L]=R&67108863,A=R>>>26;if(this.length=C.length,A!==0)this.words[this.length]=A,this.length++;else if(C!==this)for(;L<C.length;L++)this.words[L]=C.words[L];return this},i.prototype.add=function(g){var R;return g.negative!==0&&this.negative===0?(g.negative=0,R=this.sub(g),g.negative^=1,R):g.negative===0&&this.negative!==0?(this.negative=0,R=g.sub(this),this.negative=1,R):this.length>g.length?this.clone().iadd(g):g.clone().iadd(this)},i.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var R=this.iadd(g);return g.negative=1,R._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var C=this.cmp(g);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,A;C>0?(M=this,A=g):(M=g,A=this);for(var L=0,j=0;j<A.length;j++)R=(M.words[j]|0)-(A.words[j]|0)+L,L=R>>26,this.words[j]=R&67108863;for(;L!==0&&j<M.length;j++)R=(M.words[j]|0)+L,L=R>>26,this.words[j]=R&67108863;if(L===0&&j<M.length&&M!==this)for(;j<M.length;j++)this.words[j]=M.words[j];return this.length=Math.max(this.length,j),M!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(g){return this.clone().isub(g)};function l(q,g,R){R.negative=g.negative^q.negative;var C=q.length+g.length|0;R.length=C,C=C-1|0;var M=q.words[0]|0,A=g.words[0]|0,L=M*A,j=L&67108863,T=L/67108864|0;R.words[0]=j;for(var w=1;w<C;w++){for(var N=T>>>26,te=T&67108863,Y=Math.min(w,g.length-1),U=Math.max(0,w-q.length+1);U<=Y;U++){var $=w-U|0;M=q.words[$]|0,A=g.words[U]|0,L=M*A+te,N+=L/67108864|0,te=L&67108863}R.words[w]=te|0,T=N|0}return T!==0?R.words[w]=T|0:R.length--,R._strip()}var b=function(g,R,C){var M=g.words,A=R.words,L=C.words,j=0,T,w,N,te=M[0]|0,Y=te&8191,U=te>>>13,$=M[1]|0,G=$&8191,X=$>>>13,ne=M[2]|0,B=ne&8191,P=ne>>>13,Z=M[3]|0,K=Z&8191,oe=Z>>>13,ie=M[4]|0,se=ie&8191,de=ie>>>13,He=M[5]|0,ge=He&8191,ue=He>>>13,ye=M[6]|0,pe=ye&8191,me=ye>>>13,$e=M[7]|0,ve=$e&8191,k=$e>>>13,v=M[8]|0,S=v&8191,O=v>>>13,H=M[9]|0,V=H&8191,z=H>>>13,he=A[0]|0,fe=he&8191,le=he>>>13,be=A[1]|0,ce=be&8191,Re=be>>>13,Xt=A[2]|0,Se=Xt&8191,Ce=Xt>>>13,er=A[3]|0,Me=er&8191,ke=er>>>13,tr=A[4]|0,Ie=tr&8191,Ae=tr>>>13,rr=A[5]|0,xe=rr&8191,Te=rr>>>13,nr=A[6]|0,Be=nr&8191,Pe=nr>>>13,ir=A[7]|0,Le=ir&8191,Ne=ir>>>13,sr=A[8]|0,Oe=sr&8191,Fe=sr>>>13,or=A[9]|0,qe=or&8191,De=or>>>13;C.negative=g.negative^R.negative,C.length=19,T=Math.imul(Y,fe),w=Math.imul(Y,le),w=w+Math.imul(U,fe)|0,N=Math.imul(U,le);var dt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(dt>>>26)|0,dt&=67108863,T=Math.imul(G,fe),w=Math.imul(G,le),w=w+Math.imul(X,fe)|0,N=Math.imul(X,le),T=T+Math.imul(Y,ce)|0,w=w+Math.imul(Y,Re)|0,w=w+Math.imul(U,ce)|0,N=N+Math.imul(U,Re)|0;var pt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(pt>>>26)|0,pt&=67108863,T=Math.imul(B,fe),w=Math.imul(B,le),w=w+Math.imul(P,fe)|0,N=Math.imul(P,le),T=T+Math.imul(G,ce)|0,w=w+Math.imul(G,Re)|0,w=w+Math.imul(X,ce)|0,N=N+Math.imul(X,Re)|0,T=T+Math.imul(Y,Se)|0,w=w+Math.imul(Y,Ce)|0,w=w+Math.imul(U,Se)|0,N=N+Math.imul(U,Ce)|0;var gt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(gt>>>26)|0,gt&=67108863,T=Math.imul(K,fe),w=Math.imul(K,le),w=w+Math.imul(oe,fe)|0,N=Math.imul(oe,le),T=T+Math.imul(B,ce)|0,w=w+Math.imul(B,Re)|0,w=w+Math.imul(P,ce)|0,N=N+Math.imul(P,Re)|0,T=T+Math.imul(G,Se)|0,w=w+Math.imul(G,Ce)|0,w=w+Math.imul(X,Se)|0,N=N+Math.imul(X,Ce)|0,T=T+Math.imul(Y,Me)|0,w=w+Math.imul(Y,ke)|0,w=w+Math.imul(U,Me)|0,N=N+Math.imul(U,ke)|0;var mt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(mt>>>26)|0,mt&=67108863,T=Math.imul(se,fe),w=Math.imul(se,le),w=w+Math.imul(de,fe)|0,N=Math.imul(de,le),T=T+Math.imul(K,ce)|0,w=w+Math.imul(K,Re)|0,w=w+Math.imul(oe,ce)|0,N=N+Math.imul(oe,Re)|0,T=T+Math.imul(B,Se)|0,w=w+Math.imul(B,Ce)|0,w=w+Math.imul(P,Se)|0,N=N+Math.imul(P,Ce)|0,T=T+Math.imul(G,Me)|0,w=w+Math.imul(G,ke)|0,w=w+Math.imul(X,Me)|0,N=N+Math.imul(X,ke)|0,T=T+Math.imul(Y,Ie)|0,w=w+Math.imul(Y,Ae)|0,w=w+Math.imul(U,Ie)|0,N=N+Math.imul(U,Ae)|0;var yt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(yt>>>26)|0,yt&=67108863,T=Math.imul(ge,fe),w=Math.imul(ge,le),w=w+Math.imul(ue,fe)|0,N=Math.imul(ue,le),T=T+Math.imul(se,ce)|0,w=w+Math.imul(se,Re)|0,w=w+Math.imul(de,ce)|0,N=N+Math.imul(de,Re)|0,T=T+Math.imul(K,Se)|0,w=w+Math.imul(K,Ce)|0,w=w+Math.imul(oe,Se)|0,N=N+Math.imul(oe,Ce)|0,T=T+Math.imul(B,Me)|0,w=w+Math.imul(B,ke)|0,w=w+Math.imul(P,Me)|0,N=N+Math.imul(P,ke)|0,T=T+Math.imul(G,Ie)|0,w=w+Math.imul(G,Ae)|0,w=w+Math.imul(X,Ie)|0,N=N+Math.imul(X,Ae)|0,T=T+Math.imul(Y,xe)|0,w=w+Math.imul(Y,Te)|0,w=w+Math.imul(U,xe)|0,N=N+Math.imul(U,Te)|0;var _t=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(_t>>>26)|0,_t&=67108863,T=Math.imul(pe,fe),w=Math.imul(pe,le),w=w+Math.imul(me,fe)|0,N=Math.imul(me,le),T=T+Math.imul(ge,ce)|0,w=w+Math.imul(ge,Re)|0,w=w+Math.imul(ue,ce)|0,N=N+Math.imul(ue,Re)|0,T=T+Math.imul(se,Se)|0,w=w+Math.imul(se,Ce)|0,w=w+Math.imul(de,Se)|0,N=N+Math.imul(de,Ce)|0,T=T+Math.imul(K,Me)|0,w=w+Math.imul(K,ke)|0,w=w+Math.imul(oe,Me)|0,N=N+Math.imul(oe,ke)|0,T=T+Math.imul(B,Ie)|0,w=w+Math.imul(B,Ae)|0,w=w+Math.imul(P,Ie)|0,N=N+Math.imul(P,Ae)|0,T=T+Math.imul(G,xe)|0,w=w+Math.imul(G,Te)|0,w=w+Math.imul(X,xe)|0,N=N+Math.imul(X,Te)|0,T=T+Math.imul(Y,Be)|0,w=w+Math.imul(Y,Pe)|0,w=w+Math.imul(U,Be)|0,N=N+Math.imul(U,Pe)|0;var vt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(vt>>>26)|0,vt&=67108863,T=Math.imul(ve,fe),w=Math.imul(ve,le),w=w+Math.imul(k,fe)|0,N=Math.imul(k,le),T=T+Math.imul(pe,ce)|0,w=w+Math.imul(pe,Re)|0,w=w+Math.imul(me,ce)|0,N=N+Math.imul(me,Re)|0,T=T+Math.imul(ge,Se)|0,w=w+Math.imul(ge,Ce)|0,w=w+Math.imul(ue,Se)|0,N=N+Math.imul(ue,Ce)|0,T=T+Math.imul(se,Me)|0,w=w+Math.imul(se,ke)|0,w=w+Math.imul(de,Me)|0,N=N+Math.imul(de,ke)|0,T=T+Math.imul(K,Ie)|0,w=w+Math.imul(K,Ae)|0,w=w+Math.imul(oe,Ie)|0,N=N+Math.imul(oe,Ae)|0,T=T+Math.imul(B,xe)|0,w=w+Math.imul(B,Te)|0,w=w+Math.imul(P,xe)|0,N=N+Math.imul(P,Te)|0,T=T+Math.imul(G,Be)|0,w=w+Math.imul(G,Pe)|0,w=w+Math.imul(X,Be)|0,N=N+Math.imul(X,Pe)|0,T=T+Math.imul(Y,Le)|0,w=w+Math.imul(Y,Ne)|0,w=w+Math.imul(U,Le)|0,N=N+Math.imul(U,Ne)|0;var bt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(bt>>>26)|0,bt&=67108863,T=Math.imul(S,fe),w=Math.imul(S,le),w=w+Math.imul(O,fe)|0,N=Math.imul(O,le),T=T+Math.imul(ve,ce)|0,w=w+Math.imul(ve,Re)|0,w=w+Math.imul(k,ce)|0,N=N+Math.imul(k,Re)|0,T=T+Math.imul(pe,Se)|0,w=w+Math.imul(pe,Ce)|0,w=w+Math.imul(me,Se)|0,N=N+Math.imul(me,Ce)|0,T=T+Math.imul(ge,Me)|0,w=w+Math.imul(ge,ke)|0,w=w+Math.imul(ue,Me)|0,N=N+Math.imul(ue,ke)|0,T=T+Math.imul(se,Ie)|0,w=w+Math.imul(se,Ae)|0,w=w+Math.imul(de,Ie)|0,N=N+Math.imul(de,Ae)|0,T=T+Math.imul(K,xe)|0,w=w+Math.imul(K,Te)|0,w=w+Math.imul(oe,xe)|0,N=N+Math.imul(oe,Te)|0,T=T+Math.imul(B,Be)|0,w=w+Math.imul(B,Pe)|0,w=w+Math.imul(P,Be)|0,N=N+Math.imul(P,Pe)|0,T=T+Math.imul(G,Le)|0,w=w+Math.imul(G,Ne)|0,w=w+Math.imul(X,Le)|0,N=N+Math.imul(X,Ne)|0,T=T+Math.imul(Y,Oe)|0,w=w+Math.imul(Y,Fe)|0,w=w+Math.imul(U,Oe)|0,N=N+Math.imul(U,Fe)|0;var wt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(wt>>>26)|0,wt&=67108863,T=Math.imul(V,fe),w=Math.imul(V,le),w=w+Math.imul(z,fe)|0,N=Math.imul(z,le),T=T+Math.imul(S,ce)|0,w=w+Math.imul(S,Re)|0,w=w+Math.imul(O,ce)|0,N=N+Math.imul(O,Re)|0,T=T+Math.imul(ve,Se)|0,w=w+Math.imul(ve,Ce)|0,w=w+Math.imul(k,Se)|0,N=N+Math.imul(k,Ce)|0,T=T+Math.imul(pe,Me)|0,w=w+Math.imul(pe,ke)|0,w=w+Math.imul(me,Me)|0,N=N+Math.imul(me,ke)|0,T=T+Math.imul(ge,Ie)|0,w=w+Math.imul(ge,Ae)|0,w=w+Math.imul(ue,Ie)|0,N=N+Math.imul(ue,Ae)|0,T=T+Math.imul(se,xe)|0,w=w+Math.imul(se,Te)|0,w=w+Math.imul(de,xe)|0,N=N+Math.imul(de,Te)|0,T=T+Math.imul(K,Be)|0,w=w+Math.imul(K,Pe)|0,w=w+Math.imul(oe,Be)|0,N=N+Math.imul(oe,Pe)|0,T=T+Math.imul(B,Le)|0,w=w+Math.imul(B,Ne)|0,w=w+Math.imul(P,Le)|0,N=N+Math.imul(P,Ne)|0,T=T+Math.imul(G,Oe)|0,w=w+Math.imul(G,Fe)|0,w=w+Math.imul(X,Oe)|0,N=N+Math.imul(X,Fe)|0,T=T+Math.imul(Y,qe)|0,w=w+Math.imul(Y,De)|0,w=w+Math.imul(U,qe)|0,N=N+Math.imul(U,De)|0;var Et=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Et>>>26)|0,Et&=67108863,T=Math.imul(V,ce),w=Math.imul(V,Re),w=w+Math.imul(z,ce)|0,N=Math.imul(z,Re),T=T+Math.imul(S,Se)|0,w=w+Math.imul(S,Ce)|0,w=w+Math.imul(O,Se)|0,N=N+Math.imul(O,Ce)|0,T=T+Math.imul(ve,Me)|0,w=w+Math.imul(ve,ke)|0,w=w+Math.imul(k,Me)|0,N=N+Math.imul(k,ke)|0,T=T+Math.imul(pe,Ie)|0,w=w+Math.imul(pe,Ae)|0,w=w+Math.imul(me,Ie)|0,N=N+Math.imul(me,Ae)|0,T=T+Math.imul(ge,xe)|0,w=w+Math.imul(ge,Te)|0,w=w+Math.imul(ue,xe)|0,N=N+Math.imul(ue,Te)|0,T=T+Math.imul(se,Be)|0,w=w+Math.imul(se,Pe)|0,w=w+Math.imul(de,Be)|0,N=N+Math.imul(de,Pe)|0,T=T+Math.imul(K,Le)|0,w=w+Math.imul(K,Ne)|0,w=w+Math.imul(oe,Le)|0,N=N+Math.imul(oe,Ne)|0,T=T+Math.imul(B,Oe)|0,w=w+Math.imul(B,Fe)|0,w=w+Math.imul(P,Oe)|0,N=N+Math.imul(P,Fe)|0,T=T+Math.imul(G,qe)|0,w=w+Math.imul(G,De)|0,w=w+Math.imul(X,qe)|0,N=N+Math.imul(X,De)|0;var Rt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,T=Math.imul(V,Se),w=Math.imul(V,Ce),w=w+Math.imul(z,Se)|0,N=Math.imul(z,Ce),T=T+Math.imul(S,Me)|0,w=w+Math.imul(S,ke)|0,w=w+Math.imul(O,Me)|0,N=N+Math.imul(O,ke)|0,T=T+Math.imul(ve,Ie)|0,w=w+Math.imul(ve,Ae)|0,w=w+Math.imul(k,Ie)|0,N=N+Math.imul(k,Ae)|0,T=T+Math.imul(pe,xe)|0,w=w+Math.imul(pe,Te)|0,w=w+Math.imul(me,xe)|0,N=N+Math.imul(me,Te)|0,T=T+Math.imul(ge,Be)|0,w=w+Math.imul(ge,Pe)|0,w=w+Math.imul(ue,Be)|0,N=N+Math.imul(ue,Pe)|0,T=T+Math.imul(se,Le)|0,w=w+Math.imul(se,Ne)|0,w=w+Math.imul(de,Le)|0,N=N+Math.imul(de,Ne)|0,T=T+Math.imul(K,Oe)|0,w=w+Math.imul(K,Fe)|0,w=w+Math.imul(oe,Oe)|0,N=N+Math.imul(oe,Fe)|0,T=T+Math.imul(B,qe)|0,w=w+Math.imul(B,De)|0,w=w+Math.imul(P,qe)|0,N=N+Math.imul(P,De)|0;var St=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(St>>>26)|0,St&=67108863,T=Math.imul(V,Me),w=Math.imul(V,ke),w=w+Math.imul(z,Me)|0,N=Math.imul(z,ke),T=T+Math.imul(S,Ie)|0,w=w+Math.imul(S,Ae)|0,w=w+Math.imul(O,Ie)|0,N=N+Math.imul(O,Ae)|0,T=T+Math.imul(ve,xe)|0,w=w+Math.imul(ve,Te)|0,w=w+Math.imul(k,xe)|0,N=N+Math.imul(k,Te)|0,T=T+Math.imul(pe,Be)|0,w=w+Math.imul(pe,Pe)|0,w=w+Math.imul(me,Be)|0,N=N+Math.imul(me,Pe)|0,T=T+Math.imul(ge,Le)|0,w=w+Math.imul(ge,Ne)|0,w=w+Math.imul(ue,Le)|0,N=N+Math.imul(ue,Ne)|0,T=T+Math.imul(se,Oe)|0,w=w+Math.imul(se,Fe)|0,w=w+Math.imul(de,Oe)|0,N=N+Math.imul(de,Fe)|0,T=T+Math.imul(K,qe)|0,w=w+Math.imul(K,De)|0,w=w+Math.imul(oe,qe)|0,N=N+Math.imul(oe,De)|0;var Ct=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,T=Math.imul(V,Ie),w=Math.imul(V,Ae),w=w+Math.imul(z,Ie)|0,N=Math.imul(z,Ae),T=T+Math.imul(S,xe)|0,w=w+Math.imul(S,Te)|0,w=w+Math.imul(O,xe)|0,N=N+Math.imul(O,Te)|0,T=T+Math.imul(ve,Be)|0,w=w+Math.imul(ve,Pe)|0,w=w+Math.imul(k,Be)|0,N=N+Math.imul(k,Pe)|0,T=T+Math.imul(pe,Le)|0,w=w+Math.imul(pe,Ne)|0,w=w+Math.imul(me,Le)|0,N=N+Math.imul(me,Ne)|0,T=T+Math.imul(ge,Oe)|0,w=w+Math.imul(ge,Fe)|0,w=w+Math.imul(ue,Oe)|0,N=N+Math.imul(ue,Fe)|0,T=T+Math.imul(se,qe)|0,w=w+Math.imul(se,De)|0,w=w+Math.imul(de,qe)|0,N=N+Math.imul(de,De)|0;var Mt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,T=Math.imul(V,xe),w=Math.imul(V,Te),w=w+Math.imul(z,xe)|0,N=Math.imul(z,Te),T=T+Math.imul(S,Be)|0,w=w+Math.imul(S,Pe)|0,w=w+Math.imul(O,Be)|0,N=N+Math.imul(O,Pe)|0,T=T+Math.imul(ve,Le)|0,w=w+Math.imul(ve,Ne)|0,w=w+Math.imul(k,Le)|0,N=N+Math.imul(k,Ne)|0,T=T+Math.imul(pe,Oe)|0,w=w+Math.imul(pe,Fe)|0,w=w+Math.imul(me,Oe)|0,N=N+Math.imul(me,Fe)|0,T=T+Math.imul(ge,qe)|0,w=w+Math.imul(ge,De)|0,w=w+Math.imul(ue,qe)|0,N=N+Math.imul(ue,De)|0;var kt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(kt>>>26)|0,kt&=67108863,T=Math.imul(V,Be),w=Math.imul(V,Pe),w=w+Math.imul(z,Be)|0,N=Math.imul(z,Pe),T=T+Math.imul(S,Le)|0,w=w+Math.imul(S,Ne)|0,w=w+Math.imul(O,Le)|0,N=N+Math.imul(O,Ne)|0,T=T+Math.imul(ve,Oe)|0,w=w+Math.imul(ve,Fe)|0,w=w+Math.imul(k,Oe)|0,N=N+Math.imul(k,Fe)|0,T=T+Math.imul(pe,qe)|0,w=w+Math.imul(pe,De)|0,w=w+Math.imul(me,qe)|0,N=N+Math.imul(me,De)|0;var Jn=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,T=Math.imul(V,Le),w=Math.imul(V,Ne),w=w+Math.imul(z,Le)|0,N=Math.imul(z,Ne),T=T+Math.imul(S,Oe)|0,w=w+Math.imul(S,Fe)|0,w=w+Math.imul(O,Oe)|0,N=N+Math.imul(O,Fe)|0,T=T+Math.imul(ve,qe)|0,w=w+Math.imul(ve,De)|0,w=w+Math.imul(k,qe)|0,N=N+Math.imul(k,De)|0;var Zn=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,T=Math.imul(V,Oe),w=Math.imul(V,Fe),w=w+Math.imul(z,Oe)|0,N=Math.imul(z,Fe),T=T+Math.imul(S,qe)|0,w=w+Math.imul(S,De)|0,w=w+Math.imul(O,qe)|0,N=N+Math.imul(O,De)|0;var Kn=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,T=Math.imul(V,qe),w=Math.imul(V,De),w=w+Math.imul(z,qe)|0,N=Math.imul(z,De);var Qn=(j+T|0)+((w&8191)<<13)|0;return j=(N+(w>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,L[0]=dt,L[1]=pt,L[2]=gt,L[3]=mt,L[4]=yt,L[5]=_t,L[6]=vt,L[7]=bt,L[8]=wt,L[9]=Et,L[10]=Rt,L[11]=St,L[12]=Ct,L[13]=Mt,L[14]=kt,L[15]=Jn,L[16]=Zn,L[17]=Kn,L[18]=Qn,j!==0&&(L[19]=j,C.length++),C};Math.imul||(b=l);function E(q,g,R){R.negative=g.negative^q.negative,R.length=q.length+g.length;for(var C=0,M=0,A=0;A<R.length-1;A++){var L=M;M=0;for(var j=C&67108863,T=Math.min(A,g.length-1),w=Math.max(0,A-q.length+1);w<=T;w++){var N=A-w,te=q.words[N]|0,Y=g.words[w]|0,U=te*Y,$=U&67108863;L=L+(U/67108864|0)|0,$=$+j|0,j=$&67108863,L=L+($>>>26)|0,M+=L>>>26,L&=67108863}R.words[A]=j,C=L,L=M}return C!==0?R.words[A]=C:R.length--,R._strip()}function I(q,g,R){return E(q,g,R)}i.prototype.mulTo=function(g,R){var C,M=this.length+g.length;return this.length===10&&g.length===10?C=b(this,g,R):M<63?C=l(this,g,R):M<1024?C=E(this,g,R):C=I(this,g,R),C},i.prototype.mul=function(g){var R=new i(null);return R.words=new Array(this.length+g.length),this.mulTo(g,R)},i.prototype.mulf=function(g){var R=new i(null);return R.words=new Array(this.length+g.length),I(this,g,R)},i.prototype.imul=function(g){return this.clone().mulTo(g,this)},i.prototype.imuln=function(g){var R=g<0;R&&(g=-g),r(typeof g=="number"),r(g<67108864);for(var C=0,M=0;M<this.length;M++){var A=(this.words[M]|0)*g,L=(A&67108863)+(C&67108863);C>>=26,C+=A/67108864|0,C+=L>>>26,this.words[M]=L&67108863}return C!==0&&(this.words[M]=C,this.length++),this.length=g===0?1:this.length,R?this.ineg():this},i.prototype.muln=function(g){return this.clone().imuln(g)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(g){var R=y(g);if(R.length===0)return new i(1);for(var C=this,M=0;M<R.length&&R[M]===0;M++,C=C.sqr());if(++M<R.length)for(var A=C.sqr();M<R.length;M++,A=A.sqr())R[M]!==0&&(C=C.mul(A));return C},i.prototype.iushln=function(g){r(typeof g=="number"&&g>=0);var R=g%26,C=(g-R)/26,M=67108863>>>26-R<<26-R,A;if(R!==0){var L=0;for(A=0;A<this.length;A++){var j=this.words[A]&M,T=(this.words[A]|0)-j<<R;this.words[A]=T|L,L=j>>>26-R}L&&(this.words[A]=L,this.length++)}if(C!==0){for(A=this.length-1;A>=0;A--)this.words[A+C]=this.words[A];for(A=0;A<C;A++)this.words[A]=0;this.length+=C}return this._strip()},i.prototype.ishln=function(g){return r(this.negative===0),this.iushln(g)},i.prototype.iushrn=function(g,R,C){r(typeof g=="number"&&g>=0);var M;R?M=(R-R%26)/26:M=0;var A=g%26,L=Math.min((g-A)/26,this.length),j=67108863^67108863>>>A<<A,T=C;if(M-=L,M=Math.max(0,M),T){for(var w=0;w<L;w++)T.words[w]=this.words[w];T.length=L}if(L!==0)if(this.length>L)for(this.length-=L,w=0;w<this.length;w++)this.words[w]=this.words[w+L];else this.words[0]=0,this.length=1;var N=0;for(w=this.length-1;w>=0&&(N!==0||w>=M);w--){var te=this.words[w]|0;this.words[w]=N<<26-A|te>>>A,N=te&j}return T&&N!==0&&(T.words[T.length++]=N),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(g,R,C){return r(this.negative===0),this.iushrn(g,R,C)},i.prototype.shln=function(g){return this.clone().ishln(g)},i.prototype.ushln=function(g){return this.clone().iushln(g)},i.prototype.shrn=function(g){return this.clone().ishrn(g)},i.prototype.ushrn=function(g){return this.clone().iushrn(g)},i.prototype.testn=function(g){r(typeof g=="number"&&g>=0);var R=g%26,C=(g-R)/26,M=1<<R;if(this.length<=C)return!1;var A=this.words[C];return!!(A&M)},i.prototype.imaskn=function(g){r(typeof g=="number"&&g>=0);var R=g%26,C=(g-R)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(R!==0&&C++,this.length=Math.min(C,this.length),R!==0){var M=67108863^67108863>>>R<<R;this.words[this.length-1]&=M}return this._strip()},i.prototype.maskn=function(g){return this.clone().imaskn(g)},i.prototype.iaddn=function(g){return r(typeof g=="number"),r(g<67108864),g<0?this.isubn(-g):this.negative!==0?this.length===1&&(this.words[0]|0)<=g?(this.words[0]=g-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(g),this.negative=1,this):this._iaddn(g)},i.prototype._iaddn=function(g){this.words[0]+=g;for(var R=0;R<this.length&&this.words[R]>=67108864;R++)this.words[R]-=67108864,R===this.length-1?this.words[R+1]=1:this.words[R+1]++;return this.length=Math.max(this.length,R+1),this},i.prototype.isubn=function(g){if(r(typeof g=="number"),r(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var R=0;R<this.length&&this.words[R]<0;R++)this.words[R]+=67108864,this.words[R+1]-=1;return this._strip()},i.prototype.addn=function(g){return this.clone().iaddn(g)},i.prototype.subn=function(g){return this.clone().isubn(g)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(g,R,C){var M=g.length+C,A;this._expand(M);var L,j=0;for(A=0;A<g.length;A++){L=(this.words[A+C]|0)+j;var T=(g.words[A]|0)*R;L-=T&67108863,j=(L>>26)-(T/67108864|0),this.words[A+C]=L&67108863}for(;A<this.length-C;A++)L=(this.words[A+C]|0)+j,j=L>>26,this.words[A+C]=L&67108863;if(j===0)return this._strip();for(r(j===-1),j=0,A=0;A<this.length;A++)L=-(this.words[A]|0)+j,j=L>>26,this.words[A]=L&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(g,R){var C=this.length-g.length,M=this.clone(),A=g,L=A.words[A.length-1]|0,j=this._countBits(L);C=26-j,C!==0&&(A=A.ushln(C),M.iushln(C),L=A.words[A.length-1]|0);var T=M.length-A.length,w;if(R!=="mod"){w=new i(null),w.length=T+1,w.words=new Array(w.length);for(var N=0;N<w.length;N++)w.words[N]=0}var te=M.clone()._ishlnsubmul(A,1,T);te.negative===0&&(M=te,w&&(w.words[T]=1));for(var Y=T-1;Y>=0;Y--){var U=(M.words[A.length+Y]|0)*67108864+(M.words[A.length+Y-1]|0);for(U=Math.min(U/L|0,67108863),M._ishlnsubmul(A,U,Y);M.negative!==0;)U--,M.negative=0,M._ishlnsubmul(A,1,Y),M.isZero()||(M.negative^=1);w&&(w.words[Y]=U)}return w&&w._strip(),M._strip(),R!=="div"&&C!==0&&M.iushrn(C),{div:w||null,mod:M}},i.prototype.divmod=function(g,R,C){if(r(!g.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,A,L;return this.negative!==0&&g.negative===0?(L=this.neg().divmod(g,R),R!=="mod"&&(M=L.div.neg()),R!=="div"&&(A=L.mod.neg(),C&&A.negative!==0&&A.iadd(g)),{div:M,mod:A}):this.negative===0&&g.negative!==0?(L=this.divmod(g.neg(),R),R!=="mod"&&(M=L.div.neg()),{div:M,mod:L.mod}):(this.negative&g.negative)!==0?(L=this.neg().divmod(g.neg(),R),R!=="div"&&(A=L.mod.neg(),C&&A.negative!==0&&A.isub(g)),{div:L.div,mod:A}):g.length>this.length||this.cmp(g)<0?{div:new i(0),mod:this}:g.length===1?R==="div"?{div:this.divn(g.words[0]),mod:null}:R==="mod"?{div:null,mod:new i(this.modrn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new i(this.modrn(g.words[0]))}:this._wordDiv(g,R)},i.prototype.div=function(g){return this.divmod(g,"div",!1).div},i.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},i.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},i.prototype.divRound=function(g){var R=this.divmod(g);if(R.mod.isZero())return R.div;var C=R.div.negative!==0?R.mod.isub(g):R.mod,M=g.ushrn(1),A=g.andln(1),L=C.cmp(M);return L<0||A===1&&L===0?R.div:R.div.negative!==0?R.div.isubn(1):R.div.iaddn(1)},i.prototype.modrn=function(g){var R=g<0;R&&(g=-g),r(g<=67108863);for(var C=(1<<26)%g,M=0,A=this.length-1;A>=0;A--)M=(C*M+(this.words[A]|0))%g;return R?-M:M},i.prototype.modn=function(g){return this.modrn(g)},i.prototype.idivn=function(g){var R=g<0;R&&(g=-g),r(g<=67108863);for(var C=0,M=this.length-1;M>=0;M--){var A=(this.words[M]|0)+C*67108864;this.words[M]=A/g|0,C=A%g}return this._strip(),R?this.ineg():this},i.prototype.divn=function(g){return this.clone().idivn(g)},i.prototype.egcd=function(g){r(g.negative===0),r(!g.isZero());var R=this,C=g.clone();R.negative!==0?R=R.umod(g):R=R.clone();for(var M=new i(1),A=new i(0),L=new i(0),j=new i(1),T=0;R.isEven()&&C.isEven();)R.iushrn(1),C.iushrn(1),++T;for(var w=C.clone(),N=R.clone();!R.isZero();){for(var te=0,Y=1;(R.words[0]&Y)===0&&te<26;++te,Y<<=1);if(te>0)for(R.iushrn(te);te-- >0;)(M.isOdd()||A.isOdd())&&(M.iadd(w),A.isub(N)),M.iushrn(1),A.iushrn(1);for(var U=0,$=1;(C.words[0]&$)===0&&U<26;++U,$<<=1);if(U>0)for(C.iushrn(U);U-- >0;)(L.isOdd()||j.isOdd())&&(L.iadd(w),j.isub(N)),L.iushrn(1),j.iushrn(1);R.cmp(C)>=0?(R.isub(C),M.isub(L),A.isub(j)):(C.isub(R),L.isub(M),j.isub(A))}return{a:L,b:j,gcd:C.iushln(T)}},i.prototype._invmp=function(g){r(g.negative===0),r(!g.isZero());var R=this,C=g.clone();R.negative!==0?R=R.umod(g):R=R.clone();for(var M=new i(1),A=new i(0),L=C.clone();R.cmpn(1)>0&&C.cmpn(1)>0;){for(var j=0,T=1;(R.words[0]&T)===0&&j<26;++j,T<<=1);if(j>0)for(R.iushrn(j);j-- >0;)M.isOdd()&&M.iadd(L),M.iushrn(1);for(var w=0,N=1;(C.words[0]&N)===0&&w<26;++w,N<<=1);if(w>0)for(C.iushrn(w);w-- >0;)A.isOdd()&&A.iadd(L),A.iushrn(1);R.cmp(C)>=0?(R.isub(C),M.isub(A)):(C.isub(R),A.isub(M))}var te;return R.cmpn(1)===0?te=M:te=A,te.cmpn(0)<0&&te.iadd(g),te},i.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var R=this.clone(),C=g.clone();R.negative=0,C.negative=0;for(var M=0;R.isEven()&&C.isEven();M++)R.iushrn(1),C.iushrn(1);do{for(;R.isEven();)R.iushrn(1);for(;C.isEven();)C.iushrn(1);var A=R.cmp(C);if(A<0){var L=R;R=C,C=L}else if(A===0||C.cmpn(1)===0)break;R.isub(C)}while(!0);return C.iushln(M)},i.prototype.invm=function(g){return this.egcd(g).a.umod(g)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(g){return this.words[0]&g},i.prototype.bincn=function(g){r(typeof g=="number");var R=g%26,C=(g-R)/26,M=1<<R;if(this.length<=C)return this._expand(C+1),this.words[C]|=M,this;for(var A=M,L=C;A!==0&&L<this.length;L++){var j=this.words[L]|0;j+=A,A=j>>>26,j&=67108863,this.words[L]=j}return A!==0&&(this.words[L]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(g){var R=g<0;if(this.negative!==0&&!R)return-1;if(this.negative===0&&R)return 1;this._strip();var C;if(this.length>1)C=1;else{R&&(g=-g),r(g<=67108863,"Number is too big");var M=this.words[0]|0;C=M===g?0:M<g?-1:1}return this.negative!==0?-C|0:C},i.prototype.cmp=function(g){if(this.negative!==0&&g.negative===0)return-1;if(this.negative===0&&g.negative!==0)return 1;var R=this.ucmp(g);return this.negative!==0?-R|0:R},i.prototype.ucmp=function(g){if(this.length>g.length)return 1;if(this.length<g.length)return-1;for(var R=0,C=this.length-1;C>=0;C--){var M=this.words[C]|0,A=g.words[C]|0;if(M!==A){M<A?R=-1:M>A&&(R=1);break}}return R},i.prototype.gtn=function(g){return this.cmpn(g)===1},i.prototype.gt=function(g){return this.cmp(g)===1},i.prototype.gten=function(g){return this.cmpn(g)>=0},i.prototype.gte=function(g){return this.cmp(g)>=0},i.prototype.ltn=function(g){return this.cmpn(g)===-1},i.prototype.lt=function(g){return this.cmp(g)===-1},i.prototype.lten=function(g){return this.cmpn(g)<=0},i.prototype.lte=function(g){return this.cmp(g)<=0},i.prototype.eqn=function(g){return this.cmpn(g)===0},i.prototype.eq=function(g){return this.cmp(g)===0},i.red=function(g){return new Q(g)},i.prototype.toRed=function(g){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(g){return this.red=g,this},i.prototype.forceRed=function(g){return r(!this.red,"Already a number in reduction context"),this._forceRed(g)},i.prototype.redAdd=function(g){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},i.prototype.redIAdd=function(g){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},i.prototype.redSub=function(g){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},i.prototype.redISub=function(g){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},i.prototype.redShl=function(g){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},i.prototype.redMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},i.prototype.redIMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(g){return r(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var x={k256:null,p224:null,p192:null,p25519:null};function D(q,g){this.name=q,this.p=new i(g,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var g=new i(null);return g.words=new Array(Math.ceil(this.n/13)),g},D.prototype.ireduce=function(g){var R=g,C;do this.split(R,this.tmp),R=this.imulK(R),R=R.iadd(this.tmp),C=R.bitLength();while(C>this.n);var M=C<this.n?-1:R.ucmp(this.p);return M===0?(R.words[0]=0,R.length=1):M>0?R.isub(this.p):R.strip!==void 0?R.strip():R._strip(),R},D.prototype.split=function(g,R){g.iushrn(this.n,0,R)},D.prototype.imulK=function(g){return g.imul(this.k)};function F(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(F,D),F.prototype.split=function(g,R){for(var C=4194303,M=Math.min(g.length,9),A=0;A<M;A++)R.words[A]=g.words[A];if(R.length=M,g.length<=9){g.words[0]=0,g.length=1;return}var L=g.words[9];for(R.words[R.length++]=L&C,A=10;A<g.length;A++){var j=g.words[A]|0;g.words[A-10]=(j&C)<<4|L>>>22,L=j}L>>>=22,g.words[A-10]=L,L===0&&g.length>10?g.length-=10:g.length-=9},F.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var R=0,C=0;C<g.length;C++){var M=g.words[C]|0;R+=M*977,g.words[C]=R&67108863,R=M*64+(R/67108864|0)}return g.words[g.length-1]===0&&(g.length--,g.words[g.length-1]===0&&g.length--),g};function W(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}h(W,D);function J(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}h(J,D);function ee(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}h(ee,D),ee.prototype.imulK=function(g){for(var R=0,C=0;C<g.length;C++){var M=(g.words[C]|0)*19+R,A=M&67108863;M>>>=26,g.words[C]=A,R=M}return R!==0&&(g.words[g.length++]=R),g},i._prime=function(g){if(x[g])return x[g];var R;if(g==="k256")R=new F;else if(g==="p224")R=new W;else if(g==="p192")R=new J;else if(g==="p25519")R=new ee;else throw new Error("Unknown prime "+g);return x[g]=R,R};function Q(q){if(typeof q=="string"){var g=i._prime(q);this.m=g.p,this.prime=g}else r(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}Q.prototype._verify1=function(g){r(g.negative===0,"red works only with positives"),r(g.red,"red works only with red numbers")},Q.prototype._verify2=function(g,R){r((g.negative|R.negative)===0,"red works only with positives"),r(g.red&&g.red===R.red,"red works only with red numbers")},Q.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):(p(g,g.umod(this.m)._forceRed(this)),g)},Q.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},Q.prototype.add=function(g,R){this._verify2(g,R);var C=g.add(R);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},Q.prototype.iadd=function(g,R){this._verify2(g,R);var C=g.iadd(R);return C.cmp(this.m)>=0&&C.isub(this.m),C},Q.prototype.sub=function(g,R){this._verify2(g,R);var C=g.sub(R);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},Q.prototype.isub=function(g,R){this._verify2(g,R);var C=g.isub(R);return C.cmpn(0)<0&&C.iadd(this.m),C},Q.prototype.shl=function(g,R){return this._verify1(g),this.imod(g.ushln(R))},Q.prototype.imul=function(g,R){return this._verify2(g,R),this.imod(g.imul(R))},Q.prototype.mul=function(g,R){return this._verify2(g,R),this.imod(g.mul(R))},Q.prototype.isqr=function(g){return this.imul(g,g.clone())},Q.prototype.sqr=function(g){return this.mul(g,g)},Q.prototype.sqrt=function(g){if(g.isZero())return g.clone();var R=this.m.andln(3);if(r(R%2===1),R===3){var C=this.m.add(new i(1)).iushrn(2);return this.pow(g,C)}for(var M=this.m.subn(1),A=0;!M.isZero()&&M.andln(1)===0;)A++,M.iushrn(1);r(!M.isZero());var L=new i(1).toRed(this),j=L.redNeg(),T=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new i(2*w*w).toRed(this);this.pow(w,T).cmp(j)!==0;)w.redIAdd(j);for(var N=this.pow(w,M),te=this.pow(g,M.addn(1).iushrn(1)),Y=this.pow(g,M),U=A;Y.cmp(L)!==0;){for(var $=Y,G=0;$.cmp(L)!==0;G++)$=$.redSqr();r(G<U);var X=this.pow(N,new i(1).iushln(U-G-1));te=te.redMul(X),N=X.redSqr(),Y=Y.redMul(N),U=G}return te},Q.prototype.invm=function(g){var R=g._invmp(this.m);return R.negative!==0?(R.negative=0,this.imod(R).redNeg()):this.imod(R)},Q.prototype.pow=function(g,R){if(R.isZero())return new i(1).toRed(this);if(R.cmpn(1)===0)return g.clone();var C=4,M=new Array(1<<C);M[0]=new i(1).toRed(this),M[1]=g;for(var A=2;A<M.length;A++)M[A]=this.mul(M[A-1],g);var L=M[0],j=0,T=0,w=R.bitLength()%26;for(w===0&&(w=26),A=R.length-1;A>=0;A--){for(var N=R.words[A],te=w-1;te>=0;te--){var Y=N>>te&1;if(L!==M[0]&&(L=this.sqr(L)),Y===0&&j===0){T=0;continue}j<<=1,j|=Y,T++,!(T!==C&&(A!==0||te!==0))&&(L=this.mul(L,M[j]),T=0,j=0)}w=26}return L},Q.prototype.convertTo=function(g){var R=g.umod(this.m);return R===g?R.clone():R},Q.prototype.convertFrom=function(g){var R=g.clone();return R.red=null,R},i.mont=function(g){return new re(g)};function re(q){Q.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h(re,Q),re.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},re.prototype.convertFrom=function(g){var R=this.imod(g.mul(this.rinv));return R.red=null,R},re.prototype.imul=function(g,R){if(g.isZero()||R.isZero())return g.words[0]=0,g.length=1,g;var C=g.imul(R),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=C.isub(M).iushrn(this.shift),L=A;return A.cmp(this.m)>=0?L=A.isub(this.m):A.cmpn(0)<0&&(L=A.iadd(this.m)),L._forceRed(this)},re.prototype.mul=function(g,R){if(g.isZero()||R.isZero())return new i(0)._forceRed(this);var C=g.mul(R),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=C.isub(M).iushrn(this.shift),L=A;return A.cmp(this.m)>=0?L=A.isub(this.m):A.cmpn(0)<0&&(L=A.iadd(this.m)),L._forceRed(this)},re.prototype.invm=function(g){var R=this.imod(g._invmp(this.m).mul(this.r2));return R._forceRed(this)}})(e,s0)})(Tn)),Tn.exports}var Xn={},It={},Va;function On(){return Va||(Va=1,Object.defineProperty(It,"__esModule",{value:!0}),It.errorValues=It.standardErrorCodes=void 0,It.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},It.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}),It}var _r={},ei={},za;function ca(){return za||(za=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=On(),n="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function r(f,u=n){if(f&&Number.isInteger(f)){const m=f.toString();if(p(t.errorValues,m))return t.errorValues[m].message;if(d(f))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return u}e.getMessageFromCode=r;function h(f){if(!Number.isInteger(f))return!1;const u=f.toString();return!!(t.errorValues[u]||d(f))}e.isValidCode=h;function i(f){var u;if(typeof f=="number")return f;if(a(f))return(u=f.code)!==null&&u!==void 0?u:f.errorCode}e.getErrorCode=i;function a(f){return typeof f=="object"&&f!==null&&(typeof f.code=="number"||typeof f.errorCode=="number")}function o(f,{shouldIncludeStack:u=!1}={}){const m={};if(f&&typeof f=="object"&&!Array.isArray(f)&&p(f,"code")&&h(f.code)){const _=f;m.code=_.code,_.message&&typeof _.message=="string"?(m.message=_.message,p(_,"data")&&(m.data=_.data)):(m.message=r(m.code),m.data={originalError:c(f)})}else m.code=t.standardErrorCodes.rpc.internal,m.message=s(f,"message")?f.message:n,m.data={originalError:c(f)};return u&&(m.stack=s(f,"stack")?f.stack:void 0),m}e.serialize=o;function d(f){return f>=-32099&&f<=-32e3}function c(f){return f&&typeof f=="object"&&!Array.isArray(f)?Object.assign({},f):f}function p(f,u){return Object.prototype.hasOwnProperty.call(f,u)}function s(f,u){return typeof f=="object"&&f!==null&&u in f&&typeof f[u]=="string"}})(ei)),ei}var Ga;function o0(){if(Ga)return _r;Ga=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.standardErrors=void 0;const e=On(),t=ca();_r.standardErrors={rpc:{parse:d=>n(e.standardErrorCodes.rpc.parse,d),invalidRequest:d=>n(e.standardErrorCodes.rpc.invalidRequest,d),invalidParams:d=>n(e.standardErrorCodes.rpc.invalidParams,d),methodNotFound:d=>n(e.standardErrorCodes.rpc.methodNotFound,d),internal:d=>n(e.standardErrorCodes.rpc.internal,d),server:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:c}=d;if(!Number.isInteger(c)||c>-32005||c<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return n(c,d)},invalidInput:d=>n(e.standardErrorCodes.rpc.invalidInput,d),resourceNotFound:d=>n(e.standardErrorCodes.rpc.resourceNotFound,d),resourceUnavailable:d=>n(e.standardErrorCodes.rpc.resourceUnavailable,d),transactionRejected:d=>n(e.standardErrorCodes.rpc.transactionRejected,d),methodNotSupported:d=>n(e.standardErrorCodes.rpc.methodNotSupported,d),limitExceeded:d=>n(e.standardErrorCodes.rpc.limitExceeded,d)},provider:{userRejectedRequest:d=>r(e.standardErrorCodes.provider.userRejectedRequest,d),unauthorized:d=>r(e.standardErrorCodes.provider.unauthorized,d),unsupportedMethod:d=>r(e.standardErrorCodes.provider.unsupportedMethod,d),disconnected:d=>r(e.standardErrorCodes.provider.disconnected,d),chainDisconnected:d=>r(e.standardErrorCodes.provider.chainDisconnected,d),unsupportedChain:d=>r(e.standardErrorCodes.provider.unsupportedChain,d),custom:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:c,message:p,data:s}=d;if(!p||typeof p!="string")throw new Error('"message" must be a nonempty string');return new a(c,p,s)}}};function n(d,c){const[p,s]=h(c);return new i(d,p||(0,t.getMessageFromCode)(d),s)}function r(d,c){const[p,s]=h(c);return new a(d,p||(0,t.getMessageFromCode)(d),s)}function h(d){if(d){if(typeof d=="string")return[d];if(typeof d=="object"&&!Array.isArray(d)){const{message:c,data:p}=d;if(c&&typeof c!="string")throw new Error("Must specify string message.");return[c||void 0,p]}}return[]}class i extends Error{constructor(c,p,s){if(!Number.isInteger(c))throw new Error('"code" must be an integer.');if(!p||typeof p!="string")throw new Error('"message" must be a nonempty string.');super(p),this.code=c,s!==void 0&&(this.data=s)}}class a extends i{constructor(c,p,s){if(!o(c))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(c,p,s)}}function o(d){return Number.isInteger(d)&&d>=1e3&&d<=4999}return _r}var vr={},br={},Ja;function la(){if(Ja)return br;Ja=1,Object.defineProperty(br,"__esModule",{value:!0}),br.isErrorResponse=void 0;function e(t){return t.errorMessage!==void 0}return br.isErrorResponse=e,br}var wr={},Za;function fa(){return Za||(Za=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.LIB_VERSION=void 0,wr.LIB_VERSION="3.9.3"),wr}var Ka;function a0(){if(Ka)return vr;Ka=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.serializeError=void 0;const e=la(),t=fa(),n=On(),r=ca();function h(o,d){const c=(0,r.serialize)(i(o),{shouldIncludeStack:!0}),p=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");p.searchParams.set("version",t.LIB_VERSION),p.searchParams.set("code",c.code.toString());const s=a(c.data,d);return s&&p.searchParams.set("method",s),p.searchParams.set("message",c.message),Object.assign(Object.assign({},c),{docUrl:p.href})}vr.serializeError=h;function i(o){return typeof o=="string"?{message:o,code:n.standardErrorCodes.rpc.internal}:(0,e.isErrorResponse)(o)?Object.assign(Object.assign({},o),{message:o.errorMessage,code:o.errorCode,data:{method:o.method}}):o}function a(o,d){const c=o?.method;if(c)return c;if(d!==void 0){if(typeof d=="string")return d;if(Array.isArray(d)){if(d.length>0)return d[0].method}else return d.method}}return vr}var Qa;function Fn(){return Qa||(Qa=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=On();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const n=o0();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return n.standardErrors}});const r=a0();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}});const h=ca();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return h.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return h.getMessageFromCode}})})(Xn)),Xn}var Ve={},Ya;function qn(){if(Ya)return Ve;Ya=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.ProviderType=Ve.RegExpString=Ve.IntNumber=Ve.BigIntString=Ve.AddressString=Ve.HexString=Ve.OpaqueType=void 0;function e(){return r=>r}Ve.OpaqueType=e,Ve.HexString=e(),Ve.AddressString=e(),Ve.BigIntString=e();function t(r){return Math.floor(r)}Ve.IntNumber=t,Ve.RegExpString=e();var n;return(function(r){r.CoinbaseWallet="CoinbaseWallet",r.MetaMask="MetaMask",r.Unselected=""})(n||(Ve.ProviderType=n={})),Ve}var Xa;function ut(){if(Xa)return ae;Xa=1;var e=ae&&ae.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(ae,"__esModule",{value:!0}),ae.isMobileWeb=ae.getLocation=ae.isInIFrame=ae.createQrUrl=ae.getFavicon=ae.range=ae.isBigNumber=ae.ensureParsedJSONObject=ae.ensureBN=ae.ensureRegExpString=ae.ensureIntNumber=ae.ensureBuffer=ae.ensureAddressString=ae.ensureEvenLengthHexString=ae.ensureHexString=ae.isHexString=ae.prepend0x=ae.strip0x=ae.has0xPrefix=ae.hexStringFromIntNumber=ae.intNumberFromHexString=ae.bigIntStringFromBN=ae.hexStringFromBuffer=ae.hexStringToUint8Array=ae.uint8ArrayToHex=ae.randomBytesHex=void 0;const t=e(Nn()),n=Fn(),r=qn(),h=/^[0-9]*$/,i=/^[a-f0-9]*$/;function a(C){return o(crypto.getRandomValues(new Uint8Array(C)))}ae.randomBytesHex=a;function o(C){return[...C].map(M=>M.toString(16).padStart(2,"0")).join("")}ae.uint8ArrayToHex=o;function d(C){return new Uint8Array(C.match(/.{1,2}/g).map(M=>parseInt(M,16)))}ae.hexStringToUint8Array=d;function c(C,M=!1){const A=C.toString("hex");return(0,r.HexString)(M?`0x${A}`:A)}ae.hexStringFromBuffer=c;function p(C){return(0,r.BigIntString)(C.toString(10))}ae.bigIntStringFromBN=p;function s(C){return(0,r.IntNumber)(new t.default(b(C,!1),16).toNumber())}ae.intNumberFromHexString=s;function f(C){return(0,r.HexString)(`0x${new t.default(C).toString(16)}`)}ae.hexStringFromIntNumber=f;function u(C){return C.startsWith("0x")||C.startsWith("0X")}ae.has0xPrefix=u;function m(C){return u(C)?C.slice(2):C}ae.strip0x=m;function _(C){return u(C)?`0x${C.slice(2)}`:`0x${C}`}ae.prepend0x=_;function y(C){if(typeof C!="string")return!1;const M=m(C).toLowerCase();return i.test(M)}ae.isHexString=y;function l(C,M=!1){if(typeof C=="string"){const A=m(C).toLowerCase();if(i.test(A))return(0,r.HexString)(M?`0x${A}`:A)}throw n.standardErrors.rpc.invalidParams(`"${String(C)}" is not a hexadecimal string`)}ae.ensureHexString=l;function b(C,M=!1){let A=l(C,!1);return A.length%2===1&&(A=(0,r.HexString)(`0${A}`)),M?(0,r.HexString)(`0x${A}`):A}ae.ensureEvenLengthHexString=b;function E(C){if(typeof C=="string"){const M=m(C).toLowerCase();if(y(M)&&M.length===40)return(0,r.AddressString)(_(M))}throw n.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(C)}`)}ae.ensureAddressString=E;function I(C){if(Buffer.isBuffer(C))return C;if(typeof C=="string"){if(y(C)){const M=b(C,!1);return Buffer.from(M,"hex")}return Buffer.from(C,"utf8")}throw n.standardErrors.rpc.invalidParams(`Not binary data: ${String(C)}`)}ae.ensureBuffer=I;function x(C){if(typeof C=="number"&&Number.isInteger(C))return(0,r.IntNumber)(C);if(typeof C=="string"){if(h.test(C))return(0,r.IntNumber)(Number(C));if(y(C))return(0,r.IntNumber)(new t.default(b(C,!1),16).toNumber())}throw n.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ae.ensureIntNumber=x;function D(C){if(C instanceof RegExp)return(0,r.RegExpString)(C.toString());throw n.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(C)}`)}ae.ensureRegExpString=D;function F(C){if(C!==null&&(t.default.isBN(C)||J(C)))return new t.default(C.toString(10),10);if(typeof C=="number")return new t.default(x(C));if(typeof C=="string"){if(h.test(C))return new t.default(C,10);if(y(C))return new t.default(b(C,!1),16)}throw n.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ae.ensureBN=F;function W(C){if(typeof C=="string")return JSON.parse(C);if(typeof C=="object")return C;throw n.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(C)}`)}ae.ensureParsedJSONObject=W;function J(C){if(C==null||typeof C.constructor!="function")return!1;const{constructor:M}=C;return typeof M.config=="function"&&typeof M.EUCLID=="number"}ae.isBigNumber=J;function ee(C,M){return Array.from({length:M-C},(A,L)=>C+L)}ae.range=ee;function Q(){const C=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:M,host:A}=document.location,L=C?C.getAttribute("href"):null;return!L||L.startsWith("javascript:")||L.startsWith("vbscript:")?null:L.startsWith("http://")||L.startsWith("https://")||L.startsWith("data:")?L:L.startsWith("//")?M+L:`${M}//${A}${L}`}ae.getFavicon=Q;function re(C,M,A,L,j,T){const w=L?"parent-id":"id",N=new URLSearchParams({[w]:C,secret:M,server:A,v:j,chainId:T.toString()}).toString();return`${A}/#/link?${N}`}ae.createQrUrl=re;function q(){try{return window.frameElement!==null}catch{return!1}}ae.isInIFrame=q;function g(){try{return q()&&window.top?window.top.location:window.location}catch{return window.location}}ae.getLocation=g;function R(){var C;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((C=window?.navigator)===null||C===void 0?void 0:C.userAgent)}return ae.isMobileWeb=R,ae}var Er={},eu;function u0(){if(eu)return Er;eu=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.ScopedLocalStorage=void 0;let e=class{constructor(n){this.scope=n}setItem(n,r){localStorage.setItem(this.scopedKey(n),r)}getItem(n){return localStorage.getItem(this.scopedKey(n))}removeItem(n){localStorage.removeItem(this.scopedKey(n))}clear(){const n=this.scopedKey(""),r=[];for(let h=0;h<localStorage.length;h++){const i=localStorage.key(h);typeof i=="string"&&i.startsWith(n)&&r.push(i)}r.forEach(h=>localStorage.removeItem(h))}scopedKey(n){return`${this.scope}:${n}`}};return Er.ScopedLocalStorage=e,Er}var At={},Rr={},Sr={},Cr={},tu;function ha(){return tu||(tu=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.EVENTS=void 0,Cr.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}),Cr}var Ke={},ru;function da(){if(ru)return Ke;ru=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.RelayAbstract=Ke.APP_VERSION_KEY=Ke.LOCAL_STORAGE_ADDRESSES_KEY=Ke.WALLET_USER_NAME_KEY=void 0;const e=Fn();Ke.WALLET_USER_NAME_KEY="walletUsername",Ke.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",Ke.APP_VERSION_KEY="AppVersion";let t=class{async makeEthereumJSONRPCRequest(r,h){if(!h)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(h,{method:"POST",body:JSON.stringify(r),mode:"cors",headers:{"Content-Type":"application/json"}}).then(i=>i.json()).then(i=>{if(!i)throw e.standardErrors.rpc.parse({});const a=i,{error:o}=a;if(o)throw(0,e.serializeError)(o,r.method);return a})}};return Ke.RelayAbstract=t,Ke}var Mr={},ti={exports:{}},dn={exports:{}},nu;function tt(){return nu||(nu=1,typeof Object.create=="function"?dn.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:dn.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}),dn.exports}var pn={exports:{}},ri={},kr={},iu;function c0(){if(iu)return kr;iu=1,kr.byteLength=o,kr.toByteArray=c,kr.fromByteArray=f;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,i=r.length;h<i;++h)e[h]=r[h],t[r.charCodeAt(h)]=h;t[45]=62,t[95]=63;function a(u){var m=u.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=u.indexOf("=");_===-1&&(_=m);var y=_===m?0:4-_%4;return[_,y]}function o(u){var m=a(u),_=m[0],y=m[1];return(_+y)*3/4-y}function d(u,m,_){return(m+_)*3/4-_}function c(u){var m,_=a(u),y=_[0],l=_[1],b=new n(d(u,y,l)),E=0,I=l>0?y-4:y,x;for(x=0;x<I;x+=4)m=t[u.charCodeAt(x)]<<18|t[u.charCodeAt(x+1)]<<12|t[u.charCodeAt(x+2)]<<6|t[u.charCodeAt(x+3)],b[E++]=m>>16&255,b[E++]=m>>8&255,b[E++]=m&255;return l===2&&(m=t[u.charCodeAt(x)]<<2|t[u.charCodeAt(x+1)]>>4,b[E++]=m&255),l===1&&(m=t[u.charCodeAt(x)]<<10|t[u.charCodeAt(x+1)]<<4|t[u.charCodeAt(x+2)]>>2,b[E++]=m>>8&255,b[E++]=m&255),b}function p(u){return e[u>>18&63]+e[u>>12&63]+e[u>>6&63]+e[u&63]}function s(u,m,_){for(var y,l=[],b=m;b<_;b+=3)y=(u[b]<<16&16711680)+(u[b+1]<<8&65280)+(u[b+2]&255),l.push(p(y));return l.join("")}function f(u){for(var m,_=u.length,y=_%3,l=[],b=16383,E=0,I=_-y;E<I;E+=b)l.push(s(u,E,E+b>I?I:E+b));return y===1?(m=u[_-1],l.push(e[m>>2]+e[m<<4&63]+"==")):y===2&&(m=(u[_-2]<<8)+u[_-1],l.push(e[m>>10]+e[m>>4&63]+e[m<<2&63]+"=")),l.join("")}return kr}var gn={};var su;function l0(){return su||(su=1,gn.read=function(e,t,n,r,h){var i,a,o=h*8-r-1,d=(1<<o)-1,c=d>>1,p=-7,s=n?h-1:0,f=n?-1:1,u=e[t+s];for(s+=f,i=u&(1<<-p)-1,u>>=-p,p+=o;p>0;i=i*256+e[t+s],s+=f,p-=8);for(a=i&(1<<-p)-1,i>>=-p,p+=r;p>0;a=a*256+e[t+s],s+=f,p-=8);if(i===0)i=1-c;else{if(i===d)return a?NaN:(u?-1:1)*(1/0);a=a+Math.pow(2,r),i=i-c}return(u?-1:1)*a*Math.pow(2,i-r)},gn.write=function(e,t,n,r,h,i){var a,o,d,c=i*8-h-1,p=(1<<c)-1,s=p>>1,f=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=r?0:i-1,m=r?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=p):(a=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+s>=1?t+=f/d:t+=f*Math.pow(2,1-s),t*d>=2&&(a++,d/=2),a+s>=p?(o=0,a=p):a+s>=1?(o=(t*d-1)*Math.pow(2,h),a=a+s):(o=t*Math.pow(2,s-1)*Math.pow(2,h),a=0));h>=8;e[n+u]=o&255,u+=m,o/=256,h-=8);for(a=a<<h|o,c+=h;c>0;e[n+u]=a&255,u+=m,a/=256,c-=8);e[n+u-m]|=_*128}),gn}var ou;function Dn(){return ou||(ou=1,(function(e){const t=c0(),n=l0(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;const h=2147483647;e.kMaxLength=h,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const k=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(k,v),k.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(k){if(k>h)throw new RangeError('The value "'+k+'" is invalid for option "size"');const v=new Uint8Array(k);return Object.setPrototypeOf(v,o.prototype),v}function o(k,v,S){if(typeof k=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(k)}return d(k,v,S)}o.poolSize=8192;function d(k,v,S){if(typeof k=="string")return f(k,v);if(ArrayBuffer.isView(k))return m(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(ye(k,ArrayBuffer)||k&&ye(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(k,SharedArrayBuffer)||k&&ye(k.buffer,SharedArrayBuffer)))return _(k,v,S);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const O=k.valueOf&&k.valueOf();if(O!=null&&O!==k)return o.from(O,v,S);const H=y(k);if(H)return H;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return o.from(k[Symbol.toPrimitive]("string"),v,S);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}o.from=function(k,v,S){return d(k,v,S)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function c(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function p(k,v,S){return c(k),k<=0?a(k):v!==void 0?typeof S=="string"?a(k).fill(v,S):a(k).fill(v):a(k)}o.alloc=function(k,v,S){return p(k,v,S)};function s(k){return c(k),a(k<0?0:l(k)|0)}o.allocUnsafe=function(k){return s(k)},o.allocUnsafeSlow=function(k){return s(k)};function f(k,v){if((typeof v!="string"||v==="")&&(v="utf8"),!o.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const S=E(k,v)|0;let O=a(S);const H=O.write(k,v);return H!==S&&(O=O.slice(0,H)),O}function u(k){const v=k.length<0?0:l(k.length)|0,S=a(v);for(let O=0;O<v;O+=1)S[O]=k[O]&255;return S}function m(k){if(ye(k,Uint8Array)){const v=new Uint8Array(k);return _(v.buffer,v.byteOffset,v.byteLength)}return u(k)}function _(k,v,S){if(v<0||k.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<v+(S||0))throw new RangeError('"length" is outside of buffer bounds');let O;return v===void 0&&S===void 0?O=new Uint8Array(k):S===void 0?O=new Uint8Array(k,v):O=new Uint8Array(k,v,S),Object.setPrototypeOf(O,o.prototype),O}function y(k){if(o.isBuffer(k)){const v=l(k.length)|0,S=a(v);return S.length===0||k.copy(S,0,0,v),S}if(k.length!==void 0)return typeof k.length!="number"||pe(k.length)?a(0):u(k);if(k.type==="Buffer"&&Array.isArray(k.data))return u(k.data)}function l(k){if(k>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return k|0}function b(k){return+k!=k&&(k=0),o.alloc(+k)}o.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==o.prototype},o.compare=function(v,S){if(ye(v,Uint8Array)&&(v=o.from(v,v.offset,v.byteLength)),ye(S,Uint8Array)&&(S=o.from(S,S.offset,S.byteLength)),!o.isBuffer(v)||!o.isBuffer(S))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===S)return 0;let O=v.length,H=S.length;for(let V=0,z=Math.min(O,H);V<z;++V)if(v[V]!==S[V]){O=v[V],H=S[V];break}return O<H?-1:H<O?1:0},o.isEncoding=function(v){switch(String(v).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(v,S){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return o.alloc(0);let O;if(S===void 0)for(S=0,O=0;O<v.length;++O)S+=v[O].length;const H=o.allocUnsafe(S);let V=0;for(O=0;O<v.length;++O){let z=v[O];if(ye(z,Uint8Array))V+z.length>H.length?(o.isBuffer(z)||(z=o.from(z)),z.copy(H,V)):Uint8Array.prototype.set.call(H,z,V);else if(o.isBuffer(z))z.copy(H,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=z.length}return H};function E(k,v){if(o.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||ye(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const S=k.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&S===0)return 0;let H=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return S;case"utf8":case"utf-8":return se(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S*2;case"hex":return S>>>1;case"base64":return ge(k).length;default:if(H)return O?-1:se(k).length;v=(""+v).toLowerCase(),H=!0}}o.byteLength=E;function I(k,v,S){let O=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((S===void 0||S>this.length)&&(S=this.length),S<=0)||(S>>>=0,v>>>=0,S<=v))return"";for(k||(k="utf8");;)switch(k){case"hex":return L(this,v,S);case"utf8":case"utf-8":return g(this,v,S);case"ascii":return M(this,v,S);case"latin1":case"binary":return A(this,v,S);case"base64":return q(this,v,S);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,v,S);default:if(O)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),O=!0}}o.prototype._isBuffer=!0;function x(k,v,S){const O=k[v];k[v]=k[S],k[S]=O}o.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let S=0;S<v;S+=2)x(this,S,S+1);return this},o.prototype.swap32=function(){const v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let S=0;S<v;S+=4)x(this,S,S+3),x(this,S+1,S+2);return this},o.prototype.swap64=function(){const v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let S=0;S<v;S+=8)x(this,S,S+7),x(this,S+1,S+6),x(this,S+2,S+5),x(this,S+3,S+4);return this},o.prototype.toString=function(){const v=this.length;return v===0?"":arguments.length===0?g(this,0,v):I.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(v){if(!o.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:o.compare(this,v)===0},o.prototype.inspect=function(){let v="";const S=e.INSPECT_MAX_BYTES;return v=this.toString("hex",0,S).replace(/(.{2})/g,"$1 ").trim(),this.length>S&&(v+=" ... "),"<Buffer "+v+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(v,S,O,H,V){if(ye(v,Uint8Array)&&(v=o.from(v,v.offset,v.byteLength)),!o.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(S===void 0&&(S=0),O===void 0&&(O=v?v.length:0),H===void 0&&(H=0),V===void 0&&(V=this.length),S<0||O>v.length||H<0||V>this.length)throw new RangeError("out of range index");if(H>=V&&S>=O)return 0;if(H>=V)return-1;if(S>=O)return 1;if(S>>>=0,O>>>=0,H>>>=0,V>>>=0,this===v)return 0;let z=V-H,he=O-S;const fe=Math.min(z,he),le=this.slice(H,V),be=v.slice(S,O);for(let ce=0;ce<fe;++ce)if(le[ce]!==be[ce]){z=le[ce],he=be[ce];break}return z<he?-1:he<z?1:0};function D(k,v,S,O,H){if(k.length===0)return-1;if(typeof S=="string"?(O=S,S=0):S>2147483647?S=2147483647:S<-2147483648&&(S=-2147483648),S=+S,pe(S)&&(S=H?0:k.length-1),S<0&&(S=k.length+S),S>=k.length){if(H)return-1;S=k.length-1}else if(S<0)if(H)S=0;else return-1;if(typeof v=="string"&&(v=o.from(v,O)),o.isBuffer(v))return v.length===0?-1:F(k,v,S,O,H);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call(k,v,S):Uint8Array.prototype.lastIndexOf.call(k,v,S):F(k,[v],S,O,H);throw new TypeError("val must be string, number or Buffer")}function F(k,v,S,O,H){let V=1,z=k.length,he=v.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(k.length<2||v.length<2)return-1;V=2,z/=2,he/=2,S/=2}function fe(be,ce){return V===1?be[ce]:be.readUInt16BE(ce*V)}let le;if(H){let be=-1;for(le=S;le<z;le++)if(fe(k,le)===fe(v,be===-1?0:le-be)){if(be===-1&&(be=le),le-be+1===he)return be*V}else be!==-1&&(le-=le-be),be=-1}else for(S+he>z&&(S=z-he),le=S;le>=0;le--){let be=!0;for(let ce=0;ce<he;ce++)if(fe(k,le+ce)!==fe(v,ce)){be=!1;break}if(be)return le}return-1}o.prototype.includes=function(v,S,O){return this.indexOf(v,S,O)!==-1},o.prototype.indexOf=function(v,S,O){return D(this,v,S,O,!0)},o.prototype.lastIndexOf=function(v,S,O){return D(this,v,S,O,!1)};function W(k,v,S,O){S=Number(S)||0;const H=k.length-S;O?(O=Number(O),O>H&&(O=H)):O=H;const V=v.length;O>V/2&&(O=V/2);let z;for(z=0;z<O;++z){const he=parseInt(v.substr(z*2,2),16);if(pe(he))return z;k[S+z]=he}return z}function J(k,v,S,O){return ue(se(v,k.length-S),k,S,O)}function ee(k,v,S,O){return ue(de(v),k,S,O)}function Q(k,v,S,O){return ue(ge(v),k,S,O)}function re(k,v,S,O){return ue(He(v,k.length-S),k,S,O)}o.prototype.write=function(v,S,O,H){if(S===void 0)H="utf8",O=this.length,S=0;else if(O===void 0&&typeof S=="string")H=S,O=this.length,S=0;else if(isFinite(S))S=S>>>0,isFinite(O)?(O=O>>>0,H===void 0&&(H="utf8")):(H=O,O=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const V=this.length-S;if((O===void 0||O>V)&&(O=V),v.length>0&&(O<0||S<0)||S>this.length)throw new RangeError("Attempt to write outside buffer bounds");H||(H="utf8");let z=!1;for(;;)switch(H){case"hex":return W(this,v,S,O);case"utf8":case"utf-8":return J(this,v,S,O);case"ascii":case"latin1":case"binary":return ee(this,v,S,O);case"base64":return Q(this,v,S,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,v,S,O);default:if(z)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),z=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(k,v,S){return v===0&&S===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(v,S))}function g(k,v,S){S=Math.min(k.length,S);const O=[];let H=v;for(;H<S;){const V=k[H];let z=null,he=V>239?4:V>223?3:V>191?2:1;if(H+he<=S){let fe,le,be,ce;switch(he){case 1:V<128&&(z=V);break;case 2:fe=k[H+1],(fe&192)===128&&(ce=(V&31)<<6|fe&63,ce>127&&(z=ce));break;case 3:fe=k[H+1],le=k[H+2],(fe&192)===128&&(le&192)===128&&(ce=(V&15)<<12|(fe&63)<<6|le&63,ce>2047&&(ce<55296||ce>57343)&&(z=ce));break;case 4:fe=k[H+1],le=k[H+2],be=k[H+3],(fe&192)===128&&(le&192)===128&&(be&192)===128&&(ce=(V&15)<<18|(fe&63)<<12|(le&63)<<6|be&63,ce>65535&&ce<1114112&&(z=ce))}}z===null?(z=65533,he=1):z>65535&&(z-=65536,O.push(z>>>10&1023|55296),z=56320|z&1023),O.push(z),H+=he}return C(O)}const R=4096;function C(k){const v=k.length;if(v<=R)return String.fromCharCode.apply(String,k);let S="",O=0;for(;O<v;)S+=String.fromCharCode.apply(String,k.slice(O,O+=R));return S}function M(k,v,S){let O="";S=Math.min(k.length,S);for(let H=v;H<S;++H)O+=String.fromCharCode(k[H]&127);return O}function A(k,v,S){let O="";S=Math.min(k.length,S);for(let H=v;H<S;++H)O+=String.fromCharCode(k[H]);return O}function L(k,v,S){const O=k.length;(!v||v<0)&&(v=0),(!S||S<0||S>O)&&(S=O);let H="";for(let V=v;V<S;++V)H+=me[k[V]];return H}function j(k,v,S){const O=k.slice(v,S);let H="";for(let V=0;V<O.length-1;V+=2)H+=String.fromCharCode(O[V]+O[V+1]*256);return H}o.prototype.slice=function(v,S){const O=this.length;v=~~v,S=S===void 0?O:~~S,v<0?(v+=O,v<0&&(v=0)):v>O&&(v=O),S<0?(S+=O,S<0&&(S=0)):S>O&&(S=O),S<v&&(S=v);const H=this.subarray(v,S);return Object.setPrototypeOf(H,o.prototype),H};function T(k,v,S){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+v>S)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(v,S,O){v=v>>>0,S=S>>>0,O||T(v,S,this.length);let H=this[v],V=1,z=0;for(;++z<S&&(V*=256);)H+=this[v+z]*V;return H},o.prototype.readUintBE=o.prototype.readUIntBE=function(v,S,O){v=v>>>0,S=S>>>0,O||T(v,S,this.length);let H=this[v+--S],V=1;for(;S>0&&(V*=256);)H+=this[v+--S]*V;return H},o.prototype.readUint8=o.prototype.readUInt8=function(v,S){return v=v>>>0,S||T(v,1,this.length),this[v]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(v,S){return v=v>>>0,S||T(v,2,this.length),this[v]|this[v+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(v,S){return v=v>>>0,S||T(v,2,this.length),this[v]<<8|this[v+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(v,S){return v=v>>>0,S||T(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(v,S){return v=v>>>0,S||T(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},o.prototype.readBigUInt64LE=$e(function(v){v=v>>>0,Z(v,"offset");const S=this[v],O=this[v+7];(S===void 0||O===void 0)&&K(v,this.length-8);const H=S+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,V=this[++v]+this[++v]*2**8+this[++v]*2**16+O*2**24;return BigInt(H)+(BigInt(V)<<BigInt(32))}),o.prototype.readBigUInt64BE=$e(function(v){v=v>>>0,Z(v,"offset");const S=this[v],O=this[v+7];(S===void 0||O===void 0)&&K(v,this.length-8);const H=S*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],V=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+O;return(BigInt(H)<<BigInt(32))+BigInt(V)}),o.prototype.readIntLE=function(v,S,O){v=v>>>0,S=S>>>0,O||T(v,S,this.length);let H=this[v],V=1,z=0;for(;++z<S&&(V*=256);)H+=this[v+z]*V;return V*=128,H>=V&&(H-=Math.pow(2,8*S)),H},o.prototype.readIntBE=function(v,S,O){v=v>>>0,S=S>>>0,O||T(v,S,this.length);let H=S,V=1,z=this[v+--H];for(;H>0&&(V*=256);)z+=this[v+--H]*V;return V*=128,z>=V&&(z-=Math.pow(2,8*S)),z},o.prototype.readInt8=function(v,S){return v=v>>>0,S||T(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},o.prototype.readInt16LE=function(v,S){v=v>>>0,S||T(v,2,this.length);const O=this[v]|this[v+1]<<8;return O&32768?O|4294901760:O},o.prototype.readInt16BE=function(v,S){v=v>>>0,S||T(v,2,this.length);const O=this[v+1]|this[v]<<8;return O&32768?O|4294901760:O},o.prototype.readInt32LE=function(v,S){return v=v>>>0,S||T(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},o.prototype.readInt32BE=function(v,S){return v=v>>>0,S||T(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},o.prototype.readBigInt64LE=$e(function(v){v=v>>>0,Z(v,"offset");const S=this[v],O=this[v+7];(S===void 0||O===void 0)&&K(v,this.length-8);const H=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(O<<24);return(BigInt(H)<<BigInt(32))+BigInt(S+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24)}),o.prototype.readBigInt64BE=$e(function(v){v=v>>>0,Z(v,"offset");const S=this[v],O=this[v+7];(S===void 0||O===void 0)&&K(v,this.length-8);const H=(S<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(H)<<BigInt(32))+BigInt(this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+O)}),o.prototype.readFloatLE=function(v,S){return v=v>>>0,S||T(v,4,this.length),n.read(this,v,!0,23,4)},o.prototype.readFloatBE=function(v,S){return v=v>>>0,S||T(v,4,this.length),n.read(this,v,!1,23,4)},o.prototype.readDoubleLE=function(v,S){return v=v>>>0,S||T(v,8,this.length),n.read(this,v,!0,52,8)},o.prototype.readDoubleBE=function(v,S){return v=v>>>0,S||T(v,8,this.length),n.read(this,v,!1,52,8)};function w(k,v,S,O,H,V){if(!o.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>H||v<V)throw new RangeError('"value" argument is out of bounds');if(S+O>k.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(v,S,O,H){if(v=+v,S=S>>>0,O=O>>>0,!H){const he=Math.pow(2,8*O)-1;w(this,v,S,O,he,0)}let V=1,z=0;for(this[S]=v&255;++z<O&&(V*=256);)this[S+z]=v/V&255;return S+O},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(v,S,O,H){if(v=+v,S=S>>>0,O=O>>>0,!H){const he=Math.pow(2,8*O)-1;w(this,v,S,O,he,0)}let V=O-1,z=1;for(this[S+V]=v&255;--V>=0&&(z*=256);)this[S+V]=v/z&255;return S+O},o.prototype.writeUint8=o.prototype.writeUInt8=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,1,255,0),this[S]=v&255,S+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,2,65535,0),this[S]=v&255,this[S+1]=v>>>8,S+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,2,65535,0),this[S]=v>>>8,this[S+1]=v&255,S+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,4,4294967295,0),this[S+3]=v>>>24,this[S+2]=v>>>16,this[S+1]=v>>>8,this[S]=v&255,S+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,4,4294967295,0),this[S]=v>>>24,this[S+1]=v>>>16,this[S+2]=v>>>8,this[S+3]=v&255,S+4};function N(k,v,S,O,H){P(v,O,H,k,S,7);let V=Number(v&BigInt(4294967295));k[S++]=V,V=V>>8,k[S++]=V,V=V>>8,k[S++]=V,V=V>>8,k[S++]=V;let z=Number(v>>BigInt(32)&BigInt(4294967295));return k[S++]=z,z=z>>8,k[S++]=z,z=z>>8,k[S++]=z,z=z>>8,k[S++]=z,S}function te(k,v,S,O,H){P(v,O,H,k,S,7);let V=Number(v&BigInt(4294967295));k[S+7]=V,V=V>>8,k[S+6]=V,V=V>>8,k[S+5]=V,V=V>>8,k[S+4]=V;let z=Number(v>>BigInt(32)&BigInt(4294967295));return k[S+3]=z,z=z>>8,k[S+2]=z,z=z>>8,k[S+1]=z,z=z>>8,k[S]=z,S+8}o.prototype.writeBigUInt64LE=$e(function(v,S=0){return N(this,v,S,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=$e(function(v,S=0){return te(this,v,S,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(v,S,O,H){if(v=+v,S=S>>>0,!H){const fe=Math.pow(2,8*O-1);w(this,v,S,O,fe-1,-fe)}let V=0,z=1,he=0;for(this[S]=v&255;++V<O&&(z*=256);)v<0&&he===0&&this[S+V-1]!==0&&(he=1),this[S+V]=(v/z>>0)-he&255;return S+O},o.prototype.writeIntBE=function(v,S,O,H){if(v=+v,S=S>>>0,!H){const fe=Math.pow(2,8*O-1);w(this,v,S,O,fe-1,-fe)}let V=O-1,z=1,he=0;for(this[S+V]=v&255;--V>=0&&(z*=256);)v<0&&he===0&&this[S+V+1]!==0&&(he=1),this[S+V]=(v/z>>0)-he&255;return S+O},o.prototype.writeInt8=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,1,127,-128),v<0&&(v=255+v+1),this[S]=v&255,S+1},o.prototype.writeInt16LE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,2,32767,-32768),this[S]=v&255,this[S+1]=v>>>8,S+2},o.prototype.writeInt16BE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,2,32767,-32768),this[S]=v>>>8,this[S+1]=v&255,S+2},o.prototype.writeInt32LE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,4,2147483647,-2147483648),this[S]=v&255,this[S+1]=v>>>8,this[S+2]=v>>>16,this[S+3]=v>>>24,S+4},o.prototype.writeInt32BE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[S]=v>>>24,this[S+1]=v>>>16,this[S+2]=v>>>8,this[S+3]=v&255,S+4},o.prototype.writeBigInt64LE=$e(function(v,S=0){return N(this,v,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=$e(function(v,S=0){return te(this,v,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y(k,v,S,O,H,V){if(S+O>k.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("Index out of range")}function U(k,v,S,O,H){return v=+v,S=S>>>0,H||Y(k,v,S,4),n.write(k,v,S,O,23,4),S+4}o.prototype.writeFloatLE=function(v,S,O){return U(this,v,S,!0,O)},o.prototype.writeFloatBE=function(v,S,O){return U(this,v,S,!1,O)};function $(k,v,S,O,H){return v=+v,S=S>>>0,H||Y(k,v,S,8),n.write(k,v,S,O,52,8),S+8}o.prototype.writeDoubleLE=function(v,S,O){return $(this,v,S,!0,O)},o.prototype.writeDoubleBE=function(v,S,O){return $(this,v,S,!1,O)},o.prototype.copy=function(v,S,O,H){if(!o.isBuffer(v))throw new TypeError("argument should be a Buffer");if(O||(O=0),!H&&H!==0&&(H=this.length),S>=v.length&&(S=v.length),S||(S=0),H>0&&H<O&&(H=O),H===O||v.length===0||this.length===0)return 0;if(S<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");H>this.length&&(H=this.length),v.length-S<H-O&&(H=v.length-S+O);const V=H-O;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(S,O,H):Uint8Array.prototype.set.call(v,this.subarray(O,H),S),V},o.prototype.fill=function(v,S,O,H){if(typeof v=="string"){if(typeof S=="string"?(H=S,S=0,O=this.length):typeof O=="string"&&(H=O,O=this.length),H!==void 0&&typeof H!="string")throw new TypeError("encoding must be a string");if(typeof H=="string"&&!o.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(v.length===1){const z=v.charCodeAt(0);(H==="utf8"&&z<128||H==="latin1")&&(v=z)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(S<0||this.length<S||this.length<O)throw new RangeError("Out of range index");if(O<=S)return this;S=S>>>0,O=O===void 0?this.length:O>>>0,v||(v=0);let V;if(typeof v=="number")for(V=S;V<O;++V)this[V]=v;else{const z=o.isBuffer(v)?v:o.from(v,H),he=z.length;if(he===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(V=0;V<O-S;++V)this[V+S]=z[V%he]}return this};const G={};function X(k,v,S){G[k]=class extends S{constructor(){super(),Object.defineProperty(this,"message",{value:v.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}X("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),X("ERR_INVALID_ARG_TYPE",function(k,v){return`The "${k}" argument must be of type number. Received type ${typeof v}`},TypeError),X("ERR_OUT_OF_RANGE",function(k,v,S){let O=`The value of "${k}" is out of range.`,H=S;return Number.isInteger(S)&&Math.abs(S)>2**32?H=ne(String(S)):typeof S=="bigint"&&(H=String(S),(S>BigInt(2)**BigInt(32)||S<-(BigInt(2)**BigInt(32)))&&(H=ne(H)),H+="n"),O+=` It must be ${v}. Received ${H}`,O},RangeError);function ne(k){let v="",S=k.length;const O=k[0]==="-"?1:0;for(;S>=O+4;S-=3)v=`_${k.slice(S-3,S)}${v}`;return`${k.slice(0,S)}${v}`}function B(k,v,S){Z(v,"offset"),(k[v]===void 0||k[v+S]===void 0)&&K(v,k.length-(S+1))}function P(k,v,S,O,H,V){if(k>S||k<v){const z=typeof v=="bigint"?"n":"";let he;throw v===0||v===BigInt(0)?he=`>= 0${z} and < 2${z} ** ${(V+1)*8}${z}`:he=`>= -(2${z} ** ${(V+1)*8-1}${z}) and < 2 ** ${(V+1)*8-1}${z}`,new G.ERR_OUT_OF_RANGE("value",he,k)}B(O,H,V)}function Z(k,v){if(typeof k!="number")throw new G.ERR_INVALID_ARG_TYPE(v,"number",k)}function K(k,v,S){throw Math.floor(k)!==k?(Z(k,S),new G.ERR_OUT_OF_RANGE("offset","an integer",k)):v<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,k)}const oe=/[^+/0-9A-Za-z-_]/g;function ie(k){if(k=k.split("=")[0],k=k.trim().replace(oe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function se(k,v){v=v||1/0;let S;const O=k.length;let H=null;const V=[];for(let z=0;z<O;++z){if(S=k.charCodeAt(z),S>55295&&S<57344){if(!H){if(S>56319){(v-=3)>-1&&V.push(239,191,189);continue}else if(z+1===O){(v-=3)>-1&&V.push(239,191,189);continue}H=S;continue}if(S<56320){(v-=3)>-1&&V.push(239,191,189),H=S;continue}S=(H-55296<<10|S-56320)+65536}else H&&(v-=3)>-1&&V.push(239,191,189);if(H=null,S<128){if((v-=1)<0)break;V.push(S)}else if(S<2048){if((v-=2)<0)break;V.push(S>>6|192,S&63|128)}else if(S<65536){if((v-=3)<0)break;V.push(S>>12|224,S>>6&63|128,S&63|128)}else if(S<1114112){if((v-=4)<0)break;V.push(S>>18|240,S>>12&63|128,S>>6&63|128,S&63|128)}else throw new Error("Invalid code point")}return V}function de(k){const v=[];for(let S=0;S<k.length;++S)v.push(k.charCodeAt(S)&255);return v}function He(k,v){let S,O,H;const V=[];for(let z=0;z<k.length&&!((v-=2)<0);++z)S=k.charCodeAt(z),O=S>>8,H=S%256,V.push(H),V.push(O);return V}function ge(k){return t.toByteArray(ie(k))}function ue(k,v,S,O){let H;for(H=0;H<O&&!(H+S>=v.length||H>=k.length);++H)v[H+S]=k[H];return H}function ye(k,v){return k instanceof v||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===v.name}function pe(k){return k!==k}const me=(function(){const k="0123456789abcdef",v=new Array(256);for(let S=0;S<16;++S){const O=S*16;for(let H=0;H<16;++H)v[O+H]=k[S]+k[H]}return v})();function $e(k){return typeof BigInt>"u"?ve:k}function ve(){throw new Error("BigInt not supported")}})(ri)),ri}var au;function ct(){return au||(au=1,(function(e,t){var n=Dn(),r=n.Buffer;function h(a,o){for(var d in a)o[d]=a[d]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(h(n,t),t.Buffer=i);function i(a,o,d){return r(a,o,d)}i.prototype=Object.create(r.prototype),h(r,i),i.from=function(a,o,d){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,o,d)},i.alloc=function(a,o,d){if(typeof a!="number")throw new TypeError("Argument must be a number");var c=r(a);return o!==void 0?typeof d=="string"?c.fill(o,d):c.fill(o):c.fill(0),c},i.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},i.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(a)}})(pn,pn.exports)),pn.exports}var ni,uu;function f0(){if(uu)return ni;uu=1;var e={}.toString;return ni=Array.isArray||function(t){return e.call(t)=="[object Array]"},ni}var ii,cu;function tn(){return cu||(cu=1,ii=TypeError),ii}var si,lu;function Nh(){return lu||(lu=1,si=Object),si}var oi,fu;function h0(){return fu||(fu=1,oi=Error),oi}var ai,hu;function d0(){return hu||(hu=1,ai=EvalError),ai}var ui,du;function p0(){return du||(du=1,ui=RangeError),ui}var ci,pu;function g0(){return pu||(pu=1,ci=ReferenceError),ci}var li,gu;function Oh(){return gu||(gu=1,li=SyntaxError),li}var fi,mu;function m0(){return mu||(mu=1,fi=URIError),fi}var hi,yu;function y0(){return yu||(yu=1,hi=Math.abs),hi}var di,_u;function _0(){return _u||(_u=1,di=Math.floor),di}var pi,vu;function v0(){return vu||(vu=1,pi=Math.max),pi}var gi,bu;function b0(){return bu||(bu=1,gi=Math.min),gi}var mi,wu;function w0(){return wu||(wu=1,mi=Math.pow),mi}var yi,Eu;function E0(){return Eu||(Eu=1,yi=Math.round),yi}var _i,Ru;function R0(){return Ru||(Ru=1,_i=Number.isNaN||function(t){return t!==t}),_i}var vi,Su;function S0(){if(Su)return vi;Su=1;var e=R0();return vi=function(n){return e(n)||n===0?n:n<0?-1:1},vi}var bi,Cu;function C0(){return Cu||(Cu=1,bi=Object.getOwnPropertyDescriptor),bi}var wi,Mu;function rn(){if(Mu)return wi;Mu=1;var e=C0();if(e)try{e([],"length")}catch{e=null}return wi=e,wi}var Ei,ku;function jn(){if(ku)return Ei;ku=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Ei=e,Ei}var Ri,Iu;function Fh(){return Iu||(Iu=1,Ri=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var h=42;t[n]=h;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,n);if(o.value!==h||o.enumerable!==!0)return!1}return!0}),Ri}var Si,Au;function M0(){if(Au)return Si;Au=1;var e=typeof Symbol<"u"&&Symbol,t=Fh();return Si=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Si}var Ci,xu;function qh(){return xu||(xu=1,Ci=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ci}var Mi,Tu;function Dh(){if(Tu)return Mi;Tu=1;var e=Nh();return Mi=e.getPrototypeOf||null,Mi}var ki,Bu;function k0(){if(Bu)return ki;Bu=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",h=function(d,c){for(var p=[],s=0;s<d.length;s+=1)p[s]=d[s];for(var f=0;f<c.length;f+=1)p[f+d.length]=c[f];return p},i=function(d,c){for(var p=[],s=c,f=0;s<d.length;s+=1,f+=1)p[f]=d[s];return p},a=function(o,d){for(var c="",p=0;p<o.length;p+=1)c+=o[p],p+1<o.length&&(c+=d);return c};return ki=function(d){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var p=i(arguments,1),s,f=function(){if(this instanceof s){var l=c.apply(this,h(p,arguments));return Object(l)===l?l:this}return c.apply(d,h(p,arguments))},u=n(0,c.length-p.length),m=[],_=0;_<u;_++)m[_]="$"+_;if(s=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var y=function(){};y.prototype=c.prototype,s.prototype=new y,y.prototype=null}return s},ki}var Ii,Pu;function nn(){if(Pu)return Ii;Pu=1;var e=k0();return Ii=Function.prototype.bind||e,Ii}var Ai,Lu;function pa(){return Lu||(Lu=1,Ai=Function.prototype.call),Ai}var xi,Nu;function ga(){return Nu||(Nu=1,xi=Function.prototype.apply),xi}var Ti,Ou;function I0(){return Ou||(Ou=1,Ti=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ti}var Bi,Fu;function jh(){if(Fu)return Bi;Fu=1;var e=nn(),t=ga(),n=pa(),r=I0();return Bi=r||e.call(n,t),Bi}var Pi,qu;function ma(){if(qu)return Pi;qu=1;var e=nn(),t=tn(),n=pa(),r=jh();return Pi=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Pi}var Li,Du;function A0(){if(Du)return Li;Du=1;var e=ma(),t=rn(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),h=Object,i=h.getPrototypeOf;return Li=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(o){return i(o==null?o:h(o))}:!1,Li}var Ni,ju;function Uh(){if(ju)return Ni;ju=1;var e=qh(),t=Dh(),n=A0();return Ni=e?function(h){return e(h)}:t?function(h){if(!h||typeof h!="object"&&typeof h!="function")throw new TypeError("getProto: not an object");return t(h)}:n?function(h){return n(h)}:null,Ni}var Oi,Uu;function x0(){if(Uu)return Oi;Uu=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=nn();return Oi=n.call(e,t),Oi}var Fi,Hu;function Hh(){if(Hu)return Fi;Hu=1;var e,t=Nh(),n=h0(),r=d0(),h=p0(),i=g0(),a=Oh(),o=tn(),d=m0(),c=y0(),p=_0(),s=v0(),f=b0(),u=w0(),m=E0(),_=S0(),y=Function,l=function(X){try{return y('"use strict"; return ('+X+").constructor;")()}catch{}},b=rn(),E=jn(),I=function(){throw new o},x=b?(function(){try{return arguments.callee,I}catch{try{return b(arguments,"callee").get}catch{return I}}})():I,D=M0()(),F=Uh(),W=Dh(),J=qh(),ee=ga(),Q=pa(),re={},q=typeof Uint8Array>"u"||!F?e:F(Uint8Array),g={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":D&&F?F([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":re,"%AsyncGenerator%":re,"%AsyncGeneratorFunction%":re,"%AsyncIteratorPrototype%":re,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":re,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D&&F?F(F([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!D||!F?e:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":h,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!D||!F?e:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D&&F?F(""[Symbol.iterator]()):e,"%Symbol%":D?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":x,"%TypedArray%":q,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":Q,"%Function.prototype.apply%":ee,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":W,"%Math.abs%":c,"%Math.floor%":p,"%Math.max%":s,"%Math.min%":f,"%Math.pow%":u,"%Math.round%":m,"%Math.sign%":_,"%Reflect.getPrototypeOf%":J};if(F)try{null.error}catch(X){var R=F(F(X));g["%Error.prototype%"]=R}var C=function X(ne){var B;if(ne==="%AsyncFunction%")B=l("async function () {}");else if(ne==="%GeneratorFunction%")B=l("function* () {}");else if(ne==="%AsyncGeneratorFunction%")B=l("async function* () {}");else if(ne==="%AsyncGenerator%"){var P=X("%AsyncGeneratorFunction%");P&&(B=P.prototype)}else if(ne==="%AsyncIteratorPrototype%"){var Z=X("%AsyncGenerator%");Z&&F&&(B=F(Z.prototype))}return g[ne]=B,B},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=nn(),L=x0(),j=A.call(Q,Array.prototype.concat),T=A.call(ee,Array.prototype.splice),w=A.call(Q,String.prototype.replace),N=A.call(Q,String.prototype.slice),te=A.call(Q,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,$=function(ne){var B=N(ne,0,1),P=N(ne,-1);if(B==="%"&&P!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(P==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var Z=[];return w(ne,Y,function(K,oe,ie,se){Z[Z.length]=ie?w(se,U,"$1"):oe||K}),Z},G=function(ne,B){var P=ne,Z;if(L(M,P)&&(Z=M[P],P="%"+Z[0]+"%"),L(g,P)){var K=g[P];if(K===re&&(K=C(P)),typeof K>"u"&&!B)throw new o("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:Z,name:P,value:K}}throw new a("intrinsic "+ne+" does not exist!")};return Fi=function(ne,B){if(typeof ne!="string"||ne.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof B!="boolean")throw new o('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,ne)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var P=$(ne),Z=P.length>0?P[0]:"",K=G("%"+Z+"%",B),oe=K.name,ie=K.value,se=!1,de=K.alias;de&&(Z=de[0],T(P,j([0,1],de)));for(var He=1,ge=!0;He<P.length;He+=1){var ue=P[He],ye=N(ue,0,1),pe=N(ue,-1);if((ye==='"'||ye==="'"||ye==="`"||pe==='"'||pe==="'"||pe==="`")&&ye!==pe)throw new a("property names with quotes must have matching quotes");if((ue==="constructor"||!ge)&&(se=!0),Z+="."+ue,oe="%"+Z+"%",L(g,oe))ie=g[oe];else if(ie!=null){if(!(ue in ie)){if(!B)throw new o("base intrinsic for "+ne+" exists, but the property is not available.");return}if(b&&He+1>=P.length){var me=b(ie,ue);ge=!!me,ge&&"get"in me&&!("originalValue"in me.get)?ie=me.get:ie=ie[ue]}else ge=L(ie,ue),ie=ie[ue];ge&&!se&&(g[oe]=ie)}}return ie},Fi}var qi,Wu;function Wh(){if(Wu)return qi;Wu=1;var e=Hh(),t=ma(),n=t([e("%String.prototype.indexOf%")]);return qi=function(h,i){var a=e(h,!!i);return typeof a=="function"&&n(h,".prototype.")>-1?t([a]):a},qi}var Di,$u;function T0(){if($u)return Di;$u=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,n)}catch(b){b!==r&&(t=null)}else t=null;var h=/^\s*class\b/,i=function(E){try{var I=e.call(E);return h.test(I)}catch{return!1}},a=function(E){try{return i(E)?!1:(e.call(E),!0)}catch{return!1}},o=Object.prototype.toString,d="[object Object]",c="[object Function]",p="[object GeneratorFunction]",s="[object HTMLAllCollection]",f="[object HTML document.all class]",u="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,_=!(0 in[,]),y=function(){return!1};if(typeof document=="object"){var l=document.all;o.call(l)===o.call(document.all)&&(y=function(E){if((_||!E)&&(typeof E>"u"||typeof E=="object"))try{var I=o.call(E);return(I===s||I===f||I===u||I===d)&&E("")==null}catch{}return!1})}return Di=t?function(E){if(y(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;try{t(E,null,n)}catch(I){if(I!==r)return!1}return!i(E)&&a(E)}:function(E){if(y(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;if(m)return a(E);if(i(E))return!1;var I=o.call(E);return I!==c&&I!==p&&!/^\[object HTML/.test(I)?!1:a(E)},Di}var ji,Vu;function B0(){if(Vu)return ji;Vu=1;var e=T0(),t=Object.prototype.toString,n=Object.prototype.hasOwnProperty,r=function(d,c,p){for(var s=0,f=d.length;s<f;s++)n.call(d,s)&&(p==null?c(d[s],s,d):c.call(p,d[s],s,d))},h=function(d,c,p){for(var s=0,f=d.length;s<f;s++)p==null?c(d.charAt(s),s,d):c.call(p,d.charAt(s),s,d)},i=function(d,c,p){for(var s in d)n.call(d,s)&&(p==null?c(d[s],s,d):c.call(p,d[s],s,d))};function a(o){return t.call(o)==="[object Array]"}return ji=function(d,c,p){if(!e(c))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=p),a(d)?r(d,c,s):typeof d=="string"?h(d,c,s):i(d,c,s)},ji}var Ui,zu;function P0(){return zu||(zu=1,Ui=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Ui}var Hi,Gu;function L0(){if(Gu)return Hi;Gu=1;var e=P0(),t=typeof globalThis>"u"?ft:globalThis;return Hi=function(){for(var r=[],h=0;h<e.length;h++)typeof t[e[h]]=="function"&&(r[r.length]=e[h]);return r},Hi}var Wi={exports:{}},$i,Ju;function N0(){if(Ju)return $i;Ju=1;var e=jn(),t=Oh(),n=tn(),r=rn();return $i=function(i,a,o){if(!i||typeof i!="object"&&typeof i!="function")throw new n("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var d=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,f=!!r&&r(i,a);if(e)e(i,a,{configurable:p===null&&f?f.configurable:!p,enumerable:d===null&&f?f.enumerable:!d,value:o,writable:c===null&&f?f.writable:!c});else if(s||!d&&!c&&!p)i[a]=o;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},$i}var Vi,Zu;function O0(){if(Zu)return Vi;Zu=1;var e=jn(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Vi=t,Vi}var zi,Ku;function F0(){if(Ku)return zi;Ku=1;var e=Hh(),t=N0(),n=O0()(),r=rn(),h=tn(),i=e("%Math.floor%");return zi=function(o,d){if(typeof o!="function")throw new h("`fn` is not a function");if(typeof d!="number"||d<0||d>4294967295||i(d)!==d)throw new h("`length` must be a positive 32-bit integer");var c=arguments.length>2&&!!arguments[2],p=!0,s=!0;if("length"in o&&r){var f=r(o,"length");f&&!f.configurable&&(p=!1),f&&!f.writable&&(s=!1)}return(p||s||!c)&&(n?t(o,"length",d,!0,!0):t(o,"length",d)),o},zi}var Gi,Qu;function q0(){if(Qu)return Gi;Qu=1;var e=nn(),t=ga(),n=jh();return Gi=function(){return n(e,t,arguments)},Gi}var Yu;function D0(){return Yu||(Yu=1,(function(e){var t=F0(),n=jn(),r=ma(),h=q0();e.exports=function(a){var o=r(arguments),d=a.length-(arguments.length-1);return t(o,1+(d>0?d:0),!0)},n?n(e.exports,"apply",{value:h}):e.exports.apply=h})(Wi)),Wi.exports}var Ji,Xu;function j0(){if(Xu)return Ji;Xu=1;var e=Fh();return Ji=function(){return e()&&!!Symbol.toStringTag},Ji}var Zi,ec;function U0(){if(ec)return Zi;ec=1;var e=B0(),t=L0(),n=D0(),r=Wh(),h=rn(),i=Uh(),a=r("Object.prototype.toString"),o=j0()(),d=typeof globalThis>"u"?ft:globalThis,c=t(),p=r("String.prototype.slice"),s=r("Array.prototype.indexOf",!0)||function(y,l){for(var b=0;b<y.length;b+=1)if(y[b]===l)return b;return-1},f={__proto__:null};o&&h&&i?e(c,function(_){var y=new d[_];if(Symbol.toStringTag in y&&i){var l=i(y),b=h(l,Symbol.toStringTag);if(!b&&l){var E=i(l);b=h(E,Symbol.toStringTag)}f["$"+_]=n(b.get)}}):e(c,function(_){var y=new d[_],l=y.slice||y.set;l&&(f["$"+_]=n(l))});var u=function(y){var l=!1;return e(f,function(b,E){if(!l)try{"$"+b(y)===E&&(l=p(E,1))}catch{}}),l},m=function(y){var l=!1;return e(f,function(b,E){if(!l)try{b(y),l=p(E,1)}catch{}}),l};return Zi=function(y){if(!y||typeof y!="object")return!1;if(!o){var l=p(a(y),8,-1);return s(c,l)>-1?l:l!=="Object"?!1:m(y)}return h?u(y):null},Zi}var Ki,tc;function H0(){if(tc)return Ki;tc=1;var e=U0();return Ki=function(n){return!!e(n)},Ki}var Qi,rc;function W0(){if(rc)return Qi;rc=1;var e=tn(),t=Wh(),n=t("TypedArray.prototype.buffer",!0),r=H0();return Qi=n||function(i){if(!r(i))throw new e("Not a Typed Array");return i.buffer},Qi}var Yi,nc;function $0(){if(nc)return Yi;nc=1;var e=ct().Buffer,t=f0(),n=W0(),r=ArrayBuffer.isView||function(d){try{return n(d),!0}catch{return!1}},h=typeof Uint8Array<"u",i=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",a=i&&(e.prototype instanceof Uint8Array||e.TYPED_ARRAY_SUPPORT);return Yi=function(d,c){if(e.isBuffer(d))return d.constructor&&!("isBuffer"in d)?e.from(d):d;if(typeof d=="string")return e.from(d,c);if(i&&r(d)){if(d.byteLength===0)return e.alloc(0);if(a){var p=e.from(d.buffer,d.byteOffset,d.byteLength);if(p.byteLength===d.byteLength)return p}var s=d instanceof Uint8Array?d:new Uint8Array(d.buffer,d.byteOffset,d.byteLength),f=e.from(s);if(f.length===d.byteLength)return f}if(h&&d instanceof Uint8Array)return e.from(d);var u=t(d);if(u)for(var m=0;m<d.length;m+=1){var _=d[m];if(typeof _!="number"||_<0||_>255||~~_!==_)throw new RangeError("Array items must be numbers in the range 0-255.")}if(u||e.isBuffer(d)&&d.constructor&&typeof d.constructor.isBuffer=="function"&&d.constructor.isBuffer(d))return e.from(d);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},Yi}var Xi,ic;function fr(){if(ic)return Xi;ic=1;var e=ct().Buffer,t=$0();function n(r,h){this._block=e.alloc(r),this._finalSize=h,this._blockSize=r,this._len=0}return n.prototype.update=function(r,h){r=t(r,h||"utf8");for(var i=this._block,a=this._blockSize,o=r.length,d=this._len,c=0;c<o;){for(var p=d%a,s=Math.min(o-c,a-p),f=0;f<s;f++)i[p+f]=r[c+f];d+=s,c+=s,d%a===0&&this._update(i)}return this._len+=o,this},n.prototype.digest=function(r){var h=this._len%this._blockSize;this._block[h]=128,this._block.fill(0,h+1),h>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=this._len*8;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var a=(i&4294967295)>>>0,o=(i-a)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(a,this._blockSize-4)}this._update(this._block);var d=this._hash();return r?d.toString(r):d},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},Xi=n,Xi}var es,sc;function V0(){if(sc)return es;sc=1;var e=tt(),t=fr(),n=ct().Buffer,r=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);function i(){this.init(),this._w=h,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function a(c){return c<<5|c>>>27}function o(c){return c<<30|c>>>2}function d(c,p,s,f){return c===0?p&s|~p&f:c===2?p&s|p&f|s&f:p^s^f}return i.prototype._update=function(c){for(var p=this._w,s=this._a|0,f=this._b|0,u=this._c|0,m=this._d|0,_=this._e|0,y=0;y<16;++y)p[y]=c.readInt32BE(y*4);for(;y<80;++y)p[y]=p[y-3]^p[y-8]^p[y-14]^p[y-16];for(var l=0;l<80;++l){var b=~~(l/20),E=a(s)+d(b,f,u,m)+_+p[l]+r[b]|0;_=m,m=u,u=o(f),f=s,s=E}this._a=s+this._a|0,this._b=f+this._b|0,this._c=u+this._c|0,this._d=m+this._d|0,this._e=_+this._e|0},i.prototype._hash=function(){var c=n.allocUnsafe(20);return c.writeInt32BE(this._a|0,0),c.writeInt32BE(this._b|0,4),c.writeInt32BE(this._c|0,8),c.writeInt32BE(this._d|0,12),c.writeInt32BE(this._e|0,16),c},es=i,es}var ts,oc;function z0(){if(oc)return ts;oc=1;var e=tt(),t=fr(),n=ct().Buffer,r=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);function i(){this.init(),this._w=h,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function a(p){return p<<1|p>>>31}function o(p){return p<<5|p>>>27}function d(p){return p<<30|p>>>2}function c(p,s,f,u){return p===0?s&f|~s&u:p===2?s&f|s&u|f&u:s^f^u}return i.prototype._update=function(p){for(var s=this._w,f=this._a|0,u=this._b|0,m=this._c|0,_=this._d|0,y=this._e|0,l=0;l<16;++l)s[l]=p.readInt32BE(l*4);for(;l<80;++l)s[l]=a(s[l-3]^s[l-8]^s[l-14]^s[l-16]);for(var b=0;b<80;++b){var E=~~(b/20),I=o(f)+c(E,u,m,_)+y+s[b]+r[E]|0;y=_,_=m,m=d(u),u=f,f=I}this._a=f+this._a|0,this._b=u+this._b|0,this._c=m+this._c|0,this._d=_+this._d|0,this._e=y+this._e|0},i.prototype._hash=function(){var p=n.allocUnsafe(20);return p.writeInt32BE(this._a|0,0),p.writeInt32BE(this._b|0,4),p.writeInt32BE(this._c|0,8),p.writeInt32BE(this._d|0,12),p.writeInt32BE(this._e|0,16),p},ts=i,ts}var rs,ac;function $h(){if(ac)return rs;ac=1;var e=tt(),t=fr(),n=ct().Buffer,r=[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],h=new Array(64);function i(){this.init(),this._w=h,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function a(f,u,m){return m^f&(u^m)}function o(f,u,m){return f&u|m&(f|u)}function d(f){return(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10)}function c(f){return(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7)}function p(f){return(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3}function s(f){return(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10}return i.prototype._update=function(f){for(var u=this._w,m=this._a|0,_=this._b|0,y=this._c|0,l=this._d|0,b=this._e|0,E=this._f|0,I=this._g|0,x=this._h|0,D=0;D<16;++D)u[D]=f.readInt32BE(D*4);for(;D<64;++D)u[D]=s(u[D-2])+u[D-7]+p(u[D-15])+u[D-16]|0;for(var F=0;F<64;++F){var W=x+c(b)+a(b,E,I)+r[F]+u[F]|0,J=d(m)+o(m,_,y)|0;x=I,I=E,E=b,b=l+W|0,l=y,y=_,_=m,m=W+J|0}this._a=m+this._a|0,this._b=_+this._b|0,this._c=y+this._c|0,this._d=l+this._d|0,this._e=b+this._e|0,this._f=E+this._f|0,this._g=I+this._g|0,this._h=x+this._h|0},i.prototype._hash=function(){var f=n.allocUnsafe(32);return f.writeInt32BE(this._a,0),f.writeInt32BE(this._b,4),f.writeInt32BE(this._c,8),f.writeInt32BE(this._d,12),f.writeInt32BE(this._e,16),f.writeInt32BE(this._f,20),f.writeInt32BE(this._g,24),f.writeInt32BE(this._h,28),f},rs=i,rs}var ns,uc;function G0(){if(uc)return ns;uc=1;var e=tt(),t=$h(),n=fr(),r=ct().Buffer,h=new Array(64);function i(){this.init(),this._w=h,n.call(this,64,56)}return e(i,t),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var a=r.allocUnsafe(28);return a.writeInt32BE(this._a,0),a.writeInt32BE(this._b,4),a.writeInt32BE(this._c,8),a.writeInt32BE(this._d,12),a.writeInt32BE(this._e,16),a.writeInt32BE(this._f,20),a.writeInt32BE(this._g,24),a},ns=i,ns}var is,cc;function Vh(){if(cc)return is;cc=1;var e=tt(),t=fr(),n=ct().Buffer,r=[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],h=new Array(160);function i(){this.init(),this._w=h,t.call(this,128,112)}e(i,t),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function a(_,y,l){return l^_&(y^l)}function o(_,y,l){return _&y|l&(_|y)}function d(_,y){return(_>>>28|y<<4)^(y>>>2|_<<30)^(y>>>7|_<<25)}function c(_,y){return(_>>>14|y<<18)^(_>>>18|y<<14)^(y>>>9|_<<23)}function p(_,y){return(_>>>1|y<<31)^(_>>>8|y<<24)^_>>>7}function s(_,y){return(_>>>1|y<<31)^(_>>>8|y<<24)^(_>>>7|y<<25)}function f(_,y){return(_>>>19|y<<13)^(y>>>29|_<<3)^_>>>6}function u(_,y){return(_>>>19|y<<13)^(y>>>29|_<<3)^(_>>>6|y<<26)}function m(_,y){return _>>>0<y>>>0?1:0}return i.prototype._update=function(_){for(var y=this._w,l=this._ah|0,b=this._bh|0,E=this._ch|0,I=this._dh|0,x=this._eh|0,D=this._fh|0,F=this._gh|0,W=this._hh|0,J=this._al|0,ee=this._bl|0,Q=this._cl|0,re=this._dl|0,q=this._el|0,g=this._fl|0,R=this._gl|0,C=this._hl|0,M=0;M<32;M+=2)y[M]=_.readInt32BE(M*4),y[M+1]=_.readInt32BE(M*4+4);for(;M<160;M+=2){var A=y[M-30],L=y[M-30+1],j=p(A,L),T=s(L,A);A=y[M-4],L=y[M-4+1];var w=f(A,L),N=u(L,A),te=y[M-14],Y=y[M-14+1],U=y[M-32],$=y[M-32+1],G=T+Y|0,X=j+te+m(G,T)|0;G=G+N|0,X=X+w+m(G,N)|0,G=G+$|0,X=X+U+m(G,$)|0,y[M]=X,y[M+1]=G}for(var ne=0;ne<160;ne+=2){X=y[ne],G=y[ne+1];var B=o(l,b,E),P=o(J,ee,Q),Z=d(l,J),K=d(J,l),oe=c(x,q),ie=c(q,x),se=r[ne],de=r[ne+1],He=a(x,D,F),ge=a(q,g,R),ue=C+ie|0,ye=W+oe+m(ue,C)|0;ue=ue+ge|0,ye=ye+He+m(ue,ge)|0,ue=ue+de|0,ye=ye+se+m(ue,de)|0,ue=ue+G|0,ye=ye+X+m(ue,G)|0;var pe=K+P|0,me=Z+B+m(pe,K)|0;W=F,C=R,F=D,R=g,D=x,g=q,q=re+ue|0,x=I+ye+m(q,re)|0,I=E,re=Q,E=b,Q=ee,b=l,ee=J,J=ue+pe|0,l=ye+me+m(J,ue)|0}this._al=this._al+J|0,this._bl=this._bl+ee|0,this._cl=this._cl+Q|0,this._dl=this._dl+re|0,this._el=this._el+q|0,this._fl=this._fl+g|0,this._gl=this._gl+R|0,this._hl=this._hl+C|0,this._ah=this._ah+l+m(this._al,J)|0,this._bh=this._bh+b+m(this._bl,ee)|0,this._ch=this._ch+E+m(this._cl,Q)|0,this._dh=this._dh+I+m(this._dl,re)|0,this._eh=this._eh+x+m(this._el,q)|0,this._fh=this._fh+D+m(this._fl,g)|0,this._gh=this._gh+F+m(this._gl,R)|0,this._hh=this._hh+W+m(this._hl,C)|0},i.prototype._hash=function(){var _=n.allocUnsafe(64);function y(l,b,E){_.writeInt32BE(l,E),_.writeInt32BE(b,E+4)}return y(this._ah,this._al,0),y(this._bh,this._bl,8),y(this._ch,this._cl,16),y(this._dh,this._dl,24),y(this._eh,this._el,32),y(this._fh,this._fl,40),y(this._gh,this._gl,48),y(this._hh,this._hl,56),_},is=i,is}var ss,lc;function J0(){if(lc)return ss;lc=1;var e=tt(),t=Vh(),n=fr(),r=ct().Buffer,h=new Array(160);function i(){this.init(),this._w=h,n.call(this,128,112)}return e(i,t),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){var a=r.allocUnsafe(48);function o(d,c,p){a.writeInt32BE(d,p),a.writeInt32BE(c,p+4)}return o(this._ah,this._al,0),o(this._bh,this._bl,8),o(this._ch,this._cl,16),o(this._dh,this._dl,24),o(this._eh,this._el,32),o(this._fh,this._fl,40),a},ss=i,ss}var fc;function Z0(){return fc||(fc=1,(function(e){e.exports=function(n){var r=n.toLowerCase(),h=e.exports[r];if(!h)throw new Error(r+" is not supported (we accept pull requests)");return new h},e.exports.sha=V0(),e.exports.sha1=z0(),e.exports.sha224=G0(),e.exports.sha256=$h(),e.exports.sha384=J0(),e.exports.sha512=Vh()})(ti)),ti.exports}var hc;function ya(){if(hc)return Mr;hc=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.Session=void 0;const e=Z0(),t=ut(),n="session:id",r="session:secret",h="session:linked";let i=class zh{constructor(o,d,c,p){this._storage=o,this._id=d||(0,t.randomBytesHex)(16),this._secret=c||(0,t.randomBytesHex)(32),this._key=new e.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!p}static load(o){const d=o.getItem(n),c=o.getItem(h),p=o.getItem(r);return d&&p?new zh(o,d,p,c==="1"):null}static hash(o){return new e.sha256().update(o).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(o){this._linked=o,this.persistLinked()}save(){return this._storage.setItem(n,this._id),this._storage.setItem(r,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(h,this._linked?"1":"0")}};return Mr.Session=i,Mr}var Ir={},Ar={},dc;function K0(){if(dc)return Ar;dc=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.Cipher=void 0;const e=ut();let t=class{constructor(r){this.secret=r}async encrypt(r){const h=this.secret;if(h.length!==64)throw Error("secret must be 256 bits");const i=crypto.getRandomValues(new Uint8Array(12)),a=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(h),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,d=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},a,o.encode(r)),c=16,p=d.slice(d.byteLength-c),s=d.slice(0,d.byteLength-c),f=new Uint8Array(p),u=new Uint8Array(s),m=new Uint8Array([...i,...f,...u]);return(0,e.uint8ArrayToHex)(m)}async decrypt(r){const h=this.secret;if(h.length!==64)throw Error("secret must be 256 bits");return new Promise((i,a)=>{(async function(){const o=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(h),{name:"aes-gcm"},!1,["encrypt","decrypt"]),d=(0,e.hexStringToUint8Array)(r),c=d.slice(0,12),p=d.slice(12,28),s=d.slice(28),f=new Uint8Array([...s,...p]),u={name:"AES-GCM",iv:new Uint8Array(c)};try{const m=await window.crypto.subtle.decrypt(u,o,f),_=new TextDecoder;i(_.decode(m))}catch(m){a(m)}})()})}};return Ar.Cipher=t,Ar}var xr={},pc;function Q0(){if(pc)return xr;pc=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.WalletLinkHTTP=void 0;let e=class{constructor(n,r,h){this.linkAPIUrl=n,this.sessionId=r;const i=`${r}:${h}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(n){return Promise.all(n.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var n;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:h,error:i}=await r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const a=(n=h?.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&n!==void 0?n:[];return this.markUnseenEventsAsSeen(a),a}throw new Error(`Check unseen events failed: ${r.status}`)}};return xr.WalletLinkHTTP=e,xr}var xt={},gc;function Y0(){if(gc)return xt;gc=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.WalletLinkWebSocket=xt.ConnectionState=void 0;var e;(function(n){n[n.DISCONNECTED=0]="DISCONNECTED",n[n.CONNECTING=1]="CONNECTING",n[n.CONNECTED=2]="CONNECTED"})(e||(xt.ConnectionState=e={}));let t=class{setConnectionStateListener(r){this.connectionStateListener=r}setIncomingDataListener(r){this.incomingDataListener=r}constructor(r,h=WebSocket){this.WebSocketClass=h,this.webSocket=null,this.pendingData=[],this.url=r.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((r,h)=>{var i;let a;try{this.webSocket=a=new this.WebSocketClass(this.url)}catch(o){h(o);return}(i=this.connectionStateListener)===null||i===void 0||i.call(this,e.CONNECTING),a.onclose=o=>{var d;this.clearWebSocket(),h(new Error(`websocket error ${o.code}: ${o.reason}`)),(d=this.connectionStateListener)===null||d===void 0||d.call(this,e.DISCONNECTED)},a.onopen=o=>{var d;r(),(d=this.connectionStateListener)===null||d===void 0||d.call(this,e.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(p=>this.sendData(p)),this.pendingData=[])},a.onmessage=o=>{var d,c;if(o.data==="h")(d=this.incomingDataListener)===null||d===void 0||d.call(this,{type:"Heartbeat"});else try{const p=JSON.parse(o.data);(c=this.incomingDataListener)===null||c===void 0||c.call(this,p)}catch{}}})}disconnect(){var r;const{webSocket:h}=this;if(h){this.clearWebSocket(),(r=this.connectionStateListener)===null||r===void 0||r.call(this,e.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{h.close()}catch{}}}sendData(r){const{webSocket:h}=this;if(!h){this.pendingData.push(r),this.connect();return}h.send(r)}clearWebSocket(){const{webSocket:r}=this;r&&(this.webSocket=null,r.onclose=null,r.onerror=null,r.onmessage=null,r.onopen=null)}};return xt.WalletLinkWebSocket=t,xt}var mc;function X0(){if(mc)return Ir;mc=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.WalletLinkConnection=void 0;const e=qn(),t=K0(),n=ha(),r=da(),h=ya(),i=Q0(),a=Y0(),o=1e4,d=6e4;let c=class{constructor({session:s,linkAPIUrl:f,listener:u,diagnostic:m,WebSocketClass:_=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,e.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=l=>{if(!l)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",E=>l.JsonRpcUrl&&this.handleChainUpdated(E,l.JsonRpcUrl)]]).forEach((E,I)=>{const x=l[I];x!==void 0&&E(x)})},this.handleDestroyed=l=>{var b,E;l==="1"&&((b=this.listener)===null||b===void 0||b.resetAndReload(),(E=this.diagnostic)===null||E===void 0||E.log(n.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:h.Session.hash(this.session.id)}))},this.handleAccountUpdated=async l=>{var b,E;try{const I=await this.cipher.decrypt(l);(b=this.listener)===null||b===void 0||b.accountUpdated(I)}catch{(E=this.diagnostic)===null||E===void 0||E.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(l,b)=>{var E,I;try{const x=await this.cipher.decrypt(b);(E=this.listener)===null||E===void 0||E.metadataUpdated(l,x)}catch{(I=this.diagnostic)===null||I===void 0||I.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:l})}},this.handleWalletUsernameUpdated=async l=>{this.handleMetadataUpdated(r.WALLET_USER_NAME_KEY,l)},this.handleAppVersionUpdated=async l=>{this.handleMetadataUpdated(r.APP_VERSION_KEY,l)},this.handleChainUpdated=async(l,b)=>{var E,I;try{const x=await this.cipher.decrypt(l),D=await this.cipher.decrypt(b);(E=this.listener)===null||E===void 0||E.chainUpdated(x,D)}catch{(I=this.diagnostic)===null||I===void 0||I.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=s,this.cipher=new t.Cipher(s.secret),this.diagnostic=m,this.listener=u;const y=new a.WalletLinkWebSocket(`${f}/rpc`,_);y.setConnectionStateListener(async l=>{var b;(b=this.diagnostic)===null||b===void 0||b.log(n.EVENTS.CONNECTED_STATE_CHANGE,{state:l,sessionIdHash:h.Session.hash(s.id)});let E=!1;switch(l){case a.ConnectionState.DISCONNECTED:if(!this.destroyed){const I=async()=>{await new Promise(x=>setTimeout(x,5e3)),this.destroyed||y.connect().catch(()=>{I()})};I()}break;case a.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),E=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},o),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case a.ConnectionState.CONNECTING:break}this.connected!==E&&(this.connected=E)}),y.setIncomingDataListener(l=>{var b,E,I;switch(l.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const x=l.type==="IsLinkedOK"?l.linked:void 0;(b=this.diagnostic)===null||b===void 0||b.log(n.EVENTS.LINKED,{sessionIdHash:h.Session.hash(s.id),linked:x,type:l.type,onlineGuests:l.onlineGuests}),this.linked=x||l.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(E=this.diagnostic)===null||E===void 0||E.log(n.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:h.Session.hash(s.id),metadata_keys:l&&l.metadata?Object.keys(l.metadata):void 0}),this.handleSessionMetadataUpdated(l.metadata);break}case"Event":{this.handleIncomingEvent(l);break}}l.id!==void 0&&((I=this.requestResolutions.get(l.id))===null||I===void 0||I(l))}),this.ws=y,this.http=new i.WalletLinkHTTP(f,s.id,s.key)}connect(){var s;if(this.destroyed)throw new Error("instance is destroyed");(s=this.diagnostic)===null||s===void 0||s.log(n.EVENTS.STARTED_CONNECTING,{sessionIdHash:h.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var s;this.destroyed=!0,this.ws.disconnect(),(s=this.diagnostic)===null||s===void 0||s.log(n.EVENTS.DISCONNECTED,{sessionIdHash:h.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(s){var f,u;this._connected=s,s&&((f=this.onceConnected)===null||f===void 0||f.call(this)),(u=this.listener)===null||u===void 0||u.connectedUpdated(s)}setOnceConnected(s){return new Promise(f=>{this.connected?s().then(f):this.onceConnected=()=>{s().then(f),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(s){var f,u;this._linked=s,s&&((f=this.onceLinked)===null||f===void 0||f.call(this)),(u=this.listener)===null||u===void 0||u.linkedUpdated(s)}setOnceLinked(s){return new Promise(f=>{this.linked?s().then(f):this.onceLinked=()=>{s().then(f),this.onceLinked=void 0}})}async handleIncomingEvent(s){var f,u;if(!(s.type!=="Event"||s.event!=="Web3Response"))try{const m=await this.cipher.decrypt(s.data),_=JSON.parse(m);if(_.type!=="WEB3_RESPONSE")return;(f=this.listener)===null||f===void 0||f.handleWeb3ResponseMessage(_)}catch{(u=this.diagnostic)===null||u===void 0||u.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(s=>setTimeout(s,250));try{await this.fetchUnseenEventsAPI()}catch(s){console.error("Unable to check for unseen events",s)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(f=>this.handleIncomingEvent(f))}async setSessionMetadata(s,f){const u={type:"SetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[s]:f}};return this.setOnceConnected(async()=>{const m=await this.makeRequest(u);if(m.type==="Fail")throw new Error(m.error||"failed to set session metadata")})}async publishEvent(s,f,u=!1){const m=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},f),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),_={type:"PublishEvent",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:s,data:m,callWebhook:u};return this.setOnceLinked(async()=>{const y=await this.makeRequest(_);if(y.type==="Fail")throw new Error(y.error||"failed to publish event");return y.eventId})}sendData(s){this.ws.sendData(JSON.stringify(s))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>o*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(s,f=d){const u=s.id;this.sendData(s);let m;return Promise.race([new Promise((_,y)=>{m=window.setTimeout(()=>{y(new Error(`request ${u} timed out`))},f)}),new Promise(_=>{this.requestResolutions.set(u,y=>{clearTimeout(m),_(y),this.requestResolutions.delete(u)})})])}async authenticate(){const s={type:"HostSession",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},f=await this.makeRequest(s);if(f.type==="Fail")throw new Error(f.error||"failed to authentcate")}sendIsLinked(){const s={type:"IsLinked",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(s)}sendGetSessionConfig(){const s={type:"GetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(s)}};return Ir.WalletLinkConnection=c,Ir}var Tr={},Tt={},mn={},yc;function ep(){return yc||(yc=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'),mn}var _c;function Gh(){if(_c)return Tt;_c=1;var e=Tt&&Tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.injectCssReset=void 0;const t=e(ep());function n(){const r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode(t.default)),document.documentElement.appendChild(r)}return Tt.injectCssReset=n,Tt}var Br={},sn,Ee,Jh,Zh,Zt,vc,Kh,Qh,Yh,_a,ea,ta,Xh,en={},ed=[],tp=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,on=Array.isArray;function it(e,t){for(var n in t)e[n]=t[n];return e}function va(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ra(e,t,n){var r,h,i,a={};for(i in t)i=="key"?r=t[i]:i=="ref"?h=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?sn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Yr(e,a,r,h,null)}function Yr(e,t,n,r,h){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:h??++Jh,__i:-1,__u:0};return h==null&&Ee.vnode!=null&&Ee.vnode(i),i}function rp(){return{current:null}}function an(e){return e.children}function Xr(e,t){this.props=e,this.context=t}function ar(e,t){if(t==null)return e.__?ar(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ar(e):null}function td(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return td(e)}}function na(e){(!e.__d&&(e.__d=!0)&&Zt.push(e)&&!Pn.__r++||vc!=Ee.debounceRendering)&&((vc=Ee.debounceRendering)||Kh)(Pn)}function Pn(){for(var e,t,n,r,h,i,a,o=1;Zt.length;)Zt.length>o&&Zt.sort(Qh),e=Zt.shift(),o=Zt.length,e.__d&&(n=void 0,r=void 0,h=(r=(t=e).__v).__e,i=[],a=[],t.__P&&((n=it({},r)).__v=r.__v+1,Ee.vnode&&Ee.vnode(n),ba(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[h]:null,i,h??ar(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,sd(i,n,a),r.__e=r.__=null,n.__e!=h&&td(n)));Pn.__r=0}function rd(e,t,n,r,h,i,a,o,d,c,p){var s,f,u,m,_,y,l,b=r&&r.__k||ed,E=t.length;for(d=np(n,t,b,d,E),s=0;s<E;s++)(u=n.__k[s])!=null&&(f=u.__i==-1?en:b[u.__i]||en,u.__i=s,y=ba(e,u,f,h,i,a,o,d,c,p),m=u.__e,u.ref&&f.ref!=u.ref&&(f.ref&&wa(f.ref,null,u),p.push(u.ref,u.__c||m,u)),_==null&&m!=null&&(_=m),(l=!!(4&u.__u))||f.__k===u.__k?d=nd(u,d,e,l):typeof u.type=="function"&&y!==void 0?d=y:m&&(d=m.nextSibling),u.__u&=-7);return n.__e=_,d}function np(e,t,n,r,h){var i,a,o,d,c,p=n.length,s=p,f=0;for(e.__k=new Array(h),i=0;i<h;i++)(a=t[i])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[i]=Yr(null,a,null,null,null):on(a)?a=e.__k[i]=Yr(an,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[i]=Yr(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,d=i+f,a.__=e,a.__b=e.__b+1,o=null,(c=a.__i=ip(a,n,d,s))!=-1&&(s--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(h>p?f--:h<p&&f++),typeof a.type!="function"&&(a.__u|=4)):c!=d&&(c==d-1?f--:c==d+1?f++:(c>d?f--:f++,a.__u|=4))):e.__k[i]=null;if(s)for(i=0;i<p;i++)(o=n[i])!=null&&(2&o.__u)==0&&(o.__e==r&&(r=ar(o)),ad(o,o));return r}function nd(e,t,n,r){var h,i;if(typeof e.type=="function"){for(h=e.__k,i=0;h&&i<h.length;i++)h[i]&&(h[i].__=e,t=nd(h[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=ar(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function id(e,t){return t=t||[],e==null||typeof e=="boolean"||(on(e)?e.some(function(n){id(n,t)}):t.push(e)),t}function ip(e,t,n,r){var h,i,a,o=e.key,d=e.type,c=t[n],p=c!=null&&(2&c.__u)==0;if(c===null&&o==null||p&&o==c.key&&d==c.type)return n;if(r>(p?1:0)){for(h=n-1,i=n+1;h>=0||i<t.length;)if((c=t[a=h>=0?h--:i++])!=null&&(2&c.__u)==0&&o==c.key&&d==c.type)return a}return-1}function bc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||tp.test(t)?n:n+"px"}function yn(e,t,n,r,h){var i,a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||bc(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||bc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Yh,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=_a,e.addEventListener(t,i?ta:ea,i)):e.removeEventListener(t,i?ta:ea,i);else{if(h=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function wc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=_a++;else if(t.t<n.u)return;return n(Ee.event?Ee.event(t):t)}}}function ba(e,t,n,r,h,i,a,o,d,c){var p,s,f,u,m,_,y,l,b,E,I,x,D,F,W,J,ee,Q=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),i=[o=t.__e=n.__e]),(p=Ee.__b)&&p(t);e:if(typeof Q=="function")try{if(l=t.props,b="prototype"in Q&&Q.prototype.render,E=(p=Q.contextType)&&r[p.__c],I=p?E?E.props.value:p.__:r,n.__c?y=(s=t.__c=n.__c).__=s.__E:(b?t.__c=s=new Q(l,I):(t.__c=s=new Xr(l,I),s.constructor=Q,s.render=op),E&&E.sub(s),s.state||(s.state={}),s.__n=r,f=s.__d=!0,s.__h=[],s._sb=[]),b&&s.__s==null&&(s.__s=s.state),b&&Q.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=it({},s.__s)),it(s.__s,Q.getDerivedStateFromProps(l,s.__s))),u=s.props,m=s.state,s.__v=t,f)b&&Q.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),b&&s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(b&&Q.getDerivedStateFromProps==null&&l!==u&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(l,I),t.__v==n.__v||!s.__e&&s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(l,s.__s,I)===!1){for(t.__v!=n.__v&&(s.props=l,s.state=s.__s,s.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(re){re&&(re.__=t)}),x=0;x<s._sb.length;x++)s.__h.push(s._sb[x]);s._sb=[],s.__h.length&&a.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(l,s.__s,I),b&&s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(u,m,_)})}if(s.context=I,s.props=l,s.__P=e,s.__e=!1,D=Ee.__r,F=0,b){for(s.state=s.__s,s.__d=!1,D&&D(t),p=s.render(s.props,s.state,s.context),W=0;W<s._sb.length;W++)s.__h.push(s._sb[W]);s._sb=[]}else do s.__d=!1,D&&D(t),p=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++F<25);s.state=s.__s,s.getChildContext!=null&&(r=it(it({},r),s.getChildContext())),b&&!f&&s.getSnapshotBeforeUpdate!=null&&(_=s.getSnapshotBeforeUpdate(u,m)),J=p,p!=null&&p.type===an&&p.key==null&&(J=od(p.props.children)),o=rd(e,on(J)?J:[J],t,n,r,h,i,a,o,d,c),s.base=t.__e,t.__u&=-161,s.__h.length&&a.push(s),y&&(s.__E=s.__=null)}catch(re){if(t.__v=null,d||i!=null)if(re.then){for(t.__u|=d?160:128;o&&o.nodeType==8&&o.nextSibling;)o=o.nextSibling;i[i.indexOf(o)]=null,t.__e=o}else{for(ee=i.length;ee--;)va(i[ee]);ia(t)}else t.__e=n.__e,t.__k=n.__k,re.then||ia(t);Ee.__e(re,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):o=t.__e=sp(n.__e,t,n,r,h,i,a,d,c);return(p=Ee.diffed)&&p(t),128&t.__u?void 0:o}function ia(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(ia)}function sd(e,t,n){for(var r=0;r<n.length;r++)wa(n[r],n[++r],n[++r]);Ee.__c&&Ee.__c(t,e),e.some(function(h){try{e=h.__h,h.__h=[],e.some(function(i){i.call(h)})}catch(i){Ee.__e(i,h.__v)}})}function od(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:on(e)?e.map(od):it({},e)}function sp(e,t,n,r,h,i,a,o,d){var c,p,s,f,u,m,_,y=n.props||en,l=t.props,b=t.type;if(b=="svg"?h="http://www.w3.org/2000/svg":b=="math"?h="http://www.w3.org/1998/Math/MathML":h||(h="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((u=i[c])&&"setAttribute"in u==!!b&&(b?u.localName==b:u.nodeType==3)){e=u,i[c]=null;break}}if(e==null){if(b==null)return document.createTextNode(l);e=document.createElementNS(h,b,l.is&&l),o&&(Ee.__m&&Ee.__m(t,i),o=!1),i=null}if(b==null)y===l||o&&e.data==l||(e.data=l);else{if(i=i&&sn.call(e.childNodes),!o&&i!=null)for(y={},c=0;c<e.attributes.length;c++)y[(u=e.attributes[c]).name]=u.value;for(c in y)if(u=y[c],c!="children"){if(c=="dangerouslySetInnerHTML")s=u;else if(!(c in l)){if(c=="value"&&"defaultValue"in l||c=="checked"&&"defaultChecked"in l)continue;yn(e,c,null,u,h)}}for(c in l)u=l[c],c=="children"?f=u:c=="dangerouslySetInnerHTML"?p=u:c=="value"?m=u:c=="checked"?_=u:o&&typeof u!="function"||y[c]===u||yn(e,c,u,y[c],h);if(p)o||s&&(p.__html==s.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(s&&(e.innerHTML=""),rd(t.type=="template"?e.content:e,on(f)?f:[f],t,n,r,b=="foreignObject"?"http://www.w3.org/1999/xhtml":h,i,a,i?i[0]:n.__k&&ar(n,0),o,d),i!=null)for(c=i.length;c--;)va(i[c]);o||(c="value",b=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[c]||b=="progress"&&!m||b=="option"&&m!=y[c])&&yn(e,c,m,y[c],h),c="checked",_!=null&&_!=e[c]&&yn(e,c,_,y[c],h))}return e}function wa(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(h){Ee.__e(h,n)}}function ad(e,t,n){var r,h;if(Ee.unmount&&Ee.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||wa(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){Ee.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(h=0;h<r.length;h++)r[h]&&ad(r[h],t,n||typeof e.type!="function");n||va(e.__e),e.__c=e.__=e.__e=void 0}function op(e,t,n){return this.constructor(e,n)}function ud(e,t,n){var r,h,i,a;t==document&&(t=document.documentElement),Ee.__&&Ee.__(e,t),h=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],a=[],ba(t,e=(!r&&n||t).__k=ra(an,null,[e]),h||en,en,t.namespaceURI,!r&&n?[n]:h?null:t.firstChild?sn.call(t.childNodes):null,i,!r&&n?n:h?h.__e:t.firstChild,r,a),sd(i,e,a)}function cd(e,t){ud(e,t,cd)}function ap(e,t,n){var r,h,i,a,o=it({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?h=t[i]:o[i]=t[i]===void 0&&a!=null?a[i]:t[i];return arguments.length>2&&(o.children=arguments.length>3?sn.call(arguments,2):n),Yr(e.type,o,r||e.key,h||e.ref,null)}function up(e){function t(n){var r,h;return this.getChildContext||(r=new Set,(h={})[t.__c]=this,this.getChildContext=function(){return h},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(a){a.__e=!0,na(a)})},this.sub=function(i){r.add(i);var a=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),a&&a.call(i)}}),n.children}return t.__c="__cC"+Xh++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}sn=ed.slice,Ee={__e:function(e,t,n,r){for(var h,i,a;t=t.__;)if((h=t.__c)&&!h.__)try{if((i=h.constructor)&&i.getDerivedStateFromError!=null&&(h.setState(i.getDerivedStateFromError(e)),a=h.__d),h.componentDidCatch!=null&&(h.componentDidCatch(e,r||{}),a=h.__d),a)return h.__E=h}catch(o){e=o}throw e}},Jh=0,Zh=function(e){return e!=null&&e.constructor===void 0},Xr.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=it({},this.state),typeof e=="function"&&(e=e(it({},n),this.props)),e&&it(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),na(this))},Xr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),na(this))},Xr.prototype.render=an,Zt=[],Kh=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Qh=function(e,t){return e.__v.__b-t.__v.__b},Pn.__r=0,Yh=/(PointerCapture)$|Capture$/i,_a=0,ea=wc(!1),ta=wc(!0),Xh=0;const cp=Object.freeze(Object.defineProperty({__proto__:null,Component:Xr,Fragment:an,cloneElement:ap,createContext:up,createElement:ra,createRef:rp,h:ra,hydrate:cd,get isValidElement(){return Zh},get options(){return Ee},render:ud,toChildArray:id},Symbol.toStringTag,{value:"Module"})),Ge=lr(cp);var Bt={};function ld(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ld(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ec(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ld(e))&&(r&&(r+=" "),r+=t);return r}const lp=Object.freeze(Object.defineProperty({__proto__:null,clsx:Ec,default:Ec},Symbol.toStringTag,{value:"Module"})),un=lr(lp);var at,we,os,Rc,ur=0,fd=[],je=Ee,Sc=je.__b,Cc=je.__r,Mc=je.diffed,kc=je.__c,Ic=je.unmount,Ac=je.__;function Kt(e,t){je.__h&&je.__h(we,e,ur||t),ur=0;var n=we.__H||(we.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function hd(e){return ur=1,dd(gd,e)}function dd(e,t,n){var r=Kt(at++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):gd(void 0,t),function(o){var d=r.__N?r.__N[0]:r.__[0],c=r.t(d,o);d!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=we,!we.__f)){var h=function(o,d,c){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(f){return!!f.__c});if(p.every(function(f){return!f.__N}))return!i||i.call(this,o,d,c);var s=r.__c.props!==o;return p.forEach(function(f){if(f.__N){var u=f.__[0];f.__=f.__N,f.__N=void 0,u!==f.__[0]&&(s=!0)}}),i&&i.call(this,o,d,c)||s};we.__f=!0;var i=we.shouldComponentUpdate,a=we.componentWillUpdate;we.componentWillUpdate=function(o,d,c){if(this.__e){var p=i;i=void 0,h(o,d,c),i=p}a&&a.call(this,o,d,c)},we.shouldComponentUpdate=h}return r.__N||r.__}function fp(e,t){var n=Kt(at++,3);!je.__s&&Ra(n.__H,t)&&(n.__=e,n.u=t,we.__H.__h.push(n))}function pd(e,t){var n=Kt(at++,4);!je.__s&&Ra(n.__H,t)&&(n.__=e,n.u=t,we.__h.push(n))}function hp(e){return ur=5,Ea(function(){return{current:e}},[])}function dp(e,t,n){ur=6,pd(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Ea(e,t){var n=Kt(at++,7);return Ra(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function pp(e,t){return ur=8,Ea(function(){return e},t)}function gp(e){var t=we.context[e.__c],n=Kt(at++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(we)),t.props.value):e.__}function mp(e,t){je.useDebugValue&&je.useDebugValue(t?t(e):e)}function yp(e){var t=Kt(at++,10),n=hd();return t.__=e,we.componentDidCatch||(we.componentDidCatch=function(r,h){t.__&&t.__(r,h),n[1](r)}),[n[0],function(){n[1](void 0)}]}function _p(){var e=Kt(at++,11);if(!e.__){for(var t=we.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function vp(){for(var e;e=fd.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Bn),e.__H.__h.forEach(sa),e.__H.__h=[]}catch(t){e.__H.__h=[],je.__e(t,e.__v)}}je.__b=function(e){we=null,Sc&&Sc(e)},je.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ac&&Ac(e,t)},je.__r=function(e){Cc&&Cc(e),at=0;var t=(we=e.__c).__H;t&&(os===we?(t.__h=[],we.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Bn),t.__h.forEach(sa),t.__h=[],at=0)),os=we},je.diffed=function(e){Mc&&Mc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fd.push(t)!==1&&Rc===je.requestAnimationFrame||((Rc=je.requestAnimationFrame)||bp)(vp)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),os=we=null},je.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Bn),n.__h=n.__h.filter(function(r){return!r.__||sa(r)})}catch(r){t.some(function(h){h.__h&&(h.__h=[])}),t=[],je.__e(r,n.__v)}}),kc&&kc(e,t)},je.unmount=function(e){Ic&&Ic(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Bn(r)}catch(h){t=h}}),n.__H=void 0,t&&je.__e(t,n.__v))};var xc=typeof requestAnimationFrame=="function";function bp(e){var t,n=function(){clearTimeout(r),xc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);xc&&(t=requestAnimationFrame(n))}function Bn(e){var t=we,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),we=t}function sa(e){var t=we;e.__c=e.__(),we=t}function Ra(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function gd(e,t){return typeof t=="function"?t(e):t}const wp=Object.freeze(Object.defineProperty({__proto__:null,useCallback:pp,useContext:gp,useDebugValue:mp,useEffect:fp,useErrorBoundary:yp,useId:_p,useImperativeHandle:dp,useLayoutEffect:pd,useMemo:Ea,useReducer:dd,useRef:hp,useState:hd},Symbol.toStringTag,{value:"Module"})),Un=lr(wp);var st={},Pr={},Tc;function Ep(){if(Tc)return Pr;Tc=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.CloseIcon=void 0;const e=Ge;function t(n){return(0,e.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}return Pr.CloseIcon=t,Pr}var Lr={},Bc;function Rp(){if(Bc)return Lr;Bc=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.CoinbaseWalletRound=void 0;const e=Ge;function t(n){return(0,e.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,e.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,e.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}return Lr.CoinbaseWalletRound=t,Lr}var Nr={},Pc;function Sp(){if(Pc)return Nr;Pc=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.QRCodeIcon=void 0;const e=Ge;function t(n){return(0,e.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,e.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,e.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,e.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}return Nr.QRCodeIcon=t,Nr}var Pt={},as,Lc;function Cp(){if(Lc)return as;Lc=1;function e(u){this.mode=n.MODE_8BIT_BYTE,this.data=u,this.parsedData=[];for(var m=0,_=this.data.length;m<_;m++){var y=[],l=this.data.charCodeAt(m);l>65536?(y[0]=240|(l&1835008)>>>18,y[1]=128|(l&258048)>>>12,y[2]=128|(l&4032)>>>6,y[3]=128|l&63):l>2048?(y[0]=224|(l&61440)>>>12,y[1]=128|(l&4032)>>>6,y[2]=128|l&63):l>128?(y[0]=192|(l&1984)>>>6,y[1]=128|l&63):y[0]=l,this.parsedData.push(y)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}e.prototype={getLength:function(u){return this.parsedData.length},write:function(u){for(var m=0,_=this.parsedData.length;m<_;m++)u.put(this.parsedData[m],8)}};function t(u,m){this.typeNumber=u,this.errorCorrectLevel=m,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={addData:function(u){var m=new e(u);this.dataList.push(m),this.dataCache=null},isDark:function(u,m){if(u<0||this.moduleCount<=u||m<0||this.moduleCount<=m)throw new Error(u+","+m);return this.modules[u][m]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(u,m){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var _=0;_<this.moduleCount;_++){this.modules[_]=new Array(this.moduleCount);for(var y=0;y<this.moduleCount;y++)this.modules[_][y]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(u,m),this.typeNumber>=7&&this.setupTypeNumber(u),this.dataCache==null&&(this.dataCache=t.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,m)},setupPositionProbePattern:function(u,m){for(var _=-1;_<=7;_++)if(!(u+_<=-1||this.moduleCount<=u+_))for(var y=-1;y<=7;y++)m+y<=-1||this.moduleCount<=m+y||(0<=_&&_<=6&&(y==0||y==6)||0<=y&&y<=6&&(_==0||_==6)||2<=_&&_<=4&&2<=y&&y<=4?this.modules[u+_][m+y]=!0:this.modules[u+_][m+y]=!1)},getBestMaskPattern:function(){for(var u=0,m=0,_=0;_<8;_++){this.makeImpl(!0,_);var y=i.getLostPoint(this);(_==0||u>y)&&(u=y,m=_)}return m},createMovieClip:function(u,m,_){var y=u.createEmptyMovieClip(m,_),l=1;this.make();for(var b=0;b<this.modules.length;b++)for(var E=b*l,I=0;I<this.modules[b].length;I++){var x=I*l,D=this.modules[b][I];D&&(y.beginFill(0,100),y.moveTo(x,E),y.lineTo(x+l,E),y.lineTo(x+l,E+l),y.lineTo(x,E+l),y.endFill())}return y},setupTimingPattern:function(){for(var u=8;u<this.moduleCount-8;u++)this.modules[u][6]==null&&(this.modules[u][6]=u%2==0);for(var m=8;m<this.moduleCount-8;m++)this.modules[6][m]==null&&(this.modules[6][m]=m%2==0)},setupPositionAdjustPattern:function(){for(var u=i.getPatternPosition(this.typeNumber),m=0;m<u.length;m++)for(var _=0;_<u.length;_++){var y=u[m],l=u[_];if(this.modules[y][l]==null)for(var b=-2;b<=2;b++)for(var E=-2;E<=2;E++)b==-2||b==2||E==-2||E==2||b==0&&E==0?this.modules[y+b][l+E]=!0:this.modules[y+b][l+E]=!1}},setupTypeNumber:function(u){for(var m=i.getBCHTypeNumber(this.typeNumber),_=0;_<18;_++){var y=!u&&(m>>_&1)==1;this.modules[Math.floor(_/3)][_%3+this.moduleCount-8-3]=y}for(var _=0;_<18;_++){var y=!u&&(m>>_&1)==1;this.modules[_%3+this.moduleCount-8-3][Math.floor(_/3)]=y}},setupTypeInfo:function(u,m){for(var _=this.errorCorrectLevel<<3|m,y=i.getBCHTypeInfo(_),l=0;l<15;l++){var b=!u&&(y>>l&1)==1;l<6?this.modules[l][8]=b:l<8?this.modules[l+1][8]=b:this.modules[this.moduleCount-15+l][8]=b}for(var l=0;l<15;l++){var b=!u&&(y>>l&1)==1;l<8?this.modules[8][this.moduleCount-l-1]=b:l<9?this.modules[8][15-l-1+1]=b:this.modules[8][15-l-1]=b}this.modules[this.moduleCount-8][8]=!u},mapData:function(u,m){for(var _=-1,y=this.moduleCount-1,l=7,b=0,E=this.moduleCount-1;E>0;E-=2)for(E==6&&E--;;){for(var I=0;I<2;I++)if(this.modules[y][E-I]==null){var x=!1;b<u.length&&(x=(u[b]>>>l&1)==1);var D=i.getMask(m,y,E-I);D&&(x=!x),this.modules[y][E-I]=x,l--,l==-1&&(b++,l=7)}if(y+=_,y<0||this.moduleCount<=y){y-=_,_=-_;break}}}},t.PAD0=236,t.PAD1=17,t.createData=function(u,m,_){for(var y=c.getRSBlocks(u,m),l=new p,b=0;b<_.length;b++){var E=_[b];l.put(E.mode,4),l.put(E.getLength(),i.getLengthInBits(E.mode,u)),E.write(l)}for(var I=0,b=0;b<y.length;b++)I+=y[b].dataCount;if(l.getLengthInBits()>I*8)throw new Error("code length overflow. ("+l.getLengthInBits()+">"+I*8+")");for(l.getLengthInBits()+4<=I*8&&l.put(0,4);l.getLengthInBits()%8!=0;)l.putBit(!1);for(;!(l.getLengthInBits()>=I*8||(l.put(t.PAD0,8),l.getLengthInBits()>=I*8));)l.put(t.PAD1,8);return t.createBytes(l,y)},t.createBytes=function(u,m){for(var _=0,y=0,l=0,b=new Array(m.length),E=new Array(m.length),I=0;I<m.length;I++){var x=m[I].dataCount,D=m[I].totalCount-x;y=Math.max(y,x),l=Math.max(l,D),b[I]=new Array(x);for(var F=0;F<b[I].length;F++)b[I][F]=255&u.buffer[F+_];_+=x;var W=i.getErrorCorrectPolynomial(D),J=new d(b[I],W.getLength()-1),ee=J.mod(W);E[I]=new Array(W.getLength()-1);for(var F=0;F<E[I].length;F++){var Q=F+ee.getLength()-E[I].length;E[I][F]=Q>=0?ee.get(Q):0}}for(var re=0,F=0;F<m.length;F++)re+=m[F].totalCount;for(var q=new Array(re),g=0,F=0;F<y;F++)for(var I=0;I<m.length;I++)F<b[I].length&&(q[g++]=b[I][F]);for(var F=0;F<l;F++)for(var I=0;I<m.length;I++)F<E[I].length&&(q[g++]=E[I][F]);return q};for(var n={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},r={L:1,M:0,Q:3,H:2},h={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(u){for(var m=u<<10;i.getBCHDigit(m)-i.getBCHDigit(i.G15)>=0;)m^=i.G15<<i.getBCHDigit(m)-i.getBCHDigit(i.G15);return(u<<10|m)^i.G15_MASK},getBCHTypeNumber:function(u){for(var m=u<<12;i.getBCHDigit(m)-i.getBCHDigit(i.G18)>=0;)m^=i.G18<<i.getBCHDigit(m)-i.getBCHDigit(i.G18);return u<<12|m},getBCHDigit:function(u){for(var m=0;u!=0;)m++,u>>>=1;return m},getPatternPosition:function(u){return i.PATTERN_POSITION_TABLE[u-1]},getMask:function(u,m,_){switch(u){case h.PATTERN000:return(m+_)%2==0;case h.PATTERN001:return m%2==0;case h.PATTERN010:return _%3==0;case h.PATTERN011:return(m+_)%3==0;case h.PATTERN100:return(Math.floor(m/2)+Math.floor(_/3))%2==0;case h.PATTERN101:return m*_%2+m*_%3==0;case h.PATTERN110:return(m*_%2+m*_%3)%2==0;case h.PATTERN111:return(m*_%3+(m+_)%2)%2==0;default:throw new Error("bad maskPattern:"+u)}},getErrorCorrectPolynomial:function(u){for(var m=new d([1],0),_=0;_<u;_++)m=m.multiply(new d([1,a.gexp(_)],0));return m},getLengthInBits:function(u,m){if(1<=m&&m<10)switch(u){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:return 8;case n.MODE_KANJI:return 8;default:throw new Error("mode:"+u)}else if(m<27)switch(u){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+u)}else if(m<41)switch(u){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+u)}else throw new Error("type:"+m)},getLostPoint:function(u){for(var m=u.getModuleCount(),_=0,y=0;y<m;y++)for(var l=0;l<m;l++){for(var b=0,E=u.isDark(y,l),I=-1;I<=1;I++)if(!(y+I<0||m<=y+I))for(var x=-1;x<=1;x++)l+x<0||m<=l+x||I==0&&x==0||E==u.isDark(y+I,l+x)&&b++;b>5&&(_+=3+b-5)}for(var y=0;y<m-1;y++)for(var l=0;l<m-1;l++){var D=0;u.isDark(y,l)&&D++,u.isDark(y+1,l)&&D++,u.isDark(y,l+1)&&D++,u.isDark(y+1,l+1)&&D++,(D==0||D==4)&&(_+=3)}for(var y=0;y<m;y++)for(var l=0;l<m-6;l++)u.isDark(y,l)&&!u.isDark(y,l+1)&&u.isDark(y,l+2)&&u.isDark(y,l+3)&&u.isDark(y,l+4)&&!u.isDark(y,l+5)&&u.isDark(y,l+6)&&(_+=40);for(var l=0;l<m;l++)for(var y=0;y<m-6;y++)u.isDark(y,l)&&!u.isDark(y+1,l)&&u.isDark(y+2,l)&&u.isDark(y+3,l)&&u.isDark(y+4,l)&&!u.isDark(y+5,l)&&u.isDark(y+6,l)&&(_+=40);for(var F=0,l=0;l<m;l++)for(var y=0;y<m;y++)u.isDark(y,l)&&F++;var W=Math.abs(100*F/m/m-50)/5;return _+=W*10,_}},a={glog:function(u){if(u<1)throw new Error("glog("+u+")");return a.LOG_TABLE[u]},gexp:function(u){for(;u<0;)u+=255;for(;u>=256;)u-=255;return a.EXP_TABLE[u]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;o<8;o++)a.EXP_TABLE[o]=1<<o;for(var o=8;o<256;o++)a.EXP_TABLE[o]=a.EXP_TABLE[o-4]^a.EXP_TABLE[o-5]^a.EXP_TABLE[o-6]^a.EXP_TABLE[o-8];for(var o=0;o<255;o++)a.LOG_TABLE[a.EXP_TABLE[o]]=o;function d(u,m){if(u.length==null)throw new Error(u.length+"/"+m);for(var _=0;_<u.length&&u[_]==0;)_++;this.num=new Array(u.length-_+m);for(var y=0;y<u.length-_;y++)this.num[y]=u[y+_]}d.prototype={get:function(u){return this.num[u]},getLength:function(){return this.num.length},multiply:function(u){for(var m=new Array(this.getLength()+u.getLength()-1),_=0;_<this.getLength();_++)for(var y=0;y<u.getLength();y++)m[_+y]^=a.gexp(a.glog(this.get(_))+a.glog(u.get(y)));return new d(m,0)},mod:function(u){if(this.getLength()-u.getLength()<0)return this;for(var m=a.glog(this.get(0))-a.glog(u.get(0)),_=new Array(this.getLength()),y=0;y<this.getLength();y++)_[y]=this.get(y);for(var y=0;y<u.getLength();y++)_[y]^=a.gexp(a.glog(u.get(y))+m);return new d(_,0).mod(u)}};function c(u,m){this.totalCount=u,this.dataCount=m}c.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],c.getRSBlocks=function(u,m){var _=c.getRsBlockTable(u,m);if(_==null)throw new Error("bad rs block @ typeNumber:"+u+"/errorCorrectLevel:"+m);for(var y=_.length/3,l=[],b=0;b<y;b++)for(var E=_[b*3+0],I=_[b*3+1],x=_[b*3+2],D=0;D<E;D++)l.push(new c(I,x));return l},c.getRsBlockTable=function(u,m){switch(m){case r.L:return c.RS_BLOCK_TABLE[(u-1)*4+0];case r.M:return c.RS_BLOCK_TABLE[(u-1)*4+1];case r.Q:return c.RS_BLOCK_TABLE[(u-1)*4+2];case r.H:return c.RS_BLOCK_TABLE[(u-1)*4+3];default:return}};function p(){this.buffer=[],this.length=0}p.prototype={get:function(u){var m=Math.floor(u/8);return(this.buffer[m]>>>7-u%8&1)==1},put:function(u,m){for(var _=0;_<m;_++)this.putBit((u>>>m-_-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(u){var m=Math.floor(this.length/8);this.buffer.length<=m&&this.buffer.push(0),u&&(this.buffer[m]|=128>>>this.length%8),this.length++}};var s=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function f(u){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof u=="string"&&(u={content:u}),u)for(var m in u)this.options[m]=u[m];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function _(x){switch(x){case"L":return r.L;case"M":return r.M;case"Q":return r.Q;case"H":return r.H;default:throw new Error("Unknwon error correction level: "+x)}}function y(x,D){for(var F=l(x),W=1,J=0,ee=0,Q=s.length;ee<=Q;ee++){var re=s[ee];if(!re)throw new Error("Content too long: expected "+J+" but got "+F);switch(D){case"L":J=re[0];break;case"M":J=re[1];break;case"Q":J=re[2];break;case"H":J=re[3];break;default:throw new Error("Unknwon error correction level: "+D)}if(F<=J)break;W++}if(W>s.length)throw new Error("Content too long");return W}function l(x){var D=encodeURI(x).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return D.length+(D.length!=x?3:0)}var b=this.options.content,E=y(b,this.options.ecl),I=_(this.options.ecl);this.qrcode=new t(E,I),this.qrcode.addData(b),this.qrcode.make()}return f.prototype.svg=function(u){var m=this.options||{},_=this.qrcode.modules;typeof u>"u"&&(u={container:m.container||"svg"});for(var y=typeof m.pretty<"u"?!!m.pretty:!0,l=y?" ":"",b=y?`\r
|
|
1
|
+
import{j as lr,m as ft,t as Yd,n as Xd,h as e0}from"./index--LSQjR_2.js";import{r as Ln}from"./events-DQ172AOg.js";var Yn={},gr={},mr={},Ha;function t0(){if(Ha)return mr;Ha=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.walletLogo=void 0;const e=(t,n)=>{let r;switch(t){case"standard":return r=n,`data:image/svg+xml,%3Csvg width='${n}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=n,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${n}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*n).toFixed(2),`data:image/svg+xml,%3Csvg width='${n}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=n,`data:image/svg+xml,%3Csvg width='${n}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};return mr.walletLogo=e,mr}var yr={},Wa;function r0(){return Wa||(Wa=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.LINK_API_URL=void 0,yr.LINK_API_URL="https://www.walletlink.org"),yr}var ae={},Tn={exports:{}};const n0={},i0=Object.freeze(Object.defineProperty({__proto__:null,default:n0},Symbol.toStringTag,{value:"Module"})),ua=lr(i0);var s0=Tn.exports,$a;function Nn(){return $a||($a=1,(function(e){(function(t,n){function r(q,g){if(!q)throw new Error(g||"Assertion failed")}function h(q,g){q.super_=g;var R=function(){};R.prototype=g.prototype,q.prototype=new R,q.prototype.constructor=q}function i(q,g,R){if(i.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((g==="le"||g==="be")&&(R=g,g=10),this._init(q||0,g||10,R||"be"))}typeof t=="object"?t.exports=i:n.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ua.Buffer}catch{}i.isBN=function(g){return g instanceof i?!0:g!==null&&typeof g=="object"&&g.constructor.wordSize===i.wordSize&&Array.isArray(g.words)},i.max=function(g,R){return g.cmp(R)>0?g:R},i.min=function(g,R){return g.cmp(R)<0?g:R},i.prototype._init=function(g,R,C){if(typeof g=="number")return this._initNumber(g,R,C);if(typeof g=="object")return this._initArray(g,R,C);R==="hex"&&(R=16),r(R===(R|0)&&R>=2&&R<=36),g=g.toString().replace(/\s+/g,"");var M=0;g[0]==="-"&&(M++,this.negative=1),M<g.length&&(R===16?this._parseHex(g,M,C):(this._parseBase(g,R,M),C==="le"&&this._initArray(this.toArray(),R,C)))},i.prototype._initNumber=function(g,R,C){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[g&67108863],this.length=1):g<4503599627370496?(this.words=[g&67108863,g/67108864&67108863],this.length=2):(r(g<9007199254740992),this.words=[g&67108863,g/67108864&67108863,1],this.length=3),C==="le"&&this._initArray(this.toArray(),R,C)},i.prototype._initArray=function(g,R,C){if(r(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var A,L,j=0;if(C==="be")for(M=g.length-1,A=0;M>=0;M-=3)L=g[M]|g[M-1]<<8|g[M-2]<<16,this.words[A]|=L<<j&67108863,this.words[A+1]=L>>>26-j&67108863,j+=24,j>=26&&(j-=26,A++);else if(C==="le")for(M=0,A=0;M<g.length;M+=3)L=g[M]|g[M+1]<<8|g[M+2]<<16,this.words[A]|=L<<j&67108863,this.words[A+1]=L>>>26-j&67108863,j+=24,j>=26&&(j-=26,A++);return this._strip()};function o(q,g){var R=q.charCodeAt(g);if(R>=48&&R<=57)return R-48;if(R>=65&&R<=70)return R-55;if(R>=97&&R<=102)return R-87;r(!1,"Invalid character in "+q)}function d(q,g,R){var C=o(q,R);return R-1>=g&&(C|=o(q,R-1)<<4),C}i.prototype._parseHex=function(g,R,C){this.length=Math.ceil((g.length-R)/6),this.words=new Array(this.length);for(var M=0;M<this.length;M++)this.words[M]=0;var A=0,L=0,j;if(C==="be")for(M=g.length-1;M>=R;M-=2)j=d(g,R,M)<<A,this.words[L]|=j&67108863,A>=18?(A-=18,L+=1,this.words[L]|=j>>>26):A+=8;else{var T=g.length-R;for(M=T%2===0?R+1:R;M<g.length;M+=2)j=d(g,R,M)<<A,this.words[L]|=j&67108863,A>=18?(A-=18,L+=1,this.words[L]|=j>>>26):A+=8}this._strip()};function c(q,g,R,C){for(var M=0,A=0,L=Math.min(q.length,R),j=g;j<L;j++){var T=q.charCodeAt(j)-48;M*=C,T>=49?A=T-49+10:T>=17?A=T-17+10:A=T,r(T>=0&&A<C,"Invalid character"),M+=A}return M}i.prototype._parseBase=function(g,R,C){this.words=[0],this.length=1;for(var M=0,A=1;A<=67108863;A*=R)M++;M--,A=A/R|0;for(var L=g.length-C,j=L%M,T=Math.min(L,L-j)+C,w=0,N=C;N<T;N+=M)w=c(g,N,N+M,R),this.imuln(A),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w);if(j!==0){var te=1;for(w=c(g,N,g.length,R),N=0;N<j;N++)te*=R;this.imuln(te),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w)}this._strip()},i.prototype.copy=function(g){g.words=new Array(this.length);for(var R=0;R<this.length;R++)g.words[R]=this.words[R];g.length=this.length,g.negative=this.negative,g.red=this.red};function p(q,g){q.words=g.words,q.length=g.length,q.negative=g.negative,q.red=g.red}if(i.prototype._move=function(g){p(g,this)},i.prototype.clone=function(){var g=new i(null);return this.copy(g),g},i.prototype._expand=function(g){for(;this.length<g;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch{i.prototype.inspect=s}else i.prototype.inspect=s;function s(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(g,R){g=g||10,R=R|0||1;var C;if(g===16||g==="hex"){C="";for(var M=0,A=0,L=0;L<this.length;L++){var j=this.words[L],T=((j<<M|A)&16777215).toString(16);A=j>>>24-M&16777215,M+=2,M>=26&&(M-=26,L--),A!==0||L!==this.length-1?C=f[6-T.length]+T+C:C=T+C}for(A!==0&&(C=A.toString(16)+C);C.length%R!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(g===(g|0)&&g>=2&&g<=36){var w=u[g],N=m[g];C="";var te=this.clone();for(te.negative=0;!te.isZero();){var Y=te.modrn(N).toString(g);te=te.idivn(N),te.isZero()?C=Y+C:C=f[w-Y.length]+Y+C}for(this.isZero()&&(C="0"+C);C.length%R!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=this.words[1]*67108864:this.length===3&&this.words[2]===1?g+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(g,R){return this.toArrayLike(a,g,R)}),i.prototype.toArray=function(g,R){return this.toArrayLike(Array,g,R)};var _=function(g,R){return g.allocUnsafe?g.allocUnsafe(R):new g(R)};i.prototype.toArrayLike=function(g,R,C){this._strip();var M=this.byteLength(),A=C||Math.max(1,M);r(M<=A,"byte array longer than desired length"),r(A>0,"Requested array length <= 0");var L=_(g,A),j=R==="le"?"LE":"BE";return this["_toArrayLike"+j](L,M),L},i.prototype._toArrayLikeLE=function(g,R){for(var C=0,M=0,A=0,L=0;A<this.length;A++){var j=this.words[A]<<L|M;g[C++]=j&255,C<g.length&&(g[C++]=j>>8&255),C<g.length&&(g[C++]=j>>16&255),L===6?(C<g.length&&(g[C++]=j>>24&255),M=0,L=0):(M=j>>>24,L+=2)}if(C<g.length)for(g[C++]=M;C<g.length;)g[C++]=0},i.prototype._toArrayLikeBE=function(g,R){for(var C=g.length-1,M=0,A=0,L=0;A<this.length;A++){var j=this.words[A]<<L|M;g[C--]=j&255,C>=0&&(g[C--]=j>>8&255),C>=0&&(g[C--]=j>>16&255),L===6?(C>=0&&(g[C--]=j>>24&255),M=0,L=0):(M=j>>>24,L+=2)}if(C>=0)for(g[C--]=M;C>=0;)g[C--]=0},Math.clz32?i.prototype._countBits=function(g){return 32-Math.clz32(g)}:i.prototype._countBits=function(g){var R=g,C=0;return R>=4096&&(C+=13,R>>>=13),R>=64&&(C+=7,R>>>=7),R>=8&&(C+=4,R>>>=4),R>=2&&(C+=2,R>>>=2),C+R},i.prototype._zeroBits=function(g){if(g===0)return 26;var R=g,C=0;return(R&8191)===0&&(C+=13,R>>>=13),(R&127)===0&&(C+=7,R>>>=7),(R&15)===0&&(C+=4,R>>>=4),(R&3)===0&&(C+=2,R>>>=2),(R&1)===0&&C++,C},i.prototype.bitLength=function(){var g=this.words[this.length-1],R=this._countBits(g);return(this.length-1)*26+R};function y(q){for(var g=new Array(q.bitLength()),R=0;R<g.length;R++){var C=R/26|0,M=R%26;g[R]=q.words[C]>>>M&1}return g}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,R=0;R<this.length;R++){var C=this._zeroBits(this.words[R]);if(g+=C,C!==26)break}return g},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(g){return this.negative!==0?this.abs().inotn(g).iaddn(1):this.clone()},i.prototype.fromTwos=function(g){return this.testn(g-1)?this.notn(g).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(g){for(;this.length<g.length;)this.words[this.length++]=0;for(var R=0;R<g.length;R++)this.words[R]=this.words[R]|g.words[R];return this._strip()},i.prototype.ior=function(g){return r((this.negative|g.negative)===0),this.iuor(g)},i.prototype.or=function(g){return this.length>g.length?this.clone().ior(g):g.clone().ior(this)},i.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},i.prototype.iuand=function(g){var R;this.length>g.length?R=g:R=this;for(var C=0;C<R.length;C++)this.words[C]=this.words[C]&g.words[C];return this.length=R.length,this._strip()},i.prototype.iand=function(g){return r((this.negative|g.negative)===0),this.iuand(g)},i.prototype.and=function(g){return this.length>g.length?this.clone().iand(g):g.clone().iand(this)},i.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},i.prototype.iuxor=function(g){var R,C;this.length>g.length?(R=this,C=g):(R=g,C=this);for(var M=0;M<C.length;M++)this.words[M]=R.words[M]^C.words[M];if(this!==R)for(;M<R.length;M++)this.words[M]=R.words[M];return this.length=R.length,this._strip()},i.prototype.ixor=function(g){return r((this.negative|g.negative)===0),this.iuxor(g)},i.prototype.xor=function(g){return this.length>g.length?this.clone().ixor(g):g.clone().ixor(this)},i.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},i.prototype.inotn=function(g){r(typeof g=="number"&&g>=0);var R=Math.ceil(g/26)|0,C=g%26;this._expand(R),C>0&&R--;for(var M=0;M<R;M++)this.words[M]=~this.words[M]&67108863;return C>0&&(this.words[M]=~this.words[M]&67108863>>26-C),this._strip()},i.prototype.notn=function(g){return this.clone().inotn(g)},i.prototype.setn=function(g,R){r(typeof g=="number"&&g>=0);var C=g/26|0,M=g%26;return this._expand(C+1),R?this.words[C]=this.words[C]|1<<M:this.words[C]=this.words[C]&~(1<<M),this._strip()},i.prototype.iadd=function(g){var R;if(this.negative!==0&&g.negative===0)return this.negative=0,R=this.isub(g),this.negative^=1,this._normSign();if(this.negative===0&&g.negative!==0)return g.negative=0,R=this.isub(g),g.negative=1,R._normSign();var C,M;this.length>g.length?(C=this,M=g):(C=g,M=this);for(var A=0,L=0;L<M.length;L++)R=(C.words[L]|0)+(M.words[L]|0)+A,this.words[L]=R&67108863,A=R>>>26;for(;A!==0&&L<C.length;L++)R=(C.words[L]|0)+A,this.words[L]=R&67108863,A=R>>>26;if(this.length=C.length,A!==0)this.words[this.length]=A,this.length++;else if(C!==this)for(;L<C.length;L++)this.words[L]=C.words[L];return this},i.prototype.add=function(g){var R;return g.negative!==0&&this.negative===0?(g.negative=0,R=this.sub(g),g.negative^=1,R):g.negative===0&&this.negative!==0?(this.negative=0,R=g.sub(this),this.negative=1,R):this.length>g.length?this.clone().iadd(g):g.clone().iadd(this)},i.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var R=this.iadd(g);return g.negative=1,R._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var C=this.cmp(g);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,A;C>0?(M=this,A=g):(M=g,A=this);for(var L=0,j=0;j<A.length;j++)R=(M.words[j]|0)-(A.words[j]|0)+L,L=R>>26,this.words[j]=R&67108863;for(;L!==0&&j<M.length;j++)R=(M.words[j]|0)+L,L=R>>26,this.words[j]=R&67108863;if(L===0&&j<M.length&&M!==this)for(;j<M.length;j++)this.words[j]=M.words[j];return this.length=Math.max(this.length,j),M!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(g){return this.clone().isub(g)};function l(q,g,R){R.negative=g.negative^q.negative;var C=q.length+g.length|0;R.length=C,C=C-1|0;var M=q.words[0]|0,A=g.words[0]|0,L=M*A,j=L&67108863,T=L/67108864|0;R.words[0]=j;for(var w=1;w<C;w++){for(var N=T>>>26,te=T&67108863,Y=Math.min(w,g.length-1),U=Math.max(0,w-q.length+1);U<=Y;U++){var $=w-U|0;M=q.words[$]|0,A=g.words[U]|0,L=M*A+te,N+=L/67108864|0,te=L&67108863}R.words[w]=te|0,T=N|0}return T!==0?R.words[w]=T|0:R.length--,R._strip()}var b=function(g,R,C){var M=g.words,A=R.words,L=C.words,j=0,T,w,N,te=M[0]|0,Y=te&8191,U=te>>>13,$=M[1]|0,G=$&8191,X=$>>>13,ne=M[2]|0,B=ne&8191,P=ne>>>13,Z=M[3]|0,K=Z&8191,oe=Z>>>13,ie=M[4]|0,se=ie&8191,de=ie>>>13,He=M[5]|0,ge=He&8191,ue=He>>>13,ye=M[6]|0,pe=ye&8191,me=ye>>>13,$e=M[7]|0,ve=$e&8191,k=$e>>>13,v=M[8]|0,S=v&8191,O=v>>>13,H=M[9]|0,V=H&8191,z=H>>>13,he=A[0]|0,fe=he&8191,le=he>>>13,be=A[1]|0,ce=be&8191,Re=be>>>13,Xt=A[2]|0,Se=Xt&8191,Ce=Xt>>>13,er=A[3]|0,Me=er&8191,ke=er>>>13,tr=A[4]|0,Ie=tr&8191,Ae=tr>>>13,rr=A[5]|0,xe=rr&8191,Te=rr>>>13,nr=A[6]|0,Be=nr&8191,Pe=nr>>>13,ir=A[7]|0,Le=ir&8191,Ne=ir>>>13,sr=A[8]|0,Oe=sr&8191,Fe=sr>>>13,or=A[9]|0,qe=or&8191,De=or>>>13;C.negative=g.negative^R.negative,C.length=19,T=Math.imul(Y,fe),w=Math.imul(Y,le),w=w+Math.imul(U,fe)|0,N=Math.imul(U,le);var dt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(dt>>>26)|0,dt&=67108863,T=Math.imul(G,fe),w=Math.imul(G,le),w=w+Math.imul(X,fe)|0,N=Math.imul(X,le),T=T+Math.imul(Y,ce)|0,w=w+Math.imul(Y,Re)|0,w=w+Math.imul(U,ce)|0,N=N+Math.imul(U,Re)|0;var pt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(pt>>>26)|0,pt&=67108863,T=Math.imul(B,fe),w=Math.imul(B,le),w=w+Math.imul(P,fe)|0,N=Math.imul(P,le),T=T+Math.imul(G,ce)|0,w=w+Math.imul(G,Re)|0,w=w+Math.imul(X,ce)|0,N=N+Math.imul(X,Re)|0,T=T+Math.imul(Y,Se)|0,w=w+Math.imul(Y,Ce)|0,w=w+Math.imul(U,Se)|0,N=N+Math.imul(U,Ce)|0;var gt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(gt>>>26)|0,gt&=67108863,T=Math.imul(K,fe),w=Math.imul(K,le),w=w+Math.imul(oe,fe)|0,N=Math.imul(oe,le),T=T+Math.imul(B,ce)|0,w=w+Math.imul(B,Re)|0,w=w+Math.imul(P,ce)|0,N=N+Math.imul(P,Re)|0,T=T+Math.imul(G,Se)|0,w=w+Math.imul(G,Ce)|0,w=w+Math.imul(X,Se)|0,N=N+Math.imul(X,Ce)|0,T=T+Math.imul(Y,Me)|0,w=w+Math.imul(Y,ke)|0,w=w+Math.imul(U,Me)|0,N=N+Math.imul(U,ke)|0;var mt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(mt>>>26)|0,mt&=67108863,T=Math.imul(se,fe),w=Math.imul(se,le),w=w+Math.imul(de,fe)|0,N=Math.imul(de,le),T=T+Math.imul(K,ce)|0,w=w+Math.imul(K,Re)|0,w=w+Math.imul(oe,ce)|0,N=N+Math.imul(oe,Re)|0,T=T+Math.imul(B,Se)|0,w=w+Math.imul(B,Ce)|0,w=w+Math.imul(P,Se)|0,N=N+Math.imul(P,Ce)|0,T=T+Math.imul(G,Me)|0,w=w+Math.imul(G,ke)|0,w=w+Math.imul(X,Me)|0,N=N+Math.imul(X,ke)|0,T=T+Math.imul(Y,Ie)|0,w=w+Math.imul(Y,Ae)|0,w=w+Math.imul(U,Ie)|0,N=N+Math.imul(U,Ae)|0;var yt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(yt>>>26)|0,yt&=67108863,T=Math.imul(ge,fe),w=Math.imul(ge,le),w=w+Math.imul(ue,fe)|0,N=Math.imul(ue,le),T=T+Math.imul(se,ce)|0,w=w+Math.imul(se,Re)|0,w=w+Math.imul(de,ce)|0,N=N+Math.imul(de,Re)|0,T=T+Math.imul(K,Se)|0,w=w+Math.imul(K,Ce)|0,w=w+Math.imul(oe,Se)|0,N=N+Math.imul(oe,Ce)|0,T=T+Math.imul(B,Me)|0,w=w+Math.imul(B,ke)|0,w=w+Math.imul(P,Me)|0,N=N+Math.imul(P,ke)|0,T=T+Math.imul(G,Ie)|0,w=w+Math.imul(G,Ae)|0,w=w+Math.imul(X,Ie)|0,N=N+Math.imul(X,Ae)|0,T=T+Math.imul(Y,xe)|0,w=w+Math.imul(Y,Te)|0,w=w+Math.imul(U,xe)|0,N=N+Math.imul(U,Te)|0;var _t=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(_t>>>26)|0,_t&=67108863,T=Math.imul(pe,fe),w=Math.imul(pe,le),w=w+Math.imul(me,fe)|0,N=Math.imul(me,le),T=T+Math.imul(ge,ce)|0,w=w+Math.imul(ge,Re)|0,w=w+Math.imul(ue,ce)|0,N=N+Math.imul(ue,Re)|0,T=T+Math.imul(se,Se)|0,w=w+Math.imul(se,Ce)|0,w=w+Math.imul(de,Se)|0,N=N+Math.imul(de,Ce)|0,T=T+Math.imul(K,Me)|0,w=w+Math.imul(K,ke)|0,w=w+Math.imul(oe,Me)|0,N=N+Math.imul(oe,ke)|0,T=T+Math.imul(B,Ie)|0,w=w+Math.imul(B,Ae)|0,w=w+Math.imul(P,Ie)|0,N=N+Math.imul(P,Ae)|0,T=T+Math.imul(G,xe)|0,w=w+Math.imul(G,Te)|0,w=w+Math.imul(X,xe)|0,N=N+Math.imul(X,Te)|0,T=T+Math.imul(Y,Be)|0,w=w+Math.imul(Y,Pe)|0,w=w+Math.imul(U,Be)|0,N=N+Math.imul(U,Pe)|0;var vt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(vt>>>26)|0,vt&=67108863,T=Math.imul(ve,fe),w=Math.imul(ve,le),w=w+Math.imul(k,fe)|0,N=Math.imul(k,le),T=T+Math.imul(pe,ce)|0,w=w+Math.imul(pe,Re)|0,w=w+Math.imul(me,ce)|0,N=N+Math.imul(me,Re)|0,T=T+Math.imul(ge,Se)|0,w=w+Math.imul(ge,Ce)|0,w=w+Math.imul(ue,Se)|0,N=N+Math.imul(ue,Ce)|0,T=T+Math.imul(se,Me)|0,w=w+Math.imul(se,ke)|0,w=w+Math.imul(de,Me)|0,N=N+Math.imul(de,ke)|0,T=T+Math.imul(K,Ie)|0,w=w+Math.imul(K,Ae)|0,w=w+Math.imul(oe,Ie)|0,N=N+Math.imul(oe,Ae)|0,T=T+Math.imul(B,xe)|0,w=w+Math.imul(B,Te)|0,w=w+Math.imul(P,xe)|0,N=N+Math.imul(P,Te)|0,T=T+Math.imul(G,Be)|0,w=w+Math.imul(G,Pe)|0,w=w+Math.imul(X,Be)|0,N=N+Math.imul(X,Pe)|0,T=T+Math.imul(Y,Le)|0,w=w+Math.imul(Y,Ne)|0,w=w+Math.imul(U,Le)|0,N=N+Math.imul(U,Ne)|0;var bt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(bt>>>26)|0,bt&=67108863,T=Math.imul(S,fe),w=Math.imul(S,le),w=w+Math.imul(O,fe)|0,N=Math.imul(O,le),T=T+Math.imul(ve,ce)|0,w=w+Math.imul(ve,Re)|0,w=w+Math.imul(k,ce)|0,N=N+Math.imul(k,Re)|0,T=T+Math.imul(pe,Se)|0,w=w+Math.imul(pe,Ce)|0,w=w+Math.imul(me,Se)|0,N=N+Math.imul(me,Ce)|0,T=T+Math.imul(ge,Me)|0,w=w+Math.imul(ge,ke)|0,w=w+Math.imul(ue,Me)|0,N=N+Math.imul(ue,ke)|0,T=T+Math.imul(se,Ie)|0,w=w+Math.imul(se,Ae)|0,w=w+Math.imul(de,Ie)|0,N=N+Math.imul(de,Ae)|0,T=T+Math.imul(K,xe)|0,w=w+Math.imul(K,Te)|0,w=w+Math.imul(oe,xe)|0,N=N+Math.imul(oe,Te)|0,T=T+Math.imul(B,Be)|0,w=w+Math.imul(B,Pe)|0,w=w+Math.imul(P,Be)|0,N=N+Math.imul(P,Pe)|0,T=T+Math.imul(G,Le)|0,w=w+Math.imul(G,Ne)|0,w=w+Math.imul(X,Le)|0,N=N+Math.imul(X,Ne)|0,T=T+Math.imul(Y,Oe)|0,w=w+Math.imul(Y,Fe)|0,w=w+Math.imul(U,Oe)|0,N=N+Math.imul(U,Fe)|0;var wt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(wt>>>26)|0,wt&=67108863,T=Math.imul(V,fe),w=Math.imul(V,le),w=w+Math.imul(z,fe)|0,N=Math.imul(z,le),T=T+Math.imul(S,ce)|0,w=w+Math.imul(S,Re)|0,w=w+Math.imul(O,ce)|0,N=N+Math.imul(O,Re)|0,T=T+Math.imul(ve,Se)|0,w=w+Math.imul(ve,Ce)|0,w=w+Math.imul(k,Se)|0,N=N+Math.imul(k,Ce)|0,T=T+Math.imul(pe,Me)|0,w=w+Math.imul(pe,ke)|0,w=w+Math.imul(me,Me)|0,N=N+Math.imul(me,ke)|0,T=T+Math.imul(ge,Ie)|0,w=w+Math.imul(ge,Ae)|0,w=w+Math.imul(ue,Ie)|0,N=N+Math.imul(ue,Ae)|0,T=T+Math.imul(se,xe)|0,w=w+Math.imul(se,Te)|0,w=w+Math.imul(de,xe)|0,N=N+Math.imul(de,Te)|0,T=T+Math.imul(K,Be)|0,w=w+Math.imul(K,Pe)|0,w=w+Math.imul(oe,Be)|0,N=N+Math.imul(oe,Pe)|0,T=T+Math.imul(B,Le)|0,w=w+Math.imul(B,Ne)|0,w=w+Math.imul(P,Le)|0,N=N+Math.imul(P,Ne)|0,T=T+Math.imul(G,Oe)|0,w=w+Math.imul(G,Fe)|0,w=w+Math.imul(X,Oe)|0,N=N+Math.imul(X,Fe)|0,T=T+Math.imul(Y,qe)|0,w=w+Math.imul(Y,De)|0,w=w+Math.imul(U,qe)|0,N=N+Math.imul(U,De)|0;var Et=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Et>>>26)|0,Et&=67108863,T=Math.imul(V,ce),w=Math.imul(V,Re),w=w+Math.imul(z,ce)|0,N=Math.imul(z,Re),T=T+Math.imul(S,Se)|0,w=w+Math.imul(S,Ce)|0,w=w+Math.imul(O,Se)|0,N=N+Math.imul(O,Ce)|0,T=T+Math.imul(ve,Me)|0,w=w+Math.imul(ve,ke)|0,w=w+Math.imul(k,Me)|0,N=N+Math.imul(k,ke)|0,T=T+Math.imul(pe,Ie)|0,w=w+Math.imul(pe,Ae)|0,w=w+Math.imul(me,Ie)|0,N=N+Math.imul(me,Ae)|0,T=T+Math.imul(ge,xe)|0,w=w+Math.imul(ge,Te)|0,w=w+Math.imul(ue,xe)|0,N=N+Math.imul(ue,Te)|0,T=T+Math.imul(se,Be)|0,w=w+Math.imul(se,Pe)|0,w=w+Math.imul(de,Be)|0,N=N+Math.imul(de,Pe)|0,T=T+Math.imul(K,Le)|0,w=w+Math.imul(K,Ne)|0,w=w+Math.imul(oe,Le)|0,N=N+Math.imul(oe,Ne)|0,T=T+Math.imul(B,Oe)|0,w=w+Math.imul(B,Fe)|0,w=w+Math.imul(P,Oe)|0,N=N+Math.imul(P,Fe)|0,T=T+Math.imul(G,qe)|0,w=w+Math.imul(G,De)|0,w=w+Math.imul(X,qe)|0,N=N+Math.imul(X,De)|0;var Rt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,T=Math.imul(V,Se),w=Math.imul(V,Ce),w=w+Math.imul(z,Se)|0,N=Math.imul(z,Ce),T=T+Math.imul(S,Me)|0,w=w+Math.imul(S,ke)|0,w=w+Math.imul(O,Me)|0,N=N+Math.imul(O,ke)|0,T=T+Math.imul(ve,Ie)|0,w=w+Math.imul(ve,Ae)|0,w=w+Math.imul(k,Ie)|0,N=N+Math.imul(k,Ae)|0,T=T+Math.imul(pe,xe)|0,w=w+Math.imul(pe,Te)|0,w=w+Math.imul(me,xe)|0,N=N+Math.imul(me,Te)|0,T=T+Math.imul(ge,Be)|0,w=w+Math.imul(ge,Pe)|0,w=w+Math.imul(ue,Be)|0,N=N+Math.imul(ue,Pe)|0,T=T+Math.imul(se,Le)|0,w=w+Math.imul(se,Ne)|0,w=w+Math.imul(de,Le)|0,N=N+Math.imul(de,Ne)|0,T=T+Math.imul(K,Oe)|0,w=w+Math.imul(K,Fe)|0,w=w+Math.imul(oe,Oe)|0,N=N+Math.imul(oe,Fe)|0,T=T+Math.imul(B,qe)|0,w=w+Math.imul(B,De)|0,w=w+Math.imul(P,qe)|0,N=N+Math.imul(P,De)|0;var St=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(St>>>26)|0,St&=67108863,T=Math.imul(V,Me),w=Math.imul(V,ke),w=w+Math.imul(z,Me)|0,N=Math.imul(z,ke),T=T+Math.imul(S,Ie)|0,w=w+Math.imul(S,Ae)|0,w=w+Math.imul(O,Ie)|0,N=N+Math.imul(O,Ae)|0,T=T+Math.imul(ve,xe)|0,w=w+Math.imul(ve,Te)|0,w=w+Math.imul(k,xe)|0,N=N+Math.imul(k,Te)|0,T=T+Math.imul(pe,Be)|0,w=w+Math.imul(pe,Pe)|0,w=w+Math.imul(me,Be)|0,N=N+Math.imul(me,Pe)|0,T=T+Math.imul(ge,Le)|0,w=w+Math.imul(ge,Ne)|0,w=w+Math.imul(ue,Le)|0,N=N+Math.imul(ue,Ne)|0,T=T+Math.imul(se,Oe)|0,w=w+Math.imul(se,Fe)|0,w=w+Math.imul(de,Oe)|0,N=N+Math.imul(de,Fe)|0,T=T+Math.imul(K,qe)|0,w=w+Math.imul(K,De)|0,w=w+Math.imul(oe,qe)|0,N=N+Math.imul(oe,De)|0;var Ct=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,T=Math.imul(V,Ie),w=Math.imul(V,Ae),w=w+Math.imul(z,Ie)|0,N=Math.imul(z,Ae),T=T+Math.imul(S,xe)|0,w=w+Math.imul(S,Te)|0,w=w+Math.imul(O,xe)|0,N=N+Math.imul(O,Te)|0,T=T+Math.imul(ve,Be)|0,w=w+Math.imul(ve,Pe)|0,w=w+Math.imul(k,Be)|0,N=N+Math.imul(k,Pe)|0,T=T+Math.imul(pe,Le)|0,w=w+Math.imul(pe,Ne)|0,w=w+Math.imul(me,Le)|0,N=N+Math.imul(me,Ne)|0,T=T+Math.imul(ge,Oe)|0,w=w+Math.imul(ge,Fe)|0,w=w+Math.imul(ue,Oe)|0,N=N+Math.imul(ue,Fe)|0,T=T+Math.imul(se,qe)|0,w=w+Math.imul(se,De)|0,w=w+Math.imul(de,qe)|0,N=N+Math.imul(de,De)|0;var Mt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,T=Math.imul(V,xe),w=Math.imul(V,Te),w=w+Math.imul(z,xe)|0,N=Math.imul(z,Te),T=T+Math.imul(S,Be)|0,w=w+Math.imul(S,Pe)|0,w=w+Math.imul(O,Be)|0,N=N+Math.imul(O,Pe)|0,T=T+Math.imul(ve,Le)|0,w=w+Math.imul(ve,Ne)|0,w=w+Math.imul(k,Le)|0,N=N+Math.imul(k,Ne)|0,T=T+Math.imul(pe,Oe)|0,w=w+Math.imul(pe,Fe)|0,w=w+Math.imul(me,Oe)|0,N=N+Math.imul(me,Fe)|0,T=T+Math.imul(ge,qe)|0,w=w+Math.imul(ge,De)|0,w=w+Math.imul(ue,qe)|0,N=N+Math.imul(ue,De)|0;var kt=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(kt>>>26)|0,kt&=67108863,T=Math.imul(V,Be),w=Math.imul(V,Pe),w=w+Math.imul(z,Be)|0,N=Math.imul(z,Pe),T=T+Math.imul(S,Le)|0,w=w+Math.imul(S,Ne)|0,w=w+Math.imul(O,Le)|0,N=N+Math.imul(O,Ne)|0,T=T+Math.imul(ve,Oe)|0,w=w+Math.imul(ve,Fe)|0,w=w+Math.imul(k,Oe)|0,N=N+Math.imul(k,Fe)|0,T=T+Math.imul(pe,qe)|0,w=w+Math.imul(pe,De)|0,w=w+Math.imul(me,qe)|0,N=N+Math.imul(me,De)|0;var Jn=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,T=Math.imul(V,Le),w=Math.imul(V,Ne),w=w+Math.imul(z,Le)|0,N=Math.imul(z,Ne),T=T+Math.imul(S,Oe)|0,w=w+Math.imul(S,Fe)|0,w=w+Math.imul(O,Oe)|0,N=N+Math.imul(O,Fe)|0,T=T+Math.imul(ve,qe)|0,w=w+Math.imul(ve,De)|0,w=w+Math.imul(k,qe)|0,N=N+Math.imul(k,De)|0;var Zn=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,T=Math.imul(V,Oe),w=Math.imul(V,Fe),w=w+Math.imul(z,Oe)|0,N=Math.imul(z,Fe),T=T+Math.imul(S,qe)|0,w=w+Math.imul(S,De)|0,w=w+Math.imul(O,qe)|0,N=N+Math.imul(O,De)|0;var Kn=(j+T|0)+((w&8191)<<13)|0;j=(N+(w>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,T=Math.imul(V,qe),w=Math.imul(V,De),w=w+Math.imul(z,qe)|0,N=Math.imul(z,De);var Qn=(j+T|0)+((w&8191)<<13)|0;return j=(N+(w>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,L[0]=dt,L[1]=pt,L[2]=gt,L[3]=mt,L[4]=yt,L[5]=_t,L[6]=vt,L[7]=bt,L[8]=wt,L[9]=Et,L[10]=Rt,L[11]=St,L[12]=Ct,L[13]=Mt,L[14]=kt,L[15]=Jn,L[16]=Zn,L[17]=Kn,L[18]=Qn,j!==0&&(L[19]=j,C.length++),C};Math.imul||(b=l);function E(q,g,R){R.negative=g.negative^q.negative,R.length=q.length+g.length;for(var C=0,M=0,A=0;A<R.length-1;A++){var L=M;M=0;for(var j=C&67108863,T=Math.min(A,g.length-1),w=Math.max(0,A-q.length+1);w<=T;w++){var N=A-w,te=q.words[N]|0,Y=g.words[w]|0,U=te*Y,$=U&67108863;L=L+(U/67108864|0)|0,$=$+j|0,j=$&67108863,L=L+($>>>26)|0,M+=L>>>26,L&=67108863}R.words[A]=j,C=L,L=M}return C!==0?R.words[A]=C:R.length--,R._strip()}function I(q,g,R){return E(q,g,R)}i.prototype.mulTo=function(g,R){var C,M=this.length+g.length;return this.length===10&&g.length===10?C=b(this,g,R):M<63?C=l(this,g,R):M<1024?C=E(this,g,R):C=I(this,g,R),C},i.prototype.mul=function(g){var R=new i(null);return R.words=new Array(this.length+g.length),this.mulTo(g,R)},i.prototype.mulf=function(g){var R=new i(null);return R.words=new Array(this.length+g.length),I(this,g,R)},i.prototype.imul=function(g){return this.clone().mulTo(g,this)},i.prototype.imuln=function(g){var R=g<0;R&&(g=-g),r(typeof g=="number"),r(g<67108864);for(var C=0,M=0;M<this.length;M++){var A=(this.words[M]|0)*g,L=(A&67108863)+(C&67108863);C>>=26,C+=A/67108864|0,C+=L>>>26,this.words[M]=L&67108863}return C!==0&&(this.words[M]=C,this.length++),this.length=g===0?1:this.length,R?this.ineg():this},i.prototype.muln=function(g){return this.clone().imuln(g)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(g){var R=y(g);if(R.length===0)return new i(1);for(var C=this,M=0;M<R.length&&R[M]===0;M++,C=C.sqr());if(++M<R.length)for(var A=C.sqr();M<R.length;M++,A=A.sqr())R[M]!==0&&(C=C.mul(A));return C},i.prototype.iushln=function(g){r(typeof g=="number"&&g>=0);var R=g%26,C=(g-R)/26,M=67108863>>>26-R<<26-R,A;if(R!==0){var L=0;for(A=0;A<this.length;A++){var j=this.words[A]&M,T=(this.words[A]|0)-j<<R;this.words[A]=T|L,L=j>>>26-R}L&&(this.words[A]=L,this.length++)}if(C!==0){for(A=this.length-1;A>=0;A--)this.words[A+C]=this.words[A];for(A=0;A<C;A++)this.words[A]=0;this.length+=C}return this._strip()},i.prototype.ishln=function(g){return r(this.negative===0),this.iushln(g)},i.prototype.iushrn=function(g,R,C){r(typeof g=="number"&&g>=0);var M;R?M=(R-R%26)/26:M=0;var A=g%26,L=Math.min((g-A)/26,this.length),j=67108863^67108863>>>A<<A,T=C;if(M-=L,M=Math.max(0,M),T){for(var w=0;w<L;w++)T.words[w]=this.words[w];T.length=L}if(L!==0)if(this.length>L)for(this.length-=L,w=0;w<this.length;w++)this.words[w]=this.words[w+L];else this.words[0]=0,this.length=1;var N=0;for(w=this.length-1;w>=0&&(N!==0||w>=M);w--){var te=this.words[w]|0;this.words[w]=N<<26-A|te>>>A,N=te&j}return T&&N!==0&&(T.words[T.length++]=N),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(g,R,C){return r(this.negative===0),this.iushrn(g,R,C)},i.prototype.shln=function(g){return this.clone().ishln(g)},i.prototype.ushln=function(g){return this.clone().iushln(g)},i.prototype.shrn=function(g){return this.clone().ishrn(g)},i.prototype.ushrn=function(g){return this.clone().iushrn(g)},i.prototype.testn=function(g){r(typeof g=="number"&&g>=0);var R=g%26,C=(g-R)/26,M=1<<R;if(this.length<=C)return!1;var A=this.words[C];return!!(A&M)},i.prototype.imaskn=function(g){r(typeof g=="number"&&g>=0);var R=g%26,C=(g-R)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(R!==0&&C++,this.length=Math.min(C,this.length),R!==0){var M=67108863^67108863>>>R<<R;this.words[this.length-1]&=M}return this._strip()},i.prototype.maskn=function(g){return this.clone().imaskn(g)},i.prototype.iaddn=function(g){return r(typeof g=="number"),r(g<67108864),g<0?this.isubn(-g):this.negative!==0?this.length===1&&(this.words[0]|0)<=g?(this.words[0]=g-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(g),this.negative=1,this):this._iaddn(g)},i.prototype._iaddn=function(g){this.words[0]+=g;for(var R=0;R<this.length&&this.words[R]>=67108864;R++)this.words[R]-=67108864,R===this.length-1?this.words[R+1]=1:this.words[R+1]++;return this.length=Math.max(this.length,R+1),this},i.prototype.isubn=function(g){if(r(typeof g=="number"),r(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var R=0;R<this.length&&this.words[R]<0;R++)this.words[R]+=67108864,this.words[R+1]-=1;return this._strip()},i.prototype.addn=function(g){return this.clone().iaddn(g)},i.prototype.subn=function(g){return this.clone().isubn(g)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(g,R,C){var M=g.length+C,A;this._expand(M);var L,j=0;for(A=0;A<g.length;A++){L=(this.words[A+C]|0)+j;var T=(g.words[A]|0)*R;L-=T&67108863,j=(L>>26)-(T/67108864|0),this.words[A+C]=L&67108863}for(;A<this.length-C;A++)L=(this.words[A+C]|0)+j,j=L>>26,this.words[A+C]=L&67108863;if(j===0)return this._strip();for(r(j===-1),j=0,A=0;A<this.length;A++)L=-(this.words[A]|0)+j,j=L>>26,this.words[A]=L&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(g,R){var C=this.length-g.length,M=this.clone(),A=g,L=A.words[A.length-1]|0,j=this._countBits(L);C=26-j,C!==0&&(A=A.ushln(C),M.iushln(C),L=A.words[A.length-1]|0);var T=M.length-A.length,w;if(R!=="mod"){w=new i(null),w.length=T+1,w.words=new Array(w.length);for(var N=0;N<w.length;N++)w.words[N]=0}var te=M.clone()._ishlnsubmul(A,1,T);te.negative===0&&(M=te,w&&(w.words[T]=1));for(var Y=T-1;Y>=0;Y--){var U=(M.words[A.length+Y]|0)*67108864+(M.words[A.length+Y-1]|0);for(U=Math.min(U/L|0,67108863),M._ishlnsubmul(A,U,Y);M.negative!==0;)U--,M.negative=0,M._ishlnsubmul(A,1,Y),M.isZero()||(M.negative^=1);w&&(w.words[Y]=U)}return w&&w._strip(),M._strip(),R!=="div"&&C!==0&&M.iushrn(C),{div:w||null,mod:M}},i.prototype.divmod=function(g,R,C){if(r(!g.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,A,L;return this.negative!==0&&g.negative===0?(L=this.neg().divmod(g,R),R!=="mod"&&(M=L.div.neg()),R!=="div"&&(A=L.mod.neg(),C&&A.negative!==0&&A.iadd(g)),{div:M,mod:A}):this.negative===0&&g.negative!==0?(L=this.divmod(g.neg(),R),R!=="mod"&&(M=L.div.neg()),{div:M,mod:L.mod}):(this.negative&g.negative)!==0?(L=this.neg().divmod(g.neg(),R),R!=="div"&&(A=L.mod.neg(),C&&A.negative!==0&&A.isub(g)),{div:L.div,mod:A}):g.length>this.length||this.cmp(g)<0?{div:new i(0),mod:this}:g.length===1?R==="div"?{div:this.divn(g.words[0]),mod:null}:R==="mod"?{div:null,mod:new i(this.modrn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new i(this.modrn(g.words[0]))}:this._wordDiv(g,R)},i.prototype.div=function(g){return this.divmod(g,"div",!1).div},i.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},i.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},i.prototype.divRound=function(g){var R=this.divmod(g);if(R.mod.isZero())return R.div;var C=R.div.negative!==0?R.mod.isub(g):R.mod,M=g.ushrn(1),A=g.andln(1),L=C.cmp(M);return L<0||A===1&&L===0?R.div:R.div.negative!==0?R.div.isubn(1):R.div.iaddn(1)},i.prototype.modrn=function(g){var R=g<0;R&&(g=-g),r(g<=67108863);for(var C=(1<<26)%g,M=0,A=this.length-1;A>=0;A--)M=(C*M+(this.words[A]|0))%g;return R?-M:M},i.prototype.modn=function(g){return this.modrn(g)},i.prototype.idivn=function(g){var R=g<0;R&&(g=-g),r(g<=67108863);for(var C=0,M=this.length-1;M>=0;M--){var A=(this.words[M]|0)+C*67108864;this.words[M]=A/g|0,C=A%g}return this._strip(),R?this.ineg():this},i.prototype.divn=function(g){return this.clone().idivn(g)},i.prototype.egcd=function(g){r(g.negative===0),r(!g.isZero());var R=this,C=g.clone();R.negative!==0?R=R.umod(g):R=R.clone();for(var M=new i(1),A=new i(0),L=new i(0),j=new i(1),T=0;R.isEven()&&C.isEven();)R.iushrn(1),C.iushrn(1),++T;for(var w=C.clone(),N=R.clone();!R.isZero();){for(var te=0,Y=1;(R.words[0]&Y)===0&&te<26;++te,Y<<=1);if(te>0)for(R.iushrn(te);te-- >0;)(M.isOdd()||A.isOdd())&&(M.iadd(w),A.isub(N)),M.iushrn(1),A.iushrn(1);for(var U=0,$=1;(C.words[0]&$)===0&&U<26;++U,$<<=1);if(U>0)for(C.iushrn(U);U-- >0;)(L.isOdd()||j.isOdd())&&(L.iadd(w),j.isub(N)),L.iushrn(1),j.iushrn(1);R.cmp(C)>=0?(R.isub(C),M.isub(L),A.isub(j)):(C.isub(R),L.isub(M),j.isub(A))}return{a:L,b:j,gcd:C.iushln(T)}},i.prototype._invmp=function(g){r(g.negative===0),r(!g.isZero());var R=this,C=g.clone();R.negative!==0?R=R.umod(g):R=R.clone();for(var M=new i(1),A=new i(0),L=C.clone();R.cmpn(1)>0&&C.cmpn(1)>0;){for(var j=0,T=1;(R.words[0]&T)===0&&j<26;++j,T<<=1);if(j>0)for(R.iushrn(j);j-- >0;)M.isOdd()&&M.iadd(L),M.iushrn(1);for(var w=0,N=1;(C.words[0]&N)===0&&w<26;++w,N<<=1);if(w>0)for(C.iushrn(w);w-- >0;)A.isOdd()&&A.iadd(L),A.iushrn(1);R.cmp(C)>=0?(R.isub(C),M.isub(A)):(C.isub(R),A.isub(M))}var te;return R.cmpn(1)===0?te=M:te=A,te.cmpn(0)<0&&te.iadd(g),te},i.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var R=this.clone(),C=g.clone();R.negative=0,C.negative=0;for(var M=0;R.isEven()&&C.isEven();M++)R.iushrn(1),C.iushrn(1);do{for(;R.isEven();)R.iushrn(1);for(;C.isEven();)C.iushrn(1);var A=R.cmp(C);if(A<0){var L=R;R=C,C=L}else if(A===0||C.cmpn(1)===0)break;R.isub(C)}while(!0);return C.iushln(M)},i.prototype.invm=function(g){return this.egcd(g).a.umod(g)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(g){return this.words[0]&g},i.prototype.bincn=function(g){r(typeof g=="number");var R=g%26,C=(g-R)/26,M=1<<R;if(this.length<=C)return this._expand(C+1),this.words[C]|=M,this;for(var A=M,L=C;A!==0&&L<this.length;L++){var j=this.words[L]|0;j+=A,A=j>>>26,j&=67108863,this.words[L]=j}return A!==0&&(this.words[L]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(g){var R=g<0;if(this.negative!==0&&!R)return-1;if(this.negative===0&&R)return 1;this._strip();var C;if(this.length>1)C=1;else{R&&(g=-g),r(g<=67108863,"Number is too big");var M=this.words[0]|0;C=M===g?0:M<g?-1:1}return this.negative!==0?-C|0:C},i.prototype.cmp=function(g){if(this.negative!==0&&g.negative===0)return-1;if(this.negative===0&&g.negative!==0)return 1;var R=this.ucmp(g);return this.negative!==0?-R|0:R},i.prototype.ucmp=function(g){if(this.length>g.length)return 1;if(this.length<g.length)return-1;for(var R=0,C=this.length-1;C>=0;C--){var M=this.words[C]|0,A=g.words[C]|0;if(M!==A){M<A?R=-1:M>A&&(R=1);break}}return R},i.prototype.gtn=function(g){return this.cmpn(g)===1},i.prototype.gt=function(g){return this.cmp(g)===1},i.prototype.gten=function(g){return this.cmpn(g)>=0},i.prototype.gte=function(g){return this.cmp(g)>=0},i.prototype.ltn=function(g){return this.cmpn(g)===-1},i.prototype.lt=function(g){return this.cmp(g)===-1},i.prototype.lten=function(g){return this.cmpn(g)<=0},i.prototype.lte=function(g){return this.cmp(g)<=0},i.prototype.eqn=function(g){return this.cmpn(g)===0},i.prototype.eq=function(g){return this.cmp(g)===0},i.red=function(g){return new Q(g)},i.prototype.toRed=function(g){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(g){return this.red=g,this},i.prototype.forceRed=function(g){return r(!this.red,"Already a number in reduction context"),this._forceRed(g)},i.prototype.redAdd=function(g){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},i.prototype.redIAdd=function(g){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},i.prototype.redSub=function(g){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},i.prototype.redISub=function(g){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},i.prototype.redShl=function(g){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},i.prototype.redMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},i.prototype.redIMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(g){return r(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var x={k256:null,p224:null,p192:null,p25519:null};function D(q,g){this.name=q,this.p=new i(g,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var g=new i(null);return g.words=new Array(Math.ceil(this.n/13)),g},D.prototype.ireduce=function(g){var R=g,C;do this.split(R,this.tmp),R=this.imulK(R),R=R.iadd(this.tmp),C=R.bitLength();while(C>this.n);var M=C<this.n?-1:R.ucmp(this.p);return M===0?(R.words[0]=0,R.length=1):M>0?R.isub(this.p):R.strip!==void 0?R.strip():R._strip(),R},D.prototype.split=function(g,R){g.iushrn(this.n,0,R)},D.prototype.imulK=function(g){return g.imul(this.k)};function F(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(F,D),F.prototype.split=function(g,R){for(var C=4194303,M=Math.min(g.length,9),A=0;A<M;A++)R.words[A]=g.words[A];if(R.length=M,g.length<=9){g.words[0]=0,g.length=1;return}var L=g.words[9];for(R.words[R.length++]=L&C,A=10;A<g.length;A++){var j=g.words[A]|0;g.words[A-10]=(j&C)<<4|L>>>22,L=j}L>>>=22,g.words[A-10]=L,L===0&&g.length>10?g.length-=10:g.length-=9},F.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var R=0,C=0;C<g.length;C++){var M=g.words[C]|0;R+=M*977,g.words[C]=R&67108863,R=M*64+(R/67108864|0)}return g.words[g.length-1]===0&&(g.length--,g.words[g.length-1]===0&&g.length--),g};function W(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}h(W,D);function J(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}h(J,D);function ee(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}h(ee,D),ee.prototype.imulK=function(g){for(var R=0,C=0;C<g.length;C++){var M=(g.words[C]|0)*19+R,A=M&67108863;M>>>=26,g.words[C]=A,R=M}return R!==0&&(g.words[g.length++]=R),g},i._prime=function(g){if(x[g])return x[g];var R;if(g==="k256")R=new F;else if(g==="p224")R=new W;else if(g==="p192")R=new J;else if(g==="p25519")R=new ee;else throw new Error("Unknown prime "+g);return x[g]=R,R};function Q(q){if(typeof q=="string"){var g=i._prime(q);this.m=g.p,this.prime=g}else r(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}Q.prototype._verify1=function(g){r(g.negative===0,"red works only with positives"),r(g.red,"red works only with red numbers")},Q.prototype._verify2=function(g,R){r((g.negative|R.negative)===0,"red works only with positives"),r(g.red&&g.red===R.red,"red works only with red numbers")},Q.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):(p(g,g.umod(this.m)._forceRed(this)),g)},Q.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},Q.prototype.add=function(g,R){this._verify2(g,R);var C=g.add(R);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},Q.prototype.iadd=function(g,R){this._verify2(g,R);var C=g.iadd(R);return C.cmp(this.m)>=0&&C.isub(this.m),C},Q.prototype.sub=function(g,R){this._verify2(g,R);var C=g.sub(R);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},Q.prototype.isub=function(g,R){this._verify2(g,R);var C=g.isub(R);return C.cmpn(0)<0&&C.iadd(this.m),C},Q.prototype.shl=function(g,R){return this._verify1(g),this.imod(g.ushln(R))},Q.prototype.imul=function(g,R){return this._verify2(g,R),this.imod(g.imul(R))},Q.prototype.mul=function(g,R){return this._verify2(g,R),this.imod(g.mul(R))},Q.prototype.isqr=function(g){return this.imul(g,g.clone())},Q.prototype.sqr=function(g){return this.mul(g,g)},Q.prototype.sqrt=function(g){if(g.isZero())return g.clone();var R=this.m.andln(3);if(r(R%2===1),R===3){var C=this.m.add(new i(1)).iushrn(2);return this.pow(g,C)}for(var M=this.m.subn(1),A=0;!M.isZero()&&M.andln(1)===0;)A++,M.iushrn(1);r(!M.isZero());var L=new i(1).toRed(this),j=L.redNeg(),T=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new i(2*w*w).toRed(this);this.pow(w,T).cmp(j)!==0;)w.redIAdd(j);for(var N=this.pow(w,M),te=this.pow(g,M.addn(1).iushrn(1)),Y=this.pow(g,M),U=A;Y.cmp(L)!==0;){for(var $=Y,G=0;$.cmp(L)!==0;G++)$=$.redSqr();r(G<U);var X=this.pow(N,new i(1).iushln(U-G-1));te=te.redMul(X),N=X.redSqr(),Y=Y.redMul(N),U=G}return te},Q.prototype.invm=function(g){var R=g._invmp(this.m);return R.negative!==0?(R.negative=0,this.imod(R).redNeg()):this.imod(R)},Q.prototype.pow=function(g,R){if(R.isZero())return new i(1).toRed(this);if(R.cmpn(1)===0)return g.clone();var C=4,M=new Array(1<<C);M[0]=new i(1).toRed(this),M[1]=g;for(var A=2;A<M.length;A++)M[A]=this.mul(M[A-1],g);var L=M[0],j=0,T=0,w=R.bitLength()%26;for(w===0&&(w=26),A=R.length-1;A>=0;A--){for(var N=R.words[A],te=w-1;te>=0;te--){var Y=N>>te&1;if(L!==M[0]&&(L=this.sqr(L)),Y===0&&j===0){T=0;continue}j<<=1,j|=Y,T++,!(T!==C&&(A!==0||te!==0))&&(L=this.mul(L,M[j]),T=0,j=0)}w=26}return L},Q.prototype.convertTo=function(g){var R=g.umod(this.m);return R===g?R.clone():R},Q.prototype.convertFrom=function(g){var R=g.clone();return R.red=null,R},i.mont=function(g){return new re(g)};function re(q){Q.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h(re,Q),re.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},re.prototype.convertFrom=function(g){var R=this.imod(g.mul(this.rinv));return R.red=null,R},re.prototype.imul=function(g,R){if(g.isZero()||R.isZero())return g.words[0]=0,g.length=1,g;var C=g.imul(R),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=C.isub(M).iushrn(this.shift),L=A;return A.cmp(this.m)>=0?L=A.isub(this.m):A.cmpn(0)<0&&(L=A.iadd(this.m)),L._forceRed(this)},re.prototype.mul=function(g,R){if(g.isZero()||R.isZero())return new i(0)._forceRed(this);var C=g.mul(R),M=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=C.isub(M).iushrn(this.shift),L=A;return A.cmp(this.m)>=0?L=A.isub(this.m):A.cmpn(0)<0&&(L=A.iadd(this.m)),L._forceRed(this)},re.prototype.invm=function(g){var R=this.imod(g._invmp(this.m).mul(this.r2));return R._forceRed(this)}})(e,s0)})(Tn)),Tn.exports}var Xn={},It={},Va;function On(){return Va||(Va=1,Object.defineProperty(It,"__esModule",{value:!0}),It.errorValues=It.standardErrorCodes=void 0,It.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},It.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}),It}var _r={},ei={},za;function ca(){return za||(za=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=On(),n="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function r(f,u=n){if(f&&Number.isInteger(f)){const m=f.toString();if(p(t.errorValues,m))return t.errorValues[m].message;if(d(f))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return u}e.getMessageFromCode=r;function h(f){if(!Number.isInteger(f))return!1;const u=f.toString();return!!(t.errorValues[u]||d(f))}e.isValidCode=h;function i(f){var u;if(typeof f=="number")return f;if(a(f))return(u=f.code)!==null&&u!==void 0?u:f.errorCode}e.getErrorCode=i;function a(f){return typeof f=="object"&&f!==null&&(typeof f.code=="number"||typeof f.errorCode=="number")}function o(f,{shouldIncludeStack:u=!1}={}){const m={};if(f&&typeof f=="object"&&!Array.isArray(f)&&p(f,"code")&&h(f.code)){const _=f;m.code=_.code,_.message&&typeof _.message=="string"?(m.message=_.message,p(_,"data")&&(m.data=_.data)):(m.message=r(m.code),m.data={originalError:c(f)})}else m.code=t.standardErrorCodes.rpc.internal,m.message=s(f,"message")?f.message:n,m.data={originalError:c(f)};return u&&(m.stack=s(f,"stack")?f.stack:void 0),m}e.serialize=o;function d(f){return f>=-32099&&f<=-32e3}function c(f){return f&&typeof f=="object"&&!Array.isArray(f)?Object.assign({},f):f}function p(f,u){return Object.prototype.hasOwnProperty.call(f,u)}function s(f,u){return typeof f=="object"&&f!==null&&u in f&&typeof f[u]=="string"}})(ei)),ei}var Ga;function o0(){if(Ga)return _r;Ga=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.standardErrors=void 0;const e=On(),t=ca();_r.standardErrors={rpc:{parse:d=>n(e.standardErrorCodes.rpc.parse,d),invalidRequest:d=>n(e.standardErrorCodes.rpc.invalidRequest,d),invalidParams:d=>n(e.standardErrorCodes.rpc.invalidParams,d),methodNotFound:d=>n(e.standardErrorCodes.rpc.methodNotFound,d),internal:d=>n(e.standardErrorCodes.rpc.internal,d),server:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:c}=d;if(!Number.isInteger(c)||c>-32005||c<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return n(c,d)},invalidInput:d=>n(e.standardErrorCodes.rpc.invalidInput,d),resourceNotFound:d=>n(e.standardErrorCodes.rpc.resourceNotFound,d),resourceUnavailable:d=>n(e.standardErrorCodes.rpc.resourceUnavailable,d),transactionRejected:d=>n(e.standardErrorCodes.rpc.transactionRejected,d),methodNotSupported:d=>n(e.standardErrorCodes.rpc.methodNotSupported,d),limitExceeded:d=>n(e.standardErrorCodes.rpc.limitExceeded,d)},provider:{userRejectedRequest:d=>r(e.standardErrorCodes.provider.userRejectedRequest,d),unauthorized:d=>r(e.standardErrorCodes.provider.unauthorized,d),unsupportedMethod:d=>r(e.standardErrorCodes.provider.unsupportedMethod,d),disconnected:d=>r(e.standardErrorCodes.provider.disconnected,d),chainDisconnected:d=>r(e.standardErrorCodes.provider.chainDisconnected,d),unsupportedChain:d=>r(e.standardErrorCodes.provider.unsupportedChain,d),custom:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:c,message:p,data:s}=d;if(!p||typeof p!="string")throw new Error('"message" must be a nonempty string');return new a(c,p,s)}}};function n(d,c){const[p,s]=h(c);return new i(d,p||(0,t.getMessageFromCode)(d),s)}function r(d,c){const[p,s]=h(c);return new a(d,p||(0,t.getMessageFromCode)(d),s)}function h(d){if(d){if(typeof d=="string")return[d];if(typeof d=="object"&&!Array.isArray(d)){const{message:c,data:p}=d;if(c&&typeof c!="string")throw new Error("Must specify string message.");return[c||void 0,p]}}return[]}class i extends Error{constructor(c,p,s){if(!Number.isInteger(c))throw new Error('"code" must be an integer.');if(!p||typeof p!="string")throw new Error('"message" must be a nonempty string.');super(p),this.code=c,s!==void 0&&(this.data=s)}}class a extends i{constructor(c,p,s){if(!o(c))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(c,p,s)}}function o(d){return Number.isInteger(d)&&d>=1e3&&d<=4999}return _r}var vr={},br={},Ja;function la(){if(Ja)return br;Ja=1,Object.defineProperty(br,"__esModule",{value:!0}),br.isErrorResponse=void 0;function e(t){return t.errorMessage!==void 0}return br.isErrorResponse=e,br}var wr={},Za;function fa(){return Za||(Za=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.LIB_VERSION=void 0,wr.LIB_VERSION="3.9.3"),wr}var Ka;function a0(){if(Ka)return vr;Ka=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.serializeError=void 0;const e=la(),t=fa(),n=On(),r=ca();function h(o,d){const c=(0,r.serialize)(i(o),{shouldIncludeStack:!0}),p=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");p.searchParams.set("version",t.LIB_VERSION),p.searchParams.set("code",c.code.toString());const s=a(c.data,d);return s&&p.searchParams.set("method",s),p.searchParams.set("message",c.message),Object.assign(Object.assign({},c),{docUrl:p.href})}vr.serializeError=h;function i(o){return typeof o=="string"?{message:o,code:n.standardErrorCodes.rpc.internal}:(0,e.isErrorResponse)(o)?Object.assign(Object.assign({},o),{message:o.errorMessage,code:o.errorCode,data:{method:o.method}}):o}function a(o,d){const c=o?.method;if(c)return c;if(d!==void 0){if(typeof d=="string")return d;if(Array.isArray(d)){if(d.length>0)return d[0].method}else return d.method}}return vr}var Qa;function Fn(){return Qa||(Qa=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=On();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const n=o0();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return n.standardErrors}});const r=a0();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}});const h=ca();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return h.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return h.getMessageFromCode}})})(Xn)),Xn}var Ve={},Ya;function qn(){if(Ya)return Ve;Ya=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.ProviderType=Ve.RegExpString=Ve.IntNumber=Ve.BigIntString=Ve.AddressString=Ve.HexString=Ve.OpaqueType=void 0;function e(){return r=>r}Ve.OpaqueType=e,Ve.HexString=e(),Ve.AddressString=e(),Ve.BigIntString=e();function t(r){return Math.floor(r)}Ve.IntNumber=t,Ve.RegExpString=e();var n;return(function(r){r.CoinbaseWallet="CoinbaseWallet",r.MetaMask="MetaMask",r.Unselected=""})(n||(Ve.ProviderType=n={})),Ve}var Xa;function ut(){if(Xa)return ae;Xa=1;var e=ae&&ae.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(ae,"__esModule",{value:!0}),ae.isMobileWeb=ae.getLocation=ae.isInIFrame=ae.createQrUrl=ae.getFavicon=ae.range=ae.isBigNumber=ae.ensureParsedJSONObject=ae.ensureBN=ae.ensureRegExpString=ae.ensureIntNumber=ae.ensureBuffer=ae.ensureAddressString=ae.ensureEvenLengthHexString=ae.ensureHexString=ae.isHexString=ae.prepend0x=ae.strip0x=ae.has0xPrefix=ae.hexStringFromIntNumber=ae.intNumberFromHexString=ae.bigIntStringFromBN=ae.hexStringFromBuffer=ae.hexStringToUint8Array=ae.uint8ArrayToHex=ae.randomBytesHex=void 0;const t=e(Nn()),n=Fn(),r=qn(),h=/^[0-9]*$/,i=/^[a-f0-9]*$/;function a(C){return o(crypto.getRandomValues(new Uint8Array(C)))}ae.randomBytesHex=a;function o(C){return[...C].map(M=>M.toString(16).padStart(2,"0")).join("")}ae.uint8ArrayToHex=o;function d(C){return new Uint8Array(C.match(/.{1,2}/g).map(M=>parseInt(M,16)))}ae.hexStringToUint8Array=d;function c(C,M=!1){const A=C.toString("hex");return(0,r.HexString)(M?`0x${A}`:A)}ae.hexStringFromBuffer=c;function p(C){return(0,r.BigIntString)(C.toString(10))}ae.bigIntStringFromBN=p;function s(C){return(0,r.IntNumber)(new t.default(b(C,!1),16).toNumber())}ae.intNumberFromHexString=s;function f(C){return(0,r.HexString)(`0x${new t.default(C).toString(16)}`)}ae.hexStringFromIntNumber=f;function u(C){return C.startsWith("0x")||C.startsWith("0X")}ae.has0xPrefix=u;function m(C){return u(C)?C.slice(2):C}ae.strip0x=m;function _(C){return u(C)?`0x${C.slice(2)}`:`0x${C}`}ae.prepend0x=_;function y(C){if(typeof C!="string")return!1;const M=m(C).toLowerCase();return i.test(M)}ae.isHexString=y;function l(C,M=!1){if(typeof C=="string"){const A=m(C).toLowerCase();if(i.test(A))return(0,r.HexString)(M?`0x${A}`:A)}throw n.standardErrors.rpc.invalidParams(`"${String(C)}" is not a hexadecimal string`)}ae.ensureHexString=l;function b(C,M=!1){let A=l(C,!1);return A.length%2===1&&(A=(0,r.HexString)(`0${A}`)),M?(0,r.HexString)(`0x${A}`):A}ae.ensureEvenLengthHexString=b;function E(C){if(typeof C=="string"){const M=m(C).toLowerCase();if(y(M)&&M.length===40)return(0,r.AddressString)(_(M))}throw n.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(C)}`)}ae.ensureAddressString=E;function I(C){if(Buffer.isBuffer(C))return C;if(typeof C=="string"){if(y(C)){const M=b(C,!1);return Buffer.from(M,"hex")}return Buffer.from(C,"utf8")}throw n.standardErrors.rpc.invalidParams(`Not binary data: ${String(C)}`)}ae.ensureBuffer=I;function x(C){if(typeof C=="number"&&Number.isInteger(C))return(0,r.IntNumber)(C);if(typeof C=="string"){if(h.test(C))return(0,r.IntNumber)(Number(C));if(y(C))return(0,r.IntNumber)(new t.default(b(C,!1),16).toNumber())}throw n.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ae.ensureIntNumber=x;function D(C){if(C instanceof RegExp)return(0,r.RegExpString)(C.toString());throw n.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(C)}`)}ae.ensureRegExpString=D;function F(C){if(C!==null&&(t.default.isBN(C)||J(C)))return new t.default(C.toString(10),10);if(typeof C=="number")return new t.default(x(C));if(typeof C=="string"){if(h.test(C))return new t.default(C,10);if(y(C))return new t.default(b(C,!1),16)}throw n.standardErrors.rpc.invalidParams(`Not an integer: ${String(C)}`)}ae.ensureBN=F;function W(C){if(typeof C=="string")return JSON.parse(C);if(typeof C=="object")return C;throw n.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(C)}`)}ae.ensureParsedJSONObject=W;function J(C){if(C==null||typeof C.constructor!="function")return!1;const{constructor:M}=C;return typeof M.config=="function"&&typeof M.EUCLID=="number"}ae.isBigNumber=J;function ee(C,M){return Array.from({length:M-C},(A,L)=>C+L)}ae.range=ee;function Q(){const C=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:M,host:A}=document.location,L=C?C.getAttribute("href"):null;return!L||L.startsWith("javascript:")||L.startsWith("vbscript:")?null:L.startsWith("http://")||L.startsWith("https://")||L.startsWith("data:")?L:L.startsWith("//")?M+L:`${M}//${A}${L}`}ae.getFavicon=Q;function re(C,M,A,L,j,T){const w=L?"parent-id":"id",N=new URLSearchParams({[w]:C,secret:M,server:A,v:j,chainId:T.toString()}).toString();return`${A}/#/link?${N}`}ae.createQrUrl=re;function q(){try{return window.frameElement!==null}catch{return!1}}ae.isInIFrame=q;function g(){try{return q()&&window.top?window.top.location:window.location}catch{return window.location}}ae.getLocation=g;function R(){var C;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((C=window?.navigator)===null||C===void 0?void 0:C.userAgent)}return ae.isMobileWeb=R,ae}var Er={},eu;function u0(){if(eu)return Er;eu=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.ScopedLocalStorage=void 0;let e=class{constructor(n){this.scope=n}setItem(n,r){localStorage.setItem(this.scopedKey(n),r)}getItem(n){return localStorage.getItem(this.scopedKey(n))}removeItem(n){localStorage.removeItem(this.scopedKey(n))}clear(){const n=this.scopedKey(""),r=[];for(let h=0;h<localStorage.length;h++){const i=localStorage.key(h);typeof i=="string"&&i.startsWith(n)&&r.push(i)}r.forEach(h=>localStorage.removeItem(h))}scopedKey(n){return`${this.scope}:${n}`}};return Er.ScopedLocalStorage=e,Er}var At={},Rr={},Sr={},Cr={},tu;function ha(){return tu||(tu=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.EVENTS=void 0,Cr.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}),Cr}var Ke={},ru;function da(){if(ru)return Ke;ru=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.RelayAbstract=Ke.APP_VERSION_KEY=Ke.LOCAL_STORAGE_ADDRESSES_KEY=Ke.WALLET_USER_NAME_KEY=void 0;const e=Fn();Ke.WALLET_USER_NAME_KEY="walletUsername",Ke.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",Ke.APP_VERSION_KEY="AppVersion";let t=class{async makeEthereumJSONRPCRequest(r,h){if(!h)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(h,{method:"POST",body:JSON.stringify(r),mode:"cors",headers:{"Content-Type":"application/json"}}).then(i=>i.json()).then(i=>{if(!i)throw e.standardErrors.rpc.parse({});const a=i,{error:o}=a;if(o)throw(0,e.serializeError)(o,r.method);return a})}};return Ke.RelayAbstract=t,Ke}var Mr={},ti={exports:{}},dn={exports:{}},nu;function tt(){return nu||(nu=1,typeof Object.create=="function"?dn.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:dn.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}),dn.exports}var pn={exports:{}},ri={},kr={},iu;function c0(){if(iu)return kr;iu=1,kr.byteLength=o,kr.toByteArray=c,kr.fromByteArray=f;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,i=r.length;h<i;++h)e[h]=r[h],t[r.charCodeAt(h)]=h;t[45]=62,t[95]=63;function a(u){var m=u.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=u.indexOf("=");_===-1&&(_=m);var y=_===m?0:4-_%4;return[_,y]}function o(u){var m=a(u),_=m[0],y=m[1];return(_+y)*3/4-y}function d(u,m,_){return(m+_)*3/4-_}function c(u){var m,_=a(u),y=_[0],l=_[1],b=new n(d(u,y,l)),E=0,I=l>0?y-4:y,x;for(x=0;x<I;x+=4)m=t[u.charCodeAt(x)]<<18|t[u.charCodeAt(x+1)]<<12|t[u.charCodeAt(x+2)]<<6|t[u.charCodeAt(x+3)],b[E++]=m>>16&255,b[E++]=m>>8&255,b[E++]=m&255;return l===2&&(m=t[u.charCodeAt(x)]<<2|t[u.charCodeAt(x+1)]>>4,b[E++]=m&255),l===1&&(m=t[u.charCodeAt(x)]<<10|t[u.charCodeAt(x+1)]<<4|t[u.charCodeAt(x+2)]>>2,b[E++]=m>>8&255,b[E++]=m&255),b}function p(u){return e[u>>18&63]+e[u>>12&63]+e[u>>6&63]+e[u&63]}function s(u,m,_){for(var y,l=[],b=m;b<_;b+=3)y=(u[b]<<16&16711680)+(u[b+1]<<8&65280)+(u[b+2]&255),l.push(p(y));return l.join("")}function f(u){for(var m,_=u.length,y=_%3,l=[],b=16383,E=0,I=_-y;E<I;E+=b)l.push(s(u,E,E+b>I?I:E+b));return y===1?(m=u[_-1],l.push(e[m>>2]+e[m<<4&63]+"==")):y===2&&(m=(u[_-2]<<8)+u[_-1],l.push(e[m>>10]+e[m>>4&63]+e[m<<2&63]+"=")),l.join("")}return kr}var gn={};var su;function l0(){return su||(su=1,gn.read=function(e,t,n,r,h){var i,a,o=h*8-r-1,d=(1<<o)-1,c=d>>1,p=-7,s=n?h-1:0,f=n?-1:1,u=e[t+s];for(s+=f,i=u&(1<<-p)-1,u>>=-p,p+=o;p>0;i=i*256+e[t+s],s+=f,p-=8);for(a=i&(1<<-p)-1,i>>=-p,p+=r;p>0;a=a*256+e[t+s],s+=f,p-=8);if(i===0)i=1-c;else{if(i===d)return a?NaN:(u?-1:1)*(1/0);a=a+Math.pow(2,r),i=i-c}return(u?-1:1)*a*Math.pow(2,i-r)},gn.write=function(e,t,n,r,h,i){var a,o,d,c=i*8-h-1,p=(1<<c)-1,s=p>>1,f=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=r?0:i-1,m=r?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=p):(a=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+s>=1?t+=f/d:t+=f*Math.pow(2,1-s),t*d>=2&&(a++,d/=2),a+s>=p?(o=0,a=p):a+s>=1?(o=(t*d-1)*Math.pow(2,h),a=a+s):(o=t*Math.pow(2,s-1)*Math.pow(2,h),a=0));h>=8;e[n+u]=o&255,u+=m,o/=256,h-=8);for(a=a<<h|o,c+=h;c>0;e[n+u]=a&255,u+=m,a/=256,c-=8);e[n+u-m]|=_*128}),gn}var ou;function Dn(){return ou||(ou=1,(function(e){const t=c0(),n=l0(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;const h=2147483647;e.kMaxLength=h,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const k=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(k,v),k.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(k){if(k>h)throw new RangeError('The value "'+k+'" is invalid for option "size"');const v=new Uint8Array(k);return Object.setPrototypeOf(v,o.prototype),v}function o(k,v,S){if(typeof k=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(k)}return d(k,v,S)}o.poolSize=8192;function d(k,v,S){if(typeof k=="string")return f(k,v);if(ArrayBuffer.isView(k))return m(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(ye(k,ArrayBuffer)||k&&ye(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(k,SharedArrayBuffer)||k&&ye(k.buffer,SharedArrayBuffer)))return _(k,v,S);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const O=k.valueOf&&k.valueOf();if(O!=null&&O!==k)return o.from(O,v,S);const H=y(k);if(H)return H;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return o.from(k[Symbol.toPrimitive]("string"),v,S);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}o.from=function(k,v,S){return d(k,v,S)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function c(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function p(k,v,S){return c(k),k<=0?a(k):v!==void 0?typeof S=="string"?a(k).fill(v,S):a(k).fill(v):a(k)}o.alloc=function(k,v,S){return p(k,v,S)};function s(k){return c(k),a(k<0?0:l(k)|0)}o.allocUnsafe=function(k){return s(k)},o.allocUnsafeSlow=function(k){return s(k)};function f(k,v){if((typeof v!="string"||v==="")&&(v="utf8"),!o.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const S=E(k,v)|0;let O=a(S);const H=O.write(k,v);return H!==S&&(O=O.slice(0,H)),O}function u(k){const v=k.length<0?0:l(k.length)|0,S=a(v);for(let O=0;O<v;O+=1)S[O]=k[O]&255;return S}function m(k){if(ye(k,Uint8Array)){const v=new Uint8Array(k);return _(v.buffer,v.byteOffset,v.byteLength)}return u(k)}function _(k,v,S){if(v<0||k.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<v+(S||0))throw new RangeError('"length" is outside of buffer bounds');let O;return v===void 0&&S===void 0?O=new Uint8Array(k):S===void 0?O=new Uint8Array(k,v):O=new Uint8Array(k,v,S),Object.setPrototypeOf(O,o.prototype),O}function y(k){if(o.isBuffer(k)){const v=l(k.length)|0,S=a(v);return S.length===0||k.copy(S,0,0,v),S}if(k.length!==void 0)return typeof k.length!="number"||pe(k.length)?a(0):u(k);if(k.type==="Buffer"&&Array.isArray(k.data))return u(k.data)}function l(k){if(k>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return k|0}function b(k){return+k!=k&&(k=0),o.alloc(+k)}o.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==o.prototype},o.compare=function(v,S){if(ye(v,Uint8Array)&&(v=o.from(v,v.offset,v.byteLength)),ye(S,Uint8Array)&&(S=o.from(S,S.offset,S.byteLength)),!o.isBuffer(v)||!o.isBuffer(S))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===S)return 0;let O=v.length,H=S.length;for(let V=0,z=Math.min(O,H);V<z;++V)if(v[V]!==S[V]){O=v[V],H=S[V];break}return O<H?-1:H<O?1:0},o.isEncoding=function(v){switch(String(v).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(v,S){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return o.alloc(0);let O;if(S===void 0)for(S=0,O=0;O<v.length;++O)S+=v[O].length;const H=o.allocUnsafe(S);let V=0;for(O=0;O<v.length;++O){let z=v[O];if(ye(z,Uint8Array))V+z.length>H.length?(o.isBuffer(z)||(z=o.from(z)),z.copy(H,V)):Uint8Array.prototype.set.call(H,z,V);else if(o.isBuffer(z))z.copy(H,V);else throw new TypeError('"list" argument must be an Array of Buffers');V+=z.length}return H};function E(k,v){if(o.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||ye(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const S=k.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&S===0)return 0;let H=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return S;case"utf8":case"utf-8":return se(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S*2;case"hex":return S>>>1;case"base64":return ge(k).length;default:if(H)return O?-1:se(k).length;v=(""+v).toLowerCase(),H=!0}}o.byteLength=E;function I(k,v,S){let O=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((S===void 0||S>this.length)&&(S=this.length),S<=0)||(S>>>=0,v>>>=0,S<=v))return"";for(k||(k="utf8");;)switch(k){case"hex":return L(this,v,S);case"utf8":case"utf-8":return g(this,v,S);case"ascii":return M(this,v,S);case"latin1":case"binary":return A(this,v,S);case"base64":return q(this,v,S);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,v,S);default:if(O)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),O=!0}}o.prototype._isBuffer=!0;function x(k,v,S){const O=k[v];k[v]=k[S],k[S]=O}o.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let S=0;S<v;S+=2)x(this,S,S+1);return this},o.prototype.swap32=function(){const v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let S=0;S<v;S+=4)x(this,S,S+3),x(this,S+1,S+2);return this},o.prototype.swap64=function(){const v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let S=0;S<v;S+=8)x(this,S,S+7),x(this,S+1,S+6),x(this,S+2,S+5),x(this,S+3,S+4);return this},o.prototype.toString=function(){const v=this.length;return v===0?"":arguments.length===0?g(this,0,v):I.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(v){if(!o.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:o.compare(this,v)===0},o.prototype.inspect=function(){let v="";const S=e.INSPECT_MAX_BYTES;return v=this.toString("hex",0,S).replace(/(.{2})/g,"$1 ").trim(),this.length>S&&(v+=" ... "),"<Buffer "+v+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(v,S,O,H,V){if(ye(v,Uint8Array)&&(v=o.from(v,v.offset,v.byteLength)),!o.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(S===void 0&&(S=0),O===void 0&&(O=v?v.length:0),H===void 0&&(H=0),V===void 0&&(V=this.length),S<0||O>v.length||H<0||V>this.length)throw new RangeError("out of range index");if(H>=V&&S>=O)return 0;if(H>=V)return-1;if(S>=O)return 1;if(S>>>=0,O>>>=0,H>>>=0,V>>>=0,this===v)return 0;let z=V-H,he=O-S;const fe=Math.min(z,he),le=this.slice(H,V),be=v.slice(S,O);for(let ce=0;ce<fe;++ce)if(le[ce]!==be[ce]){z=le[ce],he=be[ce];break}return z<he?-1:he<z?1:0};function D(k,v,S,O,H){if(k.length===0)return-1;if(typeof S=="string"?(O=S,S=0):S>2147483647?S=2147483647:S<-2147483648&&(S=-2147483648),S=+S,pe(S)&&(S=H?0:k.length-1),S<0&&(S=k.length+S),S>=k.length){if(H)return-1;S=k.length-1}else if(S<0)if(H)S=0;else return-1;if(typeof v=="string"&&(v=o.from(v,O)),o.isBuffer(v))return v.length===0?-1:F(k,v,S,O,H);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call(k,v,S):Uint8Array.prototype.lastIndexOf.call(k,v,S):F(k,[v],S,O,H);throw new TypeError("val must be string, number or Buffer")}function F(k,v,S,O,H){let V=1,z=k.length,he=v.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(k.length<2||v.length<2)return-1;V=2,z/=2,he/=2,S/=2}function fe(be,ce){return V===1?be[ce]:be.readUInt16BE(ce*V)}let le;if(H){let be=-1;for(le=S;le<z;le++)if(fe(k,le)===fe(v,be===-1?0:le-be)){if(be===-1&&(be=le),le-be+1===he)return be*V}else be!==-1&&(le-=le-be),be=-1}else for(S+he>z&&(S=z-he),le=S;le>=0;le--){let be=!0;for(let ce=0;ce<he;ce++)if(fe(k,le+ce)!==fe(v,ce)){be=!1;break}if(be)return le}return-1}o.prototype.includes=function(v,S,O){return this.indexOf(v,S,O)!==-1},o.prototype.indexOf=function(v,S,O){return D(this,v,S,O,!0)},o.prototype.lastIndexOf=function(v,S,O){return D(this,v,S,O,!1)};function W(k,v,S,O){S=Number(S)||0;const H=k.length-S;O?(O=Number(O),O>H&&(O=H)):O=H;const V=v.length;O>V/2&&(O=V/2);let z;for(z=0;z<O;++z){const he=parseInt(v.substr(z*2,2),16);if(pe(he))return z;k[S+z]=he}return z}function J(k,v,S,O){return ue(se(v,k.length-S),k,S,O)}function ee(k,v,S,O){return ue(de(v),k,S,O)}function Q(k,v,S,O){return ue(ge(v),k,S,O)}function re(k,v,S,O){return ue(He(v,k.length-S),k,S,O)}o.prototype.write=function(v,S,O,H){if(S===void 0)H="utf8",O=this.length,S=0;else if(O===void 0&&typeof S=="string")H=S,O=this.length,S=0;else if(isFinite(S))S=S>>>0,isFinite(O)?(O=O>>>0,H===void 0&&(H="utf8")):(H=O,O=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const V=this.length-S;if((O===void 0||O>V)&&(O=V),v.length>0&&(O<0||S<0)||S>this.length)throw new RangeError("Attempt to write outside buffer bounds");H||(H="utf8");let z=!1;for(;;)switch(H){case"hex":return W(this,v,S,O);case"utf8":case"utf-8":return J(this,v,S,O);case"ascii":case"latin1":case"binary":return ee(this,v,S,O);case"base64":return Q(this,v,S,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,v,S,O);default:if(z)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),z=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(k,v,S){return v===0&&S===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(v,S))}function g(k,v,S){S=Math.min(k.length,S);const O=[];let H=v;for(;H<S;){const V=k[H];let z=null,he=V>239?4:V>223?3:V>191?2:1;if(H+he<=S){let fe,le,be,ce;switch(he){case 1:V<128&&(z=V);break;case 2:fe=k[H+1],(fe&192)===128&&(ce=(V&31)<<6|fe&63,ce>127&&(z=ce));break;case 3:fe=k[H+1],le=k[H+2],(fe&192)===128&&(le&192)===128&&(ce=(V&15)<<12|(fe&63)<<6|le&63,ce>2047&&(ce<55296||ce>57343)&&(z=ce));break;case 4:fe=k[H+1],le=k[H+2],be=k[H+3],(fe&192)===128&&(le&192)===128&&(be&192)===128&&(ce=(V&15)<<18|(fe&63)<<12|(le&63)<<6|be&63,ce>65535&&ce<1114112&&(z=ce))}}z===null?(z=65533,he=1):z>65535&&(z-=65536,O.push(z>>>10&1023|55296),z=56320|z&1023),O.push(z),H+=he}return C(O)}const R=4096;function C(k){const v=k.length;if(v<=R)return String.fromCharCode.apply(String,k);let S="",O=0;for(;O<v;)S+=String.fromCharCode.apply(String,k.slice(O,O+=R));return S}function M(k,v,S){let O="";S=Math.min(k.length,S);for(let H=v;H<S;++H)O+=String.fromCharCode(k[H]&127);return O}function A(k,v,S){let O="";S=Math.min(k.length,S);for(let H=v;H<S;++H)O+=String.fromCharCode(k[H]);return O}function L(k,v,S){const O=k.length;(!v||v<0)&&(v=0),(!S||S<0||S>O)&&(S=O);let H="";for(let V=v;V<S;++V)H+=me[k[V]];return H}function j(k,v,S){const O=k.slice(v,S);let H="";for(let V=0;V<O.length-1;V+=2)H+=String.fromCharCode(O[V]+O[V+1]*256);return H}o.prototype.slice=function(v,S){const O=this.length;v=~~v,S=S===void 0?O:~~S,v<0?(v+=O,v<0&&(v=0)):v>O&&(v=O),S<0?(S+=O,S<0&&(S=0)):S>O&&(S=O),S<v&&(S=v);const H=this.subarray(v,S);return Object.setPrototypeOf(H,o.prototype),H};function T(k,v,S){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+v>S)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(v,S,O){v=v>>>0,S=S>>>0,O||T(v,S,this.length);let H=this[v],V=1,z=0;for(;++z<S&&(V*=256);)H+=this[v+z]*V;return H},o.prototype.readUintBE=o.prototype.readUIntBE=function(v,S,O){v=v>>>0,S=S>>>0,O||T(v,S,this.length);let H=this[v+--S],V=1;for(;S>0&&(V*=256);)H+=this[v+--S]*V;return H},o.prototype.readUint8=o.prototype.readUInt8=function(v,S){return v=v>>>0,S||T(v,1,this.length),this[v]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(v,S){return v=v>>>0,S||T(v,2,this.length),this[v]|this[v+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(v,S){return v=v>>>0,S||T(v,2,this.length),this[v]<<8|this[v+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(v,S){return v=v>>>0,S||T(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(v,S){return v=v>>>0,S||T(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},o.prototype.readBigUInt64LE=$e(function(v){v=v>>>0,Z(v,"offset");const S=this[v],O=this[v+7];(S===void 0||O===void 0)&&K(v,this.length-8);const H=S+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,V=this[++v]+this[++v]*2**8+this[++v]*2**16+O*2**24;return BigInt(H)+(BigInt(V)<<BigInt(32))}),o.prototype.readBigUInt64BE=$e(function(v){v=v>>>0,Z(v,"offset");const S=this[v],O=this[v+7];(S===void 0||O===void 0)&&K(v,this.length-8);const H=S*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],V=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+O;return(BigInt(H)<<BigInt(32))+BigInt(V)}),o.prototype.readIntLE=function(v,S,O){v=v>>>0,S=S>>>0,O||T(v,S,this.length);let H=this[v],V=1,z=0;for(;++z<S&&(V*=256);)H+=this[v+z]*V;return V*=128,H>=V&&(H-=Math.pow(2,8*S)),H},o.prototype.readIntBE=function(v,S,O){v=v>>>0,S=S>>>0,O||T(v,S,this.length);let H=S,V=1,z=this[v+--H];for(;H>0&&(V*=256);)z+=this[v+--H]*V;return V*=128,z>=V&&(z-=Math.pow(2,8*S)),z},o.prototype.readInt8=function(v,S){return v=v>>>0,S||T(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},o.prototype.readInt16LE=function(v,S){v=v>>>0,S||T(v,2,this.length);const O=this[v]|this[v+1]<<8;return O&32768?O|4294901760:O},o.prototype.readInt16BE=function(v,S){v=v>>>0,S||T(v,2,this.length);const O=this[v+1]|this[v]<<8;return O&32768?O|4294901760:O},o.prototype.readInt32LE=function(v,S){return v=v>>>0,S||T(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},o.prototype.readInt32BE=function(v,S){return v=v>>>0,S||T(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},o.prototype.readBigInt64LE=$e(function(v){v=v>>>0,Z(v,"offset");const S=this[v],O=this[v+7];(S===void 0||O===void 0)&&K(v,this.length-8);const H=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(O<<24);return(BigInt(H)<<BigInt(32))+BigInt(S+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24)}),o.prototype.readBigInt64BE=$e(function(v){v=v>>>0,Z(v,"offset");const S=this[v],O=this[v+7];(S===void 0||O===void 0)&&K(v,this.length-8);const H=(S<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(H)<<BigInt(32))+BigInt(this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+O)}),o.prototype.readFloatLE=function(v,S){return v=v>>>0,S||T(v,4,this.length),n.read(this,v,!0,23,4)},o.prototype.readFloatBE=function(v,S){return v=v>>>0,S||T(v,4,this.length),n.read(this,v,!1,23,4)},o.prototype.readDoubleLE=function(v,S){return v=v>>>0,S||T(v,8,this.length),n.read(this,v,!0,52,8)},o.prototype.readDoubleBE=function(v,S){return v=v>>>0,S||T(v,8,this.length),n.read(this,v,!1,52,8)};function w(k,v,S,O,H,V){if(!o.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>H||v<V)throw new RangeError('"value" argument is out of bounds');if(S+O>k.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(v,S,O,H){if(v=+v,S=S>>>0,O=O>>>0,!H){const he=Math.pow(2,8*O)-1;w(this,v,S,O,he,0)}let V=1,z=0;for(this[S]=v&255;++z<O&&(V*=256);)this[S+z]=v/V&255;return S+O},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(v,S,O,H){if(v=+v,S=S>>>0,O=O>>>0,!H){const he=Math.pow(2,8*O)-1;w(this,v,S,O,he,0)}let V=O-1,z=1;for(this[S+V]=v&255;--V>=0&&(z*=256);)this[S+V]=v/z&255;return S+O},o.prototype.writeUint8=o.prototype.writeUInt8=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,1,255,0),this[S]=v&255,S+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,2,65535,0),this[S]=v&255,this[S+1]=v>>>8,S+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,2,65535,0),this[S]=v>>>8,this[S+1]=v&255,S+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,4,4294967295,0),this[S+3]=v>>>24,this[S+2]=v>>>16,this[S+1]=v>>>8,this[S]=v&255,S+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,4,4294967295,0),this[S]=v>>>24,this[S+1]=v>>>16,this[S+2]=v>>>8,this[S+3]=v&255,S+4};function N(k,v,S,O,H){P(v,O,H,k,S,7);let V=Number(v&BigInt(4294967295));k[S++]=V,V=V>>8,k[S++]=V,V=V>>8,k[S++]=V,V=V>>8,k[S++]=V;let z=Number(v>>BigInt(32)&BigInt(4294967295));return k[S++]=z,z=z>>8,k[S++]=z,z=z>>8,k[S++]=z,z=z>>8,k[S++]=z,S}function te(k,v,S,O,H){P(v,O,H,k,S,7);let V=Number(v&BigInt(4294967295));k[S+7]=V,V=V>>8,k[S+6]=V,V=V>>8,k[S+5]=V,V=V>>8,k[S+4]=V;let z=Number(v>>BigInt(32)&BigInt(4294967295));return k[S+3]=z,z=z>>8,k[S+2]=z,z=z>>8,k[S+1]=z,z=z>>8,k[S]=z,S+8}o.prototype.writeBigUInt64LE=$e(function(v,S=0){return N(this,v,S,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=$e(function(v,S=0){return te(this,v,S,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(v,S,O,H){if(v=+v,S=S>>>0,!H){const fe=Math.pow(2,8*O-1);w(this,v,S,O,fe-1,-fe)}let V=0,z=1,he=0;for(this[S]=v&255;++V<O&&(z*=256);)v<0&&he===0&&this[S+V-1]!==0&&(he=1),this[S+V]=(v/z>>0)-he&255;return S+O},o.prototype.writeIntBE=function(v,S,O,H){if(v=+v,S=S>>>0,!H){const fe=Math.pow(2,8*O-1);w(this,v,S,O,fe-1,-fe)}let V=O-1,z=1,he=0;for(this[S+V]=v&255;--V>=0&&(z*=256);)v<0&&he===0&&this[S+V+1]!==0&&(he=1),this[S+V]=(v/z>>0)-he&255;return S+O},o.prototype.writeInt8=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,1,127,-128),v<0&&(v=255+v+1),this[S]=v&255,S+1},o.prototype.writeInt16LE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,2,32767,-32768),this[S]=v&255,this[S+1]=v>>>8,S+2},o.prototype.writeInt16BE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,2,32767,-32768),this[S]=v>>>8,this[S+1]=v&255,S+2},o.prototype.writeInt32LE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,4,2147483647,-2147483648),this[S]=v&255,this[S+1]=v>>>8,this[S+2]=v>>>16,this[S+3]=v>>>24,S+4},o.prototype.writeInt32BE=function(v,S,O){return v=+v,S=S>>>0,O||w(this,v,S,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[S]=v>>>24,this[S+1]=v>>>16,this[S+2]=v>>>8,this[S+3]=v&255,S+4},o.prototype.writeBigInt64LE=$e(function(v,S=0){return N(this,v,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=$e(function(v,S=0){return te(this,v,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Y(k,v,S,O,H,V){if(S+O>k.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("Index out of range")}function U(k,v,S,O,H){return v=+v,S=S>>>0,H||Y(k,v,S,4),n.write(k,v,S,O,23,4),S+4}o.prototype.writeFloatLE=function(v,S,O){return U(this,v,S,!0,O)},o.prototype.writeFloatBE=function(v,S,O){return U(this,v,S,!1,O)};function $(k,v,S,O,H){return v=+v,S=S>>>0,H||Y(k,v,S,8),n.write(k,v,S,O,52,8),S+8}o.prototype.writeDoubleLE=function(v,S,O){return $(this,v,S,!0,O)},o.prototype.writeDoubleBE=function(v,S,O){return $(this,v,S,!1,O)},o.prototype.copy=function(v,S,O,H){if(!o.isBuffer(v))throw new TypeError("argument should be a Buffer");if(O||(O=0),!H&&H!==0&&(H=this.length),S>=v.length&&(S=v.length),S||(S=0),H>0&&H<O&&(H=O),H===O||v.length===0||this.length===0)return 0;if(S<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");H>this.length&&(H=this.length),v.length-S<H-O&&(H=v.length-S+O);const V=H-O;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(S,O,H):Uint8Array.prototype.set.call(v,this.subarray(O,H),S),V},o.prototype.fill=function(v,S,O,H){if(typeof v=="string"){if(typeof S=="string"?(H=S,S=0,O=this.length):typeof O=="string"&&(H=O,O=this.length),H!==void 0&&typeof H!="string")throw new TypeError("encoding must be a string");if(typeof H=="string"&&!o.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(v.length===1){const z=v.charCodeAt(0);(H==="utf8"&&z<128||H==="latin1")&&(v=z)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(S<0||this.length<S||this.length<O)throw new RangeError("Out of range index");if(O<=S)return this;S=S>>>0,O=O===void 0?this.length:O>>>0,v||(v=0);let V;if(typeof v=="number")for(V=S;V<O;++V)this[V]=v;else{const z=o.isBuffer(v)?v:o.from(v,H),he=z.length;if(he===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(V=0;V<O-S;++V)this[V+S]=z[V%he]}return this};const G={};function X(k,v,S){G[k]=class extends S{constructor(){super(),Object.defineProperty(this,"message",{value:v.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}X("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),X("ERR_INVALID_ARG_TYPE",function(k,v){return`The "${k}" argument must be of type number. Received type ${typeof v}`},TypeError),X("ERR_OUT_OF_RANGE",function(k,v,S){let O=`The value of "${k}" is out of range.`,H=S;return Number.isInteger(S)&&Math.abs(S)>2**32?H=ne(String(S)):typeof S=="bigint"&&(H=String(S),(S>BigInt(2)**BigInt(32)||S<-(BigInt(2)**BigInt(32)))&&(H=ne(H)),H+="n"),O+=` It must be ${v}. Received ${H}`,O},RangeError);function ne(k){let v="",S=k.length;const O=k[0]==="-"?1:0;for(;S>=O+4;S-=3)v=`_${k.slice(S-3,S)}${v}`;return`${k.slice(0,S)}${v}`}function B(k,v,S){Z(v,"offset"),(k[v]===void 0||k[v+S]===void 0)&&K(v,k.length-(S+1))}function P(k,v,S,O,H,V){if(k>S||k<v){const z=typeof v=="bigint"?"n":"";let he;throw v===0||v===BigInt(0)?he=`>= 0${z} and < 2${z} ** ${(V+1)*8}${z}`:he=`>= -(2${z} ** ${(V+1)*8-1}${z}) and < 2 ** ${(V+1)*8-1}${z}`,new G.ERR_OUT_OF_RANGE("value",he,k)}B(O,H,V)}function Z(k,v){if(typeof k!="number")throw new G.ERR_INVALID_ARG_TYPE(v,"number",k)}function K(k,v,S){throw Math.floor(k)!==k?(Z(k,S),new G.ERR_OUT_OF_RANGE("offset","an integer",k)):v<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${v}`,k)}const oe=/[^+/0-9A-Za-z-_]/g;function ie(k){if(k=k.split("=")[0],k=k.trim().replace(oe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function se(k,v){v=v||1/0;let S;const O=k.length;let H=null;const V=[];for(let z=0;z<O;++z){if(S=k.charCodeAt(z),S>55295&&S<57344){if(!H){if(S>56319){(v-=3)>-1&&V.push(239,191,189);continue}else if(z+1===O){(v-=3)>-1&&V.push(239,191,189);continue}H=S;continue}if(S<56320){(v-=3)>-1&&V.push(239,191,189),H=S;continue}S=(H-55296<<10|S-56320)+65536}else H&&(v-=3)>-1&&V.push(239,191,189);if(H=null,S<128){if((v-=1)<0)break;V.push(S)}else if(S<2048){if((v-=2)<0)break;V.push(S>>6|192,S&63|128)}else if(S<65536){if((v-=3)<0)break;V.push(S>>12|224,S>>6&63|128,S&63|128)}else if(S<1114112){if((v-=4)<0)break;V.push(S>>18|240,S>>12&63|128,S>>6&63|128,S&63|128)}else throw new Error("Invalid code point")}return V}function de(k){const v=[];for(let S=0;S<k.length;++S)v.push(k.charCodeAt(S)&255);return v}function He(k,v){let S,O,H;const V=[];for(let z=0;z<k.length&&!((v-=2)<0);++z)S=k.charCodeAt(z),O=S>>8,H=S%256,V.push(H),V.push(O);return V}function ge(k){return t.toByteArray(ie(k))}function ue(k,v,S,O){let H;for(H=0;H<O&&!(H+S>=v.length||H>=k.length);++H)v[H+S]=k[H];return H}function ye(k,v){return k instanceof v||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===v.name}function pe(k){return k!==k}const me=(function(){const k="0123456789abcdef",v=new Array(256);for(let S=0;S<16;++S){const O=S*16;for(let H=0;H<16;++H)v[O+H]=k[S]+k[H]}return v})();function $e(k){return typeof BigInt>"u"?ve:k}function ve(){throw new Error("BigInt not supported")}})(ri)),ri}var au;function ct(){return au||(au=1,(function(e,t){var n=Dn(),r=n.Buffer;function h(a,o){for(var d in a)o[d]=a[d]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(h(n,t),t.Buffer=i);function i(a,o,d){return r(a,o,d)}i.prototype=Object.create(r.prototype),h(r,i),i.from=function(a,o,d){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,o,d)},i.alloc=function(a,o,d){if(typeof a!="number")throw new TypeError("Argument must be a number");var c=r(a);return o!==void 0?typeof d=="string"?c.fill(o,d):c.fill(o):c.fill(0),c},i.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},i.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(a)}})(pn,pn.exports)),pn.exports}var ni,uu;function f0(){if(uu)return ni;uu=1;var e={}.toString;return ni=Array.isArray||function(t){return e.call(t)=="[object Array]"},ni}var ii,cu;function tn(){return cu||(cu=1,ii=TypeError),ii}var si,lu;function Nh(){return lu||(lu=1,si=Object),si}var oi,fu;function h0(){return fu||(fu=1,oi=Error),oi}var ai,hu;function d0(){return hu||(hu=1,ai=EvalError),ai}var ui,du;function p0(){return du||(du=1,ui=RangeError),ui}var ci,pu;function g0(){return pu||(pu=1,ci=ReferenceError),ci}var li,gu;function Oh(){return gu||(gu=1,li=SyntaxError),li}var fi,mu;function m0(){return mu||(mu=1,fi=URIError),fi}var hi,yu;function y0(){return yu||(yu=1,hi=Math.abs),hi}var di,_u;function _0(){return _u||(_u=1,di=Math.floor),di}var pi,vu;function v0(){return vu||(vu=1,pi=Math.max),pi}var gi,bu;function b0(){return bu||(bu=1,gi=Math.min),gi}var mi,wu;function w0(){return wu||(wu=1,mi=Math.pow),mi}var yi,Eu;function E0(){return Eu||(Eu=1,yi=Math.round),yi}var _i,Ru;function R0(){return Ru||(Ru=1,_i=Number.isNaN||function(t){return t!==t}),_i}var vi,Su;function S0(){if(Su)return vi;Su=1;var e=R0();return vi=function(n){return e(n)||n===0?n:n<0?-1:1},vi}var bi,Cu;function C0(){return Cu||(Cu=1,bi=Object.getOwnPropertyDescriptor),bi}var wi,Mu;function rn(){if(Mu)return wi;Mu=1;var e=C0();if(e)try{e([],"length")}catch{e=null}return wi=e,wi}var Ei,ku;function jn(){if(ku)return Ei;ku=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Ei=e,Ei}var Ri,Iu;function Fh(){return Iu||(Iu=1,Ri=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var h=42;t[n]=h;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,n);if(o.value!==h||o.enumerable!==!0)return!1}return!0}),Ri}var Si,Au;function M0(){if(Au)return Si;Au=1;var e=typeof Symbol<"u"&&Symbol,t=Fh();return Si=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Si}var Ci,xu;function qh(){return xu||(xu=1,Ci=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ci}var Mi,Tu;function Dh(){if(Tu)return Mi;Tu=1;var e=Nh();return Mi=e.getPrototypeOf||null,Mi}var ki,Bu;function k0(){if(Bu)return ki;Bu=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",h=function(d,c){for(var p=[],s=0;s<d.length;s+=1)p[s]=d[s];for(var f=0;f<c.length;f+=1)p[f+d.length]=c[f];return p},i=function(d,c){for(var p=[],s=c,f=0;s<d.length;s+=1,f+=1)p[f]=d[s];return p},a=function(o,d){for(var c="",p=0;p<o.length;p+=1)c+=o[p],p+1<o.length&&(c+=d);return c};return ki=function(d){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var p=i(arguments,1),s,f=function(){if(this instanceof s){var l=c.apply(this,h(p,arguments));return Object(l)===l?l:this}return c.apply(d,h(p,arguments))},u=n(0,c.length-p.length),m=[],_=0;_<u;_++)m[_]="$"+_;if(s=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var y=function(){};y.prototype=c.prototype,s.prototype=new y,y.prototype=null}return s},ki}var Ii,Pu;function nn(){if(Pu)return Ii;Pu=1;var e=k0();return Ii=Function.prototype.bind||e,Ii}var Ai,Lu;function pa(){return Lu||(Lu=1,Ai=Function.prototype.call),Ai}var xi,Nu;function ga(){return Nu||(Nu=1,xi=Function.prototype.apply),xi}var Ti,Ou;function I0(){return Ou||(Ou=1,Ti=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ti}var Bi,Fu;function jh(){if(Fu)return Bi;Fu=1;var e=nn(),t=ga(),n=pa(),r=I0();return Bi=r||e.call(n,t),Bi}var Pi,qu;function ma(){if(qu)return Pi;qu=1;var e=nn(),t=tn(),n=pa(),r=jh();return Pi=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Pi}var Li,Du;function A0(){if(Du)return Li;Du=1;var e=ma(),t=rn(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),h=Object,i=h.getPrototypeOf;return Li=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(o){return i(o==null?o:h(o))}:!1,Li}var Ni,ju;function Uh(){if(ju)return Ni;ju=1;var e=qh(),t=Dh(),n=A0();return Ni=e?function(h){return e(h)}:t?function(h){if(!h||typeof h!="object"&&typeof h!="function")throw new TypeError("getProto: not an object");return t(h)}:n?function(h){return n(h)}:null,Ni}var Oi,Uu;function x0(){if(Uu)return Oi;Uu=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=nn();return Oi=n.call(e,t),Oi}var Fi,Hu;function Hh(){if(Hu)return Fi;Hu=1;var e,t=Nh(),n=h0(),r=d0(),h=p0(),i=g0(),a=Oh(),o=tn(),d=m0(),c=y0(),p=_0(),s=v0(),f=b0(),u=w0(),m=E0(),_=S0(),y=Function,l=function(X){try{return y('"use strict"; return ('+X+").constructor;")()}catch{}},b=rn(),E=jn(),I=function(){throw new o},x=b?(function(){try{return arguments.callee,I}catch{try{return b(arguments,"callee").get}catch{return I}}})():I,D=M0()(),F=Uh(),W=Dh(),J=qh(),ee=ga(),Q=pa(),re={},q=typeof Uint8Array>"u"||!F?e:F(Uint8Array),g={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":D&&F?F([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":re,"%AsyncGenerator%":re,"%AsyncGeneratorFunction%":re,"%AsyncIteratorPrototype%":re,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":re,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D&&F?F(F([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!D||!F?e:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":h,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!D||!F?e:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D&&F?F(""[Symbol.iterator]()):e,"%Symbol%":D?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":x,"%TypedArray%":q,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":Q,"%Function.prototype.apply%":ee,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":W,"%Math.abs%":c,"%Math.floor%":p,"%Math.max%":s,"%Math.min%":f,"%Math.pow%":u,"%Math.round%":m,"%Math.sign%":_,"%Reflect.getPrototypeOf%":J};if(F)try{null.error}catch(X){var R=F(F(X));g["%Error.prototype%"]=R}var C=function X(ne){var B;if(ne==="%AsyncFunction%")B=l("async function () {}");else if(ne==="%GeneratorFunction%")B=l("function* () {}");else if(ne==="%AsyncGeneratorFunction%")B=l("async function* () {}");else if(ne==="%AsyncGenerator%"){var P=X("%AsyncGeneratorFunction%");P&&(B=P.prototype)}else if(ne==="%AsyncIteratorPrototype%"){var Z=X("%AsyncGenerator%");Z&&F&&(B=F(Z.prototype))}return g[ne]=B,B},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=nn(),L=x0(),j=A.call(Q,Array.prototype.concat),T=A.call(ee,Array.prototype.splice),w=A.call(Q,String.prototype.replace),N=A.call(Q,String.prototype.slice),te=A.call(Q,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,$=function(ne){var B=N(ne,0,1),P=N(ne,-1);if(B==="%"&&P!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(P==="%"&&B!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var Z=[];return w(ne,Y,function(K,oe,ie,se){Z[Z.length]=ie?w(se,U,"$1"):oe||K}),Z},G=function(ne,B){var P=ne,Z;if(L(M,P)&&(Z=M[P],P="%"+Z[0]+"%"),L(g,P)){var K=g[P];if(K===re&&(K=C(P)),typeof K>"u"&&!B)throw new o("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:Z,name:P,value:K}}throw new a("intrinsic "+ne+" does not exist!")};return Fi=function(ne,B){if(typeof ne!="string"||ne.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof B!="boolean")throw new o('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,ne)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var P=$(ne),Z=P.length>0?P[0]:"",K=G("%"+Z+"%",B),oe=K.name,ie=K.value,se=!1,de=K.alias;de&&(Z=de[0],T(P,j([0,1],de)));for(var He=1,ge=!0;He<P.length;He+=1){var ue=P[He],ye=N(ue,0,1),pe=N(ue,-1);if((ye==='"'||ye==="'"||ye==="`"||pe==='"'||pe==="'"||pe==="`")&&ye!==pe)throw new a("property names with quotes must have matching quotes");if((ue==="constructor"||!ge)&&(se=!0),Z+="."+ue,oe="%"+Z+"%",L(g,oe))ie=g[oe];else if(ie!=null){if(!(ue in ie)){if(!B)throw new o("base intrinsic for "+ne+" exists, but the property is not available.");return}if(b&&He+1>=P.length){var me=b(ie,ue);ge=!!me,ge&&"get"in me&&!("originalValue"in me.get)?ie=me.get:ie=ie[ue]}else ge=L(ie,ue),ie=ie[ue];ge&&!se&&(g[oe]=ie)}}return ie},Fi}var qi,Wu;function Wh(){if(Wu)return qi;Wu=1;var e=Hh(),t=ma(),n=t([e("%String.prototype.indexOf%")]);return qi=function(h,i){var a=e(h,!!i);return typeof a=="function"&&n(h,".prototype.")>-1?t([a]):a},qi}var Di,$u;function T0(){if($u)return Di;$u=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,n)}catch(b){b!==r&&(t=null)}else t=null;var h=/^\s*class\b/,i=function(E){try{var I=e.call(E);return h.test(I)}catch{return!1}},a=function(E){try{return i(E)?!1:(e.call(E),!0)}catch{return!1}},o=Object.prototype.toString,d="[object Object]",c="[object Function]",p="[object GeneratorFunction]",s="[object HTMLAllCollection]",f="[object HTML document.all class]",u="[object HTMLCollection]",m=typeof Symbol=="function"&&!!Symbol.toStringTag,_=!(0 in[,]),y=function(){return!1};if(typeof document=="object"){var l=document.all;o.call(l)===o.call(document.all)&&(y=function(E){if((_||!E)&&(typeof E>"u"||typeof E=="object"))try{var I=o.call(E);return(I===s||I===f||I===u||I===d)&&E("")==null}catch{}return!1})}return Di=t?function(E){if(y(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;try{t(E,null,n)}catch(I){if(I!==r)return!1}return!i(E)&&a(E)}:function(E){if(y(E))return!0;if(!E||typeof E!="function"&&typeof E!="object")return!1;if(m)return a(E);if(i(E))return!1;var I=o.call(E);return I!==c&&I!==p&&!/^\[object HTML/.test(I)?!1:a(E)},Di}var ji,Vu;function B0(){if(Vu)return ji;Vu=1;var e=T0(),t=Object.prototype.toString,n=Object.prototype.hasOwnProperty,r=function(d,c,p){for(var s=0,f=d.length;s<f;s++)n.call(d,s)&&(p==null?c(d[s],s,d):c.call(p,d[s],s,d))},h=function(d,c,p){for(var s=0,f=d.length;s<f;s++)p==null?c(d.charAt(s),s,d):c.call(p,d.charAt(s),s,d)},i=function(d,c,p){for(var s in d)n.call(d,s)&&(p==null?c(d[s],s,d):c.call(p,d[s],s,d))};function a(o){return t.call(o)==="[object Array]"}return ji=function(d,c,p){if(!e(c))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=p),a(d)?r(d,c,s):typeof d=="string"?h(d,c,s):i(d,c,s)},ji}var Ui,zu;function P0(){return zu||(zu=1,Ui=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Ui}var Hi,Gu;function L0(){if(Gu)return Hi;Gu=1;var e=P0(),t=typeof globalThis>"u"?ft:globalThis;return Hi=function(){for(var r=[],h=0;h<e.length;h++)typeof t[e[h]]=="function"&&(r[r.length]=e[h]);return r},Hi}var Wi={exports:{}},$i,Ju;function N0(){if(Ju)return $i;Ju=1;var e=jn(),t=Oh(),n=tn(),r=rn();return $i=function(i,a,o){if(!i||typeof i!="object"&&typeof i!="function")throw new n("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var d=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,f=!!r&&r(i,a);if(e)e(i,a,{configurable:p===null&&f?f.configurable:!p,enumerable:d===null&&f?f.enumerable:!d,value:o,writable:c===null&&f?f.writable:!c});else if(s||!d&&!c&&!p)i[a]=o;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},$i}var Vi,Zu;function O0(){if(Zu)return Vi;Zu=1;var e=jn(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Vi=t,Vi}var zi,Ku;function F0(){if(Ku)return zi;Ku=1;var e=Hh(),t=N0(),n=O0()(),r=rn(),h=tn(),i=e("%Math.floor%");return zi=function(o,d){if(typeof o!="function")throw new h("`fn` is not a function");if(typeof d!="number"||d<0||d>4294967295||i(d)!==d)throw new h("`length` must be a positive 32-bit integer");var c=arguments.length>2&&!!arguments[2],p=!0,s=!0;if("length"in o&&r){var f=r(o,"length");f&&!f.configurable&&(p=!1),f&&!f.writable&&(s=!1)}return(p||s||!c)&&(n?t(o,"length",d,!0,!0):t(o,"length",d)),o},zi}var Gi,Qu;function q0(){if(Qu)return Gi;Qu=1;var e=nn(),t=ga(),n=jh();return Gi=function(){return n(e,t,arguments)},Gi}var Yu;function D0(){return Yu||(Yu=1,(function(e){var t=F0(),n=jn(),r=ma(),h=q0();e.exports=function(a){var o=r(arguments),d=a.length-(arguments.length-1);return t(o,1+(d>0?d:0),!0)},n?n(e.exports,"apply",{value:h}):e.exports.apply=h})(Wi)),Wi.exports}var Ji,Xu;function j0(){if(Xu)return Ji;Xu=1;var e=Fh();return Ji=function(){return e()&&!!Symbol.toStringTag},Ji}var Zi,ec;function U0(){if(ec)return Zi;ec=1;var e=B0(),t=L0(),n=D0(),r=Wh(),h=rn(),i=Uh(),a=r("Object.prototype.toString"),o=j0()(),d=typeof globalThis>"u"?ft:globalThis,c=t(),p=r("String.prototype.slice"),s=r("Array.prototype.indexOf",!0)||function(y,l){for(var b=0;b<y.length;b+=1)if(y[b]===l)return b;return-1},f={__proto__:null};o&&h&&i?e(c,function(_){var y=new d[_];if(Symbol.toStringTag in y&&i){var l=i(y),b=h(l,Symbol.toStringTag);if(!b&&l){var E=i(l);b=h(E,Symbol.toStringTag)}f["$"+_]=n(b.get)}}):e(c,function(_){var y=new d[_],l=y.slice||y.set;l&&(f["$"+_]=n(l))});var u=function(y){var l=!1;return e(f,function(b,E){if(!l)try{"$"+b(y)===E&&(l=p(E,1))}catch{}}),l},m=function(y){var l=!1;return e(f,function(b,E){if(!l)try{b(y),l=p(E,1)}catch{}}),l};return Zi=function(y){if(!y||typeof y!="object")return!1;if(!o){var l=p(a(y),8,-1);return s(c,l)>-1?l:l!=="Object"?!1:m(y)}return h?u(y):null},Zi}var Ki,tc;function H0(){if(tc)return Ki;tc=1;var e=U0();return Ki=function(n){return!!e(n)},Ki}var Qi,rc;function W0(){if(rc)return Qi;rc=1;var e=tn(),t=Wh(),n=t("TypedArray.prototype.buffer",!0),r=H0();return Qi=n||function(i){if(!r(i))throw new e("Not a Typed Array");return i.buffer},Qi}var Yi,nc;function $0(){if(nc)return Yi;nc=1;var e=ct().Buffer,t=f0(),n=W0(),r=ArrayBuffer.isView||function(d){try{return n(d),!0}catch{return!1}},h=typeof Uint8Array<"u",i=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",a=i&&(e.prototype instanceof Uint8Array||e.TYPED_ARRAY_SUPPORT);return Yi=function(d,c){if(e.isBuffer(d))return d.constructor&&!("isBuffer"in d)?e.from(d):d;if(typeof d=="string")return e.from(d,c);if(i&&r(d)){if(d.byteLength===0)return e.alloc(0);if(a){var p=e.from(d.buffer,d.byteOffset,d.byteLength);if(p.byteLength===d.byteLength)return p}var s=d instanceof Uint8Array?d:new Uint8Array(d.buffer,d.byteOffset,d.byteLength),f=e.from(s);if(f.length===d.byteLength)return f}if(h&&d instanceof Uint8Array)return e.from(d);var u=t(d);if(u)for(var m=0;m<d.length;m+=1){var _=d[m];if(typeof _!="number"||_<0||_>255||~~_!==_)throw new RangeError("Array items must be numbers in the range 0-255.")}if(u||e.isBuffer(d)&&d.constructor&&typeof d.constructor.isBuffer=="function"&&d.constructor.isBuffer(d))return e.from(d);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},Yi}var Xi,ic;function fr(){if(ic)return Xi;ic=1;var e=ct().Buffer,t=$0();function n(r,h){this._block=e.alloc(r),this._finalSize=h,this._blockSize=r,this._len=0}return n.prototype.update=function(r,h){r=t(r,h||"utf8");for(var i=this._block,a=this._blockSize,o=r.length,d=this._len,c=0;c<o;){for(var p=d%a,s=Math.min(o-c,a-p),f=0;f<s;f++)i[p+f]=r[c+f];d+=s,c+=s,d%a===0&&this._update(i)}return this._len+=o,this},n.prototype.digest=function(r){var h=this._len%this._blockSize;this._block[h]=128,this._block.fill(0,h+1),h>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=this._len*8;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var a=(i&4294967295)>>>0,o=(i-a)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(a,this._blockSize-4)}this._update(this._block);var d=this._hash();return r?d.toString(r):d},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},Xi=n,Xi}var es,sc;function V0(){if(sc)return es;sc=1;var e=tt(),t=fr(),n=ct().Buffer,r=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);function i(){this.init(),this._w=h,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function a(c){return c<<5|c>>>27}function o(c){return c<<30|c>>>2}function d(c,p,s,f){return c===0?p&s|~p&f:c===2?p&s|p&f|s&f:p^s^f}return i.prototype._update=function(c){for(var p=this._w,s=this._a|0,f=this._b|0,u=this._c|0,m=this._d|0,_=this._e|0,y=0;y<16;++y)p[y]=c.readInt32BE(y*4);for(;y<80;++y)p[y]=p[y-3]^p[y-8]^p[y-14]^p[y-16];for(var l=0;l<80;++l){var b=~~(l/20),E=a(s)+d(b,f,u,m)+_+p[l]+r[b]|0;_=m,m=u,u=o(f),f=s,s=E}this._a=s+this._a|0,this._b=f+this._b|0,this._c=u+this._c|0,this._d=m+this._d|0,this._e=_+this._e|0},i.prototype._hash=function(){var c=n.allocUnsafe(20);return c.writeInt32BE(this._a|0,0),c.writeInt32BE(this._b|0,4),c.writeInt32BE(this._c|0,8),c.writeInt32BE(this._d|0,12),c.writeInt32BE(this._e|0,16),c},es=i,es}var ts,oc;function z0(){if(oc)return ts;oc=1;var e=tt(),t=fr(),n=ct().Buffer,r=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);function i(){this.init(),this._w=h,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function a(p){return p<<1|p>>>31}function o(p){return p<<5|p>>>27}function d(p){return p<<30|p>>>2}function c(p,s,f,u){return p===0?s&f|~s&u:p===2?s&f|s&u|f&u:s^f^u}return i.prototype._update=function(p){for(var s=this._w,f=this._a|0,u=this._b|0,m=this._c|0,_=this._d|0,y=this._e|0,l=0;l<16;++l)s[l]=p.readInt32BE(l*4);for(;l<80;++l)s[l]=a(s[l-3]^s[l-8]^s[l-14]^s[l-16]);for(var b=0;b<80;++b){var E=~~(b/20),I=o(f)+c(E,u,m,_)+y+s[b]+r[E]|0;y=_,_=m,m=d(u),u=f,f=I}this._a=f+this._a|0,this._b=u+this._b|0,this._c=m+this._c|0,this._d=_+this._d|0,this._e=y+this._e|0},i.prototype._hash=function(){var p=n.allocUnsafe(20);return p.writeInt32BE(this._a|0,0),p.writeInt32BE(this._b|0,4),p.writeInt32BE(this._c|0,8),p.writeInt32BE(this._d|0,12),p.writeInt32BE(this._e|0,16),p},ts=i,ts}var rs,ac;function $h(){if(ac)return rs;ac=1;var e=tt(),t=fr(),n=ct().Buffer,r=[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],h=new Array(64);function i(){this.init(),this._w=h,t.call(this,64,56)}e(i,t),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function a(f,u,m){return m^f&(u^m)}function o(f,u,m){return f&u|m&(f|u)}function d(f){return(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10)}function c(f){return(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7)}function p(f){return(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3}function s(f){return(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10}return i.prototype._update=function(f){for(var u=this._w,m=this._a|0,_=this._b|0,y=this._c|0,l=this._d|0,b=this._e|0,E=this._f|0,I=this._g|0,x=this._h|0,D=0;D<16;++D)u[D]=f.readInt32BE(D*4);for(;D<64;++D)u[D]=s(u[D-2])+u[D-7]+p(u[D-15])+u[D-16]|0;for(var F=0;F<64;++F){var W=x+c(b)+a(b,E,I)+r[F]+u[F]|0,J=d(m)+o(m,_,y)|0;x=I,I=E,E=b,b=l+W|0,l=y,y=_,_=m,m=W+J|0}this._a=m+this._a|0,this._b=_+this._b|0,this._c=y+this._c|0,this._d=l+this._d|0,this._e=b+this._e|0,this._f=E+this._f|0,this._g=I+this._g|0,this._h=x+this._h|0},i.prototype._hash=function(){var f=n.allocUnsafe(32);return f.writeInt32BE(this._a,0),f.writeInt32BE(this._b,4),f.writeInt32BE(this._c,8),f.writeInt32BE(this._d,12),f.writeInt32BE(this._e,16),f.writeInt32BE(this._f,20),f.writeInt32BE(this._g,24),f.writeInt32BE(this._h,28),f},rs=i,rs}var ns,uc;function G0(){if(uc)return ns;uc=1;var e=tt(),t=$h(),n=fr(),r=ct().Buffer,h=new Array(64);function i(){this.init(),this._w=h,n.call(this,64,56)}return e(i,t),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var a=r.allocUnsafe(28);return a.writeInt32BE(this._a,0),a.writeInt32BE(this._b,4),a.writeInt32BE(this._c,8),a.writeInt32BE(this._d,12),a.writeInt32BE(this._e,16),a.writeInt32BE(this._f,20),a.writeInt32BE(this._g,24),a},ns=i,ns}var is,cc;function Vh(){if(cc)return is;cc=1;var e=tt(),t=fr(),n=ct().Buffer,r=[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],h=new Array(160);function i(){this.init(),this._w=h,t.call(this,128,112)}e(i,t),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function a(_,y,l){return l^_&(y^l)}function o(_,y,l){return _&y|l&(_|y)}function d(_,y){return(_>>>28|y<<4)^(y>>>2|_<<30)^(y>>>7|_<<25)}function c(_,y){return(_>>>14|y<<18)^(_>>>18|y<<14)^(y>>>9|_<<23)}function p(_,y){return(_>>>1|y<<31)^(_>>>8|y<<24)^_>>>7}function s(_,y){return(_>>>1|y<<31)^(_>>>8|y<<24)^(_>>>7|y<<25)}function f(_,y){return(_>>>19|y<<13)^(y>>>29|_<<3)^_>>>6}function u(_,y){return(_>>>19|y<<13)^(y>>>29|_<<3)^(_>>>6|y<<26)}function m(_,y){return _>>>0<y>>>0?1:0}return i.prototype._update=function(_){for(var y=this._w,l=this._ah|0,b=this._bh|0,E=this._ch|0,I=this._dh|0,x=this._eh|0,D=this._fh|0,F=this._gh|0,W=this._hh|0,J=this._al|0,ee=this._bl|0,Q=this._cl|0,re=this._dl|0,q=this._el|0,g=this._fl|0,R=this._gl|0,C=this._hl|0,M=0;M<32;M+=2)y[M]=_.readInt32BE(M*4),y[M+1]=_.readInt32BE(M*4+4);for(;M<160;M+=2){var A=y[M-30],L=y[M-30+1],j=p(A,L),T=s(L,A);A=y[M-4],L=y[M-4+1];var w=f(A,L),N=u(L,A),te=y[M-14],Y=y[M-14+1],U=y[M-32],$=y[M-32+1],G=T+Y|0,X=j+te+m(G,T)|0;G=G+N|0,X=X+w+m(G,N)|0,G=G+$|0,X=X+U+m(G,$)|0,y[M]=X,y[M+1]=G}for(var ne=0;ne<160;ne+=2){X=y[ne],G=y[ne+1];var B=o(l,b,E),P=o(J,ee,Q),Z=d(l,J),K=d(J,l),oe=c(x,q),ie=c(q,x),se=r[ne],de=r[ne+1],He=a(x,D,F),ge=a(q,g,R),ue=C+ie|0,ye=W+oe+m(ue,C)|0;ue=ue+ge|0,ye=ye+He+m(ue,ge)|0,ue=ue+de|0,ye=ye+se+m(ue,de)|0,ue=ue+G|0,ye=ye+X+m(ue,G)|0;var pe=K+P|0,me=Z+B+m(pe,K)|0;W=F,C=R,F=D,R=g,D=x,g=q,q=re+ue|0,x=I+ye+m(q,re)|0,I=E,re=Q,E=b,Q=ee,b=l,ee=J,J=ue+pe|0,l=ye+me+m(J,ue)|0}this._al=this._al+J|0,this._bl=this._bl+ee|0,this._cl=this._cl+Q|0,this._dl=this._dl+re|0,this._el=this._el+q|0,this._fl=this._fl+g|0,this._gl=this._gl+R|0,this._hl=this._hl+C|0,this._ah=this._ah+l+m(this._al,J)|0,this._bh=this._bh+b+m(this._bl,ee)|0,this._ch=this._ch+E+m(this._cl,Q)|0,this._dh=this._dh+I+m(this._dl,re)|0,this._eh=this._eh+x+m(this._el,q)|0,this._fh=this._fh+D+m(this._fl,g)|0,this._gh=this._gh+F+m(this._gl,R)|0,this._hh=this._hh+W+m(this._hl,C)|0},i.prototype._hash=function(){var _=n.allocUnsafe(64);function y(l,b,E){_.writeInt32BE(l,E),_.writeInt32BE(b,E+4)}return y(this._ah,this._al,0),y(this._bh,this._bl,8),y(this._ch,this._cl,16),y(this._dh,this._dl,24),y(this._eh,this._el,32),y(this._fh,this._fl,40),y(this._gh,this._gl,48),y(this._hh,this._hl,56),_},is=i,is}var ss,lc;function J0(){if(lc)return ss;lc=1;var e=tt(),t=Vh(),n=fr(),r=ct().Buffer,h=new Array(160);function i(){this.init(),this._w=h,n.call(this,128,112)}return e(i,t),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){var a=r.allocUnsafe(48);function o(d,c,p){a.writeInt32BE(d,p),a.writeInt32BE(c,p+4)}return o(this._ah,this._al,0),o(this._bh,this._bl,8),o(this._ch,this._cl,16),o(this._dh,this._dl,24),o(this._eh,this._el,32),o(this._fh,this._fl,40),a},ss=i,ss}var fc;function Z0(){return fc||(fc=1,(function(e){e.exports=function(n){var r=n.toLowerCase(),h=e.exports[r];if(!h)throw new Error(r+" is not supported (we accept pull requests)");return new h},e.exports.sha=V0(),e.exports.sha1=z0(),e.exports.sha224=G0(),e.exports.sha256=$h(),e.exports.sha384=J0(),e.exports.sha512=Vh()})(ti)),ti.exports}var hc;function ya(){if(hc)return Mr;hc=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.Session=void 0;const e=Z0(),t=ut(),n="session:id",r="session:secret",h="session:linked";let i=class zh{constructor(o,d,c,p){this._storage=o,this._id=d||(0,t.randomBytesHex)(16),this._secret=c||(0,t.randomBytesHex)(32),this._key=new e.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!p}static load(o){const d=o.getItem(n),c=o.getItem(h),p=o.getItem(r);return d&&p?new zh(o,d,p,c==="1"):null}static hash(o){return new e.sha256().update(o).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(o){this._linked=o,this.persistLinked()}save(){return this._storage.setItem(n,this._id),this._storage.setItem(r,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(h,this._linked?"1":"0")}};return Mr.Session=i,Mr}var Ir={},Ar={},dc;function K0(){if(dc)return Ar;dc=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.Cipher=void 0;const e=ut();let t=class{constructor(r){this.secret=r}async encrypt(r){const h=this.secret;if(h.length!==64)throw Error("secret must be 256 bits");const i=crypto.getRandomValues(new Uint8Array(12)),a=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(h),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,d=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},a,o.encode(r)),c=16,p=d.slice(d.byteLength-c),s=d.slice(0,d.byteLength-c),f=new Uint8Array(p),u=new Uint8Array(s),m=new Uint8Array([...i,...f,...u]);return(0,e.uint8ArrayToHex)(m)}async decrypt(r){const h=this.secret;if(h.length!==64)throw Error("secret must be 256 bits");return new Promise((i,a)=>{(async function(){const o=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(h),{name:"aes-gcm"},!1,["encrypt","decrypt"]),d=(0,e.hexStringToUint8Array)(r),c=d.slice(0,12),p=d.slice(12,28),s=d.slice(28),f=new Uint8Array([...s,...p]),u={name:"AES-GCM",iv:new Uint8Array(c)};try{const m=await window.crypto.subtle.decrypt(u,o,f),_=new TextDecoder;i(_.decode(m))}catch(m){a(m)}})()})}};return Ar.Cipher=t,Ar}var xr={},pc;function Q0(){if(pc)return xr;pc=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.WalletLinkHTTP=void 0;let e=class{constructor(n,r,h){this.linkAPIUrl=n,this.sessionId=r;const i=`${r}:${h}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(n){return Promise.all(n.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var n;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:h,error:i}=await r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const a=(n=h?.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&n!==void 0?n:[];return this.markUnseenEventsAsSeen(a),a}throw new Error(`Check unseen events failed: ${r.status}`)}};return xr.WalletLinkHTTP=e,xr}var xt={},gc;function Y0(){if(gc)return xt;gc=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.WalletLinkWebSocket=xt.ConnectionState=void 0;var e;(function(n){n[n.DISCONNECTED=0]="DISCONNECTED",n[n.CONNECTING=1]="CONNECTING",n[n.CONNECTED=2]="CONNECTED"})(e||(xt.ConnectionState=e={}));let t=class{setConnectionStateListener(r){this.connectionStateListener=r}setIncomingDataListener(r){this.incomingDataListener=r}constructor(r,h=WebSocket){this.WebSocketClass=h,this.webSocket=null,this.pendingData=[],this.url=r.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((r,h)=>{var i;let a;try{this.webSocket=a=new this.WebSocketClass(this.url)}catch(o){h(o);return}(i=this.connectionStateListener)===null||i===void 0||i.call(this,e.CONNECTING),a.onclose=o=>{var d;this.clearWebSocket(),h(new Error(`websocket error ${o.code}: ${o.reason}`)),(d=this.connectionStateListener)===null||d===void 0||d.call(this,e.DISCONNECTED)},a.onopen=o=>{var d;r(),(d=this.connectionStateListener)===null||d===void 0||d.call(this,e.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(p=>this.sendData(p)),this.pendingData=[])},a.onmessage=o=>{var d,c;if(o.data==="h")(d=this.incomingDataListener)===null||d===void 0||d.call(this,{type:"Heartbeat"});else try{const p=JSON.parse(o.data);(c=this.incomingDataListener)===null||c===void 0||c.call(this,p)}catch{}}})}disconnect(){var r;const{webSocket:h}=this;if(h){this.clearWebSocket(),(r=this.connectionStateListener)===null||r===void 0||r.call(this,e.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{h.close()}catch{}}}sendData(r){const{webSocket:h}=this;if(!h){this.pendingData.push(r),this.connect();return}h.send(r)}clearWebSocket(){const{webSocket:r}=this;r&&(this.webSocket=null,r.onclose=null,r.onerror=null,r.onmessage=null,r.onopen=null)}};return xt.WalletLinkWebSocket=t,xt}var mc;function X0(){if(mc)return Ir;mc=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.WalletLinkConnection=void 0;const e=qn(),t=K0(),n=ha(),r=da(),h=ya(),i=Q0(),a=Y0(),o=1e4,d=6e4;let c=class{constructor({session:s,linkAPIUrl:f,listener:u,diagnostic:m,WebSocketClass:_=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,e.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=l=>{if(!l)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",E=>l.JsonRpcUrl&&this.handleChainUpdated(E,l.JsonRpcUrl)]]).forEach((E,I)=>{const x=l[I];x!==void 0&&E(x)})},this.handleDestroyed=l=>{var b,E;l==="1"&&((b=this.listener)===null||b===void 0||b.resetAndReload(),(E=this.diagnostic)===null||E===void 0||E.log(n.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:h.Session.hash(this.session.id)}))},this.handleAccountUpdated=async l=>{var b,E;try{const I=await this.cipher.decrypt(l);(b=this.listener)===null||b===void 0||b.accountUpdated(I)}catch{(E=this.diagnostic)===null||E===void 0||E.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(l,b)=>{var E,I;try{const x=await this.cipher.decrypt(b);(E=this.listener)===null||E===void 0||E.metadataUpdated(l,x)}catch{(I=this.diagnostic)===null||I===void 0||I.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:l})}},this.handleWalletUsernameUpdated=async l=>{this.handleMetadataUpdated(r.WALLET_USER_NAME_KEY,l)},this.handleAppVersionUpdated=async l=>{this.handleMetadataUpdated(r.APP_VERSION_KEY,l)},this.handleChainUpdated=async(l,b)=>{var E,I;try{const x=await this.cipher.decrypt(l),D=await this.cipher.decrypt(b);(E=this.listener)===null||E===void 0||E.chainUpdated(x,D)}catch{(I=this.diagnostic)===null||I===void 0||I.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=s,this.cipher=new t.Cipher(s.secret),this.diagnostic=m,this.listener=u;const y=new a.WalletLinkWebSocket(`${f}/rpc`,_);y.setConnectionStateListener(async l=>{var b;(b=this.diagnostic)===null||b===void 0||b.log(n.EVENTS.CONNECTED_STATE_CHANGE,{state:l,sessionIdHash:h.Session.hash(s.id)});let E=!1;switch(l){case a.ConnectionState.DISCONNECTED:if(!this.destroyed){const I=async()=>{await new Promise(x=>setTimeout(x,5e3)),this.destroyed||y.connect().catch(()=>{I()})};I()}break;case a.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),E=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},o),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case a.ConnectionState.CONNECTING:break}this.connected!==E&&(this.connected=E)}),y.setIncomingDataListener(l=>{var b,E,I;switch(l.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const x=l.type==="IsLinkedOK"?l.linked:void 0;(b=this.diagnostic)===null||b===void 0||b.log(n.EVENTS.LINKED,{sessionIdHash:h.Session.hash(s.id),linked:x,type:l.type,onlineGuests:l.onlineGuests}),this.linked=x||l.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(E=this.diagnostic)===null||E===void 0||E.log(n.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:h.Session.hash(s.id),metadata_keys:l&&l.metadata?Object.keys(l.metadata):void 0}),this.handleSessionMetadataUpdated(l.metadata);break}case"Event":{this.handleIncomingEvent(l);break}}l.id!==void 0&&((I=this.requestResolutions.get(l.id))===null||I===void 0||I(l))}),this.ws=y,this.http=new i.WalletLinkHTTP(f,s.id,s.key)}connect(){var s;if(this.destroyed)throw new Error("instance is destroyed");(s=this.diagnostic)===null||s===void 0||s.log(n.EVENTS.STARTED_CONNECTING,{sessionIdHash:h.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var s;this.destroyed=!0,this.ws.disconnect(),(s=this.diagnostic)===null||s===void 0||s.log(n.EVENTS.DISCONNECTED,{sessionIdHash:h.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(s){var f,u;this._connected=s,s&&((f=this.onceConnected)===null||f===void 0||f.call(this)),(u=this.listener)===null||u===void 0||u.connectedUpdated(s)}setOnceConnected(s){return new Promise(f=>{this.connected?s().then(f):this.onceConnected=()=>{s().then(f),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(s){var f,u;this._linked=s,s&&((f=this.onceLinked)===null||f===void 0||f.call(this)),(u=this.listener)===null||u===void 0||u.linkedUpdated(s)}setOnceLinked(s){return new Promise(f=>{this.linked?s().then(f):this.onceLinked=()=>{s().then(f),this.onceLinked=void 0}})}async handleIncomingEvent(s){var f,u;if(!(s.type!=="Event"||s.event!=="Web3Response"))try{const m=await this.cipher.decrypt(s.data),_=JSON.parse(m);if(_.type!=="WEB3_RESPONSE")return;(f=this.listener)===null||f===void 0||f.handleWeb3ResponseMessage(_)}catch{(u=this.diagnostic)===null||u===void 0||u.log(n.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(s=>setTimeout(s,250));try{await this.fetchUnseenEventsAPI()}catch(s){console.error("Unable to check for unseen events",s)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(f=>this.handleIncomingEvent(f))}async setSessionMetadata(s,f){const u={type:"SetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[s]:f}};return this.setOnceConnected(async()=>{const m=await this.makeRequest(u);if(m.type==="Fail")throw new Error(m.error||"failed to set session metadata")})}async publishEvent(s,f,u=!1){const m=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},f),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),_={type:"PublishEvent",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:s,data:m,callWebhook:u};return this.setOnceLinked(async()=>{const y=await this.makeRequest(_);if(y.type==="Fail")throw new Error(y.error||"failed to publish event");return y.eventId})}sendData(s){this.ws.sendData(JSON.stringify(s))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>o*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(s,f=d){const u=s.id;this.sendData(s);let m;return Promise.race([new Promise((_,y)=>{m=window.setTimeout(()=>{y(new Error(`request ${u} timed out`))},f)}),new Promise(_=>{this.requestResolutions.set(u,y=>{clearTimeout(m),_(y),this.requestResolutions.delete(u)})})])}async authenticate(){const s={type:"HostSession",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},f=await this.makeRequest(s);if(f.type==="Fail")throw new Error(f.error||"failed to authentcate")}sendIsLinked(){const s={type:"IsLinked",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(s)}sendGetSessionConfig(){const s={type:"GetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(s)}};return Ir.WalletLinkConnection=c,Ir}var Tr={},Tt={},mn={},yc;function ep(){return yc||(yc=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'),mn}var _c;function Gh(){if(_c)return Tt;_c=1;var e=Tt&&Tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.injectCssReset=void 0;const t=e(ep());function n(){const r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode(t.default)),document.documentElement.appendChild(r)}return Tt.injectCssReset=n,Tt}var Br={},sn,Ee,Jh,Zh,Zt,vc,Kh,Qh,Yh,_a,ea,ta,Xh,en={},ed=[],tp=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,on=Array.isArray;function it(e,t){for(var n in t)e[n]=t[n];return e}function va(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ra(e,t,n){var r,h,i,a={};for(i in t)i=="key"?r=t[i]:i=="ref"?h=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?sn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Yr(e,a,r,h,null)}function Yr(e,t,n,r,h){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:h??++Jh,__i:-1,__u:0};return h==null&&Ee.vnode!=null&&Ee.vnode(i),i}function rp(){return{current:null}}function an(e){return e.children}function Xr(e,t){this.props=e,this.context=t}function ar(e,t){if(t==null)return e.__?ar(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ar(e):null}function td(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return td(e)}}function na(e){(!e.__d&&(e.__d=!0)&&Zt.push(e)&&!Pn.__r++||vc!=Ee.debounceRendering)&&((vc=Ee.debounceRendering)||Kh)(Pn)}function Pn(){for(var e,t,n,r,h,i,a,o=1;Zt.length;)Zt.length>o&&Zt.sort(Qh),e=Zt.shift(),o=Zt.length,e.__d&&(n=void 0,r=void 0,h=(r=(t=e).__v).__e,i=[],a=[],t.__P&&((n=it({},r)).__v=r.__v+1,Ee.vnode&&Ee.vnode(n),ba(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[h]:null,i,h??ar(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,sd(i,n,a),r.__e=r.__=null,n.__e!=h&&td(n)));Pn.__r=0}function rd(e,t,n,r,h,i,a,o,d,c,p){var s,f,u,m,_,y,l,b=r&&r.__k||ed,E=t.length;for(d=np(n,t,b,d,E),s=0;s<E;s++)(u=n.__k[s])!=null&&(f=u.__i==-1?en:b[u.__i]||en,u.__i=s,y=ba(e,u,f,h,i,a,o,d,c,p),m=u.__e,u.ref&&f.ref!=u.ref&&(f.ref&&wa(f.ref,null,u),p.push(u.ref,u.__c||m,u)),_==null&&m!=null&&(_=m),(l=!!(4&u.__u))||f.__k===u.__k?d=nd(u,d,e,l):typeof u.type=="function"&&y!==void 0?d=y:m&&(d=m.nextSibling),u.__u&=-7);return n.__e=_,d}function np(e,t,n,r,h){var i,a,o,d,c,p=n.length,s=p,f=0;for(e.__k=new Array(h),i=0;i<h;i++)(a=t[i])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[i]=Yr(null,a,null,null,null):on(a)?a=e.__k[i]=Yr(an,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[i]=Yr(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,d=i+f,a.__=e,a.__b=e.__b+1,o=null,(c=a.__i=ip(a,n,d,s))!=-1&&(s--,(o=n[c])&&(o.__u|=2)),o==null||o.__v==null?(c==-1&&(h>p?f--:h<p&&f++),typeof a.type!="function"&&(a.__u|=4)):c!=d&&(c==d-1?f--:c==d+1?f++:(c>d?f--:f++,a.__u|=4))):e.__k[i]=null;if(s)for(i=0;i<p;i++)(o=n[i])!=null&&(2&o.__u)==0&&(o.__e==r&&(r=ar(o)),ad(o,o));return r}function nd(e,t,n,r){var h,i;if(typeof e.type=="function"){for(h=e.__k,i=0;h&&i<h.length;i++)h[i]&&(h[i].__=e,t=nd(h[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=ar(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function id(e,t){return t=t||[],e==null||typeof e=="boolean"||(on(e)?e.some(function(n){id(n,t)}):t.push(e)),t}function ip(e,t,n,r){var h,i,a,o=e.key,d=e.type,c=t[n],p=c!=null&&(2&c.__u)==0;if(c===null&&o==null||p&&o==c.key&&d==c.type)return n;if(r>(p?1:0)){for(h=n-1,i=n+1;h>=0||i<t.length;)if((c=t[a=h>=0?h--:i++])!=null&&(2&c.__u)==0&&o==c.key&&d==c.type)return a}return-1}function bc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||tp.test(t)?n:n+"px"}function yn(e,t,n,r,h){var i,a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||bc(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||bc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Yh,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=_a,e.addEventListener(t,i?ta:ea,i)):e.removeEventListener(t,i?ta:ea,i);else{if(h=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function wc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=_a++;else if(t.t<n.u)return;return n(Ee.event?Ee.event(t):t)}}}function ba(e,t,n,r,h,i,a,o,d,c){var p,s,f,u,m,_,y,l,b,E,I,x,D,F,W,J,ee,Q=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),i=[o=t.__e=n.__e]),(p=Ee.__b)&&p(t);e:if(typeof Q=="function")try{if(l=t.props,b="prototype"in Q&&Q.prototype.render,E=(p=Q.contextType)&&r[p.__c],I=p?E?E.props.value:p.__:r,n.__c?y=(s=t.__c=n.__c).__=s.__E:(b?t.__c=s=new Q(l,I):(t.__c=s=new Xr(l,I),s.constructor=Q,s.render=op),E&&E.sub(s),s.state||(s.state={}),s.__n=r,f=s.__d=!0,s.__h=[],s._sb=[]),b&&s.__s==null&&(s.__s=s.state),b&&Q.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=it({},s.__s)),it(s.__s,Q.getDerivedStateFromProps(l,s.__s))),u=s.props,m=s.state,s.__v=t,f)b&&Q.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),b&&s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(b&&Q.getDerivedStateFromProps==null&&l!==u&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(l,I),t.__v==n.__v||!s.__e&&s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(l,s.__s,I)===!1){for(t.__v!=n.__v&&(s.props=l,s.state=s.__s,s.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(re){re&&(re.__=t)}),x=0;x<s._sb.length;x++)s.__h.push(s._sb[x]);s._sb=[],s.__h.length&&a.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(l,s.__s,I),b&&s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(u,m,_)})}if(s.context=I,s.props=l,s.__P=e,s.__e=!1,D=Ee.__r,F=0,b){for(s.state=s.__s,s.__d=!1,D&&D(t),p=s.render(s.props,s.state,s.context),W=0;W<s._sb.length;W++)s.__h.push(s._sb[W]);s._sb=[]}else do s.__d=!1,D&&D(t),p=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++F<25);s.state=s.__s,s.getChildContext!=null&&(r=it(it({},r),s.getChildContext())),b&&!f&&s.getSnapshotBeforeUpdate!=null&&(_=s.getSnapshotBeforeUpdate(u,m)),J=p,p!=null&&p.type===an&&p.key==null&&(J=od(p.props.children)),o=rd(e,on(J)?J:[J],t,n,r,h,i,a,o,d,c),s.base=t.__e,t.__u&=-161,s.__h.length&&a.push(s),y&&(s.__E=s.__=null)}catch(re){if(t.__v=null,d||i!=null)if(re.then){for(t.__u|=d?160:128;o&&o.nodeType==8&&o.nextSibling;)o=o.nextSibling;i[i.indexOf(o)]=null,t.__e=o}else{for(ee=i.length;ee--;)va(i[ee]);ia(t)}else t.__e=n.__e,t.__k=n.__k,re.then||ia(t);Ee.__e(re,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):o=t.__e=sp(n.__e,t,n,r,h,i,a,d,c);return(p=Ee.diffed)&&p(t),128&t.__u?void 0:o}function ia(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(ia)}function sd(e,t,n){for(var r=0;r<n.length;r++)wa(n[r],n[++r],n[++r]);Ee.__c&&Ee.__c(t,e),e.some(function(h){try{e=h.__h,h.__h=[],e.some(function(i){i.call(h)})}catch(i){Ee.__e(i,h.__v)}})}function od(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:on(e)?e.map(od):it({},e)}function sp(e,t,n,r,h,i,a,o,d){var c,p,s,f,u,m,_,y=n.props||en,l=t.props,b=t.type;if(b=="svg"?h="http://www.w3.org/2000/svg":b=="math"?h="http://www.w3.org/1998/Math/MathML":h||(h="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((u=i[c])&&"setAttribute"in u==!!b&&(b?u.localName==b:u.nodeType==3)){e=u,i[c]=null;break}}if(e==null){if(b==null)return document.createTextNode(l);e=document.createElementNS(h,b,l.is&&l),o&&(Ee.__m&&Ee.__m(t,i),o=!1),i=null}if(b==null)y===l||o&&e.data==l||(e.data=l);else{if(i=i&&sn.call(e.childNodes),!o&&i!=null)for(y={},c=0;c<e.attributes.length;c++)y[(u=e.attributes[c]).name]=u.value;for(c in y)if(u=y[c],c!="children"){if(c=="dangerouslySetInnerHTML")s=u;else if(!(c in l)){if(c=="value"&&"defaultValue"in l||c=="checked"&&"defaultChecked"in l)continue;yn(e,c,null,u,h)}}for(c in l)u=l[c],c=="children"?f=u:c=="dangerouslySetInnerHTML"?p=u:c=="value"?m=u:c=="checked"?_=u:o&&typeof u!="function"||y[c]===u||yn(e,c,u,y[c],h);if(p)o||s&&(p.__html==s.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(s&&(e.innerHTML=""),rd(t.type=="template"?e.content:e,on(f)?f:[f],t,n,r,b=="foreignObject"?"http://www.w3.org/1999/xhtml":h,i,a,i?i[0]:n.__k&&ar(n,0),o,d),i!=null)for(c=i.length;c--;)va(i[c]);o||(c="value",b=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[c]||b=="progress"&&!m||b=="option"&&m!=y[c])&&yn(e,c,m,y[c],h),c="checked",_!=null&&_!=e[c]&&yn(e,c,_,y[c],h))}return e}function wa(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(h){Ee.__e(h,n)}}function ad(e,t,n){var r,h;if(Ee.unmount&&Ee.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||wa(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){Ee.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(h=0;h<r.length;h++)r[h]&&ad(r[h],t,n||typeof e.type!="function");n||va(e.__e),e.__c=e.__=e.__e=void 0}function op(e,t,n){return this.constructor(e,n)}function ud(e,t,n){var r,h,i,a;t==document&&(t=document.documentElement),Ee.__&&Ee.__(e,t),h=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],a=[],ba(t,e=(!r&&n||t).__k=ra(an,null,[e]),h||en,en,t.namespaceURI,!r&&n?[n]:h?null:t.firstChild?sn.call(t.childNodes):null,i,!r&&n?n:h?h.__e:t.firstChild,r,a),sd(i,e,a)}function cd(e,t){ud(e,t,cd)}function ap(e,t,n){var r,h,i,a,o=it({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?h=t[i]:o[i]=t[i]===void 0&&a!=null?a[i]:t[i];return arguments.length>2&&(o.children=arguments.length>3?sn.call(arguments,2):n),Yr(e.type,o,r||e.key,h||e.ref,null)}function up(e){function t(n){var r,h;return this.getChildContext||(r=new Set,(h={})[t.__c]=this,this.getChildContext=function(){return h},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(a){a.__e=!0,na(a)})},this.sub=function(i){r.add(i);var a=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),a&&a.call(i)}}),n.children}return t.__c="__cC"+Xh++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}sn=ed.slice,Ee={__e:function(e,t,n,r){for(var h,i,a;t=t.__;)if((h=t.__c)&&!h.__)try{if((i=h.constructor)&&i.getDerivedStateFromError!=null&&(h.setState(i.getDerivedStateFromError(e)),a=h.__d),h.componentDidCatch!=null&&(h.componentDidCatch(e,r||{}),a=h.__d),a)return h.__E=h}catch(o){e=o}throw e}},Jh=0,Zh=function(e){return e!=null&&e.constructor===void 0},Xr.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=it({},this.state),typeof e=="function"&&(e=e(it({},n),this.props)),e&&it(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),na(this))},Xr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),na(this))},Xr.prototype.render=an,Zt=[],Kh=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Qh=function(e,t){return e.__v.__b-t.__v.__b},Pn.__r=0,Yh=/(PointerCapture)$|Capture$/i,_a=0,ea=wc(!1),ta=wc(!0),Xh=0;const cp=Object.freeze(Object.defineProperty({__proto__:null,Component:Xr,Fragment:an,cloneElement:ap,createContext:up,createElement:ra,createRef:rp,h:ra,hydrate:cd,get isValidElement(){return Zh},get options(){return Ee},render:ud,toChildArray:id},Symbol.toStringTag,{value:"Module"})),Ge=lr(cp);var Bt={};function ld(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ld(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ec(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ld(e))&&(r&&(r+=" "),r+=t);return r}const lp=Object.freeze(Object.defineProperty({__proto__:null,clsx:Ec,default:Ec},Symbol.toStringTag,{value:"Module"})),un=lr(lp);var at,we,os,Rc,ur=0,fd=[],je=Ee,Sc=je.__b,Cc=je.__r,Mc=je.diffed,kc=je.__c,Ic=je.unmount,Ac=je.__;function Kt(e,t){je.__h&&je.__h(we,e,ur||t),ur=0;var n=we.__H||(we.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function hd(e){return ur=1,dd(gd,e)}function dd(e,t,n){var r=Kt(at++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):gd(void 0,t),function(o){var d=r.__N?r.__N[0]:r.__[0],c=r.t(d,o);d!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=we,!we.__f)){var h=function(o,d,c){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(f){return!!f.__c});if(p.every(function(f){return!f.__N}))return!i||i.call(this,o,d,c);var s=r.__c.props!==o;return p.forEach(function(f){if(f.__N){var u=f.__[0];f.__=f.__N,f.__N=void 0,u!==f.__[0]&&(s=!0)}}),i&&i.call(this,o,d,c)||s};we.__f=!0;var i=we.shouldComponentUpdate,a=we.componentWillUpdate;we.componentWillUpdate=function(o,d,c){if(this.__e){var p=i;i=void 0,h(o,d,c),i=p}a&&a.call(this,o,d,c)},we.shouldComponentUpdate=h}return r.__N||r.__}function fp(e,t){var n=Kt(at++,3);!je.__s&&Ra(n.__H,t)&&(n.__=e,n.u=t,we.__H.__h.push(n))}function pd(e,t){var n=Kt(at++,4);!je.__s&&Ra(n.__H,t)&&(n.__=e,n.u=t,we.__h.push(n))}function hp(e){return ur=5,Ea(function(){return{current:e}},[])}function dp(e,t,n){ur=6,pd(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Ea(e,t){var n=Kt(at++,7);return Ra(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function pp(e,t){return ur=8,Ea(function(){return e},t)}function gp(e){var t=we.context[e.__c],n=Kt(at++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(we)),t.props.value):e.__}function mp(e,t){je.useDebugValue&&je.useDebugValue(t?t(e):e)}function yp(e){var t=Kt(at++,10),n=hd();return t.__=e,we.componentDidCatch||(we.componentDidCatch=function(r,h){t.__&&t.__(r,h),n[1](r)}),[n[0],function(){n[1](void 0)}]}function _p(){var e=Kt(at++,11);if(!e.__){for(var t=we.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function vp(){for(var e;e=fd.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Bn),e.__H.__h.forEach(sa),e.__H.__h=[]}catch(t){e.__H.__h=[],je.__e(t,e.__v)}}je.__b=function(e){we=null,Sc&&Sc(e)},je.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ac&&Ac(e,t)},je.__r=function(e){Cc&&Cc(e),at=0;var t=(we=e.__c).__H;t&&(os===we?(t.__h=[],we.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Bn),t.__h.forEach(sa),t.__h=[],at=0)),os=we},je.diffed=function(e){Mc&&Mc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fd.push(t)!==1&&Rc===je.requestAnimationFrame||((Rc=je.requestAnimationFrame)||bp)(vp)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),os=we=null},je.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Bn),n.__h=n.__h.filter(function(r){return!r.__||sa(r)})}catch(r){t.some(function(h){h.__h&&(h.__h=[])}),t=[],je.__e(r,n.__v)}}),kc&&kc(e,t)},je.unmount=function(e){Ic&&Ic(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Bn(r)}catch(h){t=h}}),n.__H=void 0,t&&je.__e(t,n.__v))};var xc=typeof requestAnimationFrame=="function";function bp(e){var t,n=function(){clearTimeout(r),xc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);xc&&(t=requestAnimationFrame(n))}function Bn(e){var t=we,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),we=t}function sa(e){var t=we;e.__c=e.__(),we=t}function Ra(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function gd(e,t){return typeof t=="function"?t(e):t}const wp=Object.freeze(Object.defineProperty({__proto__:null,useCallback:pp,useContext:gp,useDebugValue:mp,useEffect:fp,useErrorBoundary:yp,useId:_p,useImperativeHandle:dp,useLayoutEffect:pd,useMemo:Ea,useReducer:dd,useRef:hp,useState:hd},Symbol.toStringTag,{value:"Module"})),Un=lr(wp);var st={},Pr={},Tc;function Ep(){if(Tc)return Pr;Tc=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.CloseIcon=void 0;const e=Ge;function t(n){return(0,e.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}return Pr.CloseIcon=t,Pr}var Lr={},Bc;function Rp(){if(Bc)return Lr;Bc=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.CoinbaseWalletRound=void 0;const e=Ge;function t(n){return(0,e.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,e.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,e.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}return Lr.CoinbaseWalletRound=t,Lr}var Nr={},Pc;function Sp(){if(Pc)return Nr;Pc=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.QRCodeIcon=void 0;const e=Ge;function t(n){return(0,e.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,e.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,e.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,e.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}return Nr.QRCodeIcon=t,Nr}var Pt={},as,Lc;function Cp(){if(Lc)return as;Lc=1;function e(u){this.mode=n.MODE_8BIT_BYTE,this.data=u,this.parsedData=[];for(var m=0,_=this.data.length;m<_;m++){var y=[],l=this.data.charCodeAt(m);l>65536?(y[0]=240|(l&1835008)>>>18,y[1]=128|(l&258048)>>>12,y[2]=128|(l&4032)>>>6,y[3]=128|l&63):l>2048?(y[0]=224|(l&61440)>>>12,y[1]=128|(l&4032)>>>6,y[2]=128|l&63):l>128?(y[0]=192|(l&1984)>>>6,y[1]=128|l&63):y[0]=l,this.parsedData.push(y)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}e.prototype={getLength:function(u){return this.parsedData.length},write:function(u){for(var m=0,_=this.parsedData.length;m<_;m++)u.put(this.parsedData[m],8)}};function t(u,m){this.typeNumber=u,this.errorCorrectLevel=m,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={addData:function(u){var m=new e(u);this.dataList.push(m),this.dataCache=null},isDark:function(u,m){if(u<0||this.moduleCount<=u||m<0||this.moduleCount<=m)throw new Error(u+","+m);return this.modules[u][m]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(u,m){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var _=0;_<this.moduleCount;_++){this.modules[_]=new Array(this.moduleCount);for(var y=0;y<this.moduleCount;y++)this.modules[_][y]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(u,m),this.typeNumber>=7&&this.setupTypeNumber(u),this.dataCache==null&&(this.dataCache=t.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,m)},setupPositionProbePattern:function(u,m){for(var _=-1;_<=7;_++)if(!(u+_<=-1||this.moduleCount<=u+_))for(var y=-1;y<=7;y++)m+y<=-1||this.moduleCount<=m+y||(0<=_&&_<=6&&(y==0||y==6)||0<=y&&y<=6&&(_==0||_==6)||2<=_&&_<=4&&2<=y&&y<=4?this.modules[u+_][m+y]=!0:this.modules[u+_][m+y]=!1)},getBestMaskPattern:function(){for(var u=0,m=0,_=0;_<8;_++){this.makeImpl(!0,_);var y=i.getLostPoint(this);(_==0||u>y)&&(u=y,m=_)}return m},createMovieClip:function(u,m,_){var y=u.createEmptyMovieClip(m,_),l=1;this.make();for(var b=0;b<this.modules.length;b++)for(var E=b*l,I=0;I<this.modules[b].length;I++){var x=I*l,D=this.modules[b][I];D&&(y.beginFill(0,100),y.moveTo(x,E),y.lineTo(x+l,E),y.lineTo(x+l,E+l),y.lineTo(x,E+l),y.endFill())}return y},setupTimingPattern:function(){for(var u=8;u<this.moduleCount-8;u++)this.modules[u][6]==null&&(this.modules[u][6]=u%2==0);for(var m=8;m<this.moduleCount-8;m++)this.modules[6][m]==null&&(this.modules[6][m]=m%2==0)},setupPositionAdjustPattern:function(){for(var u=i.getPatternPosition(this.typeNumber),m=0;m<u.length;m++)for(var _=0;_<u.length;_++){var y=u[m],l=u[_];if(this.modules[y][l]==null)for(var b=-2;b<=2;b++)for(var E=-2;E<=2;E++)b==-2||b==2||E==-2||E==2||b==0&&E==0?this.modules[y+b][l+E]=!0:this.modules[y+b][l+E]=!1}},setupTypeNumber:function(u){for(var m=i.getBCHTypeNumber(this.typeNumber),_=0;_<18;_++){var y=!u&&(m>>_&1)==1;this.modules[Math.floor(_/3)][_%3+this.moduleCount-8-3]=y}for(var _=0;_<18;_++){var y=!u&&(m>>_&1)==1;this.modules[_%3+this.moduleCount-8-3][Math.floor(_/3)]=y}},setupTypeInfo:function(u,m){for(var _=this.errorCorrectLevel<<3|m,y=i.getBCHTypeInfo(_),l=0;l<15;l++){var b=!u&&(y>>l&1)==1;l<6?this.modules[l][8]=b:l<8?this.modules[l+1][8]=b:this.modules[this.moduleCount-15+l][8]=b}for(var l=0;l<15;l++){var b=!u&&(y>>l&1)==1;l<8?this.modules[8][this.moduleCount-l-1]=b:l<9?this.modules[8][15-l-1+1]=b:this.modules[8][15-l-1]=b}this.modules[this.moduleCount-8][8]=!u},mapData:function(u,m){for(var _=-1,y=this.moduleCount-1,l=7,b=0,E=this.moduleCount-1;E>0;E-=2)for(E==6&&E--;;){for(var I=0;I<2;I++)if(this.modules[y][E-I]==null){var x=!1;b<u.length&&(x=(u[b]>>>l&1)==1);var D=i.getMask(m,y,E-I);D&&(x=!x),this.modules[y][E-I]=x,l--,l==-1&&(b++,l=7)}if(y+=_,y<0||this.moduleCount<=y){y-=_,_=-_;break}}}},t.PAD0=236,t.PAD1=17,t.createData=function(u,m,_){for(var y=c.getRSBlocks(u,m),l=new p,b=0;b<_.length;b++){var E=_[b];l.put(E.mode,4),l.put(E.getLength(),i.getLengthInBits(E.mode,u)),E.write(l)}for(var I=0,b=0;b<y.length;b++)I+=y[b].dataCount;if(l.getLengthInBits()>I*8)throw new Error("code length overflow. ("+l.getLengthInBits()+">"+I*8+")");for(l.getLengthInBits()+4<=I*8&&l.put(0,4);l.getLengthInBits()%8!=0;)l.putBit(!1);for(;!(l.getLengthInBits()>=I*8||(l.put(t.PAD0,8),l.getLengthInBits()>=I*8));)l.put(t.PAD1,8);return t.createBytes(l,y)},t.createBytes=function(u,m){for(var _=0,y=0,l=0,b=new Array(m.length),E=new Array(m.length),I=0;I<m.length;I++){var x=m[I].dataCount,D=m[I].totalCount-x;y=Math.max(y,x),l=Math.max(l,D),b[I]=new Array(x);for(var F=0;F<b[I].length;F++)b[I][F]=255&u.buffer[F+_];_+=x;var W=i.getErrorCorrectPolynomial(D),J=new d(b[I],W.getLength()-1),ee=J.mod(W);E[I]=new Array(W.getLength()-1);for(var F=0;F<E[I].length;F++){var Q=F+ee.getLength()-E[I].length;E[I][F]=Q>=0?ee.get(Q):0}}for(var re=0,F=0;F<m.length;F++)re+=m[F].totalCount;for(var q=new Array(re),g=0,F=0;F<y;F++)for(var I=0;I<m.length;I++)F<b[I].length&&(q[g++]=b[I][F]);for(var F=0;F<l;F++)for(var I=0;I<m.length;I++)F<E[I].length&&(q[g++]=E[I][F]);return q};for(var n={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},r={L:1,M:0,Q:3,H:2},h={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(u){for(var m=u<<10;i.getBCHDigit(m)-i.getBCHDigit(i.G15)>=0;)m^=i.G15<<i.getBCHDigit(m)-i.getBCHDigit(i.G15);return(u<<10|m)^i.G15_MASK},getBCHTypeNumber:function(u){for(var m=u<<12;i.getBCHDigit(m)-i.getBCHDigit(i.G18)>=0;)m^=i.G18<<i.getBCHDigit(m)-i.getBCHDigit(i.G18);return u<<12|m},getBCHDigit:function(u){for(var m=0;u!=0;)m++,u>>>=1;return m},getPatternPosition:function(u){return i.PATTERN_POSITION_TABLE[u-1]},getMask:function(u,m,_){switch(u){case h.PATTERN000:return(m+_)%2==0;case h.PATTERN001:return m%2==0;case h.PATTERN010:return _%3==0;case h.PATTERN011:return(m+_)%3==0;case h.PATTERN100:return(Math.floor(m/2)+Math.floor(_/3))%2==0;case h.PATTERN101:return m*_%2+m*_%3==0;case h.PATTERN110:return(m*_%2+m*_%3)%2==0;case h.PATTERN111:return(m*_%3+(m+_)%2)%2==0;default:throw new Error("bad maskPattern:"+u)}},getErrorCorrectPolynomial:function(u){for(var m=new d([1],0),_=0;_<u;_++)m=m.multiply(new d([1,a.gexp(_)],0));return m},getLengthInBits:function(u,m){if(1<=m&&m<10)switch(u){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:return 8;case n.MODE_KANJI:return 8;default:throw new Error("mode:"+u)}else if(m<27)switch(u){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+u)}else if(m<41)switch(u){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+u)}else throw new Error("type:"+m)},getLostPoint:function(u){for(var m=u.getModuleCount(),_=0,y=0;y<m;y++)for(var l=0;l<m;l++){for(var b=0,E=u.isDark(y,l),I=-1;I<=1;I++)if(!(y+I<0||m<=y+I))for(var x=-1;x<=1;x++)l+x<0||m<=l+x||I==0&&x==0||E==u.isDark(y+I,l+x)&&b++;b>5&&(_+=3+b-5)}for(var y=0;y<m-1;y++)for(var l=0;l<m-1;l++){var D=0;u.isDark(y,l)&&D++,u.isDark(y+1,l)&&D++,u.isDark(y,l+1)&&D++,u.isDark(y+1,l+1)&&D++,(D==0||D==4)&&(_+=3)}for(var y=0;y<m;y++)for(var l=0;l<m-6;l++)u.isDark(y,l)&&!u.isDark(y,l+1)&&u.isDark(y,l+2)&&u.isDark(y,l+3)&&u.isDark(y,l+4)&&!u.isDark(y,l+5)&&u.isDark(y,l+6)&&(_+=40);for(var l=0;l<m;l++)for(var y=0;y<m-6;y++)u.isDark(y,l)&&!u.isDark(y+1,l)&&u.isDark(y+2,l)&&u.isDark(y+3,l)&&u.isDark(y+4,l)&&!u.isDark(y+5,l)&&u.isDark(y+6,l)&&(_+=40);for(var F=0,l=0;l<m;l++)for(var y=0;y<m;y++)u.isDark(y,l)&&F++;var W=Math.abs(100*F/m/m-50)/5;return _+=W*10,_}},a={glog:function(u){if(u<1)throw new Error("glog("+u+")");return a.LOG_TABLE[u]},gexp:function(u){for(;u<0;)u+=255;for(;u>=256;)u-=255;return a.EXP_TABLE[u]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},o=0;o<8;o++)a.EXP_TABLE[o]=1<<o;for(var o=8;o<256;o++)a.EXP_TABLE[o]=a.EXP_TABLE[o-4]^a.EXP_TABLE[o-5]^a.EXP_TABLE[o-6]^a.EXP_TABLE[o-8];for(var o=0;o<255;o++)a.LOG_TABLE[a.EXP_TABLE[o]]=o;function d(u,m){if(u.length==null)throw new Error(u.length+"/"+m);for(var _=0;_<u.length&&u[_]==0;)_++;this.num=new Array(u.length-_+m);for(var y=0;y<u.length-_;y++)this.num[y]=u[y+_]}d.prototype={get:function(u){return this.num[u]},getLength:function(){return this.num.length},multiply:function(u){for(var m=new Array(this.getLength()+u.getLength()-1),_=0;_<this.getLength();_++)for(var y=0;y<u.getLength();y++)m[_+y]^=a.gexp(a.glog(this.get(_))+a.glog(u.get(y)));return new d(m,0)},mod:function(u){if(this.getLength()-u.getLength()<0)return this;for(var m=a.glog(this.get(0))-a.glog(u.get(0)),_=new Array(this.getLength()),y=0;y<this.getLength();y++)_[y]=this.get(y);for(var y=0;y<u.getLength();y++)_[y]^=a.gexp(a.glog(u.get(y))+m);return new d(_,0).mod(u)}};function c(u,m){this.totalCount=u,this.dataCount=m}c.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],c.getRSBlocks=function(u,m){var _=c.getRsBlockTable(u,m);if(_==null)throw new Error("bad rs block @ typeNumber:"+u+"/errorCorrectLevel:"+m);for(var y=_.length/3,l=[],b=0;b<y;b++)for(var E=_[b*3+0],I=_[b*3+1],x=_[b*3+2],D=0;D<E;D++)l.push(new c(I,x));return l},c.getRsBlockTable=function(u,m){switch(m){case r.L:return c.RS_BLOCK_TABLE[(u-1)*4+0];case r.M:return c.RS_BLOCK_TABLE[(u-1)*4+1];case r.Q:return c.RS_BLOCK_TABLE[(u-1)*4+2];case r.H:return c.RS_BLOCK_TABLE[(u-1)*4+3];default:return}};function p(){this.buffer=[],this.length=0}p.prototype={get:function(u){var m=Math.floor(u/8);return(this.buffer[m]>>>7-u%8&1)==1},put:function(u,m){for(var _=0;_<m;_++)this.putBit((u>>>m-_-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(u){var m=Math.floor(this.length/8);this.buffer.length<=m&&this.buffer.push(0),u&&(this.buffer[m]|=128>>>this.length%8),this.length++}};var s=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function f(u){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof u=="string"&&(u={content:u}),u)for(var m in u)this.options[m]=u[m];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function _(x){switch(x){case"L":return r.L;case"M":return r.M;case"Q":return r.Q;case"H":return r.H;default:throw new Error("Unknwon error correction level: "+x)}}function y(x,D){for(var F=l(x),W=1,J=0,ee=0,Q=s.length;ee<=Q;ee++){var re=s[ee];if(!re)throw new Error("Content too long: expected "+J+" but got "+F);switch(D){case"L":J=re[0];break;case"M":J=re[1];break;case"Q":J=re[2];break;case"H":J=re[3];break;default:throw new Error("Unknwon error correction level: "+D)}if(F<=J)break;W++}if(W>s.length)throw new Error("Content too long");return W}function l(x){var D=encodeURI(x).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return D.length+(D.length!=x?3:0)}var b=this.options.content,E=y(b,this.options.ecl),I=_(this.options.ecl);this.qrcode=new t(E,I),this.qrcode.addData(b),this.qrcode.make()}return f.prototype.svg=function(u){var m=this.options||{},_=this.qrcode.modules;typeof u>"u"&&(u={container:m.container||"svg"});for(var y=typeof m.pretty<"u"?!!m.pretty:!0,l=y?" ":"",b=y?`\r
|
|
2
2
|
`:"",E=m.width,I=m.height,x=_.length,D=E/(x+2*m.padding),F=I/(x+2*m.padding),W=typeof m.join<"u"?!!m.join:!1,J=typeof m.swap<"u"?!!m.swap:!1,ee=typeof m.xmlDeclaration<"u"?!!m.xmlDeclaration:!0,Q=typeof m.predefined<"u"?!!m.predefined:!1,re=Q?l+'<defs><path id="qrmodule" d="M0 0 h'+F+" v"+D+' H0 z" style="fill:'+m.color+';shape-rendering:crispEdges;" /></defs>'+b:"",q=l+'<rect x="0" y="0" width="'+E+'" height="'+I+'" style="fill:'+m.background+';shape-rendering:crispEdges;"/>'+b,g="",R="",C=0;C<x;C++)for(var M=0;M<x;M++){var A=_[M][C];if(A){var L=M*D+m.padding*D,j=C*F+m.padding*F;if(J){var T=L;L=j,j=T}if(W){var w=D+L,N=F+j;L=Number.isInteger(L)?Number(L):L.toFixed(2),j=Number.isInteger(j)?Number(j):j.toFixed(2),w=Number.isInteger(w)?Number(w):w.toFixed(2),N=Number.isInteger(N)?Number(N):N.toFixed(2),R+="M"+L+","+j+" V"+N+" H"+w+" V"+j+" H"+L+" Z "}else Q?g+=l+'<use x="'+L.toString()+'" y="'+j.toString()+'" href="#qrmodule" />'+b:g+=l+'<rect x="'+L.toString()+'" y="'+j.toString()+'" width="'+D+'" height="'+F+'" style="fill:'+m.color+';shape-rendering:crispEdges;"/>'+b}}W&&(g=l+'<path x="0" y="0" style="fill:'+m.color+';shape-rendering:crispEdges;" d="'+R+'" />');let te="";if(this.options.image!==void 0&&this.options.image.svg){const U=E*this.options.image.width/100,$=I*this.options.image.height/100,G=E/2-U/2,X=I/2-$/2;te+=`<svg x="${G}" y="${X}" width="${U}" height="${$}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,te+=this.options.image.svg+b,te+="</svg>"}var Y="";switch(u.container){case"svg":ee&&(Y+='<?xml version="1.0" standalone="yes"?>'+b),Y+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+E+'" height="'+I+'">'+b,Y+=re+q+g,Y+=te,Y+="</svg>";break;case"svg-viewbox":ee&&(Y+='<?xml version="1.0" standalone="yes"?>'+b),Y+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+E+" "+I+'">'+b,Y+=re+q+g,Y+=te,Y+="</svg>";break;case"g":Y+='<g width="'+E+'" height="'+I+'">'+b,Y+=re+q+g,Y+=te,Y+="</g>";break;default:Y+=(re+q+g+te).replace(/^\s+/,"");break}return Y},as=f,as}var Nc;function Mp(){if(Nc)return Pt;Nc=1;var e=Pt&&Pt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.QRCode=void 0;const t=Ge,n=Un,r=e(Cp()),h=i=>{const[a,o]=(0,n.useState)("");return(0,n.useEffect)(()=>{var d,c;const p=new r.default({content:i.content,background:i.bgColor||"#ffffff",color:i.fgColor||"#000000",container:"svg",ecl:"M",width:(d=i.width)!==null&&d!==void 0?d:256,height:(c=i.height)!==null&&c!==void 0?c:256,padding:0,image:i.image}),s=Buffer.from(p.svg(),"utf8").toString("base64");o(`data:image/svg+xml;base64,${s}`)},[i.bgColor,i.content,i.fgColor,i.height,i.image,i.width]),a?(0,t.h)("img",{src:a,alt:"QR Code"}):null};return Pt.QRCode=h,Pt}var Lt={},_n={},Oc;function kp(){return Oc||(Oc=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"),_n}var Fc;function Ip(){if(Fc)return Lt;Fc=1;var e=Lt&&Lt.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.Spinner=void 0;const t=Ge,n=e(kp()),r=h=>{var i;const a=(i=h.size)!==null&&i!==void 0?i:64,o=h.color||"#000";return(0,t.h)("div",{class:"-cbwsdk-spinner"},(0,t.h)("style",null,n.default),(0,t.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:a,height:a}},(0,t.h)("circle",{style:{cx:50,cy:50,r:45,stroke:o}})))};return Lt.Spinner=r,Lt}var vn={},qc;function Ap(){return qc||(qc=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"),vn}var Dc;function xp(){if(Dc)return st;Dc=1;var e=st&&st.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(st,"__esModule",{value:!0}),st.CoinbaseWalletSteps=st.ConnectContent=void 0;const t=e(un),n=Ge,r=ut(),h=fa(),i=Ep(),a=Rp(),o=Sp(),d=Mp(),c=Ip(),p=e(Ap()),s={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:_},f=y=>y==="light"?"#FFFFFF":"#0A0B0D";function u(y){const{theme:l}=y,b=(0,r.createQrUrl)(y.sessionId,y.sessionSecret,y.linkAPIUrl,y.isParentConnection,y.version,y.chainId),E=s.steps;return(0,n.h)("div",{"data-testid":"connect-content",className:(0,t.default)("-cbwsdk-connect-content",l)},(0,n.h)("style",null,p.default),(0,n.h)("div",{className:"-cbwsdk-connect-content-header"},(0,n.h)("h2",{className:(0,t.default)("-cbwsdk-connect-content-heading",l)},"Scan to connect with our mobile app"),y.onCancel&&(0,n.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:y.onCancel},(0,n.h)(i.CloseIcon,{fill:l==="light"?"#0A0B0D":"#FFFFFF"}))),(0,n.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,n.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,n.h)(m,{title:s.title,description:s.description,theme:l})),(0,n.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,n.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,n.h)(d.QRCode,{content:b,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,n.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:h.LIB_VERSION}),(0,n.h)("input",{type:"hidden",value:b})),(0,n.h)(E,{theme:l}),!y.isConnected&&(0,n.h)("div",{"data-testid":"connecting-spinner",className:(0,t.default)("-cbwsdk-connect-content-qr-connecting",l)},(0,n.h)(c.Spinner,{size:36,color:l==="dark"?"#FFF":"#000"}),(0,n.h)("p",null,"Connecting...")))))}st.ConnectContent=u;function m({title:y,description:l,theme:b}){return(0,n.h)("div",{className:(0,t.default)("-cbwsdk-connect-item",b)},(0,n.h)("div",null,(0,n.h)(a.CoinbaseWalletRound,null)),(0,n.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,n.h)("h3",{className:"-cbwsdk-connect-item-title"},y),(0,n.h)("p",{className:"-cbwsdk-connect-item-description"},l)))}function _({theme:y}){return(0,n.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,n.h)("li",{className:(0,t.default)("-cbwsdk-wallet-steps-item",y)},(0,n.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,n.h)("li",{className:(0,t.default)("-cbwsdk-wallet-steps-item",y)},(0,n.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,n.h)("span",null,"Tap ",(0,n.h)("strong",null,"Scan")," "),(0,n.h)("span",{className:(0,t.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",y)},(0,n.h)(o.QRCodeIcon,{fill:f(y)})))))}return st.CoinbaseWalletSteps=_,st}var Nt={},Or={},jc;function Tp(){if(jc)return Or;jc=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.ArrowLeftIcon=void 0;const e=Ge;function t(n){return(0,e.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}return Or.ArrowLeftIcon=t,Or}var Fr={},Uc;function Bp(){if(Uc)return Fr;Uc=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.LaptopIcon=void 0;const e=Ge;function t(n){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,e.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}return Fr.LaptopIcon=t,Fr}var qr={},Hc;function Pp(){if(Hc)return qr;Hc=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.SafeIcon=void 0;const e=Ge;function t(n){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},n),(0,e.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}return qr.SafeIcon=t,qr}var bn={},Wc;function Lp(){return Wc||(Wc=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"),bn}var $c;function Np(){if($c)return Nt;$c=1;var e=Nt&&Nt.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.TryExtensionContent=void 0;const t=e(un),n=Ge,r=Un,h=Tp(),i=Bp(),a=Pp(),o=e(Lp());function d({theme:c}){const[p,s]=(0,r.useState)(!1),f=(0,r.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),u=(0,r.useCallback)(()=>{p?window.location.reload():(f(),s(!0))},[f,p]);return(0,n.h)("div",{class:(0,t.default)("-cbwsdk-try-extension",c)},(0,n.h)("style",null,o.default),(0,n.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,n.h)("h3",{class:(0,t.default)("-cbwsdk-try-extension-heading",c)},"Or try the Coinbase Wallet browser extension"),(0,n.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,n.h)("button",{class:(0,t.default)("-cbwsdk-try-extension-cta",c),onClick:u},p?"Refresh":"Install"),(0,n.h)("div",null,!p&&(0,n.h)(h.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:c==="light"?"#0052FF":"#588AF5"})))),(0,n.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,n.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,n.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,n.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,n.h)("span",{class:(0,t.default)("-cbwsdk-try-extension-list-item-icon",c)},(0,n.h)(i.LaptopIcon,{fill:c==="light"?"#0A0B0D":"#FFFFFF"}))),(0,n.h)("div",{class:(0,t.default)("-cbwsdk-try-extension-list-item-copy",c)},"Connect with dapps with just one click on your desktop browser")),(0,n.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,n.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,n.h)("span",{class:(0,t.default)("-cbwsdk-try-extension-list-item-icon",c)},(0,n.h)(a.SafeIcon,{fill:c==="light"?"#0A0B0D":"#FFFFFF"}))),(0,n.h)("div",{class:(0,t.default)("-cbwsdk-try-extension-list-item-copy",c)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}return Nt.TryExtensionContent=d,Nt}var wn={},Vc;function Op(){return Vc||(Vc=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"),wn}var zc;function Fp(){if(zc)return Bt;zc=1;var e=Bt&&Bt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.ConnectDialog=void 0;const t=e(un),n=Ge,r=Un,h=xp(),i=Np(),a=e(Op()),o=d=>{const{isOpen:c,darkMode:p}=d,[s,f]=(0,r.useState)(!c),[u,m]=(0,r.useState)(!c);(0,r.useEffect)(()=>{const y=[window.setTimeout(()=>{m(!c)},10)];return c?f(!1):y.push(window.setTimeout(()=>{f(!0)},360)),()=>{y.forEach(window.clearTimeout)}},[c]);const _=p?"dark":"light";return(0,n.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-container",s&&"-cbwsdk-connect-dialog-container-hidden")},(0,n.h)("style",null,a.default),(0,n.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-backdrop",_,u&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,n.h)("div",{class:"-cbwsdk-connect-dialog"},(0,n.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-box",u&&"-cbwsdk-connect-dialog-box-hidden")},d.connectDisabled?null:(0,n.h)(h.ConnectContent,{theme:_,version:d.version,sessionId:d.sessionId,sessionSecret:d.sessionSecret,linkAPIUrl:d.linkAPIUrl,isConnected:d.isConnected,isParentConnection:d.isParentConnection,chainId:d.chainId,onCancel:d.onCancel}),(0,n.h)(i.TryExtensionContent,{theme:_}))))};return Bt.ConnectDialog=o,Bt}var Gc;function qp(){if(Gc)return Br;Gc=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.LinkFlow=void 0;const e=Ge,t=Fp();let n=class{constructor(h){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=h.darkMode,this.version=h.version,this.sessionId=h.sessionId,this.sessionSecret=h.sessionSecret,this.linkAPIUrl=h.linkAPIUrl,this.isParentConnection=h.isParentConnection}attach(h){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",h.appendChild(this.root),this.render()}setConnected(h){this.connected!==h&&(this.connected=h,this.render())}setChainId(h){this.chainId!==h&&(this.chainId=h,this.render())}detach(){var h;this.root&&((0,e.render)(null,this.root),(h=this.root.parentElement)===null||h===void 0||h.removeChild(this.root))}setConnectDisabled(h){this.connectDisabled=h}open(h){this.isOpen=!0,this.onCancel=h.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,e.render)((0,e.h)(t.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}};return Br.LinkFlow=n,Br}var Dr={},En={},Jc;function Dp(){return Jc||(Jc=1,Object.defineProperty(En,"__esModule",{value:!0}),En.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"),En}var Zc;function md(){return Zc||(Zc=1,(function(e){var t=Dr&&Dr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const n=t(un),r=Ge,h=Un,i=t(Dp()),a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class d{constructor(f){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=f.darkMode}attach(f){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",f.appendChild(this.root),this.render()}presentItem(f){const u=this.nextItemKey++;return this.items.set(u,f),this.render(),()=>{this.items.delete(u),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,r.render)((0,r.h)("div",null,(0,r.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([f,u])=>(0,r.h)(e.SnackbarInstance,Object.assign({},u,{key:f}))))),this.root)}}e.Snackbar=d;const c=s=>(0,r.h)("div",{class:(0,n.default)("-cbwsdk-snackbar-container")},(0,r.h)("style",null,i.default),(0,r.h)("div",{class:"-cbwsdk-snackbar"},s.children));e.SnackbarContainer=c;const p=({autoExpand:s,message:f,menuItems:u})=>{const[m,_]=(0,h.useState)(!0),[y,l]=(0,h.useState)(s??!1);(0,h.useEffect)(()=>{const E=[window.setTimeout(()=>{_(!1)},1),window.setTimeout(()=>{l(!0)},1e4)];return()=>{E.forEach(window.clearTimeout)}});const b=()=>{l(!y)};return(0,r.h)("div",{class:(0,n.default)("-cbwsdk-snackbar-instance",m&&"-cbwsdk-snackbar-instance-hidden",y&&"-cbwsdk-snackbar-instance-expanded")},(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:b},(0,r.h)("img",{src:a,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},f),(0,r.h)("div",{class:"-gear-container"},!y&&(0,r.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,r.h)("img",{src:o,class:"-gear-icon",title:"Expand"}))),u&&u.length>0&&(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},u.map((E,I)=>(0,r.h)("div",{class:(0,n.default)("-cbwsdk-snackbar-instance-menu-item",E.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:E.onClick,key:I},(0,r.h)("svg",{width:E.svgWidth,height:E.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("path",{"fill-rule":E.defaultFillRule,"clip-rule":E.defaultClipRule,d:E.path,fill:"#AAAAAA"})),(0,r.h)("span",{class:(0,n.default)("-cbwsdk-snackbar-instance-menu-item-info",E.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},E.info)))))};e.SnackbarInstance=p})(Dr)),Dr}var Kc;function yd(){if(Kc)return Tr;Kc=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.WalletLinkRelayUI=void 0;const e=Gh(),t=qp(),n=md();let r=class{constructor(i){this.standalone=null,this.attached=!1,this.snackbar=new n.Snackbar({darkMode:i.darkMode}),this.linkFlow=new t.LinkFlow({darkMode:i.darkMode,version:i.version,sessionId:i.session.id,sessionSecret:i.session.secret,linkAPIUrl:i.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const i=document.documentElement,a=document.createElement("div");a.className="-cbwsdk-css-reset",i.appendChild(a),this.linkFlow.attach(a),this.snackbar.attach(a),this.attached=!0,(0,e.injectCssReset)()}setConnected(i){this.linkFlow.setConnected(i)}setChainId(i){this.linkFlow.setChainId(i)}setConnectDisabled(i){this.linkFlow.setConnectDisabled(i)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(i){this.linkFlow.open({onCancel:i.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(i){let a;return i.isUnlinkedErrorState?a={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:i.onResetConnection}]}:a={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:i.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:i.onResetConnection}]},this.snackbar.presentItem(a)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(i){this.standalone=i}isStandalone(){var i;return(i=this.standalone)!==null&&i!==void 0?i:!1}};return Tr.WalletLinkRelayUI=r,Tr}var Qc;function _d(){if(Qc)return Sr;Qc=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.WalletLinkRelay=void 0;const e=Fn(),t=qn(),n=ut(),r=ha(),h=da(),i=ya(),a=X0(),o=la(),d=yd();let c=class Jt extends h.RelayAbstract{constructor(s){var f;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=y=>{var l;this.isLinked=y;const b=this.storage.getItem(h.LOCAL_STORAGE_ADDRESSES_KEY);if(y&&(this.session.linked=y),this.isUnlinkedErrorState=!1,b){const E=b.split(" "),I=this.storage.getItem("IsStandaloneSigning")==="true";if(E[0]!==""&&!y&&this.session.linked&&!I){this.isUnlinkedErrorState=!0;const x=this.getSessionIdHash();(l=this.diagnostic)===null||l===void 0||l.log(r.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:x})}}},this.metadataUpdated=(y,l)=>{this.storage.setItem(y,l)},this.chainUpdated=(y,l)=>{this.chainCallbackParams.chainId===y&&this.chainCallbackParams.jsonRpcUrl===l||(this.chainCallbackParams={chainId:y,jsonRpcUrl:l},this.chainCallback&&this.chainCallback(y,l))},this.accountUpdated=y=>{this.accountsCallback&&this.accountsCallback([y]),Jt.accountRequestCallbackIds.size>0&&(Array.from(Jt.accountRequestCallbackIds.values()).forEach(l=>{const b={type:"WEB3_RESPONSE",id:l,response:{method:"requestEthereumAccounts",result:[y]}};this.invokeCallback(Object.assign(Object.assign({},b),{id:l}))}),Jt.accountRequestCallbackIds.clear())},this.connectedUpdated=y=>{this.ui.setConnected(y)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=s.linkAPIUrl,this.storage=s.storage,this.options=s;const{session:u,ui:m,connection:_}=this.subscribe();this._session=u,this.connection=_,this.relayEventManager=s.relayEventManager,this.diagnostic=s.diagnosticLogger,this._reloadOnDisconnect=(f=s.reloadOnDisconnect)!==null&&f!==void 0?f:!0,this.ui=m}subscribe(){const s=i.Session.load(this.storage)||new i.Session(this.storage).save(),{linkAPIUrl:f,diagnostic:u}=this,m=new a.WalletLinkConnection({session:s,linkAPIUrl:f,diagnostic:u,listener:this}),{version:_,darkMode:y}=this.options,l=this.options.uiConstructor({linkAPIUrl:f,version:_,darkMode:y,session:s});return m.connect(),{session:s,ui:l,connection:m}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(s=>setTimeout(()=>s(null),1e3))]).then(()=>{var s,f;const u=this.ui.isStandalone();(s=this.diagnostic)===null||s===void 0||s.log(r.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const m=i.Session.load(this.storage);if(m?.id===this._session.id?this.storage.clear():m&&((f=this.diagnostic)===null||f===void 0||f.log(r.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i.Session.hash(m.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:_,ui:y,connection:l}=this.subscribe();this._session=_,this.connection=l,this.ui=y,u&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(s=>{var f;(f=this.diagnostic)===null||f===void 0||f.log(r.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${s}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(s,f){this.appName=s,this.appLogoUrl=f}getStorageItem(s){return this.storage.getItem(s)}get session(){return this._session}setStorageItem(s,f){this.storage.setItem(s,f)}signEthereumMessage(s,f,u,m){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,n.hexStringFromBuffer)(s,!0),address:f,addPrefix:u,typedDataJson:m||null}})}ethereumAddressFromSignedMessage(s,f,u){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,n.hexStringFromBuffer)(s,!0),signature:(0,n.hexStringFromBuffer)(f,!0),addPrefix:u}})}signEthereumTransaction(s){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:s.fromAddress,toAddress:s.toAddress,weiValue:(0,n.bigIntStringFromBN)(s.weiValue),data:(0,n.hexStringFromBuffer)(s.data,!0),nonce:s.nonce,gasPriceInWei:s.gasPriceInWei?(0,n.bigIntStringFromBN)(s.gasPriceInWei):null,maxFeePerGas:s.gasPriceInWei?(0,n.bigIntStringFromBN)(s.gasPriceInWei):null,maxPriorityFeePerGas:s.gasPriceInWei?(0,n.bigIntStringFromBN)(s.gasPriceInWei):null,gasLimit:s.gasLimit?(0,n.bigIntStringFromBN)(s.gasLimit):null,chainId:s.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(s){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:s.fromAddress,toAddress:s.toAddress,weiValue:(0,n.bigIntStringFromBN)(s.weiValue),data:(0,n.hexStringFromBuffer)(s.data,!0),nonce:s.nonce,gasPriceInWei:s.gasPriceInWei?(0,n.bigIntStringFromBN)(s.gasPriceInWei):null,maxFeePerGas:s.maxFeePerGas?(0,n.bigIntStringFromBN)(s.maxFeePerGas):null,maxPriorityFeePerGas:s.maxPriorityFeePerGas?(0,n.bigIntStringFromBN)(s.maxPriorityFeePerGas):null,gasLimit:s.gasLimit?(0,n.bigIntStringFromBN)(s.gasLimit):null,chainId:s.chainId,shouldSubmit:!0}})}submitEthereumTransaction(s,f){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,n.hexStringFromBuffer)(s,!0),chainId:f}})}scanQRCode(s){return this.sendRequest({method:"scanQRCode",params:{regExp:s}})}getQRCodeUrl(){return(0,n.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(s,f){return this.sendRequest({method:"generic",params:{action:f,data:s}})}sendGenericMessage(s){return this.sendRequest(s)}sendRequest(s){let f=null;const u=(0,n.randomBytesHex)(8),m=y=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,s.method,y),f?.()};return{promise:new Promise((y,l)=>{this.ui.isStandalone()||(f=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:m,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(u,b=>{if(f?.(),(0,o.isErrorResponse)(b))return l(new Error(b.errorMessage));y(b)}),this.ui.isStandalone()?this.sendRequestStandalone(u,s):this.publishWeb3RequestEvent(u,s)}),cancel:m}}setConnectDisabled(s){this.ui.setConnectDisabled(s)}setAccountsCallback(s){this.accountsCallback=s}setChainCallback(s){this.chainCallback=s}setDappDefaultChainCallback(s){this.dappDefaultChain=s,this.ui instanceof d.WalletLinkRelayUI&&this.ui.setChainId(s)}publishWeb3RequestEvent(s,f){var u;const m={type:"WEB3_REQUEST",id:s,request:f},_=i.Session.load(this.storage);(u=this.diagnostic)===null||u===void 0||u.log(r.EVENTS.WEB3_REQUEST,{eventId:m.id,method:`relay::${f.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:_?i.Session.hash(_.id):"",isSessionMismatched:(_?.id!==this._session.id).toString()}),this.publishEvent("Web3Request",m,!0).then(y=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(r.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:m.id,method:`relay::${f.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:_?i.Session.hash(_.id):"",isSessionMismatched:(_?.id!==this._session.id).toString()})}).catch(y=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:m.id,response:{method:f.method,errorMessage:y.message}})})}publishWeb3RequestCanceledEvent(s){const f={type:"WEB3_REQUEST_CANCELED",id:s};this.publishEvent("Web3RequestCanceled",f,!1).then()}publishEvent(s,f,u){return this.connection.publishEvent(s,f,u)}handleWeb3ResponseMessage(s){var f;const{response:u}=s;if((f=this.diagnostic)===null||f===void 0||f.log(r.EVENTS.WEB3_RESPONSE,{eventId:s.id,method:`relay::${u.method}`,sessionIdHash:this.getSessionIdHash()}),u.method==="requestEthereumAccounts"){Jt.accountRequestCallbackIds.forEach(m=>this.invokeCallback(Object.assign(Object.assign({},s),{id:m}))),Jt.accountRequestCallbackIds.clear();return}this.invokeCallback(s)}handleErrorResponse(s,f,u,m){var _;const y=(_=u?.message)!==null&&_!==void 0?_:(0,e.getMessageFromCode)(m);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:f,errorMessage:y,errorCode:m}})}invokeCallback(s){const f=this.relayEventManager.callbacks.get(s.id);f&&(f(s.response),this.relayEventManager.callbacks.delete(s.id))}requestEthereumAccounts(){const s={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},f=(0,n.randomBytesHex)(8),u=_=>{this.publishWeb3RequestCanceledEvent(f),this.handleErrorResponse(f,s.method,_)};return{promise:new Promise((_,y)=>{if(this.relayEventManager.callbacks.set(f,l=>{if(this.ui.hideRequestEthereumAccounts(),(0,o.isErrorResponse)(l))return y(new Error(l.errorMessage));_(l)}),this.ui.inlineAccountsResponse()){const l=b=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"requestEthereumAccounts",result:b}})};this.ui.requestEthereumAccounts({onCancel:u,onAccounts:l})}else{const l=e.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>u(l)})}Jt.accountRequestCallbackIds.add(f),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(f,s)}),cancel:u}}selectProvider(s){const f={method:"selectProvider"},u=(0,n.randomBytesHex)(8),m=y=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,f.method,y)},_=new Promise((y,l)=>{this.relayEventManager.callbacks.set(u,I=>{if((0,o.isErrorResponse)(I))return l(new Error(I.errorMessage));y(I)});const b=I=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"selectProvider",result:t.ProviderType.Unselected}})},E=I=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"selectProvider",result:I}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:E,onCancel:b,providerOptions:s})});return{cancel:m,promise:_}}watchAsset(s,f,u,m,_,y){const l={method:"watchAsset",params:{type:s,options:{address:f,symbol:u,decimals:m,image:_},chainId:y}};let b=null;const E=(0,n.randomBytesHex)(8),I=D=>{this.publishWeb3RequestCanceledEvent(E),this.handleErrorResponse(E,l.method,D),b?.()};this.ui.inlineWatchAsset()||(b=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:I,onResetConnection:this.resetAndReload}));const x=new Promise((D,F)=>{this.relayEventManager.callbacks.set(E,ee=>{if(b?.(),(0,o.isErrorResponse)(ee))return F(new Error(ee.errorMessage));D(ee)});const W=ee=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:E,response:{method:"watchAsset",result:!1}})},J=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:E,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:J,onCancel:W,type:s,address:f,symbol:u,decimals:m,image:_,chainId:y}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(E,l)});return{cancel:I,promise:x}}addEthereumChain(s,f,u,m,_,y){const l={method:"addEthereumChain",params:{chainId:s,rpcUrls:f,blockExplorerUrls:m,chainName:_,iconUrls:u,nativeCurrency:y}};let b=null;const E=(0,n.randomBytesHex)(8),I=D=>{this.publishWeb3RequestCanceledEvent(E),this.handleErrorResponse(E,l.method,D),b?.()};return this.ui.inlineAddEthereumChain(s)||(b=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:I,onResetConnection:this.resetAndReload})),{promise:new Promise((D,F)=>{this.relayEventManager.callbacks.set(E,ee=>{if(b?.(),(0,o.isErrorResponse)(ee))return F(new Error(ee.errorMessage));D(ee)});const W=ee=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:E,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},J=ee=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:E,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:ee}}})};this.ui.inlineAddEthereumChain(s)&&this.ui.addEthereumChain({onCancel:W,onApprove:J,chainId:l.params.chainId,rpcUrls:l.params.rpcUrls,blockExplorerUrls:l.params.blockExplorerUrls,chainName:l.params.chainName,iconUrls:l.params.iconUrls,nativeCurrency:l.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(s)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(E,l)}),cancel:I}}switchEthereumChain(s,f){const u={method:"switchEthereumChain",params:Object.assign({chainId:s},{address:f})},m=(0,n.randomBytesHex)(8),_=l=>{this.publishWeb3RequestCanceledEvent(m),this.handleErrorResponse(m,u.method,l)};return{promise:new Promise((l,b)=>{this.relayEventManager.callbacks.set(m,x=>{if((0,o.isErrorResponse)(x)&&x.errorCode)return b(e.standardErrors.provider.custom({code:x.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,o.isErrorResponse)(x))return b(new Error(x.errorMessage));l(x)});const E=x=>{var D;if(x){const F=(D=(0,e.getErrorCode)(x))!==null&&D!==void 0?D:e.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(m,"switchEthereumChain",x instanceof Error?x:e.standardErrors.provider.unsupportedChain(s),F)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:m,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},I=x=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:m,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:x}}})};this.ui.switchEthereumChain({onCancel:E,onApprove:I,chainId:u.params.chainId,address:u.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(m,u)}),cancel:_}}inlineAddEthereumChain(s){return this.ui.inlineAddEthereumChain(s)}getSessionIdHash(){return i.Session.hash(this._session.id)}sendRequestStandalone(s,f){const u=_=>{this.handleErrorResponse(s,f.method,_)},m=_=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:_})};switch(f.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:f,onSuccess:m,onCancel:u});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:f,onSuccess:m,onCancel:u});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:f,onSuccess:m,onCancel:u});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:f,onSuccess:m});break;default:u();break}}};return Sr.WalletLinkRelay=c,c.accountRequestCallbackIds=new Set,Sr}var jr={},Ot={},Ft={},Yc;function jp(){return Yc||(Yc=1,(function(e){var t=Ft&&Ft.__createBinding||(Object.create?(function(r,h,i,a){a===void 0&&(a=i);var o=Object.getOwnPropertyDescriptor(h,i);(!o||("get"in o?!h.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return h[i]}}),Object.defineProperty(r,a,o)}):(function(r,h,i,a){a===void 0&&(a=i),r[a]=h[i]})),n=Ft&&Ft.__exportStar||function(r,h){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(h,i)&&t(h,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(md(),e)})(Ft)),Ft}var Rn={},Xc;function Up(){return Xc||(Xc=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"),Rn}var el;function Hp(){if(el)return Ot;el=1;var e=Ot&&Ot.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.RedirectDialog=void 0;const t=e(un),n=Ge,r=Gh(),h=jp(),i=e(Up());let a=class{constructor(){this.root=null}attach(){const c=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",c.appendChild(this.root),(0,r.injectCssReset)()}present(c){this.render(c)}clear(){this.render(null)}render(c){this.root&&((0,n.render)(null,this.root),c&&(0,n.render)((0,n.h)(o,Object.assign({},c,{onDismiss:()=>{this.clear()}})),this.root))}};Ot.RedirectDialog=a;const o=({title:d,buttonText:c,darkMode:p,onButtonClick:s,onDismiss:f})=>{const u=p?"dark":"light";return(0,n.h)(h.SnackbarContainer,{darkMode:p},(0,n.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,n.h)("style",null,i.default),(0,n.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:f}),(0,n.h)("div",{class:(0,t.default)("-cbwsdk-redirect-dialog-box",u)},(0,n.h)("p",null,d),(0,n.h)("button",{onClick:s},c))))};return Ot}var tl;function vd(){if(tl)return jr;tl=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.MobileRelayUI=void 0;const e=Hp();let t=class{constructor(r){this.attached=!1,this.darkMode=!1,this.redirectDialog=new e.RedirectDialog,this.darkMode=r.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(r){}redirectToCoinbaseWallet(r){const h=new URL("https://go.cb-w.com/walletlink");h.searchParams.append("redirect_url",window.location.href),r&&h.searchParams.append("wl_url",r);const i=document.createElement("a");i.target="cbw-opener",i.href=h.href,i.rel="noreferrer noopener",i.click()}openCoinbaseWalletDeeplink(r){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(r)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(r)},99)}showConnecting(r){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}};return jr.MobileRelayUI=t,jr}var rl;function bd(){if(rl)return Rr;rl=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.MobileRelay=void 0;const e=ut(),t=_d(),n=vd();let r=class extends t.WalletLinkRelay{constructor(i){var a;super(i),this._enableMobileWalletLink=(a=i.enableMobileWalletLink)!==null&&a!==void 0?a:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const i=(0,e.getLocation)();i.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(i.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(i,a){if(super.publishWeb3RequestEvent(i,a),!(this._enableMobileWalletLink&&this.ui instanceof n.MobileRelayUI))return;let o=!1;switch(a.method){case"requestEthereumAccounts":case"connectAndSignIn":o=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:o=!0,this.ui.openCoinbaseWalletDeeplink();break}o&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(i){super.handleWeb3ResponseMessage(i)}connectAndSignIn(i){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:i.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:i.statement,resources:i.resources}})}};return Rr.MobileRelay=r,Rr}var Sn={exports:{}},us,nl;function wd(){return nl||(nl=1,us=Ln().EventEmitter),us}var cs,il;function Wp(){if(il)return cs;il=1;function e(m,_){var y=Object.keys(m);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(m);_&&(l=l.filter(function(b){return Object.getOwnPropertyDescriptor(m,b).enumerable})),y.push.apply(y,l)}return y}function t(m){for(var _=1;_<arguments.length;_++){var y=arguments[_]!=null?arguments[_]:{};_%2?e(Object(y),!0).forEach(function(l){n(m,l,y[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(l){Object.defineProperty(m,l,Object.getOwnPropertyDescriptor(y,l))})}return m}function n(m,_,y){return _=a(_),_ in m?Object.defineProperty(m,_,{value:y,enumerable:!0,configurable:!0,writable:!0}):m[_]=y,m}function r(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")}function h(m,_){for(var y=0;y<_.length;y++){var l=_[y];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(m,a(l.key),l)}}function i(m,_,y){return _&&h(m.prototype,_),Object.defineProperty(m,"prototype",{writable:!1}),m}function a(m){var _=o(m,"string");return typeof _=="symbol"?_:String(_)}function o(m,_){if(typeof m!="object"||m===null)return m;var y=m[Symbol.toPrimitive];if(y!==void 0){var l=y.call(m,_);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(m)}var d=Dn(),c=d.Buffer,p=ua,s=p.inspect,f=s&&s.custom||"inspect";function u(m,_,y){c.prototype.copy.call(m,_,y)}return cs=(function(){function m(){r(this,m),this.head=null,this.tail=null,this.length=0}return i(m,[{key:"push",value:function(y){var l={data:y,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length}},{key:"unshift",value:function(y){var l={data:y,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var l=this.head,b=""+l.data;l=l.next;)b+=y+l.data;return b}},{key:"concat",value:function(y){if(this.length===0)return c.alloc(0);for(var l=c.allocUnsafe(y>>>0),b=this.head,E=0;b;)u(b.data,l,E),E+=b.data.length,b=b.next;return l}},{key:"consume",value:function(y,l){var b;return y<this.head.data.length?(b=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?b=this.shift():b=l?this._getString(y):this._getBuffer(y),b}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var l=this.head,b=1,E=l.data;for(y-=E.length;l=l.next;){var I=l.data,x=y>I.length?I.length:y;if(x===I.length?E+=I:E+=I.slice(0,y),y-=x,y===0){x===I.length?(++b,l.next?this.head=l.next:this.head=this.tail=null):(this.head=l,l.data=I.slice(x));break}++b}return this.length-=b,E}},{key:"_getBuffer",value:function(y){var l=c.allocUnsafe(y),b=this.head,E=1;for(b.data.copy(l),y-=b.data.length;b=b.next;){var I=b.data,x=y>I.length?I.length:y;if(I.copy(l,l.length-y,0,x),y-=x,y===0){x===I.length?(++E,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=I.slice(x));break}++E}return this.length-=E,l}},{key:f,value:function(y,l){return s(this,t(t({},l),{},{depth:0,customInspect:!1}))}}]),m})(),cs}var ls,sl;function Ed(){if(sl)return ls;sl=1;function e(a,o){var d=this,c=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return c||p?(o?o(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(h,this,a)):process.nextTick(h,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(s){!o&&s?d._writableState?d._writableState.errorEmitted?process.nextTick(n,d):(d._writableState.errorEmitted=!0,process.nextTick(t,d,s)):process.nextTick(t,d,s):o?(process.nextTick(n,d),o(s)):process.nextTick(n,d)}),this)}function t(a,o){h(a,o),n(a)}function n(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function h(a,o){a.emit("error",o)}function i(a,o){var d=a._readableState,c=a._writableState;d&&d.autoDestroy||c&&c.autoDestroy?a.destroy(o):a.emit("error",o)}return ls={destroy:e,undestroy:r,errorOrDestroy:i},ls}var fs={},ol;function hr(){if(ol)return fs;ol=1;function e(o,d){o.prototype=Object.create(d.prototype),o.prototype.constructor=o,o.__proto__=d}var t={};function n(o,d,c){c||(c=Error);function p(f,u,m){return typeof d=="string"?d:d(f,u,m)}var s=(function(f){e(u,f);function u(m,_,y){return f.call(this,p(m,_,y))||this}return u})(c);s.prototype.name=c.name,s.prototype.code=o,t[o]=s}function r(o,d){if(Array.isArray(o)){var c=o.length;return o=o.map(function(p){return String(p)}),c>2?"one of ".concat(d," ").concat(o.slice(0,c-1).join(", "),", or ")+o[c-1]:c===2?"one of ".concat(d," ").concat(o[0]," or ").concat(o[1]):"of ".concat(d," ").concat(o[0])}else return"of ".concat(d," ").concat(String(o))}function h(o,d,c){return o.substr(0,d.length)===d}function i(o,d,c){return(c===void 0||c>o.length)&&(c=o.length),o.substring(c-d.length,c)===d}function a(o,d,c){return typeof c!="number"&&(c=0),c+d.length>o.length?!1:o.indexOf(d,c)!==-1}return n("ERR_INVALID_OPT_VALUE",function(o,d){return'The value "'+d+'" is invalid for option "'+o+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(o,d,c){var p;typeof d=="string"&&h(d,"not ")?(p="must not be",d=d.replace(/^not /,"")):p="must be";var s;if(i(o," argument"))s="The ".concat(o," ").concat(p," ").concat(r(d,"type"));else{var f=a(o,".")?"property":"argument";s='The "'.concat(o,'" ').concat(f," ").concat(p," ").concat(r(d,"type"))}return s+=". Received type ".concat(typeof c),s},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),fs.codes=t,fs}var hs,al;function Rd(){if(al)return hs;al=1;var e=hr().codes.ERR_INVALID_OPT_VALUE;function t(r,h,i){return r.highWaterMark!=null?r.highWaterMark:h?r[i]:null}function n(r,h,i,a){var o=t(h,a,i);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var d=a?i:"highWaterMark";throw new e(d,o)}return Math.floor(o)}return r.objectMode?16:16*1024}return hs={getHighWaterMark:n},hs}var ds,ul;function $p(){if(ul)return ds;ul=1,ds=e;function e(n,r){if(t("noDeprecation"))return n;var h=!1;function i(){if(!h){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),h=!0}return n.apply(this,arguments)}return i}function t(n){try{if(!ft.localStorage)return!1}catch{return!1}var r=ft.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return ds}var ps,cl;function Sd(){if(cl)return ps;cl=1,ps=W;function e(U){var $=this;this.next=null,this.entry=null,this.finish=function(){Y($,U)}}var t;W.WritableState=D;var n={deprecate:$p()},r=wd(),h=Dn().Buffer,i=(typeof ft<"u"?ft:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(U){return h.from(U)}function o(U){return h.isBuffer(U)||U instanceof i}var d=Ed(),c=Rd(),p=c.getHighWaterMark,s=hr().codes,f=s.ERR_INVALID_ARG_TYPE,u=s.ERR_METHOD_NOT_IMPLEMENTED,m=s.ERR_MULTIPLE_CALLBACK,_=s.ERR_STREAM_CANNOT_PIPE,y=s.ERR_STREAM_DESTROYED,l=s.ERR_STREAM_NULL_VALUES,b=s.ERR_STREAM_WRITE_AFTER_END,E=s.ERR_UNKNOWN_ENCODING,I=d.errorOrDestroy;tt()(W,r);function x(){}function D(U,$,G){t=t||cr(),U=U||{},typeof G!="boolean"&&(G=$ instanceof t),this.objectMode=!!U.objectMode,G&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=p(this,U,"writableHighWaterMark",G),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var X=U.decodeStrings===!1;this.decodeStrings=!X,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){C($,ne)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}D.prototype.getBuffer=function(){for(var $=this.bufferedRequest,G=[];$;)G.push($),$=$.next;return G},(function(){try{Object.defineProperty(D.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var F;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(F=Function.prototype[Symbol.hasInstance],Object.defineProperty(W,Symbol.hasInstance,{value:function($){return F.call(this,$)?!0:this!==W?!1:$&&$._writableState instanceof D}})):F=function($){return $ instanceof this};function W(U){t=t||cr();var $=this instanceof t;if(!$&&!F.call(W,this))return new W(U);this._writableState=new D(U,this,$),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),r.call(this)}W.prototype.pipe=function(){I(this,new _)};function J(U,$){var G=new b;I(U,G),process.nextTick($,G)}function ee(U,$,G,X){var ne;return G===null?ne=new l:typeof G!="string"&&!$.objectMode&&(ne=new f("chunk",["string","Buffer"],G)),ne?(I(U,ne),process.nextTick(X,ne),!1):!0}W.prototype.write=function(U,$,G){var X=this._writableState,ne=!1,B=!X.objectMode&&o(U);return B&&!h.isBuffer(U)&&(U=a(U)),typeof $=="function"&&(G=$,$=null),B?$="buffer":$||($=X.defaultEncoding),typeof G!="function"&&(G=x),X.ending?J(this,G):(B||ee(this,X,U,G))&&(X.pendingcb++,ne=re(this,X,B,U,$,G)),ne},W.prototype.cork=function(){this._writableState.corked++},W.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&L(this,U))},W.prototype.setDefaultEncoding=function($){if(typeof $=="string"&&($=$.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf(($+"").toLowerCase())>-1))throw new E($);return this._writableState.defaultEncoding=$,this},Object.defineProperty(W.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Q(U,$,G){return!U.objectMode&&U.decodeStrings!==!1&&typeof $=="string"&&($=h.from($,G)),$}Object.defineProperty(W.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function re(U,$,G,X,ne,B){if(!G){var P=Q($,X,ne);X!==P&&(G=!0,ne="buffer",X=P)}var Z=$.objectMode?1:X.length;$.length+=Z;var K=$.length<$.highWaterMark;if(K||($.needDrain=!0),$.writing||$.corked){var oe=$.lastBufferedRequest;$.lastBufferedRequest={chunk:X,encoding:ne,isBuf:G,callback:B,next:null},oe?oe.next=$.lastBufferedRequest:$.bufferedRequest=$.lastBufferedRequest,$.bufferedRequestCount+=1}else q(U,$,!1,Z,X,ne,B);return K}function q(U,$,G,X,ne,B,P){$.writelen=X,$.writecb=P,$.writing=!0,$.sync=!0,$.destroyed?$.onwrite(new y("write")):G?U._writev(ne,$.onwrite):U._write(ne,B,$.onwrite),$.sync=!1}function g(U,$,G,X,ne){--$.pendingcb,G?(process.nextTick(ne,X),process.nextTick(N,U,$),U._writableState.errorEmitted=!0,I(U,X)):(ne(X),U._writableState.errorEmitted=!0,I(U,X),N(U,$))}function R(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}function C(U,$){var G=U._writableState,X=G.sync,ne=G.writecb;if(typeof ne!="function")throw new m;if(R(G),$)g(U,G,X,$,ne);else{var B=j(G)||U.destroyed;!B&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&L(U,G),X?process.nextTick(M,U,G,B,ne):M(U,G,B,ne)}}function M(U,$,G,X){G||A(U,$),$.pendingcb--,X(),N(U,$)}function A(U,$){$.length===0&&$.needDrain&&($.needDrain=!1,U.emit("drain"))}function L(U,$){$.bufferProcessing=!0;var G=$.bufferedRequest;if(U._writev&&G&&G.next){var X=$.bufferedRequestCount,ne=new Array(X),B=$.corkedRequestsFree;B.entry=G;for(var P=0,Z=!0;G;)ne[P]=G,G.isBuf||(Z=!1),G=G.next,P+=1;ne.allBuffers=Z,q(U,$,!0,$.length,ne,"",B.finish),$.pendingcb++,$.lastBufferedRequest=null,B.next?($.corkedRequestsFree=B.next,B.next=null):$.corkedRequestsFree=new e($),$.bufferedRequestCount=0}else{for(;G;){var K=G.chunk,oe=G.encoding,ie=G.callback,se=$.objectMode?1:K.length;if(q(U,$,!1,se,K,oe,ie),G=G.next,$.bufferedRequestCount--,$.writing)break}G===null&&($.lastBufferedRequest=null)}$.bufferedRequest=G,$.bufferProcessing=!1}W.prototype._write=function(U,$,G){G(new u("_write()"))},W.prototype._writev=null,W.prototype.end=function(U,$,G){var X=this._writableState;return typeof U=="function"?(G=U,U=null,$=null):typeof $=="function"&&(G=$,$=null),U!=null&&this.write(U,$),X.corked&&(X.corked=1,this.uncork()),X.ending||te(this,X,G),this},Object.defineProperty(W.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function j(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function T(U,$){U._final(function(G){$.pendingcb--,G&&I(U,G),$.prefinished=!0,U.emit("prefinish"),N(U,$)})}function w(U,$){!$.prefinished&&!$.finalCalled&&(typeof U._final=="function"&&!$.destroyed?($.pendingcb++,$.finalCalled=!0,process.nextTick(T,U,$)):($.prefinished=!0,U.emit("prefinish")))}function N(U,$){var G=j($);if(G&&(w(U,$),$.pendingcb===0&&($.finished=!0,U.emit("finish"),$.autoDestroy))){var X=U._readableState;(!X||X.autoDestroy&&X.endEmitted)&&U.destroy()}return G}function te(U,$,G){$.ending=!0,N(U,$),G&&($.finished?process.nextTick(G):U.once("finish",G)),$.ended=!0,U.writable=!1}function Y(U,$,G){var X=U.entry;for(U.entry=null;X;){var ne=X.callback;$.pendingcb--,ne(G),X=X.next}$.corkedRequestsFree.next=U}return Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function($){this._writableState&&(this._writableState.destroyed=$)}}),W.prototype.destroy=d.destroy,W.prototype._undestroy=d.undestroy,W.prototype._destroy=function(U,$){$(U)},ps}var gs,ll;function cr(){if(ll)return gs;ll=1;var e=Object.keys||function(c){var p=[];for(var s in c)p.push(s);return p};gs=a;var t=Cd(),n=Sd();tt()(a,t);for(var r=e(n.prototype),h=0;h<r.length;h++){var i=r[h];a.prototype[i]||(a.prototype[i]=n.prototype[i])}function a(c){if(!(this instanceof a))return new a(c);t.call(this,c),n.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",o)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function o(){this._writableState.ended||process.nextTick(d,this)}function d(c){c.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(p){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=p,this._writableState.destroyed=p)}}),gs}var ms={},fl;function hl(){if(fl)return ms;fl=1;var e=ct().Buffer,t=e.isEncoding||function(l){switch(l=""+l,l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(l){if(!l)return"utf8";for(var b;;)switch(l){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return l;default:if(b)return;l=(""+l).toLowerCase(),b=!0}}function r(l){var b=n(l);if(typeof b!="string"&&(e.isEncoding===t||!t(l)))throw new Error("Unknown encoding: "+l);return b||l}ms.StringDecoder=h;function h(l){this.encoding=r(l);var b;switch(this.encoding){case"utf16le":this.text=s,this.end=f,b=4;break;case"utf8":this.fillLast=d,b=4;break;case"base64":this.text=u,this.end=m,b=3;break;default:this.write=_,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(b)}h.prototype.write=function(l){if(l.length===0)return"";var b,E;if(this.lastNeed){if(b=this.fillLast(l),b===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<l.length?b?b+this.text(l,E):this.text(l,E):b||""},h.prototype.end=p,h.prototype.text=c,h.prototype.fillLast=function(l){if(this.lastNeed<=l.length)return l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,l.length),this.lastNeed-=l.length};function i(l){return l<=127?0:l>>5===6?2:l>>4===14?3:l>>3===30?4:l>>6===2?-1:-2}function a(l,b,E){var I=b.length-1;if(I<E)return 0;var x=i(b[I]);return x>=0?(x>0&&(l.lastNeed=x-1),x):--I<E||x===-2?0:(x=i(b[I]),x>=0?(x>0&&(l.lastNeed=x-2),x):--I<E||x===-2?0:(x=i(b[I]),x>=0?(x>0&&(x===2?x=0:l.lastNeed=x-3),x):0))}function o(l,b,E){if((b[0]&192)!==128)return l.lastNeed=0,"�";if(l.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return l.lastNeed=1,"�";if(l.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return l.lastNeed=2,"�"}}function d(l){var b=this.lastTotal-this.lastNeed,E=o(this,l);if(E!==void 0)return E;if(this.lastNeed<=l.length)return l.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,b,0,l.length),this.lastNeed-=l.length}function c(l,b){var E=a(this,l,b);if(!this.lastNeed)return l.toString("utf8",b);this.lastTotal=E;var I=l.length-(E-this.lastNeed);return l.copy(this.lastChar,0,I),l.toString("utf8",b,I)}function p(l){var b=l&&l.length?this.write(l):"";return this.lastNeed?b+"�":b}function s(l,b){if((l.length-b)%2===0){var E=l.toString("utf16le",b);if(E){var I=E.charCodeAt(E.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",b,l.length-1)}function f(l){var b=l&&l.length?this.write(l):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,E)}return b}function u(l,b){var E=(l.length-b)%3;return E===0?l.toString("base64",b):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",b,l.length-E))}function m(l){var b=l&&l.length?this.write(l):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function _(l){return l.toString(this.encoding)}function y(l){return l&&l.length?this.write(l):""}return ms}var ys,dl;function Sa(){if(dl)return ys;dl=1;var e=hr().codes.ERR_STREAM_PREMATURE_CLOSE;function t(i){var a=!1;return function(){if(!a){a=!0;for(var o=arguments.length,d=new Array(o),c=0;c<o;c++)d[c]=arguments[c];i.apply(this,d)}}}function n(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function h(i,a,o){if(typeof a=="function")return h(i,null,a);a||(a={}),o=t(o||n);var d=a.readable||a.readable!==!1&&i.readable,c=a.writable||a.writable!==!1&&i.writable,p=function(){i.writable||f()},s=i._writableState&&i._writableState.finished,f=function(){c=!1,s=!0,d||o.call(i)},u=i._readableState&&i._readableState.endEmitted,m=function(){d=!1,u=!0,c||o.call(i)},_=function(E){o.call(i,E)},y=function(){var E;if(d&&!u)return(!i._readableState||!i._readableState.ended)&&(E=new e),o.call(i,E);if(c&&!s)return(!i._writableState||!i._writableState.ended)&&(E=new e),o.call(i,E)},l=function(){i.req.on("finish",f)};return r(i)?(i.on("complete",f),i.on("abort",y),i.req?l():i.on("request",l)):c&&!i._writableState&&(i.on("end",p),i.on("close",p)),i.on("end",m),i.on("finish",f),a.error!==!1&&i.on("error",_),i.on("close",y),function(){i.removeListener("complete",f),i.removeListener("abort",y),i.removeListener("request",l),i.req&&i.req.removeListener("finish",f),i.removeListener("end",p),i.removeListener("close",p),i.removeListener("finish",f),i.removeListener("end",m),i.removeListener("error",_),i.removeListener("close",y)}}return ys=h,ys}var _s,pl;function Vp(){if(pl)return _s;pl=1;var e;function t(E,I,x){return I=n(I),I in E?Object.defineProperty(E,I,{value:x,enumerable:!0,configurable:!0,writable:!0}):E[I]=x,E}function n(E){var I=r(E,"string");return typeof I=="symbol"?I:String(I)}function r(E,I){if(typeof E!="object"||E===null)return E;var x=E[Symbol.toPrimitive];if(x!==void 0){var D=x.call(E,I);if(typeof D!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(E)}var h=Sa(),i=Symbol("lastResolve"),a=Symbol("lastReject"),o=Symbol("error"),d=Symbol("ended"),c=Symbol("lastPromise"),p=Symbol("handlePromise"),s=Symbol("stream");function f(E,I){return{value:E,done:I}}function u(E){var I=E[i];if(I!==null){var x=E[s].read();x!==null&&(E[c]=null,E[i]=null,E[a]=null,I(f(x,!1)))}}function m(E){process.nextTick(u,E)}function _(E,I){return function(x,D){E.then(function(){if(I[d]){x(f(void 0,!0));return}I[p](x,D)},D)}}var y=Object.getPrototypeOf(function(){}),l=Object.setPrototypeOf((e={get stream(){return this[s]},next:function(){var I=this,x=this[o];if(x!==null)return Promise.reject(x);if(this[d])return Promise.resolve(f(void 0,!0));if(this[s].destroyed)return new Promise(function(J,ee){process.nextTick(function(){I[o]?ee(I[o]):J(f(void 0,!0))})});var D=this[c],F;if(D)F=new Promise(_(D,this));else{var W=this[s].read();if(W!==null)return Promise.resolve(f(W,!1));F=new Promise(this[p])}return this[c]=F,F}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var I=this;return new Promise(function(x,D){I[s].destroy(null,function(F){if(F){D(F);return}x(f(void 0,!0))})})}),e),y),b=function(I){var x,D=Object.create(l,(x={},t(x,s,{value:I,writable:!0}),t(x,i,{value:null,writable:!0}),t(x,a,{value:null,writable:!0}),t(x,o,{value:null,writable:!0}),t(x,d,{value:I._readableState.endEmitted,writable:!0}),t(x,p,{value:function(W,J){var ee=D[s].read();ee?(D[c]=null,D[i]=null,D[a]=null,W(f(ee,!1))):(D[i]=W,D[a]=J)},writable:!0}),x));return D[c]=null,h(I,function(F){if(F&&F.code!=="ERR_STREAM_PREMATURE_CLOSE"){var W=D[a];W!==null&&(D[c]=null,D[i]=null,D[a]=null,W(F)),D[o]=F;return}var J=D[i];J!==null&&(D[c]=null,D[i]=null,D[a]=null,J(f(void 0,!0))),D[d]=!0}),I.on("readable",m.bind(null,D)),D};return _s=b,_s}var vs,gl;function zp(){return gl||(gl=1,vs=function(){throw new Error("Readable.from is not available in the browser")}),vs}var bs,ml;function Cd(){if(ml)return bs;ml=1,bs=J;var e;J.ReadableState=W,Ln().EventEmitter;var t=function(P,Z){return P.listeners(Z).length},n=wd(),r=Dn().Buffer,h=(typeof ft<"u"?ft:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(B){return r.from(B)}function a(B){return r.isBuffer(B)||B instanceof h}var o=ua,d;o&&o.debuglog?d=o.debuglog("stream"):d=function(){};var c=Wp(),p=Ed(),s=Rd(),f=s.getHighWaterMark,u=hr().codes,m=u.ERR_INVALID_ARG_TYPE,_=u.ERR_STREAM_PUSH_AFTER_EOF,y=u.ERR_METHOD_NOT_IMPLEMENTED,l=u.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,E,I;tt()(J,n);var x=p.errorOrDestroy,D=["error","close","destroy","pause","resume"];function F(B,P,Z){if(typeof B.prependListener=="function")return B.prependListener(P,Z);!B._events||!B._events[P]?B.on(P,Z):Array.isArray(B._events[P])?B._events[P].unshift(Z):B._events[P]=[Z,B._events[P]]}function W(B,P,Z){e=e||cr(),B=B||{},typeof Z!="boolean"&&(Z=P instanceof e),this.objectMode=!!B.objectMode,Z&&(this.objectMode=this.objectMode||!!B.readableObjectMode),this.highWaterMark=f(this,B,"readableHighWaterMark",Z),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=B.emitClose!==!1,this.autoDestroy=!!B.autoDestroy,this.destroyed=!1,this.defaultEncoding=B.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,B.encoding&&(b||(b=hl().StringDecoder),this.decoder=new b(B.encoding),this.encoding=B.encoding)}function J(B){if(e=e||cr(),!(this instanceof J))return new J(B);var P=this instanceof e;this._readableState=new W(B,this,P),this.readable=!0,B&&(typeof B.read=="function"&&(this._read=B.read),typeof B.destroy=="function"&&(this._destroy=B.destroy)),n.call(this)}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(P){this._readableState&&(this._readableState.destroyed=P)}}),J.prototype.destroy=p.destroy,J.prototype._undestroy=p.undestroy,J.prototype._destroy=function(B,P){P(B)},J.prototype.push=function(B,P){var Z=this._readableState,K;return Z.objectMode?K=!0:typeof B=="string"&&(P=P||Z.defaultEncoding,P!==Z.encoding&&(B=r.from(B,P),P=""),K=!0),ee(this,B,P,!1,K)},J.prototype.unshift=function(B){return ee(this,B,null,!0,!1)};function ee(B,P,Z,K,oe){d("readableAddChunk",P);var ie=B._readableState;if(P===null)ie.reading=!1,C(B,ie);else{var se;if(oe||(se=re(ie,P)),se)x(B,se);else if(ie.objectMode||P&&P.length>0)if(typeof P!="string"&&!ie.objectMode&&Object.getPrototypeOf(P)!==r.prototype&&(P=i(P)),K)ie.endEmitted?x(B,new l):Q(B,ie,P,!0);else if(ie.ended)x(B,new _);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!Z?(P=ie.decoder.write(P),ie.objectMode||P.length!==0?Q(B,ie,P,!1):L(B,ie)):Q(B,ie,P,!1)}else K||(ie.reading=!1,L(B,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function Q(B,P,Z,K){P.flowing&&P.length===0&&!P.sync?(P.awaitDrain=0,B.emit("data",Z)):(P.length+=P.objectMode?1:Z.length,K?P.buffer.unshift(Z):P.buffer.push(Z),P.needReadable&&M(B)),L(B,P)}function re(B,P){var Z;return!a(P)&&typeof P!="string"&&P!==void 0&&!B.objectMode&&(Z=new m("chunk",["string","Buffer","Uint8Array"],P)),Z}J.prototype.isPaused=function(){return this._readableState.flowing===!1},J.prototype.setEncoding=function(B){b||(b=hl().StringDecoder);var P=new b(B);this._readableState.decoder=P,this._readableState.encoding=this._readableState.decoder.encoding;for(var Z=this._readableState.buffer.head,K="";Z!==null;)K+=P.write(Z.data),Z=Z.next;return this._readableState.buffer.clear(),K!==""&&this._readableState.buffer.push(K),this._readableState.length=K.length,this};var q=1073741824;function g(B){return B>=q?B=q:(B--,B|=B>>>1,B|=B>>>2,B|=B>>>4,B|=B>>>8,B|=B>>>16,B++),B}function R(B,P){return B<=0||P.length===0&&P.ended?0:P.objectMode?1:B!==B?P.flowing&&P.length?P.buffer.head.data.length:P.length:(B>P.highWaterMark&&(P.highWaterMark=g(B)),B<=P.length?B:P.ended?P.length:(P.needReadable=!0,0))}J.prototype.read=function(B){d("read",B),B=parseInt(B,10);var P=this._readableState,Z=B;if(B!==0&&(P.emittedReadable=!1),B===0&&P.needReadable&&((P.highWaterMark!==0?P.length>=P.highWaterMark:P.length>0)||P.ended))return d("read: emitReadable",P.length,P.ended),P.length===0&&P.ended?G(this):M(this),null;if(B=R(B,P),B===0&&P.ended)return P.length===0&&G(this),null;var K=P.needReadable;d("need readable",K),(P.length===0||P.length-B<P.highWaterMark)&&(K=!0,d("length less than watermark",K)),P.ended||P.reading?(K=!1,d("reading or ended",K)):K&&(d("do read"),P.reading=!0,P.sync=!0,P.length===0&&(P.needReadable=!0),this._read(P.highWaterMark),P.sync=!1,P.reading||(B=R(Z,P)));var oe;return B>0?oe=$(B,P):oe=null,oe===null?(P.needReadable=P.length<=P.highWaterMark,B=0):(P.length-=B,P.awaitDrain=0),P.length===0&&(P.ended||(P.needReadable=!0),Z!==B&&P.ended&&G(this)),oe!==null&&this.emit("data",oe),oe};function C(B,P){if(d("onEofChunk"),!P.ended){if(P.decoder){var Z=P.decoder.end();Z&&Z.length&&(P.buffer.push(Z),P.length+=P.objectMode?1:Z.length)}P.ended=!0,P.sync?M(B):(P.needReadable=!1,P.emittedReadable||(P.emittedReadable=!0,A(B)))}}function M(B){var P=B._readableState;d("emitReadable",P.needReadable,P.emittedReadable),P.needReadable=!1,P.emittedReadable||(d("emitReadable",P.flowing),P.emittedReadable=!0,process.nextTick(A,B))}function A(B){var P=B._readableState;d("emitReadable_",P.destroyed,P.length,P.ended),!P.destroyed&&(P.length||P.ended)&&(B.emit("readable"),P.emittedReadable=!1),P.needReadable=!P.flowing&&!P.ended&&P.length<=P.highWaterMark,U(B)}function L(B,P){P.readingMore||(P.readingMore=!0,process.nextTick(j,B,P))}function j(B,P){for(;!P.reading&&!P.ended&&(P.length<P.highWaterMark||P.flowing&&P.length===0);){var Z=P.length;if(d("maybeReadMore read 0"),B.read(0),Z===P.length)break}P.readingMore=!1}J.prototype._read=function(B){x(this,new y("_read()"))},J.prototype.pipe=function(B,P){var Z=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=B;break;case 1:K.pipes=[K.pipes,B];break;default:K.pipes.push(B);break}K.pipesCount+=1,d("pipe count=%d opts=%j",K.pipesCount,P);var oe=(!P||P.end!==!1)&&B!==process.stdout&&B!==process.stderr,ie=oe?de:ve;K.endEmitted?process.nextTick(ie):Z.once("end",ie),B.on("unpipe",se);function se(k,v){d("onunpipe"),k===Z&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,ue())}function de(){d("onend"),B.end()}var He=T(Z);B.on("drain",He);var ge=!1;function ue(){d("cleanup"),B.removeListener("close",me),B.removeListener("finish",$e),B.removeListener("drain",He),B.removeListener("error",pe),B.removeListener("unpipe",se),Z.removeListener("end",de),Z.removeListener("end",ve),Z.removeListener("data",ye),ge=!0,K.awaitDrain&&(!B._writableState||B._writableState.needDrain)&&He()}Z.on("data",ye);function ye(k){d("ondata");var v=B.write(k);d("dest.write",v),v===!1&&((K.pipesCount===1&&K.pipes===B||K.pipesCount>1&&ne(K.pipes,B)!==-1)&&!ge&&(d("false write response, pause",K.awaitDrain),K.awaitDrain++),Z.pause())}function pe(k){d("onerror",k),ve(),B.removeListener("error",pe),t(B,"error")===0&&x(B,k)}F(B,"error",pe);function me(){B.removeListener("finish",$e),ve()}B.once("close",me);function $e(){d("onfinish"),B.removeListener("close",me),ve()}B.once("finish",$e);function ve(){d("unpipe"),Z.unpipe(B)}return B.emit("pipe",Z),K.flowing||(d("pipe resume"),Z.resume()),B};function T(B){return function(){var Z=B._readableState;d("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&t(B,"data")&&(Z.flowing=!0,U(B))}}J.prototype.unpipe=function(B){var P=this._readableState,Z={hasUnpiped:!1};if(P.pipesCount===0)return this;if(P.pipesCount===1)return B&&B!==P.pipes?this:(B||(B=P.pipes),P.pipes=null,P.pipesCount=0,P.flowing=!1,B&&B.emit("unpipe",this,Z),this);if(!B){var K=P.pipes,oe=P.pipesCount;P.pipes=null,P.pipesCount=0,P.flowing=!1;for(var ie=0;ie<oe;ie++)K[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var se=ne(P.pipes,B);return se===-1?this:(P.pipes.splice(se,1),P.pipesCount-=1,P.pipesCount===1&&(P.pipes=P.pipes[0]),B.emit("unpipe",this,Z),this)},J.prototype.on=function(B,P){var Z=n.prototype.on.call(this,B,P),K=this._readableState;return B==="data"?(K.readableListening=this.listenerCount("readable")>0,K.flowing!==!1&&this.resume()):B==="readable"&&!K.endEmitted&&!K.readableListening&&(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,d("on readable",K.length,K.reading),K.length?M(this):K.reading||process.nextTick(N,this)),Z},J.prototype.addListener=J.prototype.on,J.prototype.removeListener=function(B,P){var Z=n.prototype.removeListener.call(this,B,P);return B==="readable"&&process.nextTick(w,this),Z},J.prototype.removeAllListeners=function(B){var P=n.prototype.removeAllListeners.apply(this,arguments);return(B==="readable"||B===void 0)&&process.nextTick(w,this),P};function w(B){var P=B._readableState;P.readableListening=B.listenerCount("readable")>0,P.resumeScheduled&&!P.paused?P.flowing=!0:B.listenerCount("data")>0&&B.resume()}function N(B){d("readable nexttick read 0"),B.read(0)}J.prototype.resume=function(){var B=this._readableState;return B.flowing||(d("resume"),B.flowing=!B.readableListening,te(this,B)),B.paused=!1,this};function te(B,P){P.resumeScheduled||(P.resumeScheduled=!0,process.nextTick(Y,B,P))}function Y(B,P){d("resume",P.reading),P.reading||B.read(0),P.resumeScheduled=!1,B.emit("resume"),U(B),P.flowing&&!P.reading&&B.read(0)}J.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(B){var P=B._readableState;for(d("flow",P.flowing);P.flowing&&B.read()!==null;);}J.prototype.wrap=function(B){var P=this,Z=this._readableState,K=!1;B.on("end",function(){if(d("wrapped end"),Z.decoder&&!Z.ended){var se=Z.decoder.end();se&&se.length&&P.push(se)}P.push(null)}),B.on("data",function(se){if(d("wrapped data"),Z.decoder&&(se=Z.decoder.write(se)),!(Z.objectMode&&se==null)&&!(!Z.objectMode&&(!se||!se.length))){var de=P.push(se);de||(K=!0,B.pause())}});for(var oe in B)this[oe]===void 0&&typeof B[oe]=="function"&&(this[oe]=(function(de){return function(){return B[de].apply(B,arguments)}})(oe));for(var ie=0;ie<D.length;ie++)B.on(D[ie],this.emit.bind(this,D[ie]));return this._read=function(se){d("wrapped _read",se),K&&(K=!1,B.resume())},this},typeof Symbol=="function"&&(J.prototype[Symbol.asyncIterator]=function(){return E===void 0&&(E=Vp()),E(this)}),Object.defineProperty(J.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(J.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(J.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(P){this._readableState&&(this._readableState.flowing=P)}}),J._fromList=$,Object.defineProperty(J.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function $(B,P){if(P.length===0)return null;var Z;return P.objectMode?Z=P.buffer.shift():!B||B>=P.length?(P.decoder?Z=P.buffer.join(""):P.buffer.length===1?Z=P.buffer.first():Z=P.buffer.concat(P.length),P.buffer.clear()):Z=P.buffer.consume(B,P.decoder),Z}function G(B){var P=B._readableState;d("endReadable",P.endEmitted),P.endEmitted||(P.ended=!0,process.nextTick(X,P,B))}function X(B,P){if(d("endReadableNT",B.endEmitted,B.length),!B.endEmitted&&B.length===0&&(B.endEmitted=!0,P.readable=!1,P.emit("end"),B.autoDestroy)){var Z=P._writableState;(!Z||Z.autoDestroy&&Z.finished)&&P.destroy()}}typeof Symbol=="function"&&(J.from=function(B,P){return I===void 0&&(I=zp()),I(J,B,P)});function ne(B,P){for(var Z=0,K=B.length;Z<K;Z++)if(B[Z]===P)return Z;return-1}return bs}var ws,yl;function Md(){if(yl)return ws;yl=1,ws=o;var e=hr().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,h=e.ERR_TRANSFORM_WITH_LENGTH_0,i=cr();tt()(o,i);function a(p,s){var f=this._transformState;f.transforming=!1;var u=f.writecb;if(u===null)return this.emit("error",new n);f.writechunk=null,f.writecb=null,s!=null&&this.push(s),u(p);var m=this._readableState;m.reading=!1,(m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}function o(p){if(!(this instanceof o))return new o(p);i.call(this,p),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",d)}function d(){var p=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(s,f){c(p,s,f)}):c(this,null,null)}o.prototype.push=function(p,s){return this._transformState.needTransform=!1,i.prototype.push.call(this,p,s)},o.prototype._transform=function(p,s,f){f(new t("_transform()"))},o.prototype._write=function(p,s,f){var u=this._transformState;if(u.writecb=f,u.writechunk=p,u.writeencoding=s,!u.transforming){var m=this._readableState;(u.needTransform||m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}},o.prototype._read=function(p){var s=this._transformState;s.writechunk!==null&&!s.transforming?(s.transforming=!0,this._transform(s.writechunk,s.writeencoding,s.afterTransform)):s.needTransform=!0},o.prototype._destroy=function(p,s){i.prototype._destroy.call(this,p,function(f){s(f)})};function c(p,s,f){if(s)return p.emit("error",s);if(f!=null&&p.push(f),p._writableState.length)throw new h;if(p._transformState.transforming)throw new r;return p.push(null)}return ws}var Es,_l;function Gp(){if(_l)return Es;_l=1,Es=t;var e=Md();tt()(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,r,h){h(null,n)},Es}var Rs,vl;function Jp(){if(vl)return Rs;vl=1;var e;function t(f){var u=!1;return function(){u||(u=!0,f.apply(void 0,arguments))}}var n=hr().codes,r=n.ERR_MISSING_ARGS,h=n.ERR_STREAM_DESTROYED;function i(f){if(f)throw f}function a(f){return f.setHeader&&typeof f.abort=="function"}function o(f,u,m,_){_=t(_);var y=!1;f.on("close",function(){y=!0}),e===void 0&&(e=Sa()),e(f,{readable:u,writable:m},function(b){if(b)return _(b);y=!0,_()});var l=!1;return function(b){if(!y&&!l){if(l=!0,a(f))return f.abort();if(typeof f.destroy=="function")return f.destroy();_(b||new h("pipe"))}}}function d(f){f()}function c(f,u){return f.pipe(u)}function p(f){return!f.length||typeof f[f.length-1]!="function"?i:f.pop()}function s(){for(var f=arguments.length,u=new Array(f),m=0;m<f;m++)u[m]=arguments[m];var _=p(u);if(Array.isArray(u[0])&&(u=u[0]),u.length<2)throw new r("streams");var y,l=u.map(function(b,E){var I=E<u.length-1,x=E>0;return o(b,I,x,function(D){y||(y=D),D&&l.forEach(d),!I&&(l.forEach(d),_(y))})});return u.reduce(c)}return Rs=s,Rs}var bl;function kd(){return bl||(bl=1,(function(e,t){t=e.exports=Cd(),t.Stream=t,t.Readable=t,t.Writable=Sd(),t.Duplex=cr(),t.Transform=Md(),t.PassThrough=Gp(),t.finished=Sa(),t.pipeline=Jp()})(Sn,Sn.exports)),Sn.exports}var Ss,wl;function Zp(){if(wl)return Ss;wl=1;const{Transform:e}=kd();return Ss=t=>class Id extends e{constructor(r,h,i,a,o){super(o),this._rate=r,this._capacity=h,this._delimitedSuffix=i,this._hashBitLength=a,this._options=o,this._state=new t,this._state.initialize(r,h),this._finalized=!1}_transform(r,h,i){let a=null;try{this.update(r,h)}catch(o){a=o}i(a)}_flush(r){let h=null;try{this.push(this.digest())}catch(i){h=i}r(h)}update(r,h){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,h)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let h=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(h=h.toString(r)),this._resetState(),h}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Id(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Ss}var Cs,El;function Kp(){if(El)return Cs;El=1;const{Transform:e}=kd();return Cs=t=>class Ad extends e{constructor(r,h,i,a){super(a),this._rate=r,this._capacity=h,this._delimitedSuffix=i,this._options=a,this._state=new t,this._state.initialize(r,h),this._finalized=!1}_transform(r,h,i){let a=null;try{this.update(r,h)}catch(o){a=o}i(a)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,h){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,h)),this._state.absorb(r),this}squeeze(r,h){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return h!==void 0&&(i=i.toString(h)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Ad(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Cs}var Ms,Rl;function Qp(){if(Rl)return Ms;Rl=1;const e=Zp(),t=Kp();return Ms=function(n){const r=e(n),h=t(n);return function(i,a){switch(typeof i=="string"?i.toLowerCase():i){case"keccak224":return new r(1152,448,null,224,a);case"keccak256":return new r(1088,512,null,256,a);case"keccak384":return new r(832,768,null,384,a);case"keccak512":return new r(576,1024,null,512,a);case"sha3-224":return new r(1152,448,6,224,a);case"sha3-256":return new r(1088,512,6,256,a);case"sha3-384":return new r(832,768,6,384,a);case"sha3-512":return new r(576,1024,6,512,a);case"shake128":return new h(1344,256,31,a);case"shake256":return new h(1088,512,31,a);default:throw new Error("Invald algorithm: "+i)}}},Ms}var ks={},Sl;function Yp(){if(Sl)return ks;Sl=1;const e=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return ks.p1600=function(t){for(let n=0;n<24;++n){const r=t[0]^t[10]^t[20]^t[30]^t[40],h=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],d=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],p=t[7]^t[17]^t[27]^t[37]^t[47],s=t[8]^t[18]^t[28]^t[38]^t[48],f=t[9]^t[19]^t[29]^t[39]^t[49];let u=s^(i<<1|a>>>31),m=f^(a<<1|i>>>31);const _=t[0]^u,y=t[1]^m,l=t[10]^u,b=t[11]^m,E=t[20]^u,I=t[21]^m,x=t[30]^u,D=t[31]^m,F=t[40]^u,W=t[41]^m;u=r^(o<<1|d>>>31),m=h^(d<<1|o>>>31);const J=t[2]^u,ee=t[3]^m,Q=t[12]^u,re=t[13]^m,q=t[22]^u,g=t[23]^m,R=t[32]^u,C=t[33]^m,M=t[42]^u,A=t[43]^m;u=i^(c<<1|p>>>31),m=a^(p<<1|c>>>31);const L=t[4]^u,j=t[5]^m,T=t[14]^u,w=t[15]^m,N=t[24]^u,te=t[25]^m,Y=t[34]^u,U=t[35]^m,$=t[44]^u,G=t[45]^m;u=o^(s<<1|f>>>31),m=d^(f<<1|s>>>31);const X=t[6]^u,ne=t[7]^m,B=t[16]^u,P=t[17]^m,Z=t[26]^u,K=t[27]^m,oe=t[36]^u,ie=t[37]^m,se=t[46]^u,de=t[47]^m;u=c^(r<<1|h>>>31),m=p^(h<<1|r>>>31);const He=t[8]^u,ge=t[9]^m,ue=t[18]^u,ye=t[19]^m,pe=t[28]^u,me=t[29]^m,$e=t[38]^u,ve=t[39]^m,k=t[48]^u,v=t[49]^m,S=_,O=y,H=b<<4|l>>>28,V=l<<4|b>>>28,z=E<<3|I>>>29,he=I<<3|E>>>29,fe=D<<9|x>>>23,le=x<<9|D>>>23,be=F<<18|W>>>14,ce=W<<18|F>>>14,Re=J<<1|ee>>>31,Xt=ee<<1|J>>>31,Se=re<<12|Q>>>20,Ce=Q<<12|re>>>20,er=q<<10|g>>>22,Me=g<<10|q>>>22,ke=C<<13|R>>>19,tr=R<<13|C>>>19,Ie=M<<2|A>>>30,Ae=A<<2|M>>>30,rr=j<<30|L>>>2,xe=L<<30|j>>>2,Te=T<<6|w>>>26,nr=w<<6|T>>>26,Be=te<<11|N>>>21,Pe=N<<11|te>>>21,ir=Y<<15|U>>>17,Le=U<<15|Y>>>17,Ne=G<<29|$>>>3,sr=$<<29|G>>>3,Oe=X<<28|ne>>>4,Fe=ne<<28|X>>>4,or=P<<23|B>>>9,qe=B<<23|P>>>9,De=Z<<25|K>>>7,dt=K<<25|Z>>>7,pt=oe<<21|ie>>>11,gt=ie<<21|oe>>>11,mt=de<<24|se>>>8,yt=se<<24|de>>>8,_t=He<<27|ge>>>5,vt=ge<<27|He>>>5,bt=ue<<20|ye>>>12,wt=ye<<20|ue>>>12,Et=me<<7|pe>>>25,Rt=pe<<7|me>>>25,St=$e<<8|ve>>>24,Ct=ve<<8|$e>>>24,Mt=k<<14|v>>>18,kt=v<<14|k>>>18;t[0]=S^~Se&Be,t[1]=O^~Ce&Pe,t[10]=Oe^~bt&z,t[11]=Fe^~wt&he,t[20]=Re^~Te&De,t[21]=Xt^~nr&dt,t[30]=_t^~H&er,t[31]=vt^~V&Me,t[40]=rr^~or&Et,t[41]=xe^~qe&Rt,t[2]=Se^~Be&pt,t[3]=Ce^~Pe>,t[12]=bt^~z&ke,t[13]=wt^~he&tr,t[22]=Te^~De&St,t[23]=nr^~dt&Ct,t[32]=H^~er&ir,t[33]=V^~Me&Le,t[42]=or^~Et&fe,t[43]=qe^~Rt&le,t[4]=Be^~pt&Mt,t[5]=Pe^~gt&kt,t[14]=z^~ke&Ne,t[15]=he^~tr&sr,t[24]=De^~St&be,t[25]=dt^~Ct&ce,t[34]=er^~ir&mt,t[35]=Me^~Le&yt,t[44]=Et^~fe&Ie,t[45]=Rt^~le&Ae,t[6]=pt^~Mt&S,t[7]=gt^~kt&O,t[16]=ke^~Ne&Oe,t[17]=tr^~sr&Fe,t[26]=St^~be&Re,t[27]=Ct^~ce&Xt,t[36]=ir^~mt&_t,t[37]=Le^~yt&vt,t[46]=fe^~Ie&rr,t[47]=le^~Ae&xe,t[8]=Mt^~S&Se,t[9]=kt^~O&Ce,t[18]=Ne^~Oe&bt,t[19]=sr^~Fe&wt,t[28]=be^~Re&Te,t[29]=ce^~Xt&nr,t[38]=mt^~_t&H,t[39]=yt^~vt&V,t[48]=Ie^~rr&or,t[49]=Ae^~xe&qe,t[0]^=e[n*2],t[1]^=e[n*2+1]}},ks}var Is,Cl;function Xp(){if(Cl)return Is;Cl=1;const e=Yp();function t(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(n,r){for(let h=0;h<50;++h)this.state[h]=0;this.blockSize=n/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(n){for(let r=0;r<n.length;++r)this.state[~~(this.count/4)]^=n[r]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(n){this.state[~~(this.count/4)]^=n<<8*(this.count%4),(n&128)!==0&&this.count===this.blockSize-1&&e.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),e.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(n){this.squeezing||this.absorbLastFewBits(1);const r=Buffer.alloc(n);for(let h=0;h<n;++h)r[h]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0);return r},t.prototype.copy=function(n){for(let r=0;r<50;++r)n.state[r]=this.state[r];n.blockSize=this.blockSize,n.count=this.count,n.squeezing=this.squeezing},Is=t,Is}var As,Ml;function eg(){return Ml||(Ml=1,As=Qp()(Xp())),As}var xs,kl;function xd(){if(kl)return xs;kl=1;const e=eg(),t=Nn();function n(s){return Buffer.allocUnsafe(s).fill(0)}function r(s,f,u){const m=n(f);return s=i(s),u?s.length<f?(s.copy(m),m):s.slice(0,f):s.length<f?(s.copy(m,f-s.length),m):s.slice(-f)}function h(s,f){return r(s,f,!0)}function i(s){if(!Buffer.isBuffer(s))if(Array.isArray(s))s=Buffer.from(s);else if(typeof s=="string")c(s)?s=Buffer.from(d(p(s)),"hex"):s=Buffer.from(s);else if(typeof s=="number")s=intToBuffer(s);else if(s==null)s=Buffer.allocUnsafe(0);else if(t.isBN(s))s=s.toArrayLike(Buffer);else if(s.toArray)s=Buffer.from(s.toArray());else throw new Error("invalid type");return s}function a(s){return s=i(s),"0x"+s.toString("hex")}function o(s,f){return s=i(s),f||(f=256),e("keccak"+f).update(s).digest()}function d(s){return s.length%2?"0"+s:s}function c(s){return typeof s=="string"&&s.match(/^0x[0-9A-Fa-f]*$/)}function p(s){return typeof s=="string"&&s.startsWith("0x")?s.slice(2):s}return xs={zeros:n,setLength:r,setLengthRight:h,isHexString:c,stripHexPrefix:p,toBuffer:i,bufferToHex:a,keccak:o},xs}var Ts,Il;function tg(){if(Il)return Ts;Il=1;const e=xd(),t=Nn();function n(u){return u.startsWith("int[")?"int256"+u.slice(3):u==="int"?"int256":u.startsWith("uint[")?"uint256"+u.slice(4):u==="uint"?"uint256":u.startsWith("fixed[")?"fixed128x128"+u.slice(5):u==="fixed"?"fixed128x128":u.startsWith("ufixed[")?"ufixed128x128"+u.slice(6):u==="ufixed"?"ufixed128x128":u}function r(u){return parseInt(/^\D+(\d+)$/.exec(u)[1],10)}function h(u){var m=/^\D+(\d+)x(\d+)$/.exec(u);return[parseInt(m[1],10),parseInt(m[2],10)]}function i(u){var m=u.match(/(.*)\[(.*?)\]$/);return m?m[2]===""?"dynamic":parseInt(m[2],10):null}function a(u){var m=typeof u;if(m==="string")return e.isHexString(u)?new t(e.stripHexPrefix(u),16):new t(u,10);if(m==="number")return new t(u);if(u.toArray)return u;throw new Error("Argument is not a number")}function o(u,m){var _,y,l,b;if(u==="address")return o("uint160",a(m));if(u==="bool")return o("uint8",m?1:0);if(u==="string")return o("bytes",new Buffer(m,"utf8"));if(c(u)){if(typeof m.length>"u")throw new Error("Not an array?");if(_=i(u),_!=="dynamic"&&_!==0&&m.length>_)throw new Error("Elements exceed array size: "+_);l=[],u=u.slice(0,u.lastIndexOf("[")),typeof m=="string"&&(m=JSON.parse(m));for(b in m)l.push(o(u,m[b]));if(_==="dynamic"){var E=o("uint256",m.length);l.unshift(E)}return Buffer.concat(l)}else{if(u==="bytes")return m=new Buffer(m),l=Buffer.concat([o("uint256",m.length),m]),m.length%32!==0&&(l=Buffer.concat([l,e.zeros(32-m.length%32)])),l;if(u.startsWith("bytes")){if(_=r(u),_<1||_>32)throw new Error("Invalid bytes<N> width: "+_);return e.setLengthRight(m,32)}else if(u.startsWith("uint")){if(_=r(u),_%8||_<8||_>256)throw new Error("Invalid uint<N> width: "+_);if(y=a(m),y.bitLength()>_)throw new Error("Supplied uint exceeds width: "+_+" vs "+y.bitLength());if(y<0)throw new Error("Supplied uint is negative");return y.toArrayLike(Buffer,"be",32)}else if(u.startsWith("int")){if(_=r(u),_%8||_<8||_>256)throw new Error("Invalid int<N> width: "+_);if(y=a(m),y.bitLength()>_)throw new Error("Supplied int exceeds width: "+_+" vs "+y.bitLength());return y.toTwos(256).toArrayLike(Buffer,"be",32)}else if(u.startsWith("ufixed")){if(_=h(u),y=a(m),y<0)throw new Error("Supplied ufixed is negative");return o("uint256",y.mul(new t(2).pow(new t(_[1]))))}else if(u.startsWith("fixed"))return _=h(u),o("int256",a(m).mul(new t(2).pow(new t(_[1]))))}throw new Error("Unsupported or invalid type: "+u)}function d(u){return u==="string"||u==="bytes"||i(u)==="dynamic"}function c(u){return u.lastIndexOf("]")===u.length-1}function p(u,m){var _=[],y=[],l=32*u.length;for(var b in u){var E=n(u[b]),I=m[b],x=o(E,I);d(E)?(_.push(o("uint256",l)),y.push(x),l+=x.length):_.push(x)}return Buffer.concat(_.concat(y))}function s(u,m){if(u.length!==m.length)throw new Error("Number of types are not matching the values");for(var _,y,l=[],b=0;b<u.length;b++){var E=n(u[b]),I=m[b];if(E==="bytes")l.push(I);else if(E==="string")l.push(new Buffer(I,"utf8"));else if(E==="bool")l.push(new Buffer(I?"01":"00","hex"));else if(E==="address")l.push(e.setLength(I,20));else if(E.startsWith("bytes")){if(_=r(E),_<1||_>32)throw new Error("Invalid bytes<N> width: "+_);l.push(e.setLengthRight(I,_))}else if(E.startsWith("uint")){if(_=r(E),_%8||_<8||_>256)throw new Error("Invalid uint<N> width: "+_);if(y=a(I),y.bitLength()>_)throw new Error("Supplied uint exceeds width: "+_+" vs "+y.bitLength());l.push(y.toArrayLike(Buffer,"be",_/8))}else if(E.startsWith("int")){if(_=r(E),_%8||_<8||_>256)throw new Error("Invalid int<N> width: "+_);if(y=a(I),y.bitLength()>_)throw new Error("Supplied int exceeds width: "+_+" vs "+y.bitLength());l.push(y.toTwos(_).toArrayLike(Buffer,"be",_/8))}else throw new Error("Unsupported or invalid type: "+E)}return Buffer.concat(l)}function f(u,m){return e.keccak(s(u,m))}return Ts={rawEncode:p,solidityPack:s,soliditySHA3:f},Ts}var Bs,Al;function rg(){if(Al)return Bs;Al=1;const e=xd(),t=tg(),n={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},r={encodeData(i,a,o,d=!0){const c=["bytes32"],p=[this.hashType(i,o)];if(d){const s=(f,u,m)=>{if(o[u]!==void 0)return["bytes32",m==null?"0x0000000000000000000000000000000000000000000000000000000000000000":e.keccak(this.encodeData(u,m,o,d))];if(m===void 0)throw new Error(`missing value for field ${f} of type ${u}`);if(u==="bytes")return["bytes32",e.keccak(m)];if(u==="string")return typeof m=="string"&&(m=Buffer.from(m,"utf8")),["bytes32",e.keccak(m)];if(u.lastIndexOf("]")===u.length-1){const _=u.slice(0,u.lastIndexOf("[")),y=m.map(l=>s(f,_,l));return["bytes32",e.keccak(t.rawEncode(y.map(([l])=>l),y.map(([,l])=>l)))]}return[u,m]};for(const f of o[i]){const[u,m]=s(f.name,f.type,a[f.name]);c.push(u),p.push(m)}}else for(const s of o[i]){let f=a[s.name];if(f!==void 0)if(s.type==="bytes")c.push("bytes32"),f=e.keccak(f),p.push(f);else if(s.type==="string")c.push("bytes32"),typeof f=="string"&&(f=Buffer.from(f,"utf8")),f=e.keccak(f),p.push(f);else if(o[s.type]!==void 0)c.push("bytes32"),f=e.keccak(this.encodeData(s.type,f,o,d)),p.push(f);else{if(s.type.lastIndexOf("]")===s.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");c.push(s.type),p.push(f)}}return t.rawEncode(c,p)},encodeType(i,a){let o="",d=this.findTypeDependencies(i,a).filter(c=>c!==i);d=[i].concat(d.sort());for(const c of d){if(!a[c])throw new Error("No type definition specified: "+c);o+=c+"("+a[c].map(({name:s,type:f})=>f+" "+s).join(",")+")"}return o},findTypeDependencies(i,a,o=[]){if(i=i.match(/^\w*/)[0],o.includes(i)||a[i]===void 0)return o;o.push(i);for(const d of a[i])for(const c of this.findTypeDependencies(d.type,a,o))!o.includes(c)&&o.push(c);return o},hashStruct(i,a,o,d=!0){return e.keccak(this.encodeData(i,a,o,d))},hashType(i,a){return e.keccak(this.encodeType(i,a))},sanitizeData(i){const a={};for(const o in n.properties)i[o]&&(a[o]=i[o]);return a.types&&(a.types=Object.assign({EIP712Domain:[]},a.types)),a},hash(i,a=!0){const o=this.sanitizeData(i),d=[Buffer.from("1901","hex")];return d.push(this.hashStruct("EIP712Domain",o.domain,o.types,a)),o.primaryType!=="EIP712Domain"&&d.push(this.hashStruct(o.primaryType,o.message,o.types,a)),e.keccak(Buffer.concat(d))}};Bs={TYPED_MESSAGE_SCHEMA:n,TypedDataUtils:r,hashForSignTypedDataLegacy:function(i){return h(i.data)},hashForSignTypedData_v3:function(i){return r.hash(i.data,!1)},hashForSignTypedData_v4:function(i){return r.hash(i.data)}};function h(i){const a=new Error("Expect argument to be non-empty array");if(typeof i!="object"||!i.length)throw a;const o=i.map(function(p){return p.type==="bytes"?e.toBuffer(p.value):p.value}),d=i.map(function(p){return p.type}),c=i.map(function(p){if(!p.name)throw a;return p.type+" "+p.name});return t.soliditySHA3(["bytes32","bytes32"],[t.soliditySHA3(new Array(i.length).fill("string"),c),t.soliditySHA3(d,o)])}return Bs}var qt={},xl;function ng(){if(xl)return qt;xl=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.filterFromParam=qt.FilterPolyfill=void 0;const e=qn(),t=ut(),n=300*1e3,r={jsonrpc:"2.0",id:0};let h=class{constructor(f){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,e.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=f}async newFilter(f){const u=i(f),m=this.makeFilterId(),_=await this.setInitialCursorPosition(m,u.fromBlock);return console.info(`Installing new log filter(${m}):`,u,"initial cursor position:",_),this.logFilters.set(m,u),this.setFilterTimeout(m),(0,t.hexStringFromIntNumber)(m)}async newBlockFilter(){const f=this.makeFilterId(),u=await this.setInitialCursorPosition(f,"latest");return console.info(`Installing new block filter (${f}) with initial cursor position:`,u),this.blockFilters.add(f),this.setFilterTimeout(f),(0,t.hexStringFromIntNumber)(f)}async newPendingTransactionFilter(){const f=this.makeFilterId(),u=await this.setInitialCursorPosition(f,"latest");return console.info(`Installing new block filter (${f}) with initial cursor position:`,u),this.pendingTransactionFilters.add(f),this.setFilterTimeout(f),(0,t.hexStringFromIntNumber)(f)}uninstallFilter(f){const u=(0,t.intNumberFromHexString)(f);return console.info(`Uninstalling filter (${u})`),this.deleteFilter(u),!0}getFilterChanges(f){const u=(0,t.intNumberFromHexString)(f);return this.timeouts.has(u)&&this.setFilterTimeout(u),this.logFilters.has(u)?this.getLogFilterChanges(u):this.blockFilters.has(u)?this.getBlockFilterChanges(u):this.pendingTransactionFilters.has(u)?this.getPendingTransactionFilterChanges(u):Promise.resolve(c())}async getFilterLogs(f){const u=(0,t.intNumberFromHexString)(f),m=this.logFilters.get(u);return m?this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getLogs",params:[a(m)]})):c()}makeFilterId(){return(0,e.IntNumber)(++this.nextFilterId)}sendAsyncPromise(f){return new Promise((u,m)=>{this.provider.sendAsync(f,(_,y)=>{if(_)return m(_);if(Array.isArray(y)||y==null)return m(new Error(`unexpected response received: ${JSON.stringify(y)}`));u(y)})})}deleteFilter(f){console.info(`Deleting filter (${f})`),this.logFilters.delete(f),this.blockFilters.delete(f),this.pendingTransactionFilters.delete(f),this.cursors.delete(f),this.timeouts.delete(f)}async getLogFilterChanges(f){const u=this.logFilters.get(f),m=this.cursors.get(f);if(!m||!u)return c();const _=await this.getCurrentBlockHeight(),y=u.toBlock==="latest"?_:u.toBlock;if(m>_||m>Number(u.toBlock))return p();console.info(`Fetching logs from ${m} to ${y} for filter ${f}`);const l=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getLogs",params:[a(Object.assign(Object.assign({},u),{fromBlock:m,toBlock:y}))]}));if(Array.isArray(l.result)){const b=l.result.map(I=>(0,t.intNumberFromHexString)(I.blockNumber||"0x0")),E=Math.max(...b);if(E&&E>m){const I=(0,e.IntNumber)(E+1);console.info(`Moving cursor position for filter (${f}) from ${m} to ${I}`),this.cursors.set(f,I)}}return l}async getBlockFilterChanges(f){const u=this.cursors.get(f);if(!u)return c();const m=await this.getCurrentBlockHeight();if(u>m)return p();console.info(`Fetching blocks from ${u} to ${m} for filter (${f})`);const _=(await Promise.all((0,t.range)(u,m+1).map(l=>this.getBlockHashByNumber((0,e.IntNumber)(l))))).filter(l=>!!l),y=(0,e.IntNumber)(u+_.length);return console.info(`Moving cursor position for filter (${f}) from ${u} to ${y}`),this.cursors.set(f,y),Object.assign(Object.assign({},r),{result:_})}async getPendingTransactionFilterChanges(f){return Promise.resolve(p())}async setInitialCursorPosition(f,u){const m=await this.getCurrentBlockHeight(),_=typeof u=="number"&&u>m?u:m;return this.cursors.set(f,_),_}setFilterTimeout(f){const u=this.timeouts.get(f);u&&window.clearTimeout(u);const m=window.setTimeout(()=>{console.info(`Filter (${f}) timed out`),this.deleteFilter(f)},n);this.timeouts.set(f,m)}async getCurrentBlockHeight(){const f=new Date;if(f.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=f;const u=await this._getCurrentBlockHeight();this.currentBlockHeight=u,this.resolvers.forEach(m=>m(u)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(u=>this.resolvers.push(u))}async _getCurrentBlockHeight(){const{result:f}=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_blockNumber",params:[]}));return(0,t.intNumberFromHexString)((0,t.ensureHexString)(f))}async getBlockHashByNumber(f){const u=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getBlockByNumber",params:[(0,t.hexStringFromIntNumber)(f),!1]}));return u.result&&typeof u.result.hash=="string"?(0,t.ensureHexString)(u.result.hash):null}};qt.FilterPolyfill=h;function i(s){return{fromBlock:o(s.fromBlock),toBlock:o(s.toBlock),addresses:s.address===void 0?null:Array.isArray(s.address)?s.address:[s.address],topics:s.topics||[]}}qt.filterFromParam=i;function a(s){const f={fromBlock:d(s.fromBlock),toBlock:d(s.toBlock),topics:s.topics};return s.addresses!==null&&(f.address=s.addresses),f}function o(s){if(s===void 0||s==="latest"||s==="pending")return"latest";if(s==="earliest")return(0,e.IntNumber)(0);if((0,t.isHexString)(s))return(0,t.intNumberFromHexString)(s);throw new Error(`Invalid block option: ${String(s)}`)}function d(s){return s==="latest"?s:(0,t.hexStringFromIntNumber)(s)}function c(){return Object.assign(Object.assign({},r),{error:{code:-32e3,message:"filter not found"}})}function p(){return Object.assign(Object.assign({},r),{result:[]})}return qt}var Ur={},Dt={},jt={},Ps,Tl;function Ca(){if(Tl)return Ps;Tl=1,Ps=e;function e(t){t=t||{};var n=t.max||Number.MAX_SAFE_INTEGER,r=typeof t.start<"u"?t.start:Math.floor(Math.random()*n);return function(){return r=r%n,r++}}return Ps}var Ls,Bl;function ig(){if(Bl)return Ls;Bl=1;const e=(t,n)=>function(){const r=n.promiseModule,h=new Array(arguments.length);for(let i=0;i<arguments.length;i++)h[i]=arguments[i];return new r((i,a)=>{n.errorFirst?h.push(function(o,d){if(n.multiArgs){const c=new Array(arguments.length-1);for(let p=1;p<arguments.length;p++)c[p-1]=arguments[p];o?(c.unshift(o),a(c)):i(c)}else o?a(o):i(d)}):h.push(function(o){if(n.multiArgs){const d=new Array(arguments.length-1);for(let c=0;c<arguments.length;c++)d[c]=arguments[c];i(d)}else i(o)}),t.apply(this,h)})};return Ls=(t,n)=>{n=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},n);const r=i=>{const a=o=>typeof o=="string"?i===o:o.test(i);return n.include?n.include.some(a):!n.exclude.some(a)};let h;typeof t=="function"?h=function(){return n.excludeMain?t.apply(this,arguments):e(t,n).apply(this,arguments)}:h=Object.create(Object.getPrototypeOf(t));for(const i in t){const a=t[i];h[i]=typeof a=="function"&&r(i)?e(a,n):a}return h},Ls}var Ut={},Cn={},Pl;function Ma(){if(Pl)return Cn;Pl=1,Object.defineProperty(Cn,"__esModule",{value:!0});const e=Ln();function t(h,i,a){try{Reflect.apply(h,i,a)}catch(o){setTimeout(()=>{throw o})}}function n(h){const i=h.length,a=new Array(i);for(let o=0;o<i;o+=1)a[o]=h[o];return a}class r extends e.EventEmitter{emit(i,...a){let o=i==="error";const d=this._events;if(d!==void 0)o=o&&d.error===void 0;else if(!o)return!1;if(o){let p;if(a.length>0&&([p]=a),p instanceof Error)throw p;const s=new Error(`Unhandled error.${p?` (${p.message})`:""}`);throw s.context=p,s}const c=d[i];if(c===void 0)return!1;if(typeof c=="function")t(c,this,a);else{const p=c.length,s=n(c);for(let f=0;f<p;f+=1)t(s[f],this,a)}return!0}}return Cn.default=r,Cn}var Ll;function Td(){if(Ll)return Ut;Ll=1;var e=Ut&&Ut.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.BaseBlockTracker=void 0;const t=e(Ma()),n=1e3,r=(o,d)=>o+d,h=["sync","latest"];let i=class extends t.default{constructor(d){super(),this._blockResetDuration=d.blockResetDuration||20*n,this._usePastBlocks=d.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(c=>this.once("latest",c))}removeAllListeners(d){return d?super.removeAllListeners(d):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(d){h.includes(d)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return h.map(d=>this.listenerCount(d)).reduce(r)}_shouldUseNewBlock(d){const c=this._currentBlock;if(!c)return!0;const p=a(d),s=a(c);return this._usePastBlocks&&p<s||p>s}_newPotentialLatest(d){this._shouldUseNewBlock(d)&&this._setCurrentBlock(d)}_setCurrentBlock(d){const c=this._currentBlock;this._currentBlock=d,this.emit("latest",d),this.emit("sync",{oldBlock:c,newBlock:d})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};Ut.BaseBlockTracker=i;function a(o){return Number.parseInt(o,16)}return Ut}var Ns={},Ht={},Qe={};class Bd extends TypeError{constructor(t,n){let r;const{message:h,explanation:i,...a}=t,{path:o}=t,d=o.length===0?h:`At path: ${o.join(".")} -- ${h}`;super(i??d),i!=null&&(this.cause=d),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...n()])}}function sg(e){return Ze(e)&&typeof e[Symbol.iterator]=="function"}function Ze(e){return typeof e=="object"&&e!=null}function Nl(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function We(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function og(e){const{done:t,value:n}=e.next();return t?void 0:n}function ag(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:h,branch:i}=t,{type:a}=n,{refinement:o,message:d=`Expected a value of type \`${a}\`${o?` with refinement \`${o}\``:""}, but received: \`${We(r)}\``}=e;return{value:r,type:a,refinement:o,key:h[h.length-1],path:h,branch:i,...e,message:d}}function*oa(e,t,n,r){sg(e)||(e=[e]);for(const h of e){const i=ag(h,t,n,r);i&&(yield i)}}function*ka(e,t,n={}){const{path:r=[],branch:h=[e],coerce:i=!1,mask:a=!1}=n,o={path:r,branch:h};if(i&&(e=t.coercer(e,o),a&&t.type!=="type"&&Ze(t.schema)&&Ze(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let d="valid";for(const c of t.validator(e,o))c.explanation=n.message,d="not_valid",yield[c,void 0];for(let[c,p,s]of t.entries(e,o)){const f=ka(p,s,{path:c===void 0?r:[...r,c],branch:c===void 0?h:[...h,p],coerce:i,mask:a,message:n.message});for(const u of f)u[0]?(d=u[0].refinement!=null?"not_refined":"not_valid",yield[u[0],void 0]):i&&(p=u[1],c===void 0?e=p:e instanceof Map?e.set(c,p):e instanceof Set?e.add(p):Ze(e)&&(p!==void 0||c in e)&&(e[c]=p))}if(d!=="not_valid")for(const c of t.refiner(e,o))c.explanation=n.message,d="not_refined",yield[c,void 0];d==="valid"&&(yield[void 0,e])}class Ue{constructor(t){const{type:n,schema:r,validator:h,refiner:i,coercer:a=d=>d,entries:o=function*(){}}=t;this.type=n,this.schema=r,this.entries=o,this.coercer=a,h?this.validator=(d,c)=>{const p=h(d,c);return oa(p,c,this,d)}:this.validator=()=>[],i?this.refiner=(d,c)=>{const p=i(d,c);return oa(p,c,this,d)}:this.refiner=()=>[]}assert(t,n){return Pd(t,this,n)}create(t,n){return Ld(t,this,n)}is(t){return Ia(t,this)}mask(t,n){return Nd(t,this,n)}validate(t,n={}){return dr(t,this,n)}}function Pd(e,t,n){const r=dr(e,t,{message:n});if(r[0])throw r[0]}function Ld(e,t,n){const r=dr(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function Nd(e,t,n){const r=dr(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function Ia(e,t){return!dr(e,t)[0]}function dr(e,t,n={}){const r=ka(e,t,n),h=og(r);return h[0]?[new Bd(h[0],function*(){for(const a of r)a[0]&&(yield a[0])}),void 0]:[void 0,h[1]]}function ug(...e){const t=e[0].type==="type",n=e.map(h=>h.schema),r=Object.assign({},...n);return t?ln(r):cn(r)}function Je(e,t){return new Ue({type:e,schema:null,validator:t})}function cg(e,t){return new Ue({...e,refiner:(n,r)=>n===void 0||e.refiner(n,r),validator(n,r){return n===void 0?!0:(t(n,r),e.validator(n,r))}})}function lg(e){return new Ue({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function fg(e){let t;return new Ue({type:"lazy",schema:null,*entries(n,r){t??(t=e()),yield*t.entries(n,r)},validator(n,r){return t??(t=e()),t.validator(n,r)},coercer(n,r){return t??(t=e()),t.coercer(n,r)},refiner(n,r){return t??(t=e()),t.refiner(n,r)}})}function hg(e,t){const{schema:n}=e,r={...n};for(const h of t)delete r[h];return e.type==="type"?ln(r):cn(r)}function dg(e){const t=e instanceof Ue,n=t?{...e.schema}:{...e};for(const r in n)n[r]=Od(n[r]);return t&&e.type==="type"?ln(n):cn(n)}function pg(e,t){const{schema:n}=e,r={};for(const h of t)r[h]=n[h];return e.type==="type"?ln(r):cn(r)}function gg(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Je(e,t)}function mg(){return Je("any",()=>!0)}function yg(e){return new Ue({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${We(t)}`}})}function _g(){return Je("bigint",e=>typeof e=="bigint")}function vg(){return Je("boolean",e=>typeof e=="boolean")}function bg(){return Je("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${We(e)}`)}function wg(e){const t={},n=e.map(r=>We(r)).join();for(const r of e)t[r]=r;return new Ue({type:"enums",schema:t,validator(r){return e.includes(r)||`Expected one of \`${n}\`, but received: ${We(r)}`}})}function Eg(){return Je("func",e=>typeof e=="function"||`Expected a function, but received: ${We(e)}`)}function Rg(e){return Je("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${We(t)}`)}function Sg(){return Je("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${We(e)}`)}function Cg(e){return new Ue({type:"intersection",schema:null,*entries(t,n){for(const r of e)yield*r.entries(t,n)},*validator(t,n){for(const r of e)yield*r.validator(t,n)},*refiner(t,n){for(const r of e)yield*r.refiner(t,n)}})}function Mg(e){const t=We(e),n=typeof e;return new Ue({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||`Expected the literal \`${t}\`, but received: ${We(r)}`}})}function kg(e,t){return new Ue({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[r,h]of n.entries())yield[r,r,e],yield[r,h,t]},coercer(n){return n instanceof Map?new Map(n):n},validator(n){return n instanceof Map||`Expected a \`Map\` object, but received: ${We(n)}`}})}function Aa(){return Je("never",()=>!1)}function Ig(e){return new Ue({...e,validator:(t,n)=>t===null||e.validator(t,n),refiner:(t,n)=>t===null||e.refiner(t,n)})}function Ag(){return Je("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${We(e)}`)}function cn(e){const t=e?Object.keys(e):[],n=Aa();return new Ue({type:"object",schema:e||null,*entries(r){if(e&&Ze(r)){const h=new Set(Object.keys(r));for(const i of t)h.delete(i),yield[i,r[i],e[i]];for(const i of h)yield[i,r[i],n]}},validator(r){return Ze(r)||`Expected an object, but received: ${We(r)}`},coercer(r){return Ze(r)?{...r}:r}})}function Od(e){return new Ue({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function xg(e,t){return new Ue({type:"record",schema:null,*entries(n){if(Ze(n))for(const r in n){const h=n[r];yield[r,r,e],yield[r,h,t]}},validator(n){return Ze(n)||`Expected an object, but received: ${We(n)}`}})}function Tg(){return Je("regexp",e=>e instanceof RegExp)}function Bg(e){return new Ue({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${We(t)}`}})}function Fd(){return Je("string",e=>typeof e=="string"||`Expected a string, but received: ${We(e)}`)}function Pg(e){const t=Aa();return new Ue({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let h=0;h<r;h++)yield[h,n[h],e[h]||t]}},validator(n){return Array.isArray(n)||`Expected an array, but received: ${We(n)}`}})}function ln(e){const t=Object.keys(e);return new Ue({type:"type",schema:e,*entries(n){if(Ze(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return Ze(n)||`Expected an object, but received: ${We(n)}`},coercer(n){return Ze(n)?{...n}:n}})}function Lg(e){const t=e.map(n=>n.type).join(" | ");return new Ue({type:"union",schema:null,coercer(n){for(const r of e){const[h,i]=r.validate(n,{coerce:!0});if(!h)return i}return n},validator(n,r){const h=[];for(const i of e){const[...a]=ka(n,i,r),[o]=a;if(o[0])for(const[d]of a)d&&h.push(d);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${We(n)}`,...h]}})}function qd(){return Je("unknown",()=>!0)}function xa(e,t,n){return new Ue({...e,coercer:(r,h)=>Ia(r,t)?e.coercer(n(r,h),h):e.coercer(r,h)})}function Ng(e,t,n={}){return xa(e,qd(),r=>{const h=typeof t=="function"?t():t;if(r===void 0)return h;if(!n.strict&&Nl(r)&&Nl(h)){const i={...r};let a=!1;for(const o in h)i[o]===void 0&&(i[o]=h[o],a=!0);if(a)return i}return r})}function Og(e){return xa(e,Fd(),t=>t.trim())}function Fg(e){return Qt(e,"empty",t=>{const n=Dd(t);return n===0||`Expected an empty ${e.type} but received one with a size of \`${n}\``})}function Dd(e){return e instanceof Map||e instanceof Set?e.size:e.length}function qg(e,t,n={}){const{exclusive:r}=n;return Qt(e,"max",h=>r?h<t:h<=t||`Expected a ${e.type} less than ${r?"":"or equal to "}${t} but received \`${h}\``)}function Dg(e,t,n={}){const{exclusive:r}=n;return Qt(e,"min",h=>r?h>t:h>=t||`Expected a ${e.type} greater than ${r?"":"or equal to "}${t} but received \`${h}\``)}function jg(e){return Qt(e,"nonempty",t=>Dd(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function Ug(e,t){return Qt(e,"pattern",n=>t.test(n)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${n}"`)}function Hg(e,t,n=t){const r=`Expected a ${e.type}`,h=t===n?`of \`${t}\``:`between \`${t}\` and \`${n}\``;return Qt(e,"size",i=>{if(typeof i=="number"||i instanceof Date)return t<=i&&i<=n||`${r} ${h} but received \`${i}\``;if(i instanceof Map||i instanceof Set){const{size:a}=i;return t<=a&&a<=n||`${r} with a size ${h} but received one with a size of \`${a}\``}else{const{length:a}=i;return t<=a&&a<=n||`${r} with a length ${h} but received one with a length of \`${a}\``}})}function Qt(e,t,n){return new Ue({...e,*refiner(r,h){yield*e.refiner(r,h);const i=n(r,h),a=oa(i,h,e,r);for(const o of a)yield{...o,refinement:t}}})}const Wg=Object.freeze(Object.defineProperty({__proto__:null,Struct:Ue,StructError:Bd,any:mg,array:yg,assert:Pd,assign:ug,bigint:_g,boolean:vg,coerce:xa,create:Ld,date:bg,defaulted:Ng,define:Je,deprecated:cg,dynamic:lg,empty:Fg,enums:wg,func:Eg,instance:Rg,integer:Sg,intersection:Cg,is:Ia,lazy:fg,literal:Mg,map:kg,mask:Nd,max:qg,min:Dg,never:Aa,nonempty:jg,nullable:Ig,number:Ag,object:cn,omit:hg,optional:Od,partial:dg,pattern:Ug,pick:pg,record:xg,refine:Qt,regexp:Tg,set:Bg,size:Hg,string:Fd,struct:gg,trimmed:Og,tuple:Pg,type:ln,union:Lg,unknown:qd,validate:dr},Symbol.toStringTag,{value:"Module"})),Yt=lr(Wg);var Ol;function ht(){if(Ol)return Qe;Ol=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.assertExhaustive=Qe.assertStruct=Qe.assert=Qe.AssertionError=void 0;const e=Yt;function t(c){return typeof c=="object"&&c!==null&&"message"in c}function n(c){var p,s;return typeof((s=(p=c?.prototype)===null||p===void 0?void 0:p.constructor)===null||s===void 0?void 0:s.name)=="string"}function r(c){const p=t(c)?c.message:String(c);return p.endsWith(".")?p.slice(0,-1):p}function h(c,p){return n(c)?new c({message:p}):c({message:p})}class i extends Error{constructor(p){super(p.message),this.code="ERR_ASSERTION"}}Qe.AssertionError=i;function a(c,p="Assertion failed.",s=i){if(!c)throw p instanceof Error?p:h(s,p)}Qe.assert=a;function o(c,p,s="Assertion failed",f=i){try{(0,e.assert)(c,p)}catch(u){throw h(f,`${s}: ${r(u)}.`)}}Qe.assertStruct=o;function d(c){throw new Error("Invalid branch reached. Should be detected during compilation.")}return Qe.assertExhaustive=d,Qe}var Hr={},Fl;function jd(){if(Fl)return Hr;Fl=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.base64=void 0;const e=Yt,t=ht(),n=(r,h={})=>{var i,a;const o=(i=h.paddingRequired)!==null&&i!==void 0?i:!1,d=(a=h.characterSet)!==null&&a!==void 0?a:"base64";let c;d==="base64"?c=String.raw`[A-Za-z0-9+\/]`:((0,t.assert)(d==="base64url"),c=String.raw`[-_A-Za-z0-9]`);let p;return o?p=new RegExp(`^(?:${c}{4})*(?:${c}{3}=|${c}{2}==)?$`,"u"):p=new RegExp(`^(?:${c}{4})*(?:${c}{2,3}|${c}{3}=|${c}{2}==)?$`,"u"),(0,e.pattern)(r,p)};return Hr.base64=n,Hr}var _e={},Os={},ql;function Hn(){return ql||(ql=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const t=Yt,n=ht();e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu);function r(c){return(0,t.is)(c,e.HexStruct)}e.isHexString=r;function h(c){return(0,t.is)(c,e.StrictHexStruct)}e.isStrictHexString=h;function i(c){(0,n.assert)(r(c),"Value must be a hexadecimal string.")}e.assertIsHexString=i;function a(c){(0,n.assert)(h(c),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=a;function o(c){return c.startsWith("0x")?c:c.startsWith("0X")?`0x${c.substring(2)}`:`0x${c}`}e.add0x=o;function d(c){return c.startsWith("0x")||c.startsWith("0X")?c.substring(2):c}e.remove0x=d})(Os)),Os}var Dl;function Ud(){if(Dl)return _e;Dl=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.createDataView=_e.concatBytes=_e.valueToBytes=_e.stringToBytes=_e.numberToBytes=_e.signedBigIntToBytes=_e.bigIntToBytes=_e.hexToBytes=_e.bytesToString=_e.bytesToNumber=_e.bytesToSignedBigInt=_e.bytesToBigInt=_e.bytesToHex=_e.assertIsBytes=_e.isBytes=void 0;const e=ht(),t=Hn(),n=48,r=58,h=87;function i(){const F=[];return()=>{if(F.length===0)for(let W=0;W<256;W++)F.push(W.toString(16).padStart(2,"0"));return F}}const a=i();function o(F){return F instanceof Uint8Array}_e.isBytes=o;function d(F){(0,e.assert)(o(F),"Value must be a Uint8Array.")}_e.assertIsBytes=d;function c(F){if(d(F),F.length===0)return"0x";const W=a(),J=new Array(F.length);for(let ee=0;ee<F.length;ee++)J[ee]=W[F[ee]];return(0,t.add0x)(J.join(""))}_e.bytesToHex=c;function p(F){d(F);const W=c(F);return BigInt(W)}_e.bytesToBigInt=p;function s(F){d(F);let W=BigInt(0);for(const J of F)W=(W<<BigInt(8))+BigInt(J);return BigInt.asIntN(F.length*8,W)}_e.bytesToSignedBigInt=s;function f(F){d(F);const W=p(F);return(0,e.assert)(W<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(W)}_e.bytesToNumber=f;function u(F){return d(F),new TextDecoder().decode(F)}_e.bytesToString=u;function m(F){var W;if(((W=F?.toLowerCase)===null||W===void 0?void 0:W.call(F))==="0x")return new Uint8Array;(0,t.assertIsHexString)(F);const J=(0,t.remove0x)(F).toLowerCase(),ee=J.length%2===0?J:`0${J}`,Q=new Uint8Array(ee.length/2);for(let re=0;re<Q.length;re++){const q=ee.charCodeAt(re*2),g=ee.charCodeAt(re*2+1),R=q-(q<r?n:h),C=g-(g<r?n:h);Q[re]=R*16+C}return Q}_e.hexToBytes=m;function _(F){(0,e.assert)(typeof F=="bigint","Value must be a bigint."),(0,e.assert)(F>=BigInt(0),"Value must be a non-negative bigint.");const W=F.toString(16);return m(W)}_e.bigIntToBytes=_;function y(F,W){(0,e.assert)(W>0);const J=F>>BigInt(31);return!((~F&J)+(F&~J)>>BigInt(W*8+-1))}function l(F,W){(0,e.assert)(typeof F=="bigint","Value must be a bigint."),(0,e.assert)(typeof W=="number","Byte length must be a number."),(0,e.assert)(W>0,"Byte length must be greater than 0."),(0,e.assert)(y(F,W),"Byte length is too small to represent the given value.");let J=F;const ee=new Uint8Array(W);for(let Q=0;Q<ee.length;Q++)ee[Q]=Number(BigInt.asUintN(8,J)),J>>=BigInt(8);return ee.reverse()}_e.signedBigIntToBytes=l;function b(F){(0,e.assert)(typeof F=="number","Value must be a number."),(0,e.assert)(F>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(F),"Value is not a safe integer. Use `bigIntToBytes` instead.");const W=F.toString(16);return m(W)}_e.numberToBytes=b;function E(F){return(0,e.assert)(typeof F=="string","Value must be a string."),new TextEncoder().encode(F)}_e.stringToBytes=E;function I(F){if(typeof F=="bigint")return _(F);if(typeof F=="number")return b(F);if(typeof F=="string")return F.startsWith("0x")?m(F):E(F);if(o(F))return F;throw new TypeError(`Unsupported value type: "${typeof F}".`)}_e.valueToBytes=I;function x(F){const W=new Array(F.length);let J=0;for(let Q=0;Q<F.length;Q++){const re=I(F[Q]);W[Q]=re,J+=re.length}const ee=new Uint8Array(J);for(let Q=0,re=0;Q<W.length;Q++)ee.set(W[Q],re),re+=W[Q].length;return ee}_e.concatBytes=x;function D(F){if(typeof Buffer<"u"&&F instanceof Buffer){const W=F.buffer.slice(F.byteOffset,F.byteOffset+F.byteLength);return new DataView(W)}return new DataView(F.buffer,F.byteOffset,F.byteLength)}return _e.createDataView=D,_e}var Wr={},jl;function $g(){if(jl)return Wr;jl=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.ChecksumStruct=void 0;const e=Yt,t=jd();return Wr.ChecksumStruct=(0,e.size)((0,t.base64)((0,e.string)(),{paddingRequired:!0}),44,44),Wr}var Ye={},Ul;function Vg(){if(Ul)return Ye;Ul=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.createHex=Ye.createBytes=Ye.createBigInt=Ye.createNumber=void 0;const e=Yt,t=ht(),n=Ud(),r=Hn(),h=(0,e.union)([(0,e.number)(),(0,e.bigint)(),(0,e.string)(),r.StrictHexStruct]),i=(0,e.coerce)((0,e.number)(),h,Number),a=(0,e.coerce)((0,e.bigint)(),h,BigInt);(0,e.union)([r.StrictHexStruct,(0,e.instance)(Uint8Array)]);const o=(0,e.coerce)((0,e.instance)(Uint8Array),(0,e.union)([r.StrictHexStruct]),n.hexToBytes),d=(0,e.coerce)(r.StrictHexStruct,(0,e.instance)(Uint8Array),n.bytesToHex);function c(u){try{const m=(0,e.create)(u,i);return(0,t.assert)(Number.isFinite(m),`Expected a number-like value, got "${u}".`),m}catch(m){throw m instanceof e.StructError?new Error(`Expected a number-like value, got "${u}".`):m}}Ye.createNumber=c;function p(u){try{return(0,e.create)(u,a)}catch(m){throw m instanceof e.StructError?new Error(`Expected a number-like value, got "${String(m.value)}".`):m}}Ye.createBigInt=p;function s(u){if(typeof u=="string"&&u.toLowerCase()==="0x")return new Uint8Array;try{return(0,e.create)(u,o)}catch(m){throw m instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(m.value)}".`):m}}Ye.createBytes=s;function f(u){if(u instanceof Uint8Array&&u.length===0||typeof u=="string"&&u.toLowerCase()==="0x")return"0x";try{return(0,e.create)(u,d)}catch(m){throw m instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(m.value)}".`):m}}return Ye.createHex=f,Ye}var Xe={},Hl;function zg(){if(Hl)return Xe;Hl=1;var e=Xe&&Xe.__classPrivateFieldSet||function(a,o,d,c,p){if(c==="m")throw new TypeError("Private method is not writable");if(c==="a"&&!p)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?a!==o||!p:!o.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c==="a"?p.call(a,d):p?p.value=d:o.set(a,d),d},t=Xe&&Xe.__classPrivateFieldGet||function(a,o,d,c){if(d==="a"&&!c)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?a!==o||!c:!o.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return d==="m"?c:d==="a"?c.call(a):c?c.value:o.get(a)},n,r;Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.FrozenSet=Xe.FrozenMap=void 0;class h{constructor(o){n.set(this,void 0),e(this,n,new Map(o),"f"),Object.freeze(this)}get size(){return t(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return t(this,n,"f")[Symbol.iterator]()}entries(){return t(this,n,"f").entries()}forEach(o,d){return t(this,n,"f").forEach((c,p,s)=>o.call(d,c,p,this))}get(o){return t(this,n,"f").get(o)}has(o){return t(this,n,"f").has(o)}keys(){return t(this,n,"f").keys()}values(){return t(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([o,d])=>`${String(o)} => ${String(d)}`).join(", ")} `:""}}`}}Xe.FrozenMap=h;class i{constructor(o){r.set(this,void 0),e(this,r,new Set(o),"f"),Object.freeze(this)}get size(){return t(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return t(this,r,"f")[Symbol.iterator]()}entries(){return t(this,r,"f").entries()}forEach(o,d){return t(this,r,"f").forEach((c,p,s)=>o.call(d,c,p,this))}has(o){return t(this,r,"f").has(o)}keys(){return t(this,r,"f").keys()}values(){return t(this,r,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(o=>String(o)).join(", ")} `:""}}`}}return Xe.FrozenSet=i,Object.freeze(h),Object.freeze(h.prototype),Object.freeze(i),Object.freeze(i.prototype),Xe}var Fs={},Wl;function Gg(){return Wl||(Wl=1,Object.defineProperty(Fs,"__esModule",{value:!0})),Fs}var qs={},$l;function Jg(){return $l||($l=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const t=Yt,n=ht(),r=()=>(0,t.define)("finite number",x=>(0,t.is)(x,(0,t.number)())&&Number.isFinite(x));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),r(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.define)("Json",(x,D)=>{function F(W,J){const Q=[...J.validator(W,D)];return Q.length>0?Q:!0}try{const W=F(x,e.UnsafeJsonStruct);return W!==!0?W:F(JSON.parse(JSON.stringify(x)),e.UnsafeJsonStruct)}catch(W){return W instanceof RangeError?"Circular reference detected":!1}});function h(x){return(0,t.is)(x,e.JsonStruct)}e.isValidJson=h;function i(x){(0,n.assertStruct)(x,e.JsonStruct,"Invalid JSON value");const D=JSON.stringify(x);return new TextEncoder().encode(D).byteLength}e.getJsonSize=i,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]);function a(x){return(0,t.is)(x,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=a;function o(x,D){(0,n.assertStruct)(x,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",D)}e.assertIsJsonRpcNotification=o;function d(x){return(0,t.is)(x,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=d;function c(x,D){(0,n.assertStruct)(x,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",D)}e.assertIsJsonRpcRequest=c,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function p(x){return(0,t.is)(x,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=p;function s(x,D){(0,n.assertStruct)(x,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",D)}e.assertIsPendingJsonRpcResponse=s;function f(x){return(0,t.is)(x,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=f;function u(x,D){(0,n.assertStruct)(x,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",D)}e.assertIsJsonRpcResponse=u;function m(x){return(0,t.is)(x,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=m;function _(x,D){(0,n.assertStruct)(x,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",D)}e.assertIsJsonRpcSuccess=_;function y(x){return(0,t.is)(x,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=y;function l(x,D){(0,n.assertStruct)(x,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",D)}e.assertIsJsonRpcFailure=l;function b(x){return(0,t.is)(x,e.JsonRpcErrorStruct)}e.isJsonRpcError=b;function E(x,D){(0,n.assertStruct)(x,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",D)}e.assertIsJsonRpcError=E;function I(x){const{permitEmptyString:D,permitFractions:F,permitNull:W}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},x);return ee=>!!(typeof ee=="number"&&(F||Number.isInteger(ee))||typeof ee=="string"&&(D||ee.length>0)||W&&ee===null)}e.getJsonRpcIdValidator=I})(qs)),qs}var Ds={},Vl;function Zg(){return Vl||(Vl=1,Object.defineProperty(Ds,"__esModule",{value:!0})),Ds}var ot={},Mn={exports:{}},js,zl;function Kg(){if(zl)return js;zl=1;var e=1e3,t=e*60,n=t*60,r=n*24,h=r*7,i=r*365.25;js=function(p,s){s=s||{};var f=typeof p;if(f==="string"&&p.length>0)return a(p);if(f==="number"&&isFinite(p))return s.long?d(p):o(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function a(p){if(p=String(p),!(p.length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(s){var f=parseFloat(s[1]),u=(s[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return f*i;case"weeks":case"week":case"w":return f*h;case"days":case"day":case"d":return f*r;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function o(p){var s=Math.abs(p);return s>=r?Math.round(p/r)+"d":s>=n?Math.round(p/n)+"h":s>=t?Math.round(p/t)+"m":s>=e?Math.round(p/e)+"s":p+"ms"}function d(p){var s=Math.abs(p);return s>=r?c(p,s,r,"day"):s>=n?c(p,s,n,"hour"):s>=t?c(p,s,t,"minute"):s>=e?c(p,s,e,"second"):p+" ms"}function c(p,s,f,u){var m=s>=f*1.5;return Math.round(p/f)+" "+u+(m?"s":"")}return js}var Us,Gl;function Qg(){if(Gl)return Us;Gl=1;function e(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=d,r.humanize=Kg(),r.destroy=p,Object.keys(t).forEach(s=>{r[s]=t[s]}),r.names=[],r.skips=[],r.formatters={};function n(s){let f=0;for(let u=0;u<s.length;u++)f=(f<<5)-f+s.charCodeAt(u),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=n;function r(s){let f,u=null,m,_;function y(...l){if(!y.enabled)return;const b=y,E=Number(new Date),I=E-(f||E);b.diff=I,b.prev=f,b.curr=E,f=E,l[0]=r.coerce(l[0]),typeof l[0]!="string"&&l.unshift("%O");let x=0;l[0]=l[0].replace(/%([a-zA-Z%])/g,(F,W)=>{if(F==="%%")return"%";x++;const J=r.formatters[W];if(typeof J=="function"){const ee=l[x];F=J.call(b,ee),l.splice(x,1),x--}return F}),r.formatArgs.call(b,l),(b.log||r.log).apply(b,l)}return y.namespace=s,y.useColors=r.useColors(),y.color=r.selectColor(s),y.extend=h,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>u!==null?u:(m!==r.namespaces&&(m=r.namespaces,_=r.enabled(s)),_),set:l=>{u=l}}),typeof r.init=="function"&&r.init(y),y}function h(s,f){const u=r(this.namespace+(typeof f>"u"?":":f)+s);return u.log=this.log,u}function i(s){r.save(s),r.namespaces=s,r.names=[],r.skips=[];const f=(typeof s=="string"?s:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const u of f)u[0]==="-"?r.skips.push(u.slice(1)):r.names.push(u)}function a(s,f){let u=0,m=0,_=-1,y=0;for(;u<s.length;)if(m<f.length&&(f[m]===s[u]||f[m]==="*"))f[m]==="*"?(_=m,y=u,m++):(u++,m++);else if(_!==-1)m=_+1,y++,u=y;else return!1;for(;m<f.length&&f[m]==="*";)m++;return m===f.length}function o(){const s=[...r.names,...r.skips.map(f=>"-"+f)].join(",");return r.enable(""),s}function d(s){for(const f of r.skips)if(a(s,f))return!1;for(const f of r.names)if(a(s,f))return!0;return!1}function c(s){return s instanceof Error?s.stack||s.message:s}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return Us=e,Us}var Jl;function Yg(){return Jl||(Jl=1,(function(e,t){var n={};t.formatArgs=h,t.save=i,t.load=a,t.useColors=r,t.storage=o(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function h(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;c.splice(1,0,p,"color: inherit");let s=0,f=0;c[0].replace(/%[a-zA-Z%]/g,u=>{u!=="%%"&&(s++,u==="%c"&&(f=s))}),c.splice(f,0,p)}t.log=console.debug||console.log||(()=>{});function i(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function a(){let c;try{c=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=n.DEBUG),c}function o(){try{return localStorage}catch{}}e.exports=Qg()(t);const{formatters:d}=e.exports;d.j=function(c){try{return JSON.stringify(c)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(Mn,Mn.exports)),Mn.exports}var Zl;function Xg(){if(Zl)return ot;Zl=1;var e=ot&&ot.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ot,"__esModule",{value:!0}),ot.createModuleLogger=ot.createProjectLogger=void 0;const n=(0,e(Yg()).default)("metamask");function r(i){return n.extend(i)}ot.createProjectLogger=r;function h(i,a){return i.extend(a)}return ot.createModuleLogger=h,ot}var Hs={},Kl;function e1(){return Kl||(Kl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(c){return Array.isArray(c)&&c.length>0}e.isNonEmptyArray=t;function n(c){return c==null}e.isNullOrUndefined=n;function r(c){return!!c&&typeof c=="object"&&!Array.isArray(c)}e.isObject=r;const h=(c,p)=>Object.hasOwnProperty.call(c,p);e.hasProperty=h,(function(c){c[c.Null=4]="Null",c[c.Comma=1]="Comma",c[c.Wrapper=1]="Wrapper",c[c.True=4]="True",c[c.False=5]="False",c[c.Quote=1]="Quote",c[c.Colon=1]="Colon",c[c.Date=24]="Date"})(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function i(c){if(typeof c!="object"||c===null)return!1;try{let p=c;for(;Object.getPrototypeOf(p)!==null;)p=Object.getPrototypeOf(p);return Object.getPrototypeOf(c)===p}catch{return!1}}e.isPlainObject=i;function a(c){return c.charCodeAt(0)<=127}e.isASCII=a;function o(c){var p;return c.split("").reduce((f,u)=>a(u)?f+1:f+2,0)+((p=c.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&p!==void 0?p:[]).length}e.calculateStringSize=o;function d(c){return c.toString().length}e.calculateNumberSize=d})(Hs)),Hs}var et={},Ql;function t1(){if(Ql)return et;Ql=1,Object.defineProperty(et,"__esModule",{value:!0}),et.hexToBigInt=et.hexToNumber=et.bigIntToHex=et.numberToHex=void 0;const e=ht(),t=Hn(),n=a=>((0,e.assert)(typeof a=="number","Value must be a number."),(0,e.assert)(a>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(a),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,t.add0x)(a.toString(16)));et.numberToHex=n;const r=a=>((0,e.assert)(typeof a=="bigint","Value must be a bigint."),(0,e.assert)(a>=0,"Value must be a non-negative bigint."),(0,t.add0x)(a.toString(16)));et.bigIntToHex=r;const h=a=>{(0,t.assertIsHexString)(a);const o=parseInt(a,16);return(0,e.assert)(Number.isSafeInteger(o),"Value is not a safe integer. Use `hexToBigInt` instead."),o};et.hexToNumber=h;const i=a=>((0,t.assertIsHexString)(a),BigInt((0,t.add0x)(a)));return et.hexToBigInt=i,et}var Ws={},Yl;function r1(){return Yl||(Yl=1,Object.defineProperty(Ws,"__esModule",{value:!0})),Ws}var $s={},Xl;function n1(){return Xl||(Xl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,(function(i){i[i.Millisecond=1]="Millisecond",i[i.Second=1e3]="Second",i[i.Minute=6e4]="Minute",i[i.Hour=36e5]="Hour",i[i.Day=864e5]="Day",i[i.Week=6048e5]="Week",i[i.Year=31536e6]="Year"})(e.Duration||(e.Duration={}));const t=i=>Number.isInteger(i)&&i>=0,n=(i,a)=>{if(!t(i))throw new Error(`"${a}" must be a non-negative integer. Received: "${i}".`)};function r(i,a){return n(i,"count"),i*a}e.inMilliseconds=r;function h(i){return n(i,"timestamp"),Date.now()-i}e.timeSince=h})($s)),$s}var Vs={},ef;function i1(){return ef||(ef=1,Object.defineProperty(Vs,"__esModule",{value:!0})),Vs}var zs={},kn={exports:{}},Gs,tf;function Wn(){if(tf)return Gs;tf=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,h=t-6;return Gs={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:h,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Gs}var Js,rf;function $n(){if(rf)return Js;rf=1;var e={};return Js=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},Js}var nf;function fn(){return nf||(nf=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:h}=Wn(),i=$n();t=e.exports={};const a=t.re=[],o=t.safeRe=[],d=t.src=[],c=t.safeSrc=[],p=t.t={};let s=0;const f="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",h],[f,r]],m=y=>{for(const[l,b]of u)y=y.split(`${l}*`).join(`${l}{0,${b}}`).split(`${l}+`).join(`${l}{1,${b}}`);return y},_=(y,l,b)=>{const E=m(l),I=s++;i(y,I,l),p[y]=I,d[I]=l,c[I]=E,a[I]=new RegExp(l,b?"g":void 0),o[I]=new RegExp(E,b?"g":void 0)};_("NUMERICIDENTIFIER","0|[1-9]\\d*"),_("NUMERICIDENTIFIERLOOSE","\\d+"),_("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),_("MAINVERSION",`(${d[p.NUMERICIDENTIFIER]})\\.(${d[p.NUMERICIDENTIFIER]})\\.(${d[p.NUMERICIDENTIFIER]})`),_("MAINVERSIONLOOSE",`(${d[p.NUMERICIDENTIFIERLOOSE]})\\.(${d[p.NUMERICIDENTIFIERLOOSE]})\\.(${d[p.NUMERICIDENTIFIERLOOSE]})`),_("PRERELEASEIDENTIFIER",`(?:${d[p.NONNUMERICIDENTIFIER]}|${d[p.NUMERICIDENTIFIER]})`),_("PRERELEASEIDENTIFIERLOOSE",`(?:${d[p.NONNUMERICIDENTIFIER]}|${d[p.NUMERICIDENTIFIERLOOSE]})`),_("PRERELEASE",`(?:-(${d[p.PRERELEASEIDENTIFIER]}(?:\\.${d[p.PRERELEASEIDENTIFIER]})*))`),_("PRERELEASELOOSE",`(?:-?(${d[p.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[p.PRERELEASEIDENTIFIERLOOSE]})*))`),_("BUILDIDENTIFIER",`${f}+`),_("BUILD",`(?:\\+(${d[p.BUILDIDENTIFIER]}(?:\\.${d[p.BUILDIDENTIFIER]})*))`),_("FULLPLAIN",`v?${d[p.MAINVERSION]}${d[p.PRERELEASE]}?${d[p.BUILD]}?`),_("FULL",`^${d[p.FULLPLAIN]}$`),_("LOOSEPLAIN",`[v=\\s]*${d[p.MAINVERSIONLOOSE]}${d[p.PRERELEASELOOSE]}?${d[p.BUILD]}?`),_("LOOSE",`^${d[p.LOOSEPLAIN]}$`),_("GTLT","((?:<|>)?=?)"),_("XRANGEIDENTIFIERLOOSE",`${d[p.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_("XRANGEIDENTIFIER",`${d[p.NUMERICIDENTIFIER]}|x|X|\\*`),_("XRANGEPLAIN",`[v=\\s]*(${d[p.XRANGEIDENTIFIER]})(?:\\.(${d[p.XRANGEIDENTIFIER]})(?:\\.(${d[p.XRANGEIDENTIFIER]})(?:${d[p.PRERELEASE]})?${d[p.BUILD]}?)?)?`),_("XRANGEPLAINLOOSE",`[v=\\s]*(${d[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[p.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[p.XRANGEIDENTIFIERLOOSE]})(?:${d[p.PRERELEASELOOSE]})?${d[p.BUILD]}?)?)?`),_("XRANGE",`^${d[p.GTLT]}\\s*${d[p.XRANGEPLAIN]}$`),_("XRANGELOOSE",`^${d[p.GTLT]}\\s*${d[p.XRANGEPLAINLOOSE]}$`),_("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),_("COERCE",`${d[p.COERCEPLAIN]}(?:$|[^\\d])`),_("COERCEFULL",d[p.COERCEPLAIN]+`(?:${d[p.PRERELEASE]})?(?:${d[p.BUILD]})?(?:$|[^\\d])`),_("COERCERTL",d[p.COERCE],!0),_("COERCERTLFULL",d[p.COERCEFULL],!0),_("LONETILDE","(?:~>?)"),_("TILDETRIM",`(\\s*)${d[p.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",_("TILDE",`^${d[p.LONETILDE]}${d[p.XRANGEPLAIN]}$`),_("TILDELOOSE",`^${d[p.LONETILDE]}${d[p.XRANGEPLAINLOOSE]}$`),_("LONECARET","(?:\\^)"),_("CARETTRIM",`(\\s*)${d[p.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",_("CARET",`^${d[p.LONECARET]}${d[p.XRANGEPLAIN]}$`),_("CARETLOOSE",`^${d[p.LONECARET]}${d[p.XRANGEPLAINLOOSE]}$`),_("COMPARATORLOOSE",`^${d[p.GTLT]}\\s*(${d[p.LOOSEPLAIN]})$|^$`),_("COMPARATOR",`^${d[p.GTLT]}\\s*(${d[p.FULLPLAIN]})$|^$`),_("COMPARATORTRIM",`(\\s*)${d[p.GTLT]}\\s*(${d[p.LOOSEPLAIN]}|${d[p.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",_("HYPHENRANGE",`^\\s*(${d[p.XRANGEPLAIN]})\\s+-\\s+(${d[p.XRANGEPLAIN]})\\s*$`),_("HYPHENRANGELOOSE",`^\\s*(${d[p.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[p.XRANGEPLAINLOOSE]})\\s*$`),_("STAR","(<|>)?=?\\s*\\*"),_("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),_("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(kn,kn.exports)),kn.exports}var Zs,sf;function Ta(){if(sf)return Zs;sf=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Zs=r=>r?typeof r!="object"?e:r:t,Zs}var Ks,of;function Hd(){if(of)return Ks;of=1;const e=/^[0-9]+$/,t=(r,h)=>{if(typeof r=="number"&&typeof h=="number")return r===h?0:r<h?-1:1;const i=e.test(r),a=e.test(h);return i&&a&&(r=+r,h=+h),r===h?0:i&&!a?-1:a&&!i?1:r<h?-1:1};return Ks={compareIdentifiers:t,rcompareIdentifiers:(r,h)=>t(h,r)},Ks}var Qs,af;function ze(){if(af)return Qs;af=1;const e=$n(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Wn(),{safeRe:r,t:h}=fn(),i=Ta(),{compareIdentifiers:a}=Hd();class o{constructor(c,p){if(p=i(p),c instanceof o){if(c.loose===!!p.loose&&c.includePrerelease===!!p.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;const s=c.trim().match(p.loose?r[h.LOOSE]:r[h.FULL]);if(!s)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const u=+f;if(u>=0&&u<n)return u}return f}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof o)){if(typeof c=="string"&&c===this.version)return 0;c=new o(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof o||(c=new o(c,this.options)),this.major<c.major?-1:this.major>c.major?1:this.minor<c.minor?-1:this.minor>c.minor?1:this.patch<c.patch?-1:this.patch>c.patch?1:0}comparePre(c){if(c instanceof o||(c=new o(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let p=0;do{const s=this.prerelease[p],f=c.prerelease[p];if(e("prerelease compare",p,s,f),s===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(s===void 0)return-1;if(s===f)continue;return a(s,f)}while(++p)}compareBuild(c){c instanceof o||(c=new o(c,this.options));let p=0;do{const s=this.build[p],f=c.build[p];if(e("build compare",p,s,f),s===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(s===void 0)return-1;if(s===f)continue;return a(s,f)}while(++p)}inc(c,p,s){if(c.startsWith("pre")){if(!p&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(p){const f=`-${p}`.match(this.options.loose?r[h.PRERELEASELOOSE]:r[h.PRERELEASE]);if(!f||f[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,s),this.inc("pre",p,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,s),this.inc("pre",p,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const f=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[f];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);if(u===-1){if(p===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(p){let u=[p,f];s===!1&&(u=[p]),a(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=u):this.prerelease=u}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Qs=o,Qs}var Ys,uf;function pr(){if(uf)return Ys;uf=1;const e=ze();return Ys=(n,r,h=!1)=>{if(n instanceof e)return n;try{return new e(n,r)}catch(i){if(!h)return null;throw i}},Ys}var Xs,cf;function s1(){if(cf)return Xs;cf=1;const e=pr();return Xs=(n,r)=>{const h=e(n,r);return h?h.version:null},Xs}var eo,lf;function o1(){if(lf)return eo;lf=1;const e=pr();return eo=(n,r)=>{const h=e(n.trim().replace(/^[=v]+/,""),r);return h?h.version:null},eo}var to,ff;function a1(){if(ff)return to;ff=1;const e=ze();return to=(n,r,h,i,a)=>{typeof h=="string"&&(a=i,i=h,h=void 0);try{return new e(n instanceof e?n.version:n,h).inc(r,i,a).version}catch{return null}},to}var ro,hf;function u1(){if(hf)return ro;hf=1;const e=pr();return ro=(n,r)=>{const h=e(n,null,!0),i=e(r,null,!0),a=h.compare(i);if(a===0)return null;const o=a>0,d=o?h:i,c=o?i:h,p=!!d.prerelease.length;if(!!c.prerelease.length&&!p){if(!c.patch&&!c.minor)return"major";if(c.compareMain(d)===0)return c.minor&&!c.patch?"minor":"patch"}const f=p?"pre":"";return h.major!==i.major?f+"major":h.minor!==i.minor?f+"minor":h.patch!==i.patch?f+"patch":"prerelease"},ro}var no,df;function c1(){if(df)return no;df=1;const e=ze();return no=(n,r)=>new e(n,r).major,no}var io,pf;function l1(){if(pf)return io;pf=1;const e=ze();return io=(n,r)=>new e(n,r).minor,io}var so,gf;function f1(){if(gf)return so;gf=1;const e=ze();return so=(n,r)=>new e(n,r).patch,so}var oo,mf;function h1(){if(mf)return oo;mf=1;const e=pr();return oo=(n,r)=>{const h=e(n,r);return h&&h.prerelease.length?h.prerelease:null},oo}var ao,yf;function rt(){if(yf)return ao;yf=1;const e=ze();return ao=(n,r,h)=>new e(n,h).compare(new e(r,h)),ao}var uo,_f;function d1(){if(_f)return uo;_f=1;const e=rt();return uo=(n,r,h)=>e(r,n,h),uo}var co,vf;function p1(){if(vf)return co;vf=1;const e=rt();return co=(n,r)=>e(n,r,!0),co}var lo,bf;function Ba(){if(bf)return lo;bf=1;const e=ze();return lo=(n,r,h)=>{const i=new e(n,h),a=new e(r,h);return i.compare(a)||i.compareBuild(a)},lo}var fo,wf;function g1(){if(wf)return fo;wf=1;const e=Ba();return fo=(n,r)=>n.sort((h,i)=>e(h,i,r)),fo}var ho,Ef;function m1(){if(Ef)return ho;Ef=1;const e=Ba();return ho=(n,r)=>n.sort((h,i)=>e(i,h,r)),ho}var po,Rf;function Vn(){if(Rf)return po;Rf=1;const e=rt();return po=(n,r,h)=>e(n,r,h)>0,po}var go,Sf;function Pa(){if(Sf)return go;Sf=1;const e=rt();return go=(n,r,h)=>e(n,r,h)<0,go}var mo,Cf;function Wd(){if(Cf)return mo;Cf=1;const e=rt();return mo=(n,r,h)=>e(n,r,h)===0,mo}var yo,Mf;function $d(){if(Mf)return yo;Mf=1;const e=rt();return yo=(n,r,h)=>e(n,r,h)!==0,yo}var _o,kf;function La(){if(kf)return _o;kf=1;const e=rt();return _o=(n,r,h)=>e(n,r,h)>=0,_o}var vo,If;function Na(){if(If)return vo;If=1;const e=rt();return vo=(n,r,h)=>e(n,r,h)<=0,vo}var bo,Af;function Vd(){if(Af)return bo;Af=1;const e=Wd(),t=$d(),n=Vn(),r=La(),h=Pa(),i=Na();return bo=(o,d,c,p)=>{switch(d){case"===":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o===c;case"!==":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o!==c;case"":case"=":case"==":return e(o,c,p);case"!=":return t(o,c,p);case">":return n(o,c,p);case">=":return r(o,c,p);case"<":return h(o,c,p);case"<=":return i(o,c,p);default:throw new TypeError(`Invalid operator: ${d}`)}},bo}var wo,xf;function y1(){if(xf)return wo;xf=1;const e=ze(),t=pr(),{safeRe:n,t:r}=fn();return wo=(i,a)=>{if(i instanceof e)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;a=a||{};let o=null;if(!a.rtl)o=i.match(a.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);else{const u=a.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let m;for(;(m=u.exec(i))&&(!o||o.index+o[0].length!==i.length);)(!o||m.index+m[0].length!==o.index+o[0].length)&&(o=m),u.lastIndex=m.index+m[1].length+m[2].length;u.lastIndex=-1}if(o===null)return null;const d=o[2],c=o[3]||"0",p=o[4]||"0",s=a.includePrerelease&&o[5]?`-${o[5]}`:"",f=a.includePrerelease&&o[6]?`+${o[6]}`:"";return t(`${d}.${c}.${p}${s}${f}`,a)},wo}var Eo,Tf;function _1(){if(Tf)return Eo;Tf=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const r=this.map.get(n);if(r!==void 0)return this.map.delete(n),this.map.set(n,r),r}delete(n){return this.map.delete(n)}set(n,r){if(!this.delete(n)&&r!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(n,r)}return this}}return Eo=e,Eo}var Ro,Bf;function nt(){if(Bf)return Ro;Bf=1;const e=/\s+/g;class t{constructor(R,C){if(C=h(C),R instanceof t)return R.loose===!!C.loose&&R.includePrerelease===!!C.includePrerelease?R:new t(R.raw,C);if(R instanceof i)return this.raw=R.value,this.set=[[R]],this.formatted=void 0,this;if(this.options=C,this.loose=!!C.loose,this.includePrerelease=!!C.includePrerelease,this.raw=R.trim().replace(e," "),this.set=this.raw.split("||").map(M=>this.parseRange(M.trim())).filter(M=>M.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const M=this.set[0];if(this.set=this.set.filter(A=>!_(A[0])),this.set.length===0)this.set=[M];else if(this.set.length>1){for(const A of this.set)if(A.length===1&&y(A[0])){this.set=[A];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let R=0;R<this.set.length;R++){R>0&&(this.formatted+="||");const C=this.set[R];for(let M=0;M<C.length;M++)M>0&&(this.formatted+=" "),this.formatted+=C[M].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(R){const M=((this.options.includePrerelease&&u)|(this.options.loose&&m))+":"+R,A=r.get(M);if(A)return A;const L=this.options.loose,j=L?d[c.HYPHENRANGELOOSE]:d[c.HYPHENRANGE];R=R.replace(j,re(this.options.includePrerelease)),a("hyphen replace",R),R=R.replace(d[c.COMPARATORTRIM],p),a("comparator trim",R),R=R.replace(d[c.TILDETRIM],s),a("tilde trim",R),R=R.replace(d[c.CARETTRIM],f),a("caret trim",R);let T=R.split(" ").map(Y=>b(Y,this.options)).join(" ").split(/\s+/).map(Y=>Q(Y,this.options));L&&(T=T.filter(Y=>(a("loose invalid filter",Y,this.options),!!Y.match(d[c.COMPARATORLOOSE])))),a("range list",T);const w=new Map,N=T.map(Y=>new i(Y,this.options));for(const Y of N){if(_(Y))return[Y];w.set(Y.value,Y)}w.size>1&&w.has("")&&w.delete("");const te=[...w.values()];return r.set(M,te),te}intersects(R,C){if(!(R instanceof t))throw new TypeError("a Range is required");return this.set.some(M=>l(M,C)&&R.set.some(A=>l(A,C)&&M.every(L=>A.every(j=>L.intersects(j,C)))))}test(R){if(!R)return!1;if(typeof R=="string")try{R=new o(R,this.options)}catch{return!1}for(let C=0;C<this.set.length;C++)if(q(this.set[C],R,this.options))return!0;return!1}}Ro=t;const n=_1(),r=new n,h=Ta(),i=zn(),a=$n(),o=ze(),{safeRe:d,t:c,comparatorTrimReplace:p,tildeTrimReplace:s,caretTrimReplace:f}=fn(),{FLAG_INCLUDE_PRERELEASE:u,FLAG_LOOSE:m}=Wn(),_=g=>g.value==="<0.0.0-0",y=g=>g.value==="",l=(g,R)=>{let C=!0;const M=g.slice();let A=M.pop();for(;C&&M.length;)C=M.every(L=>A.intersects(L,R)),A=M.pop();return C},b=(g,R)=>(g=g.replace(d[c.BUILD],""),a("comp",g,R),g=D(g,R),a("caret",g),g=I(g,R),a("tildes",g),g=W(g,R),a("xrange",g),g=ee(g,R),a("stars",g),g),E=g=>!g||g.toLowerCase()==="x"||g==="*",I=(g,R)=>g.trim().split(/\s+/).map(C=>x(C,R)).join(" "),x=(g,R)=>{const C=R.loose?d[c.TILDELOOSE]:d[c.TILDE];return g.replace(C,(M,A,L,j,T)=>{a("tilde",g,M,A,L,j,T);let w;return E(A)?w="":E(L)?w=`>=${A}.0.0 <${+A+1}.0.0-0`:E(j)?w=`>=${A}.${L}.0 <${A}.${+L+1}.0-0`:T?(a("replaceTilde pr",T),w=`>=${A}.${L}.${j}-${T} <${A}.${+L+1}.0-0`):w=`>=${A}.${L}.${j} <${A}.${+L+1}.0-0`,a("tilde return",w),w})},D=(g,R)=>g.trim().split(/\s+/).map(C=>F(C,R)).join(" "),F=(g,R)=>{a("caret",g,R);const C=R.loose?d[c.CARETLOOSE]:d[c.CARET],M=R.includePrerelease?"-0":"";return g.replace(C,(A,L,j,T,w)=>{a("caret",g,A,L,j,T,w);let N;return E(L)?N="":E(j)?N=`>=${L}.0.0${M} <${+L+1}.0.0-0`:E(T)?L==="0"?N=`>=${L}.${j}.0${M} <${L}.${+j+1}.0-0`:N=`>=${L}.${j}.0${M} <${+L+1}.0.0-0`:w?(a("replaceCaret pr",w),L==="0"?j==="0"?N=`>=${L}.${j}.${T}-${w} <${L}.${j}.${+T+1}-0`:N=`>=${L}.${j}.${T}-${w} <${L}.${+j+1}.0-0`:N=`>=${L}.${j}.${T}-${w} <${+L+1}.0.0-0`):(a("no pr"),L==="0"?j==="0"?N=`>=${L}.${j}.${T}${M} <${L}.${j}.${+T+1}-0`:N=`>=${L}.${j}.${T}${M} <${L}.${+j+1}.0-0`:N=`>=${L}.${j}.${T} <${+L+1}.0.0-0`),a("caret return",N),N})},W=(g,R)=>(a("replaceXRanges",g,R),g.split(/\s+/).map(C=>J(C,R)).join(" ")),J=(g,R)=>{g=g.trim();const C=R.loose?d[c.XRANGELOOSE]:d[c.XRANGE];return g.replace(C,(M,A,L,j,T,w)=>{a("xRange",g,M,A,L,j,T,w);const N=E(L),te=N||E(j),Y=te||E(T),U=Y;return A==="="&&U&&(A=""),w=R.includePrerelease?"-0":"",N?A===">"||A==="<"?M="<0.0.0-0":M="*":A&&U?(te&&(j=0),T=0,A===">"?(A=">=",te?(L=+L+1,j=0,T=0):(j=+j+1,T=0)):A==="<="&&(A="<",te?L=+L+1:j=+j+1),A==="<"&&(w="-0"),M=`${A+L}.${j}.${T}${w}`):te?M=`>=${L}.0.0${w} <${+L+1}.0.0-0`:Y&&(M=`>=${L}.${j}.0${w} <${L}.${+j+1}.0-0`),a("xRange return",M),M})},ee=(g,R)=>(a("replaceStars",g,R),g.trim().replace(d[c.STAR],"")),Q=(g,R)=>(a("replaceGTE0",g,R),g.trim().replace(d[R.includePrerelease?c.GTE0PRE:c.GTE0],"")),re=g=>(R,C,M,A,L,j,T,w,N,te,Y,U)=>(E(M)?C="":E(A)?C=`>=${M}.0.0${g?"-0":""}`:E(L)?C=`>=${M}.${A}.0${g?"-0":""}`:j?C=`>=${C}`:C=`>=${C}${g?"-0":""}`,E(N)?w="":E(te)?w=`<${+N+1}.0.0-0`:E(Y)?w=`<${N}.${+te+1}.0-0`:U?w=`<=${N}.${te}.${Y}-${U}`:g?w=`<${N}.${te}.${+Y+1}-0`:w=`<=${w}`,`${C} ${w}`.trim()),q=(g,R,C)=>{for(let M=0;M<g.length;M++)if(!g[M].test(R))return!1;if(R.prerelease.length&&!C.includePrerelease){for(let M=0;M<g.length;M++)if(a(g[M].semver),g[M].semver!==i.ANY&&g[M].semver.prerelease.length>0){const A=g[M].semver;if(A.major===R.major&&A.minor===R.minor&&A.patch===R.patch)return!0}return!1}return!0};return Ro}var So,Pf;function zn(){if(Pf)return So;Pf=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(p,s){if(s=n(s),p instanceof t){if(p.loose===!!s.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),a("comparator",p,s),this.options=s,this.loose=!!s.loose,this.parse(p),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(p){const s=this.options.loose?r[h.COMPARATORLOOSE]:r[h.COMPARATOR],f=p.match(s);if(!f)throw new TypeError(`Invalid comparator: ${p}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new o(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(p){if(a("Comparator.test",p,this.options.loose),this.semver===e||p===e)return!0;if(typeof p=="string")try{p=new o(p,this.options)}catch{return!1}return i(p,this.operator,this.semver,this.options)}intersects(p,s){if(!(p instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new d(p.value,s).test(this.value):p.operator===""?p.value===""?!0:new d(this.value,s).test(p.semver):(s=n(s),s.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!s.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||i(this.semver,"<",p.semver,s)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||i(this.semver,">",p.semver,s)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}}So=t;const n=Ta(),{safeRe:r,t:h}=fn(),i=Vd(),a=$n(),o=ze(),d=nt();return So}var Co,Lf;function Gn(){if(Lf)return Co;Lf=1;const e=nt();return Co=(n,r,h)=>{try{r=new e(r,h)}catch{return!1}return r.test(n)},Co}var Mo,Nf;function v1(){if(Nf)return Mo;Nf=1;const e=nt();return Mo=(n,r)=>new e(n,r).set.map(h=>h.map(i=>i.value).join(" ").trim().split(" ")),Mo}var ko,Of;function b1(){if(Of)return ko;Of=1;const e=ze(),t=nt();return ko=(r,h,i)=>{let a=null,o=null,d=null;try{d=new t(h,i)}catch{return null}return r.forEach(c=>{d.test(c)&&(!a||o.compare(c)===-1)&&(a=c,o=new e(a,i))}),a},ko}var Io,Ff;function w1(){if(Ff)return Io;Ff=1;const e=ze(),t=nt();return Io=(r,h,i)=>{let a=null,o=null,d=null;try{d=new t(h,i)}catch{return null}return r.forEach(c=>{d.test(c)&&(!a||o.compare(c)===1)&&(a=c,o=new e(a,i))}),a},Io}var Ao,qf;function E1(){if(qf)return Ao;qf=1;const e=ze(),t=nt(),n=Vn();return Ao=(h,i)=>{h=new t(h,i);let a=new e("0.0.0");if(h.test(a)||(a=new e("0.0.0-0"),h.test(a)))return a;a=null;for(let o=0;o<h.set.length;++o){const d=h.set[o];let c=null;d.forEach(p=>{const s=new e(p.semver.version);switch(p.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!c||n(s,c))&&(c=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),c&&(!a||n(a,c))&&(a=c)}return a&&h.test(a)?a:null},Ao}var xo,Df;function R1(){if(Df)return xo;Df=1;const e=nt();return xo=(n,r)=>{try{return new e(n,r).range||"*"}catch{return null}},xo}var To,jf;function Oa(){if(jf)return To;jf=1;const e=ze(),t=zn(),{ANY:n}=t,r=nt(),h=Gn(),i=Vn(),a=Pa(),o=Na(),d=La();return To=(p,s,f,u)=>{p=new e(p,u),s=new r(s,u);let m,_,y,l,b;switch(f){case">":m=i,_=o,y=a,l=">",b=">=";break;case"<":m=a,_=d,y=i,l="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(h(p,s,u))return!1;for(let E=0;E<s.set.length;++E){const I=s.set[E];let x=null,D=null;if(I.forEach(F=>{F.semver===n&&(F=new t(">=0.0.0")),x=x||F,D=D||F,m(F.semver,x.semver,u)?x=F:y(F.semver,D.semver,u)&&(D=F)}),x.operator===l||x.operator===b||(!D.operator||D.operator===l)&&_(p,D.semver))return!1;if(D.operator===b&&y(p,D.semver))return!1}return!0},To}var Bo,Uf;function S1(){if(Uf)return Bo;Uf=1;const e=Oa();return Bo=(n,r,h)=>e(n,r,">",h),Bo}var Po,Hf;function C1(){if(Hf)return Po;Hf=1;const e=Oa();return Po=(n,r,h)=>e(n,r,"<",h),Po}var Lo,Wf;function M1(){if(Wf)return Lo;Wf=1;const e=nt();return Lo=(n,r,h)=>(n=new e(n,h),r=new e(r,h),n.intersects(r,h)),Lo}var No,$f;function k1(){if($f)return No;$f=1;const e=Gn(),t=rt();return No=(n,r,h)=>{const i=[];let a=null,o=null;const d=n.sort((f,u)=>t(f,u,h));for(const f of d)e(f,r,h)?(o=f,a||(a=f)):(o&&i.push([a,o]),o=null,a=null);a&&i.push([a,null]);const c=[];for(const[f,u]of i)f===u?c.push(f):!u&&f===d[0]?c.push("*"):u?f===d[0]?c.push(`<=${u}`):c.push(`${f} - ${u}`):c.push(`>=${f}`);const p=c.join(" || "),s=typeof r.raw=="string"?r.raw:String(r);return p.length<s.length?p:r},No}var Oo,Vf;function I1(){if(Vf)return Oo;Vf=1;const e=nt(),t=zn(),{ANY:n}=t,r=Gn(),h=rt(),i=(s,f,u={})=>{if(s===f)return!0;s=new e(s,u),f=new e(f,u);let m=!1;e:for(const _ of s.set){for(const y of f.set){const l=d(_,y,u);if(m=m||l!==null,l)continue e}if(m)return!1}return!0},a=[new t(">=0.0.0-0")],o=[new t(">=0.0.0")],d=(s,f,u)=>{if(s===f)return!0;if(s.length===1&&s[0].semver===n){if(f.length===1&&f[0].semver===n)return!0;u.includePrerelease?s=a:s=o}if(f.length===1&&f[0].semver===n){if(u.includePrerelease)return!0;f=o}const m=new Set;let _,y;for(const W of s)W.operator===">"||W.operator===">="?_=c(_,W,u):W.operator==="<"||W.operator==="<="?y=p(y,W,u):m.add(W.semver);if(m.size>1)return null;let l;if(_&&y){if(l=h(_.semver,y.semver,u),l>0)return null;if(l===0&&(_.operator!==">="||y.operator!=="<="))return null}for(const W of m){if(_&&!r(W,String(_),u)||y&&!r(W,String(y),u))return null;for(const J of f)if(!r(W,String(J),u))return!1;return!0}let b,E,I,x,D=y&&!u.includePrerelease&&y.semver.prerelease.length?y.semver:!1,F=_&&!u.includePrerelease&&_.semver.prerelease.length?_.semver:!1;D&&D.prerelease.length===1&&y.operator==="<"&&D.prerelease[0]===0&&(D=!1);for(const W of f){if(x=x||W.operator===">"||W.operator===">=",I=I||W.operator==="<"||W.operator==="<=",_){if(F&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===F.major&&W.semver.minor===F.minor&&W.semver.patch===F.patch&&(F=!1),W.operator===">"||W.operator===">="){if(b=c(_,W,u),b===W&&b!==_)return!1}else if(_.operator===">="&&!r(_.semver,String(W),u))return!1}if(y){if(D&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===D.major&&W.semver.minor===D.minor&&W.semver.patch===D.patch&&(D=!1),W.operator==="<"||W.operator==="<="){if(E=p(y,W,u),E===W&&E!==y)return!1}else if(y.operator==="<="&&!r(y.semver,String(W),u))return!1}if(!W.operator&&(y||_)&&l!==0)return!1}return!(_&&I&&!y&&l!==0||y&&x&&!_&&l!==0||F||D)},c=(s,f,u)=>{if(!s)return f;const m=h(s.semver,f.semver,u);return m>0?s:m<0||f.operator===">"&&s.operator===">="?f:s},p=(s,f,u)=>{if(!s)return f;const m=h(s.semver,f.semver,u);return m<0?s:m>0||f.operator==="<"&&s.operator==="<="?f:s};return Oo=i,Oo}var Fo,zf;function A1(){if(zf)return Fo;zf=1;const e=fn(),t=Wn(),n=ze(),r=Hd(),h=pr(),i=s1(),a=o1(),o=a1(),d=u1(),c=c1(),p=l1(),s=f1(),f=h1(),u=rt(),m=d1(),_=p1(),y=Ba(),l=g1(),b=m1(),E=Vn(),I=Pa(),x=Wd(),D=$d(),F=La(),W=Na(),J=Vd(),ee=y1(),Q=zn(),re=nt(),q=Gn(),g=v1(),R=b1(),C=w1(),M=E1(),A=R1(),L=Oa(),j=S1(),T=C1(),w=M1(),N=k1(),te=I1();return Fo={parse:h,valid:i,clean:a,inc:o,diff:d,major:c,minor:p,patch:s,prerelease:f,compare:u,rcompare:m,compareLoose:_,compareBuild:y,sort:l,rsort:b,gt:E,lt:I,eq:x,neq:D,gte:F,lte:W,cmp:J,coerce:ee,Comparator:Q,Range:re,satisfies:q,toComparators:g,maxSatisfying:R,minSatisfying:C,minVersion:M,validRange:A,outside:L,gtr:j,ltr:T,intersects:w,simplifyRange:N,subset:te,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},Fo}var Gf;function x1(){return Gf||(Gf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=A1(),n=Yt,r=ht();e.VersionStruct=(0,n.refine)((0,n.string)(),"Version",s=>(0,t.valid)(s)===null?`Expected SemVer version, got "${s}"`:!0),e.VersionRangeStruct=(0,n.refine)((0,n.string)(),"Version range",s=>(0,t.validRange)(s)===null?`Expected SemVer range, got "${s}"`:!0);function h(s){return(0,n.is)(s,e.VersionStruct)}e.isValidSemVerVersion=h;function i(s){return(0,n.is)(s,e.VersionRangeStruct)}e.isValidSemVerRange=i;function a(s){(0,r.assertStruct)(s,e.VersionStruct)}e.assertIsSemVerVersion=a;function o(s){(0,r.assertStruct)(s,e.VersionRangeStruct)}e.assertIsSemVerRange=o;function d(s,f){return(0,t.gt)(s,f)}e.gtVersion=d;function c(s,f){return(0,t.gtr)(s,f)}e.gtRange=c;function p(s,f){return(0,t.satisfies)(s,f,{includePrerelease:!0})}e.satisfiesVersionRange=p})(zs)),zs}var Jf;function T1(){return Jf||(Jf=1,(function(e){var t=Ht&&Ht.__createBinding||(Object.create?(function(r,h,i,a){a===void 0&&(a=i);var o=Object.getOwnPropertyDescriptor(h,i);(!o||("get"in o?!h.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return h[i]}}),Object.defineProperty(r,a,o)}):(function(r,h,i,a){a===void 0&&(a=i),r[a]=h[i]})),n=Ht&&Ht.__exportStar||function(r,h){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(h,i)&&t(h,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(ht(),e),n(jd(),e),n(Ud(),e),n($g(),e),n(Vg(),e),n(zg(),e),n(Gg(),e),n(Hn(),e),n(Jg(),e),n(Zg(),e),n(Xg(),e),n(e1(),e),n(t1(),e),n(r1(),e),n(n1(),e),n(i1(),e),n(x1(),e)})(Ht)),Ht}var Zf;function B1(){return Zf||(Zf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;const t=T1();Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return t.createModuleLogger}}),e.projectLogger=(0,t.createProjectLogger)("eth-block-tracker")})(Ns)),Ns}var Kf;function P1(){if(Kf)return jt;Kf=1;var e=jt&&jt.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(jt,"__esModule",{value:!0}),jt.PollingBlockTracker=void 0;const t=e(Ca()),n=e(ig()),r=Td(),h=B1(),i=(0,h.createModuleLogger)(h.projectLogger,"polling-block-tracker"),a=(0,t.default)(),o=1e3;let d=class extends r.BaseBlockTracker{constructor(s={}){var f;if(!s.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},s),{blockResetDuration:(f=s.blockResetDuration)!==null&&f!==void 0?f:s.pollingInterval})),this._provider=s.provider,this._pollingInterval=s.pollingInterval||20*o,this._retryTimeout=s.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=s.keepEventLoopActive===void 0?!0:s.keepEventLoopActive,this._setSkipCacheFlag=s.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var s;this._isRunning;)try{await this._updateLatestBlock();const f=c(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await f}catch(f){const u=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
|
|
3
3
|
${(s=f.stack)!==null&&s!==void 0?s:f}`);try{this.emit("error",u)}catch{console.error(u)}const m=c(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await m}}async _updateLatestBlock(){const s=await this._fetchLatestBlock();this._newPotentialLatest(s)}async _fetchLatestBlock(){const s={jsonrpc:"2.0",id:a(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(s.skipCache=!0),i("Making request",s);const f=await(0,n.default)(u=>this._provider.sendAsync(s,u))();if(i("Got response",f),f.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
|
|
4
4
|
${f.error.message}`);return f.result}};jt.PollingBlockTracker=d;function c(p,s){return new Promise(f=>{const u=setTimeout(f,p);u.unref&&s&&u.unref()})}return jt}var Wt={},Qf;function L1(){if(Qf)return Wt;Qf=1;var e=Wt&&Wt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.SubscribeBlockTracker=void 0;const t=e(Ca()),n=Td(),r=(0,t.default)();let h=class extends n.BaseBlockTracker{constructor(a={}){if(!a.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(a),this._provider=a.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const a=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(a)}catch(a){this.emit("error",a)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(a){this.emit("error",a)}}_call(a,...o){return new Promise((d,c)=>{this._provider.sendAsync({id:r(),method:a,params:o,jsonrpc:"2.0"},(p,s)=>{p?c(p):d(s.result)})})}_handleSubData(a,o){var d;o.method==="eth_subscription"&&((d=o.params)===null||d===void 0?void 0:d.subscription)===this._subscriptionId&&this._newPotentialLatest(o.params.result.number)}};return Wt.SubscribeBlockTracker=h,Wt}var Yf;function N1(){return Yf||(Yf=1,(function(e){var t=Dt&&Dt.__createBinding||(Object.create?(function(r,h,i,a){a===void 0&&(a=i),Object.defineProperty(r,a,{enumerable:!0,get:function(){return h[i]}})}):(function(r,h,i,a){a===void 0&&(a=i),r[a]=h[i]})),n=Dt&&Dt.__exportStar||function(r,h){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(h,i)&&t(h,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(P1(),e),n(L1(),e)})(Dt)),Dt}var $t={},$r={},Vr={},Xf;function zd(){if(Xf)return Vr;Xf=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.getUniqueId=void 0;const e=4294967295;let t=Math.floor(Math.random()*e);function n(){return t=(t+1)%e,t}return Vr.getUniqueId=n,Vr}var eh;function O1(){if(eh)return $r;eh=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.createIdRemapMiddleware=void 0;const e=zd();function t(){return(n,r,h,i)=>{const a=n.id,o=e.getUniqueId();n.id=o,r.id=o,h(d=>{n.id=a,r.id=a,d()})}}return $r.createIdRemapMiddleware=t,$r}var zr={},th;function F1(){if(th)return zr;th=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.createAsyncMiddleware=void 0;function e(t){return async(n,r,h,i)=>{let a;const o=new Promise(s=>{a=s});let d=null,c=!1;const p=async()=>{c=!0,h(s=>{d=s,a()}),await o};try{await t(n,r,p),c?(await o,d(null)):i(null)}catch(s){d?d(s):i(s)}}}return zr.createAsyncMiddleware=e,zr}var Gr={},rh;function q1(){if(rh)return Gr;rh=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.createScaffoldMiddleware=void 0;function e(t){return(n,r,h,i)=>{const a=t[n.method];return a===void 0?h():typeof a=="function"?a(n,r,h,i):(r.result=a,i())}}return Gr.createScaffoldMiddleware=e,Gr}var Vt={},In={},nh;function D1(){if(nh)return In;nh=1,Object.defineProperty(In,"__esModule",{value:!0});const e=Ln();function t(h,i,a){try{Reflect.apply(h,i,a)}catch(o){setTimeout(()=>{throw o})}}function n(h){const i=h.length,a=new Array(i);for(let o=0;o<i;o+=1)a[o]=h[o];return a}class r extends e.EventEmitter{emit(i,...a){let o=i==="error";const d=this._events;if(d!==void 0)o=o&&d.error===void 0;else if(!o)return!1;if(o){let p;if(a.length>0&&([p]=a),p instanceof Error)throw p;const s=new Error(`Unhandled error.${p?` (${p.message})`:""}`);throw s.context=p,s}const c=d[i];if(c===void 0)return!1;if(typeof c=="function")t(c,this,a);else{const p=c.length,s=n(c);for(let f=0;f<p;f+=1)t(s[f],this,a)}return!0}}return In.default=r,In}var qo={},zt={},Do,ih;function j1(){if(ih)return Do;ih=1,Do=i,i.default=i,i.stable=c,i.stableStringify=c;var e="[...]",t="[Circular]",n=[],r=[];function h(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(f,u,m,_){typeof _>"u"&&(_=h()),o(f,"",0,[],void 0,0,_);var y;try{r.length===0?y=JSON.stringify(f,u,m):y=JSON.stringify(f,s(u),m)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;n.length!==0;){var l=n.pop();l.length===4?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return y}function a(f,u,m,_){var y=Object.getOwnPropertyDescriptor(_,m);y.get!==void 0?y.configurable?(Object.defineProperty(_,m,{value:f}),n.push([_,m,u,y])):r.push([u,m,f]):(_[m]=f,n.push([_,m,u]))}function o(f,u,m,_,y,l,b){l+=1;var E;if(typeof f=="object"&&f!==null){for(E=0;E<_.length;E++)if(_[E]===f){a(t,f,u,y);return}if(typeof b.depthLimit<"u"&&l>b.depthLimit){a(e,f,u,y);return}if(typeof b.edgesLimit<"u"&&m+1>b.edgesLimit){a(e,f,u,y);return}if(_.push(f),Array.isArray(f))for(E=0;E<f.length;E++)o(f[E],E,E,_,f,l,b);else{var I=Object.keys(f);for(E=0;E<I.length;E++){var x=I[E];o(f[x],x,E,_,f,l,b)}}_.pop()}}function d(f,u){return f<u?-1:f>u?1:0}function c(f,u,m,_){typeof _>"u"&&(_=h());var y=p(f,"",0,[],void 0,0,_)||f,l;try{r.length===0?l=JSON.stringify(y,u,m):l=JSON.stringify(y,s(u),m)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;n.length!==0;){var b=n.pop();b.length===4?Object.defineProperty(b[0],b[1],b[3]):b[0][b[1]]=b[2]}}return l}function p(f,u,m,_,y,l,b){l+=1;var E;if(typeof f=="object"&&f!==null){for(E=0;E<_.length;E++)if(_[E]===f){a(t,f,u,y);return}try{if(typeof f.toJSON=="function")return}catch{return}if(typeof b.depthLimit<"u"&&l>b.depthLimit){a(e,f,u,y);return}if(typeof b.edgesLimit<"u"&&m+1>b.edgesLimit){a(e,f,u,y);return}if(_.push(f),Array.isArray(f))for(E=0;E<f.length;E++)p(f[E],E,E,_,f,l,b);else{var I={},x=Object.keys(f).sort(d);for(E=0;E<x.length;E++){var D=x[E];p(f[D],D,E,_,f,l,b),I[D]=f[D]}if(typeof y<"u")n.push([y,u,f]),y[u]=I;else return I}_.pop()}}function s(f){return f=typeof f<"u"?f:function(u,m){return m},function(u,m){if(r.length>0)for(var _=0;_<r.length;_++){var y=r[_];if(y[1]===u&&y[0]===m){m=y[2],r.splice(_,1);break}}return f.call(this,u,m)}}return Do}var sh;function Fa(){if(sh)return zt;sh=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.EthereumProviderError=zt.EthereumRpcError=void 0;const e=j1();class t extends Error{constructor(a,o,d){if(!Number.isInteger(a))throw new Error('"code" must be an integer.');if(!o||typeof o!="string")throw new Error('"message" must be a nonempty string.');super(o),this.code=a,d!==void 0&&(this.data=d)}serialize(){const a={code:this.code,message:this.message};return this.data!==void 0&&(a.data=this.data),this.stack&&(a.stack=this.stack),a}toString(){return e.default(this.serialize(),h,2)}}zt.EthereumRpcError=t;class n extends t{constructor(a,o,d){if(!r(a))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(a,o,d)}}zt.EthereumProviderError=n;function r(i){return Number.isInteger(i)&&i>=1e3&&i<=4999}function h(i,a){if(a!=="[Circular]")return a}return zt}var jo={},Gt={},oh;function qa(){return oh||(oh=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.errorValues=Gt.errorCodes=void 0,Gt.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},Gt.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}),Gt}var ah;function Gd(){return ah||(ah=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=qa(),n=Fa(),r=t.errorCodes.rpc.internal,h="Unspecified error message. This is a bug, please report it.",i={code:r,message:a(r)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function a(f,u=h){if(Number.isInteger(f)){const m=f.toString();if(s(t.errorValues,m))return t.errorValues[m].message;if(c(f))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return u}e.getMessageFromCode=a;function o(f){if(!Number.isInteger(f))return!1;const u=f.toString();return!!(t.errorValues[u]||c(f))}e.isValidCode=o;function d(f,{fallbackError:u=i,shouldIncludeStack:m=!1}={}){var _,y;if(!u||!Number.isInteger(u.code)||typeof u.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(f instanceof n.EthereumRpcError)return f.serialize();const l={};if(f&&typeof f=="object"&&!Array.isArray(f)&&s(f,"code")&&o(f.code)){const E=f;l.code=E.code,E.message&&typeof E.message=="string"?(l.message=E.message,s(E,"data")&&(l.data=E.data)):(l.message=a(l.code),l.data={originalError:p(f)})}else{l.code=u.code;const E=(_=f)===null||_===void 0?void 0:_.message;l.message=E&&typeof E=="string"?E:u.message,l.data={originalError:p(f)}}const b=(y=f)===null||y===void 0?void 0:y.stack;return m&&f&&b&&typeof b=="string"&&(l.stack=b),l}e.serializeError=d;function c(f){return f>=-32099&&f<=-32e3}function p(f){return f&&typeof f=="object"&&!Array.isArray(f)?Object.assign({},f):f}function s(f,u){return Object.prototype.hasOwnProperty.call(f,u)}})(jo)),jo}var Jr={},uh;function U1(){if(uh)return Jr;uh=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.ethErrors=void 0;const e=Fa(),t=Gd(),n=qa();Jr.ethErrors={rpc:{parse:a=>r(n.errorCodes.rpc.parse,a),invalidRequest:a=>r(n.errorCodes.rpc.invalidRequest,a),invalidParams:a=>r(n.errorCodes.rpc.invalidParams,a),methodNotFound:a=>r(n.errorCodes.rpc.methodNotFound,a),internal:a=>r(n.errorCodes.rpc.internal,a),server:a=>{if(!a||typeof a!="object"||Array.isArray(a))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:o}=a;if(!Number.isInteger(o)||o>-32005||o<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return r(o,a)},invalidInput:a=>r(n.errorCodes.rpc.invalidInput,a),resourceNotFound:a=>r(n.errorCodes.rpc.resourceNotFound,a),resourceUnavailable:a=>r(n.errorCodes.rpc.resourceUnavailable,a),transactionRejected:a=>r(n.errorCodes.rpc.transactionRejected,a),methodNotSupported:a=>r(n.errorCodes.rpc.methodNotSupported,a),limitExceeded:a=>r(n.errorCodes.rpc.limitExceeded,a)},provider:{userRejectedRequest:a=>h(n.errorCodes.provider.userRejectedRequest,a),unauthorized:a=>h(n.errorCodes.provider.unauthorized,a),unsupportedMethod:a=>h(n.errorCodes.provider.unsupportedMethod,a),disconnected:a=>h(n.errorCodes.provider.disconnected,a),chainDisconnected:a=>h(n.errorCodes.provider.chainDisconnected,a),custom:a=>{if(!a||typeof a!="object"||Array.isArray(a))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:o,message:d,data:c}=a;if(!d||typeof d!="string")throw new Error('"message" must be a nonempty string');return new e.EthereumProviderError(o,d,c)}}};function r(a,o){const[d,c]=i(o);return new e.EthereumRpcError(a,d||t.getMessageFromCode(a),c)}function h(a,o){const[d,c]=i(o);return new e.EthereumProviderError(a,d||t.getMessageFromCode(a),c)}function i(a){if(a){if(typeof a=="string")return[a];if(typeof a=="object"&&!Array.isArray(a)){const{message:o,data:d}=a;if(o&&typeof o!="string")throw new Error("Must specify string message.");return[o||void 0,d]}}return[]}return Jr}var ch;function H1(){return ch||(ch=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Fa();Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const n=Gd();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});const r=U1();Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return r.ethErrors}});const h=qa();Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return h.errorCodes}})})(qo)),qo}var lh;function Jd(){if(lh)return Vt;lh=1;var e=Vt&&Vt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.JsonRpcEngine=void 0;const t=e(D1()),n=H1();let r=class lt extends t.default{constructor(){super(),this._middleware=[]}push(a){this._middleware.push(a)}handle(a,o){if(o&&typeof o!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(a)?o?this._handleBatch(a,o):this._handleBatch(a):o?this._handle(a,o):this._promiseHandle(a)}asMiddleware(){return async(a,o,d,c)=>{try{const[p,s,f]=await lt._runAllMiddleware(a,o,this._middleware);return s?(await lt._runReturnHandlers(f),c(p)):d(async u=>{try{await lt._runReturnHandlers(f)}catch(m){return u(m)}return u()})}catch(p){return c(p)}}}async _handleBatch(a,o){try{const d=await Promise.all(a.map(this._promiseHandle.bind(this)));return o?o(null,d):d}catch(d){if(o)return o(d);throw d}}_promiseHandle(a){return new Promise(o=>{this._handle(a,(d,c)=>{o(c)})})}async _handle(a,o){if(!a||Array.isArray(a)||typeof a!="object"){const s=new n.EthereumRpcError(n.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof a}`,{request:a});return o(s,{id:void 0,jsonrpc:"2.0",error:s})}if(typeof a.method!="string"){const s=new n.EthereumRpcError(n.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof a.method}`,{request:a});return o(s,{id:a.id,jsonrpc:"2.0",error:s})}const d=Object.assign({},a),c={id:d.id,jsonrpc:d.jsonrpc};let p=null;try{await this._processRequest(d,c)}catch(s){p=s}return p&&(delete c.result,c.error||(c.error=n.serializeError(p))),o(p,c)}async _processRequest(a,o){const[d,c,p]=await lt._runAllMiddleware(a,o,this._middleware);if(lt._checkForCompletion(a,o,c),await lt._runReturnHandlers(p),d)throw d}static async _runAllMiddleware(a,o,d){const c=[];let p=null,s=!1;for(const f of d)if([p,s]=await lt._runMiddleware(a,o,f,c),s)break;return[p,s,c.reverse()]}static _runMiddleware(a,o,d,c){return new Promise(p=>{const s=u=>{const m=u||o.error;m&&(o.error=n.serializeError(m)),p([m,!0])},f=u=>{o.error?s(o.error):(u&&(typeof u!="function"&&s(new n.EthereumRpcError(n.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof u}" for request:
|