@dcl/builder-site 7.2.2 → 7.2.3
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/assets/{Back-DtK6x4Bn.js → Back-3lqsvQ4K.js} +1 -1
- package/assets/{CollectionProvider.container-CXdA94fU.js → CollectionProvider.container-D7Q3L_Zh.js} +1 -1
- package/assets/{CollectionStatus.container-CKYVdJgB.js → CollectionStatus.container-DMTnAYoK.js} +1 -1
- package/assets/{ConfirmDelete-BE0vH5uM.js → ConfirmDelete-C_J3qEsY.js} +1 -1
- package/assets/{FileSaver.min-dYVWgoJI.js → FileSaver.min-Bt83hOdI.js} +1 -1
- package/assets/{ItemProvider.container-C_ird2Zu.js → ItemProvider.container-Y7lkADhP.js} +1 -1
- package/assets/{JumpIn.container-DjpgxX_c.js → JumpIn.container-CsAlO0hD.js} +1 -1
- package/assets/{LandAction-33UdtFZb.js → LandAction-BXNGNhXP.js} +1 -1
- package/assets/{LandProviderPage-fMqWevKT.js → LandProviderPage-BEOIh0H2.js} +1 -1
- package/assets/{LoggedInDetailPage.container-BLvSpUqS.js → LoggedInDetailPage.container-CG29n1_U.js} +1 -1
- package/assets/{Navigation-CumA_dnJ.css → Navigation-D3yLJtY2.css} +1 -1
- package/assets/{Navigation.container-C54rXpIm.js → Navigation.container-COpaMzxC.js} +1 -1
- package/assets/{NotFound-CWDykcSQ.js → NotFound-CBkI36Sj.js} +1 -1
- package/assets/{OptionsDropdown-C7AtDOm3.js → OptionsDropdown-DHePoh2i.js} +1 -1
- package/assets/{RentalPeriod-BqEjSl0y.js → RentalPeriod-x-10gWSB.js} +1 -1
- package/assets/{SDKTag-BLT7PlWy.js → SDKTag--ttQ5W4k.js} +1 -1
- package/assets/{SceneStats.container-DA0XO8U0.js → SceneStats.container-Dbo5VyJY.js} +1 -1
- package/assets/{SignInRequired-vn0lyw6H.js → SignInRequired-C_iqcbEx.js} +1 -1
- package/assets/{ThirdPartyKindBadge-DSlG5fJU.js → ThirdPartyKindBadge-DI8Au6V1.js} +1 -1
- package/assets/{dataReader-Cpr013wV.js → dataReader-18dNwwWA.js} +1 -1
- package/assets/{date-BhOAIsCu.js → date-BUZUk5-K.js} +1 -1
- package/assets/{fortmatic-CM_hH-QZ.js → fortmatic-GEUvejTj.js} +1 -1
- package/assets/{index-B15QgiWh.js → index-0l5G1bvn.js} +1 -1
- package/assets/{index-B1Z5dXCr.js → index-1JiLs6xt.js} +1 -1
- package/assets/{index-YPAJmkCB.js → index-3Won5U-l.js} +29 -29
- package/assets/{index-Ff3ES8h5.js → index-3iUqbXt4.js} +1 -1
- package/assets/{index-CxhDJKuk.js → index-5vMgQwwN.js} +1 -1
- package/assets/{index-DIlb7NGo.js → index-B-8LRnXx.js} +1 -1
- package/assets/{index-DFMQLpF2.js → index-BCnT436C.js} +1 -1
- package/assets/{index-B6iImHgG.js → index-BIyNJ3tV.js} +1 -1
- package/assets/{index-DLcC_YRz.js → index-BOoLOrMt.js} +1 -1
- package/assets/{index-DqpTosSn.js → index-BWoFMTKz.js} +1 -1
- package/assets/{index-oH5zVeed.js → index-Bgad-9EV.js} +1 -1
- package/assets/index-BiPrJEWC.js +1 -0
- package/assets/{index-BL8f4n87.js → index-BlYXeJC2.js} +1 -1
- package/assets/{index-CIkGNRAR.js → index-BotAhiGp.js} +1 -1
- package/assets/{index-BJBJoWZs.js → index-BqLyNmoW.js} +1 -1
- package/assets/{index-Cwkr6Bc-.js → index-C5kvo6ZE.js} +1 -1
- package/assets/{index-D5p2T3o2.js → index-C9vL9TxX.js} +1 -1
- package/assets/{index-CyHCxbg4.css → index-CF0IKUON.css} +1 -1
- package/assets/{index-DK322CRN.js → index-CWzBxJIY.js} +1 -1
- package/assets/{index-CfU_ubdu.css → index-CYDa4E7Z.css} +1 -1
- package/assets/{index-DhUm7yG5.js → index-Ca1FIoFE.js} +1 -1
- package/assets/{index-DoqbeoQw.js → index-Cc35HPe0.js} +1 -1
- package/assets/{index-CdSybgoG.js → index-Ck_fZph-.js} +1 -1
- package/assets/{index-Db2yXUSb.js → index-CpQkOQzi.js} +1 -1
- package/assets/{index-BMiurEtO.js → index-CqAbSyBR.js} +1 -1
- package/assets/{index-DPcTJN54.css → index-CsWzLDJS.css} +1 -1
- package/assets/{index-AmjEp0WZ.css → index-CybdoCXN.css} +1 -1
- package/assets/{index-CwkP6MWv.js → index-D16q6yvC.js} +1 -1
- package/assets/{index-JS6japPI.js → index-D2UrmU_b.js} +1 -1
- package/assets/{index-B4QUye_p.css → index-DA_BTV6W.css} +1 -1
- package/assets/{index-W_enwN_T.css → index-DCP5MuDo.css} +1 -1
- package/assets/{index-L3D6xA3L.js → index-DSIhJEO7.js} +1 -1
- package/assets/{index-CtM7ULBP.css → index-DUKUKcUm.css} +7 -7
- package/assets/{index-Cxg8OEsE.js → index-DWBkKfGl.js} +1 -1
- package/assets/{index-mhnh9pfu.js → index-DawR4I4O.js} +1 -1
- package/assets/{index-DREoEfuJ.js → index-DgbTUhJF.js} +2 -2
- package/assets/index-Dn7fTV6c.js +1 -0
- package/assets/{index-Dmo3kwAH.js → index-Dsy1fxY7.js} +1 -1
- package/assets/{index-CqmX90TP.js → index-TFXsE77L.js} +1 -1
- package/assets/{index-obn1Zrh9.js → index-Tsy7eeyl.js} +1 -1
- package/assets/{index-D2pe819n.js → index-UMT5Znqx.js} +1 -1
- package/assets/{index-BeJeXmKD.js → index-fxggSp4A.js} +1 -1
- package/assets/{index-DvloJJ3K.js → index-iQS2NjJV.js} +1 -1
- package/assets/{index-CK--OQ83.js → index-iQkJ7ncO.js} +1 -1
- package/assets/{index-BU1OApef.js → index-il3yM9Di.js} +1 -1
- package/assets/{index-DTaWDFyZ.js → index-pdYsHD6j.js} +1 -1
- package/assets/{index-23gqgSsS.js → index-ylsxIjgc.js} +1 -1
- package/assets/{index-4bvVCOPT.js → index-zFVHafJW.js} +1 -1
- package/assets/{index-9p_FZzqu.js → index-zjq-Eyga.js} +1 -1
- package/assets/{index.es-BmduyGx6.js → index.es-CavG5WkY.js} +4 -4
- package/assets/{selectors-CoHvSlLI.js → selectors-ClN-5Gd3.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-CCILTcNe.js +0 -1
- package/assets/index-DkTMwtTI.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as zf,w as Uf,d as A,x as ei,B,y as qf,z as il,g as kr,p as xo,A as Gf,C as ti,q as Jf}from"./index-YPAJmkCB.js";function Qf(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Go={},Yr={},ri={};Object.defineProperty(ri,"__esModule",{value:!0});ri.walletLogo=void 0;const Zf=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' 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=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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=e,`data:image/svg+xml,%3Csvg width='${e}' 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 `}};ri.walletLogo=Zf;var ni={};Object.defineProperty(ni,"__esModule",{value:!0});ni.LINK_API_URL=void 0;ni.LINK_API_URL="https://www.walletlink.org";var ii={};Object.defineProperty(ii,"__esModule",{value:!0});ii.ScopedLocalStorage=void 0;class Yf{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);typeof i=="string"&&i.startsWith(e)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}ii.ScopedLocalStorage=Yf;var pr={},Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});const Kf=zf;function vc(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function Xf(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}let ed=class extends Kf.EventEmitter{emit(e,...r){let n=e==="error";const i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")vc(s,this,r);else{const o=s.length,a=Xf(s);for(let c=0;c<o;c+=1)vc(a[c],this,r)}return!0}};Qt.default=ed;var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.EVENTS=void 0;Rr.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",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var sn={},Jo={},Rt={},td=Kr;Kr.default=Kr;Kr.stable=al;Kr.stableStringify=al;var zn="[...]",sl="[Circular]",zt=[],Vt=[];function ol(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Kr(t,e,r,n){typeof n>"u"&&(n=ol()),ko(t,"",0,[],void 0,0,n);var i;try{Vt.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,cl(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;zt.length!==0;){var s=zt.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function ur(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),zt.push([n,r,e,i])):Vt.push([e,r,t]):(n[r]=t,zt.push([n,r,e]))}function ko(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){ur(sl,t,e,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){ur(zn,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){ur(zn,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)ko(t[a],a,a,n,t,s,o);else{var c=Object.keys(t);for(a=0;a<c.length;a++){var u=c[a];ko(t[u],u,a,n,t,s,o)}}n.pop()}}function rd(t,e){return t<e?-1:t>e?1:0}function al(t,e,r,n){typeof n>"u"&&(n=ol());var i=Ro(t,"",0,[],void 0,0,n)||t,s;try{Vt.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,cl(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;zt.length!==0;){var o=zt.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function Ro(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){ur(sl,t,e,i);return}try{if(typeof t.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){ur(zn,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){ur(zn,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)Ro(t[a],a,a,n,t,s,o);else{var c={},u=Object.keys(t).sort(rd);for(a=0;a<u.length;a++){var l=u[a];Ro(t[l],l,a,n,t,s,o),c[l]=t[l]}if(typeof i<"u")zt.push([i,e,t]),i[e]=c;else return c}n.pop()}}function cl(t){return t=typeof t<"u"?t:function(e,r){return r},function(e,r){if(Vt.length>0)for(var n=0;n<Vt.length;n++){var i=Vt[n];if(i[1]===e&&i[0]===r){r=i[2],Vt.splice(n,1);break}}return t.call(this,e,r)}}Object.defineProperty(Rt,"__esModule",{value:!0});Rt.EthereumProviderError=Rt.EthereumRpcError=void 0;const nd=td;class ul extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return nd.default(this.serialize(),od,2)}}Rt.EthereumRpcError=ul;class id extends ul{constructor(e,r,n){if(!sd(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}}Rt.EthereumProviderError=id;function sd(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function od(t,e){if(e!=="[Circular]")return e}var Qo={},Mt={};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.errorValues=Mt.errorCodes=void 0;Mt.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}};Mt.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."}};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=Mt,r=Rt,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(f,d=i){if(Number.isInteger(f)){const p=f.toString();if(h(e.errorValues,p))return e.errorValues[p].message;if(u(f))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return d}t.getMessageFromCode=o;function a(f){if(!Number.isInteger(f))return!1;const d=f.toString();return!!(e.errorValues[d]||u(f))}t.isValidCode=a;function c(f,{fallbackError:d=s,shouldIncludeStack:p=!1}={}){var _,v;if(!d||!Number.isInteger(d.code)||typeof d.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(f instanceof r.EthereumRpcError)return f.serialize();const b={};if(f&&typeof f=="object"&&!Array.isArray(f)&&h(f,"code")&&a(f.code)){const w=f;b.code=w.code,w.message&&typeof w.message=="string"?(b.message=w.message,h(w,"data")&&(b.data=w.data)):(b.message=o(b.code),b.data={originalError:l(f)})}else{b.code=d.code;const w=(_=f)===null||_===void 0?void 0:_.message;b.message=w&&typeof w=="string"?w:d.message,b.data={originalError:l(f)}}const m=(v=f)===null||v===void 0?void 0:v.stack;return p&&f&&m&&typeof m=="string"&&(b.stack=m),b}t.serializeError=c;function u(f){return f>=-32099&&f<=-32e3}function l(f){return f&&typeof f=="object"&&!Array.isArray(f)?Object.assign({},f):f}function h(f,d){return Object.prototype.hasOwnProperty.call(f,d)}})(Qo);var si={};Object.defineProperty(si,"__esModule",{value:!0});si.ethErrors=void 0;const Zo=Rt,ll=Qo,Ee=Mt;si.ethErrors={rpc:{parse:t=>Pe(Ee.errorCodes.rpc.parse,t),invalidRequest:t=>Pe(Ee.errorCodes.rpc.invalidRequest,t),invalidParams:t=>Pe(Ee.errorCodes.rpc.invalidParams,t),methodNotFound:t=>Pe(Ee.errorCodes.rpc.methodNotFound,t),internal:t=>Pe(Ee.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Pe(e,t)},invalidInput:t=>Pe(Ee.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>Pe(Ee.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>Pe(Ee.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>Pe(Ee.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>Pe(Ee.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>Pe(Ee.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Fr(Ee.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>Fr(Ee.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>Fr(Ee.errorCodes.provider.unsupportedMethod,t),disconnected:t=>Fr(Ee.errorCodes.provider.disconnected,t),chainDisconnected:t=>Fr(Ee.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Zo.EthereumProviderError(e,r,n)}}};function Pe(t,e){const[r,n]=hl(e);return new Zo.EthereumRpcError(t,r||ll.getMessageFromCode(t),n)}function Fr(t,e){const[r,n]=hl(e);return new Zo.EthereumProviderError(t,r||ll.getMessageFromCode(t),n)}function hl(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const e=Rt;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=Qo;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=si;Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=Mt;Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(Jo);var ee={},oi={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))})(oi);Object.defineProperty(ee,"__esModule",{value:!0});ee.EthereumAddressFromSignedMessageResponse=ee.SubmitEthereumTransactionResponse=ee.SignEthereumTransactionResponse=ee.SignEthereumMessageResponse=ee.isRequestEthereumAccountsResponse=ee.SelectProviderResponse=ee.WatchAssetReponse=ee.RequestEthereumAccountsResponse=ee.SwitchEthereumChainResponse=ee.AddEthereumChainResponse=ee.isErrorResponse=void 0;const ht=oi;function ad(t){var e,r;return((e=t)===null||e===void 0?void 0:e.method)!==void 0&&((r=t)===null||r===void 0?void 0:r.errorMessage)!==void 0}ee.isErrorResponse=ad;function cd(t){return{method:ht.Web3Method.addEthereumChain,result:t}}ee.AddEthereumChainResponse=cd;function ud(t){return{method:ht.Web3Method.switchEthereumChain,result:t}}ee.SwitchEthereumChainResponse=ud;function ld(t){return{method:ht.Web3Method.requestEthereumAccounts,result:t}}ee.RequestEthereumAccountsResponse=ld;function hd(t){return{method:ht.Web3Method.watchAsset,result:t}}ee.WatchAssetReponse=hd;function fd(t){return{method:ht.Web3Method.selectProvider,result:t}}ee.SelectProviderResponse=fd;function dd(t){return t&&t.method===ht.Web3Method.requestEthereumAccounts}ee.isRequestEthereumAccountsResponse=dd;function pd(t){return{method:ht.Web3Method.signEthereumMessage,result:t}}ee.SignEthereumMessageResponse=pd;function bd(t){return{method:ht.Web3Method.signEthereumTransaction,result:t}}ee.SignEthereumTransactionResponse=bd;function gd(t){return{method:ht.Web3Method.submitEthereumTransaction,result:t}}ee.SubmitEthereumTransactionResponse=gd;function md(t){return{method:ht.Web3Method.ethereumAddressFromSignedMessage,result:t}}ee.EthereumAddressFromSignedMessageResponse=md;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.LIB_VERSION=void 0;Mr.LIB_VERSION="3.7.2";(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const e=Jo,r=ee,n=Mr;t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},e.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},e.errorCodes.provider),{unsupportedChain:4902}))}));function i(l){return l!==void 0?(0,e.getMessageFromCode)(l):"Unknown error"}t.standardErrorMessage=i,t.standardErrors=Object.freeze(Object.assign(Object.assign({},e.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},e.ethErrors.provider),{unsupportedChain:(l="")=>e.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${l}. Try adding the chain using wallet_addEthereumChain first.`})}))}));function s(l,h){const f=(0,e.serializeError)(o(l),{shouldIncludeStack:!0}),d=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");d.searchParams.set("version",n.LIB_VERSION),d.searchParams.set("code",f.code.toString());const p=a(f.data,h);return p&&d.searchParams.set("method",p),d.searchParams.set("message",f.message),Object.assign(Object.assign({},f),{docUrl:d.href})}t.serializeError=s;function o(l){return typeof l=="string"?{message:l,code:t.standardErrorCodes.rpc.internal}:(0,r.isErrorResponse)(l)?Object.assign(Object.assign({},l),{message:l.errorMessage,code:l.errorCode,data:{method:l.method,result:l.result}}):l}function a(l,h){var f;const d=(f=l)===null||f===void 0?void 0:f.method;if(d)return d;if(h!==void 0)return typeof h=="string"?h:Array.isArray(h)?h.length>0?h[0].method:void 0:h.method}function c(l){var h;if(typeof l=="number")return l;if(u(l))return(h=l.code)!==null&&h!==void 0?h:l.errorCode}t.getErrorCode=c;function u(l){return typeof l=="object"&&l!==null&&(typeof l.code=="number"||typeof l.errorCode=="number")}})(sn);var Ar={},x={},vd=String.prototype.replace,yd=/%20/g,Zs={RFC1738:"RFC1738",RFC3986:"RFC3986"},Yo={default:Zs.RFC3986,formatters:{RFC1738:function(t){return vd.call(t,yd,"+")},RFC3986:function(t){return String(t)}},RFC1738:Zs.RFC1738,RFC3986:Zs.RFC3986},_d=Yo,Ys=Object.prototype.hasOwnProperty,$t=Array.isArray,et=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),wd=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if($t(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},fl=function(e,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},Sd=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if($t(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ys.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var i=e;return $t(e)&&!$t(r)&&(i=fl(e,n)),$t(e)&&$t(r)?(r.forEach(function(s,o){if(Ys.call(e,o)){var a=e[o];a&&typeof a=="object"&&s&&typeof s=="object"?e[o]=t(a,s,n):e.push(s)}else e[o]=s}),e):Object.keys(r).reduce(function(s,o){var a=r[o];return Ys.call(s,o)?s[o]=t(s[o],a,n):s[o]=a,s},i)},Ed=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},Cd=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Id=function(e,r,n,i,s){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var a="",c=0;c<o.length;++c){var u=o.charCodeAt(c);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||s===_d.RFC1738&&(u===40||u===41)){a+=o.charAt(c);continue}if(u<128){a=a+et[u];continue}if(u<2048){a=a+(et[192|u>>6]+et[128|u&63]);continue}if(u<55296||u>=57344){a=a+(et[224|u>>12]+et[128|u>>6&63]+et[128|u&63]);continue}c+=1,u=65536+((u&1023)<<10|o.charCodeAt(c)&1023),a+=et[240|u>>18]+et[128|u>>12&63]+et[128|u>>6&63]+et[128|u&63]}return a},xd=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],o=s.obj[s.prop],a=Object.keys(o),c=0;c<a.length;++c){var u=a[c],l=o[u];typeof l=="object"&&l!==null&&n.indexOf(l)===-1&&(r.push({obj:o,prop:u}),n.push(l))}return wd(r),e},kd=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Rd=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Md=function(e,r){return[].concat(e,r)},Ad=function(e,r){if($t(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},dl={arrayToObject:fl,assign:Ed,combine:Md,compact:xd,decode:Cd,encode:Id,isBuffer:Rd,isRegExp:kd,maybeMap:Ad,merge:Sd},pl=Uf,Fn=dl,Ur=Yo,Td=Object.prototype.hasOwnProperty,yc={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},pt=Array.isArray,Nd=Array.prototype.push,bl=function(t,e){Nd.apply(t,pt(e)?e:[e])},Od=Date.prototype.toISOString,_c=Ur.default,Ie={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Fn.encode,encodeValuesOnly:!1,format:_c,formatter:Ur.formatters[_c],indices:!1,serializeDate:function(e){return Od.call(e)},skipNulls:!1,strictNullHandling:!1},Ld=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Ks={},jd=function t(e,r,n,i,s,o,a,c,u,l,h,f,d,p,_,v){for(var b=e,m=v,w=0,M=!1;(m=m.get(Ks))!==void 0&&!M;){var E=m.get(e);if(w+=1,typeof E<"u"){if(E===w)throw new RangeError("Cyclic object value");M=!0}typeof m.get(Ks)>"u"&&(w=0)}if(typeof c=="function"?b=c(r,b):b instanceof Date?b=h(b):n==="comma"&&pt(b)&&(b=Fn.maybeMap(b,function(C){return C instanceof Date?h(C):C})),b===null){if(s)return a&&!p?a(r,Ie.encoder,_,"key",f):r;b=""}if(Ld(b)||Fn.isBuffer(b)){if(a){var N=p?r:a(r,Ie.encoder,_,"key",f);return[d(N)+"="+d(a(b,Ie.encoder,_,"value",f))]}return[d(r)+"="+d(String(b))]}var z=[];if(typeof b>"u")return z;var te;if(n==="comma"&&pt(b))p&&a&&(b=Fn.maybeMap(b,a)),te=[{value:b.length>0?b.join(",")||null:void 0}];else if(pt(c))te=c;else{var O=Object.keys(b);te=u?O.sort(u):O}for(var H=i&&pt(b)&&b.length===1?r+"[]":r,le=0;le<te.length;++le){var q=te[le],S=typeof q=="object"&&typeof q.value<"u"?q.value:b[q];if(!(o&&S===null)){var y=pt(b)?typeof n=="function"?n(H,q):H:H+(l?"."+q:"["+q+"]");v.set(e,w);var k=pl();k.set(Ks,v),bl(z,t(S,y,n,i,s,o,n==="comma"&&p&&pt(b)?null:a,c,u,l,h,f,d,p,_,k))}}return z},$d=function(e){if(!e)return Ie;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||Ie.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Ur.default;if(typeof e.format<"u"){if(!Td.call(Ur.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Ur.formatters[n],s=Ie.filter;return(typeof e.filter=="function"||pt(e.filter))&&(s=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Ie.addQueryPrefix,allowDots:typeof e.allowDots>"u"?Ie.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ie.charsetSentinel,delimiter:typeof e.delimiter>"u"?Ie.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Ie.encode,encoder:typeof e.encoder=="function"?e.encoder:Ie.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Ie.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Ie.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Ie.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ie.strictNullHandling}},Pd=function(t,e){var r=t,n=$d(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):pt(n.filter)&&(s=n.filter,i=s);var o=[];if(typeof r!="object"||r===null)return"";var a;e&&e.arrayFormat in yc?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var c=yc[a];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=c==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var l=pl(),h=0;h<i.length;++h){var f=i[h];n.skipNulls&&r[f]===null||bl(o,jd(r[f],f,c,u,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,l))}var d=o.join(n.delimiter),p=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},br=dl,Mo=Object.prototype.hasOwnProperty,Dd=Array.isArray,be={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:br.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Fd=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},gl=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Bd="utf8=%26%2310003%3B",Vd="utf8=%E2%9C%93",Hd=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,s),a=-1,c,u=r.charset;if(r.charsetSentinel)for(c=0;c<o.length;++c)o[c].indexOf("utf8=")===0&&(o[c]===Vd?u="utf-8":o[c]===Bd&&(u="iso-8859-1"),a=c,c=o.length);for(c=0;c<o.length;++c)if(c!==a){var l=o[c],h=l.indexOf("]="),f=h===-1?l.indexOf("="):h+1,d,p;f===-1?(d=r.decoder(l,be.decoder,u,"key"),p=r.strictNullHandling?null:""):(d=r.decoder(l.slice(0,f),be.decoder,u,"key"),p=br.maybeMap(gl(l.slice(f+1),r),function(_){return r.decoder(_,be.decoder,u,"value")})),p&&r.interpretNumericEntities&&u==="iso-8859-1"&&(p=Fd(p)),l.indexOf("[]=")>-1&&(p=Dd(p)?[p]:p),Mo.call(n,d)?n[d]=br.combine(n[d],p):n[d]=p}return n},Wd=function(t,e,r,n){for(var i=n?e:gl(e,r),s=t.length-1;s>=0;--s){var o,a=t[s];if(a==="[]"&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,u=parseInt(c,10);!r.parseArrays&&c===""?o={0:i}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(o=[],o[u]=i):c!=="__proto__"&&(o[c]=i)}i=o}return i},zd=function(e,r,n,i){if(e){var s=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(s),u=c?s.slice(0,c.index):s,l=[];if(u){if(!n.plainObjects&&Mo.call(Object.prototype,u)&&!n.allowPrototypes)return;l.push(u)}for(var h=0;n.depth>0&&(c=a.exec(s))!==null&&h<n.depth;){if(h+=1,!n.plainObjects&&Mo.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+s.slice(c.index)+"]"),Wd(l,r,n,i)}},Ud=function(e){if(!e)return be;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof e.charset>"u"?be.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?be.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:be.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:be.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:be.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:be.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:be.comma,decoder:typeof e.decoder=="function"?e.decoder:be.decoder,delimiter:typeof e.delimiter=="string"||br.isRegExp(e.delimiter)?e.delimiter:be.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:be.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:be.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:be.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:be.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:be.strictNullHandling}},qd=function(t,e){var r=Ud(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?Hd(t,r):t,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;o<s.length;++o){var a=s[o],c=zd(a,n[a],r,typeof t=="string");i=br.merge(i,c,r)}return r.allowSparse===!0?i:br.compact(i)},Gd=Pd,Jd=qd,Qd=Yo,Zd={formats:Qd,parse:Jd,stringify:Gd},on={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderType=t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0;function e(){return n=>n}t.OpaqueType=e,t.HexString=e(),t.AddressString=e(),t.BigIntString=e();function r(n){return Math.floor(n)}t.IntNumber=r,t.RegExpString=e(),function(n){n.CoinbaseWallet="CoinbaseWallet",n.MetaMask="MetaMask",n.Unselected=""}(t.ProviderType||(t.ProviderType={}))})(on);var Yd=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(x,"__esModule",{value:!0});x.isInIFrame=x.createQrUrl=x.getFavicon=x.range=x.isBigNumber=x.ensureParsedJSONObject=x.ensureBN=x.ensureRegExpString=x.ensureIntNumber=x.ensureBuffer=x.ensureAddressString=x.ensureEvenLengthHexString=x.ensureHexString=x.isHexString=x.prepend0x=x.strip0x=x.has0xPrefix=x.hexStringFromIntNumber=x.intNumberFromHexString=x.bigIntStringFromBN=x.hexStringFromBuffer=x.hexStringToUint8Array=x.uint8ArrayToHex=x.randomBytesHex=void 0;const It=Yd(ei),Kd=Zd,Zt=sn,We=on,ml=/^[0-9]*$/,vl=/^[a-f0-9]*$/;function Xd(t){return yl(crypto.getRandomValues(new Uint8Array(t)))}x.randomBytesHex=Xd;function yl(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}x.uint8ArrayToHex=yl;function ep(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}x.hexStringToUint8Array=ep;function tp(t,e=!1){const r=t.toString("hex");return(0,We.HexString)(e?"0x"+r:r)}x.hexStringFromBuffer=tp;function rp(t){return(0,We.BigIntString)(t.toString(10))}x.bigIntStringFromBN=rp;function np(t){return(0,We.IntNumber)(new It.default(cn(t,!1),16).toNumber())}x.intNumberFromHexString=np;function ip(t){return(0,We.HexString)("0x"+new It.default(t).toString(16))}x.hexStringFromIntNumber=ip;function Ko(t){return t.startsWith("0x")||t.startsWith("0X")}x.has0xPrefix=Ko;function ai(t){return Ko(t)?t.slice(2):t}x.strip0x=ai;function _l(t){return Ko(t)?"0x"+t.slice(2):"0x"+t}x.prepend0x=_l;function an(t){if(typeof t!="string")return!1;const e=ai(t).toLowerCase();return vl.test(e)}x.isHexString=an;function wl(t,e=!1){if(typeof t=="string"){const r=ai(t).toLowerCase();if(vl.test(r))return(0,We.HexString)(e?"0x"+r:r)}throw Zt.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}x.ensureHexString=wl;function cn(t,e=!1){let r=wl(t,!1);return r.length%2===1&&(r=(0,We.HexString)("0"+r)),e?(0,We.HexString)("0x"+r):r}x.ensureEvenLengthHexString=cn;function sp(t){if(typeof t=="string"){const e=ai(t).toLowerCase();if(an(e)&&e.length===40)return(0,We.AddressString)(_l(e))}throw Zt.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}x.ensureAddressString=sp;function op(t){if(B.isBuffer(t))return t;if(typeof t=="string")if(an(t)){const e=cn(t,!1);return B.from(e,"hex")}else return B.from(t,"utf8");throw Zt.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}x.ensureBuffer=op;function Sl(t){if(typeof t=="number"&&Number.isInteger(t))return(0,We.IntNumber)(t);if(typeof t=="string"){if(ml.test(t))return(0,We.IntNumber)(Number(t));if(an(t))return(0,We.IntNumber)(new It.default(cn(t,!1),16).toNumber())}throw Zt.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}x.ensureIntNumber=Sl;function ap(t){if(t instanceof RegExp)return(0,We.RegExpString)(t.toString());throw Zt.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}x.ensureRegExpString=ap;function cp(t){if(t!==null&&(It.default.isBN(t)||El(t)))return new It.default(t.toString(10),10);if(typeof t=="number")return new It.default(Sl(t));if(typeof t=="string"){if(ml.test(t))return new It.default(t,10);if(an(t))return new It.default(cn(t,!1),16)}throw Zt.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}x.ensureBN=cp;function up(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw Zt.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}x.ensureParsedJSONObject=up;function El(t){if(t==null||typeof t.constructor!="function")return!1;const{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}x.isBigNumber=El;function lp(t,e){return Array.from({length:e-t},(r,n)=>t+n)}x.range=lp;function hp(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute("href"):null;return!n||n.startsWith("javascript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`}x.getFavicon=hp;function fp(t,e,r,n,i,s){const o=n?"parent-id":"id",a=(0,Kd.stringify)({[o]:t,secret:e,server:r,v:i,chainId:s});return`${r}/#/link?${a}`}x.createQrUrl=fp;function dp(){try{return window.frameElement!==null}catch{return!1}}x.isInIFrame=dp;Object.defineProperty(Ar,"__esModule",{value:!0});Ar.Session=void 0;const wc=qf,Sc=x,Ec="session:id",Cc="session:secret",Ic="session:linked";class Xo{constructor(e,r,n,i){this._storage=e,this._id=r||(0,Sc.randomBytesHex)(16),this._secret=n||(0,Sc.randomBytesHex)(32),this._key=new wc.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const r=e.getItem(Ec),n=e.getItem(Ic),i=e.getItem(Cc);return r&&i?new Xo(e,r,i,n==="1"):null}static hash(e){return new wc.sha256().update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(Ec,this._id),this._storage.setItem(Cc,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Ic,this._linked?"1":"0")}}Ar.Session=Xo;var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.WalletSDKRelayAbstract=Ye.APP_VERSION_KEY=Ye.LOCAL_STORAGE_ADDRESSES_KEY=Ye.WALLET_USER_NAME_KEY=void 0;const xc=sn;Ye.WALLET_USER_NAME_KEY="walletUsername";Ye.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Ye.APP_VERSION_KEY="AppVersion";class pp{async makeEthereumJSONRPCRequest(e,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw xc.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,xc.serializeError)(s,e.method);return i})}}Ye.WalletSDKRelayAbstract=pp;const{Transform:bp}=il;var gp=t=>class Cl extends bp{constructor(r,n,i,s,o){super(o),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=o,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!B.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 B.isBuffer(r)||(r=B.from(r,n)),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 n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Cl(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:mp}=il;var vp=t=>class Il extends mp{constructor(r,n,i,s){super(s),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!B.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 B.isBuffer(r)||(r=B.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Il(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const yp=gp,_p=vp;var wp=function(t){const e=yp(t),r=_p(t);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},xl={};const kc=[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];xl.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],u=t[7]^t[17]^t[27]^t[37]^t[47],l=t[8]^t[18]^t[28]^t[38]^t[48],h=t[9]^t[19]^t[29]^t[39]^t[49];let f=l^(i<<1|s>>>31),d=h^(s<<1|i>>>31);const p=t[0]^f,_=t[1]^d,v=t[10]^f,b=t[11]^d,m=t[20]^f,w=t[21]^d,M=t[30]^f,E=t[31]^d,N=t[40]^f,z=t[41]^d;f=r^(o<<1|a>>>31),d=n^(a<<1|o>>>31);const te=t[2]^f,O=t[3]^d,H=t[12]^f,le=t[13]^d,q=t[22]^f,S=t[23]^d,y=t[32]^f,k=t[33]^d,C=t[42]^f,T=t[43]^d;f=i^(c<<1|u>>>31),d=s^(u<<1|c>>>31);const I=t[4]^f,$=t[5]^d,G=t[14]^f,D=t[15]^d,X=t[24]^f,Se=t[25]^d,ne=t[34]^f,wt=t[35]^d,Xi=t[44]^f,Ya=t[45]^d;f=o^(l<<1|h>>>31),d=a^(h<<1|l>>>31);const Ka=t[6]^f,Xa=t[7]^d,ec=t[16]^f,tc=t[17]^d,rc=t[26]^f,nc=t[27]^d,ic=t[36]^f,sc=t[37]^d,oc=t[46]^f,ac=t[47]^d;f=c^(r<<1|n>>>31),d=u^(n<<1|r>>>31);const cc=t[8]^f,uc=t[9]^d,lc=t[18]^f,hc=t[19]^d,fc=t[28]^f,dc=t[29]^d,pc=t[38]^f,bc=t[39]^d,gc=t[48]^f,mc=t[49]^d,es=p,ts=_,rs=b<<4|v>>>28,ns=v<<4|b>>>28,is=m<<3|w>>>29,ss=w<<3|m>>>29,os=E<<9|M>>>23,as=M<<9|E>>>23,cs=N<<18|z>>>14,us=z<<18|N>>>14,ls=te<<1|O>>>31,hs=O<<1|te>>>31,fs=le<<12|H>>>20,ds=H<<12|le>>>20,ps=q<<10|S>>>22,bs=S<<10|q>>>22,gs=k<<13|y>>>19,ms=y<<13|k>>>19,vs=C<<2|T>>>30,ys=T<<2|C>>>30,_s=$<<30|I>>>2,ws=I<<30|$>>>2,Ss=G<<6|D>>>26,Es=D<<6|G>>>26,Cs=Se<<11|X>>>21,Is=X<<11|Se>>>21,xs=ne<<15|wt>>>17,ks=wt<<15|ne>>>17,Rs=Ya<<29|Xi>>>3,Ms=Xi<<29|Ya>>>3,As=Ka<<28|Xa>>>4,Ts=Xa<<28|Ka>>>4,Ns=tc<<23|ec>>>9,Os=ec<<23|tc>>>9,Ls=rc<<25|nc>>>7,js=nc<<25|rc>>>7,$s=ic<<21|sc>>>11,Ps=sc<<21|ic>>>11,Ds=ac<<24|oc>>>8,Fs=oc<<24|ac>>>8,Bs=cc<<27|uc>>>5,Vs=uc<<27|cc>>>5,Hs=lc<<20|hc>>>12,Ws=hc<<20|lc>>>12,zs=dc<<7|fc>>>25,Us=fc<<7|dc>>>25,qs=pc<<8|bc>>>24,Gs=bc<<8|pc>>>24,Js=gc<<14|mc>>>18,Qs=mc<<14|gc>>>18;t[0]=es^~fs&Cs,t[1]=ts^~ds&Is,t[10]=As^~Hs&is,t[11]=Ts^~Ws&ss,t[20]=ls^~Ss&Ls,t[21]=hs^~Es&js,t[30]=Bs^~rs&ps,t[31]=Vs^~ns&bs,t[40]=_s^~Ns&zs,t[41]=ws^~Os&Us,t[2]=fs^~Cs&$s,t[3]=ds^~Is&Ps,t[12]=Hs^~is&gs,t[13]=Ws^~ss&ms,t[22]=Ss^~Ls&qs,t[23]=Es^~js&Gs,t[32]=rs^~ps&xs,t[33]=ns^~bs&ks,t[42]=Ns^~zs&os,t[43]=Os^~Us&as,t[4]=Cs^~$s&Js,t[5]=Is^~Ps&Qs,t[14]=is^~gs&Rs,t[15]=ss^~ms&Ms,t[24]=Ls^~qs&cs,t[25]=js^~Gs&us,t[34]=ps^~xs&Ds,t[35]=bs^~ks&Fs,t[44]=zs^~os&vs,t[45]=Us^~as&ys,t[6]=$s^~Js&es,t[7]=Ps^~Qs&ts,t[16]=gs^~Rs&As,t[17]=ms^~Ms&Ts,t[26]=qs^~cs&ls,t[27]=Gs^~us&hs,t[36]=xs^~Ds&Bs,t[37]=ks^~Fs&Vs,t[46]=os^~vs&_s,t[47]=as^~ys&ws,t[8]=Js^~es&fs,t[9]=Qs^~ts&ds,t[18]=Rs^~As&Hs,t[19]=Ms^~Ts&Ws,t[28]=cs^~ls&Ss,t[29]=us^~hs&Es,t[38]=Ds^~Bs&rs,t[39]=Fs^~Vs&ns,t[48]=vs^~_s&Ns,t[49]=ys^~ws&Os,t[0]^=kc[e*2],t[1]^=kc[e*2+1]}};const Un=xl;function Tr(){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}Tr.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};Tr.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(Un.p1600(this.state),this.count=0)};Tr.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),t&128&&this.count===this.blockSize-1&&Un.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),Un.p1600(this.state),this.count=0,this.squeezing=!0};Tr.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const e=B.alloc(t);for(let r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(Un.p1600(this.state),this.count=0);return e};Tr.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};var Sp=Tr,Ep=wp(Sp);const Cp=Ep,Ip=ei;function kl(t){return B.allocUnsafe(t).fill(0)}function Rl(t,e,r){const n=kl(e);return t=ci(t),r?t.length<e?(t.copy(n),n):t.slice(0,e):t.length<e?(t.copy(n,e-t.length),n):t.slice(-e)}function xp(t,e){return Rl(t,e,!0)}function ci(t){if(!B.isBuffer(t))if(Array.isArray(t))t=B.from(t);else if(typeof t=="string")Ml(t)?t=B.from(Mp(Al(t)),"hex"):t=B.from(t);else if(typeof t=="number")t=intToBuffer(t);else if(t==null)t=B.allocUnsafe(0);else if(Ip.isBN(t))t=t.toArrayLike(B);else if(t.toArray)t=B.from(t.toArray());else throw new Error("invalid type");return t}function kp(t){return t=ci(t),"0x"+t.toString("hex")}function Rp(t,e){return t=ci(t),e||(e=256),Cp("keccak"+e).update(t).digest()}function Mp(t){return t.length%2?"0"+t:t}function Ml(t){return typeof t=="string"&&t.match(/^0x[0-9A-Fa-f]*$/)}function Al(t){return typeof t=="string"&&t.startsWith("0x")?t.slice(2):t}var Tl={zeros:kl,setLength:Rl,setLengthRight:xp,isHexString:Ml,stripHexPrefix:Al,toBuffer:ci,bufferToHex:kp,keccak:Rp};const Ut=Tl,Ht=ei;function Nl(t){return t.startsWith("int[")?"int256"+t.slice(3):t==="int"?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):t==="uint"?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):t==="fixed"?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):t==="ufixed"?"ufixed128x128":t}function lr(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function Rc(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function Ol(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?e[2]===""?"dynamic":parseInt(e[2],10):null}function Pt(t){var e=typeof t;if(e==="string")return Ut.isHexString(t)?new Ht(Ut.stripHexPrefix(t),16):new Ht(t,10);if(e==="number")return new Ht(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function it(t,e){var r,n,i,s;if(t==="address")return it("uint160",Pt(e));if(t==="bool")return it("uint8",e?1:0);if(t==="string")return it("bytes",new B(e,"utf8"));if(Tp(t)){if(typeof e.length>"u")throw new Error("Not an array?");if(r=Ol(t),r!=="dynamic"&&r!==0&&e.length>r)throw new Error("Elements exceed array size: "+r);i=[],t=t.slice(0,t.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(it(t,e[s]));if(r==="dynamic"){var o=it("uint256",e.length);i.unshift(o)}return B.concat(i)}else{if(t==="bytes")return e=new B(e),i=B.concat([it("uint256",e.length),e]),e.length%32!==0&&(i=B.concat([i,Ut.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(r=lr(t),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return Ut.setLengthRight(e,32)}else if(t.startsWith("uint")){if(r=lr(t),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=Pt(e),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(B,"be",32)}else if(t.startsWith("int")){if(r=lr(t),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=Pt(e),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(B,"be",32)}else if(t.startsWith("ufixed")){if(r=Rc(t),n=Pt(e),n<0)throw new Error("Supplied ufixed is negative");return it("uint256",n.mul(new Ht(2).pow(new Ht(r[1]))))}else if(t.startsWith("fixed"))return r=Rc(t),it("int256",Pt(e).mul(new Ht(2).pow(new Ht(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function Ap(t){return t==="string"||t==="bytes"||Ol(t)==="dynamic"}function Tp(t){return t.lastIndexOf("]")===t.length-1}function Np(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=Nl(t[s]),a=e[s],c=it(o,a);Ap(o)?(r.push(it("uint256",i)),n.push(c),i+=c.length):r.push(c)}return B.concat(r.concat(n))}function Ll(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r,n,i=[],s=0;s<t.length;s++){var o=Nl(t[s]),a=e[s];if(o==="bytes")i.push(a);else if(o==="string")i.push(new B(a,"utf8"));else if(o==="bool")i.push(new B(a?"01":"00","hex"));else if(o==="address")i.push(Ut.setLength(a,20));else if(o.startsWith("bytes")){if(r=lr(o),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);i.push(Ut.setLengthRight(a,r))}else if(o.startsWith("uint")){if(r=lr(o),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=Pt(a),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(B,"be",r/8))}else if(o.startsWith("int")){if(r=lr(o),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=Pt(a),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(B,"be",r/8))}else throw new Error("Unsupported or invalid type: "+o)}return B.concat(i)}function Op(t,e){return Ut.keccak(Ll(t,e))}var Lp={rawEncode:Np,solidityPack:Ll,soliditySHA3:Op};const Je=Tl,qr=Lp,jl={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"]},Xs={encodeData(t,e,r,n=!0){const i=["bytes32"],s=[this.hashType(t,r)];if(n){const o=(a,c,u)=>{if(r[c]!==void 0)return["bytes32",u==null?"0x0000000000000000000000000000000000000000000000000000000000000000":Je.keccak(this.encodeData(c,u,r,n))];if(u===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c==="bytes")return["bytes32",Je.keccak(u)];if(c==="string")return typeof u=="string"&&(u=B.from(u,"utf8")),["bytes32",Je.keccak(u)];if(c.lastIndexOf("]")===c.length-1){const l=c.slice(0,c.lastIndexOf("[")),h=u.map(f=>o(a,l,f));return["bytes32",Je.keccak(qr.rawEncode(h.map(([f])=>f),h.map(([,f])=>f)))]}return[c,u]};for(const a of r[t]){const[c,u]=o(a.name,a.type,e[a.name]);i.push(c),s.push(u)}}else for(const o of r[t]){let a=e[o.name];if(a!==void 0)if(o.type==="bytes")i.push("bytes32"),a=Je.keccak(a),s.push(a);else if(o.type==="string")i.push("bytes32"),typeof a=="string"&&(a=B.from(a,"utf8")),a=Je.keccak(a),s.push(a);else if(r[o.type]!==void 0)i.push("bytes32"),a=Je.keccak(this.encodeData(o.type,a,r,n)),s.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(o.type),s.push(a)}}return qr.rawEncode(i,s)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(const n of e[t])for(const i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return Je.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return Je.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const r in jl.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){const r=this.sanitizeData(t),n=[B.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,e)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),Je.keccak(B.concat(n))}};var jp={TYPED_MESSAGE_SCHEMA:jl,TypedDataUtils:Xs,hashForSignTypedDataLegacy:function(t){return $p(t.data)},hashForSignTypedData_v3:function(t){return Xs.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return Xs.hash(t.data)}};function $p(t){const e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;const r=t.map(function(s){return s.type==="bytes"?Je.toBuffer(s.value):s.value}),n=t.map(function(s){return s.type}),i=t.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return qr.soliditySHA3(["bytes32","bytes32"],[qr.soliditySHA3(new Array(t.length).fill("string"),i),qr.soliditySHA3(n,r)])}var gr={};Object.defineProperty(gr,"__esModule",{value:!0});gr.filterFromParam=gr.FilterPolyfill=void 0;const or=on,xe=x,Pp=5*60*1e3,Dt={jsonrpc:"2.0",id:0};class Dp{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,or.IntNumber)(1),this.provider=e}async newFilter(e){const r=$l(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,r.fromBlock);return console.log(`Installing new log filter(${n}):`,r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,xe.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.blockFilters.add(e),this.setFilterTimeout(e),(0,xe.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,xe.hexStringFromIntNumber)(e)}uninstallFilter(e){const r=(0,xe.intNumberFromHexString)(e);return console.log(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(e){const r=(0,xe.intNumberFromHexString)(e);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(xn())}async getFilterLogs(e){const r=(0,xe.intNumberFromHexString)(e),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},Dt),{method:"eth_getLogs",params:[Mc(n)]})):xn()}makeFilterId(){return(0,or.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((r,n)=>{this.provider.sendAsync(e,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));r(s)})})}deleteFilter(e){console.log(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const r=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!r)return xn();const i=await this.getCurrentBlockHeight(),s=r.toBlock==="latest"?i:r.toBlock;if(n>i||n>r.toBlock)return kn();console.log(`Fetching logs from ${n} to ${s} for filter ${e}`);const o=await this.sendAsyncPromise(Object.assign(Object.assign({},Dt),{method:"eth_getLogs",params:[Mc(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(o.result)){const a=o.result.map(u=>(0,xe.intNumberFromHexString)(u.blockNumber||"0x0")),c=Math.max(...a);if(c&&c>n){const u=(0,or.IntNumber)(c+1);console.log(`Moving cursor position for filter (${e}) from ${n} to ${u}`),this.cursors.set(e,u)}}return o}async getBlockFilterChanges(e){const r=this.cursors.get(e);if(!r)return xn();const n=await this.getCurrentBlockHeight();if(r>n)return kn();console.log(`Fetching blocks from ${r} to ${n} for filter (${e})`);const i=(await Promise.all((0,xe.range)(r,n+1).map(o=>this.getBlockHashByNumber((0,or.IntNumber)(o))))).filter(o=>!!o),s=(0,or.IntNumber)(r+i.length);return console.log(`Moving cursor position for filter (${e}) from ${r} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},Dt),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(kn())}async setInitialCursorPosition(e,r){const n=await this.getCurrentBlockHeight(),i=typeof r=="number"&&r>n?r:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const r=this.timeouts.get(e);r&&window.clearTimeout(r);const n=window.setTimeout(()=>{console.log(`Filter (${e}) timed out`),this.deleteFilter(e)},Pp);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},Dt),{method:"eth_blockNumber",params:[]}));return(0,xe.intNumberFromHexString)((0,xe.ensureHexString)(e))}async getBlockHashByNumber(e){const r=await this.sendAsyncPromise(Object.assign(Object.assign({},Dt),{method:"eth_getBlockByNumber",params:[(0,xe.hexStringFromIntNumber)(e),!1]}));return r.result&&typeof r.result.hash=="string"?(0,xe.ensureHexString)(r.result.hash):null}}gr.FilterPolyfill=Dp;function $l(t){return{fromBlock:Ac(t.fromBlock),toBlock:Ac(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}gr.filterFromParam=$l;function Mc(t){const e={fromBlock:Tc(t.fromBlock),toBlock:Tc(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function Ac(t){if(t===void 0||t==="latest"||t==="pending")return"latest";if(t==="earliest")return(0,or.IntNumber)(0);if((0,xe.isHexString)(t))return(0,xe.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function Tc(t){return t==="latest"?t:(0,xe.hexStringFromIntNumber)(t)}function xn(){return Object.assign(Object.assign({},Dt),{error:{code:-32e3,message:"filter not found"}})}function kn(){return Object.assign(Object.assign({},Dt),{result:[]})}var Pl={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,function(e){e.eth_accounts="eth_accounts",e.eth_coinbase="eth_coinbase",e.net_version="net_version",e.eth_chainId="eth_chainId",e.eth_uninstallFilter="eth_uninstallFilter",e.eth_requestAccounts="eth_requestAccounts",e.eth_sign="eth_sign",e.eth_ecRecover="eth_ecRecover",e.personal_sign="personal_sign",e.personal_ecRecover="personal_ecRecover",e.eth_signTransaction="eth_signTransaction",e.eth_sendRawTransaction="eth_sendRawTransaction",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTypedData_v1="eth_signTypedData_v1",e.eth_signTypedData_v2="eth_signTypedData_v2",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_signTypedData="eth_signTypedData",e.cbWallet_arbitrary="walletlink_arbitrary",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.wallet_watchAsset="wallet_watchAsset",e.eth_subscribe="eth_subscribe",e.eth_unsubscribe="eth_unsubscribe",e.eth_newFilter="eth_newFilter",e.eth_newBlockFilter="eth_newBlockFilter",e.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",e.eth_getFilterChanges="eth_getFilterChanges",e.eth_getFilterLogs="eth_getFilterLogs"}(t.JSONRPCMethod||(t.JSONRPCMethod={}))})(Pl);var ui={},Dl={},li={},ea=Fp;function Fp(t){t=t||{};var e=t.max||Number.MAX_SAFE_INTEGER,r=typeof t.start<"u"?t.start:Math.floor(Math.random()*e);return function(){return r=r%e,r++}}const Nc=(t,e)=>function(){const r=e.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{e.errorFirst?n.push(function(o,a){if(e.multiArgs){const c=new Array(arguments.length-1);for(let u=1;u<arguments.length;u++)c[u-1]=arguments[u];o?(c.unshift(o),s(c)):i(c)}else o?s(o):i(a)}):n.push(function(o){if(e.multiArgs){const a=new Array(arguments.length-1);for(let c=0;c<arguments.length;c++)a[c]=arguments[c];i(a)}else i(o)}),t.apply(this,n)})};var Bp=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=i=>{const s=o=>typeof o=="string"?i===o:o.test(i);return e.include?e.include.some(s):!e.exclude.some(s)};let n;typeof t=="function"?n=function(){return e.excludeMain?t.apply(this,arguments):Nc(t,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(t));for(const i in t){const s=t[i];n[i]=typeof s=="function"&&r(i)?Nc(s,e):s}return n},un={},Vp=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(un,"__esModule",{value:!0});un.BaseBlockTracker=void 0;const Hp=Vp(Qt),Wp=1e3,zp=(t,e)=>t+e,Oc=["sync","latest"];class Up extends Hp.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*Wp,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(r=>this.once("latest",r))}removeAllListeners(e){return e?super.removeAllListeners(e):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(e){Oc.includes(e)&&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 Oc.map(e=>this.listenerCount(e)).reduce(zp)}_newPotentialLatest(e){const r=this._currentBlock;r&&Lc(e)<=Lc(r)||this._setCurrentBlock(e)}_setCurrentBlock(e){const r=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:r,newBlock:e})}_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}}un.BaseBlockTracker=Up;function Lc(t){return Number.parseInt(t,16)}var Fl={},Bl={},we={};class Vl extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...o}=e,{path:a}=e,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function qp(t){return ze(t)&&typeof t[Symbol.iterator]=="function"}function ze(t){return typeof t=="object"&&t!=null}function jc(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function pe(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Gp(t){const{done:e,value:r}=t.next();return e?void 0:r}function Jp(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${pe(n)}\``}=t;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:c}}function*Ao(t,e,r,n){qp(t)||(t=[t]);for(const i of t){const s=Jp(i,e,r,n);s&&(yield s)}}function*ta(t,e,r={}){const{path:n=[],branch:i=[t],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),o&&e.type!=="type"&&ze(e.schema)&&ze(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,a))u.explanation=r.message,c="not_valid",yield[u,void 0];for(let[u,l,h]of e.entries(t,a)){const f=ta(l,h,{path:u===void 0?n:[...n,u],branch:u===void 0?i:[...i,l],coerce:s,mask:o,message:r.message});for(const d of f)d[0]?(c=d[0].refinement!=null?"not_refined":"not_valid",yield[d[0],void 0]):s&&(l=d[1],u===void 0?t=l:t instanceof Map?t.set(u,l):t instanceof Set?t.add(l):ze(t)&&(l!==void 0||u in t)&&(t[u]=l))}if(c!=="not_valid")for(const u of e.refiner(t,a))u.explanation=r.message,c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class he{constructor(e){const{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,u)=>{const l=i(c,u);return Ao(l,u,this,c)}:this.validator=()=>[],s?this.refiner=(c,u)=>{const l=s(c,u);return Ao(l,u,this,c)}:this.refiner=()=>[]}assert(e,r){return Hl(e,this,r)}create(e,r){return Wl(e,this,r)}is(e){return ra(e,this)}mask(e,r){return zl(e,this,r)}validate(e,r={}){return Nr(e,this,r)}}function Hl(t,e,r){const n=Nr(t,e,{message:r});if(n[0])throw n[0]}function Wl(t,e,r){const n=Nr(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function zl(t,e,r){const n=Nr(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function ra(t,e){return!Nr(t,e)[0]}function Nr(t,e,r={}){const n=ta(t,e,r),i=Gp(n);return i[0]?[new Vl(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function Qp(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?ia(n):ln(n)}function Ne(t,e){return new he({type:t,schema:null,validator:e})}function Zp(t,e){return new he({...t,refiner:(r,n)=>r===void 0||t.refiner(r,n),validator(r,n){return r===void 0?!0:(e(r,n),t.validator(r,n))}})}function Yp(t){return new he({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function Kp(t){let e;return new he({type:"lazy",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator(r,n){return e??(e=t()),e.validator(r,n)},coercer(r,n){return e??(e=t()),e.coercer(r,n)},refiner(r,n){return e??(e=t()),e.refiner(r,n)}})}function Xp(t,e){const{schema:r}=t,n={...r};for(const i of e)delete n[i];switch(t.type){case"type":return ia(n);default:return ln(n)}}function e0(t){const e=t instanceof he?{...t.schema}:{...t};for(const r in e)e[r]=Ul(e[r]);return ln(e)}function t0(t,e){const{schema:r}=t,n={};for(const i of e)n[i]=r[i];return ln(n)}function r0(t,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Ne(t,e)}function n0(){return Ne("any",()=>!0)}function i0(t){return new he({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${pe(e)}`}})}function s0(){return Ne("bigint",t=>typeof t=="bigint")}function o0(){return Ne("boolean",t=>typeof t=="boolean")}function a0(){return Ne("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${pe(t)}`)}function c0(t){const e={},r=t.map(n=>pe(n)).join();for(const n of t)e[n]=n;return new he({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${pe(n)}`}})}function u0(){return Ne("func",t=>typeof t=="function"||`Expected a function, but received: ${pe(t)}`)}function l0(t){return Ne("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${pe(e)}`)}function h0(){return Ne("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${pe(t)}`)}function f0(t){return new he({type:"intersection",schema:null,*entries(e,r){for(const n of t)yield*n.entries(e,r)},*validator(e,r){for(const n of t)yield*n.validator(e,r)},*refiner(e,r){for(const n of t)yield*n.refiner(e,r)}})}function d0(t){const e=pe(t),r=typeof t;return new he({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${pe(n)}`}})}function p0(t,e){return new he({type:"map",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${pe(r)}`}})}function na(){return Ne("never",()=>!1)}function b0(t){return new he({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function g0(){return Ne("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${pe(t)}`)}function ln(t){const e=t?Object.keys(t):[],r=na();return new he({type:"object",schema:t||null,*entries(n){if(t&&ze(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return ze(n)||`Expected an object, but received: ${pe(n)}`},coercer(n){return ze(n)?{...n}:n}})}function Ul(t){return new he({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function m0(t,e){return new he({type:"record",schema:null,*entries(r){if(ze(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return ze(r)||`Expected an object, but received: ${pe(r)}`}})}function v0(){return Ne("regexp",t=>t instanceof RegExp)}function y0(t){return new he({type:"set",schema:null,*entries(e){if(t&&e instanceof Set)for(const r of e)yield[r,r,t]},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \`Set\` object, but received: ${pe(e)}`}})}function ql(){return Ne("string",t=>typeof t=="string"||`Expected a string, but received: ${pe(t)}`)}function _0(t){const e=na();return new he({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${pe(r)}`}})}function ia(t){const e=Object.keys(t);return new he({type:"type",schema:t,*entries(r){if(ze(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return ze(r)||`Expected an object, but received: ${pe(r)}`},coercer(r){return ze(r)?{...r}:r}})}function w0(t){const e=t.map(r=>r.type).join(" | ");return new he({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...o]=ta(r,s,n),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${pe(r)}`,...i]}})}function Gl(){return Ne("unknown",()=>!0)}function sa(t,e,r){return new he({...t,coercer:(n,i)=>ra(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function S0(t,e,r={}){return sa(t,Gl(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!r.strict&&jc(n)&&jc(i)){const s={...n};let o=!1;for(const a in i)s[a]===void 0&&(s[a]=i[a],o=!0);if(o)return s}return n})}function E0(t){return sa(t,ql(),e=>e.trim())}function C0(t){return Yt(t,"empty",e=>{const r=Jl(e);return r===0||`Expected an empty ${t.type} but received one with a size of \`${r}\``})}function Jl(t){return t instanceof Map||t instanceof Set?t.size:t.length}function I0(t,e,r={}){const{exclusive:n}=r;return Yt(t,"max",i=>n?i<e:i<=e||`Expected a ${t.type} less than ${n?"":"or equal to "}${e} but received \`${i}\``)}function x0(t,e,r={}){const{exclusive:n}=r;return Yt(t,"min",i=>n?i>e:i>=e||`Expected a ${t.type} greater than ${n?"":"or equal to "}${e} but received \`${i}\``)}function k0(t){return Yt(t,"nonempty",e=>Jl(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function R0(t,e){return Yt(t,"pattern",r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`)}function M0(t,e,r=e){const n=`Expected a ${t.type}`,i=e===r?`of \`${e}\``:`between \`${e}\` and \`${r}\``;return Yt(t,"size",s=>{if(typeof s=="number"||s instanceof Date)return e<=s&&s<=r||`${n} ${i} but received \`${s}\``;if(s instanceof Map||s instanceof Set){const{size:o}=s;return e<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}else{const{length:o}=s;return e<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}})}function Yt(t,e,r){return new he({...t,*refiner(n,i){yield*t.refiner(n,i);const s=r(n,i),o=Ao(s,i,t,n);for(const a of o)yield{...a,refinement:e}}})}const A0=Object.freeze(Object.defineProperty({__proto__:null,Struct:he,StructError:Vl,any:n0,array:i0,assert:Hl,assign:Qp,bigint:s0,boolean:o0,coerce:sa,create:Wl,date:a0,defaulted:S0,define:Ne,deprecated:Zp,dynamic:Yp,empty:C0,enums:c0,func:u0,instance:l0,integer:h0,intersection:f0,is:ra,lazy:Kp,literal:d0,map:p0,mask:zl,max:I0,min:x0,never:na,nonempty:k0,nullable:b0,number:g0,object:ln,omit:Xp,optional:Ul,partial:e0,pattern:R0,pick:t0,record:m0,refine:Yt,regexp:v0,set:y0,size:M0,string:ql,struct:r0,trimmed:E0,tuple:_0,type:ia,union:w0,unknown:Gl,validate:Nr},Symbol.toStringTag,{value:"Module"})),Kt=kr(A0);Object.defineProperty(we,"__esModule",{value:!0});we.assertExhaustive=we.assertStruct=we.assert=we.AssertionError=void 0;const T0=Kt;function N0(t){return typeof t=="object"&&t!==null&&"message"in t}function O0(t){var e,r;return typeof((r=(e=t==null?void 0:t.prototype)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.name)=="string"}function L0(t){const e=N0(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function Ql(t,e){return O0(t)?new t({message:e}):t({message:e})}class oa extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}we.AssertionError=oa;function j0(t,e="Assertion failed.",r=oa){if(!t)throw e instanceof Error?e:Ql(r,e)}we.assert=j0;function $0(t,e,r="Assertion failed",n=oa){try{(0,T0.assert)(t,e)}catch(i){throw Ql(n,`${r}: ${L0(i)}.`)}}we.assertStruct=$0;function P0(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}we.assertExhaustive=P0;var hn={};Object.defineProperty(hn,"__esModule",{value:!0});hn.base64=void 0;const D0=Kt,F0=we,B0=(t,e={})=>{var r,n;const i=(r=e.paddingRequired)!==null&&r!==void 0?r:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:"base64";let o;s==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,F0.assert)(s==="base64url"),o=String.raw`[-_A-Za-z0-9]`);let a;return i?a=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):a=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,D0.pattern)(t,a)};hn.base64=B0;var J={},fn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const e=Kt,r=we;t.HexStruct=(0,e.pattern)((0,e.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,e.pattern)((0,e.string)(),/^0x[0-9a-f]+$/iu);function n(u){return(0,e.is)(u,t.HexStruct)}t.isHexString=n;function i(u){return(0,e.is)(u,t.StrictHexStruct)}t.isStrictHexString=i;function s(u){(0,r.assert)(n(u),"Value must be a hexadecimal string.")}t.assertIsHexString=s;function o(u){(0,r.assert)(i(u),'Value must be a hexadecimal string, starting with "0x".')}t.assertIsStrictHexString=o;function a(u){return u.startsWith("0x")?u:u.startsWith("0X")?`0x${u.substring(2)}`:`0x${u}`}t.add0x=a;function c(u){return u.startsWith("0x")||u.startsWith("0X")?u.substring(2):u}t.remove0x=c})(fn);Object.defineProperty(J,"__esModule",{value:!0});J.createDataView=J.concatBytes=J.valueToBytes=J.stringToBytes=J.numberToBytes=J.signedBigIntToBytes=J.bigIntToBytes=J.hexToBytes=J.bytesToString=J.bytesToNumber=J.bytesToSignedBigInt=J.bytesToBigInt=J.bytesToHex=J.assertIsBytes=J.isBytes=void 0;const Le=we,To=fn,$c=48,Pc=58,Dc=87;function V0(){const t=[];return()=>{if(t.length===0)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return t}}const H0=V0();function aa(t){return t instanceof Uint8Array}J.isBytes=aa;function Or(t){(0,Le.assert)(aa(t),"Value must be a Uint8Array.")}J.assertIsBytes=Or;function Zl(t){if(Or(t),t.length===0)return"0x";const e=H0(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,To.add0x)(r.join(""))}J.bytesToHex=Zl;function Yl(t){Or(t);const e=Zl(t);return BigInt(e)}J.bytesToBigInt=Yl;function W0(t){Or(t);let e=BigInt(0);for(const r of t)e=(e<<BigInt(8))+BigInt(r);return BigInt.asIntN(t.length*8,e)}J.bytesToSignedBigInt=W0;function z0(t){Or(t);const e=Yl(t);return(0,Le.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(e)}J.bytesToNumber=z0;function U0(t){return Or(t),new TextDecoder().decode(t)}J.bytesToString=U0;function hi(t){var e;if(((e=t==null?void 0:t.toLowerCase)===null||e===void 0?void 0:e.call(t))==="0x")return new Uint8Array;(0,To.assertIsHexString)(t);const r=(0,To.remove0x)(t).toLowerCase(),n=r.length%2===0?r:`0${r}`,i=new Uint8Array(n.length/2);for(let s=0;s<i.length;s++){const o=n.charCodeAt(s*2),a=n.charCodeAt(s*2+1),c=o-(o<Pc?$c:Dc),u=a-(a<Pc?$c:Dc);i[s]=c*16+u}return i}J.hexToBytes=hi;function Kl(t){(0,Le.assert)(typeof t=="bigint","Value must be a bigint."),(0,Le.assert)(t>=BigInt(0),"Value must be a non-negative bigint.");const e=t.toString(16);return hi(e)}J.bigIntToBytes=Kl;function q0(t,e){(0,Le.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function G0(t,e){(0,Le.assert)(typeof t=="bigint","Value must be a bigint."),(0,Le.assert)(typeof e=="number","Byte length must be a number."),(0,Le.assert)(e>0,"Byte length must be greater than 0."),(0,Le.assert)(q0(t,e),"Byte length is too small to represent the given value.");let r=t;const n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()}J.signedBigIntToBytes=G0;function Xl(t){(0,Le.assert)(typeof t=="number","Value must be a number."),(0,Le.assert)(t>=0,"Value must be a non-negative number."),(0,Le.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");const e=t.toString(16);return hi(e)}J.numberToBytes=Xl;function eh(t){return(0,Le.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}J.stringToBytes=eh;function th(t){if(typeof t=="bigint")return Kl(t);if(typeof t=="number")return Xl(t);if(typeof t=="string")return t.startsWith("0x")?hi(t):eh(t);if(aa(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}J.valueToBytes=th;function J0(t){const e=new Array(t.length);let r=0;for(let i=0;i<t.length;i++){const s=th(t[i]);e[i]=s,r+=s.length}const n=new Uint8Array(r);for(let i=0,s=0;i<e.length;i++)n.set(e[i],s),s+=e[i].length;return n}J.concatBytes=J0;function Q0(t){if(typeof B<"u"&&t instanceof B){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}J.createDataView=Q0;var fi={};Object.defineProperty(fi,"__esModule",{value:!0});fi.ChecksumStruct=void 0;const Fc=Kt,Z0=hn;fi.ChecksumStruct=(0,Fc.size)((0,Z0.base64)((0,Fc.string)(),{paddingRequired:!0}),44,44);var at={};Object.defineProperty(at,"__esModule",{value:!0});at.createHex=at.createBytes=at.createBigInt=at.createNumber=void 0;const se=Kt,Y0=we,rh=J,di=fn,nh=(0,se.union)([(0,se.number)(),(0,se.bigint)(),(0,se.string)(),di.StrictHexStruct]),K0=(0,se.coerce)((0,se.number)(),nh,Number),X0=(0,se.coerce)((0,se.bigint)(),nh,BigInt);(0,se.union)([di.StrictHexStruct,(0,se.instance)(Uint8Array)]);const eb=(0,se.coerce)((0,se.instance)(Uint8Array),(0,se.union)([di.StrictHexStruct]),rh.hexToBytes),tb=(0,se.coerce)(di.StrictHexStruct,(0,se.instance)(Uint8Array),rh.bytesToHex);function rb(t){try{const e=(0,se.create)(t,K0);return(0,Y0.assert)(Number.isFinite(e),`Expected a number-like value, got "${t}".`),e}catch(e){throw e instanceof se.StructError?new Error(`Expected a number-like value, got "${t}".`):e}}at.createNumber=rb;function nb(t){try{return(0,se.create)(t,X0)}catch(e){throw e instanceof se.StructError?new Error(`Expected a number-like value, got "${String(e.value)}".`):e}}at.createBigInt=nb;function ib(t){if(typeof t=="string"&&t.toLowerCase()==="0x")return new Uint8Array;try{return(0,se.create)(t,eb)}catch(e){throw e instanceof se.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}at.createBytes=ib;function sb(t){if(t instanceof Uint8Array&&t.length===0||typeof t=="string"&&t.toLowerCase()==="0x")return"0x";try{return(0,se.create)(t,tb)}catch(e){throw e instanceof se.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}at.createHex=sb;var mr={},ih=A&&A.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ke=A&&A.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qe,tt;Object.defineProperty(mr,"__esModule",{value:!0});mr.FrozenSet=mr.FrozenMap=void 0;class ca{constructor(e){qe.set(this,void 0),ih(this,qe,new Map(e),"f"),Object.freeze(this)}get size(){return ke(this,qe,"f").size}[(qe=new WeakMap,Symbol.iterator)](){return ke(this,qe,"f")[Symbol.iterator]()}entries(){return ke(this,qe,"f").entries()}forEach(e,r){return ke(this,qe,"f").forEach((n,i,s)=>e.call(r,n,i,this))}get(e){return ke(this,qe,"f").get(e)}has(e){return ke(this,qe,"f").has(e)}keys(){return ke(this,qe,"f").keys()}values(){return ke(this,qe,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}}mr.FrozenMap=ca;class ua{constructor(e){tt.set(this,void 0),ih(this,tt,new Set(e),"f"),Object.freeze(this)}get size(){return ke(this,tt,"f").size}[(tt=new WeakMap,Symbol.iterator)](){return ke(this,tt,"f")[Symbol.iterator]()}entries(){return ke(this,tt,"f").entries()}forEach(e,r){return ke(this,tt,"f").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return ke(this,tt,"f").has(e)}keys(){return ke(this,tt,"f").keys()}values(){return ke(this,tt,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}mr.FrozenSet=ua;Object.freeze(ca);Object.freeze(ca.prototype);Object.freeze(ua);Object.freeze(ua.prototype);var sh={},la={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0;function e(u){return Array.isArray(u)&&u.length>0}t.isNonEmptyArray=e;function r(u){return u==null}t.isNullOrUndefined=r;function n(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}t.isObject=n;const i=(u,l)=>Object.hasOwnProperty.call(u,l);t.hasProperty=i,function(u){u[u.Null=4]="Null",u[u.Comma=1]="Comma",u[u.Wrapper=1]="Wrapper",u[u.True=4]="True",u[u.False=5]="False",u[u.Quote=1]="Quote",u[u.Colon=1]="Colon",u[u.Date=24]="Date"}(t.JsonSize||(t.JsonSize={})),t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(u){if(typeof u!="object"||u===null)return!1;try{let l=u;for(;Object.getPrototypeOf(l)!==null;)l=Object.getPrototypeOf(l);return Object.getPrototypeOf(u)===l}catch{return!1}}t.isPlainObject=s;function o(u){return u.charCodeAt(0)<=127}t.isASCII=o;function a(u){var l;return u.split("").reduce((f,d)=>o(d)?f+1:f+2,0)+((l=u.match(t.ESCAPE_CHARACTERS_REGEXP))!==null&&l!==void 0?l:[]).length}t.calculateStringSize=a;function c(u){return u.toString().length}t.calculateNumberSize=c})(la);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonAndGetSize=t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.isValidJson=t.JsonStruct=void 0;const e=Kt,r=we,n=la;t.JsonStruct=(0,e.define)("Json",E=>{const[N]=M(E,!0);return N?!0:"Expected a valid JSON-serializable value"});function i(E){return(0,e.is)(E,t.JsonStruct)}t.isValidJson=i,t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,e.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,e.nullable)((0,e.union)([(0,e.number)(),(0,e.string)()])),t.JsonRpcErrorStruct=(0,e.object)({code:(0,e.integer)(),message:(0,e.string)(),data:(0,e.optional)(t.JsonStruct),stack:(0,e.optional)((0,e.string)())}),t.JsonRpcParamsStruct=(0,e.optional)((0,e.union)([(0,e.record)((0,e.string)(),t.JsonStruct),(0,e.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,e.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,e.omit)(t.JsonRpcRequestStruct,["id"]);function s(E){return(0,e.is)(E,t.JsonRpcNotificationStruct)}t.isJsonRpcNotification=s;function o(E,N){(0,r.assertStruct)(E,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",N)}t.assertIsJsonRpcNotification=o;function a(E){return(0,e.is)(E,t.JsonRpcRequestStruct)}t.isJsonRpcRequest=a;function c(E,N){(0,r.assertStruct)(E,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",N)}t.assertIsJsonRpcRequest=c,t.PendingJsonRpcResponseStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,e.optional)((0,e.unknown)()),error:(0,e.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,e.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]);function u(E){return(0,e.is)(E,t.PendingJsonRpcResponseStruct)}t.isPendingJsonRpcResponse=u;function l(E,N){(0,r.assertStruct)(E,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",N)}t.assertIsPendingJsonRpcResponse=l;function h(E){return(0,e.is)(E,t.JsonRpcResponseStruct)}t.isJsonRpcResponse=h;function f(E,N){(0,r.assertStruct)(E,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",N)}t.assertIsJsonRpcResponse=f;function d(E){return(0,e.is)(E,t.JsonRpcSuccessStruct)}t.isJsonRpcSuccess=d;function p(E,N){(0,r.assertStruct)(E,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",N)}t.assertIsJsonRpcSuccess=p;function _(E){return(0,e.is)(E,t.JsonRpcFailureStruct)}t.isJsonRpcFailure=_;function v(E,N){(0,r.assertStruct)(E,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",N)}t.assertIsJsonRpcFailure=v;function b(E){return(0,e.is)(E,t.JsonRpcErrorStruct)}t.isJsonRpcError=b;function m(E,N){(0,r.assertStruct)(E,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",N)}t.assertIsJsonRpcError=m;function w(E){const{permitEmptyString:N,permitFractions:z,permitNull:te}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},E);return H=>!!(typeof H=="number"&&(z||Number.isInteger(H))||typeof H=="string"&&(N||H.length>0)||te&&H===null)}t.getJsonRpcIdValidator=w;function M(E,N=!1){const z=new Set;function te(O,H){if(O===void 0)return[!1,0];if(O===null)return[!0,H?0:n.JsonSize.Null];const le=typeof O;try{if(le==="function")return[!1,0];if(le==="string"||O instanceof String)return[!0,H?0:(0,n.calculateStringSize)(O)+n.JsonSize.Quote*2];if(le==="boolean"||O instanceof Boolean)return H?[!0,0]:[!0,O==!0?n.JsonSize.True:n.JsonSize.False];if(le==="number"||O instanceof Number)return H?[!0,0]:[!0,(0,n.calculateNumberSize)(O)];if(O instanceof Date)return H?[!0,0]:[!0,isNaN(O.getDate())?n.JsonSize.Null:n.JsonSize.Date+n.JsonSize.Quote*2]}catch{return[!1,0]}if(!(0,n.isPlainObject)(O)&&!Array.isArray(O))return[!1,0];if(z.has(O))return[!1,0];z.add(O);try{return[!0,Object.entries(O).reduce((q,[S,y],k,C)=>{let[T,I]=te(y,H);if(!T)throw new Error("JSON validation did not pass. Validation process stopped.");if(z.delete(O),H)return 0;const $=Array.isArray(O)?0:S.length+n.JsonSize.Comma+n.JsonSize.Colon*2,G=k<C.length-1?n.JsonSize.Comma:0;return q+$+I+G},H?0:n.JsonSize.Wrapper*2)]}catch{return[!1,0]}}return te(E,N)}t.validateJsonAndGetSize=M})(sh);var vr={},No={exports:{}},eo,Bc;function ob(){if(Bc)return eo;Bc=1;var t=1e3,e=t*60,r=e*60,n=r*24,i=n*7,s=n*365.25;eo=function(l,h){h=h||{};var f=typeof l;if(f==="string"&&l.length>0)return o(l);if(f==="number"&&isFinite(l))return h.long?c(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function o(l){if(l=String(l),!(l.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(h){var f=parseFloat(h[1]),d=(h[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return f*s;case"weeks":case"week":case"w":return f*i;case"days":case"day":case"d":return f*n;case"hours":case"hour":case"hrs":case"hr":case"h":return f*r;case"minutes":case"minute":case"mins":case"min":case"m":return f*e;case"seconds":case"second":case"secs":case"sec":case"s":return f*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function a(l){var h=Math.abs(l);return h>=n?Math.round(l/n)+"d":h>=r?Math.round(l/r)+"h":h>=e?Math.round(l/e)+"m":h>=t?Math.round(l/t)+"s":l+"ms"}function c(l){var h=Math.abs(l);return h>=n?u(l,h,n,"day"):h>=r?u(l,h,r,"hour"):h>=e?u(l,h,e,"minute"):h>=t?u(l,h,t,"second"):l+" ms"}function u(l,h,f,d){var p=h>=f*1.5;return Math.round(l/f)+" "+d+(p?"s":"")}return eo}function ab(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=ob(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let h=0;for(let f=0;f<l.length;f++)h=(h<<5)-h+l.charCodeAt(f),h|=0;return r.colors[Math.abs(h)%r.colors.length]}r.selectColor=e;function r(l){let h,f=null,d,p;function _(...v){if(!_.enabled)return;const b=_,m=Number(new Date),w=m-(h||m);b.diff=w,b.prev=h,b.curr=m,h=m,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let M=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(N,z)=>{if(N==="%%")return"%";M++;const te=r.formatters[z];if(typeof te=="function"){const O=v[M];N=te.call(b,O),v.splice(M,1),M--}return N}),r.formatArgs.call(b,v),(b.log||r.log).apply(b,v)}return _.namespace=l,_.useColors=r.useColors(),_.color=r.selectColor(l),_.extend=n,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(d!==r.namespaces&&(d=r.namespaces,p=r.enabled(l)),p),set:v=>{f=v}}),typeof r.init=="function"&&r.init(_),_}function n(l,h){const f=r(this.namespace+(typeof h>"u"?":":h)+l);return f.log=this.log,f}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let h;const f=(typeof l=="string"?l:"").split(/[\s,]+/),d=f.length;for(h=0;h<d;h++)f[h]&&(l=f[h].replace(/\*/g,".*?"),l[0]==="-"?r.skips.push(new RegExp("^"+l.slice(1)+"$")):r.names.push(new RegExp("^"+l+"$")))}function s(){const l=[...r.names.map(a),...r.skips.map(a).map(h=>"-"+h)].join(",");return r.enable(""),l}function o(l){if(l[l.length-1]==="*")return!0;let h,f;for(h=0,f=r.skips.length;h<f;h++)if(r.skips[h].test(l))return!1;for(h=0,f=r.names.length;h<f;h++)if(r.names[h].test(l))return!0;return!1}function a(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){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}var cb=ab;(function(t,e){var r={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.2.2"};e.formatArgs=i,e.save=s,e.load=o,e.useColors=n,e.storage=a(),e.destroy=(()=>{let u=!1;return()=>{u||(u=!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`."))}})(),e.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 n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1: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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;u.splice(1,0,l,"color: inherit");let h=0,f=0;u[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(h++,d==="%c"&&(f=h))}),u.splice(f,0,l)}e.log=console.debug||console.log||(()=>{});function s(u){try{u?e.storage.setItem("debug",u):e.storage.removeItem("debug")}catch{}}function o(){let u;try{u=e.storage.getItem("debug")}catch{}return!u&&typeof xo<"u"&&"env"in xo&&(u=r.DEBUG),u}function a(){try{return localStorage}catch{}}t.exports=cb(e);const{formatters:c}=t.exports;c.j=function(u){try{return JSON.stringify(u)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(No,No.exports);var ub=No.exports,lb=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vr,"__esModule",{value:!0});vr.createModuleLogger=vr.createProjectLogger=void 0;const hb=lb(ub),fb=(0,hb.default)("metamask");function db(t){return fb.extend(t)}vr.createProjectLogger=db;function pb(t,e){return t.extend(e)}vr.createModuleLogger=pb;var ct={};Object.defineProperty(ct,"__esModule",{value:!0});ct.hexToBigInt=ct.hexToNumber=ct.bigIntToHex=ct.numberToHex=void 0;const hr=we,Xr=fn,bb=t=>((0,hr.assert)(typeof t=="number","Value must be a number."),(0,hr.assert)(t>=0,"Value must be a non-negative number."),(0,hr.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Xr.add0x)(t.toString(16)));ct.numberToHex=bb;const gb=t=>((0,hr.assert)(typeof t=="bigint","Value must be a bigint."),(0,hr.assert)(t>=0,"Value must be a non-negative bigint."),(0,Xr.add0x)(t.toString(16)));ct.bigIntToHex=gb;const mb=t=>{(0,Xr.assertIsHexString)(t);const e=parseInt(t,16);return(0,hr.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};ct.hexToNumber=mb;const vb=t=>((0,Xr.assertIsHexString)(t),BigInt((0,Xr.add0x)(t)));ct.hexToBigInt=vb;var oh={};Object.defineProperty(oh,"__esModule",{value:!0});var ah={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"}(t.Duration||(t.Duration={}));const e=s=>Number.isInteger(s)&&s>=0,r=(s,o)=>{if(!e(s))throw new Error(`"${o}" must be a non-negative integer. Received: "${s}".`)};function n(s,o){return r(s,"count"),s*o}t.inMilliseconds=n;function i(s){return r(s,"timestamp"),Date.now()-s}t.timeSince=i})(ah);var ch={},Oo={exports:{}};const yb="2.0.0",uh=256,_b=Number.MAX_SAFE_INTEGER||9007199254740991,wb=16,Sb=uh-6,Eb=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var pi={MAX_LENGTH:uh,MAX_SAFE_COMPONENT_LENGTH:wb,MAX_SAFE_BUILD_LENGTH:Sb,MAX_SAFE_INTEGER:_b,RELEASE_TYPES:Eb,SEMVER_SPEC_VERSION:yb,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},to={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.2.2"};const Cb=typeof xo=="object"&&to&&to.NODE_DEBUG&&/\bsemver\b/i.test(to.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var bi=Cb;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=pi,s=bi;e=t.exports={};const o=e.re=[],a=e.safeRe=[],c=e.src=[],u=e.t={};let l=0;const h="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[h,n]],d=_=>{for(const[v,b]of f)_=_.split(`${v}*`).join(`${v}{0,${b}}`).split(`${v}+`).join(`${v}{1,${b}}`);return _},p=(_,v,b)=>{const m=d(v),w=l++;s(_,w,v),u[_]=w,c[w]=v,o[w]=new RegExp(v,b?"g":void 0),a[w]=new RegExp(m,b?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),p("MAINVERSION",`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[u.NUMERICIDENTIFIER]}|${c[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[u.NUMERICIDENTIFIERLOOSE]}|${c[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${h}+`),p("BUILD",`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),p("FULL",`^${c[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),p("LOOSE",`^${c[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),p("XRANGE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),p("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),p("COERCERTL",c[u.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Oo,Oo.exports);var dn=Oo.exports;const Ib=Object.freeze({loose:!0}),xb=Object.freeze({}),kb=t=>t?typeof t!="object"?Ib:t:xb;var ha=kb;const Vc=/^[0-9]+$/,lh=(t,e)=>{const r=Vc.test(t),n=Vc.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Rb=(t,e)=>lh(e,t);var hh={compareIdentifiers:lh,rcompareIdentifiers:Rb};const Rn=bi,{MAX_LENGTH:Hc,MAX_SAFE_INTEGER:Mn}=pi,{safeRe:Wc,t:zc}=dn,Mb=ha,{compareIdentifiers:tr}=hh;let Ab=class nt{constructor(e,r){if(r=Mb(r),e instanceof nt){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Hc)throw new TypeError(`version is longer than ${Hc} characters`);Rn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?Wc[zc.LOOSE]:Wc[zc.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Mn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Mn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Mn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s<Mn)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Rn("SemVer.compare",this.version,this.options,e),!(e instanceof nt)){if(typeof e=="string"&&e===this.version)return 0;e=new nt(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof nt||(e=new nt(e,this.options)),tr(this.major,e.major)||tr(this.minor,e.minor)||tr(this.patch,e.patch)}comparePre(e){if(e instanceof nt||(e=new nt(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=e.prerelease[r];if(Rn("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return tr(n,i)}while(++r)}compareBuild(e){e instanceof nt||(e=new nt(e,this.options));let r=0;do{const n=this.build[r],i=e.build[r];if(Rn("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return tr(n,i)}while(++r)}inc(e,r,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);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 i=Number(n)?1:0;if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),tr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Ae=Ab;const Uc=Ae,Tb=(t,e,r=!1)=>{if(t instanceof Uc)return t;try{return new Uc(t,e)}catch(n){if(!r)return null;throw n}};var Lr=Tb;const Nb=Lr,Ob=(t,e)=>{const r=Nb(t,e);return r?r.version:null};var Lb=Ob;const jb=Lr,$b=(t,e)=>{const r=jb(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var Pb=$b;const qc=Ae,Db=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new qc(t instanceof qc?t.version:t,r).inc(e,n,i).version}catch{return null}};var Fb=Db;const Gc=Lr,Bb=(t,e)=>{const r=Gc(t,null,!0),n=Gc(e,null,!0),i=r.compare(n);if(i===0)return null;const s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";const l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};var Vb=Bb;const Hb=Ae,Wb=(t,e)=>new Hb(t,e).major;var zb=Wb;const Ub=Ae,qb=(t,e)=>new Ub(t,e).minor;var Gb=qb;const Jb=Ae,Qb=(t,e)=>new Jb(t,e).patch;var Zb=Qb;const Yb=Lr,Kb=(t,e)=>{const r=Yb(t,e);return r&&r.prerelease.length?r.prerelease:null};var Xb=Kb;const Jc=Ae,eg=(t,e,r)=>new Jc(t,r).compare(new Jc(e,r));var Ke=eg;const tg=Ke,rg=(t,e,r)=>tg(e,t,r);var ng=rg;const ig=Ke,sg=(t,e)=>ig(t,e,!0);var og=sg;const Qc=Ae,ag=(t,e,r)=>{const n=new Qc(t,r),i=new Qc(e,r);return n.compare(i)||n.compareBuild(i)};var fa=ag;const cg=fa,ug=(t,e)=>t.sort((r,n)=>cg(r,n,e));var lg=ug;const hg=fa,fg=(t,e)=>t.sort((r,n)=>hg(n,r,e));var dg=fg;const pg=Ke,bg=(t,e,r)=>pg(t,e,r)>0;var gi=bg;const gg=Ke,mg=(t,e,r)=>gg(t,e,r)<0;var da=mg;const vg=Ke,yg=(t,e,r)=>vg(t,e,r)===0;var fh=yg;const _g=Ke,wg=(t,e,r)=>_g(t,e,r)!==0;var dh=wg;const Sg=Ke,Eg=(t,e,r)=>Sg(t,e,r)>=0;var pa=Eg;const Cg=Ke,Ig=(t,e,r)=>Cg(t,e,r)<=0;var ba=Ig;const xg=fh,kg=dh,Rg=gi,Mg=pa,Ag=da,Tg=ba,Ng=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return xg(t,r,n);case"!=":return kg(t,r,n);case">":return Rg(t,r,n);case">=":return Mg(t,r,n);case"<":return Ag(t,r,n);case"<=":return Tg(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var ph=Ng;const Og=Ae,Lg=Lr,{safeRe:An,t:Tn}=dn,jg=(t,e)=>{if(t instanceof Og)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(An[Tn.COERCE]);else{let n;for(;(n=An[Tn.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),An[Tn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;An[Tn.COERCERTL].lastIndex=-1}return r===null?null:Lg(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var $g=jg,ro,Zc;function Pg(){return Zc||(Zc=1,ro=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),ro}var Dg=Q;Q.Node=qt;Q.create=Q;function Q(t){var e=this;if(e instanceof Q||(e=new Q),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)e.push(arguments[r]);return e}Q.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};Q.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};Q.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};Q.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Bg(this,arguments[t]);return this.length};Q.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Vg(this,arguments[t]);return this.length};Q.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};Q.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};Q.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;r!==null;n++)t.call(e,r.value,n,this),r=r.next};Q.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;r!==null;n--)t.call(e,r.value,n,this),r=r.prev};Q.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};Q.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};Q.prototype.map=function(t,e){e=e||this;for(var r=new Q,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};Q.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Q,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};Q.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r};Q.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r};Q.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Q.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Q.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Q;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)r.push(i.value);return r};Q.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Q;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r};Q.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(var s=[],n=0;i&&n<e;n++)s.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=Fg(this,i,r[n]);return s};Q.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};function Fg(t,e,r){var n=e===t.head?new qt(r,null,e,t):new qt(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function Bg(t,e){t.tail=new qt(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Vg(t,e){t.head=new qt(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function qt(t,e,r,n){if(!(this instanceof qt))return new qt(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Pg()(Q)}catch{}const Hg=Dg,Ft=Symbol("max"),bt=Symbol("length"),rr=Symbol("lengthCalculator"),Gr=Symbol("allowStale"),Wt=Symbol("maxAge"),ft=Symbol("dispose"),Yc=Symbol("noDisposeOnSet"),ge=Symbol("lruList"),Qe=Symbol("cache"),bh=Symbol("updateAgeOnGet"),no=()=>1;class Wg{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[Ft]=e.max||1/0;const r=e.length||no;if(this[rr]=typeof r!="function"?no:r,this[Gr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Wt]=e.maxAge||0,this[ft]=e.dispose,this[Yc]=e.noDisposeOnSet||!1,this[bh]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Ft]=e||1/0,Br(this)}get max(){return this[Ft]}set allowStale(e){this[Gr]=!!e}get allowStale(){return this[Gr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Wt]=e,Br(this)}get maxAge(){return this[Wt]}set lengthCalculator(e){typeof e!="function"&&(e=no),e!==this[rr]&&(this[rr]=e,this[bt]=0,this[ge].forEach(r=>{r.length=this[rr](r.value,r.key),this[bt]+=r.length})),Br(this)}get lengthCalculator(){return this[rr]}get length(){return this[bt]}get itemCount(){return this[ge].length}rforEach(e,r){r=r||this;for(let n=this[ge].tail;n!==null;){const i=n.prev;Kc(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[ge].head;n!==null;){const i=n.next;Kc(this,e,n,r),n=i}}keys(){return this[ge].toArray().map(e=>e.key)}values(){return this[ge].toArray().map(e=>e.value)}reset(){this[ft]&&this[ge]&&this[ge].length&&this[ge].forEach(e=>this[ft](e.key,e.value)),this[Qe]=new Map,this[ge]=new Hg,this[bt]=0}dump(){return this[ge].map(e=>qn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ge]}set(e,r,n){if(n=n||this[Wt],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[rr](r,e);if(this[Qe].has(e)){if(s>this[Ft])return fr(this,this[Qe].get(e)),!1;const c=this[Qe].get(e).value;return this[ft]&&(this[Yc]||this[ft](e,c.value)),c.now=i,c.maxAge=n,c.value=r,this[bt]+=s-c.length,c.length=s,this.get(e),Br(this),!0}const o=new zg(e,r,s,i,n);return o.length>this[Ft]?(this[ft]&&this[ft](e,r),!1):(this[bt]+=o.length,this[ge].unshift(o),this[Qe].set(e,this[ge].head),Br(this),!0)}has(e){if(!this[Qe].has(e))return!1;const r=this[Qe].get(e).value;return!qn(this,r)}get(e){return io(this,e,!0)}peek(e){return io(this,e,!1)}pop(){const e=this[ge].tail;return e?(fr(this,e),e.value):null}del(e){fr(this,this[Qe].get(e))}load(e){this.reset();const r=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const o=s-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[Qe].forEach((e,r)=>io(this,r,!1))}}const io=(t,e,r)=>{const n=t[Qe].get(e);if(n){const i=n.value;if(qn(t,i)){if(fr(t,n),!t[Gr])return}else r&&(t[bh]&&(n.value.now=Date.now()),t[ge].unshiftNode(n));return i.value}},qn=(t,e)=>{if(!e||!e.maxAge&&!t[Wt])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Wt]&&r>t[Wt]},Br=t=>{if(t[bt]>t[Ft])for(let e=t[ge].tail;t[bt]>t[Ft]&&e!==null;){const r=e.prev;fr(t,e),e=r}},fr=(t,e)=>{if(e){const r=e.value;t[ft]&&t[ft](r.key,r.value),t[bt]-=r.length,t[Qe].delete(r.key),t[ge].removeNode(e)}};class zg{constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const Kc=(t,e,r,n)=>{let i=r.value;qn(t,i)&&(fr(t,r),t[Gr]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var Ug=Wg,so,Xc;function Xe(){if(Xc)return so;Xc=1;class t{constructor(y,k){if(k=n(k),y instanceof t)return y.loose===!!k.loose&&y.includePrerelease===!!k.includePrerelease?y:new t(y.raw,k);if(y instanceof i)return this.raw=y.value,this.set=[[y]],this.format(),this;if(this.options=k,this.loose=!!k.loose,this.includePrerelease=!!k.includePrerelease,this.raw=y.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(C=>this.parseRange(C.trim())).filter(C=>C.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const C=this.set[0];if(this.set=this.set.filter(T=>!p(T[0])),this.set.length===0)this.set=[C];else if(this.set.length>1){for(const T of this.set)if(T.length===1&&_(T[0])){this.set=[T];break}}}this.format()}format(){return this.range=this.set.map(y=>y.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(y){const C=((this.options.includePrerelease&&f)|(this.options.loose&&d))+":"+y,T=r.get(C);if(T)return T;const I=this.options.loose,$=I?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];y=y.replace($,le(this.options.includePrerelease)),s("hyphen replace",y),y=y.replace(a[c.COMPARATORTRIM],u),s("comparator trim",y),y=y.replace(a[c.TILDETRIM],l),s("tilde trim",y),y=y.replace(a[c.CARETTRIM],h),s("caret trim",y);let G=y.split(" ").map(ne=>b(ne,this.options)).join(" ").split(/\s+/).map(ne=>H(ne,this.options));I&&(G=G.filter(ne=>(s("loose invalid filter",ne,this.options),!!ne.match(a[c.COMPARATORLOOSE])))),s("range list",G);const D=new Map,X=G.map(ne=>new i(ne,this.options));for(const ne of X){if(p(ne))return[ne];D.set(ne.value,ne)}D.size>1&&D.has("")&&D.delete("");const Se=[...D.values()];return r.set(C,Se),Se}intersects(y,k){if(!(y instanceof t))throw new TypeError("a Range is required");return this.set.some(C=>v(C,k)&&y.set.some(T=>v(T,k)&&C.every(I=>T.every($=>I.intersects($,k)))))}test(y){if(!y)return!1;if(typeof y=="string")try{y=new o(y,this.options)}catch{return!1}for(let k=0;k<this.set.length;k++)if(q(this.set[k],y,this.options))return!0;return!1}}so=t;const e=Ug,r=new e({max:1e3}),n=ha,i=mi(),s=bi,o=Ae,{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:h}=dn,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=pi,p=S=>S.value==="<0.0.0-0",_=S=>S.value==="",v=(S,y)=>{let k=!0;const C=S.slice();let T=C.pop();for(;k&&C.length;)k=C.every(I=>T.intersects(I,y)),T=C.pop();return k},b=(S,y)=>(s("comp",S,y),S=E(S,y),s("caret",S),S=w(S,y),s("tildes",S),S=z(S,y),s("xrange",S),S=O(S,y),s("stars",S),S),m=S=>!S||S.toLowerCase()==="x"||S==="*",w=(S,y)=>S.trim().split(/\s+/).map(k=>M(k,y)).join(" "),M=(S,y)=>{const k=y.loose?a[c.TILDELOOSE]:a[c.TILDE];return S.replace(k,(C,T,I,$,G)=>{s("tilde",S,C,T,I,$,G);let D;return m(T)?D="":m(I)?D=`>=${T}.0.0 <${+T+1}.0.0-0`:m($)?D=`>=${T}.${I}.0 <${T}.${+I+1}.0-0`:G?(s("replaceTilde pr",G),D=`>=${T}.${I}.${$}-${G} <${T}.${+I+1}.0-0`):D=`>=${T}.${I}.${$} <${T}.${+I+1}.0-0`,s("tilde return",D),D})},E=(S,y)=>S.trim().split(/\s+/).map(k=>N(k,y)).join(" "),N=(S,y)=>{s("caret",S,y);const k=y.loose?a[c.CARETLOOSE]:a[c.CARET],C=y.includePrerelease?"-0":"";return S.replace(k,(T,I,$,G,D)=>{s("caret",S,T,I,$,G,D);let X;return m(I)?X="":m($)?X=`>=${I}.0.0${C} <${+I+1}.0.0-0`:m(G)?I==="0"?X=`>=${I}.${$}.0${C} <${I}.${+$+1}.0-0`:X=`>=${I}.${$}.0${C} <${+I+1}.0.0-0`:D?(s("replaceCaret pr",D),I==="0"?$==="0"?X=`>=${I}.${$}.${G}-${D} <${I}.${$}.${+G+1}-0`:X=`>=${I}.${$}.${G}-${D} <${I}.${+$+1}.0-0`:X=`>=${I}.${$}.${G}-${D} <${+I+1}.0.0-0`):(s("no pr"),I==="0"?$==="0"?X=`>=${I}.${$}.${G}${C} <${I}.${$}.${+G+1}-0`:X=`>=${I}.${$}.${G}${C} <${I}.${+$+1}.0-0`:X=`>=${I}.${$}.${G} <${+I+1}.0.0-0`),s("caret return",X),X})},z=(S,y)=>(s("replaceXRanges",S,y),S.split(/\s+/).map(k=>te(k,y)).join(" ")),te=(S,y)=>{S=S.trim();const k=y.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return S.replace(k,(C,T,I,$,G,D)=>{s("xRange",S,C,T,I,$,G,D);const X=m(I),Se=X||m($),ne=Se||m(G),wt=ne;return T==="="&&wt&&(T=""),D=y.includePrerelease?"-0":"",X?T===">"||T==="<"?C="<0.0.0-0":C="*":T&&wt?(Se&&($=0),G=0,T===">"?(T=">=",Se?(I=+I+1,$=0,G=0):($=+$+1,G=0)):T==="<="&&(T="<",Se?I=+I+1:$=+$+1),T==="<"&&(D="-0"),C=`${T+I}.${$}.${G}${D}`):Se?C=`>=${I}.0.0${D} <${+I+1}.0.0-0`:ne&&(C=`>=${I}.${$}.0${D} <${I}.${+$+1}.0-0`),s("xRange return",C),C})},O=(S,y)=>(s("replaceStars",S,y),S.trim().replace(a[c.STAR],"")),H=(S,y)=>(s("replaceGTE0",S,y),S.trim().replace(a[y.includePrerelease?c.GTE0PRE:c.GTE0],"")),le=S=>(y,k,C,T,I,$,G,D,X,Se,ne,wt,Xi)=>(m(C)?k="":m(T)?k=`>=${C}.0.0${S?"-0":""}`:m(I)?k=`>=${C}.${T}.0${S?"-0":""}`:$?k=`>=${k}`:k=`>=${k}${S?"-0":""}`,m(X)?D="":m(Se)?D=`<${+X+1}.0.0-0`:m(ne)?D=`<${X}.${+Se+1}.0-0`:wt?D=`<=${X}.${Se}.${ne}-${wt}`:S?D=`<${X}.${Se}.${+ne+1}-0`:D=`<=${D}`,`${k} ${D}`.trim()),q=(S,y,k)=>{for(let C=0;C<S.length;C++)if(!S[C].test(y))return!1;if(y.prerelease.length&&!k.includePrerelease){for(let C=0;C<S.length;C++)if(s(S[C].semver),S[C].semver!==i.ANY&&S[C].semver.prerelease.length>0){const T=S[C].semver;if(T.major===y.major&&T.minor===y.minor&&T.patch===y.patch)return!0}return!1}return!0};return so}var oo,eu;function mi(){if(eu)return oo;eu=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(l,h){if(h=r(h),l instanceof e){if(l.loose===!!h.loose)return l;l=l.value}l=l.trim().split(/\s+/).join(" "),o("comparator",l,h),this.options=h,this.loose=!!h.loose,this.parse(l),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(l){const h=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],f=l.match(h);if(!f)throw new TypeError(`Invalid comparator: ${l}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new a(f[2],this.options.loose):this.semver=t}toString(){return this.value}test(l){if(o("Comparator.test",l,this.options.loose),this.semver===t||l===t)return!0;if(typeof l=="string")try{l=new a(l,this.options)}catch{return!1}return s(l,this.operator,this.semver,this.options)}intersects(l,h){if(!(l instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(l.value,h).test(this.value):l.operator===""?l.value===""?!0:new c(this.value,h).test(l.semver):(h=r(h),h.includePrerelease&&(this.value==="<0.0.0-0"||l.value==="<0.0.0-0")||!h.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||s(this.semver,"<",l.semver,h)&&this.operator.startsWith(">")&&l.operator.startsWith("<")||s(this.semver,">",l.semver,h)&&this.operator.startsWith("<")&&l.operator.startsWith(">")))}}oo=e;const r=ha,{safeRe:n,t:i}=dn,s=ph,o=bi,a=Ae,c=Xe();return oo}const qg=Xe(),Gg=(t,e,r)=>{try{e=new qg(e,r)}catch{return!1}return e.test(t)};var vi=Gg;const Jg=Xe(),Qg=(t,e)=>new Jg(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Zg=Qg;const Yg=Ae,Kg=Xe(),Xg=(t,e,r)=>{let n=null,i=null,s=null;try{s=new Kg(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Yg(n,r))}),n};var em=Xg;const tm=Ae,rm=Xe(),nm=(t,e,r)=>{let n=null,i=null,s=null;try{s=new rm(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new tm(n,r))}),n};var im=nm;const ao=Ae,sm=Xe(),tu=gi,om=(t,e)=>{t=new sm(t,e);let r=new ao("0.0.0");if(t.test(r)||(r=new ao("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){const i=t.set[n];let s=null;i.forEach(o=>{const a=new ao(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||tu(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||tu(r,s))&&(r=s)}return r&&t.test(r)?r:null};var am=om;const cm=Xe(),um=(t,e)=>{try{return new cm(t,e).range||"*"}catch{return null}};var lm=um;const hm=Ae,gh=mi(),{ANY:fm}=gh,dm=Xe(),pm=vi,ru=gi,nu=da,bm=ba,gm=pa,mm=(t,e,r,n)=>{t=new hm(t,n),e=new dm(e,n);let i,s,o,a,c;switch(r){case">":i=ru,s=bm,o=nu,a=">",c=">=";break;case"<":i=nu,s=gm,o=ru,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(pm(t,e,n))return!1;for(let u=0;u<e.set.length;++u){const l=e.set[u];let h=null,f=null;if(l.forEach(d=>{d.semver===fm&&(d=new gh(">=0.0.0")),h=h||d,f=f||d,i(d.semver,h.semver,n)?h=d:o(d.semver,f.semver,n)&&(f=d)}),h.operator===a||h.operator===c||(!f.operator||f.operator===a)&&s(t,f.semver))return!1;if(f.operator===c&&o(t,f.semver))return!1}return!0};var ga=mm;const vm=ga,ym=(t,e,r)=>vm(t,e,">",r);var _m=ym;const wm=ga,Sm=(t,e,r)=>wm(t,e,"<",r);var Em=Sm;const iu=Xe(),Cm=(t,e,r)=>(t=new iu(t,r),e=new iu(e,r),t.intersects(e,r));var Im=Cm;const xm=vi,km=Ke;var Rm=(t,e,r)=>{const n=[];let i=null,s=null;const o=t.sort((l,h)=>km(l,h,r));for(const l of o)xm(l,e,r)?(s=l,i||(i=l)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const a=[];for(const[l,h]of n)l===h?a.push(l):!h&&l===o[0]?a.push("*"):h?l===o[0]?a.push(`<=${h}`):a.push(`${l} - ${h}`):a.push(`>=${l}`);const c=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return c.length<u.length?c:e};const su=Xe(),ma=mi(),{ANY:co}=ma,Vr=vi,va=Ke,Mm=(t,e,r={})=>{if(t===e)return!0;t=new su(t,r),e=new su(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const o=Tm(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Am=[new ma(">=0.0.0-0")],ou=[new ma(">=0.0.0")],Tm=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===co){if(e.length===1&&e[0].semver===co)return!0;r.includePrerelease?t=Am:t=ou}if(e.length===1&&e[0].semver===co){if(r.includePrerelease)return!0;e=ou}const n=new Set;let i,s;for(const d of t)d.operator===">"||d.operator===">="?i=au(i,d,r):d.operator==="<"||d.operator==="<="?s=cu(s,d,r):n.add(d.semver);if(n.size>1)return null;let o;if(i&&s){if(o=va(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const d of n){if(i&&!Vr(d,String(i),r)||s&&!Vr(d,String(s),r))return null;for(const p of e)if(!Vr(d,String(p),r))return!1;return!0}let a,c,u,l,h=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&s.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(const d of e){if(l=l||d.operator===">"||d.operator===">=",u=u||d.operator==="<"||d.operator==="<=",i){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator===">"||d.operator===">="){if(a=au(i,d,r),a===d&&a!==i)return!1}else if(i.operator===">="&&!Vr(i.semver,String(d),r))return!1}if(s){if(h&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===h.major&&d.semver.minor===h.minor&&d.semver.patch===h.patch&&(h=!1),d.operator==="<"||d.operator==="<="){if(c=cu(s,d,r),c===d&&c!==s)return!1}else if(s.operator==="<="&&!Vr(s.semver,String(d),r))return!1}if(!d.operator&&(s||i)&&o!==0)return!1}return!(i&&u&&!s&&o!==0||s&&l&&!i&&o!==0||f||h)},au=(t,e,r)=>{if(!t)return e;const n=va(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},cu=(t,e,r)=>{if(!t)return e;const n=va(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var Nm=Mm;const uo=dn,uu=pi,Om=Ae,lu=hh,Lm=Lr,jm=Lb,$m=Pb,Pm=Fb,Dm=Vb,Fm=zb,Bm=Gb,Vm=Zb,Hm=Xb,Wm=Ke,zm=ng,Um=og,qm=fa,Gm=lg,Jm=dg,Qm=gi,Zm=da,Ym=fh,Km=dh,Xm=pa,e1=ba,t1=ph,r1=$g,n1=mi(),i1=Xe(),s1=vi,o1=Zg,a1=em,c1=im,u1=am,l1=lm,h1=ga,f1=_m,d1=Em,p1=Im,b1=Rm,g1=Nm;var m1={parse:Lm,valid:jm,clean:$m,inc:Pm,diff:Dm,major:Fm,minor:Bm,patch:Vm,prerelease:Hm,compare:Wm,rcompare:zm,compareLoose:Um,compareBuild:qm,sort:Gm,rsort:Jm,gt:Qm,lt:Zm,eq:Ym,neq:Km,gte:Xm,lte:e1,cmp:t1,coerce:r1,Comparator:n1,Range:i1,satisfies:s1,toComparators:o1,maxSatisfying:a1,minSatisfying:c1,minVersion:u1,validRange:l1,outside:h1,gtr:f1,ltr:d1,intersects:p1,simplifyRange:b1,subset:g1,SemVer:Om,re:uo.re,src:uo.src,tokens:uo.t,SEMVER_SPEC_VERSION:uu.SEMVER_SPEC_VERSION,RELEASE_TYPES:uu.RELEASE_TYPES,compareIdentifiers:lu.compareIdentifiers,rcompareIdentifiers:lu.rcompareIdentifiers};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const e=m1,r=Kt,n=we;t.VersionStruct=(0,r.refine)((0,r.string)(),"Version",h=>(0,e.valid)(h)===null?`Expected SemVer version, got "${h}"`:!0),t.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",h=>(0,e.validRange)(h)===null?`Expected SemVer range, got "${h}"`:!0);function i(h){return(0,r.is)(h,t.VersionStruct)}t.isValidSemVerVersion=i;function s(h){return(0,r.is)(h,t.VersionRangeStruct)}t.isValidSemVerRange=s;function o(h){(0,n.assertStruct)(h,t.VersionStruct)}t.assertIsSemVerVersion=o;function a(h){(0,n.assertStruct)(h,t.VersionRangeStruct)}t.assertIsSemVerRange=a;function c(h,f){return(0,e.gt)(h,f)}t.gtVersion=c;function u(h,f){return(0,e.gtr)(h,f)}t.gtRange=u;function l(h,f){return(0,e.satisfies)(h,f,{includePrerelease:!0})}t.satisfiesVersionRange=l})(ch);(function(t){var e=A&&A.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,o,a)}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=A&&A.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(we,t),r(hn,t),r(J,t),r(fi,t),r(at,t),r(mr,t),r(fn,t),r(sh,t),r(vr,t),r(la,t),r(ct,t),r(oh,t),r(ah,t),r(ch,t)})(Bl);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const e=Bl;Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),t.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")})(Fl);var mh=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(li,"__esModule",{value:!0});li.PollingBlockTracker=void 0;const v1=mh(ea),y1=mh(Bp),_1=un,hu=Fl,fu=(0,hu.createModuleLogger)(hu.projectLogger,"polling-block-tracker"),w1=(0,v1.default)(),S1=1e3;class E1 extends _1.BaseBlockTracker{constructor(e={}){var r;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super({blockResetDuration:(r=e.blockResetDuration)!==null&&r!==void 0?r:e.pollingInterval}),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*S1,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const r=du(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
|
|
1
|
+
import{o as zf,w as Uf,d as A,x as ei,B,y as qf,z as il,g as kr,p as xo,A as Gf,C as ti,q as Jf}from"./index-3Won5U-l.js";function Qf(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Go={},Yr={},ri={};Object.defineProperty(ri,"__esModule",{value:!0});ri.walletLogo=void 0;const Zf=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' 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=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' 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=e,`data:image/svg+xml,%3Csvg width='${e}' 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 `}};ri.walletLogo=Zf;var ni={};Object.defineProperty(ni,"__esModule",{value:!0});ni.LINK_API_URL=void 0;ni.LINK_API_URL="https://www.walletlink.org";var ii={};Object.defineProperty(ii,"__esModule",{value:!0});ii.ScopedLocalStorage=void 0;class Yf{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);typeof i=="string"&&i.startsWith(e)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}ii.ScopedLocalStorage=Yf;var pr={},Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});const Kf=zf;function vc(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function Xf(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}let ed=class extends Kf.EventEmitter{emit(e,...r){let n=e==="error";const i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")vc(s,this,r);else{const o=s.length,a=Xf(s);for(let c=0;c<o;c+=1)vc(a[c],this,r)}return!0}};Qt.default=ed;var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.EVENTS=void 0;Rr.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",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var sn={},Jo={},Rt={},td=Kr;Kr.default=Kr;Kr.stable=al;Kr.stableStringify=al;var zn="[...]",sl="[Circular]",zt=[],Vt=[];function ol(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Kr(t,e,r,n){typeof n>"u"&&(n=ol()),ko(t,"",0,[],void 0,0,n);var i;try{Vt.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,cl(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;zt.length!==0;){var s=zt.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function ur(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),zt.push([n,r,e,i])):Vt.push([e,r,t]):(n[r]=t,zt.push([n,r,e]))}function ko(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){ur(sl,t,e,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){ur(zn,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){ur(zn,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)ko(t[a],a,a,n,t,s,o);else{var c=Object.keys(t);for(a=0;a<c.length;a++){var u=c[a];ko(t[u],u,a,n,t,s,o)}}n.pop()}}function rd(t,e){return t<e?-1:t>e?1:0}function al(t,e,r,n){typeof n>"u"&&(n=ol());var i=Ro(t,"",0,[],void 0,0,n)||t,s;try{Vt.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,cl(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;zt.length!==0;){var o=zt.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function Ro(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){ur(sl,t,e,i);return}try{if(typeof t.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){ur(zn,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){ur(zn,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)Ro(t[a],a,a,n,t,s,o);else{var c={},u=Object.keys(t).sort(rd);for(a=0;a<u.length;a++){var l=u[a];Ro(t[l],l,a,n,t,s,o),c[l]=t[l]}if(typeof i<"u")zt.push([i,e,t]),i[e]=c;else return c}n.pop()}}function cl(t){return t=typeof t<"u"?t:function(e,r){return r},function(e,r){if(Vt.length>0)for(var n=0;n<Vt.length;n++){var i=Vt[n];if(i[1]===e&&i[0]===r){r=i[2],Vt.splice(n,1);break}}return t.call(this,e,r)}}Object.defineProperty(Rt,"__esModule",{value:!0});Rt.EthereumProviderError=Rt.EthereumRpcError=void 0;const nd=td;class ul extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return nd.default(this.serialize(),od,2)}}Rt.EthereumRpcError=ul;class id extends ul{constructor(e,r,n){if(!sd(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}}Rt.EthereumProviderError=id;function sd(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function od(t,e){if(e!=="[Circular]")return e}var Qo={},Mt={};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.errorValues=Mt.errorCodes=void 0;Mt.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}};Mt.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."}};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=Mt,r=Rt,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(f,d=i){if(Number.isInteger(f)){const p=f.toString();if(h(e.errorValues,p))return e.errorValues[p].message;if(u(f))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return d}t.getMessageFromCode=o;function a(f){if(!Number.isInteger(f))return!1;const d=f.toString();return!!(e.errorValues[d]||u(f))}t.isValidCode=a;function c(f,{fallbackError:d=s,shouldIncludeStack:p=!1}={}){var _,v;if(!d||!Number.isInteger(d.code)||typeof d.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(f instanceof r.EthereumRpcError)return f.serialize();const b={};if(f&&typeof f=="object"&&!Array.isArray(f)&&h(f,"code")&&a(f.code)){const w=f;b.code=w.code,w.message&&typeof w.message=="string"?(b.message=w.message,h(w,"data")&&(b.data=w.data)):(b.message=o(b.code),b.data={originalError:l(f)})}else{b.code=d.code;const w=(_=f)===null||_===void 0?void 0:_.message;b.message=w&&typeof w=="string"?w:d.message,b.data={originalError:l(f)}}const m=(v=f)===null||v===void 0?void 0:v.stack;return p&&f&&m&&typeof m=="string"&&(b.stack=m),b}t.serializeError=c;function u(f){return f>=-32099&&f<=-32e3}function l(f){return f&&typeof f=="object"&&!Array.isArray(f)?Object.assign({},f):f}function h(f,d){return Object.prototype.hasOwnProperty.call(f,d)}})(Qo);var si={};Object.defineProperty(si,"__esModule",{value:!0});si.ethErrors=void 0;const Zo=Rt,ll=Qo,Ee=Mt;si.ethErrors={rpc:{parse:t=>Pe(Ee.errorCodes.rpc.parse,t),invalidRequest:t=>Pe(Ee.errorCodes.rpc.invalidRequest,t),invalidParams:t=>Pe(Ee.errorCodes.rpc.invalidParams,t),methodNotFound:t=>Pe(Ee.errorCodes.rpc.methodNotFound,t),internal:t=>Pe(Ee.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Pe(e,t)},invalidInput:t=>Pe(Ee.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>Pe(Ee.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>Pe(Ee.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>Pe(Ee.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>Pe(Ee.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>Pe(Ee.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Fr(Ee.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>Fr(Ee.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>Fr(Ee.errorCodes.provider.unsupportedMethod,t),disconnected:t=>Fr(Ee.errorCodes.provider.disconnected,t),chainDisconnected:t=>Fr(Ee.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Zo.EthereumProviderError(e,r,n)}}};function Pe(t,e){const[r,n]=hl(e);return new Zo.EthereumRpcError(t,r||ll.getMessageFromCode(t),n)}function Fr(t,e){const[r,n]=hl(e);return new Zo.EthereumProviderError(t,r||ll.getMessageFromCode(t),n)}function hl(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const e=Rt;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=Qo;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=si;Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=Mt;Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(Jo);var ee={},oi={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))})(oi);Object.defineProperty(ee,"__esModule",{value:!0});ee.EthereumAddressFromSignedMessageResponse=ee.SubmitEthereumTransactionResponse=ee.SignEthereumTransactionResponse=ee.SignEthereumMessageResponse=ee.isRequestEthereumAccountsResponse=ee.SelectProviderResponse=ee.WatchAssetReponse=ee.RequestEthereumAccountsResponse=ee.SwitchEthereumChainResponse=ee.AddEthereumChainResponse=ee.isErrorResponse=void 0;const ht=oi;function ad(t){var e,r;return((e=t)===null||e===void 0?void 0:e.method)!==void 0&&((r=t)===null||r===void 0?void 0:r.errorMessage)!==void 0}ee.isErrorResponse=ad;function cd(t){return{method:ht.Web3Method.addEthereumChain,result:t}}ee.AddEthereumChainResponse=cd;function ud(t){return{method:ht.Web3Method.switchEthereumChain,result:t}}ee.SwitchEthereumChainResponse=ud;function ld(t){return{method:ht.Web3Method.requestEthereumAccounts,result:t}}ee.RequestEthereumAccountsResponse=ld;function hd(t){return{method:ht.Web3Method.watchAsset,result:t}}ee.WatchAssetReponse=hd;function fd(t){return{method:ht.Web3Method.selectProvider,result:t}}ee.SelectProviderResponse=fd;function dd(t){return t&&t.method===ht.Web3Method.requestEthereumAccounts}ee.isRequestEthereumAccountsResponse=dd;function pd(t){return{method:ht.Web3Method.signEthereumMessage,result:t}}ee.SignEthereumMessageResponse=pd;function bd(t){return{method:ht.Web3Method.signEthereumTransaction,result:t}}ee.SignEthereumTransactionResponse=bd;function gd(t){return{method:ht.Web3Method.submitEthereumTransaction,result:t}}ee.SubmitEthereumTransactionResponse=gd;function md(t){return{method:ht.Web3Method.ethereumAddressFromSignedMessage,result:t}}ee.EthereumAddressFromSignedMessageResponse=md;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.LIB_VERSION=void 0;Mr.LIB_VERSION="3.7.2";(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const e=Jo,r=ee,n=Mr;t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},e.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},e.errorCodes.provider),{unsupportedChain:4902}))}));function i(l){return l!==void 0?(0,e.getMessageFromCode)(l):"Unknown error"}t.standardErrorMessage=i,t.standardErrors=Object.freeze(Object.assign(Object.assign({},e.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},e.ethErrors.provider),{unsupportedChain:(l="")=>e.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${l}. Try adding the chain using wallet_addEthereumChain first.`})}))}));function s(l,h){const f=(0,e.serializeError)(o(l),{shouldIncludeStack:!0}),d=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");d.searchParams.set("version",n.LIB_VERSION),d.searchParams.set("code",f.code.toString());const p=a(f.data,h);return p&&d.searchParams.set("method",p),d.searchParams.set("message",f.message),Object.assign(Object.assign({},f),{docUrl:d.href})}t.serializeError=s;function o(l){return typeof l=="string"?{message:l,code:t.standardErrorCodes.rpc.internal}:(0,r.isErrorResponse)(l)?Object.assign(Object.assign({},l),{message:l.errorMessage,code:l.errorCode,data:{method:l.method,result:l.result}}):l}function a(l,h){var f;const d=(f=l)===null||f===void 0?void 0:f.method;if(d)return d;if(h!==void 0)return typeof h=="string"?h:Array.isArray(h)?h.length>0?h[0].method:void 0:h.method}function c(l){var h;if(typeof l=="number")return l;if(u(l))return(h=l.code)!==null&&h!==void 0?h:l.errorCode}t.getErrorCode=c;function u(l){return typeof l=="object"&&l!==null&&(typeof l.code=="number"||typeof l.errorCode=="number")}})(sn);var Ar={},x={},vd=String.prototype.replace,yd=/%20/g,Zs={RFC1738:"RFC1738",RFC3986:"RFC3986"},Yo={default:Zs.RFC3986,formatters:{RFC1738:function(t){return vd.call(t,yd,"+")},RFC3986:function(t){return String(t)}},RFC1738:Zs.RFC1738,RFC3986:Zs.RFC3986},_d=Yo,Ys=Object.prototype.hasOwnProperty,$t=Array.isArray,et=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),wd=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if($t(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},fl=function(e,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},Sd=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if($t(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ys.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var i=e;return $t(e)&&!$t(r)&&(i=fl(e,n)),$t(e)&&$t(r)?(r.forEach(function(s,o){if(Ys.call(e,o)){var a=e[o];a&&typeof a=="object"&&s&&typeof s=="object"?e[o]=t(a,s,n):e.push(s)}else e[o]=s}),e):Object.keys(r).reduce(function(s,o){var a=r[o];return Ys.call(s,o)?s[o]=t(s[o],a,n):s[o]=a,s},i)},Ed=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},Cd=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Id=function(e,r,n,i,s){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var a="",c=0;c<o.length;++c){var u=o.charCodeAt(c);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||s===_d.RFC1738&&(u===40||u===41)){a+=o.charAt(c);continue}if(u<128){a=a+et[u];continue}if(u<2048){a=a+(et[192|u>>6]+et[128|u&63]);continue}if(u<55296||u>=57344){a=a+(et[224|u>>12]+et[128|u>>6&63]+et[128|u&63]);continue}c+=1,u=65536+((u&1023)<<10|o.charCodeAt(c)&1023),a+=et[240|u>>18]+et[128|u>>12&63]+et[128|u>>6&63]+et[128|u&63]}return a},xd=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],o=s.obj[s.prop],a=Object.keys(o),c=0;c<a.length;++c){var u=a[c],l=o[u];typeof l=="object"&&l!==null&&n.indexOf(l)===-1&&(r.push({obj:o,prop:u}),n.push(l))}return wd(r),e},kd=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Rd=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Md=function(e,r){return[].concat(e,r)},Ad=function(e,r){if($t(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},dl={arrayToObject:fl,assign:Ed,combine:Md,compact:xd,decode:Cd,encode:Id,isBuffer:Rd,isRegExp:kd,maybeMap:Ad,merge:Sd},pl=Uf,Fn=dl,Ur=Yo,Td=Object.prototype.hasOwnProperty,yc={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},pt=Array.isArray,Nd=Array.prototype.push,bl=function(t,e){Nd.apply(t,pt(e)?e:[e])},Od=Date.prototype.toISOString,_c=Ur.default,Ie={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Fn.encode,encodeValuesOnly:!1,format:_c,formatter:Ur.formatters[_c],indices:!1,serializeDate:function(e){return Od.call(e)},skipNulls:!1,strictNullHandling:!1},Ld=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Ks={},jd=function t(e,r,n,i,s,o,a,c,u,l,h,f,d,p,_,v){for(var b=e,m=v,w=0,M=!1;(m=m.get(Ks))!==void 0&&!M;){var E=m.get(e);if(w+=1,typeof E<"u"){if(E===w)throw new RangeError("Cyclic object value");M=!0}typeof m.get(Ks)>"u"&&(w=0)}if(typeof c=="function"?b=c(r,b):b instanceof Date?b=h(b):n==="comma"&&pt(b)&&(b=Fn.maybeMap(b,function(C){return C instanceof Date?h(C):C})),b===null){if(s)return a&&!p?a(r,Ie.encoder,_,"key",f):r;b=""}if(Ld(b)||Fn.isBuffer(b)){if(a){var N=p?r:a(r,Ie.encoder,_,"key",f);return[d(N)+"="+d(a(b,Ie.encoder,_,"value",f))]}return[d(r)+"="+d(String(b))]}var z=[];if(typeof b>"u")return z;var te;if(n==="comma"&&pt(b))p&&a&&(b=Fn.maybeMap(b,a)),te=[{value:b.length>0?b.join(",")||null:void 0}];else if(pt(c))te=c;else{var O=Object.keys(b);te=u?O.sort(u):O}for(var H=i&&pt(b)&&b.length===1?r+"[]":r,le=0;le<te.length;++le){var q=te[le],S=typeof q=="object"&&typeof q.value<"u"?q.value:b[q];if(!(o&&S===null)){var y=pt(b)?typeof n=="function"?n(H,q):H:H+(l?"."+q:"["+q+"]");v.set(e,w);var k=pl();k.set(Ks,v),bl(z,t(S,y,n,i,s,o,n==="comma"&&p&&pt(b)?null:a,c,u,l,h,f,d,p,_,k))}}return z},$d=function(e){if(!e)return Ie;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||Ie.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Ur.default;if(typeof e.format<"u"){if(!Td.call(Ur.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Ur.formatters[n],s=Ie.filter;return(typeof e.filter=="function"||pt(e.filter))&&(s=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Ie.addQueryPrefix,allowDots:typeof e.allowDots>"u"?Ie.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ie.charsetSentinel,delimiter:typeof e.delimiter>"u"?Ie.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Ie.encode,encoder:typeof e.encoder=="function"?e.encoder:Ie.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Ie.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Ie.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Ie.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ie.strictNullHandling}},Pd=function(t,e){var r=t,n=$d(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):pt(n.filter)&&(s=n.filter,i=s);var o=[];if(typeof r!="object"||r===null)return"";var a;e&&e.arrayFormat in yc?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var c=yc[a];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=c==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var l=pl(),h=0;h<i.length;++h){var f=i[h];n.skipNulls&&r[f]===null||bl(o,jd(r[f],f,c,u,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,l))}var d=o.join(n.delimiter),p=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},br=dl,Mo=Object.prototype.hasOwnProperty,Dd=Array.isArray,be={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:br.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Fd=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},gl=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Bd="utf8=%26%2310003%3B",Vd="utf8=%E2%9C%93",Hd=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,s),a=-1,c,u=r.charset;if(r.charsetSentinel)for(c=0;c<o.length;++c)o[c].indexOf("utf8=")===0&&(o[c]===Vd?u="utf-8":o[c]===Bd&&(u="iso-8859-1"),a=c,c=o.length);for(c=0;c<o.length;++c)if(c!==a){var l=o[c],h=l.indexOf("]="),f=h===-1?l.indexOf("="):h+1,d,p;f===-1?(d=r.decoder(l,be.decoder,u,"key"),p=r.strictNullHandling?null:""):(d=r.decoder(l.slice(0,f),be.decoder,u,"key"),p=br.maybeMap(gl(l.slice(f+1),r),function(_){return r.decoder(_,be.decoder,u,"value")})),p&&r.interpretNumericEntities&&u==="iso-8859-1"&&(p=Fd(p)),l.indexOf("[]=")>-1&&(p=Dd(p)?[p]:p),Mo.call(n,d)?n[d]=br.combine(n[d],p):n[d]=p}return n},Wd=function(t,e,r,n){for(var i=n?e:gl(e,r),s=t.length-1;s>=0;--s){var o,a=t[s];if(a==="[]"&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,u=parseInt(c,10);!r.parseArrays&&c===""?o={0:i}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(o=[],o[u]=i):c!=="__proto__"&&(o[c]=i)}i=o}return i},zd=function(e,r,n,i){if(e){var s=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(s),u=c?s.slice(0,c.index):s,l=[];if(u){if(!n.plainObjects&&Mo.call(Object.prototype,u)&&!n.allowPrototypes)return;l.push(u)}for(var h=0;n.depth>0&&(c=a.exec(s))!==null&&h<n.depth;){if(h+=1,!n.plainObjects&&Mo.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+s.slice(c.index)+"]"),Wd(l,r,n,i)}},Ud=function(e){if(!e)return be;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof e.charset>"u"?be.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?be.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:be.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:be.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:be.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:be.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:be.comma,decoder:typeof e.decoder=="function"?e.decoder:be.decoder,delimiter:typeof e.delimiter=="string"||br.isRegExp(e.delimiter)?e.delimiter:be.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:be.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:be.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:be.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:be.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:be.strictNullHandling}},qd=function(t,e){var r=Ud(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?Hd(t,r):t,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;o<s.length;++o){var a=s[o],c=zd(a,n[a],r,typeof t=="string");i=br.merge(i,c,r)}return r.allowSparse===!0?i:br.compact(i)},Gd=Pd,Jd=qd,Qd=Yo,Zd={formats:Qd,parse:Jd,stringify:Gd},on={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderType=t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0;function e(){return n=>n}t.OpaqueType=e,t.HexString=e(),t.AddressString=e(),t.BigIntString=e();function r(n){return Math.floor(n)}t.IntNumber=r,t.RegExpString=e(),function(n){n.CoinbaseWallet="CoinbaseWallet",n.MetaMask="MetaMask",n.Unselected=""}(t.ProviderType||(t.ProviderType={}))})(on);var Yd=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(x,"__esModule",{value:!0});x.isInIFrame=x.createQrUrl=x.getFavicon=x.range=x.isBigNumber=x.ensureParsedJSONObject=x.ensureBN=x.ensureRegExpString=x.ensureIntNumber=x.ensureBuffer=x.ensureAddressString=x.ensureEvenLengthHexString=x.ensureHexString=x.isHexString=x.prepend0x=x.strip0x=x.has0xPrefix=x.hexStringFromIntNumber=x.intNumberFromHexString=x.bigIntStringFromBN=x.hexStringFromBuffer=x.hexStringToUint8Array=x.uint8ArrayToHex=x.randomBytesHex=void 0;const It=Yd(ei),Kd=Zd,Zt=sn,We=on,ml=/^[0-9]*$/,vl=/^[a-f0-9]*$/;function Xd(t){return yl(crypto.getRandomValues(new Uint8Array(t)))}x.randomBytesHex=Xd;function yl(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}x.uint8ArrayToHex=yl;function ep(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}x.hexStringToUint8Array=ep;function tp(t,e=!1){const r=t.toString("hex");return(0,We.HexString)(e?"0x"+r:r)}x.hexStringFromBuffer=tp;function rp(t){return(0,We.BigIntString)(t.toString(10))}x.bigIntStringFromBN=rp;function np(t){return(0,We.IntNumber)(new It.default(cn(t,!1),16).toNumber())}x.intNumberFromHexString=np;function ip(t){return(0,We.HexString)("0x"+new It.default(t).toString(16))}x.hexStringFromIntNumber=ip;function Ko(t){return t.startsWith("0x")||t.startsWith("0X")}x.has0xPrefix=Ko;function ai(t){return Ko(t)?t.slice(2):t}x.strip0x=ai;function _l(t){return Ko(t)?"0x"+t.slice(2):"0x"+t}x.prepend0x=_l;function an(t){if(typeof t!="string")return!1;const e=ai(t).toLowerCase();return vl.test(e)}x.isHexString=an;function wl(t,e=!1){if(typeof t=="string"){const r=ai(t).toLowerCase();if(vl.test(r))return(0,We.HexString)(e?"0x"+r:r)}throw Zt.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}x.ensureHexString=wl;function cn(t,e=!1){let r=wl(t,!1);return r.length%2===1&&(r=(0,We.HexString)("0"+r)),e?(0,We.HexString)("0x"+r):r}x.ensureEvenLengthHexString=cn;function sp(t){if(typeof t=="string"){const e=ai(t).toLowerCase();if(an(e)&&e.length===40)return(0,We.AddressString)(_l(e))}throw Zt.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}x.ensureAddressString=sp;function op(t){if(B.isBuffer(t))return t;if(typeof t=="string")if(an(t)){const e=cn(t,!1);return B.from(e,"hex")}else return B.from(t,"utf8");throw Zt.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}x.ensureBuffer=op;function Sl(t){if(typeof t=="number"&&Number.isInteger(t))return(0,We.IntNumber)(t);if(typeof t=="string"){if(ml.test(t))return(0,We.IntNumber)(Number(t));if(an(t))return(0,We.IntNumber)(new It.default(cn(t,!1),16).toNumber())}throw Zt.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}x.ensureIntNumber=Sl;function ap(t){if(t instanceof RegExp)return(0,We.RegExpString)(t.toString());throw Zt.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}x.ensureRegExpString=ap;function cp(t){if(t!==null&&(It.default.isBN(t)||El(t)))return new It.default(t.toString(10),10);if(typeof t=="number")return new It.default(Sl(t));if(typeof t=="string"){if(ml.test(t))return new It.default(t,10);if(an(t))return new It.default(cn(t,!1),16)}throw Zt.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}x.ensureBN=cp;function up(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw Zt.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}x.ensureParsedJSONObject=up;function El(t){if(t==null||typeof t.constructor!="function")return!1;const{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}x.isBigNumber=El;function lp(t,e){return Array.from({length:e-t},(r,n)=>t+n)}x.range=lp;function hp(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute("href"):null;return!n||n.startsWith("javascript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`}x.getFavicon=hp;function fp(t,e,r,n,i,s){const o=n?"parent-id":"id",a=(0,Kd.stringify)({[o]:t,secret:e,server:r,v:i,chainId:s});return`${r}/#/link?${a}`}x.createQrUrl=fp;function dp(){try{return window.frameElement!==null}catch{return!1}}x.isInIFrame=dp;Object.defineProperty(Ar,"__esModule",{value:!0});Ar.Session=void 0;const wc=qf,Sc=x,Ec="session:id",Cc="session:secret",Ic="session:linked";class Xo{constructor(e,r,n,i){this._storage=e,this._id=r||(0,Sc.randomBytesHex)(16),this._secret=n||(0,Sc.randomBytesHex)(32),this._key=new wc.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const r=e.getItem(Ec),n=e.getItem(Ic),i=e.getItem(Cc);return r&&i?new Xo(e,r,i,n==="1"):null}static hash(e){return new wc.sha256().update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(Ec,this._id),this._storage.setItem(Cc,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Ic,this._linked?"1":"0")}}Ar.Session=Xo;var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.WalletSDKRelayAbstract=Ye.APP_VERSION_KEY=Ye.LOCAL_STORAGE_ADDRESSES_KEY=Ye.WALLET_USER_NAME_KEY=void 0;const xc=sn;Ye.WALLET_USER_NAME_KEY="walletUsername";Ye.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Ye.APP_VERSION_KEY="AppVersion";class pp{async makeEthereumJSONRPCRequest(e,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw xc.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,xc.serializeError)(s,e.method);return i})}}Ye.WalletSDKRelayAbstract=pp;const{Transform:bp}=il;var gp=t=>class Cl extends bp{constructor(r,n,i,s,o){super(o),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=o,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!B.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 B.isBuffer(r)||(r=B.from(r,n)),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 n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Cl(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:mp}=il;var vp=t=>class Il extends mp{constructor(r,n,i,s){super(s),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!B.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 B.isBuffer(r)||(r=B.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Il(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const yp=gp,_p=vp;var wp=function(t){const e=yp(t),r=_p(t);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},xl={};const kc=[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];xl.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],u=t[7]^t[17]^t[27]^t[37]^t[47],l=t[8]^t[18]^t[28]^t[38]^t[48],h=t[9]^t[19]^t[29]^t[39]^t[49];let f=l^(i<<1|s>>>31),d=h^(s<<1|i>>>31);const p=t[0]^f,_=t[1]^d,v=t[10]^f,b=t[11]^d,m=t[20]^f,w=t[21]^d,M=t[30]^f,E=t[31]^d,N=t[40]^f,z=t[41]^d;f=r^(o<<1|a>>>31),d=n^(a<<1|o>>>31);const te=t[2]^f,O=t[3]^d,H=t[12]^f,le=t[13]^d,q=t[22]^f,S=t[23]^d,y=t[32]^f,k=t[33]^d,C=t[42]^f,T=t[43]^d;f=i^(c<<1|u>>>31),d=s^(u<<1|c>>>31);const I=t[4]^f,$=t[5]^d,G=t[14]^f,D=t[15]^d,X=t[24]^f,Se=t[25]^d,ne=t[34]^f,wt=t[35]^d,Xi=t[44]^f,Ya=t[45]^d;f=o^(l<<1|h>>>31),d=a^(h<<1|l>>>31);const Ka=t[6]^f,Xa=t[7]^d,ec=t[16]^f,tc=t[17]^d,rc=t[26]^f,nc=t[27]^d,ic=t[36]^f,sc=t[37]^d,oc=t[46]^f,ac=t[47]^d;f=c^(r<<1|n>>>31),d=u^(n<<1|r>>>31);const cc=t[8]^f,uc=t[9]^d,lc=t[18]^f,hc=t[19]^d,fc=t[28]^f,dc=t[29]^d,pc=t[38]^f,bc=t[39]^d,gc=t[48]^f,mc=t[49]^d,es=p,ts=_,rs=b<<4|v>>>28,ns=v<<4|b>>>28,is=m<<3|w>>>29,ss=w<<3|m>>>29,os=E<<9|M>>>23,as=M<<9|E>>>23,cs=N<<18|z>>>14,us=z<<18|N>>>14,ls=te<<1|O>>>31,hs=O<<1|te>>>31,fs=le<<12|H>>>20,ds=H<<12|le>>>20,ps=q<<10|S>>>22,bs=S<<10|q>>>22,gs=k<<13|y>>>19,ms=y<<13|k>>>19,vs=C<<2|T>>>30,ys=T<<2|C>>>30,_s=$<<30|I>>>2,ws=I<<30|$>>>2,Ss=G<<6|D>>>26,Es=D<<6|G>>>26,Cs=Se<<11|X>>>21,Is=X<<11|Se>>>21,xs=ne<<15|wt>>>17,ks=wt<<15|ne>>>17,Rs=Ya<<29|Xi>>>3,Ms=Xi<<29|Ya>>>3,As=Ka<<28|Xa>>>4,Ts=Xa<<28|Ka>>>4,Ns=tc<<23|ec>>>9,Os=ec<<23|tc>>>9,Ls=rc<<25|nc>>>7,js=nc<<25|rc>>>7,$s=ic<<21|sc>>>11,Ps=sc<<21|ic>>>11,Ds=ac<<24|oc>>>8,Fs=oc<<24|ac>>>8,Bs=cc<<27|uc>>>5,Vs=uc<<27|cc>>>5,Hs=lc<<20|hc>>>12,Ws=hc<<20|lc>>>12,zs=dc<<7|fc>>>25,Us=fc<<7|dc>>>25,qs=pc<<8|bc>>>24,Gs=bc<<8|pc>>>24,Js=gc<<14|mc>>>18,Qs=mc<<14|gc>>>18;t[0]=es^~fs&Cs,t[1]=ts^~ds&Is,t[10]=As^~Hs&is,t[11]=Ts^~Ws&ss,t[20]=ls^~Ss&Ls,t[21]=hs^~Es&js,t[30]=Bs^~rs&ps,t[31]=Vs^~ns&bs,t[40]=_s^~Ns&zs,t[41]=ws^~Os&Us,t[2]=fs^~Cs&$s,t[3]=ds^~Is&Ps,t[12]=Hs^~is&gs,t[13]=Ws^~ss&ms,t[22]=Ss^~Ls&qs,t[23]=Es^~js&Gs,t[32]=rs^~ps&xs,t[33]=ns^~bs&ks,t[42]=Ns^~zs&os,t[43]=Os^~Us&as,t[4]=Cs^~$s&Js,t[5]=Is^~Ps&Qs,t[14]=is^~gs&Rs,t[15]=ss^~ms&Ms,t[24]=Ls^~qs&cs,t[25]=js^~Gs&us,t[34]=ps^~xs&Ds,t[35]=bs^~ks&Fs,t[44]=zs^~os&vs,t[45]=Us^~as&ys,t[6]=$s^~Js&es,t[7]=Ps^~Qs&ts,t[16]=gs^~Rs&As,t[17]=ms^~Ms&Ts,t[26]=qs^~cs&ls,t[27]=Gs^~us&hs,t[36]=xs^~Ds&Bs,t[37]=ks^~Fs&Vs,t[46]=os^~vs&_s,t[47]=as^~ys&ws,t[8]=Js^~es&fs,t[9]=Qs^~ts&ds,t[18]=Rs^~As&Hs,t[19]=Ms^~Ts&Ws,t[28]=cs^~ls&Ss,t[29]=us^~hs&Es,t[38]=Ds^~Bs&rs,t[39]=Fs^~Vs&ns,t[48]=vs^~_s&Ns,t[49]=ys^~ws&Os,t[0]^=kc[e*2],t[1]^=kc[e*2+1]}};const Un=xl;function Tr(){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}Tr.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};Tr.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(Un.p1600(this.state),this.count=0)};Tr.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),t&128&&this.count===this.blockSize-1&&Un.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),Un.p1600(this.state),this.count=0,this.squeezing=!0};Tr.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const e=B.alloc(t);for(let r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(Un.p1600(this.state),this.count=0);return e};Tr.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};var Sp=Tr,Ep=wp(Sp);const Cp=Ep,Ip=ei;function kl(t){return B.allocUnsafe(t).fill(0)}function Rl(t,e,r){const n=kl(e);return t=ci(t),r?t.length<e?(t.copy(n),n):t.slice(0,e):t.length<e?(t.copy(n,e-t.length),n):t.slice(-e)}function xp(t,e){return Rl(t,e,!0)}function ci(t){if(!B.isBuffer(t))if(Array.isArray(t))t=B.from(t);else if(typeof t=="string")Ml(t)?t=B.from(Mp(Al(t)),"hex"):t=B.from(t);else if(typeof t=="number")t=intToBuffer(t);else if(t==null)t=B.allocUnsafe(0);else if(Ip.isBN(t))t=t.toArrayLike(B);else if(t.toArray)t=B.from(t.toArray());else throw new Error("invalid type");return t}function kp(t){return t=ci(t),"0x"+t.toString("hex")}function Rp(t,e){return t=ci(t),e||(e=256),Cp("keccak"+e).update(t).digest()}function Mp(t){return t.length%2?"0"+t:t}function Ml(t){return typeof t=="string"&&t.match(/^0x[0-9A-Fa-f]*$/)}function Al(t){return typeof t=="string"&&t.startsWith("0x")?t.slice(2):t}var Tl={zeros:kl,setLength:Rl,setLengthRight:xp,isHexString:Ml,stripHexPrefix:Al,toBuffer:ci,bufferToHex:kp,keccak:Rp};const Ut=Tl,Ht=ei;function Nl(t){return t.startsWith("int[")?"int256"+t.slice(3):t==="int"?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):t==="uint"?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):t==="fixed"?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):t==="ufixed"?"ufixed128x128":t}function lr(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function Rc(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function Ol(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?e[2]===""?"dynamic":parseInt(e[2],10):null}function Pt(t){var e=typeof t;if(e==="string")return Ut.isHexString(t)?new Ht(Ut.stripHexPrefix(t),16):new Ht(t,10);if(e==="number")return new Ht(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function it(t,e){var r,n,i,s;if(t==="address")return it("uint160",Pt(e));if(t==="bool")return it("uint8",e?1:0);if(t==="string")return it("bytes",new B(e,"utf8"));if(Tp(t)){if(typeof e.length>"u")throw new Error("Not an array?");if(r=Ol(t),r!=="dynamic"&&r!==0&&e.length>r)throw new Error("Elements exceed array size: "+r);i=[],t=t.slice(0,t.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(it(t,e[s]));if(r==="dynamic"){var o=it("uint256",e.length);i.unshift(o)}return B.concat(i)}else{if(t==="bytes")return e=new B(e),i=B.concat([it("uint256",e.length),e]),e.length%32!==0&&(i=B.concat([i,Ut.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(r=lr(t),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return Ut.setLengthRight(e,32)}else if(t.startsWith("uint")){if(r=lr(t),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=Pt(e),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(B,"be",32)}else if(t.startsWith("int")){if(r=lr(t),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=Pt(e),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(B,"be",32)}else if(t.startsWith("ufixed")){if(r=Rc(t),n=Pt(e),n<0)throw new Error("Supplied ufixed is negative");return it("uint256",n.mul(new Ht(2).pow(new Ht(r[1]))))}else if(t.startsWith("fixed"))return r=Rc(t),it("int256",Pt(e).mul(new Ht(2).pow(new Ht(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function Ap(t){return t==="string"||t==="bytes"||Ol(t)==="dynamic"}function Tp(t){return t.lastIndexOf("]")===t.length-1}function Np(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=Nl(t[s]),a=e[s],c=it(o,a);Ap(o)?(r.push(it("uint256",i)),n.push(c),i+=c.length):r.push(c)}return B.concat(r.concat(n))}function Ll(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r,n,i=[],s=0;s<t.length;s++){var o=Nl(t[s]),a=e[s];if(o==="bytes")i.push(a);else if(o==="string")i.push(new B(a,"utf8"));else if(o==="bool")i.push(new B(a?"01":"00","hex"));else if(o==="address")i.push(Ut.setLength(a,20));else if(o.startsWith("bytes")){if(r=lr(o),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);i.push(Ut.setLengthRight(a,r))}else if(o.startsWith("uint")){if(r=lr(o),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=Pt(a),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(B,"be",r/8))}else if(o.startsWith("int")){if(r=lr(o),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=Pt(a),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(B,"be",r/8))}else throw new Error("Unsupported or invalid type: "+o)}return B.concat(i)}function Op(t,e){return Ut.keccak(Ll(t,e))}var Lp={rawEncode:Np,solidityPack:Ll,soliditySHA3:Op};const Je=Tl,qr=Lp,jl={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"]},Xs={encodeData(t,e,r,n=!0){const i=["bytes32"],s=[this.hashType(t,r)];if(n){const o=(a,c,u)=>{if(r[c]!==void 0)return["bytes32",u==null?"0x0000000000000000000000000000000000000000000000000000000000000000":Je.keccak(this.encodeData(c,u,r,n))];if(u===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c==="bytes")return["bytes32",Je.keccak(u)];if(c==="string")return typeof u=="string"&&(u=B.from(u,"utf8")),["bytes32",Je.keccak(u)];if(c.lastIndexOf("]")===c.length-1){const l=c.slice(0,c.lastIndexOf("[")),h=u.map(f=>o(a,l,f));return["bytes32",Je.keccak(qr.rawEncode(h.map(([f])=>f),h.map(([,f])=>f)))]}return[c,u]};for(const a of r[t]){const[c,u]=o(a.name,a.type,e[a.name]);i.push(c),s.push(u)}}else for(const o of r[t]){let a=e[o.name];if(a!==void 0)if(o.type==="bytes")i.push("bytes32"),a=Je.keccak(a),s.push(a);else if(o.type==="string")i.push("bytes32"),typeof a=="string"&&(a=B.from(a,"utf8")),a=Je.keccak(a),s.push(a);else if(r[o.type]!==void 0)i.push("bytes32"),a=Je.keccak(this.encodeData(o.type,a,r,n)),s.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(o.type),s.push(a)}}return qr.rawEncode(i,s)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(const n of e[t])for(const i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return Je.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return Je.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const r in jl.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){const r=this.sanitizeData(t),n=[B.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,e)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),Je.keccak(B.concat(n))}};var jp={TYPED_MESSAGE_SCHEMA:jl,TypedDataUtils:Xs,hashForSignTypedDataLegacy:function(t){return $p(t.data)},hashForSignTypedData_v3:function(t){return Xs.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return Xs.hash(t.data)}};function $p(t){const e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;const r=t.map(function(s){return s.type==="bytes"?Je.toBuffer(s.value):s.value}),n=t.map(function(s){return s.type}),i=t.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return qr.soliditySHA3(["bytes32","bytes32"],[qr.soliditySHA3(new Array(t.length).fill("string"),i),qr.soliditySHA3(n,r)])}var gr={};Object.defineProperty(gr,"__esModule",{value:!0});gr.filterFromParam=gr.FilterPolyfill=void 0;const or=on,xe=x,Pp=5*60*1e3,Dt={jsonrpc:"2.0",id:0};class Dp{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,or.IntNumber)(1),this.provider=e}async newFilter(e){const r=$l(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,r.fromBlock);return console.log(`Installing new log filter(${n}):`,r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,xe.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.blockFilters.add(e),this.setFilterTimeout(e),(0,xe.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,xe.hexStringFromIntNumber)(e)}uninstallFilter(e){const r=(0,xe.intNumberFromHexString)(e);return console.log(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(e){const r=(0,xe.intNumberFromHexString)(e);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(xn())}async getFilterLogs(e){const r=(0,xe.intNumberFromHexString)(e),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},Dt),{method:"eth_getLogs",params:[Mc(n)]})):xn()}makeFilterId(){return(0,or.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((r,n)=>{this.provider.sendAsync(e,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));r(s)})})}deleteFilter(e){console.log(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const r=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!r)return xn();const i=await this.getCurrentBlockHeight(),s=r.toBlock==="latest"?i:r.toBlock;if(n>i||n>r.toBlock)return kn();console.log(`Fetching logs from ${n} to ${s} for filter ${e}`);const o=await this.sendAsyncPromise(Object.assign(Object.assign({},Dt),{method:"eth_getLogs",params:[Mc(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(o.result)){const a=o.result.map(u=>(0,xe.intNumberFromHexString)(u.blockNumber||"0x0")),c=Math.max(...a);if(c&&c>n){const u=(0,or.IntNumber)(c+1);console.log(`Moving cursor position for filter (${e}) from ${n} to ${u}`),this.cursors.set(e,u)}}return o}async getBlockFilterChanges(e){const r=this.cursors.get(e);if(!r)return xn();const n=await this.getCurrentBlockHeight();if(r>n)return kn();console.log(`Fetching blocks from ${r} to ${n} for filter (${e})`);const i=(await Promise.all((0,xe.range)(r,n+1).map(o=>this.getBlockHashByNumber((0,or.IntNumber)(o))))).filter(o=>!!o),s=(0,or.IntNumber)(r+i.length);return console.log(`Moving cursor position for filter (${e}) from ${r} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},Dt),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(kn())}async setInitialCursorPosition(e,r){const n=await this.getCurrentBlockHeight(),i=typeof r=="number"&&r>n?r:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const r=this.timeouts.get(e);r&&window.clearTimeout(r);const n=window.setTimeout(()=>{console.log(`Filter (${e}) timed out`),this.deleteFilter(e)},Pp);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},Dt),{method:"eth_blockNumber",params:[]}));return(0,xe.intNumberFromHexString)((0,xe.ensureHexString)(e))}async getBlockHashByNumber(e){const r=await this.sendAsyncPromise(Object.assign(Object.assign({},Dt),{method:"eth_getBlockByNumber",params:[(0,xe.hexStringFromIntNumber)(e),!1]}));return r.result&&typeof r.result.hash=="string"?(0,xe.ensureHexString)(r.result.hash):null}}gr.FilterPolyfill=Dp;function $l(t){return{fromBlock:Ac(t.fromBlock),toBlock:Ac(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}gr.filterFromParam=$l;function Mc(t){const e={fromBlock:Tc(t.fromBlock),toBlock:Tc(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function Ac(t){if(t===void 0||t==="latest"||t==="pending")return"latest";if(t==="earliest")return(0,or.IntNumber)(0);if((0,xe.isHexString)(t))return(0,xe.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function Tc(t){return t==="latest"?t:(0,xe.hexStringFromIntNumber)(t)}function xn(){return Object.assign(Object.assign({},Dt),{error:{code:-32e3,message:"filter not found"}})}function kn(){return Object.assign(Object.assign({},Dt),{result:[]})}var Pl={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,function(e){e.eth_accounts="eth_accounts",e.eth_coinbase="eth_coinbase",e.net_version="net_version",e.eth_chainId="eth_chainId",e.eth_uninstallFilter="eth_uninstallFilter",e.eth_requestAccounts="eth_requestAccounts",e.eth_sign="eth_sign",e.eth_ecRecover="eth_ecRecover",e.personal_sign="personal_sign",e.personal_ecRecover="personal_ecRecover",e.eth_signTransaction="eth_signTransaction",e.eth_sendRawTransaction="eth_sendRawTransaction",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTypedData_v1="eth_signTypedData_v1",e.eth_signTypedData_v2="eth_signTypedData_v2",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_signTypedData="eth_signTypedData",e.cbWallet_arbitrary="walletlink_arbitrary",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.wallet_watchAsset="wallet_watchAsset",e.eth_subscribe="eth_subscribe",e.eth_unsubscribe="eth_unsubscribe",e.eth_newFilter="eth_newFilter",e.eth_newBlockFilter="eth_newBlockFilter",e.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",e.eth_getFilterChanges="eth_getFilterChanges",e.eth_getFilterLogs="eth_getFilterLogs"}(t.JSONRPCMethod||(t.JSONRPCMethod={}))})(Pl);var ui={},Dl={},li={},ea=Fp;function Fp(t){t=t||{};var e=t.max||Number.MAX_SAFE_INTEGER,r=typeof t.start<"u"?t.start:Math.floor(Math.random()*e);return function(){return r=r%e,r++}}const Nc=(t,e)=>function(){const r=e.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{e.errorFirst?n.push(function(o,a){if(e.multiArgs){const c=new Array(arguments.length-1);for(let u=1;u<arguments.length;u++)c[u-1]=arguments[u];o?(c.unshift(o),s(c)):i(c)}else o?s(o):i(a)}):n.push(function(o){if(e.multiArgs){const a=new Array(arguments.length-1);for(let c=0;c<arguments.length;c++)a[c]=arguments[c];i(a)}else i(o)}),t.apply(this,n)})};var Bp=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=i=>{const s=o=>typeof o=="string"?i===o:o.test(i);return e.include?e.include.some(s):!e.exclude.some(s)};let n;typeof t=="function"?n=function(){return e.excludeMain?t.apply(this,arguments):Nc(t,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(t));for(const i in t){const s=t[i];n[i]=typeof s=="function"&&r(i)?Nc(s,e):s}return n},un={},Vp=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(un,"__esModule",{value:!0});un.BaseBlockTracker=void 0;const Hp=Vp(Qt),Wp=1e3,zp=(t,e)=>t+e,Oc=["sync","latest"];class Up extends Hp.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*Wp,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(r=>this.once("latest",r))}removeAllListeners(e){return e?super.removeAllListeners(e):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(e){Oc.includes(e)&&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 Oc.map(e=>this.listenerCount(e)).reduce(zp)}_newPotentialLatest(e){const r=this._currentBlock;r&&Lc(e)<=Lc(r)||this._setCurrentBlock(e)}_setCurrentBlock(e){const r=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:r,newBlock:e})}_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}}un.BaseBlockTracker=Up;function Lc(t){return Number.parseInt(t,16)}var Fl={},Bl={},we={};class Vl extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...o}=e,{path:a}=e,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function qp(t){return ze(t)&&typeof t[Symbol.iterator]=="function"}function ze(t){return typeof t=="object"&&t!=null}function jc(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function pe(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function Gp(t){const{done:e,value:r}=t.next();return e?void 0:r}function Jp(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${pe(n)}\``}=t;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:c}}function*Ao(t,e,r,n){qp(t)||(t=[t]);for(const i of t){const s=Jp(i,e,r,n);s&&(yield s)}}function*ta(t,e,r={}){const{path:n=[],branch:i=[t],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),o&&e.type!=="type"&&ze(e.schema)&&ze(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,a))u.explanation=r.message,c="not_valid",yield[u,void 0];for(let[u,l,h]of e.entries(t,a)){const f=ta(l,h,{path:u===void 0?n:[...n,u],branch:u===void 0?i:[...i,l],coerce:s,mask:o,message:r.message});for(const d of f)d[0]?(c=d[0].refinement!=null?"not_refined":"not_valid",yield[d[0],void 0]):s&&(l=d[1],u===void 0?t=l:t instanceof Map?t.set(u,l):t instanceof Set?t.add(l):ze(t)&&(l!==void 0||u in t)&&(t[u]=l))}if(c!=="not_valid")for(const u of e.refiner(t,a))u.explanation=r.message,c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class he{constructor(e){const{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,u)=>{const l=i(c,u);return Ao(l,u,this,c)}:this.validator=()=>[],s?this.refiner=(c,u)=>{const l=s(c,u);return Ao(l,u,this,c)}:this.refiner=()=>[]}assert(e,r){return Hl(e,this,r)}create(e,r){return Wl(e,this,r)}is(e){return ra(e,this)}mask(e,r){return zl(e,this,r)}validate(e,r={}){return Nr(e,this,r)}}function Hl(t,e,r){const n=Nr(t,e,{message:r});if(n[0])throw n[0]}function Wl(t,e,r){const n=Nr(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function zl(t,e,r){const n=Nr(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function ra(t,e){return!Nr(t,e)[0]}function Nr(t,e,r={}){const n=ta(t,e,r),i=Gp(n);return i[0]?[new Vl(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function Qp(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?ia(n):ln(n)}function Ne(t,e){return new he({type:t,schema:null,validator:e})}function Zp(t,e){return new he({...t,refiner:(r,n)=>r===void 0||t.refiner(r,n),validator(r,n){return r===void 0?!0:(e(r,n),t.validator(r,n))}})}function Yp(t){return new he({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function Kp(t){let e;return new he({type:"lazy",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator(r,n){return e??(e=t()),e.validator(r,n)},coercer(r,n){return e??(e=t()),e.coercer(r,n)},refiner(r,n){return e??(e=t()),e.refiner(r,n)}})}function Xp(t,e){const{schema:r}=t,n={...r};for(const i of e)delete n[i];switch(t.type){case"type":return ia(n);default:return ln(n)}}function e0(t){const e=t instanceof he?{...t.schema}:{...t};for(const r in e)e[r]=Ul(e[r]);return ln(e)}function t0(t,e){const{schema:r}=t,n={};for(const i of e)n[i]=r[i];return ln(n)}function r0(t,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Ne(t,e)}function n0(){return Ne("any",()=>!0)}function i0(t){return new he({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${pe(e)}`}})}function s0(){return Ne("bigint",t=>typeof t=="bigint")}function o0(){return Ne("boolean",t=>typeof t=="boolean")}function a0(){return Ne("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${pe(t)}`)}function c0(t){const e={},r=t.map(n=>pe(n)).join();for(const n of t)e[n]=n;return new he({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${pe(n)}`}})}function u0(){return Ne("func",t=>typeof t=="function"||`Expected a function, but received: ${pe(t)}`)}function l0(t){return Ne("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${pe(e)}`)}function h0(){return Ne("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${pe(t)}`)}function f0(t){return new he({type:"intersection",schema:null,*entries(e,r){for(const n of t)yield*n.entries(e,r)},*validator(e,r){for(const n of t)yield*n.validator(e,r)},*refiner(e,r){for(const n of t)yield*n.refiner(e,r)}})}function d0(t){const e=pe(t),r=typeof t;return new he({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${pe(n)}`}})}function p0(t,e){return new he({type:"map",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${pe(r)}`}})}function na(){return Ne("never",()=>!1)}function b0(t){return new he({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function g0(){return Ne("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${pe(t)}`)}function ln(t){const e=t?Object.keys(t):[],r=na();return new he({type:"object",schema:t||null,*entries(n){if(t&&ze(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return ze(n)||`Expected an object, but received: ${pe(n)}`},coercer(n){return ze(n)?{...n}:n}})}function Ul(t){return new he({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function m0(t,e){return new he({type:"record",schema:null,*entries(r){if(ze(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return ze(r)||`Expected an object, but received: ${pe(r)}`}})}function v0(){return Ne("regexp",t=>t instanceof RegExp)}function y0(t){return new he({type:"set",schema:null,*entries(e){if(t&&e instanceof Set)for(const r of e)yield[r,r,t]},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \`Set\` object, but received: ${pe(e)}`}})}function ql(){return Ne("string",t=>typeof t=="string"||`Expected a string, but received: ${pe(t)}`)}function _0(t){const e=na();return new he({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${pe(r)}`}})}function ia(t){const e=Object.keys(t);return new he({type:"type",schema:t,*entries(r){if(ze(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return ze(r)||`Expected an object, but received: ${pe(r)}`},coercer(r){return ze(r)?{...r}:r}})}function w0(t){const e=t.map(r=>r.type).join(" | ");return new he({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...o]=ta(r,s,n),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${pe(r)}`,...i]}})}function Gl(){return Ne("unknown",()=>!0)}function sa(t,e,r){return new he({...t,coercer:(n,i)=>ra(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function S0(t,e,r={}){return sa(t,Gl(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!r.strict&&jc(n)&&jc(i)){const s={...n};let o=!1;for(const a in i)s[a]===void 0&&(s[a]=i[a],o=!0);if(o)return s}return n})}function E0(t){return sa(t,ql(),e=>e.trim())}function C0(t){return Yt(t,"empty",e=>{const r=Jl(e);return r===0||`Expected an empty ${t.type} but received one with a size of \`${r}\``})}function Jl(t){return t instanceof Map||t instanceof Set?t.size:t.length}function I0(t,e,r={}){const{exclusive:n}=r;return Yt(t,"max",i=>n?i<e:i<=e||`Expected a ${t.type} less than ${n?"":"or equal to "}${e} but received \`${i}\``)}function x0(t,e,r={}){const{exclusive:n}=r;return Yt(t,"min",i=>n?i>e:i>=e||`Expected a ${t.type} greater than ${n?"":"or equal to "}${e} but received \`${i}\``)}function k0(t){return Yt(t,"nonempty",e=>Jl(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function R0(t,e){return Yt(t,"pattern",r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`)}function M0(t,e,r=e){const n=`Expected a ${t.type}`,i=e===r?`of \`${e}\``:`between \`${e}\` and \`${r}\``;return Yt(t,"size",s=>{if(typeof s=="number"||s instanceof Date)return e<=s&&s<=r||`${n} ${i} but received \`${s}\``;if(s instanceof Map||s instanceof Set){const{size:o}=s;return e<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}else{const{length:o}=s;return e<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}})}function Yt(t,e,r){return new he({...t,*refiner(n,i){yield*t.refiner(n,i);const s=r(n,i),o=Ao(s,i,t,n);for(const a of o)yield{...a,refinement:e}}})}const A0=Object.freeze(Object.defineProperty({__proto__:null,Struct:he,StructError:Vl,any:n0,array:i0,assert:Hl,assign:Qp,bigint:s0,boolean:o0,coerce:sa,create:Wl,date:a0,defaulted:S0,define:Ne,deprecated:Zp,dynamic:Yp,empty:C0,enums:c0,func:u0,instance:l0,integer:h0,intersection:f0,is:ra,lazy:Kp,literal:d0,map:p0,mask:zl,max:I0,min:x0,never:na,nonempty:k0,nullable:b0,number:g0,object:ln,omit:Xp,optional:Ul,partial:e0,pattern:R0,pick:t0,record:m0,refine:Yt,regexp:v0,set:y0,size:M0,string:ql,struct:r0,trimmed:E0,tuple:_0,type:ia,union:w0,unknown:Gl,validate:Nr},Symbol.toStringTag,{value:"Module"})),Kt=kr(A0);Object.defineProperty(we,"__esModule",{value:!0});we.assertExhaustive=we.assertStruct=we.assert=we.AssertionError=void 0;const T0=Kt;function N0(t){return typeof t=="object"&&t!==null&&"message"in t}function O0(t){var e,r;return typeof((r=(e=t==null?void 0:t.prototype)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.name)=="string"}function L0(t){const e=N0(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function Ql(t,e){return O0(t)?new t({message:e}):t({message:e})}class oa extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}we.AssertionError=oa;function j0(t,e="Assertion failed.",r=oa){if(!t)throw e instanceof Error?e:Ql(r,e)}we.assert=j0;function $0(t,e,r="Assertion failed",n=oa){try{(0,T0.assert)(t,e)}catch(i){throw Ql(n,`${r}: ${L0(i)}.`)}}we.assertStruct=$0;function P0(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}we.assertExhaustive=P0;var hn={};Object.defineProperty(hn,"__esModule",{value:!0});hn.base64=void 0;const D0=Kt,F0=we,B0=(t,e={})=>{var r,n;const i=(r=e.paddingRequired)!==null&&r!==void 0?r:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:"base64";let o;s==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,F0.assert)(s==="base64url"),o=String.raw`[-_A-Za-z0-9]`);let a;return i?a=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):a=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,D0.pattern)(t,a)};hn.base64=B0;var J={},fn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const e=Kt,r=we;t.HexStruct=(0,e.pattern)((0,e.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,e.pattern)((0,e.string)(),/^0x[0-9a-f]+$/iu);function n(u){return(0,e.is)(u,t.HexStruct)}t.isHexString=n;function i(u){return(0,e.is)(u,t.StrictHexStruct)}t.isStrictHexString=i;function s(u){(0,r.assert)(n(u),"Value must be a hexadecimal string.")}t.assertIsHexString=s;function o(u){(0,r.assert)(i(u),'Value must be a hexadecimal string, starting with "0x".')}t.assertIsStrictHexString=o;function a(u){return u.startsWith("0x")?u:u.startsWith("0X")?`0x${u.substring(2)}`:`0x${u}`}t.add0x=a;function c(u){return u.startsWith("0x")||u.startsWith("0X")?u.substring(2):u}t.remove0x=c})(fn);Object.defineProperty(J,"__esModule",{value:!0});J.createDataView=J.concatBytes=J.valueToBytes=J.stringToBytes=J.numberToBytes=J.signedBigIntToBytes=J.bigIntToBytes=J.hexToBytes=J.bytesToString=J.bytesToNumber=J.bytesToSignedBigInt=J.bytesToBigInt=J.bytesToHex=J.assertIsBytes=J.isBytes=void 0;const Le=we,To=fn,$c=48,Pc=58,Dc=87;function V0(){const t=[];return()=>{if(t.length===0)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return t}}const H0=V0();function aa(t){return t instanceof Uint8Array}J.isBytes=aa;function Or(t){(0,Le.assert)(aa(t),"Value must be a Uint8Array.")}J.assertIsBytes=Or;function Zl(t){if(Or(t),t.length===0)return"0x";const e=H0(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,To.add0x)(r.join(""))}J.bytesToHex=Zl;function Yl(t){Or(t);const e=Zl(t);return BigInt(e)}J.bytesToBigInt=Yl;function W0(t){Or(t);let e=BigInt(0);for(const r of t)e=(e<<BigInt(8))+BigInt(r);return BigInt.asIntN(t.length*8,e)}J.bytesToSignedBigInt=W0;function z0(t){Or(t);const e=Yl(t);return(0,Le.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(e)}J.bytesToNumber=z0;function U0(t){return Or(t),new TextDecoder().decode(t)}J.bytesToString=U0;function hi(t){var e;if(((e=t==null?void 0:t.toLowerCase)===null||e===void 0?void 0:e.call(t))==="0x")return new Uint8Array;(0,To.assertIsHexString)(t);const r=(0,To.remove0x)(t).toLowerCase(),n=r.length%2===0?r:`0${r}`,i=new Uint8Array(n.length/2);for(let s=0;s<i.length;s++){const o=n.charCodeAt(s*2),a=n.charCodeAt(s*2+1),c=o-(o<Pc?$c:Dc),u=a-(a<Pc?$c:Dc);i[s]=c*16+u}return i}J.hexToBytes=hi;function Kl(t){(0,Le.assert)(typeof t=="bigint","Value must be a bigint."),(0,Le.assert)(t>=BigInt(0),"Value must be a non-negative bigint.");const e=t.toString(16);return hi(e)}J.bigIntToBytes=Kl;function q0(t,e){(0,Le.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function G0(t,e){(0,Le.assert)(typeof t=="bigint","Value must be a bigint."),(0,Le.assert)(typeof e=="number","Byte length must be a number."),(0,Le.assert)(e>0,"Byte length must be greater than 0."),(0,Le.assert)(q0(t,e),"Byte length is too small to represent the given value.");let r=t;const n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()}J.signedBigIntToBytes=G0;function Xl(t){(0,Le.assert)(typeof t=="number","Value must be a number."),(0,Le.assert)(t>=0,"Value must be a non-negative number."),(0,Le.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");const e=t.toString(16);return hi(e)}J.numberToBytes=Xl;function eh(t){return(0,Le.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}J.stringToBytes=eh;function th(t){if(typeof t=="bigint")return Kl(t);if(typeof t=="number")return Xl(t);if(typeof t=="string")return t.startsWith("0x")?hi(t):eh(t);if(aa(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}J.valueToBytes=th;function J0(t){const e=new Array(t.length);let r=0;for(let i=0;i<t.length;i++){const s=th(t[i]);e[i]=s,r+=s.length}const n=new Uint8Array(r);for(let i=0,s=0;i<e.length;i++)n.set(e[i],s),s+=e[i].length;return n}J.concatBytes=J0;function Q0(t){if(typeof B<"u"&&t instanceof B){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}J.createDataView=Q0;var fi={};Object.defineProperty(fi,"__esModule",{value:!0});fi.ChecksumStruct=void 0;const Fc=Kt,Z0=hn;fi.ChecksumStruct=(0,Fc.size)((0,Z0.base64)((0,Fc.string)(),{paddingRequired:!0}),44,44);var at={};Object.defineProperty(at,"__esModule",{value:!0});at.createHex=at.createBytes=at.createBigInt=at.createNumber=void 0;const se=Kt,Y0=we,rh=J,di=fn,nh=(0,se.union)([(0,se.number)(),(0,se.bigint)(),(0,se.string)(),di.StrictHexStruct]),K0=(0,se.coerce)((0,se.number)(),nh,Number),X0=(0,se.coerce)((0,se.bigint)(),nh,BigInt);(0,se.union)([di.StrictHexStruct,(0,se.instance)(Uint8Array)]);const eb=(0,se.coerce)((0,se.instance)(Uint8Array),(0,se.union)([di.StrictHexStruct]),rh.hexToBytes),tb=(0,se.coerce)(di.StrictHexStruct,(0,se.instance)(Uint8Array),rh.bytesToHex);function rb(t){try{const e=(0,se.create)(t,K0);return(0,Y0.assert)(Number.isFinite(e),`Expected a number-like value, got "${t}".`),e}catch(e){throw e instanceof se.StructError?new Error(`Expected a number-like value, got "${t}".`):e}}at.createNumber=rb;function nb(t){try{return(0,se.create)(t,X0)}catch(e){throw e instanceof se.StructError?new Error(`Expected a number-like value, got "${String(e.value)}".`):e}}at.createBigInt=nb;function ib(t){if(typeof t=="string"&&t.toLowerCase()==="0x")return new Uint8Array;try{return(0,se.create)(t,eb)}catch(e){throw e instanceof se.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}at.createBytes=ib;function sb(t){if(t instanceof Uint8Array&&t.length===0||typeof t=="string"&&t.toLowerCase()==="0x")return"0x";try{return(0,se.create)(t,tb)}catch(e){throw e instanceof se.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}at.createHex=sb;var mr={},ih=A&&A.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ke=A&&A.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qe,tt;Object.defineProperty(mr,"__esModule",{value:!0});mr.FrozenSet=mr.FrozenMap=void 0;class ca{constructor(e){qe.set(this,void 0),ih(this,qe,new Map(e),"f"),Object.freeze(this)}get size(){return ke(this,qe,"f").size}[(qe=new WeakMap,Symbol.iterator)](){return ke(this,qe,"f")[Symbol.iterator]()}entries(){return ke(this,qe,"f").entries()}forEach(e,r){return ke(this,qe,"f").forEach((n,i,s)=>e.call(r,n,i,this))}get(e){return ke(this,qe,"f").get(e)}has(e){return ke(this,qe,"f").has(e)}keys(){return ke(this,qe,"f").keys()}values(){return ke(this,qe,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}}mr.FrozenMap=ca;class ua{constructor(e){tt.set(this,void 0),ih(this,tt,new Set(e),"f"),Object.freeze(this)}get size(){return ke(this,tt,"f").size}[(tt=new WeakMap,Symbol.iterator)](){return ke(this,tt,"f")[Symbol.iterator]()}entries(){return ke(this,tt,"f").entries()}forEach(e,r){return ke(this,tt,"f").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return ke(this,tt,"f").has(e)}keys(){return ke(this,tt,"f").keys()}values(){return ke(this,tt,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}mr.FrozenSet=ua;Object.freeze(ca);Object.freeze(ca.prototype);Object.freeze(ua);Object.freeze(ua.prototype);var sh={},la={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0;function e(u){return Array.isArray(u)&&u.length>0}t.isNonEmptyArray=e;function r(u){return u==null}t.isNullOrUndefined=r;function n(u){return!!u&&typeof u=="object"&&!Array.isArray(u)}t.isObject=n;const i=(u,l)=>Object.hasOwnProperty.call(u,l);t.hasProperty=i,function(u){u[u.Null=4]="Null",u[u.Comma=1]="Comma",u[u.Wrapper=1]="Wrapper",u[u.True=4]="True",u[u.False=5]="False",u[u.Quote=1]="Quote",u[u.Colon=1]="Colon",u[u.Date=24]="Date"}(t.JsonSize||(t.JsonSize={})),t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(u){if(typeof u!="object"||u===null)return!1;try{let l=u;for(;Object.getPrototypeOf(l)!==null;)l=Object.getPrototypeOf(l);return Object.getPrototypeOf(u)===l}catch{return!1}}t.isPlainObject=s;function o(u){return u.charCodeAt(0)<=127}t.isASCII=o;function a(u){var l;return u.split("").reduce((f,d)=>o(d)?f+1:f+2,0)+((l=u.match(t.ESCAPE_CHARACTERS_REGEXP))!==null&&l!==void 0?l:[]).length}t.calculateStringSize=a;function c(u){return u.toString().length}t.calculateNumberSize=c})(la);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonAndGetSize=t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.isValidJson=t.JsonStruct=void 0;const e=Kt,r=we,n=la;t.JsonStruct=(0,e.define)("Json",E=>{const[N]=M(E,!0);return N?!0:"Expected a valid JSON-serializable value"});function i(E){return(0,e.is)(E,t.JsonStruct)}t.isValidJson=i,t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,e.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,e.nullable)((0,e.union)([(0,e.number)(),(0,e.string)()])),t.JsonRpcErrorStruct=(0,e.object)({code:(0,e.integer)(),message:(0,e.string)(),data:(0,e.optional)(t.JsonStruct),stack:(0,e.optional)((0,e.string)())}),t.JsonRpcParamsStruct=(0,e.optional)((0,e.union)([(0,e.record)((0,e.string)(),t.JsonStruct),(0,e.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,e.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,e.omit)(t.JsonRpcRequestStruct,["id"]);function s(E){return(0,e.is)(E,t.JsonRpcNotificationStruct)}t.isJsonRpcNotification=s;function o(E,N){(0,r.assertStruct)(E,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",N)}t.assertIsJsonRpcNotification=o;function a(E){return(0,e.is)(E,t.JsonRpcRequestStruct)}t.isJsonRpcRequest=a;function c(E,N){(0,r.assertStruct)(E,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",N)}t.assertIsJsonRpcRequest=c,t.PendingJsonRpcResponseStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,e.optional)((0,e.unknown)()),error:(0,e.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,e.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]);function u(E){return(0,e.is)(E,t.PendingJsonRpcResponseStruct)}t.isPendingJsonRpcResponse=u;function l(E,N){(0,r.assertStruct)(E,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",N)}t.assertIsPendingJsonRpcResponse=l;function h(E){return(0,e.is)(E,t.JsonRpcResponseStruct)}t.isJsonRpcResponse=h;function f(E,N){(0,r.assertStruct)(E,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",N)}t.assertIsJsonRpcResponse=f;function d(E){return(0,e.is)(E,t.JsonRpcSuccessStruct)}t.isJsonRpcSuccess=d;function p(E,N){(0,r.assertStruct)(E,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",N)}t.assertIsJsonRpcSuccess=p;function _(E){return(0,e.is)(E,t.JsonRpcFailureStruct)}t.isJsonRpcFailure=_;function v(E,N){(0,r.assertStruct)(E,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",N)}t.assertIsJsonRpcFailure=v;function b(E){return(0,e.is)(E,t.JsonRpcErrorStruct)}t.isJsonRpcError=b;function m(E,N){(0,r.assertStruct)(E,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",N)}t.assertIsJsonRpcError=m;function w(E){const{permitEmptyString:N,permitFractions:z,permitNull:te}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},E);return H=>!!(typeof H=="number"&&(z||Number.isInteger(H))||typeof H=="string"&&(N||H.length>0)||te&&H===null)}t.getJsonRpcIdValidator=w;function M(E,N=!1){const z=new Set;function te(O,H){if(O===void 0)return[!1,0];if(O===null)return[!0,H?0:n.JsonSize.Null];const le=typeof O;try{if(le==="function")return[!1,0];if(le==="string"||O instanceof String)return[!0,H?0:(0,n.calculateStringSize)(O)+n.JsonSize.Quote*2];if(le==="boolean"||O instanceof Boolean)return H?[!0,0]:[!0,O==!0?n.JsonSize.True:n.JsonSize.False];if(le==="number"||O instanceof Number)return H?[!0,0]:[!0,(0,n.calculateNumberSize)(O)];if(O instanceof Date)return H?[!0,0]:[!0,isNaN(O.getDate())?n.JsonSize.Null:n.JsonSize.Date+n.JsonSize.Quote*2]}catch{return[!1,0]}if(!(0,n.isPlainObject)(O)&&!Array.isArray(O))return[!1,0];if(z.has(O))return[!1,0];z.add(O);try{return[!0,Object.entries(O).reduce((q,[S,y],k,C)=>{let[T,I]=te(y,H);if(!T)throw new Error("JSON validation did not pass. Validation process stopped.");if(z.delete(O),H)return 0;const $=Array.isArray(O)?0:S.length+n.JsonSize.Comma+n.JsonSize.Colon*2,G=k<C.length-1?n.JsonSize.Comma:0;return q+$+I+G},H?0:n.JsonSize.Wrapper*2)]}catch{return[!1,0]}}return te(E,N)}t.validateJsonAndGetSize=M})(sh);var vr={},No={exports:{}},eo,Bc;function ob(){if(Bc)return eo;Bc=1;var t=1e3,e=t*60,r=e*60,n=r*24,i=n*7,s=n*365.25;eo=function(l,h){h=h||{};var f=typeof l;if(f==="string"&&l.length>0)return o(l);if(f==="number"&&isFinite(l))return h.long?c(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function o(l){if(l=String(l),!(l.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(h){var f=parseFloat(h[1]),d=(h[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return f*s;case"weeks":case"week":case"w":return f*i;case"days":case"day":case"d":return f*n;case"hours":case"hour":case"hrs":case"hr":case"h":return f*r;case"minutes":case"minute":case"mins":case"min":case"m":return f*e;case"seconds":case"second":case"secs":case"sec":case"s":return f*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function a(l){var h=Math.abs(l);return h>=n?Math.round(l/n)+"d":h>=r?Math.round(l/r)+"h":h>=e?Math.round(l/e)+"m":h>=t?Math.round(l/t)+"s":l+"ms"}function c(l){var h=Math.abs(l);return h>=n?u(l,h,n,"day"):h>=r?u(l,h,r,"hour"):h>=e?u(l,h,e,"minute"):h>=t?u(l,h,t,"second"):l+" ms"}function u(l,h,f,d){var p=h>=f*1.5;return Math.round(l/f)+" "+d+(p?"s":"")}return eo}function ab(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=ob(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let h=0;for(let f=0;f<l.length;f++)h=(h<<5)-h+l.charCodeAt(f),h|=0;return r.colors[Math.abs(h)%r.colors.length]}r.selectColor=e;function r(l){let h,f=null,d,p;function _(...v){if(!_.enabled)return;const b=_,m=Number(new Date),w=m-(h||m);b.diff=w,b.prev=h,b.curr=m,h=m,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let M=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(N,z)=>{if(N==="%%")return"%";M++;const te=r.formatters[z];if(typeof te=="function"){const O=v[M];N=te.call(b,O),v.splice(M,1),M--}return N}),r.formatArgs.call(b,v),(b.log||r.log).apply(b,v)}return _.namespace=l,_.useColors=r.useColors(),_.color=r.selectColor(l),_.extend=n,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(d!==r.namespaces&&(d=r.namespaces,p=r.enabled(l)),p),set:v=>{f=v}}),typeof r.init=="function"&&r.init(_),_}function n(l,h){const f=r(this.namespace+(typeof h>"u"?":":h)+l);return f.log=this.log,f}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let h;const f=(typeof l=="string"?l:"").split(/[\s,]+/),d=f.length;for(h=0;h<d;h++)f[h]&&(l=f[h].replace(/\*/g,".*?"),l[0]==="-"?r.skips.push(new RegExp("^"+l.slice(1)+"$")):r.names.push(new RegExp("^"+l+"$")))}function s(){const l=[...r.names.map(a),...r.skips.map(a).map(h=>"-"+h)].join(",");return r.enable(""),l}function o(l){if(l[l.length-1]==="*")return!0;let h,f;for(h=0,f=r.skips.length;h<f;h++)if(r.skips[h].test(l))return!1;for(h=0,f=r.names.length;h<f;h++)if(r.names[h].test(l))return!0;return!1}function a(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){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}var cb=ab;(function(t,e){var r={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.2.3"};e.formatArgs=i,e.save=s,e.load=o,e.useColors=n,e.storage=a(),e.destroy=(()=>{let u=!1;return()=>{u||(u=!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`."))}})(),e.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 n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1: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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;u.splice(1,0,l,"color: inherit");let h=0,f=0;u[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(h++,d==="%c"&&(f=h))}),u.splice(f,0,l)}e.log=console.debug||console.log||(()=>{});function s(u){try{u?e.storage.setItem("debug",u):e.storage.removeItem("debug")}catch{}}function o(){let u;try{u=e.storage.getItem("debug")}catch{}return!u&&typeof xo<"u"&&"env"in xo&&(u=r.DEBUG),u}function a(){try{return localStorage}catch{}}t.exports=cb(e);const{formatters:c}=t.exports;c.j=function(u){try{return JSON.stringify(u)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(No,No.exports);var ub=No.exports,lb=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vr,"__esModule",{value:!0});vr.createModuleLogger=vr.createProjectLogger=void 0;const hb=lb(ub),fb=(0,hb.default)("metamask");function db(t){return fb.extend(t)}vr.createProjectLogger=db;function pb(t,e){return t.extend(e)}vr.createModuleLogger=pb;var ct={};Object.defineProperty(ct,"__esModule",{value:!0});ct.hexToBigInt=ct.hexToNumber=ct.bigIntToHex=ct.numberToHex=void 0;const hr=we,Xr=fn,bb=t=>((0,hr.assert)(typeof t=="number","Value must be a number."),(0,hr.assert)(t>=0,"Value must be a non-negative number."),(0,hr.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Xr.add0x)(t.toString(16)));ct.numberToHex=bb;const gb=t=>((0,hr.assert)(typeof t=="bigint","Value must be a bigint."),(0,hr.assert)(t>=0,"Value must be a non-negative bigint."),(0,Xr.add0x)(t.toString(16)));ct.bigIntToHex=gb;const mb=t=>{(0,Xr.assertIsHexString)(t);const e=parseInt(t,16);return(0,hr.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};ct.hexToNumber=mb;const vb=t=>((0,Xr.assertIsHexString)(t),BigInt((0,Xr.add0x)(t)));ct.hexToBigInt=vb;var oh={};Object.defineProperty(oh,"__esModule",{value:!0});var ah={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"}(t.Duration||(t.Duration={}));const e=s=>Number.isInteger(s)&&s>=0,r=(s,o)=>{if(!e(s))throw new Error(`"${o}" must be a non-negative integer. Received: "${s}".`)};function n(s,o){return r(s,"count"),s*o}t.inMilliseconds=n;function i(s){return r(s,"timestamp"),Date.now()-s}t.timeSince=i})(ah);var ch={},Oo={exports:{}};const yb="2.0.0",uh=256,_b=Number.MAX_SAFE_INTEGER||9007199254740991,wb=16,Sb=uh-6,Eb=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var pi={MAX_LENGTH:uh,MAX_SAFE_COMPONENT_LENGTH:wb,MAX_SAFE_BUILD_LENGTH:Sb,MAX_SAFE_INTEGER:_b,RELEASE_TYPES:Eb,SEMVER_SPEC_VERSION:yb,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},to={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.2.3"};const Cb=typeof xo=="object"&&to&&to.NODE_DEBUG&&/\bsemver\b/i.test(to.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var bi=Cb;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=pi,s=bi;e=t.exports={};const o=e.re=[],a=e.safeRe=[],c=e.src=[],u=e.t={};let l=0;const h="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[h,n]],d=_=>{for(const[v,b]of f)_=_.split(`${v}*`).join(`${v}{0,${b}}`).split(`${v}+`).join(`${v}{1,${b}}`);return _},p=(_,v,b)=>{const m=d(v),w=l++;s(_,w,v),u[_]=w,c[w]=v,o[w]=new RegExp(v,b?"g":void 0),a[w]=new RegExp(m,b?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),p("MAINVERSION",`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[u.NUMERICIDENTIFIER]}|${c[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[u.NUMERICIDENTIFIERLOOSE]}|${c[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${h}+`),p("BUILD",`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),p("FULL",`^${c[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),p("LOOSE",`^${c[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),p("XRANGE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),p("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),p("COERCERTL",c[u.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Oo,Oo.exports);var dn=Oo.exports;const Ib=Object.freeze({loose:!0}),xb=Object.freeze({}),kb=t=>t?typeof t!="object"?Ib:t:xb;var ha=kb;const Vc=/^[0-9]+$/,lh=(t,e)=>{const r=Vc.test(t),n=Vc.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Rb=(t,e)=>lh(e,t);var hh={compareIdentifiers:lh,rcompareIdentifiers:Rb};const Rn=bi,{MAX_LENGTH:Hc,MAX_SAFE_INTEGER:Mn}=pi,{safeRe:Wc,t:zc}=dn,Mb=ha,{compareIdentifiers:tr}=hh;let Ab=class nt{constructor(e,r){if(r=Mb(r),e instanceof nt){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Hc)throw new TypeError(`version is longer than ${Hc} characters`);Rn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?Wc[zc.LOOSE]:Wc[zc.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Mn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Mn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Mn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s<Mn)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Rn("SemVer.compare",this.version,this.options,e),!(e instanceof nt)){if(typeof e=="string"&&e===this.version)return 0;e=new nt(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof nt||(e=new nt(e,this.options)),tr(this.major,e.major)||tr(this.minor,e.minor)||tr(this.patch,e.patch)}comparePre(e){if(e instanceof nt||(e=new nt(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=e.prerelease[r];if(Rn("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return tr(n,i)}while(++r)}compareBuild(e){e instanceof nt||(e=new nt(e,this.options));let r=0;do{const n=this.build[r],i=e.build[r];if(Rn("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return tr(n,i)}while(++r)}inc(e,r,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);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 i=Number(n)?1:0;if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),tr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Ae=Ab;const Uc=Ae,Tb=(t,e,r=!1)=>{if(t instanceof Uc)return t;try{return new Uc(t,e)}catch(n){if(!r)return null;throw n}};var Lr=Tb;const Nb=Lr,Ob=(t,e)=>{const r=Nb(t,e);return r?r.version:null};var Lb=Ob;const jb=Lr,$b=(t,e)=>{const r=jb(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var Pb=$b;const qc=Ae,Db=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new qc(t instanceof qc?t.version:t,r).inc(e,n,i).version}catch{return null}};var Fb=Db;const Gc=Lr,Bb=(t,e)=>{const r=Gc(t,null,!0),n=Gc(e,null,!0),i=r.compare(n);if(i===0)return null;const s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";const l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};var Vb=Bb;const Hb=Ae,Wb=(t,e)=>new Hb(t,e).major;var zb=Wb;const Ub=Ae,qb=(t,e)=>new Ub(t,e).minor;var Gb=qb;const Jb=Ae,Qb=(t,e)=>new Jb(t,e).patch;var Zb=Qb;const Yb=Lr,Kb=(t,e)=>{const r=Yb(t,e);return r&&r.prerelease.length?r.prerelease:null};var Xb=Kb;const Jc=Ae,eg=(t,e,r)=>new Jc(t,r).compare(new Jc(e,r));var Ke=eg;const tg=Ke,rg=(t,e,r)=>tg(e,t,r);var ng=rg;const ig=Ke,sg=(t,e)=>ig(t,e,!0);var og=sg;const Qc=Ae,ag=(t,e,r)=>{const n=new Qc(t,r),i=new Qc(e,r);return n.compare(i)||n.compareBuild(i)};var fa=ag;const cg=fa,ug=(t,e)=>t.sort((r,n)=>cg(r,n,e));var lg=ug;const hg=fa,fg=(t,e)=>t.sort((r,n)=>hg(n,r,e));var dg=fg;const pg=Ke,bg=(t,e,r)=>pg(t,e,r)>0;var gi=bg;const gg=Ke,mg=(t,e,r)=>gg(t,e,r)<0;var da=mg;const vg=Ke,yg=(t,e,r)=>vg(t,e,r)===0;var fh=yg;const _g=Ke,wg=(t,e,r)=>_g(t,e,r)!==0;var dh=wg;const Sg=Ke,Eg=(t,e,r)=>Sg(t,e,r)>=0;var pa=Eg;const Cg=Ke,Ig=(t,e,r)=>Cg(t,e,r)<=0;var ba=Ig;const xg=fh,kg=dh,Rg=gi,Mg=pa,Ag=da,Tg=ba,Ng=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return xg(t,r,n);case"!=":return kg(t,r,n);case">":return Rg(t,r,n);case">=":return Mg(t,r,n);case"<":return Ag(t,r,n);case"<=":return Tg(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var ph=Ng;const Og=Ae,Lg=Lr,{safeRe:An,t:Tn}=dn,jg=(t,e)=>{if(t instanceof Og)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(An[Tn.COERCE]);else{let n;for(;(n=An[Tn.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),An[Tn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;An[Tn.COERCERTL].lastIndex=-1}return r===null?null:Lg(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var $g=jg,ro,Zc;function Pg(){return Zc||(Zc=1,ro=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),ro}var Dg=Q;Q.Node=qt;Q.create=Q;function Q(t){var e=this;if(e instanceof Q||(e=new Q),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)e.push(arguments[r]);return e}Q.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};Q.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};Q.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};Q.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Bg(this,arguments[t]);return this.length};Q.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Vg(this,arguments[t]);return this.length};Q.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};Q.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};Q.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;r!==null;n++)t.call(e,r.value,n,this),r=r.next};Q.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;r!==null;n--)t.call(e,r.value,n,this),r=r.prev};Q.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};Q.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};Q.prototype.map=function(t,e){e=e||this;for(var r=new Q,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};Q.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Q,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};Q.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r};Q.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r};Q.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Q.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Q.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Q;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)r.push(i.value);return r};Q.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Q;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r};Q.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(var s=[],n=0;i&&n<e;n++)s.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=Fg(this,i,r[n]);return s};Q.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};function Fg(t,e,r){var n=e===t.head?new qt(r,null,e,t):new qt(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function Bg(t,e){t.tail=new qt(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Vg(t,e){t.head=new qt(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function qt(t,e,r,n){if(!(this instanceof qt))return new qt(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Pg()(Q)}catch{}const Hg=Dg,Ft=Symbol("max"),bt=Symbol("length"),rr=Symbol("lengthCalculator"),Gr=Symbol("allowStale"),Wt=Symbol("maxAge"),ft=Symbol("dispose"),Yc=Symbol("noDisposeOnSet"),ge=Symbol("lruList"),Qe=Symbol("cache"),bh=Symbol("updateAgeOnGet"),no=()=>1;class Wg{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[Ft]=e.max||1/0;const r=e.length||no;if(this[rr]=typeof r!="function"?no:r,this[Gr]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Wt]=e.maxAge||0,this[ft]=e.dispose,this[Yc]=e.noDisposeOnSet||!1,this[bh]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Ft]=e||1/0,Br(this)}get max(){return this[Ft]}set allowStale(e){this[Gr]=!!e}get allowStale(){return this[Gr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Wt]=e,Br(this)}get maxAge(){return this[Wt]}set lengthCalculator(e){typeof e!="function"&&(e=no),e!==this[rr]&&(this[rr]=e,this[bt]=0,this[ge].forEach(r=>{r.length=this[rr](r.value,r.key),this[bt]+=r.length})),Br(this)}get lengthCalculator(){return this[rr]}get length(){return this[bt]}get itemCount(){return this[ge].length}rforEach(e,r){r=r||this;for(let n=this[ge].tail;n!==null;){const i=n.prev;Kc(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[ge].head;n!==null;){const i=n.next;Kc(this,e,n,r),n=i}}keys(){return this[ge].toArray().map(e=>e.key)}values(){return this[ge].toArray().map(e=>e.value)}reset(){this[ft]&&this[ge]&&this[ge].length&&this[ge].forEach(e=>this[ft](e.key,e.value)),this[Qe]=new Map,this[ge]=new Hg,this[bt]=0}dump(){return this[ge].map(e=>qn(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ge]}set(e,r,n){if(n=n||this[Wt],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[rr](r,e);if(this[Qe].has(e)){if(s>this[Ft])return fr(this,this[Qe].get(e)),!1;const c=this[Qe].get(e).value;return this[ft]&&(this[Yc]||this[ft](e,c.value)),c.now=i,c.maxAge=n,c.value=r,this[bt]+=s-c.length,c.length=s,this.get(e),Br(this),!0}const o=new zg(e,r,s,i,n);return o.length>this[Ft]?(this[ft]&&this[ft](e,r),!1):(this[bt]+=o.length,this[ge].unshift(o),this[Qe].set(e,this[ge].head),Br(this),!0)}has(e){if(!this[Qe].has(e))return!1;const r=this[Qe].get(e).value;return!qn(this,r)}get(e){return io(this,e,!0)}peek(e){return io(this,e,!1)}pop(){const e=this[ge].tail;return e?(fr(this,e),e.value):null}del(e){fr(this,this[Qe].get(e))}load(e){this.reset();const r=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const o=s-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[Qe].forEach((e,r)=>io(this,r,!1))}}const io=(t,e,r)=>{const n=t[Qe].get(e);if(n){const i=n.value;if(qn(t,i)){if(fr(t,n),!t[Gr])return}else r&&(t[bh]&&(n.value.now=Date.now()),t[ge].unshiftNode(n));return i.value}},qn=(t,e)=>{if(!e||!e.maxAge&&!t[Wt])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Wt]&&r>t[Wt]},Br=t=>{if(t[bt]>t[Ft])for(let e=t[ge].tail;t[bt]>t[Ft]&&e!==null;){const r=e.prev;fr(t,e),e=r}},fr=(t,e)=>{if(e){const r=e.value;t[ft]&&t[ft](r.key,r.value),t[bt]-=r.length,t[Qe].delete(r.key),t[ge].removeNode(e)}};class zg{constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const Kc=(t,e,r,n)=>{let i=r.value;qn(t,i)&&(fr(t,r),t[Gr]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var Ug=Wg,so,Xc;function Xe(){if(Xc)return so;Xc=1;class t{constructor(y,k){if(k=n(k),y instanceof t)return y.loose===!!k.loose&&y.includePrerelease===!!k.includePrerelease?y:new t(y.raw,k);if(y instanceof i)return this.raw=y.value,this.set=[[y]],this.format(),this;if(this.options=k,this.loose=!!k.loose,this.includePrerelease=!!k.includePrerelease,this.raw=y.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(C=>this.parseRange(C.trim())).filter(C=>C.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const C=this.set[0];if(this.set=this.set.filter(T=>!p(T[0])),this.set.length===0)this.set=[C];else if(this.set.length>1){for(const T of this.set)if(T.length===1&&_(T[0])){this.set=[T];break}}}this.format()}format(){return this.range=this.set.map(y=>y.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(y){const C=((this.options.includePrerelease&&f)|(this.options.loose&&d))+":"+y,T=r.get(C);if(T)return T;const I=this.options.loose,$=I?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];y=y.replace($,le(this.options.includePrerelease)),s("hyphen replace",y),y=y.replace(a[c.COMPARATORTRIM],u),s("comparator trim",y),y=y.replace(a[c.TILDETRIM],l),s("tilde trim",y),y=y.replace(a[c.CARETTRIM],h),s("caret trim",y);let G=y.split(" ").map(ne=>b(ne,this.options)).join(" ").split(/\s+/).map(ne=>H(ne,this.options));I&&(G=G.filter(ne=>(s("loose invalid filter",ne,this.options),!!ne.match(a[c.COMPARATORLOOSE])))),s("range list",G);const D=new Map,X=G.map(ne=>new i(ne,this.options));for(const ne of X){if(p(ne))return[ne];D.set(ne.value,ne)}D.size>1&&D.has("")&&D.delete("");const Se=[...D.values()];return r.set(C,Se),Se}intersects(y,k){if(!(y instanceof t))throw new TypeError("a Range is required");return this.set.some(C=>v(C,k)&&y.set.some(T=>v(T,k)&&C.every(I=>T.every($=>I.intersects($,k)))))}test(y){if(!y)return!1;if(typeof y=="string")try{y=new o(y,this.options)}catch{return!1}for(let k=0;k<this.set.length;k++)if(q(this.set[k],y,this.options))return!0;return!1}}so=t;const e=Ug,r=new e({max:1e3}),n=ha,i=mi(),s=bi,o=Ae,{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:h}=dn,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=pi,p=S=>S.value==="<0.0.0-0",_=S=>S.value==="",v=(S,y)=>{let k=!0;const C=S.slice();let T=C.pop();for(;k&&C.length;)k=C.every(I=>T.intersects(I,y)),T=C.pop();return k},b=(S,y)=>(s("comp",S,y),S=E(S,y),s("caret",S),S=w(S,y),s("tildes",S),S=z(S,y),s("xrange",S),S=O(S,y),s("stars",S),S),m=S=>!S||S.toLowerCase()==="x"||S==="*",w=(S,y)=>S.trim().split(/\s+/).map(k=>M(k,y)).join(" "),M=(S,y)=>{const k=y.loose?a[c.TILDELOOSE]:a[c.TILDE];return S.replace(k,(C,T,I,$,G)=>{s("tilde",S,C,T,I,$,G);let D;return m(T)?D="":m(I)?D=`>=${T}.0.0 <${+T+1}.0.0-0`:m($)?D=`>=${T}.${I}.0 <${T}.${+I+1}.0-0`:G?(s("replaceTilde pr",G),D=`>=${T}.${I}.${$}-${G} <${T}.${+I+1}.0-0`):D=`>=${T}.${I}.${$} <${T}.${+I+1}.0-0`,s("tilde return",D),D})},E=(S,y)=>S.trim().split(/\s+/).map(k=>N(k,y)).join(" "),N=(S,y)=>{s("caret",S,y);const k=y.loose?a[c.CARETLOOSE]:a[c.CARET],C=y.includePrerelease?"-0":"";return S.replace(k,(T,I,$,G,D)=>{s("caret",S,T,I,$,G,D);let X;return m(I)?X="":m($)?X=`>=${I}.0.0${C} <${+I+1}.0.0-0`:m(G)?I==="0"?X=`>=${I}.${$}.0${C} <${I}.${+$+1}.0-0`:X=`>=${I}.${$}.0${C} <${+I+1}.0.0-0`:D?(s("replaceCaret pr",D),I==="0"?$==="0"?X=`>=${I}.${$}.${G}-${D} <${I}.${$}.${+G+1}-0`:X=`>=${I}.${$}.${G}-${D} <${I}.${+$+1}.0-0`:X=`>=${I}.${$}.${G}-${D} <${+I+1}.0.0-0`):(s("no pr"),I==="0"?$==="0"?X=`>=${I}.${$}.${G}${C} <${I}.${$}.${+G+1}-0`:X=`>=${I}.${$}.${G}${C} <${I}.${+$+1}.0-0`:X=`>=${I}.${$}.${G} <${+I+1}.0.0-0`),s("caret return",X),X})},z=(S,y)=>(s("replaceXRanges",S,y),S.split(/\s+/).map(k=>te(k,y)).join(" ")),te=(S,y)=>{S=S.trim();const k=y.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return S.replace(k,(C,T,I,$,G,D)=>{s("xRange",S,C,T,I,$,G,D);const X=m(I),Se=X||m($),ne=Se||m(G),wt=ne;return T==="="&&wt&&(T=""),D=y.includePrerelease?"-0":"",X?T===">"||T==="<"?C="<0.0.0-0":C="*":T&&wt?(Se&&($=0),G=0,T===">"?(T=">=",Se?(I=+I+1,$=0,G=0):($=+$+1,G=0)):T==="<="&&(T="<",Se?I=+I+1:$=+$+1),T==="<"&&(D="-0"),C=`${T+I}.${$}.${G}${D}`):Se?C=`>=${I}.0.0${D} <${+I+1}.0.0-0`:ne&&(C=`>=${I}.${$}.0${D} <${I}.${+$+1}.0-0`),s("xRange return",C),C})},O=(S,y)=>(s("replaceStars",S,y),S.trim().replace(a[c.STAR],"")),H=(S,y)=>(s("replaceGTE0",S,y),S.trim().replace(a[y.includePrerelease?c.GTE0PRE:c.GTE0],"")),le=S=>(y,k,C,T,I,$,G,D,X,Se,ne,wt,Xi)=>(m(C)?k="":m(T)?k=`>=${C}.0.0${S?"-0":""}`:m(I)?k=`>=${C}.${T}.0${S?"-0":""}`:$?k=`>=${k}`:k=`>=${k}${S?"-0":""}`,m(X)?D="":m(Se)?D=`<${+X+1}.0.0-0`:m(ne)?D=`<${X}.${+Se+1}.0-0`:wt?D=`<=${X}.${Se}.${ne}-${wt}`:S?D=`<${X}.${Se}.${+ne+1}-0`:D=`<=${D}`,`${k} ${D}`.trim()),q=(S,y,k)=>{for(let C=0;C<S.length;C++)if(!S[C].test(y))return!1;if(y.prerelease.length&&!k.includePrerelease){for(let C=0;C<S.length;C++)if(s(S[C].semver),S[C].semver!==i.ANY&&S[C].semver.prerelease.length>0){const T=S[C].semver;if(T.major===y.major&&T.minor===y.minor&&T.patch===y.patch)return!0}return!1}return!0};return so}var oo,eu;function mi(){if(eu)return oo;eu=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(l,h){if(h=r(h),l instanceof e){if(l.loose===!!h.loose)return l;l=l.value}l=l.trim().split(/\s+/).join(" "),o("comparator",l,h),this.options=h,this.loose=!!h.loose,this.parse(l),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(l){const h=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],f=l.match(h);if(!f)throw new TypeError(`Invalid comparator: ${l}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new a(f[2],this.options.loose):this.semver=t}toString(){return this.value}test(l){if(o("Comparator.test",l,this.options.loose),this.semver===t||l===t)return!0;if(typeof l=="string")try{l=new a(l,this.options)}catch{return!1}return s(l,this.operator,this.semver,this.options)}intersects(l,h){if(!(l instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(l.value,h).test(this.value):l.operator===""?l.value===""?!0:new c(this.value,h).test(l.semver):(h=r(h),h.includePrerelease&&(this.value==="<0.0.0-0"||l.value==="<0.0.0-0")||!h.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||s(this.semver,"<",l.semver,h)&&this.operator.startsWith(">")&&l.operator.startsWith("<")||s(this.semver,">",l.semver,h)&&this.operator.startsWith("<")&&l.operator.startsWith(">")))}}oo=e;const r=ha,{safeRe:n,t:i}=dn,s=ph,o=bi,a=Ae,c=Xe();return oo}const qg=Xe(),Gg=(t,e,r)=>{try{e=new qg(e,r)}catch{return!1}return e.test(t)};var vi=Gg;const Jg=Xe(),Qg=(t,e)=>new Jg(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Zg=Qg;const Yg=Ae,Kg=Xe(),Xg=(t,e,r)=>{let n=null,i=null,s=null;try{s=new Kg(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Yg(n,r))}),n};var em=Xg;const tm=Ae,rm=Xe(),nm=(t,e,r)=>{let n=null,i=null,s=null;try{s=new rm(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new tm(n,r))}),n};var im=nm;const ao=Ae,sm=Xe(),tu=gi,om=(t,e)=>{t=new sm(t,e);let r=new ao("0.0.0");if(t.test(r)||(r=new ao("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){const i=t.set[n];let s=null;i.forEach(o=>{const a=new ao(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||tu(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||tu(r,s))&&(r=s)}return r&&t.test(r)?r:null};var am=om;const cm=Xe(),um=(t,e)=>{try{return new cm(t,e).range||"*"}catch{return null}};var lm=um;const hm=Ae,gh=mi(),{ANY:fm}=gh,dm=Xe(),pm=vi,ru=gi,nu=da,bm=ba,gm=pa,mm=(t,e,r,n)=>{t=new hm(t,n),e=new dm(e,n);let i,s,o,a,c;switch(r){case">":i=ru,s=bm,o=nu,a=">",c=">=";break;case"<":i=nu,s=gm,o=ru,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(pm(t,e,n))return!1;for(let u=0;u<e.set.length;++u){const l=e.set[u];let h=null,f=null;if(l.forEach(d=>{d.semver===fm&&(d=new gh(">=0.0.0")),h=h||d,f=f||d,i(d.semver,h.semver,n)?h=d:o(d.semver,f.semver,n)&&(f=d)}),h.operator===a||h.operator===c||(!f.operator||f.operator===a)&&s(t,f.semver))return!1;if(f.operator===c&&o(t,f.semver))return!1}return!0};var ga=mm;const vm=ga,ym=(t,e,r)=>vm(t,e,">",r);var _m=ym;const wm=ga,Sm=(t,e,r)=>wm(t,e,"<",r);var Em=Sm;const iu=Xe(),Cm=(t,e,r)=>(t=new iu(t,r),e=new iu(e,r),t.intersects(e,r));var Im=Cm;const xm=vi,km=Ke;var Rm=(t,e,r)=>{const n=[];let i=null,s=null;const o=t.sort((l,h)=>km(l,h,r));for(const l of o)xm(l,e,r)?(s=l,i||(i=l)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const a=[];for(const[l,h]of n)l===h?a.push(l):!h&&l===o[0]?a.push("*"):h?l===o[0]?a.push(`<=${h}`):a.push(`${l} - ${h}`):a.push(`>=${l}`);const c=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return c.length<u.length?c:e};const su=Xe(),ma=mi(),{ANY:co}=ma,Vr=vi,va=Ke,Mm=(t,e,r={})=>{if(t===e)return!0;t=new su(t,r),e=new su(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const o=Tm(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Am=[new ma(">=0.0.0-0")],ou=[new ma(">=0.0.0")],Tm=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===co){if(e.length===1&&e[0].semver===co)return!0;r.includePrerelease?t=Am:t=ou}if(e.length===1&&e[0].semver===co){if(r.includePrerelease)return!0;e=ou}const n=new Set;let i,s;for(const d of t)d.operator===">"||d.operator===">="?i=au(i,d,r):d.operator==="<"||d.operator==="<="?s=cu(s,d,r):n.add(d.semver);if(n.size>1)return null;let o;if(i&&s){if(o=va(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const d of n){if(i&&!Vr(d,String(i),r)||s&&!Vr(d,String(s),r))return null;for(const p of e)if(!Vr(d,String(p),r))return!1;return!0}let a,c,u,l,h=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;h&&h.prerelease.length===1&&s.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(const d of e){if(l=l||d.operator===">"||d.operator===">=",u=u||d.operator==="<"||d.operator==="<=",i){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator===">"||d.operator===">="){if(a=au(i,d,r),a===d&&a!==i)return!1}else if(i.operator===">="&&!Vr(i.semver,String(d),r))return!1}if(s){if(h&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===h.major&&d.semver.minor===h.minor&&d.semver.patch===h.patch&&(h=!1),d.operator==="<"||d.operator==="<="){if(c=cu(s,d,r),c===d&&c!==s)return!1}else if(s.operator==="<="&&!Vr(s.semver,String(d),r))return!1}if(!d.operator&&(s||i)&&o!==0)return!1}return!(i&&u&&!s&&o!==0||s&&l&&!i&&o!==0||f||h)},au=(t,e,r)=>{if(!t)return e;const n=va(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},cu=(t,e,r)=>{if(!t)return e;const n=va(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var Nm=Mm;const uo=dn,uu=pi,Om=Ae,lu=hh,Lm=Lr,jm=Lb,$m=Pb,Pm=Fb,Dm=Vb,Fm=zb,Bm=Gb,Vm=Zb,Hm=Xb,Wm=Ke,zm=ng,Um=og,qm=fa,Gm=lg,Jm=dg,Qm=gi,Zm=da,Ym=fh,Km=dh,Xm=pa,e1=ba,t1=ph,r1=$g,n1=mi(),i1=Xe(),s1=vi,o1=Zg,a1=em,c1=im,u1=am,l1=lm,h1=ga,f1=_m,d1=Em,p1=Im,b1=Rm,g1=Nm;var m1={parse:Lm,valid:jm,clean:$m,inc:Pm,diff:Dm,major:Fm,minor:Bm,patch:Vm,prerelease:Hm,compare:Wm,rcompare:zm,compareLoose:Um,compareBuild:qm,sort:Gm,rsort:Jm,gt:Qm,lt:Zm,eq:Ym,neq:Km,gte:Xm,lte:e1,cmp:t1,coerce:r1,Comparator:n1,Range:i1,satisfies:s1,toComparators:o1,maxSatisfying:a1,minSatisfying:c1,minVersion:u1,validRange:l1,outside:h1,gtr:f1,ltr:d1,intersects:p1,simplifyRange:b1,subset:g1,SemVer:Om,re:uo.re,src:uo.src,tokens:uo.t,SEMVER_SPEC_VERSION:uu.SEMVER_SPEC_VERSION,RELEASE_TYPES:uu.RELEASE_TYPES,compareIdentifiers:lu.compareIdentifiers,rcompareIdentifiers:lu.rcompareIdentifiers};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const e=m1,r=Kt,n=we;t.VersionStruct=(0,r.refine)((0,r.string)(),"Version",h=>(0,e.valid)(h)===null?`Expected SemVer version, got "${h}"`:!0),t.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",h=>(0,e.validRange)(h)===null?`Expected SemVer range, got "${h}"`:!0);function i(h){return(0,r.is)(h,t.VersionStruct)}t.isValidSemVerVersion=i;function s(h){return(0,r.is)(h,t.VersionRangeStruct)}t.isValidSemVerRange=s;function o(h){(0,n.assertStruct)(h,t.VersionStruct)}t.assertIsSemVerVersion=o;function a(h){(0,n.assertStruct)(h,t.VersionRangeStruct)}t.assertIsSemVerRange=a;function c(h,f){return(0,e.gt)(h,f)}t.gtVersion=c;function u(h,f){return(0,e.gtr)(h,f)}t.gtRange=u;function l(h,f){return(0,e.satisfies)(h,f,{includePrerelease:!0})}t.satisfiesVersionRange=l})(ch);(function(t){var e=A&&A.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,o,a)}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=A&&A.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(we,t),r(hn,t),r(J,t),r(fi,t),r(at,t),r(mr,t),r(fn,t),r(sh,t),r(vr,t),r(la,t),r(ct,t),r(oh,t),r(ah,t),r(ch,t)})(Bl);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const e=Bl;Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),t.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")})(Fl);var mh=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(li,"__esModule",{value:!0});li.PollingBlockTracker=void 0;const v1=mh(ea),y1=mh(Bp),_1=un,hu=Fl,fu=(0,hu.createModuleLogger)(hu.projectLogger,"polling-block-tracker"),w1=(0,v1.default)(),S1=1e3;class E1 extends _1.BaseBlockTracker{constructor(e={}){var r;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super({blockResetDuration:(r=e.blockResetDuration)!==null&&r!==void 0?r:e.pollingInterval}),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*S1,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const r=du(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
|
|
2
2
|
${(e=r.stack)!==null&&e!==void 0?e:r}`);try{this.emit("error",n)}catch{console.error(n)}const i=du(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:w1(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),fu("Making request",e);const r=await(0,y1.default)(n=>this._provider.sendAsync(e,n))();if(fu("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
|
|
3
3
|
${r.error.message}`);return r.result}}li.PollingBlockTracker=E1;function du(t,e){return new Promise(r=>{const n=setTimeout(r,t);n.unref&&e&&n.unref()})}var yi={},C1=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yi,"__esModule",{value:!0});yi.SubscribeBlockTracker=void 0;const I1=C1(ea),x1=un,k1=(0,I1.default)();class R1 extends x1.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}_call(e,...r){return new Promise((n,i)=>{this._provider.sendAsync({id:k1(),method:e,params:r,jsonrpc:"2.0"},(s,o)=>{s?i(s):n(o.result)})})}_handleSubData(e,r){var n;r.method==="eth_subscription"&&((n=r.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(r.params.result.number)}}yi.SubscribeBlockTracker=R1;var vh={};Object.defineProperty(vh,"__esModule",{value:!0});(function(t){var e=A&&A.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=A&&A.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(li,t),r(yi,t),r(vh,t)})(Dl);var ya={},_i={},pn={};Object.defineProperty(pn,"__esModule",{value:!0});pn.getUniqueId=void 0;const yh=4294967295;let lo=Math.floor(Math.random()*yh);function M1(){return lo=(lo+1)%yh,lo}pn.getUniqueId=M1;Object.defineProperty(_i,"__esModule",{value:!0});_i.createIdRemapMiddleware=void 0;const A1=pn;function T1(){return(t,e,r,n)=>{const i=t.id,s=A1.getUniqueId();t.id=s,e.id=s,r(o=>{t.id=i,e.id=i,o()})}}_i.createIdRemapMiddleware=T1;var wi={};Object.defineProperty(wi,"__esModule",{value:!0});wi.createAsyncMiddleware=void 0;function N1(t){return async(e,r,n,i)=>{let s;const o=new Promise(l=>{s=l});let a=null,c=!1;const u=async()=>{c=!0,n(l=>{a=l,s()}),await o};try{await t(e,r,u),c?(await o,a(null)):i(null)}catch(l){a?a(l):i(l)}}}wi.createAsyncMiddleware=N1;var Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.createScaffoldMiddleware=void 0;function O1(t){return(e,r,n,i)=>{const s=t[e.method];return s===void 0?n():typeof s=="function"?s(e,r,n,i):(r.result=s,i())}}Si.createScaffoldMiddleware=O1;var bn={},L1=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bn,"__esModule",{value:!0});bn.JsonRpcEngine=void 0;const j1=L1(Qt),De=Jo;class dt extends j1.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?r?this._handleBatch(e,r):this._handleBatch(e):r?this._handle(e,r):this._promiseHandle(e)}asMiddleware(){return async(e,r,n,i)=>{try{const[s,o,a]=await dt._runAllMiddleware(e,r,this._middleware);return o?(await dt._runReturnHandlers(a),i(s)):n(async c=>{try{await dt._runReturnHandlers(a)}catch(u){return c(u)}return c()})}catch(s){return i(s)}}}async _handleBatch(e,r){try{const n=await Promise.all(e.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(e){return new Promise(r=>{this._handle(e,(n,i)=>{r(i)})})}async _handle(e,r){if(!e||Array.isArray(e)||typeof e!="object"){const o=new De.EthereumRpcError(De.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof e}`,{request:e});return r(o,{id:void 0,jsonrpc:"2.0",error:o})}if(typeof e.method!="string"){const o=new De.EthereumRpcError(De.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof e.method}`,{request:e});return r(o,{id:e.id,jsonrpc:"2.0",error:o})}const n=Object.assign({},e),i={id:n.id,jsonrpc:n.jsonrpc};let s=null;try{await this._processRequest(n,i)}catch(o){s=o}return s&&(delete i.result,i.error||(i.error=De.serializeError(s))),r(s,i)}async _processRequest(e,r){const[n,i,s]=await dt._runAllMiddleware(e,r,this._middleware);if(dt._checkForCompletion(e,r,i),await dt._runReturnHandlers(s),n)throw n}static async _runAllMiddleware(e,r,n){const i=[];let s=null,o=!1;for(const a of n)if([s,o]=await dt._runMiddleware(e,r,a,i),o)break;return[s,o,i.reverse()]}static _runMiddleware(e,r,n,i){return new Promise(s=>{const o=c=>{const u=c||r.error;u&&(r.error=De.serializeError(u)),s([u,!0])},a=c=>{r.error?o(r.error):(c&&(typeof c!="function"&&o(new De.EthereumRpcError(De.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof c}" for request:
|
|
4
4
|
${ho(e)}`,{request:e})),i.push(c)),s([null,!1]))};try{n(e,r,a,o)}catch(c){o(c)}})}static async _runReturnHandlers(e){for(const r of e)await new Promise((n,i)=>{r(s=>s?i(s):n())})}static _checkForCompletion(e,r,n){if(!("result"in r)&&!("error"in r))throw new De.EthereumRpcError(De.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:
|