@dcl/auth-site 1.7.3 → 1.7.4-12754855196.commit-288d488
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/{fortmatic-deb2ea20.js → fortmatic-0f27d695.js} +2 -2
- package/assets/{fortmatic-deb2ea20.js.map → fortmatic-0f27d695.js.map} +1 -1
- package/assets/{index-e5140c4e.js → index-073df86f.js} +2 -2
- package/assets/{index-e5140c4e.js.map → index-073df86f.js.map} +1 -1
- package/assets/{index-9d61124b.js → index-2e8db189.js} +2 -2
- package/assets/{index-9d61124b.js.map → index-2e8db189.js.map} +1 -1
- package/assets/{index-4ec61dd4.js → index-39542650.js} +10 -10
- package/assets/{index-4ec61dd4.js.map → index-39542650.js.map} +1 -1
- package/assets/{index-010ff57c.js → index-562187c6.js} +2 -2
- package/assets/{index-010ff57c.js.map → index-562187c6.js.map} +1 -1
- package/assets/{index-bea84501.js → index-628544c1.js} +2 -2
- package/assets/{index-bea84501.js.map → index-628544c1.js.map} +1 -1
- package/assets/{index-e3b45a4a.js → index-6b7e28d2.js} +2 -2
- package/assets/{index-e3b45a4a.js.map → index-6b7e28d2.js.map} +1 -1
- package/assets/{index-f46972c7.js → index-6c0f4072.js} +2 -2
- package/assets/{index-f46972c7.js.map → index-6c0f4072.js.map} +1 -1
- package/assets/{index-680f56c6.css → index-8d58d025.css} +3 -3
- package/assets/{index.es-1ae0931f.js → index.es-8bd8340a.js} +3 -3
- package/assets/{index.es-1ae0931f.js.map → index.es-8bd8340a.js.map} +1 -1
- package/index.html +2 -2
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as md,s as yd,c as A,t as ni,l as V,v as vd,w as cl,b as kr,p as Mo,x as ii,a as _d}from"./index-4ec61dd4.js";import{_ as m}from"./tslib.es6-c2094241.js";function wd(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 Zo={},Kr={},si={};Object.defineProperty(si,"__esModule",{value:!0});si.walletLogo=void 0;const Sd=(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 `}};si.walletLogo=Sd;var oi={};Object.defineProperty(oi,"__esModule",{value:!0});oi.LINK_API_URL=void 0;oi.LINK_API_URL="https://www.walletlink.org";var ai={};Object.defineProperty(ai,"__esModule",{value:!0});ai.ScopedLocalStorage=void 0;class Ed{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}`}}ai.ScopedLocalStorage=Ed;var br={},Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});const Cd=md;function Sc(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function Id(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}let xd=class extends Cd.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")Sc(s,this,r);else{const o=s.length,a=Id(s);for(let c=0;c<o;c+=1)Sc(a[c],this,r)}return!0}};Qt.default=xd;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.EVENTS=void 0;Mr.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 on={},Yo={},kt={},Rd=Xr;Xr.default=Xr;Xr.stable=hl;Xr.stableStringify=hl;var zn="[...]",ul="[Circular]",zt=[],Vt=[];function ll(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Xr(t,e,r,n){typeof n>"u"&&(n=ll()),Ao(t,"",0,[],void 0,0,n);var i;try{Vt.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,fl(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 Ao(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(ul,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++)Ao(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];Ao(t[u],u,a,n,t,s,o)}}n.pop()}}function kd(t,e){return t<e?-1:t>e?1:0}function hl(t,e,r,n){typeof n>"u"&&(n=ll());var i=To(t,"",0,[],void 0,0,n)||t,s;try{Vt.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,fl(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 To(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(ul,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++)To(t[a],a,a,n,t,s,o);else{var c={},u=Object.keys(t).sort(kd);for(a=0;a<u.length;a++){var l=u[a];To(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 fl(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(kt,"__esModule",{value:!0});kt.EthereumProviderError=kt.EthereumRpcError=void 0;const Md=Rd;class dl 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 Md.default(this.serialize(),Nd,2)}}kt.EthereumRpcError=dl;class Ad extends dl{constructor(e,r,n){if(!Td(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}}kt.EthereumProviderError=Ad;function Td(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function Nd(t,e){if(e!=="[Circular]")return e}var Ko={},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=kt,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 g,w;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 S=f;b.code=S.code,S.message&&typeof S.message=="string"?(b.message=S.message,h(S,"data")&&(b.data=S.data)):(b.message=o(b.code),b.data={originalError:l(f)})}else{b.code=d.code;const S=(g=f)===null||g===void 0?void 0:g.message;b.message=S&&typeof S=="string"?S:d.message,b.data={originalError:l(f)}}const y=(w=f)===null||w===void 0?void 0:w.stack;return p&&f&&y&&typeof y=="string"&&(b.stack=y),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)}})(Ko);var ci={};Object.defineProperty(ci,"__esModule",{value:!0});ci.ethErrors=void 0;const Xo=kt,pl=Ko,Ee=Mt;ci.ethErrors={rpc:{parse:t=>$e(Ee.errorCodes.rpc.parse,t),invalidRequest:t=>$e(Ee.errorCodes.rpc.invalidRequest,t),invalidParams:t=>$e(Ee.errorCodes.rpc.invalidParams,t),methodNotFound:t=>$e(Ee.errorCodes.rpc.methodNotFound,t),internal:t=>$e(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 $e(e,t)},invalidInput:t=>$e(Ee.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>$e(Ee.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>$e(Ee.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>$e(Ee.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>$e(Ee.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>$e(Ee.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Br(Ee.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>Br(Ee.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>Br(Ee.errorCodes.provider.unsupportedMethod,t),disconnected:t=>Br(Ee.errorCodes.provider.disconnected,t),chainDisconnected:t=>Br(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 Xo.EthereumProviderError(e,r,n)}}};function $e(t,e){const[r,n]=bl(e);return new Xo.EthereumRpcError(t,r||pl.getMessageFromCode(t),n)}function Br(t,e){const[r,n]=bl(e);return new Xo.EthereumProviderError(t,r||pl.getMessageFromCode(t),n)}function bl(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=kt;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=Ko;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=ci;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}})})(Yo);var te={},ui={};(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={}))})(ui);Object.defineProperty(te,"__esModule",{value:!0});te.EthereumAddressFromSignedMessageResponse=te.SubmitEthereumTransactionResponse=te.SignEthereumTransactionResponse=te.SignEthereumMessageResponse=te.isRequestEthereumAccountsResponse=te.SelectProviderResponse=te.WatchAssetReponse=te.RequestEthereumAccountsResponse=te.SwitchEthereumChainResponse=te.AddEthereumChainResponse=te.isErrorResponse=void 0;const ht=ui;function Od(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}te.isErrorResponse=Od;function Ld(t){return{method:ht.Web3Method.addEthereumChain,result:t}}te.AddEthereumChainResponse=Ld;function jd(t){return{method:ht.Web3Method.switchEthereumChain,result:t}}te.SwitchEthereumChainResponse=jd;function Pd(t){return{method:ht.Web3Method.requestEthereumAccounts,result:t}}te.RequestEthereumAccountsResponse=Pd;function $d(t){return{method:ht.Web3Method.watchAsset,result:t}}te.WatchAssetReponse=$d;function Dd(t){return{method:ht.Web3Method.selectProvider,result:t}}te.SelectProviderResponse=Dd;function Fd(t){return t&&t.method===ht.Web3Method.requestEthereumAccounts}te.isRequestEthereumAccountsResponse=Fd;function Bd(t){return{method:ht.Web3Method.signEthereumMessage,result:t}}te.SignEthereumMessageResponse=Bd;function Vd(t){return{method:ht.Web3Method.signEthereumTransaction,result:t}}te.SignEthereumTransactionResponse=Vd;function Hd(t){return{method:ht.Web3Method.submitEthereumTransaction,result:t}}te.SubmitEthereumTransactionResponse=Hd;function Wd(t){return{method:ht.Web3Method.ethereumAddressFromSignedMessage,result:t}}te.EthereumAddressFromSignedMessageResponse=Wd;var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.LIB_VERSION=void 0;Ar.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=Yo,r=te,n=Ar;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")}})(on);var Tr={},R={},zd=String.prototype.replace,Ud=/%20/g,eo={RFC1738:"RFC1738",RFC3986:"RFC3986"},ea={default:eo.RFC3986,formatters:{RFC1738:function(t){return zd.call(t,Ud,"+")},RFC3986:function(t){return String(t)}},RFC1738:eo.RFC1738,RFC3986:eo.RFC3986},qd=ea,to=Object.prototype.hasOwnProperty,Pt=Array.isArray,et=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Gd=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Pt(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},gl=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},Jd=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(Pt(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!to.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 Pt(e)&&!Pt(r)&&(i=gl(e,n)),Pt(e)&&Pt(r)?(r.forEach(function(s,o){if(to.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 to.call(s,o)?s[o]=t(s[o],a,n):s[o]=a,s},i)},Qd=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},Zd=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}},Yd=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===qd.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},Kd=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 Gd(r),e},Xd=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},ep=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},tp=function(e,r){return[].concat(e,r)},rp=function(e,r){if(Pt(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},ml={arrayToObject:gl,assign:Qd,combine:tp,compact:Kd,decode:Zd,encode:Yd,isBuffer:ep,isRegExp:Xd,maybeMap:rp,merge:Jd},yl=yd,Fn=ml,qr=ea,np=Object.prototype.hasOwnProperty,Ec={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},pt=Array.isArray,ip=Array.prototype.push,vl=function(t,e){ip.apply(t,pt(e)?e:[e])},sp=Date.prototype.toISOString,Cc=qr.default,Ie={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Fn.encode,encodeValuesOnly:!1,format:Cc,formatter:qr.formatters[Cc],indices:!1,serializeDate:function(e){return sp.call(e)},skipNulls:!1,strictNullHandling:!1},op=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},ro={},ap=function t(e,r,n,i,s,o,a,c,u,l,h,f,d,p,g,w){for(var b=e,y=w,S=0,C=!1;(y=y.get(ro))!==void 0&&!C;){var v=y.get(e);if(S+=1,typeof v<"u"){if(v===S)throw new RangeError("Cyclic object value");C=!0}typeof y.get(ro)>"u"&&(S=0)}if(typeof c=="function"?b=c(r,b):b instanceof Date?b=h(b):n==="comma"&&pt(b)&&(b=Fn.maybeMap(b,function(I){return I instanceof Date?h(I):I})),b===null){if(s)return a&&!p?a(r,Ie.encoder,g,"key",f):r;b=""}if(op(b)||Fn.isBuffer(b)){if(a){var T=p?r:a(r,Ie.encoder,g,"key",f);return[d(T)+"="+d(a(b,Ie.encoder,g,"value",f))]}return[d(r)+"="+d(String(b))]}var D=[];if(typeof b>"u")return D;var Y;if(n==="comma"&&pt(b))p&&a&&(b=Fn.maybeMap(b,a)),Y=[{value:b.length>0?b.join(",")||null:void 0}];else if(pt(c))Y=c;else{var O=Object.keys(b);Y=u?O.sort(u):O}for(var W=i&&pt(b)&&b.length===1?r+"[]":r,le=0;le<Y.length;++le){var q=Y[le],E=typeof q=="object"&&typeof q.value<"u"?q.value:b[q];if(!(o&&E===null)){var _=pt(b)?typeof n=="function"?n(W,q):W:W+(l?"."+q:"["+q+"]");w.set(e,S);var k=yl();k.set(ro,w),vl(D,t(E,_,n,i,s,o,n==="comma"&&p&&pt(b)?null:a,c,u,l,h,f,d,p,g,k))}}return D},cp=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=qr.default;if(typeof e.format<"u"){if(!np.call(qr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=qr.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}},up=function(t,e){var r=t,n=cp(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 Ec?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var c=Ec[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=yl(),h=0;h<i.length;++h){var f=i[h];n.skipNulls&&r[f]===null||vl(o,ap(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:""},gr=ml,No=Object.prototype.hasOwnProperty,lp=Array.isArray,be={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:gr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},hp=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},_l=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},fp="utf8=%26%2310003%3B",dp="utf8=%E2%9C%93",pp=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]===dp?u="utf-8":o[c]===fp&&(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=gr.maybeMap(_l(l.slice(f+1),r),function(g){return r.decoder(g,be.decoder,u,"value")})),p&&r.interpretNumericEntities&&u==="iso-8859-1"&&(p=hp(p)),l.indexOf("[]=")>-1&&(p=lp(p)?[p]:p),No.call(n,d)?n[d]=gr.combine(n[d],p):n[d]=p}return n},bp=function(t,e,r,n){for(var i=n?e:_l(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},gp=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&&No.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&&No.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+s.slice(c.index)+"]"),bp(l,r,n,i)}},mp=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"||gr.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}},yp=function(t,e){var r=mp(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?pp(t,r):t,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;o<s.length;++o){var a=s[o],c=gp(a,n[a],r,typeof t=="string");i=gr.merge(i,c,r)}return r.allowSparse===!0?i:gr.compact(i)},vp=up,_p=yp,wp=ea,Sp={formats:wp,parse:_p,stringify:vp},an={};(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={}))})(an);var Ep=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R,"__esModule",{value:!0});R.isInIFrame=R.createQrUrl=R.getFavicon=R.range=R.isBigNumber=R.ensureParsedJSONObject=R.ensureBN=R.ensureRegExpString=R.ensureIntNumber=R.ensureBuffer=R.ensureAddressString=R.ensureEvenLengthHexString=R.ensureHexString=R.isHexString=R.prepend0x=R.strip0x=R.has0xPrefix=R.hexStringFromIntNumber=R.intNumberFromHexString=R.bigIntStringFromBN=R.hexStringFromBuffer=R.hexStringToUint8Array=R.uint8ArrayToHex=R.randomBytesHex=void 0;const It=Ep(ni),Cp=Sp,Zt=on,We=an,wl=/^[0-9]*$/,Sl=/^[a-f0-9]*$/;function Ip(t){return El(crypto.getRandomValues(new Uint8Array(t)))}R.randomBytesHex=Ip;function El(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}R.uint8ArrayToHex=El;function xp(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}R.hexStringToUint8Array=xp;function Rp(t,e=!1){const r=t.toString("hex");return(0,We.HexString)(e?"0x"+r:r)}R.hexStringFromBuffer=Rp;function kp(t){return(0,We.BigIntString)(t.toString(10))}R.bigIntStringFromBN=kp;function Mp(t){return(0,We.IntNumber)(new It.default(un(t,!1),16).toNumber())}R.intNumberFromHexString=Mp;function Ap(t){return(0,We.HexString)("0x"+new It.default(t).toString(16))}R.hexStringFromIntNumber=Ap;function ta(t){return t.startsWith("0x")||t.startsWith("0X")}R.has0xPrefix=ta;function li(t){return ta(t)?t.slice(2):t}R.strip0x=li;function Cl(t){return ta(t)?"0x"+t.slice(2):"0x"+t}R.prepend0x=Cl;function cn(t){if(typeof t!="string")return!1;const e=li(t).toLowerCase();return Sl.test(e)}R.isHexString=cn;function Il(t,e=!1){if(typeof t=="string"){const r=li(t).toLowerCase();if(Sl.test(r))return(0,We.HexString)(e?"0x"+r:r)}throw Zt.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}R.ensureHexString=Il;function un(t,e=!1){let r=Il(t,!1);return r.length%2===1&&(r=(0,We.HexString)("0"+r)),e?(0,We.HexString)("0x"+r):r}R.ensureEvenLengthHexString=un;function Tp(t){if(typeof t=="string"){const e=li(t).toLowerCase();if(cn(e)&&e.length===40)return(0,We.AddressString)(Cl(e))}throw Zt.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}R.ensureAddressString=Tp;function Np(t){if(V.isBuffer(t))return t;if(typeof t=="string")if(cn(t)){const e=un(t,!1);return V.from(e,"hex")}else return V.from(t,"utf8");throw Zt.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}R.ensureBuffer=Np;function xl(t){if(typeof t=="number"&&Number.isInteger(t))return(0,We.IntNumber)(t);if(typeof t=="string"){if(wl.test(t))return(0,We.IntNumber)(Number(t));if(cn(t))return(0,We.IntNumber)(new It.default(un(t,!1),16).toNumber())}throw Zt.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}R.ensureIntNumber=xl;function Op(t){if(t instanceof RegExp)return(0,We.RegExpString)(t.toString());throw Zt.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}R.ensureRegExpString=Op;function Lp(t){if(t!==null&&(It.default.isBN(t)||Rl(t)))return new It.default(t.toString(10),10);if(typeof t=="number")return new It.default(xl(t));if(typeof t=="string"){if(wl.test(t))return new It.default(t,10);if(cn(t))return new It.default(un(t,!1),16)}throw Zt.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}R.ensureBN=Lp;function jp(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)}`)}R.ensureParsedJSONObject=jp;function Rl(t){if(t==null||typeof t.constructor!="function")return!1;const{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}R.isBigNumber=Rl;function Pp(t,e){return Array.from({length:e-t},(r,n)=>t+n)}R.range=Pp;function $p(){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}`}R.getFavicon=$p;function Dp(t,e,r,n,i,s){const o=n?"parent-id":"id",a=(0,Cp.stringify)({[o]:t,secret:e,server:r,v:i,chainId:s});return`${r}/#/link?${a}`}R.createQrUrl=Dp;function Fp(){try{return window.frameElement!==null}catch{return!1}}R.isInIFrame=Fp;Object.defineProperty(Tr,"__esModule",{value:!0});Tr.Session=void 0;const Ic=vd,xc=R,Rc="session:id",kc="session:secret",Mc="session:linked";class ra{constructor(e,r,n,i){this._storage=e,this._id=r||(0,xc.randomBytesHex)(16),this._secret=n||(0,xc.randomBytesHex)(32),this._key=new Ic.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const r=e.getItem(Rc),n=e.getItem(Mc),i=e.getItem(kc);return r&&i?new ra(e,r,i,n==="1"):null}static hash(e){return new Ic.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(Rc,this._id),this._storage.setItem(kc,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Mc,this._linked?"1":"0")}}Tr.Session=ra;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 Ac=on;Ye.WALLET_USER_NAME_KEY="walletUsername";Ye.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Ye.APP_VERSION_KEY="AppVersion";class Bp{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 Ac.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,Ac.serializeError)(s,e.method);return i})}}Ye.WalletSDKRelayAbstract=Bp;const{Transform:Vp}=cl;var Hp=t=>class kl extends Vp{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(!V.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 V.isBuffer(r)||(r=V.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 kl(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:Wp}=cl;var zp=t=>class Ml extends Wp{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(!V.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 V.isBuffer(r)||(r=V.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 Ml(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const Up=Hp,qp=zp;var Gp=function(t){const e=Up(t),r=qp(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)}}},Al={};const Tc=[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];Al.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,g=t[1]^d,w=t[10]^f,b=t[11]^d,y=t[20]^f,S=t[21]^d,C=t[30]^f,v=t[31]^d,T=t[40]^f,D=t[41]^d;f=r^(o<<1|a>>>31),d=n^(a<<1|o>>>31);const Y=t[2]^f,O=t[3]^d,W=t[12]^f,le=t[13]^d,q=t[22]^f,E=t[23]^d,_=t[32]^f,k=t[33]^d,I=t[42]^f,N=t[43]^d;f=i^(c<<1|u>>>31),d=s^(u<<1|c>>>31);const x=t[4]^f,j=t[5]^d,G=t[14]^f,F=t[15]^d,ee=t[24]^f,Se=t[25]^d,ne=t[34]^f,wt=t[35]^d,ns=t[44]^f,tc=t[45]^d;f=o^(l<<1|h>>>31),d=a^(h<<1|l>>>31);const rc=t[6]^f,nc=t[7]^d,ic=t[16]^f,sc=t[17]^d,oc=t[26]^f,ac=t[27]^d,cc=t[36]^f,uc=t[37]^d,lc=t[46]^f,hc=t[47]^d;f=c^(r<<1|n>>>31),d=u^(n<<1|r>>>31);const fc=t[8]^f,dc=t[9]^d,pc=t[18]^f,bc=t[19]^d,gc=t[28]^f,mc=t[29]^d,yc=t[38]^f,vc=t[39]^d,_c=t[48]^f,wc=t[49]^d,is=p,ss=g,os=b<<4|w>>>28,as=w<<4|b>>>28,cs=y<<3|S>>>29,us=S<<3|y>>>29,ls=v<<9|C>>>23,hs=C<<9|v>>>23,fs=T<<18|D>>>14,ds=D<<18|T>>>14,ps=Y<<1|O>>>31,bs=O<<1|Y>>>31,gs=le<<12|W>>>20,ms=W<<12|le>>>20,ys=q<<10|E>>>22,vs=E<<10|q>>>22,_s=k<<13|_>>>19,ws=_<<13|k>>>19,Ss=I<<2|N>>>30,Es=N<<2|I>>>30,Cs=j<<30|x>>>2,Is=x<<30|j>>>2,xs=G<<6|F>>>26,Rs=F<<6|G>>>26,ks=Se<<11|ee>>>21,Ms=ee<<11|Se>>>21,As=ne<<15|wt>>>17,Ts=wt<<15|ne>>>17,Ns=tc<<29|ns>>>3,Os=ns<<29|tc>>>3,Ls=rc<<28|nc>>>4,js=nc<<28|rc>>>4,Ps=sc<<23|ic>>>9,$s=ic<<23|sc>>>9,Ds=oc<<25|ac>>>7,Fs=ac<<25|oc>>>7,Bs=cc<<21|uc>>>11,Vs=uc<<21|cc>>>11,Hs=hc<<24|lc>>>8,Ws=lc<<24|hc>>>8,zs=fc<<27|dc>>>5,Us=dc<<27|fc>>>5,qs=pc<<20|bc>>>12,Gs=bc<<20|pc>>>12,Js=mc<<7|gc>>>25,Qs=gc<<7|mc>>>25,Zs=yc<<8|vc>>>24,Ys=vc<<8|yc>>>24,Ks=_c<<14|wc>>>18,Xs=wc<<14|_c>>>18;t[0]=is^~gs&ks,t[1]=ss^~ms&Ms,t[10]=Ls^~qs&cs,t[11]=js^~Gs&us,t[20]=ps^~xs&Ds,t[21]=bs^~Rs&Fs,t[30]=zs^~os&ys,t[31]=Us^~as&vs,t[40]=Cs^~Ps&Js,t[41]=Is^~$s&Qs,t[2]=gs^~ks&Bs,t[3]=ms^~Ms&Vs,t[12]=qs^~cs&_s,t[13]=Gs^~us&ws,t[22]=xs^~Ds&Zs,t[23]=Rs^~Fs&Ys,t[32]=os^~ys&As,t[33]=as^~vs&Ts,t[42]=Ps^~Js&ls,t[43]=$s^~Qs&hs,t[4]=ks^~Bs&Ks,t[5]=Ms^~Vs&Xs,t[14]=cs^~_s&Ns,t[15]=us^~ws&Os,t[24]=Ds^~Zs&fs,t[25]=Fs^~Ys&ds,t[34]=ys^~As&Hs,t[35]=vs^~Ts&Ws,t[44]=Js^~ls&Ss,t[45]=Qs^~hs&Es,t[6]=Bs^~Ks&is,t[7]=Vs^~Xs&ss,t[16]=_s^~Ns&Ls,t[17]=ws^~Os&js,t[26]=Zs^~fs&ps,t[27]=Ys^~ds&bs,t[36]=As^~Hs&zs,t[37]=Ts^~Ws&Us,t[46]=ls^~Ss&Cs,t[47]=hs^~Es&Is,t[8]=Ks^~is&gs,t[9]=Xs^~ss&ms,t[18]=Ns^~Ls&qs,t[19]=Os^~js&Gs,t[28]=fs^~ps&xs,t[29]=ds^~bs&Rs,t[38]=Hs^~zs&os,t[39]=Ws^~Us&as,t[48]=Ss^~Cs&Ps,t[49]=Es^~Is&$s,t[0]^=Tc[e*2],t[1]^=Tc[e*2+1]}};const Un=Al;function Nr(){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}Nr.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};Nr.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)};Nr.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};Nr.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const e=V.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};Nr.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 Jp=Nr,Qp=Gp(Jp);const Zp=Qp,Yp=ni;function Tl(t){return V.allocUnsafe(t).fill(0)}function Nl(t,e,r){const n=Tl(e);return t=hi(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 Kp(t,e){return Nl(t,e,!0)}function hi(t){if(!V.isBuffer(t))if(Array.isArray(t))t=V.from(t);else if(typeof t=="string")Ol(t)?t=V.from(t0(Ll(t)),"hex"):t=V.from(t);else if(typeof t=="number")t=intToBuffer(t);else if(t==null)t=V.allocUnsafe(0);else if(Yp.isBN(t))t=t.toArrayLike(V);else if(t.toArray)t=V.from(t.toArray());else throw new Error("invalid type");return t}function Xp(t){return t=hi(t),"0x"+t.toString("hex")}function e0(t,e){return t=hi(t),e||(e=256),Zp("keccak"+e).update(t).digest()}function t0(t){return t.length%2?"0"+t:t}function Ol(t){return typeof t=="string"&&t.match(/^0x[0-9A-Fa-f]*$/)}function Ll(t){return typeof t=="string"&&t.startsWith("0x")?t.slice(2):t}var jl={zeros:Tl,setLength:Nl,setLengthRight:Kp,isHexString:Ol,stripHexPrefix:Ll,toBuffer:hi,bufferToHex:Xp,keccak:e0};const Ut=jl,Ht=ni;function Pl(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 Nc(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function $l(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?e[2]===""?"dynamic":parseInt(e[2],10):null}function $t(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",$t(e));if(t==="bool")return it("uint8",e?1:0);if(t==="string")return it("bytes",new V(e,"utf8"));if(n0(t)){if(typeof e.length>"u")throw new Error("Not an array?");if(r=$l(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 V.concat(i)}else{if(t==="bytes")return e=new V(e),i=V.concat([it("uint256",e.length),e]),e.length%32!==0&&(i=V.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=$t(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(V,"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=$t(e),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(V,"be",32)}else if(t.startsWith("ufixed")){if(r=Nc(t),n=$t(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=Nc(t),it("int256",$t(e).mul(new Ht(2).pow(new Ht(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function r0(t){return t==="string"||t==="bytes"||$l(t)==="dynamic"}function n0(t){return t.lastIndexOf("]")===t.length-1}function i0(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=Pl(t[s]),a=e[s],c=it(o,a);r0(o)?(r.push(it("uint256",i)),n.push(c),i+=c.length):r.push(c)}return V.concat(r.concat(n))}function Dl(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=Pl(t[s]),a=e[s];if(o==="bytes")i.push(a);else if(o==="string")i.push(new V(a,"utf8"));else if(o==="bool")i.push(new V(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=$t(a),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(V,"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=$t(a),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(V,"be",r/8))}else throw new Error("Unsupported or invalid type: "+o)}return V.concat(i)}function s0(t,e){return Ut.keccak(Dl(t,e))}var o0={rawEncode:i0,solidityPack:Dl,soliditySHA3:s0};const Je=jl,Gr=o0,Fl={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"]},no={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=V.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(Gr.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=V.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 Gr.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 Fl.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=[V.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(V.concat(n))}};var a0={TYPED_MESSAGE_SCHEMA:Fl,TypedDataUtils:no,hashForSignTypedDataLegacy:function(t){return c0(t.data)},hashForSignTypedData_v3:function(t){return no.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return no.hash(t.data)}};function c0(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 Gr.soliditySHA3(["bytes32","bytes32"],[Gr.soliditySHA3(new Array(t.length).fill("string"),i),Gr.soliditySHA3(n,r)])}var mr={};Object.defineProperty(mr,"__esModule",{value:!0});mr.filterFromParam=mr.FilterPolyfill=void 0;const or=an,xe=R,u0=5*60*1e3,Dt={jsonrpc:"2.0",id:0};class l0{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=Bl(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(Rn())}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:[Oc(n)]})):Rn()}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 Rn();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:[Oc(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 Rn();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)},u0);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}}mr.FilterPolyfill=l0;function Bl(t){return{fromBlock:Lc(t.fromBlock),toBlock:Lc(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}mr.filterFromParam=Bl;function Oc(t){const e={fromBlock:jc(t.fromBlock),toBlock:jc(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function Lc(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 jc(t){return t==="latest"?t:(0,xe.hexStringFromIntNumber)(t)}function Rn(){return Object.assign(Object.assign({},Dt),{error:{code:-32e3,message:"filter not found"}})}function kn(){return Object.assign(Object.assign({},Dt),{result:[]})}var Vl={};(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={}))})(Vl);var fi={},Hl={},di={},na=h0;function h0(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 Pc=(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 f0=(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):Pc(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)?Pc(s,e):s}return n},ln={},d0=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ln,"__esModule",{value:!0});ln.BaseBlockTracker=void 0;const p0=d0(Qt),b0=1e3,g0=(t,e)=>t+e,$c=["sync","latest"];class m0 extends p0.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*b0,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){$c.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 $c.map(e=>this.listenerCount(e)).reduce(g0)}_newPotentialLatest(e){const r=this._currentBlock;r&&Dc(e)<=Dc(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}}ln.BaseBlockTracker=m0;function Dc(t){return Number.parseInt(t,16)}var Wl={},zl={},we={};class Ul 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 y0(t){return ze(t)&&typeof t[Symbol.iterator]=="function"}function ze(t){return typeof t=="object"&&t!=null}function Fc(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 v0(t){const{done:e,value:r}=t.next();return e?void 0:r}function _0(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*Oo(t,e,r,n){y0(t)||(t=[t]);for(const i of t){const s=_0(i,e,r,n);s&&(yield s)}}function*ia(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=ia(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 Oo(l,u,this,c)}:this.validator=()=>[],s?this.refiner=(c,u)=>{const l=s(c,u);return Oo(l,u,this,c)}:this.refiner=()=>[]}assert(e,r){return ql(e,this,r)}create(e,r){return Gl(e,this,r)}is(e){return sa(e,this)}mask(e,r){return Jl(e,this,r)}validate(e,r={}){return Or(e,this,r)}}function ql(t,e,r){const n=Or(t,e,{message:r});if(n[0])throw n[0]}function Gl(t,e,r){const n=Or(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Jl(t,e,r){const n=Or(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function sa(t,e){return!Or(t,e)[0]}function Or(t,e,r={}){const n=ia(t,e,r),i=v0(n);return i[0]?[new Ul(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function w0(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?aa(n):hn(n)}function Ne(t,e){return new he({type:t,schema:null,validator:e})}function S0(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 E0(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 C0(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 I0(t,e){const{schema:r}=t,n={...r};for(const i of e)delete n[i];switch(t.type){case"type":return aa(n);default:return hn(n)}}function x0(t){const e=t instanceof he?{...t.schema}:{...t};for(const r in e)e[r]=Ql(e[r]);return hn(e)}function R0(t,e){const{schema:r}=t,n={};for(const i of e)n[i]=r[i];return hn(n)}function k0(t,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Ne(t,e)}function M0(){return Ne("any",()=>!0)}function A0(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 T0(){return Ne("bigint",t=>typeof t=="bigint")}function N0(){return Ne("boolean",t=>typeof t=="boolean")}function O0(){return Ne("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${pe(t)}`)}function L0(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 j0(){return Ne("func",t=>typeof t=="function"||`Expected a function, but received: ${pe(t)}`)}function P0(t){return Ne("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${pe(e)}`)}function $0(){return Ne("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${pe(t)}`)}function D0(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 F0(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 B0(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 oa(){return Ne("never",()=>!1)}function V0(t){return new he({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function H0(){return Ne("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${pe(t)}`)}function hn(t){const e=t?Object.keys(t):[],r=oa();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 Ql(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 W0(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 z0(){return Ne("regexp",t=>t instanceof RegExp)}function U0(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 Zl(){return Ne("string",t=>typeof t=="string"||`Expected a string, but received: ${pe(t)}`)}function q0(t){const e=oa();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 aa(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 G0(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]=ia(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 Yl(){return Ne("unknown",()=>!0)}function ca(t,e,r){return new he({...t,coercer:(n,i)=>sa(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function J0(t,e,r={}){return ca(t,Yl(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!r.strict&&Fc(n)&&Fc(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 Q0(t){return ca(t,Zl(),e=>e.trim())}function Z0(t){return Yt(t,"empty",e=>{const r=Kl(e);return r===0||`Expected an empty ${t.type} but received one with a size of \`${r}\``})}function Kl(t){return t instanceof Map||t instanceof Set?t.size:t.length}function Y0(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 K0(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 X0(t){return Yt(t,"nonempty",e=>Kl(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function eb(t,e){return Yt(t,"pattern",r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`)}function tb(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=Oo(s,i,t,n);for(const a of o)yield{...a,refinement:e}}})}const rb=Object.freeze(Object.defineProperty({__proto__:null,Struct:he,StructError:Ul,any:M0,array:A0,assert:ql,assign:w0,bigint:T0,boolean:N0,coerce:ca,create:Gl,date:O0,defaulted:J0,define:Ne,deprecated:S0,dynamic:E0,empty:Z0,enums:L0,func:j0,instance:P0,integer:$0,intersection:D0,is:sa,lazy:C0,literal:F0,map:B0,mask:Jl,max:Y0,min:K0,never:oa,nonempty:X0,nullable:V0,number:H0,object:hn,omit:I0,optional:Ql,partial:x0,pattern:eb,pick:R0,record:W0,refine:Yt,regexp:z0,set:U0,size:tb,string:Zl,struct:k0,trimmed:Q0,tuple:q0,type:aa,union:G0,unknown:Yl,validate:Or},Symbol.toStringTag,{value:"Module"})),Kt=kr(rb);Object.defineProperty(we,"__esModule",{value:!0});we.assertExhaustive=we.assertStruct=we.assert=we.AssertionError=void 0;const nb=Kt;function ib(t){return typeof t=="object"&&t!==null&&"message"in t}function sb(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 ob(t){const e=ib(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function Xl(t,e){return sb(t)?new t({message:e}):t({message:e})}class ua extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}we.AssertionError=ua;function ab(t,e="Assertion failed.",r=ua){if(!t)throw e instanceof Error?e:Xl(r,e)}we.assert=ab;function cb(t,e,r="Assertion failed",n=ua){try{(0,nb.assert)(t,e)}catch(i){throw Xl(n,`${r}: ${ob(i)}.`)}}we.assertStruct=cb;function ub(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}we.assertExhaustive=ub;var fn={};Object.defineProperty(fn,"__esModule",{value:!0});fn.base64=void 0;const lb=Kt,hb=we,fb=(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,hb.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,lb.pattern)(t,a)};fn.base64=fb;var J={},dn={};(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})(dn);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,Lo=dn,Bc=48,Vc=58,Hc=87;function db(){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 pb=db();function la(t){return t instanceof Uint8Array}J.isBytes=la;function Lr(t){(0,Le.assert)(la(t),"Value must be a Uint8Array.")}J.assertIsBytes=Lr;function eh(t){if(Lr(t),t.length===0)return"0x";const e=pb(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,Lo.add0x)(r.join(""))}J.bytesToHex=eh;function th(t){Lr(t);const e=eh(t);return BigInt(e)}J.bytesToBigInt=th;function bb(t){Lr(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=bb;function gb(t){Lr(t);const e=th(t);return(0,Le.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(e)}J.bytesToNumber=gb;function mb(t){return Lr(t),new TextDecoder().decode(t)}J.bytesToString=mb;function pi(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,Lo.assertIsHexString)(t);const r=(0,Lo.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<Vc?Bc:Hc),u=a-(a<Vc?Bc:Hc);i[s]=c*16+u}return i}J.hexToBytes=pi;function rh(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 pi(e)}J.bigIntToBytes=rh;function yb(t,e){(0,Le.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function vb(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)(yb(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=vb;function nh(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 pi(e)}J.numberToBytes=nh;function ih(t){return(0,Le.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}J.stringToBytes=ih;function sh(t){if(typeof t=="bigint")return rh(t);if(typeof t=="number")return nh(t);if(typeof t=="string")return t.startsWith("0x")?pi(t):ih(t);if(la(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}J.valueToBytes=sh;function _b(t){const e=new Array(t.length);let r=0;for(let i=0;i<t.length;i++){const s=sh(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=_b;function wb(t){if(typeof V<"u"&&t instanceof V){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=wb;var bi={};Object.defineProperty(bi,"__esModule",{value:!0});bi.ChecksumStruct=void 0;const Wc=Kt,Sb=fn;bi.ChecksumStruct=(0,Wc.size)((0,Sb.base64)((0,Wc.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,Eb=we,oh=J,gi=dn,ah=(0,se.union)([(0,se.number)(),(0,se.bigint)(),(0,se.string)(),gi.StrictHexStruct]),Cb=(0,se.coerce)((0,se.number)(),ah,Number),Ib=(0,se.coerce)((0,se.bigint)(),ah,BigInt);(0,se.union)([gi.StrictHexStruct,(0,se.instance)(Uint8Array)]);const xb=(0,se.coerce)((0,se.instance)(Uint8Array),(0,se.union)([gi.StrictHexStruct]),oh.hexToBytes),Rb=(0,se.coerce)(gi.StrictHexStruct,(0,se.instance)(Uint8Array),oh.bytesToHex);function kb(t){try{const e=(0,se.create)(t,Cb);return(0,Eb.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=kb;function Mb(t){try{return(0,se.create)(t,Ib)}catch(e){throw e instanceof se.StructError?new Error(`Expected a number-like value, got "${String(e.value)}".`):e}}at.createBigInt=Mb;function Ab(t){if(typeof t=="string"&&t.toLowerCase()==="0x")return new Uint8Array;try{return(0,se.create)(t,xb)}catch(e){throw e instanceof se.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}at.createBytes=Ab;function Tb(t){if(t instanceof Uint8Array&&t.length===0||typeof t=="string"&&t.toLowerCase()==="0x")return"0x";try{return(0,se.create)(t,Rb)}catch(e){throw e instanceof se.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}at.createHex=Tb;var yr={},ch=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},Re=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(yr,"__esModule",{value:!0});yr.FrozenSet=yr.FrozenMap=void 0;class ha{constructor(e){qe.set(this,void 0),ch(this,qe,new Map(e),"f"),Object.freeze(this)}get size(){return Re(this,qe,"f").size}[(qe=new WeakMap,Symbol.iterator)](){return Re(this,qe,"f")[Symbol.iterator]()}entries(){return Re(this,qe,"f").entries()}forEach(e,r){return Re(this,qe,"f").forEach((n,i,s)=>e.call(r,n,i,this))}get(e){return Re(this,qe,"f").get(e)}has(e){return Re(this,qe,"f").has(e)}keys(){return Re(this,qe,"f").keys()}values(){return Re(this,qe,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}}yr.FrozenMap=ha;class fa{constructor(e){tt.set(this,void 0),ch(this,tt,new Set(e),"f"),Object.freeze(this)}get size(){return Re(this,tt,"f").size}[(tt=new WeakMap,Symbol.iterator)](){return Re(this,tt,"f")[Symbol.iterator]()}entries(){return Re(this,tt,"f").entries()}forEach(e,r){return Re(this,tt,"f").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return Re(this,tt,"f").has(e)}keys(){return Re(this,tt,"f").keys()}values(){return Re(this,tt,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}yr.FrozenSet=fa;Object.freeze(ha);Object.freeze(ha.prototype);Object.freeze(fa);Object.freeze(fa.prototype);var uh={},da={};(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})(da);(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=da;t.JsonStruct=(0,e.define)("Json",v=>{const[T]=C(v,!0);return T?!0:"Expected a valid JSON-serializable value"});function i(v){return(0,e.is)(v,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(v){return(0,e.is)(v,t.JsonRpcNotificationStruct)}t.isJsonRpcNotification=s;function o(v,T){(0,r.assertStruct)(v,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",T)}t.assertIsJsonRpcNotification=o;function a(v){return(0,e.is)(v,t.JsonRpcRequestStruct)}t.isJsonRpcRequest=a;function c(v,T){(0,r.assertStruct)(v,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",T)}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(v){return(0,e.is)(v,t.PendingJsonRpcResponseStruct)}t.isPendingJsonRpcResponse=u;function l(v,T){(0,r.assertStruct)(v,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",T)}t.assertIsPendingJsonRpcResponse=l;function h(v){return(0,e.is)(v,t.JsonRpcResponseStruct)}t.isJsonRpcResponse=h;function f(v,T){(0,r.assertStruct)(v,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",T)}t.assertIsJsonRpcResponse=f;function d(v){return(0,e.is)(v,t.JsonRpcSuccessStruct)}t.isJsonRpcSuccess=d;function p(v,T){(0,r.assertStruct)(v,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",T)}t.assertIsJsonRpcSuccess=p;function g(v){return(0,e.is)(v,t.JsonRpcFailureStruct)}t.isJsonRpcFailure=g;function w(v,T){(0,r.assertStruct)(v,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",T)}t.assertIsJsonRpcFailure=w;function b(v){return(0,e.is)(v,t.JsonRpcErrorStruct)}t.isJsonRpcError=b;function y(v,T){(0,r.assertStruct)(v,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",T)}t.assertIsJsonRpcError=y;function S(v){const{permitEmptyString:T,permitFractions:D,permitNull:Y}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},v);return W=>!!(typeof W=="number"&&(D||Number.isInteger(W))||typeof W=="string"&&(T||W.length>0)||Y&&W===null)}t.getJsonRpcIdValidator=S;function C(v,T=!1){const D=new Set;function Y(O,W){if(O===void 0)return[!1,0];if(O===null)return[!0,W?0:n.JsonSize.Null];const le=typeof O;try{if(le==="function")return[!1,0];if(le==="string"||O instanceof String)return[!0,W?0:(0,n.calculateStringSize)(O)+n.JsonSize.Quote*2];if(le==="boolean"||O instanceof Boolean)return W?[!0,0]:[!0,O==!0?n.JsonSize.True:n.JsonSize.False];if(le==="number"||O instanceof Number)return W?[!0,0]:[!0,(0,n.calculateNumberSize)(O)];if(O instanceof Date)return W?[!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(D.has(O))return[!1,0];D.add(O);try{return[!0,Object.entries(O).reduce((q,[E,_],k,I)=>{let[N,x]=Y(_,W);if(!N)throw new Error("JSON validation did not pass. Validation process stopped.");if(D.delete(O),W)return 0;const j=Array.isArray(O)?0:E.length+n.JsonSize.Comma+n.JsonSize.Colon*2,G=k<I.length-1?n.JsonSize.Comma:0;return q+j+x+G},W?0:n.JsonSize.Wrapper*2)]}catch{return[!1,0]}}return Y(v,T)}t.validateJsonAndGetSize=C})(uh);var vr={},jo={exports:{}},io,zc;function Nb(){if(zc)return io;zc=1;var t=1e3,e=t*60,r=e*60,n=r*24,i=n*7,s=n*365.25;io=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 io}function Ob(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=Nb(),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 g(...w){if(!g.enabled)return;const b=g,y=Number(new Date),S=y-(h||y);b.diff=S,b.prev=h,b.curr=y,h=y,w[0]=r.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let C=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(T,D)=>{if(T==="%%")return"%";C++;const Y=r.formatters[D];if(typeof Y=="function"){const O=w[C];T=Y.call(b,O),w.splice(C,1),C--}return T}),r.formatArgs.call(b,w),(b.log||r.log).apply(b,w)}return g.namespace=l,g.useColors=r.useColors(),g.color=r.selectColor(l),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(d!==r.namespaces&&(d=r.namespaces,p=r.enabled(l)),p),set:w=>{f=w}}),typeof r.init=="function"&&r.init(g),g}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 Lb=Ob;(function(t,e){e.formatArgs=n,e.save=i,e.load=s,e.useColors=r,e.storage=o(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),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 r(){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 n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;c.splice(1,0,u,"color: inherit");let l=0,h=0;c[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(l++,f==="%c"&&(h=l))}),c.splice(h,0,u)}e.log=console.debug||console.log||(()=>{});function i(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function s(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof Mo<"u"&&"env"in Mo&&(c={}.DEBUG),c}function o(){try{return localStorage}catch{}}t.exports=Lb(e);const{formatters:a}=t.exports;a.j=function(c){try{return JSON.stringify(c)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}})(jo,jo.exports);var jb=jo.exports,Pb=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 $b=Pb(jb),Db=(0,$b.default)("metamask");function Fb(t){return Db.extend(t)}vr.createProjectLogger=Fb;function Bb(t,e){return t.extend(e)}vr.createModuleLogger=Bb;var ct={};Object.defineProperty(ct,"__esModule",{value:!0});ct.hexToBigInt=ct.hexToNumber=ct.bigIntToHex=ct.numberToHex=void 0;const hr=we,en=dn,Vb=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,en.add0x)(t.toString(16)));ct.numberToHex=Vb;const Hb=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,en.add0x)(t.toString(16)));ct.bigIntToHex=Hb;const Wb=t=>{(0,en.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=Wb;const zb=t=>((0,en.assertIsHexString)(t),BigInt((0,en.add0x)(t)));ct.hexToBigInt=zb;var lh={};Object.defineProperty(lh,"__esModule",{value:!0});var hh={};(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})(hh);var fh={},Po={exports:{}};const Ub="2.0.0",dh=256,qb=Number.MAX_SAFE_INTEGER||9007199254740991,Gb=16,Jb=dh-6,Qb=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var mi={MAX_LENGTH:dh,MAX_SAFE_COMPONENT_LENGTH:Gb,MAX_SAFE_BUILD_LENGTH:Jb,MAX_SAFE_INTEGER:qb,RELEASE_TYPES:Qb,SEMVER_SPEC_VERSION:Ub,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Zb=typeof Mo=="object"&&{}&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var yi=Zb;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=mi,s=yi;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=g=>{for(const[w,b]of f)g=g.split(`${w}*`).join(`${w}{0,${b}}`).split(`${w}+`).join(`${w}{1,${b}}`);return g},p=(g,w,b)=>{const y=d(w),S=l++;s(g,S,w),u[g]=S,c[S]=w,o[S]=new RegExp(w,b?"g":void 0),a[S]=new RegExp(y,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*$")})(Po,Po.exports);var pn=Po.exports;const Yb=Object.freeze({loose:!0}),Kb=Object.freeze({}),Xb=t=>t?typeof t!="object"?Yb:t:Kb;var pa=Xb;const Uc=/^[0-9]+$/,ph=(t,e)=>{const r=Uc.test(t),n=Uc.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},eg=(t,e)=>ph(e,t);var bh={compareIdentifiers:ph,rcompareIdentifiers:eg};const Mn=yi,{MAX_LENGTH:qc,MAX_SAFE_INTEGER:An}=mi,{safeRe:Gc,t:Jc}=pn,tg=pa,{compareIdentifiers:tr}=bh;let rg=class nt{constructor(e,r){if(r=tg(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>qc)throw new TypeError(`version is longer than ${qc} characters`);Mn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?Gc[Jc.LOOSE]:Gc[Jc.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>An||this.major<0)throw new TypeError("Invalid major version");if(this.minor>An||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>An||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<An)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(Mn("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(Mn("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(Mn("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=rg;const Qc=Ae,ng=(t,e,r=!1)=>{if(t instanceof Qc)return t;try{return new Qc(t,e)}catch(n){if(!r)return null;throw n}};var jr=ng;const ig=jr,sg=(t,e)=>{const r=ig(t,e);return r?r.version:null};var og=sg;const ag=jr,cg=(t,e)=>{const r=ag(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var ug=cg;const Zc=Ae,lg=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new Zc(t instanceof Zc?t.version:t,r).inc(e,n,i).version}catch{return null}};var hg=lg;const Yc=jr,fg=(t,e)=>{const r=Yc(t,null,!0),n=Yc(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 dg=fg;const pg=Ae,bg=(t,e)=>new pg(t,e).major;var gg=bg;const mg=Ae,yg=(t,e)=>new mg(t,e).minor;var vg=yg;const _g=Ae,wg=(t,e)=>new _g(t,e).patch;var Sg=wg;const Eg=jr,Cg=(t,e)=>{const r=Eg(t,e);return r&&r.prerelease.length?r.prerelease:null};var Ig=Cg;const Kc=Ae,xg=(t,e,r)=>new Kc(t,r).compare(new Kc(e,r));var Ke=xg;const Rg=Ke,kg=(t,e,r)=>Rg(e,t,r);var Mg=kg;const Ag=Ke,Tg=(t,e)=>Ag(t,e,!0);var Ng=Tg;const Xc=Ae,Og=(t,e,r)=>{const n=new Xc(t,r),i=new Xc(e,r);return n.compare(i)||n.compareBuild(i)};var ba=Og;const Lg=ba,jg=(t,e)=>t.sort((r,n)=>Lg(r,n,e));var Pg=jg;const $g=ba,Dg=(t,e)=>t.sort((r,n)=>$g(n,r,e));var Fg=Dg;const Bg=Ke,Vg=(t,e,r)=>Bg(t,e,r)>0;var vi=Vg;const Hg=Ke,Wg=(t,e,r)=>Hg(t,e,r)<0;var ga=Wg;const zg=Ke,Ug=(t,e,r)=>zg(t,e,r)===0;var gh=Ug;const qg=Ke,Gg=(t,e,r)=>qg(t,e,r)!==0;var mh=Gg;const Jg=Ke,Qg=(t,e,r)=>Jg(t,e,r)>=0;var ma=Qg;const Zg=Ke,Yg=(t,e,r)=>Zg(t,e,r)<=0;var ya=Yg;const Kg=gh,Xg=mh,em=vi,tm=ma,rm=ga,nm=ya,im=(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 Kg(t,r,n);case"!=":return Xg(t,r,n);case">":return em(t,r,n);case">=":return tm(t,r,n);case"<":return rm(t,r,n);case"<=":return nm(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var yh=im;const sm=Ae,om=jr,{safeRe:Tn,t:Nn}=pn,am=(t,e)=>{if(t instanceof sm)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(Tn[Nn.COERCE]);else{let n;for(;(n=Tn[Nn.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),Tn[Nn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Tn[Nn.COERCERTL].lastIndex=-1}return r===null?null:om(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var cm=am,so,eu;function um(){return eu||(eu=1,so=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),so}var lm=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++)fm(this,arguments[t]);return this.length};Q.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)dm(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=hm(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 hm(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 fm(t,e){t.tail=new qt(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function dm(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{um()(Q)}catch{}const pm=lm,Ft=Symbol("max"),bt=Symbol("length"),rr=Symbol("lengthCalculator"),Jr=Symbol("allowStale"),Wt=Symbol("maxAge"),ft=Symbol("dispose"),tu=Symbol("noDisposeOnSet"),ge=Symbol("lruList"),Qe=Symbol("cache"),vh=Symbol("updateAgeOnGet"),oo=()=>1;class bm{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||oo;if(this[rr]=typeof r!="function"?oo:r,this[Jr]=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[tu]=e.noDisposeOnSet||!1,this[vh]=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,Vr(this)}get max(){return this[Ft]}set allowStale(e){this[Jr]=!!e}get allowStale(){return this[Jr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Wt]=e,Vr(this)}get maxAge(){return this[Wt]}set lengthCalculator(e){typeof e!="function"&&(e=oo),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})),Vr(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;ru(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[ge].head;n!==null;){const i=n.next;ru(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 pm,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[tu]||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),Vr(this),!0}const o=new gm(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),Vr(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 ao(this,e,!0)}peek(e){return ao(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)=>ao(this,r,!1))}}const ao=(t,e,r)=>{const n=t[Qe].get(e);if(n){const i=n.value;if(qn(t,i)){if(fr(t,n),!t[Jr])return}else r&&(t[vh]&&(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]},Vr=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 gm{constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const ru=(t,e,r,n)=>{let i=r.value;qn(t,i)&&(fr(t,r),t[Jr]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var mm=bm,co,nu;function Xe(){if(nu)return co;nu=1;class t{constructor(_,k){if(k=n(k),_ instanceof t)return _.loose===!!k.loose&&_.includePrerelease===!!k.includePrerelease?_:new t(_.raw,k);if(_ instanceof i)return this.raw=_.value,this.set=[[_]],this.format(),this;if(this.options=k,this.loose=!!k.loose,this.includePrerelease=!!k.includePrerelease,this.raw=_.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(I=>this.parseRange(I.trim())).filter(I=>I.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const I=this.set[0];if(this.set=this.set.filter(N=>!p(N[0])),this.set.length===0)this.set=[I];else if(this.set.length>1){for(const N of this.set)if(N.length===1&&g(N[0])){this.set=[N];break}}}this.format()}format(){return this.range=this.set.map(_=>_.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(_){const I=((this.options.includePrerelease&&f)|(this.options.loose&&d))+":"+_,N=r.get(I);if(N)return N;const x=this.options.loose,j=x?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];_=_.replace(j,le(this.options.includePrerelease)),s("hyphen replace",_),_=_.replace(a[c.COMPARATORTRIM],u),s("comparator trim",_),_=_.replace(a[c.TILDETRIM],l),s("tilde trim",_),_=_.replace(a[c.CARETTRIM],h),s("caret trim",_);let G=_.split(" ").map(ne=>b(ne,this.options)).join(" ").split(/\s+/).map(ne=>W(ne,this.options));x&&(G=G.filter(ne=>(s("loose invalid filter",ne,this.options),!!ne.match(a[c.COMPARATORLOOSE])))),s("range list",G);const F=new Map,ee=G.map(ne=>new i(ne,this.options));for(const ne of ee){if(p(ne))return[ne];F.set(ne.value,ne)}F.size>1&&F.has("")&&F.delete("");const Se=[...F.values()];return r.set(I,Se),Se}intersects(_,k){if(!(_ instanceof t))throw new TypeError("a Range is required");return this.set.some(I=>w(I,k)&&_.set.some(N=>w(N,k)&&I.every(x=>N.every(j=>x.intersects(j,k)))))}test(_){if(!_)return!1;if(typeof _=="string")try{_=new o(_,this.options)}catch{return!1}for(let k=0;k<this.set.length;k++)if(q(this.set[k],_,this.options))return!0;return!1}}co=t;const e=mm,r=new e({max:1e3}),n=pa,i=_i(),s=yi,o=Ae,{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:h}=pn,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=mi,p=E=>E.value==="<0.0.0-0",g=E=>E.value==="",w=(E,_)=>{let k=!0;const I=E.slice();let N=I.pop();for(;k&&I.length;)k=I.every(x=>N.intersects(x,_)),N=I.pop();return k},b=(E,_)=>(s("comp",E,_),E=v(E,_),s("caret",E),E=S(E,_),s("tildes",E),E=D(E,_),s("xrange",E),E=O(E,_),s("stars",E),E),y=E=>!E||E.toLowerCase()==="x"||E==="*",S=(E,_)=>E.trim().split(/\s+/).map(k=>C(k,_)).join(" "),C=(E,_)=>{const k=_.loose?a[c.TILDELOOSE]:a[c.TILDE];return E.replace(k,(I,N,x,j,G)=>{s("tilde",E,I,N,x,j,G);let F;return y(N)?F="":y(x)?F=`>=${N}.0.0 <${+N+1}.0.0-0`:y(j)?F=`>=${N}.${x}.0 <${N}.${+x+1}.0-0`:G?(s("replaceTilde pr",G),F=`>=${N}.${x}.${j}-${G} <${N}.${+x+1}.0-0`):F=`>=${N}.${x}.${j} <${N}.${+x+1}.0-0`,s("tilde return",F),F})},v=(E,_)=>E.trim().split(/\s+/).map(k=>T(k,_)).join(" "),T=(E,_)=>{s("caret",E,_);const k=_.loose?a[c.CARETLOOSE]:a[c.CARET],I=_.includePrerelease?"-0":"";return E.replace(k,(N,x,j,G,F)=>{s("caret",E,N,x,j,G,F);let ee;return y(x)?ee="":y(j)?ee=`>=${x}.0.0${I} <${+x+1}.0.0-0`:y(G)?x==="0"?ee=`>=${x}.${j}.0${I} <${x}.${+j+1}.0-0`:ee=`>=${x}.${j}.0${I} <${+x+1}.0.0-0`:F?(s("replaceCaret pr",F),x==="0"?j==="0"?ee=`>=${x}.${j}.${G}-${F} <${x}.${j}.${+G+1}-0`:ee=`>=${x}.${j}.${G}-${F} <${x}.${+j+1}.0-0`:ee=`>=${x}.${j}.${G}-${F} <${+x+1}.0.0-0`):(s("no pr"),x==="0"?j==="0"?ee=`>=${x}.${j}.${G}${I} <${x}.${j}.${+G+1}-0`:ee=`>=${x}.${j}.${G}${I} <${x}.${+j+1}.0-0`:ee=`>=${x}.${j}.${G} <${+x+1}.0.0-0`),s("caret return",ee),ee})},D=(E,_)=>(s("replaceXRanges",E,_),E.split(/\s+/).map(k=>Y(k,_)).join(" ")),Y=(E,_)=>{E=E.trim();const k=_.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return E.replace(k,(I,N,x,j,G,F)=>{s("xRange",E,I,N,x,j,G,F);const ee=y(x),Se=ee||y(j),ne=Se||y(G),wt=ne;return N==="="&&wt&&(N=""),F=_.includePrerelease?"-0":"",ee?N===">"||N==="<"?I="<0.0.0-0":I="*":N&&wt?(Se&&(j=0),G=0,N===">"?(N=">=",Se?(x=+x+1,j=0,G=0):(j=+j+1,G=0)):N==="<="&&(N="<",Se?x=+x+1:j=+j+1),N==="<"&&(F="-0"),I=`${N+x}.${j}.${G}${F}`):Se?I=`>=${x}.0.0${F} <${+x+1}.0.0-0`:ne&&(I=`>=${x}.${j}.0${F} <${x}.${+j+1}.0-0`),s("xRange return",I),I})},O=(E,_)=>(s("replaceStars",E,_),E.trim().replace(a[c.STAR],"")),W=(E,_)=>(s("replaceGTE0",E,_),E.trim().replace(a[_.includePrerelease?c.GTE0PRE:c.GTE0],"")),le=E=>(_,k,I,N,x,j,G,F,ee,Se,ne,wt,ns)=>(y(I)?k="":y(N)?k=`>=${I}.0.0${E?"-0":""}`:y(x)?k=`>=${I}.${N}.0${E?"-0":""}`:j?k=`>=${k}`:k=`>=${k}${E?"-0":""}`,y(ee)?F="":y(Se)?F=`<${+ee+1}.0.0-0`:y(ne)?F=`<${ee}.${+Se+1}.0-0`:wt?F=`<=${ee}.${Se}.${ne}-${wt}`:E?F=`<${ee}.${Se}.${+ne+1}-0`:F=`<=${F}`,`${k} ${F}`.trim()),q=(E,_,k)=>{for(let I=0;I<E.length;I++)if(!E[I].test(_))return!1;if(_.prerelease.length&&!k.includePrerelease){for(let I=0;I<E.length;I++)if(s(E[I].semver),E[I].semver!==i.ANY&&E[I].semver.prerelease.length>0){const N=E[I].semver;if(N.major===_.major&&N.minor===_.minor&&N.patch===_.patch)return!0}return!1}return!0};return co}var uo,iu;function _i(){if(iu)return uo;iu=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(">")))}}uo=e;const r=pa,{safeRe:n,t:i}=pn,s=yh,o=yi,a=Ae,c=Xe();return uo}const ym=Xe(),vm=(t,e,r)=>{try{e=new ym(e,r)}catch{return!1}return e.test(t)};var wi=vm;const _m=Xe(),wm=(t,e)=>new _m(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Sm=wm;const Em=Ae,Cm=Xe(),Im=(t,e,r)=>{let n=null,i=null,s=null;try{s=new Cm(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Em(n,r))}),n};var xm=Im;const Rm=Ae,km=Xe(),Mm=(t,e,r)=>{let n=null,i=null,s=null;try{s=new km(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Rm(n,r))}),n};var Am=Mm;const lo=Ae,Tm=Xe(),su=vi,Nm=(t,e)=>{t=new Tm(t,e);let r=new lo("0.0.0");if(t.test(r)||(r=new lo("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 lo(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||su(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||su(r,s))&&(r=s)}return r&&t.test(r)?r:null};var Om=Nm;const Lm=Xe(),jm=(t,e)=>{try{return new Lm(t,e).range||"*"}catch{return null}};var Pm=jm;const $m=Ae,_h=_i(),{ANY:Dm}=_h,Fm=Xe(),Bm=wi,ou=vi,au=ga,Vm=ya,Hm=ma,Wm=(t,e,r,n)=>{t=new $m(t,n),e=new Fm(e,n);let i,s,o,a,c;switch(r){case">":i=ou,s=Vm,o=au,a=">",c=">=";break;case"<":i=au,s=Hm,o=ou,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Bm(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===Dm&&(d=new _h(">=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 va=Wm;const zm=va,Um=(t,e,r)=>zm(t,e,">",r);var qm=Um;const Gm=va,Jm=(t,e,r)=>Gm(t,e,"<",r);var Qm=Jm;const cu=Xe(),Zm=(t,e,r)=>(t=new cu(t,r),e=new cu(e,r),t.intersects(e,r));var Ym=Zm;const Km=wi,Xm=Ke;var ey=(t,e,r)=>{const n=[];let i=null,s=null;const o=t.sort((l,h)=>Xm(l,h,r));for(const l of o)Km(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 uu=Xe(),_a=_i(),{ANY:ho}=_a,Hr=wi,wa=Ke,ty=(t,e,r={})=>{if(t===e)return!0;t=new uu(t,r),e=new uu(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const o=ny(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},ry=[new _a(">=0.0.0-0")],lu=[new _a(">=0.0.0")],ny=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===ho){if(e.length===1&&e[0].semver===ho)return!0;r.includePrerelease?t=ry:t=lu}if(e.length===1&&e[0].semver===ho){if(r.includePrerelease)return!0;e=lu}const n=new Set;let i,s;for(const d of t)d.operator===">"||d.operator===">="?i=hu(i,d,r):d.operator==="<"||d.operator==="<="?s=fu(s,d,r):n.add(d.semver);if(n.size>1)return null;let o;if(i&&s){if(o=wa(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&&!Hr(d,String(i),r)||s&&!Hr(d,String(s),r))return null;for(const p of e)if(!Hr(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=hu(i,d,r),a===d&&a!==i)return!1}else if(i.operator===">="&&!Hr(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=fu(s,d,r),c===d&&c!==s)return!1}else if(s.operator==="<="&&!Hr(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)},hu=(t,e,r)=>{if(!t)return e;const n=wa(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},fu=(t,e,r)=>{if(!t)return e;const n=wa(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var iy=ty;const fo=pn,du=mi,sy=Ae,pu=bh,oy=jr,ay=og,cy=ug,uy=hg,ly=dg,hy=gg,fy=vg,dy=Sg,py=Ig,by=Ke,gy=Mg,my=Ng,yy=ba,vy=Pg,_y=Fg,wy=vi,Sy=ga,Ey=gh,Cy=mh,Iy=ma,xy=ya,Ry=yh,ky=cm,My=_i(),Ay=Xe(),Ty=wi,Ny=Sm,Oy=xm,Ly=Am,jy=Om,Py=Pm,$y=va,Dy=qm,Fy=Qm,By=Ym,Vy=ey,Hy=iy;var Wy={parse:oy,valid:ay,clean:cy,inc:uy,diff:ly,major:hy,minor:fy,patch:dy,prerelease:py,compare:by,rcompare:gy,compareLoose:my,compareBuild:yy,sort:vy,rsort:_y,gt:wy,lt:Sy,eq:Ey,neq:Cy,gte:Iy,lte:xy,cmp:Ry,coerce:ky,Comparator:My,Range:Ay,satisfies:Ty,toComparators:Ny,maxSatisfying:Oy,minSatisfying:Ly,minVersion:jy,validRange:Py,outside:$y,gtr:Dy,ltr:Fy,intersects:By,simplifyRange:Vy,subset:Hy,SemVer:sy,re:fo.re,src:fo.src,tokens:fo.t,SEMVER_SPEC_VERSION:du.SEMVER_SPEC_VERSION,RELEASE_TYPES:du.RELEASE_TYPES,compareIdentifiers:pu.compareIdentifiers,rcompareIdentifiers:pu.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=Wy,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})(fh);(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(fn,t),r(J,t),r(bi,t),r(at,t),r(yr,t),r(dn,t),r(uh,t),r(vr,t),r(da,t),r(ct,t),r(lh,t),r(hh,t),r(fh,t)})(zl);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const e=zl;Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),t.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")})(Wl);var wh=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(di,"__esModule",{value:!0});di.PollingBlockTracker=void 0;const zy=wh(na),Uy=wh(f0),qy=ln,bu=Wl,gu=(0,bu.createModuleLogger)(bu.projectLogger,"polling-block-tracker"),Gy=(0,zy.default)(),Jy=1e3;class Qy extends qy.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*Jy,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=mu(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{n as md,s as yd,c as A,t as ni,l as V,v as vd,w as cl,b as kr,p as Mo,x as ii,a as _d}from"./index-39542650.js";import{_ as m}from"./tslib.es6-c2094241.js";function wd(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 Zo={},Kr={},si={};Object.defineProperty(si,"__esModule",{value:!0});si.walletLogo=void 0;const Sd=(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 `}};si.walletLogo=Sd;var oi={};Object.defineProperty(oi,"__esModule",{value:!0});oi.LINK_API_URL=void 0;oi.LINK_API_URL="https://www.walletlink.org";var ai={};Object.defineProperty(ai,"__esModule",{value:!0});ai.ScopedLocalStorage=void 0;class Ed{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}`}}ai.ScopedLocalStorage=Ed;var br={},Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});const Cd=md;function Sc(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function Id(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}let xd=class extends Cd.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")Sc(s,this,r);else{const o=s.length,a=Id(s);for(let c=0;c<o;c+=1)Sc(a[c],this,r)}return!0}};Qt.default=xd;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.EVENTS=void 0;Mr.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 on={},Yo={},kt={},Rd=Xr;Xr.default=Xr;Xr.stable=hl;Xr.stableStringify=hl;var zn="[...]",ul="[Circular]",zt=[],Vt=[];function ll(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Xr(t,e,r,n){typeof n>"u"&&(n=ll()),Ao(t,"",0,[],void 0,0,n);var i;try{Vt.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,fl(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 Ao(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(ul,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++)Ao(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];Ao(t[u],u,a,n,t,s,o)}}n.pop()}}function kd(t,e){return t<e?-1:t>e?1:0}function hl(t,e,r,n){typeof n>"u"&&(n=ll());var i=To(t,"",0,[],void 0,0,n)||t,s;try{Vt.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,fl(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 To(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(ul,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++)To(t[a],a,a,n,t,s,o);else{var c={},u=Object.keys(t).sort(kd);for(a=0;a<u.length;a++){var l=u[a];To(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 fl(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(kt,"__esModule",{value:!0});kt.EthereumProviderError=kt.EthereumRpcError=void 0;const Md=Rd;class dl 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 Md.default(this.serialize(),Nd,2)}}kt.EthereumRpcError=dl;class Ad extends dl{constructor(e,r,n){if(!Td(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}}kt.EthereumProviderError=Ad;function Td(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function Nd(t,e){if(e!=="[Circular]")return e}var Ko={},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=kt,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 g,w;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 S=f;b.code=S.code,S.message&&typeof S.message=="string"?(b.message=S.message,h(S,"data")&&(b.data=S.data)):(b.message=o(b.code),b.data={originalError:l(f)})}else{b.code=d.code;const S=(g=f)===null||g===void 0?void 0:g.message;b.message=S&&typeof S=="string"?S:d.message,b.data={originalError:l(f)}}const y=(w=f)===null||w===void 0?void 0:w.stack;return p&&f&&y&&typeof y=="string"&&(b.stack=y),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)}})(Ko);var ci={};Object.defineProperty(ci,"__esModule",{value:!0});ci.ethErrors=void 0;const Xo=kt,pl=Ko,Ee=Mt;ci.ethErrors={rpc:{parse:t=>$e(Ee.errorCodes.rpc.parse,t),invalidRequest:t=>$e(Ee.errorCodes.rpc.invalidRequest,t),invalidParams:t=>$e(Ee.errorCodes.rpc.invalidParams,t),methodNotFound:t=>$e(Ee.errorCodes.rpc.methodNotFound,t),internal:t=>$e(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 $e(e,t)},invalidInput:t=>$e(Ee.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>$e(Ee.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>$e(Ee.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>$e(Ee.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>$e(Ee.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>$e(Ee.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Br(Ee.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>Br(Ee.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>Br(Ee.errorCodes.provider.unsupportedMethod,t),disconnected:t=>Br(Ee.errorCodes.provider.disconnected,t),chainDisconnected:t=>Br(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 Xo.EthereumProviderError(e,r,n)}}};function $e(t,e){const[r,n]=bl(e);return new Xo.EthereumRpcError(t,r||pl.getMessageFromCode(t),n)}function Br(t,e){const[r,n]=bl(e);return new Xo.EthereumProviderError(t,r||pl.getMessageFromCode(t),n)}function bl(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=kt;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=Ko;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=ci;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}})})(Yo);var te={},ui={};(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={}))})(ui);Object.defineProperty(te,"__esModule",{value:!0});te.EthereumAddressFromSignedMessageResponse=te.SubmitEthereumTransactionResponse=te.SignEthereumTransactionResponse=te.SignEthereumMessageResponse=te.isRequestEthereumAccountsResponse=te.SelectProviderResponse=te.WatchAssetReponse=te.RequestEthereumAccountsResponse=te.SwitchEthereumChainResponse=te.AddEthereumChainResponse=te.isErrorResponse=void 0;const ht=ui;function Od(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}te.isErrorResponse=Od;function Ld(t){return{method:ht.Web3Method.addEthereumChain,result:t}}te.AddEthereumChainResponse=Ld;function jd(t){return{method:ht.Web3Method.switchEthereumChain,result:t}}te.SwitchEthereumChainResponse=jd;function Pd(t){return{method:ht.Web3Method.requestEthereumAccounts,result:t}}te.RequestEthereumAccountsResponse=Pd;function $d(t){return{method:ht.Web3Method.watchAsset,result:t}}te.WatchAssetReponse=$d;function Dd(t){return{method:ht.Web3Method.selectProvider,result:t}}te.SelectProviderResponse=Dd;function Fd(t){return t&&t.method===ht.Web3Method.requestEthereumAccounts}te.isRequestEthereumAccountsResponse=Fd;function Bd(t){return{method:ht.Web3Method.signEthereumMessage,result:t}}te.SignEthereumMessageResponse=Bd;function Vd(t){return{method:ht.Web3Method.signEthereumTransaction,result:t}}te.SignEthereumTransactionResponse=Vd;function Hd(t){return{method:ht.Web3Method.submitEthereumTransaction,result:t}}te.SubmitEthereumTransactionResponse=Hd;function Wd(t){return{method:ht.Web3Method.ethereumAddressFromSignedMessage,result:t}}te.EthereumAddressFromSignedMessageResponse=Wd;var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.LIB_VERSION=void 0;Ar.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=Yo,r=te,n=Ar;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")}})(on);var Tr={},R={},zd=String.prototype.replace,Ud=/%20/g,eo={RFC1738:"RFC1738",RFC3986:"RFC3986"},ea={default:eo.RFC3986,formatters:{RFC1738:function(t){return zd.call(t,Ud,"+")},RFC3986:function(t){return String(t)}},RFC1738:eo.RFC1738,RFC3986:eo.RFC3986},qd=ea,to=Object.prototype.hasOwnProperty,Pt=Array.isArray,et=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Gd=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Pt(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},gl=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},Jd=function t(e,r,n){if(!r)return e;if(typeof r!="object"){if(Pt(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!to.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 Pt(e)&&!Pt(r)&&(i=gl(e,n)),Pt(e)&&Pt(r)?(r.forEach(function(s,o){if(to.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 to.call(s,o)?s[o]=t(s[o],a,n):s[o]=a,s},i)},Qd=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},Zd=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}},Yd=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===qd.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},Kd=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 Gd(r),e},Xd=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},ep=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},tp=function(e,r){return[].concat(e,r)},rp=function(e,r){if(Pt(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},ml={arrayToObject:gl,assign:Qd,combine:tp,compact:Kd,decode:Zd,encode:Yd,isBuffer:ep,isRegExp:Xd,maybeMap:rp,merge:Jd},yl=yd,Fn=ml,qr=ea,np=Object.prototype.hasOwnProperty,Ec={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},pt=Array.isArray,ip=Array.prototype.push,vl=function(t,e){ip.apply(t,pt(e)?e:[e])},sp=Date.prototype.toISOString,Cc=qr.default,Ie={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Fn.encode,encodeValuesOnly:!1,format:Cc,formatter:qr.formatters[Cc],indices:!1,serializeDate:function(e){return sp.call(e)},skipNulls:!1,strictNullHandling:!1},op=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},ro={},ap=function t(e,r,n,i,s,o,a,c,u,l,h,f,d,p,g,w){for(var b=e,y=w,S=0,C=!1;(y=y.get(ro))!==void 0&&!C;){var v=y.get(e);if(S+=1,typeof v<"u"){if(v===S)throw new RangeError("Cyclic object value");C=!0}typeof y.get(ro)>"u"&&(S=0)}if(typeof c=="function"?b=c(r,b):b instanceof Date?b=h(b):n==="comma"&&pt(b)&&(b=Fn.maybeMap(b,function(I){return I instanceof Date?h(I):I})),b===null){if(s)return a&&!p?a(r,Ie.encoder,g,"key",f):r;b=""}if(op(b)||Fn.isBuffer(b)){if(a){var T=p?r:a(r,Ie.encoder,g,"key",f);return[d(T)+"="+d(a(b,Ie.encoder,g,"value",f))]}return[d(r)+"="+d(String(b))]}var D=[];if(typeof b>"u")return D;var Y;if(n==="comma"&&pt(b))p&&a&&(b=Fn.maybeMap(b,a)),Y=[{value:b.length>0?b.join(",")||null:void 0}];else if(pt(c))Y=c;else{var O=Object.keys(b);Y=u?O.sort(u):O}for(var W=i&&pt(b)&&b.length===1?r+"[]":r,le=0;le<Y.length;++le){var q=Y[le],E=typeof q=="object"&&typeof q.value<"u"?q.value:b[q];if(!(o&&E===null)){var _=pt(b)?typeof n=="function"?n(W,q):W:W+(l?"."+q:"["+q+"]");w.set(e,S);var k=yl();k.set(ro,w),vl(D,t(E,_,n,i,s,o,n==="comma"&&p&&pt(b)?null:a,c,u,l,h,f,d,p,g,k))}}return D},cp=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=qr.default;if(typeof e.format<"u"){if(!np.call(qr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=qr.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}},up=function(t,e){var r=t,n=cp(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 Ec?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var c=Ec[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=yl(),h=0;h<i.length;++h){var f=i[h];n.skipNulls&&r[f]===null||vl(o,ap(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:""},gr=ml,No=Object.prototype.hasOwnProperty,lp=Array.isArray,be={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:gr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},hp=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},_l=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},fp="utf8=%26%2310003%3B",dp="utf8=%E2%9C%93",pp=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]===dp?u="utf-8":o[c]===fp&&(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=gr.maybeMap(_l(l.slice(f+1),r),function(g){return r.decoder(g,be.decoder,u,"value")})),p&&r.interpretNumericEntities&&u==="iso-8859-1"&&(p=hp(p)),l.indexOf("[]=")>-1&&(p=lp(p)?[p]:p),No.call(n,d)?n[d]=gr.combine(n[d],p):n[d]=p}return n},bp=function(t,e,r,n){for(var i=n?e:_l(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},gp=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&&No.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&&No.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+s.slice(c.index)+"]"),bp(l,r,n,i)}},mp=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"||gr.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}},yp=function(t,e){var r=mp(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?pp(t,r):t,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;o<s.length;++o){var a=s[o],c=gp(a,n[a],r,typeof t=="string");i=gr.merge(i,c,r)}return r.allowSparse===!0?i:gr.compact(i)},vp=up,_p=yp,wp=ea,Sp={formats:wp,parse:_p,stringify:vp},an={};(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={}))})(an);var Ep=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R,"__esModule",{value:!0});R.isInIFrame=R.createQrUrl=R.getFavicon=R.range=R.isBigNumber=R.ensureParsedJSONObject=R.ensureBN=R.ensureRegExpString=R.ensureIntNumber=R.ensureBuffer=R.ensureAddressString=R.ensureEvenLengthHexString=R.ensureHexString=R.isHexString=R.prepend0x=R.strip0x=R.has0xPrefix=R.hexStringFromIntNumber=R.intNumberFromHexString=R.bigIntStringFromBN=R.hexStringFromBuffer=R.hexStringToUint8Array=R.uint8ArrayToHex=R.randomBytesHex=void 0;const It=Ep(ni),Cp=Sp,Zt=on,We=an,wl=/^[0-9]*$/,Sl=/^[a-f0-9]*$/;function Ip(t){return El(crypto.getRandomValues(new Uint8Array(t)))}R.randomBytesHex=Ip;function El(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}R.uint8ArrayToHex=El;function xp(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}R.hexStringToUint8Array=xp;function Rp(t,e=!1){const r=t.toString("hex");return(0,We.HexString)(e?"0x"+r:r)}R.hexStringFromBuffer=Rp;function kp(t){return(0,We.BigIntString)(t.toString(10))}R.bigIntStringFromBN=kp;function Mp(t){return(0,We.IntNumber)(new It.default(un(t,!1),16).toNumber())}R.intNumberFromHexString=Mp;function Ap(t){return(0,We.HexString)("0x"+new It.default(t).toString(16))}R.hexStringFromIntNumber=Ap;function ta(t){return t.startsWith("0x")||t.startsWith("0X")}R.has0xPrefix=ta;function li(t){return ta(t)?t.slice(2):t}R.strip0x=li;function Cl(t){return ta(t)?"0x"+t.slice(2):"0x"+t}R.prepend0x=Cl;function cn(t){if(typeof t!="string")return!1;const e=li(t).toLowerCase();return Sl.test(e)}R.isHexString=cn;function Il(t,e=!1){if(typeof t=="string"){const r=li(t).toLowerCase();if(Sl.test(r))return(0,We.HexString)(e?"0x"+r:r)}throw Zt.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}R.ensureHexString=Il;function un(t,e=!1){let r=Il(t,!1);return r.length%2===1&&(r=(0,We.HexString)("0"+r)),e?(0,We.HexString)("0x"+r):r}R.ensureEvenLengthHexString=un;function Tp(t){if(typeof t=="string"){const e=li(t).toLowerCase();if(cn(e)&&e.length===40)return(0,We.AddressString)(Cl(e))}throw Zt.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}R.ensureAddressString=Tp;function Np(t){if(V.isBuffer(t))return t;if(typeof t=="string")if(cn(t)){const e=un(t,!1);return V.from(e,"hex")}else return V.from(t,"utf8");throw Zt.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}R.ensureBuffer=Np;function xl(t){if(typeof t=="number"&&Number.isInteger(t))return(0,We.IntNumber)(t);if(typeof t=="string"){if(wl.test(t))return(0,We.IntNumber)(Number(t));if(cn(t))return(0,We.IntNumber)(new It.default(un(t,!1),16).toNumber())}throw Zt.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}R.ensureIntNumber=xl;function Op(t){if(t instanceof RegExp)return(0,We.RegExpString)(t.toString());throw Zt.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}R.ensureRegExpString=Op;function Lp(t){if(t!==null&&(It.default.isBN(t)||Rl(t)))return new It.default(t.toString(10),10);if(typeof t=="number")return new It.default(xl(t));if(typeof t=="string"){if(wl.test(t))return new It.default(t,10);if(cn(t))return new It.default(un(t,!1),16)}throw Zt.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}R.ensureBN=Lp;function jp(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)}`)}R.ensureParsedJSONObject=jp;function Rl(t){if(t==null||typeof t.constructor!="function")return!1;const{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}R.isBigNumber=Rl;function Pp(t,e){return Array.from({length:e-t},(r,n)=>t+n)}R.range=Pp;function $p(){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}`}R.getFavicon=$p;function Dp(t,e,r,n,i,s){const o=n?"parent-id":"id",a=(0,Cp.stringify)({[o]:t,secret:e,server:r,v:i,chainId:s});return`${r}/#/link?${a}`}R.createQrUrl=Dp;function Fp(){try{return window.frameElement!==null}catch{return!1}}R.isInIFrame=Fp;Object.defineProperty(Tr,"__esModule",{value:!0});Tr.Session=void 0;const Ic=vd,xc=R,Rc="session:id",kc="session:secret",Mc="session:linked";class ra{constructor(e,r,n,i){this._storage=e,this._id=r||(0,xc.randomBytesHex)(16),this._secret=n||(0,xc.randomBytesHex)(32),this._key=new Ic.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const r=e.getItem(Rc),n=e.getItem(Mc),i=e.getItem(kc);return r&&i?new ra(e,r,i,n==="1"):null}static hash(e){return new Ic.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(Rc,this._id),this._storage.setItem(kc,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Mc,this._linked?"1":"0")}}Tr.Session=ra;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 Ac=on;Ye.WALLET_USER_NAME_KEY="walletUsername";Ye.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Ye.APP_VERSION_KEY="AppVersion";class Bp{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 Ac.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,Ac.serializeError)(s,e.method);return i})}}Ye.WalletSDKRelayAbstract=Bp;const{Transform:Vp}=cl;var Hp=t=>class kl extends Vp{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(!V.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 V.isBuffer(r)||(r=V.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 kl(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:Wp}=cl;var zp=t=>class Ml extends Wp{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(!V.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 V.isBuffer(r)||(r=V.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 Ml(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const Up=Hp,qp=zp;var Gp=function(t){const e=Up(t),r=qp(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)}}},Al={};const Tc=[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];Al.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,g=t[1]^d,w=t[10]^f,b=t[11]^d,y=t[20]^f,S=t[21]^d,C=t[30]^f,v=t[31]^d,T=t[40]^f,D=t[41]^d;f=r^(o<<1|a>>>31),d=n^(a<<1|o>>>31);const Y=t[2]^f,O=t[3]^d,W=t[12]^f,le=t[13]^d,q=t[22]^f,E=t[23]^d,_=t[32]^f,k=t[33]^d,I=t[42]^f,N=t[43]^d;f=i^(c<<1|u>>>31),d=s^(u<<1|c>>>31);const x=t[4]^f,j=t[5]^d,G=t[14]^f,F=t[15]^d,ee=t[24]^f,Se=t[25]^d,ne=t[34]^f,wt=t[35]^d,ns=t[44]^f,tc=t[45]^d;f=o^(l<<1|h>>>31),d=a^(h<<1|l>>>31);const rc=t[6]^f,nc=t[7]^d,ic=t[16]^f,sc=t[17]^d,oc=t[26]^f,ac=t[27]^d,cc=t[36]^f,uc=t[37]^d,lc=t[46]^f,hc=t[47]^d;f=c^(r<<1|n>>>31),d=u^(n<<1|r>>>31);const fc=t[8]^f,dc=t[9]^d,pc=t[18]^f,bc=t[19]^d,gc=t[28]^f,mc=t[29]^d,yc=t[38]^f,vc=t[39]^d,_c=t[48]^f,wc=t[49]^d,is=p,ss=g,os=b<<4|w>>>28,as=w<<4|b>>>28,cs=y<<3|S>>>29,us=S<<3|y>>>29,ls=v<<9|C>>>23,hs=C<<9|v>>>23,fs=T<<18|D>>>14,ds=D<<18|T>>>14,ps=Y<<1|O>>>31,bs=O<<1|Y>>>31,gs=le<<12|W>>>20,ms=W<<12|le>>>20,ys=q<<10|E>>>22,vs=E<<10|q>>>22,_s=k<<13|_>>>19,ws=_<<13|k>>>19,Ss=I<<2|N>>>30,Es=N<<2|I>>>30,Cs=j<<30|x>>>2,Is=x<<30|j>>>2,xs=G<<6|F>>>26,Rs=F<<6|G>>>26,ks=Se<<11|ee>>>21,Ms=ee<<11|Se>>>21,As=ne<<15|wt>>>17,Ts=wt<<15|ne>>>17,Ns=tc<<29|ns>>>3,Os=ns<<29|tc>>>3,Ls=rc<<28|nc>>>4,js=nc<<28|rc>>>4,Ps=sc<<23|ic>>>9,$s=ic<<23|sc>>>9,Ds=oc<<25|ac>>>7,Fs=ac<<25|oc>>>7,Bs=cc<<21|uc>>>11,Vs=uc<<21|cc>>>11,Hs=hc<<24|lc>>>8,Ws=lc<<24|hc>>>8,zs=fc<<27|dc>>>5,Us=dc<<27|fc>>>5,qs=pc<<20|bc>>>12,Gs=bc<<20|pc>>>12,Js=mc<<7|gc>>>25,Qs=gc<<7|mc>>>25,Zs=yc<<8|vc>>>24,Ys=vc<<8|yc>>>24,Ks=_c<<14|wc>>>18,Xs=wc<<14|_c>>>18;t[0]=is^~gs&ks,t[1]=ss^~ms&Ms,t[10]=Ls^~qs&cs,t[11]=js^~Gs&us,t[20]=ps^~xs&Ds,t[21]=bs^~Rs&Fs,t[30]=zs^~os&ys,t[31]=Us^~as&vs,t[40]=Cs^~Ps&Js,t[41]=Is^~$s&Qs,t[2]=gs^~ks&Bs,t[3]=ms^~Ms&Vs,t[12]=qs^~cs&_s,t[13]=Gs^~us&ws,t[22]=xs^~Ds&Zs,t[23]=Rs^~Fs&Ys,t[32]=os^~ys&As,t[33]=as^~vs&Ts,t[42]=Ps^~Js&ls,t[43]=$s^~Qs&hs,t[4]=ks^~Bs&Ks,t[5]=Ms^~Vs&Xs,t[14]=cs^~_s&Ns,t[15]=us^~ws&Os,t[24]=Ds^~Zs&fs,t[25]=Fs^~Ys&ds,t[34]=ys^~As&Hs,t[35]=vs^~Ts&Ws,t[44]=Js^~ls&Ss,t[45]=Qs^~hs&Es,t[6]=Bs^~Ks&is,t[7]=Vs^~Xs&ss,t[16]=_s^~Ns&Ls,t[17]=ws^~Os&js,t[26]=Zs^~fs&ps,t[27]=Ys^~ds&bs,t[36]=As^~Hs&zs,t[37]=Ts^~Ws&Us,t[46]=ls^~Ss&Cs,t[47]=hs^~Es&Is,t[8]=Ks^~is&gs,t[9]=Xs^~ss&ms,t[18]=Ns^~Ls&qs,t[19]=Os^~js&Gs,t[28]=fs^~ps&xs,t[29]=ds^~bs&Rs,t[38]=Hs^~zs&os,t[39]=Ws^~Us&as,t[48]=Ss^~Cs&Ps,t[49]=Es^~Is&$s,t[0]^=Tc[e*2],t[1]^=Tc[e*2+1]}};const Un=Al;function Nr(){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}Nr.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};Nr.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)};Nr.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};Nr.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const e=V.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};Nr.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 Jp=Nr,Qp=Gp(Jp);const Zp=Qp,Yp=ni;function Tl(t){return V.allocUnsafe(t).fill(0)}function Nl(t,e,r){const n=Tl(e);return t=hi(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 Kp(t,e){return Nl(t,e,!0)}function hi(t){if(!V.isBuffer(t))if(Array.isArray(t))t=V.from(t);else if(typeof t=="string")Ol(t)?t=V.from(t0(Ll(t)),"hex"):t=V.from(t);else if(typeof t=="number")t=intToBuffer(t);else if(t==null)t=V.allocUnsafe(0);else if(Yp.isBN(t))t=t.toArrayLike(V);else if(t.toArray)t=V.from(t.toArray());else throw new Error("invalid type");return t}function Xp(t){return t=hi(t),"0x"+t.toString("hex")}function e0(t,e){return t=hi(t),e||(e=256),Zp("keccak"+e).update(t).digest()}function t0(t){return t.length%2?"0"+t:t}function Ol(t){return typeof t=="string"&&t.match(/^0x[0-9A-Fa-f]*$/)}function Ll(t){return typeof t=="string"&&t.startsWith("0x")?t.slice(2):t}var jl={zeros:Tl,setLength:Nl,setLengthRight:Kp,isHexString:Ol,stripHexPrefix:Ll,toBuffer:hi,bufferToHex:Xp,keccak:e0};const Ut=jl,Ht=ni;function Pl(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 Nc(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function $l(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?e[2]===""?"dynamic":parseInt(e[2],10):null}function $t(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",$t(e));if(t==="bool")return it("uint8",e?1:0);if(t==="string")return it("bytes",new V(e,"utf8"));if(n0(t)){if(typeof e.length>"u")throw new Error("Not an array?");if(r=$l(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 V.concat(i)}else{if(t==="bytes")return e=new V(e),i=V.concat([it("uint256",e.length),e]),e.length%32!==0&&(i=V.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=$t(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(V,"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=$t(e),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(V,"be",32)}else if(t.startsWith("ufixed")){if(r=Nc(t),n=$t(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=Nc(t),it("int256",$t(e).mul(new Ht(2).pow(new Ht(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function r0(t){return t==="string"||t==="bytes"||$l(t)==="dynamic"}function n0(t){return t.lastIndexOf("]")===t.length-1}function i0(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=Pl(t[s]),a=e[s],c=it(o,a);r0(o)?(r.push(it("uint256",i)),n.push(c),i+=c.length):r.push(c)}return V.concat(r.concat(n))}function Dl(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=Pl(t[s]),a=e[s];if(o==="bytes")i.push(a);else if(o==="string")i.push(new V(a,"utf8"));else if(o==="bool")i.push(new V(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=$t(a),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(V,"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=$t(a),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(V,"be",r/8))}else throw new Error("Unsupported or invalid type: "+o)}return V.concat(i)}function s0(t,e){return Ut.keccak(Dl(t,e))}var o0={rawEncode:i0,solidityPack:Dl,soliditySHA3:s0};const Je=jl,Gr=o0,Fl={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"]},no={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=V.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(Gr.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=V.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 Gr.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 Fl.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=[V.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(V.concat(n))}};var a0={TYPED_MESSAGE_SCHEMA:Fl,TypedDataUtils:no,hashForSignTypedDataLegacy:function(t){return c0(t.data)},hashForSignTypedData_v3:function(t){return no.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return no.hash(t.data)}};function c0(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 Gr.soliditySHA3(["bytes32","bytes32"],[Gr.soliditySHA3(new Array(t.length).fill("string"),i),Gr.soliditySHA3(n,r)])}var mr={};Object.defineProperty(mr,"__esModule",{value:!0});mr.filterFromParam=mr.FilterPolyfill=void 0;const or=an,xe=R,u0=5*60*1e3,Dt={jsonrpc:"2.0",id:0};class l0{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=Bl(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(Rn())}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:[Oc(n)]})):Rn()}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 Rn();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:[Oc(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 Rn();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)},u0);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}}mr.FilterPolyfill=l0;function Bl(t){return{fromBlock:Lc(t.fromBlock),toBlock:Lc(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}mr.filterFromParam=Bl;function Oc(t){const e={fromBlock:jc(t.fromBlock),toBlock:jc(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function Lc(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 jc(t){return t==="latest"?t:(0,xe.hexStringFromIntNumber)(t)}function Rn(){return Object.assign(Object.assign({},Dt),{error:{code:-32e3,message:"filter not found"}})}function kn(){return Object.assign(Object.assign({},Dt),{result:[]})}var Vl={};(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={}))})(Vl);var fi={},Hl={},di={},na=h0;function h0(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 Pc=(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 f0=(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):Pc(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)?Pc(s,e):s}return n},ln={},d0=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ln,"__esModule",{value:!0});ln.BaseBlockTracker=void 0;const p0=d0(Qt),b0=1e3,g0=(t,e)=>t+e,$c=["sync","latest"];class m0 extends p0.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*b0,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){$c.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 $c.map(e=>this.listenerCount(e)).reduce(g0)}_newPotentialLatest(e){const r=this._currentBlock;r&&Dc(e)<=Dc(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}}ln.BaseBlockTracker=m0;function Dc(t){return Number.parseInt(t,16)}var Wl={},zl={},we={};class Ul 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 y0(t){return ze(t)&&typeof t[Symbol.iterator]=="function"}function ze(t){return typeof t=="object"&&t!=null}function Fc(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 v0(t){const{done:e,value:r}=t.next();return e?void 0:r}function _0(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*Oo(t,e,r,n){y0(t)||(t=[t]);for(const i of t){const s=_0(i,e,r,n);s&&(yield s)}}function*ia(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=ia(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 Oo(l,u,this,c)}:this.validator=()=>[],s?this.refiner=(c,u)=>{const l=s(c,u);return Oo(l,u,this,c)}:this.refiner=()=>[]}assert(e,r){return ql(e,this,r)}create(e,r){return Gl(e,this,r)}is(e){return sa(e,this)}mask(e,r){return Jl(e,this,r)}validate(e,r={}){return Or(e,this,r)}}function ql(t,e,r){const n=Or(t,e,{message:r});if(n[0])throw n[0]}function Gl(t,e,r){const n=Or(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Jl(t,e,r){const n=Or(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function sa(t,e){return!Or(t,e)[0]}function Or(t,e,r={}){const n=ia(t,e,r),i=v0(n);return i[0]?[new Ul(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function w0(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?aa(n):hn(n)}function Ne(t,e){return new he({type:t,schema:null,validator:e})}function S0(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 E0(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 C0(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 I0(t,e){const{schema:r}=t,n={...r};for(const i of e)delete n[i];switch(t.type){case"type":return aa(n);default:return hn(n)}}function x0(t){const e=t instanceof he?{...t.schema}:{...t};for(const r in e)e[r]=Ql(e[r]);return hn(e)}function R0(t,e){const{schema:r}=t,n={};for(const i of e)n[i]=r[i];return hn(n)}function k0(t,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Ne(t,e)}function M0(){return Ne("any",()=>!0)}function A0(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 T0(){return Ne("bigint",t=>typeof t=="bigint")}function N0(){return Ne("boolean",t=>typeof t=="boolean")}function O0(){return Ne("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${pe(t)}`)}function L0(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 j0(){return Ne("func",t=>typeof t=="function"||`Expected a function, but received: ${pe(t)}`)}function P0(t){return Ne("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${pe(e)}`)}function $0(){return Ne("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${pe(t)}`)}function D0(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 F0(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 B0(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 oa(){return Ne("never",()=>!1)}function V0(t){return new he({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function H0(){return Ne("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${pe(t)}`)}function hn(t){const e=t?Object.keys(t):[],r=oa();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 Ql(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 W0(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 z0(){return Ne("regexp",t=>t instanceof RegExp)}function U0(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 Zl(){return Ne("string",t=>typeof t=="string"||`Expected a string, but received: ${pe(t)}`)}function q0(t){const e=oa();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 aa(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 G0(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]=ia(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 Yl(){return Ne("unknown",()=>!0)}function ca(t,e,r){return new he({...t,coercer:(n,i)=>sa(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function J0(t,e,r={}){return ca(t,Yl(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!r.strict&&Fc(n)&&Fc(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 Q0(t){return ca(t,Zl(),e=>e.trim())}function Z0(t){return Yt(t,"empty",e=>{const r=Kl(e);return r===0||`Expected an empty ${t.type} but received one with a size of \`${r}\``})}function Kl(t){return t instanceof Map||t instanceof Set?t.size:t.length}function Y0(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 K0(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 X0(t){return Yt(t,"nonempty",e=>Kl(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function eb(t,e){return Yt(t,"pattern",r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`)}function tb(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=Oo(s,i,t,n);for(const a of o)yield{...a,refinement:e}}})}const rb=Object.freeze(Object.defineProperty({__proto__:null,Struct:he,StructError:Ul,any:M0,array:A0,assert:ql,assign:w0,bigint:T0,boolean:N0,coerce:ca,create:Gl,date:O0,defaulted:J0,define:Ne,deprecated:S0,dynamic:E0,empty:Z0,enums:L0,func:j0,instance:P0,integer:$0,intersection:D0,is:sa,lazy:C0,literal:F0,map:B0,mask:Jl,max:Y0,min:K0,never:oa,nonempty:X0,nullable:V0,number:H0,object:hn,omit:I0,optional:Ql,partial:x0,pattern:eb,pick:R0,record:W0,refine:Yt,regexp:z0,set:U0,size:tb,string:Zl,struct:k0,trimmed:Q0,tuple:q0,type:aa,union:G0,unknown:Yl,validate:Or},Symbol.toStringTag,{value:"Module"})),Kt=kr(rb);Object.defineProperty(we,"__esModule",{value:!0});we.assertExhaustive=we.assertStruct=we.assert=we.AssertionError=void 0;const nb=Kt;function ib(t){return typeof t=="object"&&t!==null&&"message"in t}function sb(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 ob(t){const e=ib(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function Xl(t,e){return sb(t)?new t({message:e}):t({message:e})}class ua extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}we.AssertionError=ua;function ab(t,e="Assertion failed.",r=ua){if(!t)throw e instanceof Error?e:Xl(r,e)}we.assert=ab;function cb(t,e,r="Assertion failed",n=ua){try{(0,nb.assert)(t,e)}catch(i){throw Xl(n,`${r}: ${ob(i)}.`)}}we.assertStruct=cb;function ub(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}we.assertExhaustive=ub;var fn={};Object.defineProperty(fn,"__esModule",{value:!0});fn.base64=void 0;const lb=Kt,hb=we,fb=(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,hb.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,lb.pattern)(t,a)};fn.base64=fb;var J={},dn={};(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})(dn);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,Lo=dn,Bc=48,Vc=58,Hc=87;function db(){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 pb=db();function la(t){return t instanceof Uint8Array}J.isBytes=la;function Lr(t){(0,Le.assert)(la(t),"Value must be a Uint8Array.")}J.assertIsBytes=Lr;function eh(t){if(Lr(t),t.length===0)return"0x";const e=pb(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,Lo.add0x)(r.join(""))}J.bytesToHex=eh;function th(t){Lr(t);const e=eh(t);return BigInt(e)}J.bytesToBigInt=th;function bb(t){Lr(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=bb;function gb(t){Lr(t);const e=th(t);return(0,Le.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(e)}J.bytesToNumber=gb;function mb(t){return Lr(t),new TextDecoder().decode(t)}J.bytesToString=mb;function pi(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,Lo.assertIsHexString)(t);const r=(0,Lo.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<Vc?Bc:Hc),u=a-(a<Vc?Bc:Hc);i[s]=c*16+u}return i}J.hexToBytes=pi;function rh(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 pi(e)}J.bigIntToBytes=rh;function yb(t,e){(0,Le.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function vb(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)(yb(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=vb;function nh(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 pi(e)}J.numberToBytes=nh;function ih(t){return(0,Le.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}J.stringToBytes=ih;function sh(t){if(typeof t=="bigint")return rh(t);if(typeof t=="number")return nh(t);if(typeof t=="string")return t.startsWith("0x")?pi(t):ih(t);if(la(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}J.valueToBytes=sh;function _b(t){const e=new Array(t.length);let r=0;for(let i=0;i<t.length;i++){const s=sh(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=_b;function wb(t){if(typeof V<"u"&&t instanceof V){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=wb;var bi={};Object.defineProperty(bi,"__esModule",{value:!0});bi.ChecksumStruct=void 0;const Wc=Kt,Sb=fn;bi.ChecksumStruct=(0,Wc.size)((0,Sb.base64)((0,Wc.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,Eb=we,oh=J,gi=dn,ah=(0,se.union)([(0,se.number)(),(0,se.bigint)(),(0,se.string)(),gi.StrictHexStruct]),Cb=(0,se.coerce)((0,se.number)(),ah,Number),Ib=(0,se.coerce)((0,se.bigint)(),ah,BigInt);(0,se.union)([gi.StrictHexStruct,(0,se.instance)(Uint8Array)]);const xb=(0,se.coerce)((0,se.instance)(Uint8Array),(0,se.union)([gi.StrictHexStruct]),oh.hexToBytes),Rb=(0,se.coerce)(gi.StrictHexStruct,(0,se.instance)(Uint8Array),oh.bytesToHex);function kb(t){try{const e=(0,se.create)(t,Cb);return(0,Eb.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=kb;function Mb(t){try{return(0,se.create)(t,Ib)}catch(e){throw e instanceof se.StructError?new Error(`Expected a number-like value, got "${String(e.value)}".`):e}}at.createBigInt=Mb;function Ab(t){if(typeof t=="string"&&t.toLowerCase()==="0x")return new Uint8Array;try{return(0,se.create)(t,xb)}catch(e){throw e instanceof se.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}at.createBytes=Ab;function Tb(t){if(t instanceof Uint8Array&&t.length===0||typeof t=="string"&&t.toLowerCase()==="0x")return"0x";try{return(0,se.create)(t,Rb)}catch(e){throw e instanceof se.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}at.createHex=Tb;var yr={},ch=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},Re=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(yr,"__esModule",{value:!0});yr.FrozenSet=yr.FrozenMap=void 0;class ha{constructor(e){qe.set(this,void 0),ch(this,qe,new Map(e),"f"),Object.freeze(this)}get size(){return Re(this,qe,"f").size}[(qe=new WeakMap,Symbol.iterator)](){return Re(this,qe,"f")[Symbol.iterator]()}entries(){return Re(this,qe,"f").entries()}forEach(e,r){return Re(this,qe,"f").forEach((n,i,s)=>e.call(r,n,i,this))}get(e){return Re(this,qe,"f").get(e)}has(e){return Re(this,qe,"f").has(e)}keys(){return Re(this,qe,"f").keys()}values(){return Re(this,qe,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}}yr.FrozenMap=ha;class fa{constructor(e){tt.set(this,void 0),ch(this,tt,new Set(e),"f"),Object.freeze(this)}get size(){return Re(this,tt,"f").size}[(tt=new WeakMap,Symbol.iterator)](){return Re(this,tt,"f")[Symbol.iterator]()}entries(){return Re(this,tt,"f").entries()}forEach(e,r){return Re(this,tt,"f").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return Re(this,tt,"f").has(e)}keys(){return Re(this,tt,"f").keys()}values(){return Re(this,tt,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}yr.FrozenSet=fa;Object.freeze(ha);Object.freeze(ha.prototype);Object.freeze(fa);Object.freeze(fa.prototype);var uh={},da={};(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})(da);(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=da;t.JsonStruct=(0,e.define)("Json",v=>{const[T]=C(v,!0);return T?!0:"Expected a valid JSON-serializable value"});function i(v){return(0,e.is)(v,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(v){return(0,e.is)(v,t.JsonRpcNotificationStruct)}t.isJsonRpcNotification=s;function o(v,T){(0,r.assertStruct)(v,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",T)}t.assertIsJsonRpcNotification=o;function a(v){return(0,e.is)(v,t.JsonRpcRequestStruct)}t.isJsonRpcRequest=a;function c(v,T){(0,r.assertStruct)(v,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",T)}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(v){return(0,e.is)(v,t.PendingJsonRpcResponseStruct)}t.isPendingJsonRpcResponse=u;function l(v,T){(0,r.assertStruct)(v,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",T)}t.assertIsPendingJsonRpcResponse=l;function h(v){return(0,e.is)(v,t.JsonRpcResponseStruct)}t.isJsonRpcResponse=h;function f(v,T){(0,r.assertStruct)(v,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",T)}t.assertIsJsonRpcResponse=f;function d(v){return(0,e.is)(v,t.JsonRpcSuccessStruct)}t.isJsonRpcSuccess=d;function p(v,T){(0,r.assertStruct)(v,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",T)}t.assertIsJsonRpcSuccess=p;function g(v){return(0,e.is)(v,t.JsonRpcFailureStruct)}t.isJsonRpcFailure=g;function w(v,T){(0,r.assertStruct)(v,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",T)}t.assertIsJsonRpcFailure=w;function b(v){return(0,e.is)(v,t.JsonRpcErrorStruct)}t.isJsonRpcError=b;function y(v,T){(0,r.assertStruct)(v,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",T)}t.assertIsJsonRpcError=y;function S(v){const{permitEmptyString:T,permitFractions:D,permitNull:Y}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},v);return W=>!!(typeof W=="number"&&(D||Number.isInteger(W))||typeof W=="string"&&(T||W.length>0)||Y&&W===null)}t.getJsonRpcIdValidator=S;function C(v,T=!1){const D=new Set;function Y(O,W){if(O===void 0)return[!1,0];if(O===null)return[!0,W?0:n.JsonSize.Null];const le=typeof O;try{if(le==="function")return[!1,0];if(le==="string"||O instanceof String)return[!0,W?0:(0,n.calculateStringSize)(O)+n.JsonSize.Quote*2];if(le==="boolean"||O instanceof Boolean)return W?[!0,0]:[!0,O==!0?n.JsonSize.True:n.JsonSize.False];if(le==="number"||O instanceof Number)return W?[!0,0]:[!0,(0,n.calculateNumberSize)(O)];if(O instanceof Date)return W?[!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(D.has(O))return[!1,0];D.add(O);try{return[!0,Object.entries(O).reduce((q,[E,_],k,I)=>{let[N,x]=Y(_,W);if(!N)throw new Error("JSON validation did not pass. Validation process stopped.");if(D.delete(O),W)return 0;const j=Array.isArray(O)?0:E.length+n.JsonSize.Comma+n.JsonSize.Colon*2,G=k<I.length-1?n.JsonSize.Comma:0;return q+j+x+G},W?0:n.JsonSize.Wrapper*2)]}catch{return[!1,0]}}return Y(v,T)}t.validateJsonAndGetSize=C})(uh);var vr={},jo={exports:{}},io,zc;function Nb(){if(zc)return io;zc=1;var t=1e3,e=t*60,r=e*60,n=r*24,i=n*7,s=n*365.25;io=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 io}function Ob(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=Nb(),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 g(...w){if(!g.enabled)return;const b=g,y=Number(new Date),S=y-(h||y);b.diff=S,b.prev=h,b.curr=y,h=y,w[0]=r.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let C=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(T,D)=>{if(T==="%%")return"%";C++;const Y=r.formatters[D];if(typeof Y=="function"){const O=w[C];T=Y.call(b,O),w.splice(C,1),C--}return T}),r.formatArgs.call(b,w),(b.log||r.log).apply(b,w)}return g.namespace=l,g.useColors=r.useColors(),g.color=r.selectColor(l),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(d!==r.namespaces&&(d=r.namespaces,p=r.enabled(l)),p),set:w=>{f=w}}),typeof r.init=="function"&&r.init(g),g}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 Lb=Ob;(function(t,e){e.formatArgs=n,e.save=i,e.load=s,e.useColors=r,e.storage=o(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),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 r(){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 n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const u="color: "+this.color;c.splice(1,0,u,"color: inherit");let l=0,h=0;c[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(l++,f==="%c"&&(h=l))}),c.splice(h,0,u)}e.log=console.debug||console.log||(()=>{});function i(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function s(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof Mo<"u"&&"env"in Mo&&(c={}.DEBUG),c}function o(){try{return localStorage}catch{}}t.exports=Lb(e);const{formatters:a}=t.exports;a.j=function(c){try{return JSON.stringify(c)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}}})(jo,jo.exports);var jb=jo.exports,Pb=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 $b=Pb(jb),Db=(0,$b.default)("metamask");function Fb(t){return Db.extend(t)}vr.createProjectLogger=Fb;function Bb(t,e){return t.extend(e)}vr.createModuleLogger=Bb;var ct={};Object.defineProperty(ct,"__esModule",{value:!0});ct.hexToBigInt=ct.hexToNumber=ct.bigIntToHex=ct.numberToHex=void 0;const hr=we,en=dn,Vb=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,en.add0x)(t.toString(16)));ct.numberToHex=Vb;const Hb=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,en.add0x)(t.toString(16)));ct.bigIntToHex=Hb;const Wb=t=>{(0,en.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=Wb;const zb=t=>((0,en.assertIsHexString)(t),BigInt((0,en.add0x)(t)));ct.hexToBigInt=zb;var lh={};Object.defineProperty(lh,"__esModule",{value:!0});var hh={};(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})(hh);var fh={},Po={exports:{}};const Ub="2.0.0",dh=256,qb=Number.MAX_SAFE_INTEGER||9007199254740991,Gb=16,Jb=dh-6,Qb=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var mi={MAX_LENGTH:dh,MAX_SAFE_COMPONENT_LENGTH:Gb,MAX_SAFE_BUILD_LENGTH:Jb,MAX_SAFE_INTEGER:qb,RELEASE_TYPES:Qb,SEMVER_SPEC_VERSION:Ub,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Zb=typeof Mo=="object"&&{}&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var yi=Zb;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=mi,s=yi;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=g=>{for(const[w,b]of f)g=g.split(`${w}*`).join(`${w}{0,${b}}`).split(`${w}+`).join(`${w}{1,${b}}`);return g},p=(g,w,b)=>{const y=d(w),S=l++;s(g,S,w),u[g]=S,c[S]=w,o[S]=new RegExp(w,b?"g":void 0),a[S]=new RegExp(y,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*$")})(Po,Po.exports);var pn=Po.exports;const Yb=Object.freeze({loose:!0}),Kb=Object.freeze({}),Xb=t=>t?typeof t!="object"?Yb:t:Kb;var pa=Xb;const Uc=/^[0-9]+$/,ph=(t,e)=>{const r=Uc.test(t),n=Uc.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},eg=(t,e)=>ph(e,t);var bh={compareIdentifiers:ph,rcompareIdentifiers:eg};const Mn=yi,{MAX_LENGTH:qc,MAX_SAFE_INTEGER:An}=mi,{safeRe:Gc,t:Jc}=pn,tg=pa,{compareIdentifiers:tr}=bh;let rg=class nt{constructor(e,r){if(r=tg(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>qc)throw new TypeError(`version is longer than ${qc} characters`);Mn("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?Gc[Jc.LOOSE]:Gc[Jc.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>An||this.major<0)throw new TypeError("Invalid major version");if(this.minor>An||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>An||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<An)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(Mn("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(Mn("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(Mn("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=rg;const Qc=Ae,ng=(t,e,r=!1)=>{if(t instanceof Qc)return t;try{return new Qc(t,e)}catch(n){if(!r)return null;throw n}};var jr=ng;const ig=jr,sg=(t,e)=>{const r=ig(t,e);return r?r.version:null};var og=sg;const ag=jr,cg=(t,e)=>{const r=ag(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var ug=cg;const Zc=Ae,lg=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new Zc(t instanceof Zc?t.version:t,r).inc(e,n,i).version}catch{return null}};var hg=lg;const Yc=jr,fg=(t,e)=>{const r=Yc(t,null,!0),n=Yc(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 dg=fg;const pg=Ae,bg=(t,e)=>new pg(t,e).major;var gg=bg;const mg=Ae,yg=(t,e)=>new mg(t,e).minor;var vg=yg;const _g=Ae,wg=(t,e)=>new _g(t,e).patch;var Sg=wg;const Eg=jr,Cg=(t,e)=>{const r=Eg(t,e);return r&&r.prerelease.length?r.prerelease:null};var Ig=Cg;const Kc=Ae,xg=(t,e,r)=>new Kc(t,r).compare(new Kc(e,r));var Ke=xg;const Rg=Ke,kg=(t,e,r)=>Rg(e,t,r);var Mg=kg;const Ag=Ke,Tg=(t,e)=>Ag(t,e,!0);var Ng=Tg;const Xc=Ae,Og=(t,e,r)=>{const n=new Xc(t,r),i=new Xc(e,r);return n.compare(i)||n.compareBuild(i)};var ba=Og;const Lg=ba,jg=(t,e)=>t.sort((r,n)=>Lg(r,n,e));var Pg=jg;const $g=ba,Dg=(t,e)=>t.sort((r,n)=>$g(n,r,e));var Fg=Dg;const Bg=Ke,Vg=(t,e,r)=>Bg(t,e,r)>0;var vi=Vg;const Hg=Ke,Wg=(t,e,r)=>Hg(t,e,r)<0;var ga=Wg;const zg=Ke,Ug=(t,e,r)=>zg(t,e,r)===0;var gh=Ug;const qg=Ke,Gg=(t,e,r)=>qg(t,e,r)!==0;var mh=Gg;const Jg=Ke,Qg=(t,e,r)=>Jg(t,e,r)>=0;var ma=Qg;const Zg=Ke,Yg=(t,e,r)=>Zg(t,e,r)<=0;var ya=Yg;const Kg=gh,Xg=mh,em=vi,tm=ma,rm=ga,nm=ya,im=(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 Kg(t,r,n);case"!=":return Xg(t,r,n);case">":return em(t,r,n);case">=":return tm(t,r,n);case"<":return rm(t,r,n);case"<=":return nm(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var yh=im;const sm=Ae,om=jr,{safeRe:Tn,t:Nn}=pn,am=(t,e)=>{if(t instanceof sm)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(Tn[Nn.COERCE]);else{let n;for(;(n=Tn[Nn.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),Tn[Nn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Tn[Nn.COERCERTL].lastIndex=-1}return r===null?null:om(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var cm=am,so,eu;function um(){return eu||(eu=1,so=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),so}var lm=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++)fm(this,arguments[t]);return this.length};Q.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)dm(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=hm(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 hm(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 fm(t,e){t.tail=new qt(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function dm(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{um()(Q)}catch{}const pm=lm,Ft=Symbol("max"),bt=Symbol("length"),rr=Symbol("lengthCalculator"),Jr=Symbol("allowStale"),Wt=Symbol("maxAge"),ft=Symbol("dispose"),tu=Symbol("noDisposeOnSet"),ge=Symbol("lruList"),Qe=Symbol("cache"),vh=Symbol("updateAgeOnGet"),oo=()=>1;class bm{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||oo;if(this[rr]=typeof r!="function"?oo:r,this[Jr]=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[tu]=e.noDisposeOnSet||!1,this[vh]=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,Vr(this)}get max(){return this[Ft]}set allowStale(e){this[Jr]=!!e}get allowStale(){return this[Jr]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Wt]=e,Vr(this)}get maxAge(){return this[Wt]}set lengthCalculator(e){typeof e!="function"&&(e=oo),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})),Vr(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;ru(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[ge].head;n!==null;){const i=n.next;ru(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 pm,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[tu]||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),Vr(this),!0}const o=new gm(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),Vr(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 ao(this,e,!0)}peek(e){return ao(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)=>ao(this,r,!1))}}const ao=(t,e,r)=>{const n=t[Qe].get(e);if(n){const i=n.value;if(qn(t,i)){if(fr(t,n),!t[Jr])return}else r&&(t[vh]&&(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]},Vr=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 gm{constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const ru=(t,e,r,n)=>{let i=r.value;qn(t,i)&&(fr(t,r),t[Jr]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var mm=bm,co,nu;function Xe(){if(nu)return co;nu=1;class t{constructor(_,k){if(k=n(k),_ instanceof t)return _.loose===!!k.loose&&_.includePrerelease===!!k.includePrerelease?_:new t(_.raw,k);if(_ instanceof i)return this.raw=_.value,this.set=[[_]],this.format(),this;if(this.options=k,this.loose=!!k.loose,this.includePrerelease=!!k.includePrerelease,this.raw=_.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(I=>this.parseRange(I.trim())).filter(I=>I.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const I=this.set[0];if(this.set=this.set.filter(N=>!p(N[0])),this.set.length===0)this.set=[I];else if(this.set.length>1){for(const N of this.set)if(N.length===1&&g(N[0])){this.set=[N];break}}}this.format()}format(){return this.range=this.set.map(_=>_.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(_){const I=((this.options.includePrerelease&&f)|(this.options.loose&&d))+":"+_,N=r.get(I);if(N)return N;const x=this.options.loose,j=x?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];_=_.replace(j,le(this.options.includePrerelease)),s("hyphen replace",_),_=_.replace(a[c.COMPARATORTRIM],u),s("comparator trim",_),_=_.replace(a[c.TILDETRIM],l),s("tilde trim",_),_=_.replace(a[c.CARETTRIM],h),s("caret trim",_);let G=_.split(" ").map(ne=>b(ne,this.options)).join(" ").split(/\s+/).map(ne=>W(ne,this.options));x&&(G=G.filter(ne=>(s("loose invalid filter",ne,this.options),!!ne.match(a[c.COMPARATORLOOSE])))),s("range list",G);const F=new Map,ee=G.map(ne=>new i(ne,this.options));for(const ne of ee){if(p(ne))return[ne];F.set(ne.value,ne)}F.size>1&&F.has("")&&F.delete("");const Se=[...F.values()];return r.set(I,Se),Se}intersects(_,k){if(!(_ instanceof t))throw new TypeError("a Range is required");return this.set.some(I=>w(I,k)&&_.set.some(N=>w(N,k)&&I.every(x=>N.every(j=>x.intersects(j,k)))))}test(_){if(!_)return!1;if(typeof _=="string")try{_=new o(_,this.options)}catch{return!1}for(let k=0;k<this.set.length;k++)if(q(this.set[k],_,this.options))return!0;return!1}}co=t;const e=mm,r=new e({max:1e3}),n=pa,i=_i(),s=yi,o=Ae,{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:h}=pn,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=mi,p=E=>E.value==="<0.0.0-0",g=E=>E.value==="",w=(E,_)=>{let k=!0;const I=E.slice();let N=I.pop();for(;k&&I.length;)k=I.every(x=>N.intersects(x,_)),N=I.pop();return k},b=(E,_)=>(s("comp",E,_),E=v(E,_),s("caret",E),E=S(E,_),s("tildes",E),E=D(E,_),s("xrange",E),E=O(E,_),s("stars",E),E),y=E=>!E||E.toLowerCase()==="x"||E==="*",S=(E,_)=>E.trim().split(/\s+/).map(k=>C(k,_)).join(" "),C=(E,_)=>{const k=_.loose?a[c.TILDELOOSE]:a[c.TILDE];return E.replace(k,(I,N,x,j,G)=>{s("tilde",E,I,N,x,j,G);let F;return y(N)?F="":y(x)?F=`>=${N}.0.0 <${+N+1}.0.0-0`:y(j)?F=`>=${N}.${x}.0 <${N}.${+x+1}.0-0`:G?(s("replaceTilde pr",G),F=`>=${N}.${x}.${j}-${G} <${N}.${+x+1}.0-0`):F=`>=${N}.${x}.${j} <${N}.${+x+1}.0-0`,s("tilde return",F),F})},v=(E,_)=>E.trim().split(/\s+/).map(k=>T(k,_)).join(" "),T=(E,_)=>{s("caret",E,_);const k=_.loose?a[c.CARETLOOSE]:a[c.CARET],I=_.includePrerelease?"-0":"";return E.replace(k,(N,x,j,G,F)=>{s("caret",E,N,x,j,G,F);let ee;return y(x)?ee="":y(j)?ee=`>=${x}.0.0${I} <${+x+1}.0.0-0`:y(G)?x==="0"?ee=`>=${x}.${j}.0${I} <${x}.${+j+1}.0-0`:ee=`>=${x}.${j}.0${I} <${+x+1}.0.0-0`:F?(s("replaceCaret pr",F),x==="0"?j==="0"?ee=`>=${x}.${j}.${G}-${F} <${x}.${j}.${+G+1}-0`:ee=`>=${x}.${j}.${G}-${F} <${x}.${+j+1}.0-0`:ee=`>=${x}.${j}.${G}-${F} <${+x+1}.0.0-0`):(s("no pr"),x==="0"?j==="0"?ee=`>=${x}.${j}.${G}${I} <${x}.${j}.${+G+1}-0`:ee=`>=${x}.${j}.${G}${I} <${x}.${+j+1}.0-0`:ee=`>=${x}.${j}.${G} <${+x+1}.0.0-0`),s("caret return",ee),ee})},D=(E,_)=>(s("replaceXRanges",E,_),E.split(/\s+/).map(k=>Y(k,_)).join(" ")),Y=(E,_)=>{E=E.trim();const k=_.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return E.replace(k,(I,N,x,j,G,F)=>{s("xRange",E,I,N,x,j,G,F);const ee=y(x),Se=ee||y(j),ne=Se||y(G),wt=ne;return N==="="&&wt&&(N=""),F=_.includePrerelease?"-0":"",ee?N===">"||N==="<"?I="<0.0.0-0":I="*":N&&wt?(Se&&(j=0),G=0,N===">"?(N=">=",Se?(x=+x+1,j=0,G=0):(j=+j+1,G=0)):N==="<="&&(N="<",Se?x=+x+1:j=+j+1),N==="<"&&(F="-0"),I=`${N+x}.${j}.${G}${F}`):Se?I=`>=${x}.0.0${F} <${+x+1}.0.0-0`:ne&&(I=`>=${x}.${j}.0${F} <${x}.${+j+1}.0-0`),s("xRange return",I),I})},O=(E,_)=>(s("replaceStars",E,_),E.trim().replace(a[c.STAR],"")),W=(E,_)=>(s("replaceGTE0",E,_),E.trim().replace(a[_.includePrerelease?c.GTE0PRE:c.GTE0],"")),le=E=>(_,k,I,N,x,j,G,F,ee,Se,ne,wt,ns)=>(y(I)?k="":y(N)?k=`>=${I}.0.0${E?"-0":""}`:y(x)?k=`>=${I}.${N}.0${E?"-0":""}`:j?k=`>=${k}`:k=`>=${k}${E?"-0":""}`,y(ee)?F="":y(Se)?F=`<${+ee+1}.0.0-0`:y(ne)?F=`<${ee}.${+Se+1}.0-0`:wt?F=`<=${ee}.${Se}.${ne}-${wt}`:E?F=`<${ee}.${Se}.${+ne+1}-0`:F=`<=${F}`,`${k} ${F}`.trim()),q=(E,_,k)=>{for(let I=0;I<E.length;I++)if(!E[I].test(_))return!1;if(_.prerelease.length&&!k.includePrerelease){for(let I=0;I<E.length;I++)if(s(E[I].semver),E[I].semver!==i.ANY&&E[I].semver.prerelease.length>0){const N=E[I].semver;if(N.major===_.major&&N.minor===_.minor&&N.patch===_.patch)return!0}return!1}return!0};return co}var uo,iu;function _i(){if(iu)return uo;iu=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(">")))}}uo=e;const r=pa,{safeRe:n,t:i}=pn,s=yh,o=yi,a=Ae,c=Xe();return uo}const ym=Xe(),vm=(t,e,r)=>{try{e=new ym(e,r)}catch{return!1}return e.test(t)};var wi=vm;const _m=Xe(),wm=(t,e)=>new _m(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Sm=wm;const Em=Ae,Cm=Xe(),Im=(t,e,r)=>{let n=null,i=null,s=null;try{s=new Cm(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Em(n,r))}),n};var xm=Im;const Rm=Ae,km=Xe(),Mm=(t,e,r)=>{let n=null,i=null,s=null;try{s=new km(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Rm(n,r))}),n};var Am=Mm;const lo=Ae,Tm=Xe(),su=vi,Nm=(t,e)=>{t=new Tm(t,e);let r=new lo("0.0.0");if(t.test(r)||(r=new lo("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 lo(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||su(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||su(r,s))&&(r=s)}return r&&t.test(r)?r:null};var Om=Nm;const Lm=Xe(),jm=(t,e)=>{try{return new Lm(t,e).range||"*"}catch{return null}};var Pm=jm;const $m=Ae,_h=_i(),{ANY:Dm}=_h,Fm=Xe(),Bm=wi,ou=vi,au=ga,Vm=ya,Hm=ma,Wm=(t,e,r,n)=>{t=new $m(t,n),e=new Fm(e,n);let i,s,o,a,c;switch(r){case">":i=ou,s=Vm,o=au,a=">",c=">=";break;case"<":i=au,s=Hm,o=ou,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Bm(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===Dm&&(d=new _h(">=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 va=Wm;const zm=va,Um=(t,e,r)=>zm(t,e,">",r);var qm=Um;const Gm=va,Jm=(t,e,r)=>Gm(t,e,"<",r);var Qm=Jm;const cu=Xe(),Zm=(t,e,r)=>(t=new cu(t,r),e=new cu(e,r),t.intersects(e,r));var Ym=Zm;const Km=wi,Xm=Ke;var ey=(t,e,r)=>{const n=[];let i=null,s=null;const o=t.sort((l,h)=>Xm(l,h,r));for(const l of o)Km(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 uu=Xe(),_a=_i(),{ANY:ho}=_a,Hr=wi,wa=Ke,ty=(t,e,r={})=>{if(t===e)return!0;t=new uu(t,r),e=new uu(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const o=ny(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},ry=[new _a(">=0.0.0-0")],lu=[new _a(">=0.0.0")],ny=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===ho){if(e.length===1&&e[0].semver===ho)return!0;r.includePrerelease?t=ry:t=lu}if(e.length===1&&e[0].semver===ho){if(r.includePrerelease)return!0;e=lu}const n=new Set;let i,s;for(const d of t)d.operator===">"||d.operator===">="?i=hu(i,d,r):d.operator==="<"||d.operator==="<="?s=fu(s,d,r):n.add(d.semver);if(n.size>1)return null;let o;if(i&&s){if(o=wa(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&&!Hr(d,String(i),r)||s&&!Hr(d,String(s),r))return null;for(const p of e)if(!Hr(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=hu(i,d,r),a===d&&a!==i)return!1}else if(i.operator===">="&&!Hr(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=fu(s,d,r),c===d&&c!==s)return!1}else if(s.operator==="<="&&!Hr(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)},hu=(t,e,r)=>{if(!t)return e;const n=wa(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},fu=(t,e,r)=>{if(!t)return e;const n=wa(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var iy=ty;const fo=pn,du=mi,sy=Ae,pu=bh,oy=jr,ay=og,cy=ug,uy=hg,ly=dg,hy=gg,fy=vg,dy=Sg,py=Ig,by=Ke,gy=Mg,my=Ng,yy=ba,vy=Pg,_y=Fg,wy=vi,Sy=ga,Ey=gh,Cy=mh,Iy=ma,xy=ya,Ry=yh,ky=cm,My=_i(),Ay=Xe(),Ty=wi,Ny=Sm,Oy=xm,Ly=Am,jy=Om,Py=Pm,$y=va,Dy=qm,Fy=Qm,By=Ym,Vy=ey,Hy=iy;var Wy={parse:oy,valid:ay,clean:cy,inc:uy,diff:ly,major:hy,minor:fy,patch:dy,prerelease:py,compare:by,rcompare:gy,compareLoose:my,compareBuild:yy,sort:vy,rsort:_y,gt:wy,lt:Sy,eq:Ey,neq:Cy,gte:Iy,lte:xy,cmp:Ry,coerce:ky,Comparator:My,Range:Ay,satisfies:Ty,toComparators:Ny,maxSatisfying:Oy,minSatisfying:Ly,minVersion:jy,validRange:Py,outside:$y,gtr:Dy,ltr:Fy,intersects:By,simplifyRange:Vy,subset:Hy,SemVer:sy,re:fo.re,src:fo.src,tokens:fo.t,SEMVER_SPEC_VERSION:du.SEMVER_SPEC_VERSION,RELEASE_TYPES:du.RELEASE_TYPES,compareIdentifiers:pu.compareIdentifiers,rcompareIdentifiers:pu.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=Wy,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})(fh);(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(fn,t),r(J,t),r(bi,t),r(at,t),r(yr,t),r(dn,t),r(uh,t),r(vr,t),r(da,t),r(ct,t),r(lh,t),r(hh,t),r(fh,t)})(zl);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const e=zl;Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),t.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")})(Wl);var wh=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(di,"__esModule",{value:!0});di.PollingBlockTracker=void 0;const zy=wh(na),Uy=wh(f0),qy=ln,bu=Wl,gu=(0,bu.createModuleLogger)(bu.projectLogger,"polling-block-tracker"),Gy=(0,zy.default)(),Jy=1e3;class Qy extends qy.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*Jy,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=mu(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=mu(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:Gy(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),gu("Making request",e);const r=await(0,Uy.default)(n=>this._provider.sendAsync(e,n))();if(gu("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
|
|
3
3
|
${r.error.message}`);return r.result}}di.PollingBlockTracker=Qy;function mu(t,e){return new Promise(r=>{const n=setTimeout(r,t);n.unref&&e&&n.unref()})}var Si={},Zy=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Si,"__esModule",{value:!0});Si.SubscribeBlockTracker=void 0;const Yy=Zy(na),Ky=ln,Xy=(0,Yy.default)();class e1 extends Ky.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:Xy(),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)}}Si.SubscribeBlockTracker=e1;var Sh={};Object.defineProperty(Sh,"__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(di,t),r(Si,t),r(Sh,t)})(Hl);var Sa={},Ei={},bn={};Object.defineProperty(bn,"__esModule",{value:!0});bn.getUniqueId=void 0;const Eh=4294967295;let po=Math.floor(Math.random()*Eh);function t1(){return po=(po+1)%Eh,po}bn.getUniqueId=t1;Object.defineProperty(Ei,"__esModule",{value:!0});Ei.createIdRemapMiddleware=void 0;const r1=bn;function n1(){return(t,e,r,n)=>{const i=t.id,s=r1.getUniqueId();t.id=s,e.id=s,r(o=>{t.id=i,e.id=i,o()})}}Ei.createIdRemapMiddleware=n1;var Ci={};Object.defineProperty(Ci,"__esModule",{value:!0});Ci.createAsyncMiddleware=void 0;function i1(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)}}}Ci.createAsyncMiddleware=i1;var Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.createScaffoldMiddleware=void 0;function s1(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())}}Ii.createScaffoldMiddleware=s1;var gn={},o1=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gn,"__esModule",{value:!0});gn.JsonRpcEngine=void 0;const a1=o1(Qt),De=Yo;class dt extends a1.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
|
${bo(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:
|
|
@@ -20,4 +20,4 @@ ${bo(e)}`,{request:e})}}gn.JsonRpcEngine=dt;function bo(t){return JSON.stringify
|
|
|
20
20
|
</svg>
|
|
21
21
|
`;var Di={};Object.defineProperty(Di,"__esModule",{value:!0});Di.StatusDotIcon=void 0;const Yu=Pe;function Tw(t){return(0,Yu.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t),(0,Yu.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.29995 4.99995C2.29995 5.57985 1.82985 6.04995 1.24995 6.04995C0.670052 6.04995 0.199951 5.57985 0.199951 4.99995C0.199951 4.42005 0.670052 3.94995 1.24995 3.94995C1.82985 3.94995 2.29995 4.42005 2.29995 4.99995ZM4.99995 6.04995C5.57985 6.04995 6.04995 5.57985 6.04995 4.99995C6.04995 4.42005 5.57985 3.94995 4.99995 3.94995C4.42005 3.94995 3.94995 4.42005 3.94995 4.99995C3.94995 5.57985 4.42005 6.04995 4.99995 6.04995ZM8.74995 6.04995C9.32985 6.04995 9.79995 5.57985 9.79995 4.99995C9.79995 4.42005 9.32985 3.94995 8.74995 3.94995C8.17005 3.94995 7.69995 4.42005 7.69995 4.99995C7.69995 5.57985 8.17005 6.04995 8.74995 6.04995Z"}))}Di.StatusDotIcon=Tw;var Fi={};function Uf(t){this.mode=Oe.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e<r;e++){var n=[],i=this.data.charCodeAt(e);i>65536?(n[0]=240|(i&1835008)>>>18,n[1]=128|(i&258048)>>>12,n[2]=128|(i&4032)>>>6,n[3]=128|i&63):i>2048?(n[0]=224|(i&61440)>>>12,n[1]=128|(i&4032)>>>6,n[2]=128|i&63):i>128?(n[0]=192|(i&1984)>>>6,n[1]=128|i&63):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}Uf.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e<r;e++)t.put(this.parsedData[e],8)}};function lt(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}lt.prototype={addData:function(t){var e=new Uf(t);this.dataList.push(e),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=lt.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[t+r][e+n]=!0:this.modules[t+r][e+n]=!1)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=ie.getLostPoint(this);(r==0||t>n)&&(t=n,e=r)}return e},createMovieClip:function(t,e,r){var n=t.createEmptyMovieClip(e,r),i=1;this.make();for(var s=0;s<this.modules.length;s++)for(var o=s*i,a=0;a<this.modules[s].length;a++){var c=a*i,u=this.modules[s][a];u&&(n.beginFill(0,100),n.moveTo(c,o),n.lineTo(c+i,o),n.lineTo(c+i,o+i),n.lineTo(c,o+i),n.endFill())}return n},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)this.modules[6][e]==null&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=ie.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var n=t[e],i=t[r];if(this.modules[n][i]==null)for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)s==-2||s==2||o==-2||o==2||s==0&&o==0?this.modules[n+s][i+o]=!0:this.modules[n+s][i+o]=!1}},setupTypeNumber:function(t){for(var e=ie.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=ie.getBCHTypeInfo(r),i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var a=0;a<2;a++)if(this.modules[n][o-a]==null){var c=!1;s<t.length&&(c=(t[s]>>>i&1)==1);var u=ie.getMask(e,n,o-a);u&&(c=!c),this.modules[n][o-a]=c,i--,i==-1&&(s++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};lt.PAD0=236;lt.PAD1=17;lt.createData=function(t,e,r){for(var n=ot.getRSBlocks(t,e),i=new qf,s=0;s<r.length;s++){var o=r[s];i.put(o.mode,4),i.put(o.getLength(),ie.getLengthInBits(o.mode,t)),o.write(i)}for(var a=0,s=0;s<n.length;s++)a+=n[s].dataCount;if(i.getLengthInBits()>a*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+a*8+")");for(i.getLengthInBits()+4<=a*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=a*8||(i.put(lt.PAD0,8),i.getLengthInBits()>=a*8));)i.put(lt.PAD1,8);return lt.createBytes(i,n)};lt.createBytes=function(t,e){for(var r=0,n=0,i=0,s=new Array(e.length),o=new Array(e.length),a=0;a<e.length;a++){var c=e[a].dataCount,u=e[a].totalCount-c;n=Math.max(n,c),i=Math.max(i,u),s[a]=new Array(c);for(var l=0;l<s[a].length;l++)s[a][l]=255&t.buffer[l+r];r+=c;var h=ie.getErrorCorrectPolynomial(u),f=new pr(s[a],h.getLength()-1),d=f.mod(h);o[a]=new Array(h.getLength()-1);for(var l=0;l<o[a].length;l++){var p=l+d.getLength()-o[a].length;o[a][l]=p>=0?d.get(p):0}}for(var g=0,l=0;l<e.length;l++)g+=e[l].totalCount;for(var w=new Array(g),b=0,l=0;l<n;l++)for(var a=0;a<e.length;a++)l<s[a].length&&(w[b++]=s[a][l]);for(var l=0;l<i;l++)for(var a=0;a<e.length;a++)l<o[a].length&&(w[b++]=o[a][l]);return w};var Oe={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Rt={L:1,M:0,Q:3,H:2},St={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},ie={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;ie.getBCHDigit(e)-ie.getBCHDigit(ie.G15)>=0;)e^=ie.G15<<ie.getBCHDigit(e)-ie.getBCHDigit(ie.G15);return(t<<10|e)^ie.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;ie.getBCHDigit(e)-ie.getBCHDigit(ie.G18)>=0;)e^=ie.G18<<ie.getBCHDigit(e)-ie.getBCHDigit(ie.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;t!=0;)e++,t>>>=1;return e},getPatternPosition:function(t){return ie.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case St.PATTERN000:return(e+r)%2==0;case St.PATTERN001:return e%2==0;case St.PATTERN010:return r%3==0;case St.PATTERN011:return(e+r)%3==0;case St.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case St.PATTERN101:return e*r%2+e*r%3==0;case St.PATTERN110:return(e*r%2+e*r%3)%2==0;case St.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new pr([1],0),r=0;r<t;r++)e=e.multiply(new pr([1,me.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case Oe.MODE_NUMBER:return 10;case Oe.MODE_ALPHA_NUM:return 9;case Oe.MODE_8BIT_BYTE:return 8;case Oe.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case Oe.MODE_NUMBER:return 12;case Oe.MODE_ALPHA_NUM:return 11;case Oe.MODE_8BIT_BYTE:return 16;case Oe.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else if(e<41)switch(t){case Oe.MODE_NUMBER:return 14;case Oe.MODE_ALPHA_NUM:return 13;case Oe.MODE_8BIT_BYTE:return 16;case Oe.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}else throw new Error("type:"+e)},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,n=0;n<e;n++)for(var i=0;i<e;i++){for(var s=0,o=t.isDark(n,i),a=-1;a<=1;a++)if(!(n+a<0||e<=n+a))for(var c=-1;c<=1;c++)i+c<0||e<=i+c||a==0&&c==0||o==t.isDark(n+a,i+c)&&s++;s>5&&(r+=3+s-5)}for(var n=0;n<e-1;n++)for(var i=0;i<e-1;i++){var u=0;t.isDark(n,i)&&u++,t.isDark(n+1,i)&&u++,t.isDark(n,i+1)&&u++,t.isDark(n+1,i+1)&&u++,(u==0||u==4)&&(r+=3)}for(var n=0;n<e;n++)for(var i=0;i<e-6;i++)t.isDark(n,i)&&!t.isDark(n,i+1)&&t.isDark(n,i+2)&&t.isDark(n,i+3)&&t.isDark(n,i+4)&&!t.isDark(n,i+5)&&t.isDark(n,i+6)&&(r+=40);for(var i=0;i<e;i++)for(var n=0;n<e-6;n++)t.isDark(n,i)&&!t.isDark(n+1,i)&&t.isDark(n+2,i)&&t.isDark(n+3,i)&&t.isDark(n+4,i)&&!t.isDark(n+5,i)&&t.isDark(n+6,i)&&(r+=40);for(var l=0,i=0;i<e;i++)for(var n=0;n<e;n++)t.isDark(n,i)&&l++;var h=Math.abs(100*l/e/e-50)/5;return r+=h*10,r}},me={glog:function(t){if(t<1)throw new Error("glog("+t+")");return me.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return me.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var _e=0;_e<8;_e++)me.EXP_TABLE[_e]=1<<_e;for(var _e=8;_e<256;_e++)me.EXP_TABLE[_e]=me.EXP_TABLE[_e-4]^me.EXP_TABLE[_e-5]^me.EXP_TABLE[_e-6]^me.EXP_TABLE[_e-8];for(var _e=0;_e<255;_e++)me.LOG_TABLE[me.EXP_TABLE[_e]]=_e;function pr(t,e){if(t.length==null)throw new Error(t.length+"/"+e);for(var r=0;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+e);for(var n=0;n<t.length-r;n++)this.num[n]=t[n+r]}pr.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<t.getLength();n++)e[r+n]^=me.gexp(me.glog(this.get(r))+me.glog(t.get(n)));return new pr(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=me.glog(this.get(0))-me.glog(t.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<t.getLength();n++)r[n]^=me.gexp(me.glog(t.get(n))+e);return new pr(r,0).mod(t)}};function ot(t,e){this.totalCount=t,this.dataCount=e}ot.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];ot.getRSBlocks=function(t,e){var r=ot.getRsBlockTable(t,e);if(r==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var n=r.length/3,i=[],s=0;s<n;s++)for(var o=r[s*3+0],a=r[s*3+1],c=r[s*3+2],u=0;u<o;u++)i.push(new ot(a,c));return i};ot.getRsBlockTable=function(t,e){switch(e){case Rt.L:return ot.RS_BLOCK_TABLE[(t-1)*4+0];case Rt.M:return ot.RS_BLOCK_TABLE[(t-1)*4+1];case Rt.Q:return ot.RS_BLOCK_TABLE[(t-1)*4+2];case Rt.H:return ot.RS_BLOCK_TABLE[(t-1)*4+3];default:return}};function qf(){this.buffer=[],this.length=0}qf.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1},put:function(t,e){for(var r=0;r<e;r++)this.putBit((t>>>e-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var So=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function Gf(t){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof t=="string"&&(t={content:t}),t)for(var e in t)this.options[e]=t[e];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function r(c){switch(c){case"L":return Rt.L;case"M":return Rt.M;case"Q":return Rt.Q;case"H":return Rt.H;default:throw new Error("Unknwon error correction level: "+c)}}function n(c,u){for(var l=i(c),h=1,f=0,d=0,p=So.length;d<=p;d++){var g=So[d];if(!g)throw new Error("Content too long: expected "+f+" but got "+l);switch(u){case"L":f=g[0];break;case"M":f=g[1];break;case"Q":f=g[2];break;case"H":f=g[3];break;default:throw new Error("Unknwon error correction level: "+u)}if(l<=f)break;h++}if(h>So.length)throw new Error("Content too long");return h}function i(c){var u=encodeURI(c).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return u.length+(u.length!=c?3:0)}var s=this.options.content,o=n(s,this.options.ecl),a=r(this.options.ecl);this.qrcode=new lt(o,a),this.qrcode.addData(s),this.qrcode.make()}Gf.prototype.svg=function(t){var e=this.options||{},r=this.qrcode.modules;typeof t>"u"&&(t={container:e.container||"svg"});for(var n=typeof e.pretty<"u"?!!e.pretty:!0,i=n?" ":"",s=n?`\r
|
|
22
22
|
`:"",o=e.width,a=e.height,c=r.length,u=o/(c+2*e.padding),l=a/(c+2*e.padding),h=typeof e.join<"u"?!!e.join:!1,f=typeof e.swap<"u"?!!e.swap:!1,d=typeof e.xmlDeclaration<"u"?!!e.xmlDeclaration:!0,p=typeof e.predefined<"u"?!!e.predefined:!1,g=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+u+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+s:"",w=i+'<rect x="0" y="0" width="'+o+'" height="'+a+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+s,b="",y="",S=0;S<c;S++)for(var C=0;C<c;C++){var v=r[C][S];if(v){var T=C*u+e.padding*u,D=S*l+e.padding*l;if(f){var Y=T;T=D,D=Y}if(h){var O=u+T,W=l+D;T=Number.isInteger(T)?Number(T):T.toFixed(2),D=Number.isInteger(D)?Number(D):D.toFixed(2),O=Number.isInteger(O)?Number(O):O.toFixed(2),W=Number.isInteger(W)?Number(W):W.toFixed(2),y+="M"+T+","+D+" V"+W+" H"+O+" V"+D+" H"+T+" Z "}else p?b+=i+'<use x="'+T.toString()+'" y="'+D.toString()+'" href="#qrmodule" />'+s:b+=i+'<rect x="'+T.toString()+'" y="'+D.toString()+'" width="'+u+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+s}}h&&(b=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+y+'" />');let le="";if(this.options.image!==void 0&&this.options.image.svg){const E=o*this.options.image.width/100,_=a*this.options.image.height/100,k=o/2-E/2,I=a/2-_/2;le+=`<svg x="${k}" y="${I}" width="${E}" height="${_}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,le+=this.options.image.svg+s,le+="</svg>"}var q="";switch(t.container){case"svg":d&&(q+='<?xml version="1.0" standalone="yes"?>'+s),q+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+a+'">'+s,q+=g+w+b,q+=le,q+="</svg>";break;case"svg-viewbox":d&&(q+='<?xml version="1.0" standalone="yes"?>'+s),q+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+a+'">'+s,q+=g+w+b,q+=le,q+="</svg>";break;case"g":q+='<g width="'+o+'" height="'+a+'">'+s,q+=g+w+b,q+=le,q+="</g>";break;default:q+=(g+w+b+le).replace(/^\s+/,"");break}return q};var Nw=Gf,Ow=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.QRCode=void 0;const Lw=Pe,Ku=In,jw=Ow(Nw),Pw=t=>{const[e,r]=(0,Ku.useState)("");return(0,Ku.useEffect)(()=>{var n,i;const s=new jw.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:(n=t.width)!==null&&n!==void 0?n:256,height:(i=t.height)!==null&&i!==void 0?i:256,padding:0,image:t.image}),o=V.from(s.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${o}`)}),e?(0,Lw.h)("img",{src:e,alt:"QR Code"}):null};Fi.QRCode=Pw;var Bi={},Ga={};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}";var $w=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.Spinner=void 0;const Pn=Pe,Dw=$w(Ga),Fw=t=>{var e;const r=(e=t.size)!==null&&e!==void 0?e:64,n=t.color||"#000";return(0,Pn.h)("div",{class:"-cbwsdk-spinner"},(0,Pn.h)("style",null,Dw.default),(0,Pn.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,Pn.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};Bi.Spinner=Fw;var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0});Ja.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-item.light.selected{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark.selected{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item.selected{border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}";var Fr=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ut,"__esModule",{value:!0});ut.CoinbaseAppSteps=ut.CoinbaseWalletSteps=ut.ConnectItem=ut.ConnectContent=void 0;const He=Fr(ii),L=Pe,Xu=In,Bw=R,Vw=Ar,Hw=Pi,Ww=Fr(Wa),zw=Fr(za),Jf=$i,Uw=Fr(Ua),qw=Fr(qa),Gw=Di,Jw=Fi,Qw=Bi,Zw=Fr(Ja),el={"coinbase-wallet-app":{title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",icon:zw.default,steps:Zf},"coinbase-app":{title:"Coinbase app",description:"Connect with your Coinbase account",icon:Ww.default,steps:Yf}},Yw=t=>{switch(t){case"coinbase-app":return Uw.default;case"coinbase-wallet-app":default:return qw.default}},Qo=t=>t==="light"?"#FFFFFF":"#0A0B0D";function Kw(t){const{theme:e}=t,[r,n]=(0,Xu.useState)("coinbase-wallet-app"),i=(0,Xu.useCallback)(u=>{n(u)},[]),s=(0,Bw.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection,t.version,t.chainId),o=el[r];if(!r)return null;const a=o.steps,c=r==="coinbase-app";return(0,L.h)("div",{"data-testid":"connect-content",class:(0,He.default)("-cbwsdk-connect-content",e)},(0,L.h)("style",null,Zw.default),(0,L.h)("div",{class:"-cbwsdk-connect-content-header"},(0,L.h)("h2",{class:(0,He.default)("-cbwsdk-connect-content-heading",e)},"Scan to connect with one of our mobile apps"),t.onCancel&&(0,L.h)("button",{type:"button",class:"-cbwsdk-cancel-button",onClick:t.onCancel},(0,L.h)(Hw.CloseIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,L.h)("div",{class:"-cbwsdk-connect-content-layout"},(0,L.h)("div",{class:"-cbwsdk-connect-content-column-left"},(0,L.h)("div",null,Object.entries(el).map(([u,l])=>(0,L.h)(Qf,{key:u,title:l.title,description:l.description,icon:l.icon,selected:r===u,onClick:()=>i(u),theme:e}))),c&&(0,L.h)("div",{class:(0,He.default)("-cbwsdk-connect-content-update-app",e)},"Don’t see a ",(0,L.h)("strong",null,"Scan")," option? Update your Coinbase app to the latest version and try again.")),(0,L.h)("div",{class:"-cbwsdk-connect-content-column-right"},(0,L.h)("div",{class:"-cbwsdk-connect-content-qr-wrapper"},(0,L.h)(Jw.QRCode,{content:s,width:200,height:200,fgColor:"#000",bgColor:"transparent",image:{svg:Yw(r),width:25,height:25}}),(0,L.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:Vw.LIB_VERSION}),(0,L.h)("input",{type:"hidden",value:s})),(0,L.h)(a,{theme:e}),!t.isConnected&&(0,L.h)("div",{"data-testid":"connecting-spinner",class:(0,He.default)("-cbwsdk-connect-content-qr-connecting",e)},(0,L.h)(Qw.Spinner,{size:36,color:e==="dark"?"#FFF":"#000"}),(0,L.h)("p",null,"Connecting...")))))}ut.ConnectContent=Kw;function Qf({title:t,description:e,icon:r,selected:n,theme:i,onClick:s}){return(0,L.h)("div",{onClick:s,class:(0,He.default)("-cbwsdk-connect-item",i,{selected:n})},(0,L.h)("div",null,(0,L.h)("img",{src:r,alt:t})),(0,L.h)("div",{class:"-cbwsdk-connect-item-copy-wrapper"},(0,L.h)("h3",{class:"-cbwsdk-connect-item-title"},t),(0,L.h)("p",{class:"-cbwsdk-connect-item-description"},e)))}ut.ConnectItem=Qf;function Zf({theme:t}){return(0,L.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,L.h)("li",{class:(0,He.default)("-cbwsdk-wallet-steps-item",t)},(0,L.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,L.h)("li",{class:(0,He.default)("-cbwsdk-wallet-steps-item",t)},(0,L.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,L.h)("span",null,"Tap ",(0,L.h)("strong",null,"Scan")," "),(0,L.h)("span",{class:(0,He.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,L.h)(Jf.QRCodeIcon,{fill:Qo(t)})))))}ut.CoinbaseWalletSteps=Zf;function Yf({theme:t}){return(0,L.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,L.h)("li",{class:(0,He.default)("-cbwsdk-wallet-steps-item",t)},(0,L.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase app")),(0,L.h)("li",{class:(0,He.default)("-cbwsdk-wallet-steps-item",t)},(0,L.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,L.h)("span",null,"Tap ",(0,L.h)("strong",null,"More")),(0,L.h)("span",{class:(0,He.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,L.h)(Gw.StatusDotIcon,{fill:Qo(t)})),(0,L.h)("span",{class:"-cbwsdk-wallet-steps-pad-left"},"then ",(0,L.h)("strong",null,"Scan")),(0,L.h)("span",{class:(0,He.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,L.h)(Jf.QRCodeIcon,{fill:Qo(t)})))))}ut.CoinbaseAppSteps=Yf;var Vi={},Hi={};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.ArrowLeftIcon=void 0;const tl=Pe;function Xw(t){return(0,tl.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t),(0,tl.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}Hi.ArrowLeftIcon=Xw;var Wi={};Object.defineProperty(Wi,"__esModule",{value:!0});Wi.LaptopIcon=void 0;const Eo=Pe;function e2(t){return(0,Eo.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,Eo.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,Eo.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}Wi.LaptopIcon=e2;var zi={};Object.defineProperty(zi,"__esModule",{value:!0});zi.SafeIcon=void 0;const rl=Pe;function t2(t){return(0,rl.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,rl.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}zi.SafeIcon=t2;var Qa={};Object.defineProperty(Qa,"__esModule",{value:!0});Qa.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}";var Kf=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.TryExtensionContent=void 0;const Ot=Kf(ii),fe=Pe,Co=In,r2=Hi,n2=Wi,i2=zi,s2=Kf(Qa);function o2({theme:t}){const[e,r]=(0,Co.useState)(!1),n=(0,Co.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),i=(0,Co.useCallback)(()=>{e?window.location.reload():(n(),r(!0))},[n,e]);return(0,fe.h)("div",{class:(0,Ot.default)("-cbwsdk-try-extension",t)},(0,fe.h)("style",null,s2.default),(0,fe.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,fe.h)("h3",{class:(0,Ot.default)("-cbwsdk-try-extension-heading",t)},"Or try the Coinbase Wallet browser extension"),(0,fe.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,fe.h)("button",{class:(0,Ot.default)("-cbwsdk-try-extension-cta",t),onClick:i},e?"Refresh":"Install"),(0,fe.h)("div",null,!e&&(0,fe.h)(r2.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:t==="light"?"#0052FF":"#588AF5"})))),(0,fe.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,fe.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,fe.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,fe.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,fe.h)("span",{class:(0,Ot.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,fe.h)(n2.LaptopIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,fe.h)("div",{class:(0,Ot.default)("-cbwsdk-try-extension-list-item-copy",t)},"Connect with dapps with just one click on your desktop browser")),(0,fe.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,fe.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,fe.h)("span",{class:(0,Ot.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,fe.h)(i2.SafeIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,fe.h)("div",{class:(0,Ot.default)("-cbwsdk-try-extension-list-item-copy",t)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}Vi.TryExtensionContent=o2;var Za={};Object.defineProperty(Za,"__esModule",{value:!0});Za.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}";var Xf=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ji,"__esModule",{value:!0});ji.ConnectDialog=void 0;const Io=Xf(ii),Lt=Pe,xo=In,a2=ut,c2=Vi,u2=Xf(Za),l2=t=>{const{isOpen:e,darkMode:r}=t,[n,i]=(0,xo.useState)(!e),[s,o]=(0,xo.useState)(!e);(0,xo.useEffect)(()=>{const c=[window.setTimeout(()=>{o(!e)},10)];return e?i(!1):c.push(window.setTimeout(()=>{i(!0)},360)),()=>{c.forEach(window.clearTimeout)}},[t.isOpen]);const a=r?"dark":"light";return(0,Lt.h)("div",{class:(0,Io.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,Lt.h)("style",null,u2.default),(0,Lt.h)("div",{class:(0,Io.default)("-cbwsdk-connect-dialog-backdrop",a,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,Lt.h)("div",{class:"-cbwsdk-connect-dialog"},(0,Lt.h)("div",{class:(0,Io.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},t.connectDisabled?null:(0,Lt.h)(a2.ConnectContent,{theme:a,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection,chainId:t.chainId,onCancel:t.onCancel}),(0,Lt.h)(c2.TryExtensionContent,{theme:a}))))};ji.ConnectDialog=l2;Object.defineProperty(Ti,"__esModule",{value:!0});Ti.LinkFlow=void 0;const Ro=Pe,nl=Li,h2=ji;class f2{constructor(e){this.extensionUI$=new nl.BehaviorSubject({}),this.subscriptions=new nl.Subscription,this.isConnected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection,this.connected$=e.connected$,this.chainId$=e.chainId$}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe(r=>{this.isConnected!==r&&(this.isConnected=r,this.render())})),this.subscriptions.add(this.chainId$.subscribe(r=>{this.chainId!==r&&(this.chainId=r,this.render())}))}detach(){var e;this.root&&(this.subscriptions.unsubscribe(),(0,Ro.render)(null,this.root),(e=this.root.parentElement)===null||e===void 0||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const e=this.extensionUI$.subscribe(()=>{this.root&&(0,Ro.render)((0,Ro.h)(h2.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)});this.subscriptions.add(e)}}Ti.LinkFlow=f2;var ed={},Ya={};Object.defineProperty(Ya,"__esModule",{value:!0});Ya.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}";(function(t){var e=A&&A.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;const r=e(ii),n=Pe,i=In,s=e(Ya),o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";function a(h){switch(h){case"coinbase-app":return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0LjY3NCAxOC44NThjLTIuMDQ1IDAtMy42NDgtMS43MjItMy42NDgtMy44NDVzMS42NTktMy44NDUgMy42NDgtMy44NDVjMS44MjQgMCAzLjMxNyAxLjM3NyAzLjU5MyAzLjIxNGgzLjcwM2MtLjMzMS0zLjk2LTMuNDgyLTcuMDU5LTcuMjk2LTcuMDU5LTQuMDM0IDAtNy4zNSAzLjQ0My03LjM1IDcuNjkgMCA0LjI0NiAzLjI2IDcuNjkgNy4zNSA3LjY5IDMuODcgMCA2Ljk2NS0zLjEgNy4yOTYtNy4wNTloLTMuNzAzYy0uMjc2IDEuODM2LTEuNzY5IDMuMjE0LTMuNTkzIDMuMjE0WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0wIDEwLjY3OGMwLTMuNzExIDAtNS41OTYuNzQyLTcuMDIzQTYuNTMyIDYuNTMyIDAgMCAxIDMuNjU1Ljc0MkM1LjA4MiAwIDYuOTY3IDAgMTAuNjc4IDBoNy45MzhjMy43MTEgMCA1LjU5NiAwIDcuMDIzLjc0MmE2LjUzMSA2LjUzMSAwIDAgMSAyLjkxMyAyLjkxM2MuNzQyIDEuNDI3Ljc0MiAzLjMxMi43NDIgNy4wMjN2Ny45MzhjMCAzLjcxMSAwIDUuNTk2LS43NDIgNy4wMjNhNi41MzEgNi41MzEgMCAwIDEtMi45MTMgMi45MTNjLTEuNDI3Ljc0Mi0zLjMxMi43NDItNy4wMjMuNzQyaC03LjkzOGMtMy43MTEgMC01LjU5NiAwLTcuMDIzLS43NDJhNi41MzEgNi41MzEgMCAwIDEtMi45MTMtMi45MTNDMCAyNC4yMTIgMCAyMi4zODQgMCAxOC42MTZ2LTcuOTM4WiIgZmlsbD0iIzAwNTJGRiIvPjxwYXRoIGQ9Ik0xNC42ODQgMTkuNzczYy0yLjcyNyAwLTQuODY0LTIuMjk1LTQuODY0LTUuMTI2IDAtMi44MzEgMi4yMS01LjEyNyA0Ljg2NC01LjEyNyAyLjQzMiAwIDQuNDIyIDEuODM3IDQuNzkgNC4yODVoNC45MzhjLS40NDItNS4yOC00LjY0My05LjQxMS05LjcyOC05LjQxMS01LjM4IDAtOS44MDIgNC41OS05LjgwMiAxMC4yNTMgMCA1LjY2MiA0LjM0OCAxMC4yNTMgOS44MDIgMTAuMjUzIDUuMTU5IDAgOS4yODYtNC4xMzIgOS43MjgtOS40MTFoLTQuOTM4Yy0uMzY4IDIuNDQ4LTIuMzU4IDQuMjg0LTQuNzkgNC4yODRaIiBmaWxsPSIjZmZmIi8+PC9zdmc+";case"coinbase-wallet-app":default:return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"}}class c{constructor(f){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=f.darkMode}attach(f){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",f.appendChild(this.root),this.render()}presentItem(f){const d=this.nextItemKey++;return this.items.set(d,f),this.render(),()=>{this.items.delete(d),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([f,d])=>(0,n.h)(t.SnackbarInstance,Object.assign({},d,{key:f}))))),this.root)}}t.Snackbar=c;const u=h=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,s.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},h.children));t.SnackbarContainer=u;const l=({autoExpand:h,message:f,menuItems:d,appSrc:p})=>{const[g,w]=(0,i.useState)(!0),[b,y]=(0,i.useState)(h??!1);(0,i.useEffect)(()=>{const C=[window.setTimeout(()=>{w(!1)},1),window.setTimeout(()=>{y(!0)},1e4)];return()=>{C.forEach(window.clearTimeout)}});const S=()=>{y(!b)};return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",g&&"-cbwsdk-snackbar-instance-hidden",b&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:S},(0,n.h)("img",{src:a(p),class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},f),(0,n.h)("div",{class:"-gear-container"},!b&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:o,class:"-gear-icon",title:"Expand"}))),d&&d.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},d.map((C,v)=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",C.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:C.onClick,key:v},(0,n.h)("svg",{width:C.svgWidth,height:C.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":C.defaultFillRule,"clip-rule":C.defaultClipRule,d:C.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",C.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},C.info)))))};t.SnackbarInstance=l})(ed);var Ui={},Ka={};Object.defineProperty(Ka,"__esModule",{value:!0});Ka.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var d2=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.injectCssReset=void 0;const p2=d2(Ka);function b2(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(p2.default)),document.documentElement.appendChild(t)}Ui.injectCssReset=b2;Object.defineProperty(Ai,"__esModule",{value:!0});Ai.WalletSDKUI=void 0;const g2=Ti,m2=ed,y2=Ui;class v2{constructor(e){this.standalone=null,this.attached=!1,this.appSrc=null,this.snackbar=new m2.Snackbar({darkMode:e.darkMode}),this.linkFlow=new g2.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,connected$:e.connected$,chainId$:e.chainId$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",e.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,y2.injectCssReset)()}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(e){}watchAsset(e){}switchEthereumChain(e){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(e){}signEthereumTransaction(e){}submitEthereumTransaction(e){}ethereumAddressFromSignedMessage(e){}showConnecting(e){let r;return e.isUnlinkedErrorState?r={autoExpand:!0,message:"Connection lost",appSrc:this.appSrc,menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:r={message:"Confirm on phone",appSrc:this.appSrc,menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(r)}setAppSrc(e){this.appSrc=e}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(e){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return(e=this.standalone)!==null&&e!==void 0?e:!1}}Ai.WalletSDKUI=v2;var qi={},Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});var cr;(function(t){t.typeOfFunction="function",t.boolTrue=!0})(cr||(cr={}));function td(t,e,r){if(!r||typeof r.value!==cr.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:cr.boolTrue,get:function(){var n=r.value.bind(this);return Object.defineProperty(this,e,{value:n,configurable:cr.boolTrue,writable:cr.boolTrue}),n}}}Gi.bind=td;Gi.default=td;function rd(t){return function(r){return r.lift(new _2(t))}}var _2=function(){function t(e){this.durationSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new w2(e,this.durationSelector))},t}(),w2=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.durationSelector=n,i.hasValue=!1,i}return e.prototype._next=function(r){if(this.value=r,this.hasValue=!0,!this.throttled){var n=void 0;try{var i=this.durationSelector;n=i(r)}catch(o){return this.destination.error(o)}var s=ue(n,new ae(this));!s||s.closed?this.clearThrottle():this.add(this.throttled=s)}},e.prototype.clearThrottle=function(){var r=this,n=r.value,i=r.hasValue,s=r.throttled;s&&(this.remove(s),this.throttled=void 0,s.unsubscribe()),i&&(this.value=void 0,this.hasValue=!1,this.destination.next(n))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(ce);function S2(t,e){return e===void 0&&(e=Me),rd(function(){return $f(t,e)})}function E2(t){return function(r){return r.lift(new C2(t))}}var C2=function(){function t(e){this.closingNotifier=e}return t.prototype.call=function(e,r){return r.subscribe(new I2(e,this.closingNotifier))},t}(),I2=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.buffer=[],i.add(ue(n,new ae(i))),i}return e.prototype._next=function(r){this.buffer.push(r)},e.prototype.notifyNext=function(){var r=this.buffer;this.buffer=[],this.destination.next(r)},e}(ce);function x2(t,e){return e===void 0&&(e=null),function(n){return n.lift(new R2(t,e))}}var R2=function(){function t(e,r){this.bufferSize=e,this.startBufferEvery=r,!r||e===r?this.subscriberClass=k2:this.subscriberClass=M2}return t.prototype.call=function(e,r){return r.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},t}(),k2=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.bufferSize=n,i.buffer=[],i}return e.prototype._next=function(r){var n=this.buffer;n.push(r),n.length==this.bufferSize&&(this.destination.next(n),this.buffer=[])},e.prototype._complete=function(){var r=this.buffer;r.length>0&&this.destination.next(r),t.prototype._complete.call(this)},e}(M),M2=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.bufferSize=n,s.startBufferEvery=i,s.buffers=[],s.count=0,s}return e.prototype._next=function(r){var n=this,i=n.bufferSize,s=n.startBufferEvery,o=n.buffers,a=n.count;this.count++,a%s===0&&o.push([]);for(var c=o.length;c--;){var u=o[c];u.push(r),u.length===i&&(o.splice(c,1),this.destination.next(u))}},e.prototype._complete=function(){for(var r=this,n=r.buffers,i=r.destination;n.length>0;){var s=n.shift();s.length>0&&i.next(s)}t.prototype._complete.call(this)},e}(M);function A2(t){var e=arguments.length,r=Me;je(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],e--);var n=null;e>=2&&(n=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(o){return o.lift(new T2(t,n,i,r))}}var T2=function(){function t(e,r,n,i){this.bufferTimeSpan=e,this.bufferCreationInterval=r,this.maxBufferSize=n,this.scheduler=i}return t.prototype.call=function(e,r){return r.subscribe(new O2(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),N2=function(){function t(){this.buffer=[]}return t}(),O2=function(t){m(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;a.bufferTimeSpan=n,a.bufferCreationInterval=i,a.maxBufferSize=s,a.scheduler=o,a.contexts=[];var c=a.openContext();if(a.timespanOnly=i==null||i<0,a.timespanOnly){var u={subscriber:a,context:c,bufferTimeSpan:n};a.add(c.closeAction=o.schedule(il,n,u))}else{var l={subscriber:a,context:c},h={bufferTimeSpan:n,bufferCreationInterval:i,subscriber:a,scheduler:o};a.add(c.closeAction=o.schedule(nd,n,l)),a.add(o.schedule(L2,i,h))}return a}return e.prototype._next=function(r){for(var n=this.contexts,i=n.length,s,o=0;o<i;o++){var a=n[o],c=a.buffer;c.push(r),c.length==this.maxBufferSize&&(s=a)}s&&this.onBufferFull(s)},e.prototype._error=function(r){this.contexts.length=0,t.prototype._error.call(this,r)},e.prototype._complete=function(){for(var r=this,n=r.contexts,i=r.destination;n.length>0;){var s=n.shift();i.next(s.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(r){this.closeContext(r);var n=r.closeAction;if(n.unsubscribe(),this.remove(n),!this.closed&&this.timespanOnly){r=this.openContext();var i=this.bufferTimeSpan,s={subscriber:this,context:r,bufferTimeSpan:i};this.add(r.closeAction=this.scheduler.schedule(il,i,s))}},e.prototype.openContext=function(){var r=new N2;return this.contexts.push(r),r},e.prototype.closeContext=function(r){this.destination.next(r.buffer);var n=this.contexts,i=n?n.indexOf(r):-1;i>=0&&n.splice(n.indexOf(r),1)},e}(M);function il(t){var e=t.subscriber,r=t.context;r&&e.closeContext(r),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function L2(t){var e=t.bufferCreationInterval,r=t.bufferTimeSpan,n=t.subscriber,i=t.scheduler,s=n.openContext(),o=this;n.closed||(n.add(s.closeAction=i.schedule(nd,r,{subscriber:n,context:s})),o.schedule(t,e))}function nd(t){var e=t.subscriber,r=t.context;e.closeContext(r)}function j2(t,e){return function(n){return n.lift(new P2(t,e))}}var P2=function(){function t(e,r){this.openings=e,this.closingSelector=r}return t.prototype.call=function(e,r){return r.subscribe(new $2(e,this.openings,this.closingSelector))},t}(),$2=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.closingSelector=i,s.contexts=[],s.add(yt(s,n)),s}return e.prototype._next=function(r){for(var n=this.contexts,i=n.length,s=0;s<i;s++)n[s].buffer.push(r)},e.prototype._error=function(r){for(var n=this.contexts;n.length>0;){var i=n.shift();i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,t.prototype._error.call(this,r)},e.prototype._complete=function(){for(var r=this.contexts;r.length>0;){var n=r.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(r,n){r?this.closeBuffer(r):this.openBuffer(n)},e.prototype.notifyComplete=function(r){this.closeBuffer(r.context)},e.prototype.openBuffer=function(r){try{var n=this.closingSelector,i=n.call(this,r);i&&this.trySubscribe(i)}catch(s){this._error(s)}},e.prototype.closeBuffer=function(r){var n=this.contexts;if(n&&r){var i=r.buffer,s=r.subscription;this.destination.next(i),n.splice(n.indexOf(r),1),this.remove(s),s.unsubscribe()}},e.prototype.trySubscribe=function(r){var n=this.contexts,i=[],s=new oe,o={buffer:i,subscription:s};n.push(o);var a=yt(this,r,o);!a||a.closed?this.closeBuffer(o):(a.context=o,this.add(a),s.add(a))},e}(Xt);function D2(t){return function(e){return e.lift(new F2(t))}}var F2=function(){function t(e){this.closingSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new B2(e,this.closingSelector))},t}(),B2=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.closingSelector=n,i.subscribing=!1,i.openBuffer(),i}return e.prototype._next=function(r){this.buffer.push(r)},e.prototype._complete=function(){var r=this.buffer;r&&this.destination.next(r),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var r=this.closingSubscription;r&&(this.remove(r),r.unsubscribe());var n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];var i;try{var s=this.closingSelector;i=s()}catch(o){return this.error(o)}r=new oe,this.closingSubscription=r,this.add(r),this.subscribing=!0,r.add(ue(i,new ae(this))),this.subscribing=!1},e}(ce);function V2(t){return function(r){var n=new H2(t),i=r.lift(n);return n.caught=i}}var H2=function(){function t(e){this.selector=e}return t.prototype.call=function(e,r){return r.subscribe(new W2(e,this.selector,this.caught))},t}(),W2=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.selector=n,s.caught=i,s}return e.prototype.error=function(r){if(!this.isStopped){var n=void 0;try{n=this.selector(r,this.caught)}catch(o){t.prototype.error.call(this,o);return}this._unsubscribeAndRecycle();var i=new ae(this);this.add(i);var s=ue(n,i);s!==i&&this.add(s)}},e}(ce);function z2(t){return function(e){return e.lift(new Da(t))}}function U2(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=null;return typeof t[t.length-1]=="function"&&(r=t.pop()),t.length===1&&ke(t[0])&&(t=t[0].slice()),function(n){return n.lift.call(_t([n].concat(t)),new Da(r))}}function q2(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(r){return r.lift.call(nn.apply(void 0,[r].concat(t)))}}function id(t,e){return Gt(t,e,1)}function G2(t,e){return id(function(){return t},e)}function J2(t){return function(e){return e.lift(new Q2(t,e))}}var Q2=function(){function t(e,r){this.predicate=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new Z2(e,this.predicate,this.source))},t}(),Z2=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.predicate=n,s.source=i,s.count=0,s.index=0,s}return e.prototype._next=function(r){this.predicate?this._tryPredicate(r):this.count++},e.prototype._tryPredicate=function(r){var n;try{n=this.predicate(r,this.index++,this.source)}catch(i){this.destination.error(i);return}n&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(M);function Y2(t){return function(e){return e.lift(new K2(t))}}var K2=function(){function t(e){this.durationSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new X2(e,this.durationSelector))},t}(),X2=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.durationSelector=n,i.hasValue=!1,i}return e.prototype._next=function(r){try{var n=this.durationSelector.call(this,r);n&&this._tryNext(r,n)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(r,n){var i=this.durationSubscription;this.value=r,this.hasValue=!0,i&&(i.unsubscribe(),this.remove(i)),i=ue(n,new ae(this)),i&&!i.closed&&this.add(this.durationSubscription=i)},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var r=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,r)}},e}(ce);function eS(t,e){return e===void 0&&(e=Me),function(r){return r.lift(new tS(t,e))}}var tS=function(){function t(e,r){this.dueTime=e,this.scheduler=r}return t.prototype.call=function(e,r){return r.subscribe(new rS(e,this.dueTime,this.scheduler))},t}(),rS=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.dueTime=n,s.scheduler=i,s.debouncedSubscription=null,s.lastValue=null,s.hasValue=!1,s}return e.prototype._next=function(r){this.clearDebounce(),this.lastValue=r,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(nS,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var r=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(r)}},e.prototype.clearDebounce=function(){var r=this.debouncedSubscription;r!==null&&(this.remove(r),r.unsubscribe(),this.debouncedSubscription=null)},e}(M);function nS(t){t.debouncedNext()}function xn(t){return t===void 0&&(t=null),function(e){return e.lift(new iS(t))}}var iS=function(){function t(e){this.defaultValue=e}return t.prototype.call=function(e,r){return r.subscribe(new sS(e,this.defaultValue))},t}(),sS=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.defaultValue=n,i.isEmpty=!0,i}return e.prototype._next=function(r){this.isEmpty=!1,this.destination.next(r)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(M);function sd(t){return t instanceof Date&&!isNaN(+t)}function oS(t,e){e===void 0&&(e=Me);var r=sd(t),n=r?+t-e.now():Math.abs(t);return function(i){return i.lift(new aS(n,e))}}var aS=function(){function t(e,r){this.delay=e,this.scheduler=r}return t.prototype.call=function(e,r){return r.subscribe(new cS(e,this.delay,this.scheduler))},t}(),cS=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.delay=n,s.scheduler=i,s.queue=[],s.active=!1,s.errored=!1,s}return e.dispatch=function(r){for(var n=r.source,i=n.queue,s=r.scheduler,o=r.destination;i.length>0&&i[0].time-s.now()<=0;)i.shift().notification.observe(o);if(i.length>0){var a=Math.max(0,i[0].time-s.now());this.schedule(r,a)}else this.unsubscribe(),n.active=!1},e.prototype._schedule=function(r){this.active=!0;var n=this.destination;n.add(r.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:r}))},e.prototype.scheduleNotification=function(r){if(this.errored!==!0){var n=this.scheduler,i=new uS(n.now()+this.delay,r);this.queue.push(i),this.active===!1&&this._schedule(n)}},e.prototype._next=function(r){this.scheduleNotification(mt.createNext(r))},e.prototype._error=function(r){this.errored=!0,this.queue=[],this.destination.error(r),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(mt.createComplete()),this.unsubscribe()},e}(M),uS=function(){function t(e,r){this.time=e,this.notification=r}return t}();function lS(t,e){return e?function(r){return new fS(r,e).lift(new sl(t))}:function(r){return r.lift(new sl(t))}}var sl=function(){function t(e){this.delayDurationSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new hS(e,this.delayDurationSelector))},t}(),hS=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.delayDurationSelector=n,i.completed=!1,i.delayNotifierSubscriptions=[],i.index=0,i}return e.prototype.notifyNext=function(r,n,i,s,o){this.destination.next(r),this.removeSubscription(o),this.tryComplete()},e.prototype.notifyError=function(r,n){this._error(r)},e.prototype.notifyComplete=function(r){var n=this.removeSubscription(r);n&&this.destination.next(n),this.tryComplete()},e.prototype._next=function(r){var n=this.index++;try{var i=this.delayDurationSelector(r,n);i&&this.tryDelay(i,r)}catch(s){this.destination.error(s)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(r){r.unsubscribe();var n=this.delayNotifierSubscriptions.indexOf(r);return n!==-1&&this.delayNotifierSubscriptions.splice(n,1),r.outerValue},e.prototype.tryDelay=function(r,n){var i=yt(this,r,n);if(i&&!i.closed){var s=this.destination;s.add(i),this.delayNotifierSubscriptions.push(i)}},e.prototype.tryComplete=function(){this.completed&&this.delayNotifierSubscriptions.length===0&&this.destination.complete()},e}(Xt),fS=function(t){m(e,t);function e(r,n){var i=t.call(this)||this;return i.source=r,i.subscriptionDelay=n,i}return e.prototype._subscribe=function(r){this.subscriptionDelay.subscribe(new dS(r,this.source))},e}(H),dS=function(t){m(e,t);function e(r,n){var i=t.call(this)||this;return i.parent=r,i.source=n,i.sourceSubscribed=!1,i}return e.prototype._next=function(r){this.subscribeToSource()},e.prototype._error=function(r){this.unsubscribe(),this.parent.error(r)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(M);function pS(){return function(e){return e.lift(new bS)}}var bS=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new gS(e))},t}(),gS=function(t){m(e,t);function e(r){return t.call(this,r)||this}return e.prototype._next=function(r){r.observe(this.destination)},e}(M);function mS(t,e){return function(r){return r.lift(new yS(t,e))}}var yS=function(){function t(e,r){this.keySelector=e,this.flushes=r}return t.prototype.call=function(e,r){return r.subscribe(new vS(e,this.keySelector,this.flushes))},t}(),vS=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.keySelector=n,s.values=new Set,i&&s.add(ue(i,new ae(s))),s}return e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(r){this._error(r)},e.prototype._next=function(r){this.keySelector?this._useKeySelector(r):this._finalizeNext(r,r)},e.prototype._useKeySelector=function(r){var n,i=this.destination;try{n=this.keySelector(r)}catch(s){i.error(s);return}this._finalizeNext(n,r)},e.prototype._finalizeNext=function(r,n){var i=this.values;i.has(r)||(i.add(r),this.destination.next(n))},e}(ce);function od(t,e){return function(r){return r.lift(new _S(t,e))}}var _S=function(){function t(e,r){this.compare=e,this.keySelector=r}return t.prototype.call=function(e,r){return r.subscribe(new wS(e,this.compare,this.keySelector))},t}(),wS=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.keySelector=i,s.hasKey=!1,typeof n=="function"&&(s.compare=n),s}return e.prototype.compare=function(r,n){return r===n},e.prototype._next=function(r){var n;try{var i=this.keySelector;n=i?i(r):r}catch(a){return this.destination.error(a)}var s=!1;if(this.hasKey)try{var o=this.compare;s=o(this.key,n)}catch(a){return this.destination.error(a)}else this.hasKey=!0;s||(this.key=n,this.destination.next(r))},e}(M);function SS(t,e){return od(function(r,n){return e?e(r[t],n[t]):r[t]===n[t]})}function Ji(t){return t===void 0&&(t=IS),function(e){return e.lift(new ES(t))}}var ES=function(){function t(e){this.errorFactory=e}return t.prototype.call=function(e,r){return r.subscribe(new CS(e,this.errorFactory))},t}(),CS=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.errorFactory=n,i.hasValue=!1,i}return e.prototype._next=function(r){this.hasValue=!0,this.destination.next(r)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var r=void 0;try{r=this.errorFactory()}catch(n){r=n}this.destination.error(r)},e}(M);function IS(){return new Cn}function Xa(t){return function(e){return t===0?$r():e.lift(new xS(t))}}var xS=function(){function t(e){if(this.total=e,this.total<0)throw new Er}return t.prototype.call=function(e,r){return r.subscribe(new RS(e,this.total))},t}(),RS=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.total=n,i.count=0,i}return e.prototype._next=function(r){var n=this.total,i=++this.count;i<=n&&(this.destination.next(r),i===n&&(this.destination.complete(),this.unsubscribe()))},e}(M);function kS(t,e){if(t<0)throw new Er;var r=arguments.length>=2;return function(n){return n.pipe(Nt(function(i,s){return s===t}),Xa(1),r?xn(e):Ji(function(){return new Er}))}}function MS(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(r){return nn(r,Oi.apply(void 0,t))}}function AS(t,e){return function(r){return r.lift(new TS(t,e,r))}}var TS=function(){function t(e,r,n){this.predicate=e,this.thisArg=r,this.source=n}return t.prototype.call=function(e,r){return r.subscribe(new NS(e,this.predicate,this.thisArg,this.source))},t}(),NS=function(t){m(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.predicate=n,o.thisArg=i,o.source=s,o.index=0,o.thisArg=i||o,o}return e.prototype.notifyComplete=function(r){this.destination.next(r),this.destination.complete()},e.prototype._next=function(r){var n=!1;try{n=this.predicate.call(this.thisArg,r,this.index++,this.source)}catch(i){this.destination.error(i);return}n||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(M);function OS(){return function(t){return t.lift(new LS)}}var LS=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new jS(e))},t}(),jS=function(t){m(e,t);function e(r){var n=t.call(this,r)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return e.prototype._next=function(r){this.hasSubscription||(this.hasSubscription=!0,this.add(ue(r,new ae(this))))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(ce);function ad(t,e){return e?function(r){return r.pipe(ad(function(n,i){return _t(t(n,i)).pipe(Ue(function(s,o){return e(n,s,i,o)}))}))}:function(r){return r.lift(new PS(t))}}var PS=function(){function t(e){this.project=e}return t.prototype.call=function(e,r){return r.subscribe(new $S(e,this.project))},t}(),$S=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.project=n,i.hasSubscription=!1,i.hasCompleted=!1,i.index=0,i}return e.prototype._next=function(r){this.hasSubscription||this.tryNext(r)},e.prototype.tryNext=function(r){var n,i=this.index++;try{n=this.project(r,i)}catch(s){this.destination.error(s);return}this.hasSubscription=!0,this._innerSub(n)},e.prototype._innerSub=function(r){var n=new ae(this),i=this.destination;i.add(n);var s=ue(r,n);s!==n&&i.add(s)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(r){this.destination.next(r)},e.prototype.notifyError=function(r){this.destination.error(r)},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(ce);function DS(t,e,r){return e===void 0&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(n){return n.lift(new FS(t,e,r))}}var FS=function(){function t(e,r,n){this.project=e,this.concurrent=r,this.scheduler=n}return t.prototype.call=function(e,r){return r.subscribe(new BS(e,this.project,this.concurrent,this.scheduler))},t}(),BS=function(t){m(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.project=n,o.concurrent=i,o.scheduler=s,o.index=0,o.active=0,o.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return e.dispatch=function(r){var n=r.subscriber,i=r.result,s=r.value,o=r.index;n.subscribeToProjection(i,s,o)},e.prototype._next=function(r){var n=this.destination;if(n.closed){this._complete();return}var i=this.index++;if(this.active<this.concurrent){n.next(r);try{var s=this.project,o=s(r,i);if(!this.scheduler)this.subscribeToProjection(o,r,i);else{var a={subscriber:this,result:o,value:r,index:i},c=this.destination;c.add(this.scheduler.schedule(e.dispatch,0,a))}}catch(u){n.error(u)}}else this.buffer.push(r)},e.prototype.subscribeToProjection=function(r,n,i){this.active++;var s=this.destination;s.add(ue(r,new ae(this)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&this.active===0&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(r){this._next(r)},e.prototype.notifyComplete=function(){var r=this.buffer;this.active--,r&&r.length>0&&this._next(r.shift()),this.hasCompleted&&this.active===0&&this.destination.complete()},e}(ce);function VS(t){return function(e){return e.lift(new HS(t))}}var HS=function(){function t(e){this.callback=e}return t.prototype.call=function(e,r){return r.subscribe(new WS(e,this.callback))},t}(),WS=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.add(new oe(n)),i}return e}(M);function zS(t,e){if(typeof t!="function")throw new TypeError("predicate is not a function");return function(r){return r.lift(new cd(t,r,!1,e))}}var cd=function(){function t(e,r,n,i){this.predicate=e,this.source=r,this.yieldIndex=n,this.thisArg=i}return t.prototype.call=function(e,r){return r.subscribe(new US(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),US=function(t){m(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;return a.predicate=n,a.source=i,a.yieldIndex=s,a.thisArg=o,a.index=0,a}return e.prototype.notifyComplete=function(r){var n=this.destination;n.next(r),n.complete(),this.unsubscribe()},e.prototype._next=function(r){var n=this,i=n.predicate,s=n.thisArg,o=this.index++;try{var a=i.call(s||this,r,o,this.source);a&&this.notifyComplete(this.yieldIndex?o:r)}catch(c){this.destination.error(c)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(M);function qS(t,e){return function(r){return r.lift(new cd(t,r,!0,e))}}function GS(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?Nt(function(i,s){return t(i,s,n)}):At,Xa(1),r?xn(e):Ji(function(){return new Cn}))}}function JS(){return function(e){return e.lift(new QS)}}var QS=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new ZS(e))},t}(),ZS=function(t){m(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype._next=function(r){},e}(M);function YS(){return function(t){return t.lift(new KS)}}var KS=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new XS(e))},t}(),XS=function(t){m(e,t);function e(r){return t.call(this,r)||this}return e.prototype.notifyComplete=function(r){var n=this.destination;n.next(r),n.complete()},e.prototype._next=function(r){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(M);function ei(t){return function(r){return t===0?$r():r.lift(new eE(t))}}var eE=function(){function t(e){if(this.total=e,this.total<0)throw new Er}return t.prototype.call=function(e,r){return r.subscribe(new tE(e,this.total))},t}(),tE=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.total=n,i.ring=new Array,i.count=0,i}return e.prototype._next=function(r){var n=this.ring,i=this.total,s=this.count++;if(n.length<i)n.push(r);else{var o=s%i;n[o]=r}},e.prototype._complete=function(){var r=this.destination,n=this.count;if(n>0)for(var i=this.count>=this.total?this.total:this.count,s=this.ring,o=0;o<i;o++){var a=n++%i;r.next(s[a])}r.complete()},e}(M);function rE(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?Nt(function(i,s){return t(i,s,n)}):At,ei(1),r?xn(e):Ji(function(){return new Cn}))}}function nE(t){return function(e){return e.lift(new iE(t))}}var iE=function(){function t(e){this.value=e}return t.prototype.call=function(e,r){return r.subscribe(new sE(e,this.value))},t}(),sE=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.value=n,i}return e.prototype._next=function(r){this.destination.next(this.value)},e}(M);function oE(){return function(e){return e.lift(new aE)}}var aE=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new cE(e))},t}(),cE=function(t){m(e,t);function e(r){return t.call(this,r)||this}return e.prototype._next=function(r){this.destination.next(mt.createNext(r))},e.prototype._error=function(r){var n=this.destination;n.next(mt.createError(r)),n.complete()},e.prototype._complete=function(){var r=this.destination;r.next(mt.createComplete()),r.complete()},e}(M);function ti(t,e){var r=!1;return arguments.length>=2&&(r=!0),function(i){return i.lift(new uE(t,e,r))}}var uE=function(){function t(e,r,n){n===void 0&&(n=!1),this.accumulator=e,this.seed=r,this.hasSeed=n}return t.prototype.call=function(e,r){return r.subscribe(new lE(e,this.accumulator,this.seed,this.hasSeed))},t}(),lE=function(t){m(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.accumulator=n,o._seed=i,o.hasSeed=s,o.index=0,o}return Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(r){this.hasSeed=!0,this._seed=r},enumerable:!0,configurable:!0}),e.prototype._next=function(r){if(!this.hasSeed)this.seed=r,this.destination.next(r);else return this._tryNext(r)},e.prototype._tryNext=function(r){var n=this.index++,i;try{i=this.accumulator(this.seed,r,n)}catch(s){this.destination.error(s)}this.seed=i,this.destination.next(i)},e}(M);function Qi(t,e){return arguments.length>=2?function(n){return Ho(ti(t,e),ei(1),xn(e))(n)}:function(n){return Ho(ti(function(i,s,o){return t(i,s,o+1)}),ei(1))(n)}}function hE(t){var e=typeof t=="function"?function(r,n){return t(r,n)>0?r:n}:function(r,n){return r>n?r:n};return Qi(e)}function fE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(r){return r.lift.call(Of.apply(void 0,[r].concat(t)))}}function dE(t,e,r){return r===void 0&&(r=Number.POSITIVE_INFINITY),typeof e=="function"?Gt(function(){return t},e,r):(typeof e=="number"&&(r=e),Gt(function(){return t},r))}function pE(t,e,r){return r===void 0&&(r=Number.POSITIVE_INFINITY),function(n){return n.lift(new bE(t,e,r))}}var bE=function(){function t(e,r,n){this.accumulator=e,this.seed=r,this.concurrent=n}return t.prototype.call=function(e,r){return r.subscribe(new gE(e,this.accumulator,this.seed,this.concurrent))},t}(),gE=function(t){m(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.accumulator=n,o.acc=i,o.concurrent=s,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return e.prototype._next=function(r){if(this.active<this.concurrent){var n=this.index++,i=this.destination,s=void 0;try{var o=this.accumulator;s=o(this.acc,r,n)}catch(a){return i.error(a)}this.active++,this._innerSub(s)}else this.buffer.push(r)},e.prototype._innerSub=function(r){var n=new ae(this),i=this.destination;i.add(n);var s=ue(r,n);s!==n&&i.add(s)},e.prototype._complete=function(){this.hasCompleted=!0,this.active===0&&this.buffer.length===0&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(r){var n=this.destination;this.acc=r,this.hasValue=!0,n.next(r)},e.prototype.notifyComplete=function(){var r=this.buffer;this.active--,r.length>0?this._next(r.shift()):this.active===0&&this.hasCompleted&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete())},e}(ce);function mE(t){var e=typeof t=="function"?function(r,n){return t(r,n)<0?r:n}:function(r,n){return r<n?r:n};return Qi(e)}function Jt(t,e){return function(n){var i;if(typeof t=="function"?i=t:i=function(){return t},typeof e=="function")return n.lift(new yE(i,e));var s=Object.create(n,Zv);return s.source=n,s.subjectFactory=i,s}}var yE=function(){function t(e,r){this.subjectFactory=e,this.selector=r}return t.prototype.call=function(e,r){var n=this.selector,i=this.subjectFactory(),s=n(i).subscribe(e);return s.add(r.subscribe(i)),s},t}();function vE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length===1&&ke(t[0])&&(t=t[0]),function(r){return r.lift(new _E(t))}}var _E=function(){function t(e){this.nextSources=e}return t.prototype.call=function(e,r){return r.subscribe(new wE(e,this.nextSources))},t}(),wE=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.destination=r,i.nextSources=n,i}return e.prototype.notifyError=function(){this.subscribeToNextSource()},e.prototype.notifyComplete=function(){this.subscribeToNextSource()},e.prototype._error=function(r){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var r=this.nextSources.shift();if(r){var n=new ae(this),i=this.destination;i.add(n);var s=ue(r,n);s!==n&&i.add(s)}else this.destination.complete()},e}(ce);function SE(){return function(t){return t.lift(new EE)}}var EE=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new CE(e))},t}(),CE=function(t){m(e,t);function e(r){var n=t.call(this,r)||this;return n.hasPrev=!1,n}return e.prototype._next=function(r){var n;this.hasPrev?n=[this.prev,r]:this.hasPrev=!0,this.prev=r,n&&this.destination.next(n)},e}(M);function IE(t,e){return function(r){return[Nt(t,e)(r),Nt(jf(t,e))(r)]}}function xE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.length;if(r===0)throw new Error("list of properties cannot be empty.");return function(n){return Ue(RE(t,r))(n)}}function RE(t,e){var r=function(n){for(var i=n,s=0;s<e;s++){var o=i!=null?i[t[s]]:void 0;if(o!==void 0)i=o;else return}return i};return r}function kE(t){return t?Jt(function(){return new ye},t):Jt(new ye)}function ME(t){return function(e){return Jt(new pf(t))(e)}}function AE(){return function(t){return Jt(new Dr)(t)}}function TE(t,e,r,n){r&&typeof r!="function"&&(n=r);var i=typeof r=="function"?r:void 0,s=new $a(t,e,n);return function(o){return Jt(function(){return s},i)(o)}}function NE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(n){return t.length===1&&ke(t[0])&&(t=t[0]),n.lift.call(Pf.apply(void 0,[n].concat(t)))}}function OE(t){return t===void 0&&(t=-1),function(e){return t===0?$r():t<0?e.lift(new ol(-1,e)):e.lift(new ol(t-1,e))}}var ol=function(){function t(e,r){this.count=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new LE(e,this.count,this.source))},t}(),LE=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.count=n,s.source=i,s}return e.prototype.complete=function(){if(!this.isStopped){var r=this,n=r.source,i=r.count;if(i===0)return t.prototype.complete.call(this);i>-1&&(this.count=i-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(M);function jE(t){return function(e){return e.lift(new PE(t))}}var PE=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){return r.subscribe(new $E(e,this.notifier,r))},t}(),$E=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.notifier=n,s.source=i,s.sourceIsBeingSubscribedTo=!0,s}return e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(this.sourceIsBeingSubscribedTo===!1)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var r=this,n=r.notifications,i=r.retriesSubscription;n&&(n.unsubscribe(),this.notifications=void 0),i&&(i.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var r=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=r,this},e.prototype.subscribeToRetries=function(){this.notifications=new ye;var r;try{var n=this.notifier;r=n(this.notifications)}catch{return t.prototype.complete.call(this)}this.retries=r,this.retriesSubscription=ue(r,new ae(this))},e}(ce);function DE(t){return t===void 0&&(t=-1),function(e){return e.lift(new FE(t,e))}}var FE=function(){function t(e,r){this.count=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new BE(e,this.count,this.source))},t}(),BE=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.count=n,s.source=i,s}return e.prototype.error=function(r){if(!this.isStopped){var n=this,i=n.source,s=n.count;if(s===0)return t.prototype.error.call(this,r);s>-1&&(this.count=s-1),i.subscribe(this._unsubscribeAndRecycle())}},e}(M);function VE(t){return function(e){return e.lift(new HE(t,e))}}var HE=function(){function t(e,r){this.notifier=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new WE(e,this.notifier,this.source))},t}(),WE=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.notifier=n,s.source=i,s}return e.prototype.error=function(r){if(!this.isStopped){var n=this.errors,i=this.retries,s=this.retriesSubscription;if(i)this.errors=void 0,this.retriesSubscription=void 0;else{n=new ye;try{var o=this.notifier;i=o(n)}catch(a){return t.prototype.error.call(this,a)}s=ue(i,new ae(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=s,n.next(r)}},e.prototype._unsubscribe=function(){var r=this,n=r.errors,i=r.retriesSubscription;n&&(n.unsubscribe(),this.errors=void 0),i&&(i.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var r=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=r,this.source.subscribe(this)},e}(ce);function zE(t){return function(e){return e.lift(new UE(t))}}var UE=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){var n=new qE(e),i=r.subscribe(n);return i.add(ue(this.notifier,new ae(n))),i},t}(),qE=function(t){m(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasValue=!1,r}return e.prototype._next=function(r){this.value=r,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(ce);function GE(t,e){return e===void 0&&(e=Me),function(r){return r.lift(new JE(t,e))}}var JE=function(){function t(e,r){this.period=e,this.scheduler=r}return t.prototype.call=function(e,r){return r.subscribe(new QE(e,this.period,this.scheduler))},t}(),QE=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.period=n,s.scheduler=i,s.hasValue=!1,s.add(i.schedule(ZE,n,{subscriber:s,period:n})),s}return e.prototype._next=function(r){this.lastValue=r,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(M);function ZE(t){var e=t.subscriber,r=t.period;e.notifyNext(),this.schedule(t,r)}function YE(t,e){return function(r){return r.lift(new KE(t,e))}}var KE=function(){function t(e,r){this.compareTo=e,this.comparator=r}return t.prototype.call=function(e,r){return r.subscribe(new XE(e,this.compareTo,this.comparator))},t}(),XE=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.compareTo=n,s.comparator=i,s._a=[],s._b=[],s._oneComplete=!1,s.destination.add(n.subscribe(new e3(r,s))),s}return e.prototype._next=function(r){this._oneComplete&&this._b.length===0?this.emit(!1):(this._a.push(r),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(this._a.length===0&&this._b.length===0):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var r=this,n=r._a,i=r._b,s=r.comparator;n.length>0&&i.length>0;){var o=n.shift(),a=i.shift(),c=!1;try{c=s?s(o,a):o===a}catch(u){this.destination.error(u)}c||this.emit(!1)}},e.prototype.emit=function(r){var n=this.destination;n.next(r),n.complete()},e.prototype.nextB=function(r){this._oneComplete&&this._a.length===0?this.emit(!1):(this._b.push(r),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(this._a.length===0&&this._b.length===0):this._oneComplete=!0},e}(M),e3=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.parent=n,i}return e.prototype._next=function(r){this.parent.nextB(r)},e.prototype._error=function(r){this.parent.error(r),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(M);function t3(){return new ye}function r3(){return function(t){return La()(Jt(t3)(t))}}function n3(t,e,r){var n;return t&&typeof t=="object"?n=t:n={bufferSize:t,windowTime:e,refCount:!1,scheduler:r},function(i){return i.lift(i3(n))}}function i3(t){var e=t.bufferSize,r=e===void 0?Number.POSITIVE_INFINITY:e,n=t.windowTime,i=n===void 0?Number.POSITIVE_INFINITY:n,s=t.refCount,o=t.scheduler,a,c=0,u,l=!1,h=!1;return function(d){c++;var p;!a||l?(l=!1,a=new $a(r,i,o),p=a.subscribe(this),u=d.subscribe({next:function(g){a.next(g)},error:function(g){l=!0,a.error(g)},complete:function(){h=!0,u=void 0,a.complete()}}),h&&(u=void 0)):p=a.subscribe(this),this.add(function(){c--,p.unsubscribe(),p=void 0,u&&!h&&s&&c===0&&(u.unsubscribe(),u=void 0,a=void 0)})}}function s3(t){return function(e){return e.lift(new o3(t,e))}}var o3=function(){function t(e,r){this.predicate=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new a3(e,this.predicate,this.source))},t}(),a3=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.predicate=n,s.source=i,s.seenValue=!1,s.index=0,s}return e.prototype.applySingleValue=function(r){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=r)},e.prototype._next=function(r){var n=this.index++;this.predicate?this.tryNext(r,n):this.applySingleValue(r)},e.prototype.tryNext=function(r,n){try{this.predicate(r,n,this.source)&&this.applySingleValue(r)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){var r=this.destination;this.index>0?(r.next(this.seenValue?this.singleValue:void 0),r.complete()):r.error(new Cn)},e}(M);function c3(t){return function(e){return e.lift(new u3(t))}}var u3=function(){function t(e){this.total=e}return t.prototype.call=function(e,r){return r.subscribe(new l3(e,this.total))},t}(),l3=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.total=n,i.count=0,i}return e.prototype._next=function(r){++this.count>this.total&&this.destination.next(r)},e}(M);function h3(t){return function(e){return e.lift(new f3(t))}}var f3=function(){function t(e){if(this._skipCount=e,this._skipCount<0)throw new Er}return t.prototype.call=function(e,r){return this._skipCount===0?r.subscribe(new M(e)):r.subscribe(new d3(e,this._skipCount))},t}(),d3=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i._skipCount=n,i._count=0,i._ring=new Array(n),i}return e.prototype._next=function(r){var n=this._skipCount,i=this._count++;if(i<n)this._ring[i]=r;else{var s=i%n,o=this._ring,a=o[s];o[s]=r,this.destination.next(a)}},e}(M);function p3(t){return function(e){return e.lift(new b3(t))}}var b3=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){return r.subscribe(new g3(e,this.notifier))},t}(),g3=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;i.hasValue=!1;var s=new ae(i);i.add(s),i.innerSubscription=s;var o=ue(n,s);return o!==s&&(i.add(o),i.innerSubscription=o),i}return e.prototype._next=function(r){this.hasValue&&t.prototype._next.call(this,r)},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(ce);function m3(t){return function(e){return e.lift(new y3(t))}}var y3=function(){function t(e){this.predicate=e}return t.prototype.call=function(e,r){return r.subscribe(new v3(e,this.predicate))},t}(),v3=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.predicate=n,i.skipping=!0,i.index=0,i}return e.prototype._next=function(r){var n=this.destination;this.skipping&&this.tryCallPredicate(r),this.skipping||n.next(r)},e.prototype.tryCallPredicate=function(r){try{var n=this.predicate(r,this.index++);this.skipping=!!n}catch(i){this.destination.error(i)}},e}(M);function _3(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return je(r)?(t.pop(),function(n){return nn(t,n,r)}):function(n){return nn(t,n)}}var w3=function(t){m(e,t);function e(r,n,i){n===void 0&&(n=0),i===void 0&&(i=Vn);var s=t.call(this)||this;return s.source=r,s.delayTime=n,s.scheduler=i,(!Cr(n)||n<0)&&(s.delayTime=0),(!i||typeof i.schedule!="function")&&(s.scheduler=Vn),s}return e.create=function(r,n,i){return n===void 0&&(n=0),i===void 0&&(i=Vn),new e(r,n,i)},e.dispatch=function(r){var n=r.source,i=r.subscriber;return this.add(n.subscribe(i))},e.prototype._subscribe=function(r){var n=this.delayTime,i=this.source,s=this.scheduler;return s.schedule(e.dispatch,n,{source:i,subscriber:r})},e}(H);function S3(t,e){return e===void 0&&(e=0),function(n){return n.lift(new E3(t,e))}}var E3=function(){function t(e,r){this.scheduler=e,this.delay=r}return t.prototype.call=function(e,r){return new w3(r,this.delay,this.scheduler).subscribe(e)},t}();function sn(t,e){return typeof e=="function"?function(r){return r.pipe(sn(function(n,i){return _t(t(n,i)).pipe(Ue(function(s,o){return e(n,s,i,o)}))}))}:function(r){return r.lift(new C3(t))}}var C3=function(){function t(e){this.project=e}return t.prototype.call=function(e,r){return r.subscribe(new I3(e,this.project))},t}(),I3=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.project=n,i.index=0,i}return e.prototype._next=function(r){var n,i=this.index++;try{n=this.project(r,i)}catch(s){this.destination.error(s);return}this._innerSub(n)},e.prototype._innerSub=function(r){var n=this.innerSubscription;n&&n.unsubscribe();var i=new ae(this),s=this.destination;s.add(i),this.innerSubscription=ue(r,i),this.innerSubscription!==i&&s.add(this.innerSubscription)},e.prototype._complete=function(){var r=this.innerSubscription;(!r||r.closed)&&t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(r){this.destination.next(r)},e}(ce);function x3(){return sn(At)}function R3(t,e){return e?sn(function(){return t},e):sn(function(){return t})}function k3(t){return function(e){return e.lift(new M3(t))}}var M3=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){var n=new A3(e),i=ue(this.notifier,new ae(n));return i&&!n.seenValue?(n.add(i),r.subscribe(n)):n},t}(),A3=function(t){m(e,t);function e(r){var n=t.call(this,r)||this;return n.seenValue=!1,n}return e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(ce);function T3(t,e){return e===void 0&&(e=!1),function(r){return r.lift(new N3(t,e))}}var N3=function(){function t(e,r){this.predicate=e,this.inclusive=r}return t.prototype.call=function(e,r){return r.subscribe(new O3(e,this.predicate,this.inclusive))},t}(),O3=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.predicate=n,s.inclusive=i,s.index=0,s}return e.prototype._next=function(r){var n=this.destination,i;try{i=this.predicate(r,this.index++)}catch(s){n.error(s);return}this.nextOrComplete(r,i)},e.prototype.nextOrComplete=function(r,n){var i=this.destination;n?i.next(r):(this.inclusive&&i.next(r),i.complete())},e}(M);function L3(t,e,r){return function(i){return i.lift(new j3(t,e,r))}}var j3=function(){function t(e,r,n){this.nextOrObserver=e,this.error=r,this.complete=n}return t.prototype.call=function(e,r){return r.subscribe(new P3(e,this.nextOrObserver,this.error,this.complete))},t}(),P3=function(t){m(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o._tapNext=st,o._tapError=st,o._tapComplete=st,o._tapError=i||st,o._tapComplete=s||st,wr(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||st,o._tapError=n.error||st,o._tapComplete=n.complete||st),o}return e.prototype._next=function(r){try{this._tapNext.call(this._context,r)}catch(n){this.destination.error(n);return}this.destination.next(r)},e.prototype._error=function(r){try{this._tapError.call(this._context,r)}catch(n){this.destination.error(n);return}this.destination.error(r)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(r){this.destination.error(r);return}return this.destination.complete()},e}(M),ud={leading:!0,trailing:!1};function $3(t,e){return e===void 0&&(e=ud),function(r){return r.lift(new D3(t,!!e.leading,!!e.trailing))}}var D3=function(){function t(e,r,n){this.durationSelector=e,this.leading=r,this.trailing=n}return t.prototype.call=function(e,r){return r.subscribe(new F3(e,this.durationSelector,this.leading,this.trailing))},t}(),F3=function(t){m(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.destination=r,o.durationSelector=n,o._leading=i,o._trailing=s,o._hasValue=!1,o}return e.prototype._next=function(r){this._hasValue=!0,this._sendValue=r,this._throttled||(this._leading?this.send():this.throttle(r))},e.prototype.send=function(){var r=this,n=r._hasValue,i=r._sendValue;n&&(this.destination.next(i),this.throttle(i)),this._hasValue=!1,this._sendValue=void 0},e.prototype.throttle=function(r){var n=this.tryDurationSelector(r);n&&this.add(this._throttled=ue(n,new ae(this)))},e.prototype.tryDurationSelector=function(r){try{return this.durationSelector(r)}catch(n){return this.destination.error(n),null}},e.prototype.throttlingDone=function(){var r=this,n=r._throttled,i=r._trailing;n&&n.unsubscribe(),this._throttled=void 0,i&&this.send()},e.prototype.notifyNext=function(){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(ce);function B3(t,e,r){return e===void 0&&(e=Me),r===void 0&&(r=ud),function(n){return n.lift(new V3(t,e,r.leading,r.trailing))}}var V3=function(){function t(e,r,n,i){this.duration=e,this.scheduler=r,this.leading=n,this.trailing=i}return t.prototype.call=function(e,r){return r.subscribe(new H3(e,this.duration,this.scheduler,this.leading,this.trailing))},t}(),H3=function(t){m(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;return a.duration=n,a.scheduler=i,a.leading=s,a.trailing=o,a._hasTrailingValue=!1,a._trailingValue=null,a}return e.prototype._next=function(r){this.throttled?this.trailing&&(this._trailingValue=r,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(W3,this.duration,{subscriber:this})),this.leading?this.destination.next(r):this.trailing&&(this._trailingValue=r,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var r=this.throttled;r&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),r.unsubscribe(),this.remove(r),this.throttled=null)},e}(M);function W3(t){var e=t.subscriber;e.clearThrottle()}function z3(t){return t===void 0&&(t=Me),function(e){return Ba(function(){return e.pipe(ti(function(r,n){var i=r.current;return{value:n,current:t.now(),last:i}},{current:t.now(),value:void 0,last:void 0}),Ue(function(r){var n=r.current,i=r.last,s=r.value;return new U3(s,n-i)}))})}}var U3=function(){function t(e,r){this.value=e,this.interval=r}return t}();function ld(t,e,r){return r===void 0&&(r=Me),function(n){var i=sd(t),s=i?+t-r.now():Math.abs(t);return n.lift(new q3(s,i,e,r))}}var q3=function(){function t(e,r,n,i){this.waitFor=e,this.absoluteTimeout=r,this.withObservable=n,this.scheduler=i}return t.prototype.call=function(e,r){return r.subscribe(new G3(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),G3=function(t){m(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;return a.absoluteTimeout=n,a.waitFor=i,a.withObservable=s,a.scheduler=o,a.scheduleTimeout(),a}return e.dispatchTimeout=function(r){var n=r.withObservable;r._unsubscribeAndRecycle(),r.add(ue(n,new ae(r)))},e.prototype.scheduleTimeout=function(){var r=this.action;r?this.action=r.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(r){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,r)},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},e}(ce);function J3(t,e){return e===void 0&&(e=Me),ld(t,Pa(new Ef),e)}function Q3(t){return t===void 0&&(t=Me),Ue(function(e){return new Z3(e,t.now())})}var Z3=function(){function t(e,r){this.value=e,this.timestamp=r}return t}();function Y3(t,e,r){return r===0?[e]:(t.push(e),t)}function K3(){return Qi(Y3,[])}function X3(t){return function(r){return r.lift(new e4(t))}}var e4=function(){function t(e){this.windowBoundaries=e}return t.prototype.call=function(e,r){var n=new t4(e),i=r.subscribe(n);return i.closed||n.add(ue(this.windowBoundaries,new ae(n))),i},t}(),t4=function(t){m(e,t);function e(r){var n=t.call(this,r)||this;return n.window=new ye,r.next(n.window),n}return e.prototype.notifyNext=function(){this.openWindow()},e.prototype.notifyError=function(r){this._error(r)},e.prototype.notifyComplete=function(){this._complete()},e.prototype._next=function(r){this.window.next(r)},e.prototype._error=function(r){this.window.error(r),this.destination.error(r)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var r=this.window;r&&r.complete();var n=this.destination,i=this.window=new ye;n.next(i)},e}(ce);function r4(t,e){return e===void 0&&(e=0),function(n){return n.lift(new n4(t,e))}}var n4=function(){function t(e,r){this.windowSize=e,this.startWindowEvery=r}return t.prototype.call=function(e,r){return r.subscribe(new i4(e,this.windowSize,this.startWindowEvery))},t}(),i4=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.destination=r,s.windowSize=n,s.startWindowEvery=i,s.windows=[new ye],s.count=0,r.next(s.windows[0]),s}return e.prototype._next=function(r){for(var n=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,i=this.destination,s=this.windowSize,o=this.windows,a=o.length,c=0;c<a&&!this.closed;c++)o[c].next(r);var u=this.count-s+1;if(u>=0&&u%n===0&&!this.closed&&o.shift().complete(),++this.count%n===0&&!this.closed){var l=new ye;o.push(l),i.next(l)}},e.prototype._error=function(r){var n=this.windows;if(n)for(;n.length>0&&!this.closed;)n.shift().error(r);this.destination.error(r)},e.prototype._complete=function(){var r=this.windows;if(r)for(;r.length>0&&!this.closed;)r.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(M);function s4(t){var e=Me,r=null,n=Number.POSITIVE_INFINITY;return je(arguments[3])&&(e=arguments[3]),je(arguments[2])?e=arguments[2]:Cr(arguments[2])&&(n=Number(arguments[2])),je(arguments[1])?e=arguments[1]:Cr(arguments[1])&&(r=Number(arguments[1])),function(s){return s.lift(new o4(t,r,n,e))}}var o4=function(){function t(e,r,n,i){this.windowTimeSpan=e,this.windowCreationInterval=r,this.maxWindowSize=n,this.scheduler=i}return t.prototype.call=function(e,r){return r.subscribe(new c4(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),a4=function(t){m(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._numberOfNextedValues=0,r}return e.prototype.next=function(r){this._numberOfNextedValues++,t.prototype.next.call(this,r)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(ye),c4=function(t){m(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;a.destination=r,a.windowTimeSpan=n,a.windowCreationInterval=i,a.maxWindowSize=s,a.scheduler=o,a.windows=[];var c=a.openWindow();if(i!==null&&i>=0){var u={subscriber:a,window:c,context:null},l={windowTimeSpan:n,windowCreationInterval:i,subscriber:a,scheduler:o};a.add(o.schedule(hd,n,u)),a.add(o.schedule(l4,i,l))}else{var h={subscriber:a,window:c,windowTimeSpan:n};a.add(o.schedule(u4,n,h))}return a}return e.prototype._next=function(r){for(var n=this.windows,i=n.length,s=0;s<i;s++){var o=n[s];o.closed||(o.next(r),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},e.prototype._error=function(r){for(var n=this.windows;n.length>0;)n.shift().error(r);this.destination.error(r)},e.prototype._complete=function(){for(var r=this.windows;r.length>0;){var n=r.shift();n.closed||n.complete()}this.destination.complete()},e.prototype.openWindow=function(){var r=new a4;this.windows.push(r);var n=this.destination;return n.next(r),r},e.prototype.closeWindow=function(r){r.complete();var n=this.windows;n.splice(n.indexOf(r),1)},e}(M);function u4(t){var e=t.subscriber,r=t.windowTimeSpan,n=t.window;n&&e.closeWindow(n),t.window=e.openWindow(),this.schedule(t,r)}function l4(t){var e=t.windowTimeSpan,r=t.subscriber,n=t.scheduler,i=t.windowCreationInterval,s=r.openWindow(),o=this,a={action:o,subscription:null},c={subscriber:r,window:s,context:a};a.subscription=n.schedule(hd,e,c),o.add(a.subscription),o.schedule(t,i)}function hd(t){var e=t.subscriber,r=t.window,n=t.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),e.closeWindow(r)}function h4(t,e){return function(r){return r.lift(new f4(t,e))}}var f4=function(){function t(e,r){this.openings=e,this.closingSelector=r}return t.prototype.call=function(e,r){return r.subscribe(new d4(e,this.openings,this.closingSelector))},t}(),d4=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.openings=n,s.closingSelector=i,s.contexts=[],s.add(s.openSubscription=yt(s,n,n)),s}return e.prototype._next=function(r){var n=this.contexts;if(n)for(var i=n.length,s=0;s<i;s++)n[s].window.next(r)},e.prototype._error=function(r){var n=this.contexts;if(this.contexts=null,n)for(var i=n.length,s=-1;++s<i;){var o=n[s];o.window.error(r),o.subscription.unsubscribe()}t.prototype._error.call(this,r)},e.prototype._complete=function(){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,i=-1;++i<n;){var s=r[i];s.window.complete(),s.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var r=this.contexts;if(this.contexts=null,r)for(var n=r.length,i=-1;++i<n;){var s=r[i];s.window.unsubscribe(),s.subscription.unsubscribe()}},e.prototype.notifyNext=function(r,n,i,s,o){if(r===this.openings){var a=void 0;try{var c=this.closingSelector;a=c(n)}catch(d){return this.error(d)}var u=new ye,l=new oe,h={window:u,subscription:l};this.contexts.push(h);var f=yt(this,a,h);f.closed?this.closeWindow(this.contexts.length-1):(f.context=h,l.add(f)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(r))},e.prototype.notifyError=function(r){this.error(r)},e.prototype.notifyComplete=function(r){r!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(r.context))},e.prototype.closeWindow=function(r){if(r!==-1){var n=this.contexts,i=n[r],s=i.window,o=i.subscription;n.splice(r,1),s.complete(),o.unsubscribe()}},e}(Xt);function p4(t){return function(r){return r.lift(new b4(t))}}var b4=function(){function t(e){this.closingSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new g4(e,this.closingSelector))},t}(),g4=function(t){m(e,t);function e(r,n){var i=t.call(this,r)||this;return i.destination=r,i.closingSelector=n,i.openWindow(),i}return e.prototype.notifyNext=function(r,n,i,s,o){this.openWindow(o)},e.prototype.notifyError=function(r){this._error(r)},e.prototype.notifyComplete=function(r){this.openWindow(r)},e.prototype._next=function(r){this.window.next(r)},e.prototype._error=function(r){this.window.error(r),this.destination.error(r),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(r){r===void 0&&(r=null),r&&(this.remove(r),r.unsubscribe());var n=this.window;n&&n.complete();var i=this.window=new ye;this.destination.next(i);var s;try{var o=this.closingSelector;s=o()}catch(a){this.destination.error(a),this.window.error(a);return}this.add(this.closingNotification=yt(this,s))},e}(Xt);function m4(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(r){var n;typeof t[t.length-1]=="function"&&(n=t.pop());var i=t;return r.lift(new y4(i,n))}}var y4=function(){function t(e,r){this.observables=e,this.project=r}return t.prototype.call=function(e,r){return r.subscribe(new v4(e,this.observables,this.project))},t}(),v4=function(t){m(e,t);function e(r,n,i){var s=t.call(this,r)||this;s.observables=n,s.project=i,s.toRespond=[];var o=n.length;s.values=new Array(o);for(var a=0;a<o;a++)s.toRespond.push(a);for(var a=0;a<o;a++){var c=n[a];s.add(yt(s,c,void 0,a))}return s}return e.prototype.notifyNext=function(r,n,i){this.values[i]=n;var s=this.toRespond;if(s.length>0){var o=s.indexOf(i);o!==-1&&s.splice(o,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(r){if(this.toRespond.length===0){var n=[r].concat(this.values);this.project?this._tryProject(n):this.destination.next(n)}},e.prototype._tryProject=function(r){var n;try{n=this.project.apply(this,r)}catch(i){this.destination.error(i);return}this.destination.next(n)},e}(Xt);function _4(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(n){return n.lift.call(Df.apply(void 0,[n].concat(t)))}}function w4(t){return function(e){return e.lift(new Ff(t))}}const S4=Object.freeze(Object.defineProperty({__proto__:null,audit:rd,auditTime:S2,buffer:E2,bufferCount:x2,bufferTime:A2,bufferToggle:j2,bufferWhen:D2,catchError:V2,combineAll:z2,combineLatest:U2,concat:q2,concatAll:Mf,concatMap:id,concatMapTo:G2,count:J2,debounce:Y2,debounceTime:eS,defaultIfEmpty:xn,delay:oS,delayWhen:lS,dematerialize:pS,distinct:mS,distinctUntilChanged:od,distinctUntilKeyChanged:SS,elementAt:kS,endWith:MS,every:AS,exhaust:OS,exhaustMap:ad,expand:DS,filter:Nt,finalize:VS,find:zS,findIndex:qS,first:GS,flatMap:z_,groupBy:Kv,ignoreElements:JS,isEmpty:YS,last:rE,map:Ue,mapTo:nE,materialize:oE,max:hE,merge:fE,mergeAll:Fa,mergeMap:Gt,mergeMapTo:dE,mergeScan:pE,min:mE,multicast:Jt,observeOn:c_,onErrorResumeNext:vE,pairwise:SE,partition:IE,pluck:xE,publish:kE,publishBehavior:ME,publishLast:AE,publishReplay:TE,race:NE,reduce:Qi,refCount:La,repeat:OE,repeatWhen:jE,retry:DE,retryWhen:VE,sample:zE,sampleTime:GE,scan:ti,sequenceEqual:YE,share:r3,shareReplay:n3,single:s3,skip:c3,skipLast:h3,skipUntil:p3,skipWhile:m3,startWith:_3,subscribeOn:S3,switchAll:x3,switchMap:sn,switchMapTo:R3,take:Xa,takeLast:ei,takeUntil:k3,takeWhile:T3,tap:L3,throttle:$3,throttleTime:B3,throwIfEmpty:Ji,timeInterval:z3,timeout:J3,timeoutWith:ld,timestamp:Q3,toArray:K3,window:X3,windowCount:r4,windowTime:s4,windowToggle:h4,windowWhen:p4,withLatestFrom:m4,zip:_4,zipAll:w4},Symbol.toStringTag,{value:"Module"})),ec=kr(S4);var Zi={},Ve={};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.ClientMessagePublishEvent=Ve.ClientMessageSetSessionConfig=Ve.ClientMessageGetSessionConfig=Ve.ClientMessageIsLinked=Ve.ClientMessageHostSession=void 0;function E4(t){return Object.assign({type:"HostSession"},t)}Ve.ClientMessageHostSession=E4;function C4(t){return Object.assign({type:"IsLinked"},t)}Ve.ClientMessageIsLinked=C4;function I4(t){return Object.assign({type:"GetSessionConfig"},t)}Ve.ClientMessageGetSessionConfig=I4;function x4(t){return Object.assign({type:"SetSessionConfig"},t)}Ve.ClientMessageSetSessionConfig=x4;function R4(t){return Object.assign({type:"PublishEvent"},t)}Ve.ClientMessagePublishEvent=R4;var fd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RxWebSocket=t.ConnectionState=void 0;const e=Li,r=ec;var n;(function(s){s[s.DISCONNECTED=0]="DISCONNECTED",s[s.CONNECTING=1]="CONNECTING",s[s.CONNECTED=2]="CONNECTED"})(n=t.ConnectionState||(t.ConnectionState={}));class i{constructor(o,a=WebSocket){this.WebSocketClass=a,this.webSocket=null,this.connectionStateSubject=new e.BehaviorSubject(n.DISCONNECTED),this.incomingDataSubject=new e.Subject,this.url=o.replace(/^http/,"ws")}connect(){return this.webSocket?(0,e.throwError)(new Error("webSocket object is not null")):new e.Observable(o=>{let a;try{this.webSocket=a=new this.WebSocketClass(this.url)}catch(c){o.error(c);return}this.connectionStateSubject.next(n.CONNECTING),a.onclose=c=>{this.clearWebSocket(),o.error(new Error(`websocket error ${c.code}: ${c.reason}`)),this.connectionStateSubject.next(n.DISCONNECTED)},a.onopen=c=>{o.next(),o.complete(),this.connectionStateSubject.next(n.CONNECTED)},a.onmessage=c=>{this.incomingDataSubject.next(c.data)}}).pipe((0,r.take)(1))}disconnect(){const{webSocket:o}=this;if(o){this.clearWebSocket(),this.connectionStateSubject.next(n.DISCONNECTED);try{o.close()}catch{}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,r.flatMap)(o=>{let a;try{a=JSON.parse(o)}catch{return(0,e.empty)()}return(0,e.of)(a)}))}sendData(o){const{webSocket:a}=this;if(!a)throw new Error("websocket is not connected");a.send(o)}clearWebSocket(){const{webSocket:o}=this;o&&(this.webSocket=null,o.onclose=null,o.onerror=null,o.onmessage=null,o.onopen=null)}}t.RxWebSocket=i})(fd);var Yi={};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.isServerMessageFail=void 0;function k4(t){return t&&t.type==="Fail"&&typeof t.id=="number"&&typeof t.sessionId=="string"&&typeof t.error=="string"}Yi.isServerMessageFail=k4;Object.defineProperty(Zi,"__esModule",{value:!0});Zi.WalletSDKConnection=void 0;const Ge=Li,U=ec,Wr=Tr,ir=an,zr=Ve,Ur=Mr,$n=fd,ko=Yi,al=1e4,M4=6e4;class A4{constructor(e,r,n,i,s=WebSocket){this.sessionId=e,this.sessionKey=r,this.diagnostic=i,this.subscriptions=new Ge.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,ir.IntNumber)(1),this.connectedSubject=new Ge.BehaviorSubject(!1),this.linkedSubject=new Ge.BehaviorSubject(!1),this.sessionConfigSubject=new Ge.ReplaySubject(1);const o=new $n.RxWebSocket(n+"/rpc",s);this.ws=o,this.subscriptions.add(o.connectionState$.pipe((0,U.tap)(a=>{var c;return(c=this.diagnostic)===null||c===void 0?void 0:c.log(Ur.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:Wr.Session.hash(e)})}),(0,U.skip)(1),(0,U.filter)(a=>a===$n.ConnectionState.DISCONNECTED&&!this.destroyed),(0,U.delay)(5e3),(0,U.filter)(a=>!this.destroyed),(0,U.flatMap)(a=>o.connect()),(0,U.retry)()).subscribe()),this.subscriptions.add(o.connectionState$.pipe((0,U.skip)(2),(0,U.switchMap)(a=>(0,Ge.iif)(()=>a===$n.ConnectionState.CONNECTED,this.authenticate().pipe((0,U.tap)(c=>this.sendIsLinked()),(0,U.tap)(c=>this.sendGetSessionConfig()),(0,U.map)(c=>!0)),(0,Ge.of)(!1))),(0,U.distinctUntilChanged)(),(0,U.catchError)(a=>(0,Ge.of)(!1))).subscribe(a=>this.connectedSubject.next(a))),this.subscriptions.add(o.connectionState$.pipe((0,U.skip)(1),(0,U.switchMap)(a=>(0,Ge.iif)(()=>a===$n.ConnectionState.CONNECTED,(0,Ge.timer)(0,al)))).subscribe(a=>a===0?this.updateLastHeartbeat():this.heartbeat())),this.subscriptions.add(o.incomingData$.pipe((0,U.filter)(a=>a==="h")).subscribe(a=>this.updateLastHeartbeat())),this.subscriptions.add(o.incomingJSONData$.pipe((0,U.filter)(a=>["IsLinkedOK","Linked"].includes(a.type))).subscribe(a=>{var c;const u=a;(c=this.diagnostic)===null||c===void 0||c.log(Ur.EVENTS.LINKED,{sessionIdHash:Wr.Session.hash(e),linked:u.linked,type:a.type,onlineGuests:u.onlineGuests}),this.linkedSubject.next(u.linked||u.onlineGuests>0)})),this.subscriptions.add(o.incomingJSONData$.pipe((0,U.filter)(a=>["GetSessionConfigOK","SessionConfigUpdated"].includes(a.type))).subscribe(a=>{var c;const u=a;(c=this.diagnostic)===null||c===void 0||c.log(Ur.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:Wr.Session.hash(e),metadata_keys:u&&u.metadata?Object.keys(u.metadata):void 0}),this.sessionConfigSubject.next({webhookId:u.webhookId,webhookUrl:u.webhookUrl,metadata:u.metadata})}))}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");(e=this.diagnostic)===null||e===void 0||e.log(Ur.EVENTS.STARTED_CONNECTING,{sessionIdHash:Wr.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var e;this.subscriptions.unsubscribe(),this.ws.disconnect(),(e=this.diagnostic)===null||e===void 0||e.log(Ur.EVENTS.DISCONNECTED,{sessionIdHash:Wr.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,U.filter)(e=>e),(0,U.take)(1),(0,U.map)(()=>{}))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,U.filter)(e=>e),(0,U.take)(1),(0,U.map)(()=>{}))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,U.filter)(e=>{if(e.type!=="Event")return!1;const r=e;return typeof r.sessionId=="string"&&typeof r.eventId=="string"&&typeof r.event=="string"&&typeof r.data=="string"}),(0,U.map)(e=>e))}setSessionMetadata(e,r){const n=(0,zr.ClientMessageSetSessionConfig)({id:(0,ir.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[e]:r}});return this.onceConnected$.pipe((0,U.flatMap)(i=>this.makeRequest(n)),(0,U.map)(i=>{if((0,ko.isServerMessageFail)(i))throw new Error(i.error||"failed to set session metadata")}))}publishEvent(e,r,n=!1){const i=(0,zr.ClientMessagePublishEvent)({id:(0,ir.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:r,callWebhook:n});return this.onceLinked$.pipe((0,U.flatMap)(s=>this.makeRequest(i)),(0,U.map)(s=>{if((0,ko.isServerMessageFail)(s))throw new Error(s.error||"failed to publish event");return s.eventId}))}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>al*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}makeRequest(e,r=M4){const n=e.id;try{this.sendData(e)}catch(i){return(0,Ge.throwError)(i)}return this.ws.incomingJSONData$.pipe((0,U.timeoutWith)(r,(0,Ge.throwError)(new Error(`request ${n} timed out`))),(0,U.filter)(i=>i.id===n),(0,U.take)(1))}authenticate(){const e=(0,zr.ClientMessageHostSession)({id:(0,ir.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,U.map)(r=>{if((0,ko.isServerMessageFail)(r))throw new Error(r.error||"failed to authentcate")}))}sendIsLinked(){const e=(0,zr.ClientMessageIsLinked)({id:(0,ir.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}sendGetSessionConfig(){const e=(0,zr.ClientMessageGetSessionConfig)({id:(0,ir.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}Zi.WalletSDKConnection=A4;var xr={};Object.defineProperty(xr,"__esModule",{value:!0});xr.decrypt=xr.encrypt=void 0;const ri=R;async function T4(t,e){if(e.length!==64)throw Error("secret must be 256 bits");const r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.importKey("raw",(0,ri.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},n,i.encode(t)),o=16,a=s.slice(s.byteLength-o),c=s.slice(0,s.byteLength-o),u=new Uint8Array(a),l=new Uint8Array(c),h=new Uint8Array([...r,...u,...l]);return(0,ri.uint8ArrayToHex)(h)}xr.encrypt=T4;function N4(t,e){if(e.length!==64)throw Error("secret must be 256 bits");return new Promise((r,n)=>{(async function(){const i=await crypto.subtle.importKey("raw",(0,ri.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=(0,ri.hexStringToUint8Array)(t),o=s.slice(0,12),a=s.slice(12,28),c=s.slice(28),u=new Uint8Array([...c,...a]),l={name:"AES-GCM",iv:new Uint8Array(o)};try{const h=await window.crypto.subtle.decrypt(l,i,u),f=new TextDecoder;r(f.decode(h))}catch(h){n(h)}})()})}xr.decrypt=N4;var Ki={},Xi={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RelayMessageType=void 0,function(e){e.SESSION_ID_REQUEST="SESSION_ID_REQUEST",e.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",e.LINKED="LINKED",e.UNLINKED="UNLINKED",e.WEB3_REQUEST="WEB3_REQUEST",e.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",e.WEB3_RESPONSE="WEB3_RESPONSE"}(t.RelayMessageType||(t.RelayMessageType={}))})(Xi);Object.defineProperty(Ki,"__esModule",{value:!0});Ki.Web3RequestCanceledMessage=void 0;const O4=Xi;function L4(t){return{type:O4.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}Ki.Web3RequestCanceledMessage=L4;var es={};Object.defineProperty(es,"__esModule",{value:!0});es.Web3RequestMessage=void 0;const j4=Xi;function P4(t){return Object.assign({type:j4.RelayMessageType.WEB3_REQUEST},t)}es.Web3RequestMessage=P4;var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.isWeb3ResponseMessage=Rr.Web3ResponseMessage=void 0;const dd=Xi;function $4(t){return Object.assign({type:dd.RelayMessageType.WEB3_RESPONSE},t)}Rr.Web3ResponseMessage=$4;function D4(t){return t&&t.type===dd.RelayMessageType.WEB3_RESPONSE}Rr.isWeb3ResponseMessage=D4;var F4=A&&A.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),B4=A&&A.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pd=A&&A.__decorate||function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},V4=A&&A.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&F4(e,t,r);return B4(e,t),e},H4=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qi,"__esModule",{value:!0});qi.WalletSDKRelay=void 0;const bd=H4(Gi),jt=Li,de=ec,Ce=Mr,W4=Zi,sr=on,z4=an,re=R,Et=V4(xr),Ct=Tr,Dn=Ye,ve=ui,U4=Ki,q4=es,Fe=te,Te=Rr;class Ze extends Dn.WalletSDKRelayAbstract{constructor(e){var r;super(),this.accountsCallback=null,this.chainCallback=null,this.dappDefaultChainSubject=new jt.BehaviorSubject(1),this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.subscriptions=new jt.Subscription,this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;const{session:n,ui:i,connection:s}=this.subscribe();if(this._session=n,this.connection=s,this.relayEventManager=e.relayEventManager,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this.diagnostic={log:e.eventListener.onEvent}:this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=(r=e.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=i}subscribe(){this.subscriptions.add(this.dappDefaultChainSubject.subscribe(i=>{this.dappDefaultChain!==i&&(this.dappDefaultChain=i)}));const e=Ct.Session.load(this.storage)||new Ct.Session(this.storage).save(),r=new W4.WalletSDKConnection(e.id,e.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(r.sessionConfig$.subscribe({next:i=>{this.onSessionConfigChanged(i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(Ce.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(r.incomingEvent$.pipe((0,de.filter)(i=>i.event==="Web3Response")).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(r.linked$.pipe((0,de.skip)(1),(0,de.tap)(i=>{var s;this.isLinked=i;const o=this.storage.getItem(Dn.LOCAL_STORAGE_ADDRESSES_KEY);if(i&&(this.session.linked=i),this.isUnlinkedErrorState=!1,o){const a=o.split(" "),c=this.storage.getItem("IsStandaloneSigning")==="true";if(a[0]!==""&&!i&&this.session.linked&&!c){this.isUnlinkedErrorState=!0;const u=this.getSessionIdHash();(s=this.diagnostic)===null||s===void 0||s.log(Ce.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:u})}}})).subscribe()),this.subscriptions.add(r.sessionConfig$.pipe((0,de.filter)(i=>!!i.metadata&&i.metadata.__destroyed==="1")).subscribe(()=>{var i;const s=r.isDestroyed;return(i=this.diagnostic)===null||i===void 0||i.log(Ce.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:s,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()})),this.subscriptions.add(r.sessionConfig$.pipe((0,de.filter)(i=>i.metadata&&i.metadata.WalletUsername!==void 0)).pipe((0,de.mergeMap)(i=>Et.decrypt(i.metadata.WalletUsername,e.secret))).subscribe({next:i=>{this.storage.setItem(Dn.WALLET_USER_NAME_KEY,i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(Ce.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,de.filter)(i=>i.metadata&&i.metadata.AppVersion!==void 0)).pipe((0,de.mergeMap)(i=>Et.decrypt(i.metadata.AppVersion,e.secret))).subscribe({next:i=>{this.storage.setItem(Dn.APP_VERSION_KEY,i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(Ce.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,de.filter)(i=>i.metadata&&i.metadata.ChainId!==void 0&&i.metadata.JsonRpcUrl!==void 0)).pipe((0,de.mergeMap)(i=>(0,jt.zip)(Et.decrypt(i.metadata.ChainId,e.secret),Et.decrypt(i.metadata.JsonRpcUrl,e.secret)))).pipe((0,de.distinctUntilChanged)()).subscribe({next:([i,s])=>{this.chainCallback&&this.chainCallback(i,s)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(Ce.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,de.filter)(i=>i.metadata&&i.metadata.EthereumAddress!==void 0)).pipe((0,de.mergeMap)(i=>Et.decrypt(i.metadata.EthereumAddress,e.secret))).subscribe({next:i=>{this.accountsCallback&&this.accountsCallback([i]),Ze.accountRequestCallbackIds.size>0&&(Array.from(Ze.accountRequestCallbackIds.values()).forEach(s=>{const o=(0,Te.Web3ResponseMessage)({id:s,response:(0,Fe.RequestEthereumAccountsResponse)([i])});this.invokeCallback(Object.assign(Object.assign({},o),{id:s}))}),Ze.accountRequestCallbackIds.clear())},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(Ce.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,de.filter)(i=>i.metadata&&i.metadata.AppSrc!==void 0)).pipe((0,de.mergeMap)(i=>Et.decrypt(i.metadata.AppSrc,e.secret))).subscribe({next:i=>{this.ui.setAppSrc(i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(Ce.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appSrc"})}}));const n=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:e,connected$:r.connected$,chainId$:this.dappDefaultChainSubject});return r.connect(),{session:e,ui:n,connection:r}}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,de.timeout)(1e3),(0,de.catchError)(e=>(0,jt.of)(null))).subscribe(e=>{var r,n,i;const s=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch{(r=this.diagnostic)===null||r===void 0||r.log(Ce.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}(n=this.diagnostic)===null||n===void 0||n.log(Ce.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const o=Ct.Session.load(this.storage);if((o==null?void 0:o.id)===this._session.id?this.storage.clear():o&&((i=this.diagnostic)===null||i===void 0||i.log(Ce.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:Ct.Session.hash(o.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0),this.subscriptions=new jt.Subscription;const{session:a,ui:c,connection:u}=this.subscribe();this._session=a,this.connection=u,this.ui=c,s&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()},e=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(Ce.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(e,r){this.appName=e,this.appLogoUrl=r}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,r){this.storage.setItem(e,r)}signEthereumMessage(e,r,n,i){return this.sendRequest({method:ve.Web3Method.signEthereumMessage,params:{message:(0,re.hexStringFromBuffer)(e,!0),address:r,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,r,n){return this.sendRequest({method:ve.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,re.hexStringFromBuffer)(e,!0),signature:(0,re.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:ve.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,re.bigIntStringFromBN)(e.weiValue),data:(0,re.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,re.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,re.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,re.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,re.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:ve.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,re.bigIntStringFromBN)(e.weiValue),data:(0,re.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,re.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,re.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,re.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,re.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,r){return this.sendRequest({method:ve.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,re.hexStringFromBuffer)(e,!0),chainId:r}})}scanQRCode(e){return this.sendRequest({method:ve.Web3Method.scanQRCode,params:{regExp:e}})}getQRCodeUrl(){return(0,re.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,r){return this.sendRequest({method:ve.Web3Method.generic,params:{action:r,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let r=null;const n=(0,re.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,o),r==null||r()};return{promise:new Promise((o,a)=>{this.ui.isStandalone()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,c=>{if(r==null||r(),c.errorMessage)return a(new Error(c.errorMessage));o(c)}),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)}),cancel:i}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChainSubject.next(e)}publishWeb3RequestEvent(e,r){var n;const i=(0,q4.Web3RequestMessage)({id:e,request:r}),s=Ct.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(Ce.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${i.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?Ct.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",i,!0).subscribe({next:o=>{var a;(a=this.diagnostic)===null||a===void 0||a.log(Ce.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${i.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?Ct.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()})},error:o=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:i.id,response:{method:i.request.method,errorMessage:o.message}}))}}))}publishWeb3RequestCanceledEvent(e){const r=(0,U4.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",r,!1).subscribe())}publishEvent(e,r,n){const i=this.session.secret;return new jt.Observable(s=>{Et.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin})),i).then(o=>{s.next(o),s.complete()})}).pipe((0,de.mergeMap)(s=>this.connection.publishEvent(e,s,n)))}handleIncomingEvent(e){try{this.subscriptions.add((0,jt.from)(Et.decrypt(e.data,this.session.secret)).pipe((0,de.map)(r=>JSON.parse(r))).subscribe({next:r=>{const n=(0,Te.isWeb3ResponseMessage)(r)?r:null;n&&this.handleWeb3ResponseMessage(n)},error:()=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(Ce.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch{return}}handleWeb3ResponseMessage(e){var r;const{response:n}=e;if((r=this.diagnostic)===null||r===void 0||r.log(Ce.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),(0,Fe.isRequestEthereumAccountsResponse)(n)){Ze.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},e),{id:i}))),Ze.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,r,n,i){var s;const o=(s=n==null?void 0:n.message)!==null&&s!==void 0?s:(0,sr.standardErrorMessage)(i);this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:e,response:{method:r,errorMessage:o,errorCode:i}}))}invokeCallback(e){const r=this.relayEventManager.callbacks.get(e.id);r&&(r(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:ve.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=(0,re.randomBytesHex)(8),n=s=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,s)};return{promise:new Promise((s,o)=>{var a;this.relayEventManager.callbacks.set(r,u=>{if(this.ui.hideRequestEthereumAccounts(),u.errorMessage)return o(new Error(u.errorMessage));s(u)});const c=((a=window==null?void 0:window.navigator)===null||a===void 0?void 0:a.userAgent)||null;if(c&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(c)){let u;try{(0,re.isInIFrame)()&&window.top?u=window.top.location:u=window.location}catch{u=window.location}u.href=`https://www.coinbase.com/connect-dapp?uri=${encodeURIComponent(u.href)}`;return}if(this.ui.inlineAccountsResponse()){const u=l=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:r,response:(0,Fe.RequestEthereumAccountsResponse)(l)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:u})}else{const u=sr.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(u)})}Ze.accountRequestCallbackIds.add(r),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(r,e)}),cancel:n}}selectProvider(e){const r={method:ve.Web3Method.selectProvider,params:{providerOptions:e}},n=(0,re.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,o)},s=new Promise((o,a)=>{this.relayEventManager.callbacks.set(n,l=>{if(l.errorMessage)return a(new Error(l.errorMessage));o(l)});const c=l=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:n,response:(0,Fe.SelectProviderResponse)(z4.ProviderType.Unselected)}))},u=l=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:n,response:(0,Fe.SelectProviderResponse)(l)}))};this.ui.selectProvider&&this.ui.selectProvider({onApprove:u,onCancel:c,providerOptions:e})});return{cancel:i,promise:s}}watchAsset(e,r,n,i,s,o){const a={method:ve.Web3Method.watchAsset,params:{type:e,options:{address:r,symbol:n,decimals:i,image:s},chainId:o}};let c=null;const u=(0,re.randomBytesHex)(8),l=f=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,f),c==null||c()};this.ui.inlineWatchAsset()||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload}));const h=new Promise((f,d)=>{this.relayEventManager.callbacks.set(u,w=>{if(c==null||c(),w.errorMessage)return d(new Error(w.errorMessage));f(w)});const p=w=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:u,response:(0,Fe.WatchAssetReponse)(!1)}))},g=()=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:u,response:(0,Fe.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:g,onCancel:p,type:e,address:r,symbol:n,decimals:i,image:s,chainId:o}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,a)});return{cancel:l,promise:h}}addEthereumChain(e,r,n,i,s,o){const a={method:ve.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:r,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:o}};let c=null;const u=(0,re.randomBytesHex)(8),l=f=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,a.method,f),c==null||c()};return this.ui.inlineAddEthereumChain(e)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload})),{promise:new Promise((f,d)=>{this.relayEventManager.callbacks.set(u,w=>{if(c==null||c(),w.errorMessage)return d(new Error(w.errorMessage));f(w)});const p=w=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:u,response:(0,Fe.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},g=w=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:u,response:(0,Fe.AddEthereumChainResponse)({isApproved:!0,rpcUrl:w})}))};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:p,onApprove:g,chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(e)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,a)}),cancel:l}}switchEthereumChain(e,r){const n={method:ve.Web3Method.switchEthereumChain,params:Object.assign({chainId:e},{address:r})},i=(0,re.randomBytesHex)(8),s=a=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,a)};return{promise:new Promise((a,c)=>{this.relayEventManager.callbacks.set(i,h=>{if((0,Fe.isErrorResponse)(h)&&h.errorCode)return c(sr.standardErrors.provider.custom({code:h.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if(h.errorMessage)return c(new Error(h.errorMessage));a(h)});const u=h=>{var f;if(h){const d=(f=(0,sr.getErrorCode)(h))!==null&&f!==void 0?f:sr.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,ve.Web3Method.switchEthereumChain,h instanceof Error?h:sr.standardErrors.provider.unsupportedChain(e),d)}else this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:i,response:(0,Fe.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},l=h=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:i,response:(0,Fe.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:h})}))};this.ui.switchEthereumChain({onCancel:u,onApprove:l,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(i,n)}),cancel:s}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return Ct.Session.hash(this._session.id)}sendRequestStandalone(e,r){const n=s=>{this.handleErrorResponse(e,r.method,s)},i=s=>{this.handleWeb3ResponseMessage((0,Te.Web3ResponseMessage)({id:e,response:s}))};switch(r.method){case ve.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:r,onSuccess:i,onCancel:n});break;case ve.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case ve.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case ve.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:i});break;default:n();break}}onSessionConfigChanged(e){}}Ze.accountRequestCallbackIds=new Set;pd([bd.default],Ze.prototype,"resetAndReload",null);pd([bd.default],Ze.prototype,"handleIncomingEvent",null);qi.WalletSDKRelay=Ze;var ts={};Object.defineProperty(ts,"__esModule",{value:!0});ts.WalletSDKRelayEventManager=void 0;const G4=R;class J4{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,r=(0,G4.prepend0x)(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}}ts.WalletSDKRelayEventManager=J4;Object.defineProperty(Kr,"__esModule",{value:!0});Kr.CoinbaseWalletSDK=void 0;const Q4=si,Z4=oi,Y4=ai,K4=br,X4=Ai,e5=qi,t5=ts,r5=R,gd=Ar;class rs{constructor(e){var r,n,i;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const s=e.linkAPIUrl||Z4.LINK_API_URL;let o;if(e.uiConstructor?o=e.uiConstructor:o=u=>new X4.WalletSDKUI(u),typeof e.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this._overrideIsCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this._diagnosticLogger={log:e.eventListener.onEvent}:this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=(i=e.reloadOnDisconnect)!==null&&i!==void 0?i:!0;const a=new URL(s),c=`${a.protocol}//${a.host}`;this._storage=new Y4.ScopedLocalStorage(`-walletlink:${c}`),this._storage.setItem("version",rs.VERSION),!(this.walletExtension||this.coinbaseBrowser)&&(this._relayEventManager=new t5.WalletSDKRelayEventManager,this._relay=new e5.WalletSDKRelay({linkAPIUrl:s,version:gd.LIB_VERSION,darkMode:!!e.darkMode,uiConstructor:o,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect}),this.setAppInfo(e.appName,e.appLogoUrl),!e.headlessMode&&this._relay.attachUI())}makeWeb3Provider(e="",r=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,r),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect=="function"&&n.disableReloadOnDisconnect(),n;const i=this.coinbaseBrowser;if(i)return i;const s=this._relay;if(!s||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||s.setConnectDisabled(!0),new K4.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(s),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:r,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,r){var n;this._appName=e||"DApp",this._appLogoUrl=r||(0,r5.getFavicon)();const i=this.walletExtension;i?this.isCipherProvider(i)||i.setAppInfo(this._appName,this._appLogoUrl):(n=this._relay)===null||n===void 0||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;const r=this.walletExtension;r?r.close():(e=this._relay)===null||e===void 0||e.resetAndReload()}getQrUrl(){var e,r;return(r=(e=this._relay)===null||e===void 0?void 0:e.getQRCodeUrl())!==null&&r!==void 0?r:null}getCoinbaseWalletLogo(e,r=240){return(0,Q4.walletLogo)(e,r)}get walletExtension(){var e;return(e=window.coinbaseWalletExtension)!==null&&e!==void 0?e:window.walletLinkExtension}get coinbaseBrowser(){var e,r;try{const n=(e=window.ethereum)!==null&&e!==void 0?e:(r=window.top)===null||r===void 0?void 0:r.ethereum;return n&&"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch{return}}isCipherProvider(e){return typeof e.isCipher=="boolean"&&e.isCipher}}Kr.CoinbaseWalletSDK=rs;rs.VERSION=gd.LIB_VERSION;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=t.CoinbaseWalletSDK=void 0;const e=Kr,r=br;var n=Kr;Object.defineProperty(t,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return n.CoinbaseWalletSDK}});var i=br;Object.defineProperty(t,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return i.CoinbaseWalletProvider}}),t.default=e.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=e.CoinbaseWalletSDK,window.CoinbaseWalletProvider=r.CoinbaseWalletProvider,window.WalletLink=e.CoinbaseWalletSDK,window.WalletLinkProvider=r.CoinbaseWalletProvider)})(Zo);const n5=_d(Zo),d5=wd({__proto__:null,default:n5},[Zo]);export{d5 as i};
|
|
23
|
-
//# sourceMappingURL=index-
|
|
23
|
+
//# sourceMappingURL=index-628544c1.js.map
|