diff --git a/assets/Index-8adb4124-D896XomO.js b/assets/Index-8adb4124-D4rUf_RB.js similarity index 99% rename from assets/Index-8adb4124-D896XomO.js rename to assets/Index-8adb4124-D4rUf_RB.js index 059d84e..a29f40b 100644 --- a/assets/Index-8adb4124-D896XomO.js +++ b/assets/Index-8adb4124-D4rUf_RB.js @@ -1,4 +1,4 @@ -import{S as R,i as N,s as M,a as O,y as me,d as _,t as w,g as G,h as T,j as A,k as C,m as Y,n as _e,o as we,p as D,e as h,c as m,K as Ce,r as F,b as L,ak as B,u as H,f as g,l as S,I as ye,at as ze,au as Te,av as je,N as xe,a5 as Le,Q as Pe,a7 as Se,v as $,_ as Z,a2 as Ee,aw as Ie,ax as be,a6 as Re,J as Ne,ay as J,az as K,G as V,R as he,z as Me,$ as ge,aA as Oe,q as ke,aB as Q,aC as U,x as I,aD as X,E,M as q,aE as ee,aF as De,aG as te,aH as P,D as Fe,a8 as W,aI as He}from"./index-DgzvH8Qi.js";function $e(i,{from:e,to:t},n={}){const o=getComputedStyle(i),a=o.transform==="none"?"":o.transform,[f,l]=o.transformOrigin.split(" ").map(parseFloat),s=e.left+e.width*f/t.width-(t.left+f),r=e.top+e.height*l/t.height-(t.top+l),{delay:c=0,duration:d=u=>Math.sqrt(u)*120,easing:v=be}=n;return{delay:c,duration:Ne(d)?d(Math.sqrt(s*s+r*r)):d,easing:v,css:(u,b)=>{const p=b*s,y=b*r,z=u+b*e.width/t.width,j=u+b*e.height/t.height;return`transform: ${a} translate(${p}px, ${y}px) scale(${z}, ${j});`}}}function Ge(i){O(i,"svelte-13cuwwo","div.svelte-13cuwwo{box-sizing:content-box}.border.svelte-13cuwwo{border:2px solid;border-radius:120px;overflow:hidden}")}function Ae(i){let e,t;return{c(){e=h("div"),m(e,"class","border svelte-13cuwwo"),m(e,"style",t=` +import{S as R,i as N,s as M,a as O,y as me,d as _,t as w,g as G,h as T,j as A,k as C,m as Y,n as _e,o as we,p as D,e as h,c as m,K as Ce,r as F,b as L,ak as B,u as H,f as g,l as S,I as ye,at as ze,au as Te,av as je,N as xe,a5 as Le,Q as Pe,a7 as Se,v as $,_ as Z,a2 as Ee,aw as Ie,ax as be,a6 as Re,J as Ne,ay as J,az as K,G as V,R as he,z as Me,$ as ge,aA as Oe,q as ke,aB as Q,aC as U,x as I,aD as X,E,M as q,aE as ee,aF as De,aG as te,aH as P,D as Fe,a8 as W,aI as He}from"./index-VLNutAkM.js";function $e(i,{from:e,to:t},n={}){const o=getComputedStyle(i),a=o.transform==="none"?"":o.transform,[f,l]=o.transformOrigin.split(" ").map(parseFloat),s=e.left+e.width*f/t.width-(t.left+f),r=e.top+e.height*l/t.height-(t.top+l),{delay:c=0,duration:d=u=>Math.sqrt(u)*120,easing:v=be}=n;return{delay:c,duration:Ne(d)?d(Math.sqrt(s*s+r*r)):d,easing:v,css:(u,b)=>{const p=b*s,y=b*r,z=u+b*e.width/t.width,j=u+b*e.height/t.height;return`transform: ${a} translate(${p}px, ${y}px) scale(${z}, ${j});`}}}function Ge(i){O(i,"svelte-13cuwwo","div.svelte-13cuwwo{box-sizing:content-box}.border.svelte-13cuwwo{border:2px solid;border-radius:120px;overflow:hidden}")}function Ae(i){let e,t;return{c(){e=h("div"),m(e,"class","border svelte-13cuwwo"),m(e,"style",t=` width: ${i[2]-i[3]*2}px; height: ${i[2]-i[3]*2}px; border-color: var(${i[1]}); diff --git a/assets/Index-a4a1058e-DBreb4CD.js b/assets/Index-a4a1058e-D0a-yFFT.js similarity index 99% rename from assets/Index-a4a1058e-DBreb4CD.js rename to assets/Index-a4a1058e-D0a-yFFT.js index 4b8f80b..f9823c9 100644 --- a/assets/Index-a4a1058e-DBreb4CD.js +++ b/assets/Index-a4a1058e-D0a-yFFT.js @@ -1,4 +1,4 @@ -import{S as pe,i as ve,s as me,a as ge,e as g,b as z,c as p,d as M,f as c,l as J,t as y,g as ae,h as T,j as ie,k as S,m as ne,n as ye,o as Ce,p as ee,q as Hn,r as E,u as O,v as Z,w as Ie,x as G,y as ue,z as Me,$ as je,A as Cn,B as Be,C as L,W as he,D as be,E as q,F as _e,G as ce,H as Vn,I as fe,J as we,K as zn,L as In,M as V,N as Te,O as De,P as We,Q as Ne,R as ke,T as $n,U as Bn,V as Dn,X as He,Y as ze,Z as Tn,_ as Wn,a0 as Nn,a1 as Fn,a2 as An,a3 as En,a4 as de,a5 as Pe,a6 as $e,a7 as On,a8 as Ve,a9 as Zn,aa as Gn,ab as Mn,ac as Sn,ad as Rn,ae as Un,af as Fe,ag as Xn,ah as Ee,ai as Jn,aj as Oe,ak as Le,al as Ze,am as Kn,an as qe,ao as Ge,ap as Qn,aq as Yn,ar as Re,as as xn}from"./index-DgzvH8Qi.js";import{merge as et}from"./index-BmjJoMIO.js";import{s as nt,d as tt}from"./index-BPbOMfKu.js";var Pn='',Se=` +import{S as pe,i as ve,s as me,a as ge,e as g,b as z,c as p,d as M,f as c,l as J,t as y,g as ae,h as T,j as ie,k as S,m as ne,n as ye,o as Ce,p as ee,q as Hn,r as E,u as O,v as Z,w as Ie,x as G,y as ue,z as Me,$ as je,A as Cn,B as Be,C as L,W as he,D as be,E as q,F as _e,G as ce,H as Vn,I as fe,J as we,K as zn,L as In,M as V,N as Te,O as De,P as We,Q as Ne,R as ke,T as $n,U as Bn,V as Dn,X as He,Y as ze,Z as Tn,_ as Wn,a0 as Nn,a1 as Fn,a2 as An,a3 as En,a4 as de,a5 as Pe,a6 as $e,a7 as On,a8 as Ve,a9 as Zn,aa as Gn,ab as Mn,ac as Sn,ad as Rn,ae as Un,af as Fe,ag as Xn,ah as Ee,ai as Jn,aj as Oe,ak as Le,al as Ze,am as Kn,an as qe,ao as Ge,ap as Qn,aq as Yn,ar as Re,as as xn}from"./index-VLNutAkM.js";import{merge as et}from"./index-YxUBmkeZ.js";import{s as nt,d as tt}from"./index-vmC98Bu8.js";var Pn='',Se=` diff --git a/assets/ccip-BH5iUcu2.js b/assets/ccip-Dj_Ke-Rh.js similarity index 97% rename from assets/ccip-BH5iUcu2.js rename to assets/ccip-Dj_Ke-Rh.js index 93c26e6..536f979 100644 --- a/assets/ccip-BH5iUcu2.js +++ b/assets/ccip-Dj_Ke-Rh.js @@ -1 +1 @@ -import{bp as p,bq as m,br as y,bs as g,bt as k,bu as x,bv as E,bw as L,bx as h,by as O}from"./index-DgzvH8Qi.js";class M extends p{constructor({callbackSelector:r,cause:e,data:o,extraData:c,sender:d,urls:a}){var i;super(e.shortMessage||"An error occurred while fetching for an offchain result.",{cause:e,metaMessages:[...e.metaMessages||[],(i=e.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(f=>` ${m(f)}`)],` Sender: ${d}`,` Data: ${o}`,` Callback selector: ${r}`,` Extra data: ${c}`].flat(),name:"OffchainLookupError"})}}class R extends p{constructor({result:r,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${m(e)}`,`Response: ${y(r)}`],name:"OffchainLookupResponseMalformedError"})}}class $ extends p{constructor({sender:r,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${r}`],name:"OffchainLookupSenderMismatchError"})}}const D="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function T(n,{blockNumber:r,blockTag:e,data:o,to:c}){const{args:d}=g({data:o,abi:[S]}),[a,i,f,t,s]=d,{ccipRead:u}=n,b=u&&typeof(u==null?void 0:u.request)=="function"?u.request:q;try{if(!k(c,a))throw new $({sender:a,to:c});const l=await b({data:f,sender:a,urls:i}),{data:w}=await x(n,{blockNumber:r,blockTag:e,data:E([t,L([{type:"bytes"},{type:"bytes"}],[l,s])]),to:c});return w}catch(l){throw new M({callbackSelector:t,cause:l,data:o,extraData:s,sender:a,urls:i})}}async function q({data:n,sender:r,urls:e}){var c;let o=new Error("An unknown error occurred.");for(let d=0;d` ${m(f)}`)],` Sender: ${d}`,` Data: ${o}`,` Callback selector: ${r}`,` Extra data: ${c}`].flat(),name:"OffchainLookupError"})}}class R extends p{constructor({result:r,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${m(e)}`,`Response: ${y(r)}`],name:"OffchainLookupResponseMalformedError"})}}class $ extends p{constructor({sender:r,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${r}`],name:"OffchainLookupSenderMismatchError"})}}const D="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function T(n,{blockNumber:r,blockTag:e,data:o,to:c}){const{args:d}=g({data:o,abi:[S]}),[a,i,f,t,s]=d,{ccipRead:u}=n,b=u&&typeof(u==null?void 0:u.request)=="function"?u.request:q;try{if(!k(c,a))throw new $({sender:a,to:c});const l=await b({data:f,sender:a,urls:i}),{data:w}=await x(n,{blockNumber:r,blockTag:e,data:E([t,L([{type:"bytes"},{type:"bytes"}],[l,s])]),to:c});return w}catch(l){throw new M({callbackSelector:t,cause:l,data:o,extraData:s,sender:a,urls:i})}}async function q({data:n,sender:r,urls:e}){var c;let o=new Error("An unknown error occurred.");for(let d=0;d{if(typeof r=="string")return r;const n=J(r);return n.typeHex==="0x7e"&&(n.isSystemTx=r.isSystemTx,n.mint=r.mint?i(r.mint):void 0,n.sourceHash=r.sourceHash,n.type="deposit"),n}),stateRoot:t.stateRoot}}}),transaction:V({format(t){const a={};return t.type==="0x7e"&&(a.isSystemTx=t.isSystemTx,a.mint=t.mint?i(t.mint):void 0,a.sourceHash=t.sourceHash,a.type="deposit"),a}}),transactionReceipt:ee({format(t){return{l1GasPrice:t.l1GasPrice?i(t.l1GasPrice):null,l1GasUsed:t.l1GasUsed?i(t.l1GasUsed):null,l1Fee:t.l1Fee?i(t.l1Fee):null,l1FeeScalar:t.l1FeeScalar?Number(t.l1FeeScalar):null}}})};function Ce(t,a){return Te(t)?ve(t):X(t,a)}const we={transaction:Ce};function ve(t){Ue(t);const{sourceHash:a,data:s,from:r,gas:n,isSystemTx:c,mint:p,to:m,value:d}=t,b=[a,r,m??"0x",p?o(p):"0x",d?o(d):"0x",n?o(n):"0x",c?"0x1":"0x",s??"0x"];return q(["0x7e",j(b)])}function Te(t){return t.type==="deposit"||typeof t.sourceHash<"u"}function Ue(t){const{from:a,to:s}=t;if(a&&!k(a))throw new E({address:a});if(s&&!k(s))throw new E({address:s})}const l={contracts:Ee,formatters:Z,serializers:we},T=1,tt=e({...l,id:888888888,name:"Ancient8",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 explorer",url:"https://scan.ancient8.gg",apiUrl:"https://scan.ancient8.gg/api"}},contracts:{...l.contracts,l2OutputOracle:{[T]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[T]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[T]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:T}),U=11155111,at=e({...l,id:28122024,name:"Ancient8 Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpcv2-testnet.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 Celestia Testnet explorer",url:"https://scanv2-testnet.ancient8.gg",apiUrl:"https://scanv2-testnet.ancient8.gg/api"}},contracts:{...l.contracts,l2OutputOracle:{[U]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[U]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[U]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:U}),rt=e({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),st=e({id:3993,name:"APEX Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.apexlayer.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-testnet.apexlayer.xyz",apiUrl:"https://exp-testnet.apexlayer.xyz/api"}},contracts:{multicall3:{address:"0xf7642be33a6b18D16a995657adb5a68CD0438aE2",blockCreated:283775}},testnet:!0}),nt=e({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),lt=e({id:421613,name:"Arbitrum Goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),ot=e({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),ct=e({id:592,name:"Astar",network:"astar-mainnet",nativeCurrency:{name:"Astar",symbol:"ASTR",decimals:18},rpcUrls:{default:{http:["https://astar.api.onfinality.io/public"]}},blockExplorers:{default:{name:"Astar Subscan",url:"https://astar.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:761794}},testnet:!1}),it=e({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/astar-zkevm"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),pt=e({id:6038361,name:"Astar zkEVM Testnet zKyoto",network:"zKyoto",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/zkyoto"]}},blockExplorers:{default:{name:"zKyoto Explorer",url:"https://zkyoto.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:196153}},testnet:!0}),dt=e({id:421614,name:"Arbitrum Sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),mt=e({id:463,name:"Areon Network",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areon.network"],webSocket:["wss://mainnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!1}),ut=e({id:462,name:"Areon Network Testnet",nativeCurrency:{decimals:18,name:"TAREA",symbol:"TAREA"},rpcUrls:{default:{http:["https://testnet-rpc.areon.network"],webSocket:["wss://testnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!0}),bt=e({id:1313161554,name:"Aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://aurorascan.dev",apiUrl:"https://aurorascan.dev/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:62907816}}}),ht=e({id:1313161555,name:"Aurora Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev",apiUrl:"https://testnet.aurorascan.dev/api"}},testnet:!0}),kt=e({id:205205,name:"Auroria Testnet",network:"auroria",nativeCurrency:{name:"Auroria Stratis",symbol:"tSTRAX",decimals:18},rpcUrls:{default:{http:["https://auroria.rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Auroria Testnet Explorer",url:"https://auroria.explorer.stratisevm.com"}},testnet:!0}),xt=e({id:43114,name:"Avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowScan",url:"https://snowscan.xyz",apiUrl:"https://api.snowscan.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),ft=e({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowScan",url:"https://testnet.snowscan.xyz",apiUrl:"https://api-testnet.snowscan.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),yt=e({id:5165,network:"bahamut",name:"Bahamut",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]},public:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),g=1,Et=e({...l,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[g]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[g]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[g]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:g}),S=5,Ct=e({...l,id:84531,name:"Base Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://goerli.basescan.org",apiUrl:"https://goerli.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[S]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[S]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[S]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:S}),A=11155111,wt=e({...l,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[A]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[A]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[A]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:A}),vt=e({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{public:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]},default:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets.avax.network/beam"}},contracts:{multicall3:{address:"0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",blockCreated:1}}}),Tt=e({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{public:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]},default:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets-test.avax.network/beam"}},contracts:{multicall3:{address:"0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",blockCreated:3}},testnet:!0}),Ut=e({id:641230,name:"Bear Network Chain Mainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net",apiUrl:"https://brnkscan.bearnetwork.net/api"}}}),gt=e({id:751230,name:"Bear Network Chain Testnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net",apiUrl:"https://brnktest-scan.bearnetwork.net/api"}},testnet:!0}),St=e({id:80085,name:"Berachain Artio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},rpcUrls:{default:{http:["https://artio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain",url:"https://artio.beratrail.io"}},testnet:!0}),At=e({id:11501,name:"BEVM Mainnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet-1.bevm.io"]}},blockExplorers:{default:{name:"Bevmscan",url:"https://scan-mainnet.bevm.io",apiUrl:"https://scan-mainnet-api.bevm.io/api"}}}),Bt=e({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]},public:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}}}),Ft=e({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]},public:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),ge=1,Mt=e({id:81457,name:"Blast",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://blastscan.io",apiUrl:"https://api.blastscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929}},sourceId:ge}),Se=11155111,zt=e({id:168587773,name:"Blast Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://sepolia.blastscan.io",apiUrl:"https://api-sepolia.blastscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:756690}},testnet:!0,sourceId:Se}),Dt=e({id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.gobob.xyz"}},contracts:{multicall3:{address:"0x63f8279bccDb75c0F38e0CD6B6A0c72a0a760FF9",blockCreated:457045}},testnet:!1}),It=e({id:288,name:"Boba Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}}),_t=e({id:1039,name:"Bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}}),Ht=e({id:1038,name:"Bronos Testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0}),Pt=e({id:56,name:"BNB Smart Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),Ot=e({id:97,name:"Binance Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),Lt=e({id:1017,name:"BNB Greenfield Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://greenfield-chain.bnbchain.org"]}},blockExplorers:{default:{name:"BNB Greenfield Mainnet Scan",url:"https://greenfieldscan.com"}},testnet:!1}),Nt=e({id:200901,name:"Bitlayer",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com","https://rpc.ankr.com/bitlayer"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"btrscan",url:"https://www.btrscan.com",apiUrl:"https://www.btrscan.com/apis"}}}),Rt=e({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org","wss://testnet-ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"btrscan",url:"https://testnet-scan.bitlayer.org",apiUrl:"https://testnet-scan.bitlayer.org/apis"}}}),Kt=e({id:4999,name:"BlackFort Exchange Network",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network",apiUrl:"https://explorer.blackfort.network/api"}}}),Gt=e({id:4777,name:"BlackFort Exchange Network Testnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network",apiUrl:"https://testnet-explorer.blackfort.network/api"}},testnet:!0}),Vt=e({id:7700,name:"Canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}}),Ae={estimateFeesPerGas:async t=>{var r;if(!((r=t.request)!=null&&r.feeCurrency))return null;const[a,s]=await Promise.all([Be(t.client,t.request.feeCurrency),Fe(t.client,t.request.feeCurrency)]);return{maxFeePerGas:a,maxPriorityFeePerGas:s}}};async function Be(t,a){const s=await t.request({method:"eth_gasPrice",params:[a]});return BigInt(s)}async function Fe(t,a){const s=await t.request({method:"eth_maxPriorityFeePerGas",params:[a]});return BigInt(s)}function re(t){return t===0||t===0n||t===void 0||t===null||t==="0"||t===""||typeof t=="string"&&(W(t).toLowerCase()==="0x"||W(t).toLowerCase()==="0x00")}function w(t){return!re(t)}function Me(t){return typeof t.maxFeePerGas<"u"&&typeof t.maxPriorityFeePerGas<"u"}function se(t){return t.type==="cip64"?!0:Me(t)&&w(t.feeCurrency)}const ze={block:G({exclude:["difficulty","gasLimit","mixHash","nonce","uncles"],format(t){var s;const a=(s=t.transactions)==null?void 0:s.map(r=>typeof r=="string"?r:{...J(r),feeCurrency:r.feeCurrency,...r.type!=="0x7b"?{gatewayFee:r.gatewayFee?i(r.gatewayFee):null,gatewayFeeRecipient:r.gatewayFeeRecipient||null}:{}});return{randomness:t.randomness,transactions:a}}}),transaction:V({format(t){const a={feeCurrency:t.feeCurrency};return t.type==="0x7b"?a.type="cip64":(t.type==="0x7c"&&(a.type="cip42"),a.gatewayFee=t.gatewayFee?i(t.gatewayFee):null,a.gatewayFeeRecipient=t.gatewayFeeRecipient),a}}),transactionRequest:te({format(t){const a={feeCurrency:t.feeCurrency};return se(t)&&(a.type="0x7b"),a}})};function De(t,a){return se(t)?_e(t,a):X(t,a)}const Ie={transaction:De};function _e(t,a){Pe(t);const{chainId:s,gas:r,nonce:n,to:c,value:p,maxFeePerGas:m,maxPriorityFeePerGas:d,accessList:b,feeCurrency:f,data:y}=t,h=[o(s),n?o(n):"0x",d?o(d):"0x",m?o(m):"0x",r?o(r):"0x",c??"0x",p?o(p):"0x",y??"0x",de(b),f,...me(t,a)];return q(["0x7b",j(h)])}const He=2n**256n-1n;function Pe(t){const{chainId:a,maxPriorityFeePerGas:s,gasPrice:r,maxFeePerGas:n,to:c,feeCurrency:p}=t;if(a<=0)throw new ae({chainId:a});if(c&&!k(c))throw new E({address:c});if(r)throw new u("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(w(n)&&n>He)throw new ue({maxFeePerGas:n});if(w(s)&&w(n)&&s>n)throw new be({maxFeePerGas:n,maxPriorityFeePerGas:s});if(w(p)&&!k(p))throw new u("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(re(p))throw new u("`feeCurrency` must be provided for CIP-64 transactions.")}const ne={formatters:ze,serializers:Ie,fees:Ae},Xt=e({...ne,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1}),qt=e({...ne,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores",apiUrl:"https://explorer.celo.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001}},testnet:!0}),jt=e({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.ankr.com/chiliz","https://chiliz-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}}}),Zt=e({id:61,name:"Ethereum Classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}}),$t=e({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.org"],webSocket:["wss://evm.confluxrpc.org/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),Wt=e({id:71,name:"Conflux eSpace Testnet",network:"cfx-espace-testnet",testnet:!0,nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evmtestnet.confluxrpc.org"],webSocket:["wss://evmtestnet.confluxrpc.org/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),Qt=e({id:1116,name:"Core Dao",nativeCurrency:{decimals:18,name:"Core",symbol:"CORE"},rpcUrls:{default:{http:["https://rpc.coredao.org"]}},blockExplorers:{default:{name:"CoreDao",url:"https://scan.coredao.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11907934}},testnet:!1}),Yt=e({id:25,name:"Cronos Mainnet",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://explorer.cronos.org",apiUrl:"https://explorer-api.cronos.org/mainnet/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}}),Jt=e({id:338,name:"Cronos Testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://cronos.org/explorer/testnet3"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),ea=e({id:3737,name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io",apiUrl:"https://scan.crossbell.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:38246031}}}),ta=e({id:7560,name:"Cyber",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://cyberscan.co",apiUrl:"https://cyberscan.co/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),aa=e({id:111557560,name:"Cyber Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber-testnet.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet.cyberscan.co",apiUrl:"https://testnet.cyberscan.co/api"}},contracts:{multicall3:{address:"0xffc391F0018269d4758AEA1a144772E8FB99545E",blockCreated:304545}},testnet:!0}),ra=e({id:46,name:"Darwinia Network",nativeCurrency:{decimals:18,name:"RING",symbol:"RING"},rpcUrls:{default:{http:["https://rpc.darwinia.network"],webSocket:["wss://rpc.darwinia.network"]}},blockExplorers:{default:{name:"Explorer",url:"https://darwinia.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),sa=e({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:8},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]},public:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),na=e({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:8},rpcUrls:{default:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]},public:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live/?network=TestNet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:156462}},testnet:!0}),la=e({id:666666666,name:"Degen",nativeCurrency:{decimals:18,name:"Degen",symbol:"DEGEN"},rpcUrls:{default:{http:["https://rpc.degen.tips"],webSocket:["wss://rpc.degen.tips"]}},blockExplorers:{default:{name:"Degen Chain Explorer",url:"https://explorer.degen.tips",apiUrl:"https://explorer.degen.tips/api/v2"}}}),oa=e({id:53935,name:"DFK Chain",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14790551}}}),ca=e({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0}),ia=e({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Dogechain",symbol:"DC"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}}}),pa=e({id:23451,name:"DreyerX Mainnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["https://rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Scan",url:"https://scan.dreyerx.com"}}}),da=e({id:2026,name:"Edgeless Network",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://rpc.edgeless.network/http"],webSocket:["wss://rpc.edgeless.network/ws"]}},blockExplorers:{default:{name:"Edgeless Explorer",url:"https://explorer.edgeless.network"}}}),ma=e({id:202,name:"Edgeless Testnet",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://edgeless-testnet.rpc.caldera.xyz/http"],webSocket:["wss://edgeless-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Edgeless Testnet Explorer",url:"https://testnet.explorer.edgeless.network"}}}),ua=e({id:2021,name:"Edgeware EdgeEVM Mainnet",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live",apiUrl:"https://edgscan.live/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18117872}}}),ba=e({id:2022,name:"Beresheet BereEVM Testnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live",apiUrl:"https://testnet.edgscan.live/api"}}}),ha=e({id:7332,name:"Horizen EON",nativeCurrency:{decimals:18,name:"ZEN",symbol:"ZEN"},rpcUrls:{default:{http:["https://eon-rpc.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"EON Explorer",url:"https://eon-explorer.horizenlabs.io"}},contracts:{}}),ka=e({id:17777,name:"EOS EVM",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com",apiUrl:"https://explorer.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}}),xa=e({id:15557,name:"EOS EVM Testnet",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com",apiUrl:"https://explorer.testnet.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0}),fa=e({id:128123,name:"Etherlink Testnet",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.ghostnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Testnet",url:"https://testnet-explorer.etherlink.com"}},testnet:!0}),ya=e({id:9001,name:"Evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),Ea=e({id:9e3,name:"Evmos Testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),Ca=e({id:1994,name:"Ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io",apiUrl:"https://ektascan.io/api"}}}),wa=e({id:1004,name:"Ekta Testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io",apiUrl:"https://test.ektascan.io/api"}},testnet:!0}),va=e({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),Ta=e({id:64240,name:"Fantom Sonic Open Testnet",network:"fantom-sonic-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpcapi.sonic.fantom.network"]}},blockExplorers:{default:{name:"Fantom Sonic Open Testnet Explorer",url:"https://public-sonic.fantom.network"}},testnet:!0}),Ua=e({id:4002,name:"Fantom Testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{default:{name:"FTMScan",url:"https://testnet.ftmscan.com",apiUrl:"https://testnet.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}}}),ga=e({id:12306,name:"Fibo Chain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}}),Sa=e({id:314,name:"Filecoin Mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3328594}}}),Aa=e({id:314159,name:"Filecoin Calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}},testnet:!0}),Ba=e({id:3141,name:"Filecoin Hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"}},testnet:!0}),Fa=e({id:14,name:"Flare Mainnet",nativeCurrency:{decimals:18,name:"flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network",apiUrl:"https://flare-explorer.flare.network/api"}}}),Ma=e({id:114,name:"Coston2",nativeCurrency:{decimals:18,name:"coston2flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network",apiUrl:"https://coston2-explorer.flare.network/api"}},testnet:!0}),za=e({id:646,name:"FlowEVM Previewnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://previewnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Previewnet Explorer",url:"https://previewnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),Da=e({id:747,name:"FlowEVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://flowdiver.io"}}}),Ia=e({id:545,name:"FlowEVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://testnet.flowdiver.io"}}}),_a=e({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),B=1,Ha=e({...l,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[B]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[B]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[B]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:B}),F=17e3,Pa=e({...l,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.frax.com"]}},blockExplorers:{default:{name:"fraxscan testnet",url:"https://holesky.fraxscan.com",apiUrl:"https://api-holesky.fraxscan.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[F]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[F]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[F]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:F}),Oe=11155111,Oa=e({...l,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...l.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:Oe}),La=e({id:122,name:"Fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io",apiUrl:"https://explorer.fuse.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:16146628}}}),Na=e({id:123,name:"Fuse Sparknet",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io",apiUrl:"https://explorer.fusespark.io/api"}}}),Ra=e({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:22163670}}}),Ka=e({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},testnet:!0}),Ga=e({id:8899,name:"JIBCHAIN L1",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{http:["https://rpc-l1.jibchain.net"]},public:{http:["https://rpc-l1.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-l1.jibchain.net",apiUrl:"https://exp-l1.jibchain.net/api"}},contracts:{multicall3:{address:"0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC",blockCreated:2299048}},testnet:!1}),Va=e({id:88991,name:"Jibchain Testnet",nativeCurrency:{name:"tJBC",symbol:"tJBC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.testnet.jibchain.net",apiUrl:"https://exp.testnet.jibchain.net/api"}},contracts:{multicall3:{address:"0xa1a858ad9041B4741e620355a3F96B3c78e70ecE",blockCreated:32848}},testnet:!0}),Xa=e({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{public:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]},default:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]}},blockExplorers:{default:{name:"Karura Blockscout",url:"https://blockscout.karura.network",apiUrl:"https://blockscout.karura.network/api"}},testnet:!1}),qa=e({id:1663,name:"Horizen Gobi Testnet",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0}),ja=e({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:10339206},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),Za=e({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{default:{name:"Gnosisscan",url:"https://gnosisscan.io",apiUrl:"https://api.gnosisscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),$a=e({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0}),Wa=e({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),Qa=e({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),Ya=e({id:11235,name:"HAQQ Mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network",apiUrl:"https://explorer.haqq.network/api"}}}),Ja=e({id:54211,name:"HAQQ Testedge 2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network",apiUrl:"https://explorer.testedge2.haqq.network/api"}}}),er=e({id:295,name:"Hedera Mainnet",network:"hedera-mainnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://mainnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/mainnet"}},testnet:!1}),tr=e({id:296,name:"Hedera Testnet",network:"hedera-testnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://testnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/testnet"}},testnet:!0}),ar=e({id:297,name:"Hedera Previewnet",network:"hedera-previewnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://previewnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/previewnet"}},testnet:!0}),rr=e({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",blockCreated:801613},ensUniversalResolver:{address:"0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",blockCreated:973484}},testnet:!0}),sr=e({id:13371,name:"Immutable zkEVM",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),nr=e({id:13473,name:"Immutable zkEVM Testnet",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.testnet.immutable.com"]}},blockExplorers:{default:{name:"Immutable Testnet Explorer",url:"https://explorer.testnet.immutable.com/"}},contracts:{multicall3:{address:"0x2CC787Ed364600B0222361C4188308Fa8E68bA60",blockCreated:5977391}},testnet:!0}),lr=e({id:2525,name:"inEVM Mainnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://mainnet.rpc.inevm.com/http"]}},blockExplorers:{default:{name:"inEVM Explorer",url:"https://inevm.calderaexplorer.xyz",apiUrl:"https://inevm.calderaexplorer.xyz/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:118606}}}),or=e({id:107107114116,name:"Kakarot Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),cr=e({id:2222,name:"Kava EVM",network:"kava-mainnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Explorer",url:"https://kavascan.com",apiUrl:"https://kavascan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3661165}},testnet:!1}),ir=e({id:2221,name:"Kava EVM Testnet",network:"kava-testnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.testnet.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Testnet Explorer",url:"https://testnet.kavascan.com/",apiUrl:"https://testnet.kavascan.com/api"}},contracts:{multicall3:{address:"0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6",blockCreated:7242179}},testnet:!0}),pr=e({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]},public:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),dr=e({id:8217,name:"Klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-cypress.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),mr=e({id:1001,name:"Klaytn Baobab Testnet",network:"klaytn-baobab",nativeCurrency:{decimals:18,name:"Baobab Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-baobab.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://baobab.klaytnscope.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),ur=e({id:255,name:"Kroma",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.kroma.network"]}},blockExplorers:{default:{name:"Kroma Explorer",url:"https://blockscout.kroma.network",apiUrl:"https://blockscout.kroma.network/api"}},testnet:!1}),br=e({id:2358,name:"Kroma Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.sepolia.kroma.network"]}},blockExplorers:{default:{name:"Kroma Sepolia Explorer",url:"https://blockscout.sepolia.kroma.network",apiUrl:"https://blockscout.sepolia.kroma.network/api"}},testnet:!0}),hr=e({id:12324,name:"L3X Protocol",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.l3x.com"],webSocket:["wss://rpc-mainnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Mainnet Explorer",url:"https://explorer.l3x.com",apiUrl:"https://explorer.l3x.com/api/v2"}},testnet:!1}),kr=e({id:12325,name:"L3X Protocol Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.l3x.com"],webSocket:["wss://rpc-testnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Testnet Explorer",url:"https://explorer-testnet.l3x.com",apiUrl:"https://explorer-testnet.l3x.com/api/v2"}},testnet:!0}),xr=e({id:1891,name:"LightLink Pegasus Testnet",network:"lightlink-pegasus",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.pegasus.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Pegasus Explorer",url:"https://pegasus.lightlink.io"}},testnet:!0}),fr=e({id:1890,name:"LightLink Phoenix Mainnet",network:"lightlink-phoenix",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.phoenix.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Phoenix Explorer",url:"https://phoenix.lightlink.io"}},testnet:!1}),yr=e({id:59144,name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),Er=e({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://api-goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),Cr=e({id:59141,name:"Linea Sepolia Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.linea.build"],webSocket:["wss://rpc.sepolia.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.lineascan.build",apiUrl:"https://api-sepolia.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:227427}},testnet:!0}),wr=e({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),$=50000n,Q=he*32n,le={block:G({format(t){var s;const a=(s=t.transactions)==null?void 0:s.map(r=>{var c;if(typeof r=="string")return r;const n=(c=le.transaction)==null?void 0:c.format(r);return n.typeHex==="0x71"?n.type="eip712":n.typeHex==="0xff"&&(n.type="priority"),n});return{l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTimestamp:t.l1BatchTimestamp?i(t.l1BatchTimestamp):null,transactions:a}}}),transaction:V({format(t){const a={};return t.type==="0x71"?a.type="eip712":t.type==="0xff"&&(a.type="priority"),{...a,l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?i(t.l1BatchTxIndex):null}}}),transactionReceipt:ee({format(t){return{l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?i(t.l1BatchTxIndex):null,logs:t.logs.map(a=>({...ke(a),l1BatchNumber:a.l1BatchNumber?i(a.l1BatchNumber):null,transactionLogIndex:fe(a.transactionLogIndex),logType:a.logType})),l2ToL1Logs:t.l2ToL1Logs.map(a=>({blockNumber:i(a.blockHash),blockHash:a.blockHash,l1BatchNumber:i(a.l1BatchNumber),transactionIndex:i(a.transactionIndex),shardId:i(a.shardId),isService:a.isService,sender:a.sender,key:a.key,value:a.value,transactionHash:a.transactionHash,logIndex:i(a.logIndex)}))}}}),transactionRequest:te({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(t){return t.gasPerPubdata||t.paymaster&&t.paymasterInput||t.factoryDeps||t.customSignature?{eip712Meta:{...t.gasPerPubdata?{gasPerPubdata:o(t.gasPerPubdata)}:{gasPerPubdata:o($)},...t.paymaster&&t.paymasterInput?{paymasterParams:{paymaster:t.paymaster,paymasterInput:Array.from(R(t.paymasterInput))}}:{},...t.factoryDeps?{factoryDeps:t.factoryDeps.map(a=>Array.from(R(a)))}:{},...t.customSignature?{customSignature:Array.from(R(t.customSignature))}:{}},type:"0x71"}:{}}})};class Le extends u{constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(` +import{C as e,e as G,i as J,h as V,j as ee,L as X,B as q,p as j,G as k,a as E,l as te,K as de,P as me,I as ae,F as ue,T as be,m as he,g as ke,J as xe}from"./number-LIp8TDoP.js";import{bf as i,aS as o,bo as W,a_ as u,bh as fe,b5 as R,b8 as K,bj as ye}from"./index-VLNutAkM.js";const et=e({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{public:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]},default:{http:["https://eth-rpc-acala.aca-api.network"],webSocket:["wss://eth-rpc-acala.aca-api.network"]}},blockExplorers:{default:{name:"Acala Blockscout",url:"https://blockscout.acala.network",apiUrl:"https://blockscout.acala.network/api"}},testnet:!1}),Ee={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},Z={block:G({format(t){var s;return{transactions:(s=t.transactions)==null?void 0:s.map(r=>{if(typeof r=="string")return r;const n=J(r);return n.typeHex==="0x7e"&&(n.isSystemTx=r.isSystemTx,n.mint=r.mint?i(r.mint):void 0,n.sourceHash=r.sourceHash,n.type="deposit"),n}),stateRoot:t.stateRoot}}}),transaction:V({format(t){const a={};return t.type==="0x7e"&&(a.isSystemTx=t.isSystemTx,a.mint=t.mint?i(t.mint):void 0,a.sourceHash=t.sourceHash,a.type="deposit"),a}}),transactionReceipt:ee({format(t){return{l1GasPrice:t.l1GasPrice?i(t.l1GasPrice):null,l1GasUsed:t.l1GasUsed?i(t.l1GasUsed):null,l1Fee:t.l1Fee?i(t.l1Fee):null,l1FeeScalar:t.l1FeeScalar?Number(t.l1FeeScalar):null}}})};function Ce(t,a){return Te(t)?ve(t):X(t,a)}const we={transaction:Ce};function ve(t){Ue(t);const{sourceHash:a,data:s,from:r,gas:n,isSystemTx:c,mint:p,to:m,value:d}=t,b=[a,r,m??"0x",p?o(p):"0x",d?o(d):"0x",n?o(n):"0x",c?"0x1":"0x",s??"0x"];return q(["0x7e",j(b)])}function Te(t){return t.type==="deposit"||typeof t.sourceHash<"u"}function Ue(t){const{from:a,to:s}=t;if(a&&!k(a))throw new E({address:a});if(s&&!k(s))throw new E({address:s})}const l={contracts:Ee,formatters:Z,serializers:we},T=1,tt=e({...l,id:888888888,name:"Ancient8",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 explorer",url:"https://scan.ancient8.gg",apiUrl:"https://scan.ancient8.gg/api"}},contracts:{...l.contracts,l2OutputOracle:{[T]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[T]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[T]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:T}),U=11155111,at=e({...l,id:28122024,name:"Ancient8 Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpcv2-testnet.ancient8.gg"]}},blockExplorers:{default:{name:"Ancient8 Celestia Testnet explorer",url:"https://scanv2-testnet.ancient8.gg",apiUrl:"https://scanv2-testnet.ancient8.gg/api"}},contracts:{...l.contracts,l2OutputOracle:{[U]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[U]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[U]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:U}),rt=e({id:31337,name:"Anvil",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),st=e({id:3993,name:"APEX Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.apexlayer.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-testnet.apexlayer.xyz",apiUrl:"https://exp-testnet.apexlayer.xyz/api"}},contracts:{multicall3:{address:"0xf7642be33a6b18D16a995657adb5a68CD0438aE2",blockCreated:283775}},testnet:!0}),nt=e({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),lt=e({id:421613,name:"Arbitrum Goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),ot=e({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),ct=e({id:592,name:"Astar",network:"astar-mainnet",nativeCurrency:{name:"Astar",symbol:"ASTR",decimals:18},rpcUrls:{default:{http:["https://astar.api.onfinality.io/public"]}},blockExplorers:{default:{name:"Astar Subscan",url:"https://astar.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:761794}},testnet:!1}),it=e({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/astar-zkevm"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),pt=e({id:6038361,name:"Astar zkEVM Testnet zKyoto",network:"zKyoto",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.startale.com/zkyoto"]}},blockExplorers:{default:{name:"zKyoto Explorer",url:"https://zkyoto.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:196153}},testnet:!0}),dt=e({id:421614,name:"Arbitrum Sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),mt=e({id:463,name:"Areon Network",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areon.network"],webSocket:["wss://mainnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!1}),ut=e({id:462,name:"Areon Network Testnet",nativeCurrency:{decimals:18,name:"TAREA",symbol:"TAREA"},rpcUrls:{default:{http:["https://testnet-rpc.areon.network"],webSocket:["wss://testnet-ws.areon.network"]}},blockExplorers:{default:{name:"Areonscan",url:"https://areonscan.com"}},testnet:!0}),bt=e({id:1313161554,name:"Aurora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://aurorascan.dev",apiUrl:"https://aurorascan.dev/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:62907816}}}),ht=e({id:1313161555,name:"Aurora Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.aurora.dev"]}},blockExplorers:{default:{name:"Aurorascan",url:"https://testnet.aurorascan.dev",apiUrl:"https://testnet.aurorascan.dev/api"}},testnet:!0}),kt=e({id:205205,name:"Auroria Testnet",network:"auroria",nativeCurrency:{name:"Auroria Stratis",symbol:"tSTRAX",decimals:18},rpcUrls:{default:{http:["https://auroria.rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Auroria Testnet Explorer",url:"https://auroria.explorer.stratisevm.com"}},testnet:!0}),xt=e({id:43114,name:"Avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowScan",url:"https://snowscan.xyz",apiUrl:"https://api.snowscan.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),ft=e({id:43113,name:"Avalanche Fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowScan",url:"https://testnet.snowscan.xyz",apiUrl:"https://api-testnet.snowscan.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),yt=e({id:5165,network:"bahamut",name:"Bahamut",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]},public:{http:["https://rpc1.bahamut.io","https://bahamut-rpc.publicnode.com","https://rpc2.bahamut.io"],webSocket:["wss://ws1.sahara.bahamutchain.com","wss://bahamut-rpc.publicnode.com","wss://ws2.sahara.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),g=1,Et=e({...l,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[g]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[g]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[g]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:g}),S=5,Ct=e({...l,id:84531,name:"Base Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://goerli.basescan.org",apiUrl:"https://goerli.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[S]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[S]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[S]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:S}),A=11155111,wt=e({...l,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...l.contracts,l2OutputOracle:{[A]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[A]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[A]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:A}),vt=e({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{public:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]},default:{http:["https://build.onbeam.com/rpc"],webSocket:["wss://build.onbeam.com/ws"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets.avax.network/beam"}},contracts:{multicall3:{address:"0x4956f15efdc3dc16645e90cc356eafa65ffc65ec",blockCreated:1}}}),Tt=e({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{public:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]},default:{http:["https://build.onbeam.com/rpc/testnet"],webSocket:["wss://build.onbeam.com/ws/testnet"]}},blockExplorers:{default:{name:"Beam Explorer",url:"https://subnets-test.avax.network/beam"}},contracts:{multicall3:{address:"0x9bf49b704ee2a095b95c1f2d4eb9010510c41c9e",blockCreated:3}},testnet:!0}),Ut=e({id:641230,name:"Bear Network Chain Mainnet",nativeCurrency:{decimals:18,name:"BearNetworkChain",symbol:"BRNKC"},rpcUrls:{default:{http:["https://brnkc-mainnet.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkScan",url:"https://brnkscan.bearnetwork.net",apiUrl:"https://brnkscan.bearnetwork.net/api"}}}),gt=e({id:751230,name:"Bear Network Chain Testnet",nativeCurrency:{decimals:18,name:"tBRNKC",symbol:"tBRNKC"},rpcUrls:{default:{http:["https://brnkc-test.bearnetwork.net"]}},blockExplorers:{default:{name:"BrnkTestScan",url:"https://brnktest-scan.bearnetwork.net",apiUrl:"https://brnktest-scan.bearnetwork.net/api"}},testnet:!0}),St=e({id:80085,name:"Berachain Artio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},rpcUrls:{default:{http:["https://artio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain",url:"https://artio.beratrail.io"}},testnet:!0}),At=e({id:11501,name:"BEVM Mainnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet-1.bevm.io"]}},blockExplorers:{default:{name:"Bevmscan",url:"https://scan-mainnet.bevm.io",apiUrl:"https://scan-mainnet-api.bevm.io/api"}}}),Bt=e({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]},public:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}}}),Ft=e({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]},public:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),ge=1,Mt=e({id:81457,name:"Blast",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://blastscan.io",apiUrl:"https://api.blastscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929}},sourceId:ge}),Se=11155111,zt=e({id:168587773,name:"Blast Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.blast.io"]}},blockExplorers:{default:{name:"Blastscan",url:"https://sepolia.blastscan.io",apiUrl:"https://api-sepolia.blastscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:756690}},testnet:!0,sourceId:Se}),Dt=e({id:60808,name:"BOB",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.gobob.xyz"],webSocket:["wss://rpc.gobob.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.gobob.xyz"}},contracts:{multicall3:{address:"0x63f8279bccDb75c0F38e0CD6B6A0c72a0a760FF9",blockCreated:457045}},testnet:!1}),It=e({id:288,name:"Boba Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://bobascan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:446859}}}),_t=e({id:1039,name:"Bronos",nativeCurrency:{decimals:18,name:"BRO",symbol:"BRO"},rpcUrls:{default:{http:["https://evm.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://broscan.bronos.org"}}}),Ht=e({id:1038,name:"Bronos Testnet",nativeCurrency:{decimals:18,name:"Bronos Coin",symbol:"tBRO"},rpcUrls:{default:{http:["https://evm-testnet.bronos.org"]}},blockExplorers:{default:{name:"BronoScan",url:"https://tbroscan.bronos.org"}},testnet:!0}),Pt=e({id:56,name:"BNB Smart Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),Ot=e({id:97,name:"Binance Smart Chain Testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{default:{name:"BscScan",url:"https://testnet.bscscan.com",apiUrl:"https://testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),Lt=e({id:1017,name:"BNB Greenfield Chain",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://greenfield-chain.bnbchain.org"]}},blockExplorers:{default:{name:"BNB Greenfield Mainnet Scan",url:"https://greenfieldscan.com"}},testnet:!1}),Nt=e({id:200901,name:"Bitlayer",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com","https://rpc.ankr.com/bitlayer"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"btrscan",url:"https://www.btrscan.com",apiUrl:"https://www.btrscan.com/apis"}}}),Rt=e({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org","wss://testnet-ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"btrscan",url:"https://testnet-scan.bitlayer.org",apiUrl:"https://testnet-scan.bitlayer.org/apis"}}}),Kt=e({id:4999,name:"BlackFort Exchange Network",nativeCurrency:{name:"BlackFort Token",symbol:"BXN",decimals:18},rpcUrls:{default:{http:["https://mainnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.blackfort.network",apiUrl:"https://explorer.blackfort.network/api"}}}),Gt=e({id:4777,name:"BlackFort Exchange Network Testnet",nativeCurrency:{name:"BlackFort Testnet Token",symbol:"TBXN",decimals:18},rpcUrls:{default:{http:["https://testnet.blackfort.network/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.blackfort.network",apiUrl:"https://testnet-explorer.blackfort.network/api"}},testnet:!0}),Vt=e({id:7700,name:"Canto",nativeCurrency:{decimals:18,name:"Canto",symbol:"CANTO"},rpcUrls:{default:{http:["https://canto.gravitychain.io"]}},blockExplorers:{default:{name:"Tuber.Build (Blockscout)",url:"https://tuber.build"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2905789}}}),Ae={estimateFeesPerGas:async t=>{var r;if(!((r=t.request)!=null&&r.feeCurrency))return null;const[a,s]=await Promise.all([Be(t.client,t.request.feeCurrency),Fe(t.client,t.request.feeCurrency)]);return{maxFeePerGas:a,maxPriorityFeePerGas:s}}};async function Be(t,a){const s=await t.request({method:"eth_gasPrice",params:[a]});return BigInt(s)}async function Fe(t,a){const s=await t.request({method:"eth_maxPriorityFeePerGas",params:[a]});return BigInt(s)}function re(t){return t===0||t===0n||t===void 0||t===null||t==="0"||t===""||typeof t=="string"&&(W(t).toLowerCase()==="0x"||W(t).toLowerCase()==="0x00")}function w(t){return!re(t)}function Me(t){return typeof t.maxFeePerGas<"u"&&typeof t.maxPriorityFeePerGas<"u"}function se(t){return t.type==="cip64"?!0:Me(t)&&w(t.feeCurrency)}const ze={block:G({exclude:["difficulty","gasLimit","mixHash","nonce","uncles"],format(t){var s;const a=(s=t.transactions)==null?void 0:s.map(r=>typeof r=="string"?r:{...J(r),feeCurrency:r.feeCurrency,...r.type!=="0x7b"?{gatewayFee:r.gatewayFee?i(r.gatewayFee):null,gatewayFeeRecipient:r.gatewayFeeRecipient||null}:{}});return{randomness:t.randomness,transactions:a}}}),transaction:V({format(t){const a={feeCurrency:t.feeCurrency};return t.type==="0x7b"?a.type="cip64":(t.type==="0x7c"&&(a.type="cip42"),a.gatewayFee=t.gatewayFee?i(t.gatewayFee):null,a.gatewayFeeRecipient=t.gatewayFeeRecipient),a}}),transactionRequest:te({format(t){const a={feeCurrency:t.feeCurrency};return se(t)&&(a.type="0x7b"),a}})};function De(t,a){return se(t)?_e(t,a):X(t,a)}const Ie={transaction:De};function _e(t,a){Pe(t);const{chainId:s,gas:r,nonce:n,to:c,value:p,maxFeePerGas:m,maxPriorityFeePerGas:d,accessList:b,feeCurrency:f,data:y}=t,h=[o(s),n?o(n):"0x",d?o(d):"0x",m?o(m):"0x",r?o(r):"0x",c??"0x",p?o(p):"0x",y??"0x",de(b),f,...me(t,a)];return q(["0x7b",j(h)])}const He=2n**256n-1n;function Pe(t){const{chainId:a,maxPriorityFeePerGas:s,gasPrice:r,maxFeePerGas:n,to:c,feeCurrency:p}=t;if(a<=0)throw new ae({chainId:a});if(c&&!k(c))throw new E({address:c});if(r)throw new u("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(w(n)&&n>He)throw new ue({maxFeePerGas:n});if(w(s)&&w(n)&&s>n)throw new be({maxFeePerGas:n,maxPriorityFeePerGas:s});if(w(p)&&!k(p))throw new u("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(re(p))throw new u("`feeCurrency` must be provided for CIP-64 transactions.")}const ne={formatters:ze,serializers:Ie,fees:Ae},Xt=e({...ne,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1}),qt=e({...ne,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores",apiUrl:"https://explorer.celo.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001}},testnet:!0}),jt=e({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.ankr.com/chiliz","https://chiliz-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}}}),Zt=e({id:61,name:"Ethereum Classic",nativeCurrency:{decimals:18,name:"ETC",symbol:"ETC"},rpcUrls:{default:{http:["https://etc.rivet.link"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.com/etc/mainnet"}}}),$t=e({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.org"],webSocket:["wss://evm.confluxrpc.org/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),Wt=e({id:71,name:"Conflux eSpace Testnet",network:"cfx-espace-testnet",testnet:!0,nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evmtestnet.confluxrpc.org"],webSocket:["wss://evmtestnet.confluxrpc.org/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.io"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),Qt=e({id:1116,name:"Core Dao",nativeCurrency:{decimals:18,name:"Core",symbol:"CORE"},rpcUrls:{default:{http:["https://rpc.coredao.org"]}},blockExplorers:{default:{name:"CoreDao",url:"https://scan.coredao.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11907934}},testnet:!1}),Yt=e({id:25,name:"Cronos Mainnet",nativeCurrency:{decimals:18,name:"Cronos",symbol:"CRO"},rpcUrls:{default:{http:["https://evm.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://explorer.cronos.org",apiUrl:"https://explorer-api.cronos.org/mainnet/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1963112}}}),Jt=e({id:338,name:"Cronos Testnet",nativeCurrency:{decimals:18,name:"CRO",symbol:"tCRO"},rpcUrls:{default:{http:["https://evm-t3.cronos.org"]}},blockExplorers:{default:{name:"Cronos Explorer",url:"https://cronos.org/explorer/testnet3"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),ea=e({id:3737,name:"Crossbell",nativeCurrency:{decimals:18,name:"CSB",symbol:"CSB"},rpcUrls:{default:{http:["https://rpc.crossbell.io"]}},blockExplorers:{default:{name:"CrossScan",url:"https://scan.crossbell.io",apiUrl:"https://scan.crossbell.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:38246031}}}),ta=e({id:7560,name:"Cyber",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://cyberscan.co",apiUrl:"https://cyberscan.co/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),aa=e({id:111557560,name:"Cyber Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cyber-testnet.alt.technology"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet.cyberscan.co",apiUrl:"https://testnet.cyberscan.co/api"}},contracts:{multicall3:{address:"0xffc391F0018269d4758AEA1a144772E8FB99545E",blockCreated:304545}},testnet:!0}),ra=e({id:46,name:"Darwinia Network",nativeCurrency:{decimals:18,name:"RING",symbol:"RING"},rpcUrls:{default:{http:["https://rpc.darwinia.network"],webSocket:["wss://rpc.darwinia.network"]}},blockExplorers:{default:{name:"Explorer",url:"https://darwinia.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),sa=e({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:8},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]},public:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),na=e({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:8},rpcUrls:{default:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]},public:{http:["https://eth.testnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live/?network=TestNet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:156462}},testnet:!0}),la=e({id:666666666,name:"Degen",nativeCurrency:{decimals:18,name:"Degen",symbol:"DEGEN"},rpcUrls:{default:{http:["https://rpc.degen.tips"],webSocket:["wss://rpc.degen.tips"]}},blockExplorers:{default:{name:"Degen Chain Explorer",url:"https://explorer.degen.tips",apiUrl:"https://explorer.degen.tips/api/v2"}}}),oa=e({id:53935,name:"DFK Chain",nativeCurrency:{decimals:18,name:"Jewel",symbol:"JEWEL"},rpcUrls:{default:{http:["https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"]}},blockExplorers:{default:{name:"DFKSubnetScan",url:"https://subnets.avax.network/defi-kingdoms"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14790551}}}),ca=e({id:53457,name:"DODOchain Testnet",nativeCurrency:{decimals:18,name:"DODO",symbol:"DODO"},rpcUrls:{default:{http:["https://dodochain-testnet.alt.technology"],webSocket:["wss://dodochain-testnet.alt.technology/ws"]}},blockExplorers:{default:{name:"DODOchain Testnet (Sepolia) Explorer",url:"https://testnet-scan.dodochain.com"}},testnet:!0}),ia=e({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Dogechain",symbol:"DC"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}}}),pa=e({id:23451,name:"DreyerX Mainnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["https://rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Scan",url:"https://scan.dreyerx.com"}}}),da=e({id:2026,name:"Edgeless Network",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://rpc.edgeless.network/http"],webSocket:["wss://rpc.edgeless.network/ws"]}},blockExplorers:{default:{name:"Edgeless Explorer",url:"https://explorer.edgeless.network"}}}),ma=e({id:202,name:"Edgeless Testnet",nativeCurrency:{name:"Edgeless Wrapped ETH",symbol:"EwETH",decimals:18},rpcUrls:{default:{http:["https://edgeless-testnet.rpc.caldera.xyz/http"],webSocket:["wss://edgeless-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Edgeless Testnet Explorer",url:"https://testnet.explorer.edgeless.network"}}}),ua=e({id:2021,name:"Edgeware EdgeEVM Mainnet",nativeCurrency:{decimals:18,name:"Edgeware",symbol:"EDG"},rpcUrls:{default:{http:["https://edgeware-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://edgscan.live",apiUrl:"https://edgscan.live/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18117872}}}),ba=e({id:2022,name:"Beresheet BereEVM Testnet",nativeCurrency:{decimals:18,name:"Testnet EDG",symbol:"tEDG"},rpcUrls:{default:{http:["https://beresheet-evm.jelliedowl.net"]}},blockExplorers:{default:{name:"Edgscan by Bharathcoorg",url:"https://testnet.edgscan.live",apiUrl:"https://testnet.edgscan.live/api"}}}),ha=e({id:7332,name:"Horizen EON",nativeCurrency:{decimals:18,name:"ZEN",symbol:"ZEN"},rpcUrls:{default:{http:["https://eon-rpc.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"EON Explorer",url:"https://eon-explorer.horizenlabs.io"}},contracts:{}}),ka=e({id:17777,name:"EOS EVM",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Explorer",url:"https://explorer.evm.eosnetwork.com",apiUrl:"https://explorer.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7943933}}}),xa=e({id:15557,name:"EOS EVM Testnet",nativeCurrency:{decimals:18,name:"EOS",symbol:"EOS"},rpcUrls:{default:{http:["https://api.testnet.evm.eosnetwork.com"]}},blockExplorers:{default:{name:"EOS EVM Testnet Explorer",url:"https://explorer.testnet.evm.eosnetwork.com",apiUrl:"https://explorer.testnet.evm.eosnetwork.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9067940}},testnet:!0}),fa=e({id:128123,name:"Etherlink Testnet",nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.ghostnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Testnet",url:"https://testnet-explorer.etherlink.com"}},testnet:!0}),ya=e({id:9001,name:"Evmos",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.org:8545"]}},blockExplorers:{default:{name:"Evmos Block Explorer",url:"https://escan.live"}}}),Ea=e({id:9e3,name:"Evmos Testnet",nativeCurrency:{decimals:18,name:"Evmos",symbol:"EVMOS"},rpcUrls:{default:{http:["https://eth.bd.evmos.dev:8545"]}},blockExplorers:{default:{name:"Evmos Testnet Block Explorer",url:"https://evm.evmos.dev/"}}}),Ca=e({id:1994,name:"Ekta",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://main.ekta.io"]}},blockExplorers:{default:{name:"Ektascan",url:"https://ektascan.io",apiUrl:"https://ektascan.io/api"}}}),wa=e({id:1004,name:"Ekta Testnet",nativeCurrency:{decimals:18,name:"EKTA",symbol:"EKTA"},rpcUrls:{default:{http:["https://test.ekta.io:8545"]}},blockExplorers:{default:{name:"Test Ektascan",url:"https://test.ektascan.io",apiUrl:"https://test.ektascan.io/api"}},testnet:!0}),va=e({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),Ta=e({id:64240,name:"Fantom Sonic Open Testnet",network:"fantom-sonic-testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpcapi.sonic.fantom.network"]}},blockExplorers:{default:{name:"Fantom Sonic Open Testnet Explorer",url:"https://public-sonic.fantom.network"}},testnet:!0}),Ua=e({id:4002,name:"Fantom Testnet",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.testnet.fantom.network"]}},blockExplorers:{default:{name:"FTMScan",url:"https://testnet.ftmscan.com",apiUrl:"https://testnet.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8328688}}}),ga=e({id:12306,name:"Fibo Chain",nativeCurrency:{decimals:18,name:"fibo",symbol:"FIBO"},rpcUrls:{default:{http:["https://network.hzroc.art"]}},blockExplorers:{default:{name:"FiboScan",url:"https://scan.fibochain.org"}}}),Sa=e({id:314,name:"Filecoin Mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3328594}}}),Aa=e({id:314159,name:"Filecoin Calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}},testnet:!0}),Ba=e({id:3141,name:"Filecoin Hyperspace",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.hyperspace.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://hyperspace.filfox.info/en"}},testnet:!0}),Fa=e({id:14,name:"Flare Mainnet",nativeCurrency:{decimals:18,name:"flare",symbol:"FLR"},rpcUrls:{default:{http:["https://flare-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Flare Explorer",url:"https://flare-explorer.flare.network",apiUrl:"https://flare-explorer.flare.network/api"}}}),Ma=e({id:114,name:"Coston2",nativeCurrency:{decimals:18,name:"coston2flare",symbol:"C2FLR"},rpcUrls:{default:{http:["https://coston2-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston2 Explorer",url:"https://coston2-explorer.flare.network",apiUrl:"https://coston2-explorer.flare.network/api"}},testnet:!0}),za=e({id:646,name:"FlowEVM Previewnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://previewnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Previewnet Explorer",url:"https://previewnet.flowdiver.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}}}),Da=e({id:747,name:"FlowEVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://flowdiver.io"}}}),Ia=e({id:545,name:"FlowEVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://testnet.flowdiver.io"}}}),_a=e({id:31337,name:"Foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}}),B=1,Ha=e({...l,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[B]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[B]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[B]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:B}),F=17e3,Pa=e({...l,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax Ether",symbol:"frxETH",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.frax.com"]}},blockExplorers:{default:{name:"fraxscan testnet",url:"https://holesky.fraxscan.com",apiUrl:"https://api-holesky.fraxscan.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[F]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[F]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[F]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:F}),Oe=11155111,Oa=e({...l,id:3397901,network:"funkiSepolia",name:"Funki Sepolia Sandbox",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://funki-testnet.alt.technology"]}},blockExplorers:{default:{name:"Funki Sepolia Sandbox Explorer",url:"https://sepolia-sandbox.funkichain.com/"}},testnet:!0,contracts:{...l.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:Oe}),La=e({id:122,name:"Fuse",nativeCurrency:{name:"Fuse",symbol:"FUSE",decimals:18},rpcUrls:{default:{http:["https://rpc.fuse.io"]}},blockExplorers:{default:{name:"Fuse Explorer",url:"https://explorer.fuse.io",apiUrl:"https://explorer.fuse.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:16146628}}}),Na=e({id:123,name:"Fuse Sparknet",nativeCurrency:{name:"Spark",symbol:"SPARK",decimals:18},rpcUrls:{default:{http:["https://rpc.fusespark.io"]}},blockExplorers:{default:{name:"Sparkent Explorer",url:"https://explorer.fusespark.io",apiUrl:"https://explorer.fusespark.io/api"}}}),Ra=e({id:4689,name:"IoTeX",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.mainnet.iotex.io"],webSocket:["wss://babel-api.mainnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://iotexscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:22163670}}}),Ka=e({id:4690,name:"IoTeX Testnet",nativeCurrency:{decimals:18,name:"IoTeX",symbol:"IOTX"},rpcUrls:{default:{http:["https://babel-api.testnet.iotex.io"],webSocket:["wss://babel-api.testnet.iotex.io"]}},blockExplorers:{default:{name:"IoTeXScan",url:"https://testnet.iotexscan.io"}},testnet:!0}),Ga=e({id:8899,name:"JIBCHAIN L1",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{http:["https://rpc-l1.jibchain.net"]},public:{http:["https://rpc-l1.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp-l1.jibchain.net",apiUrl:"https://exp-l1.jibchain.net/api"}},contracts:{multicall3:{address:"0xc0C8C486D1466C57Efe13C2bf000d4c56F47CBdC",blockCreated:2299048}},testnet:!1}),Va=e({id:88991,name:"Jibchain Testnet",nativeCurrency:{name:"tJBC",symbol:"tJBC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.jibchain.net"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.testnet.jibchain.net",apiUrl:"https://exp.testnet.jibchain.net/api"}},contracts:{multicall3:{address:"0xa1a858ad9041B4741e620355a3F96B3c78e70ecE",blockCreated:32848}},testnet:!0}),Xa=e({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{public:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]},default:{http:["https://eth-rpc-karura.aca-api.network"],webSocket:["wss://eth-rpc-karura.aca-api.network"]}},blockExplorers:{default:{name:"Karura Blockscout",url:"https://blockscout.karura.network",apiUrl:"https://blockscout.karura.network/api"}},testnet:!1}),qa=e({id:1663,name:"Horizen Gobi Testnet",nativeCurrency:{decimals:18,name:"Test ZEN",symbol:"tZEN"},rpcUrls:{default:{http:["https://gobi-testnet.horizenlabs.io/ethv1"]}},blockExplorers:{default:{name:"Gobi Explorer",url:"https://gobi-explorer.horizen.io"}},contracts:{},testnet:!0}),ja=e({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.etherscan.io",apiUrl:"https://api-goerli.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1",blockCreated:10339206},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),Za=e({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{default:{name:"Gnosisscan",url:"https://gnosisscan.io",apiUrl:"https://api.gnosisscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),$a=e({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.chiadochain.net"],webSocket:["wss://rpc.chiadochain.net/wss"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.chiadochain.net",apiUrl:"https://blockscout.chiadochain.net/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4967313}},testnet:!0}),Wa=e({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),Qa=e({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),Ya=e({id:11235,name:"HAQQ Mainnet",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLM"},rpcUrls:{default:{http:["https://rpc.eth.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.haqq.network",apiUrl:"https://explorer.haqq.network/api"}}}),Ja=e({id:54211,name:"HAQQ Testedge 2",nativeCurrency:{decimals:18,name:"Islamic Coin",symbol:"ISLMT"},rpcUrls:{default:{http:["https://rpc.eth.testedge2.haqq.network"]}},blockExplorers:{default:{name:"HAQQ Explorer",url:"https://explorer.testedge2.haqq.network",apiUrl:"https://explorer.testedge2.haqq.network/api"}}}),er=e({id:295,name:"Hedera Mainnet",network:"hedera-mainnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://mainnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/mainnet"}},testnet:!1}),tr=e({id:296,name:"Hedera Testnet",network:"hedera-testnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://testnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/testnet"}},testnet:!0}),ar=e({id:297,name:"Hedera Previewnet",network:"hedera-previewnet",nativeCurrency:{symbol:"HBAR",name:"HBAR",decimals:18},rpcUrls:{default:{http:["https://previewnet.hashio.io/api"]}},blockExplorers:{default:{name:"Hashscan",url:"https://hashscan.io/previewnet"}},testnet:!0}),rr=e({id:17e3,name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://holesky.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",blockCreated:801613},ensUniversalResolver:{address:"0xa6AC935D4971E3CD133b950aE053bECD16fE7f3b",blockCreated:973484}},testnet:!0}),sr=e({id:13371,name:"Immutable zkEVM",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.immutable.com"]}},blockExplorers:{default:{name:"Immutable Explorer",url:"https://explorer.immutable.com"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),nr=e({id:13473,name:"Immutable zkEVM Testnet",nativeCurrency:{decimals:18,name:"Immutable Coin",symbol:"IMX"},rpcUrls:{default:{http:["https://rpc.testnet.immutable.com"]}},blockExplorers:{default:{name:"Immutable Testnet Explorer",url:"https://explorer.testnet.immutable.com/"}},contracts:{multicall3:{address:"0x2CC787Ed364600B0222361C4188308Fa8E68bA60",blockCreated:5977391}},testnet:!0}),lr=e({id:2525,name:"inEVM Mainnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://mainnet.rpc.inevm.com/http"]}},blockExplorers:{default:{name:"inEVM Explorer",url:"https://inevm.calderaexplorer.xyz",apiUrl:"https://inevm.calderaexplorer.xyz/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:118606}}}),or=e({id:107107114116,name:"Kakarot Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.kakarot.org"]}},blockExplorers:{default:{name:"Kakarot Scan",url:"https://sepolia.kakarotscan.org"}},testnet:!0}),cr=e({id:2222,name:"Kava EVM",network:"kava-mainnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Explorer",url:"https://kavascan.com",apiUrl:"https://kavascan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3661165}},testnet:!1}),ir=e({id:2221,name:"Kava EVM Testnet",network:"kava-testnet",nativeCurrency:{name:"Kava",symbol:"KAVA",decimals:18},rpcUrls:{default:{http:["https://evm.testnet.kava.io"]}},blockExplorers:{default:{name:"Kava EVM Testnet Explorer",url:"https://testnet.kavascan.com/",apiUrl:"https://testnet.kavascan.com/api"}},contracts:{multicall3:{address:"0xDf1D724A7166261eEB015418fe8c7679BBEa7fd6",blockCreated:7242179}},testnet:!0}),pr=e({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]},public:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),dr=e({id:8217,name:"Klaytn",nativeCurrency:{decimals:18,name:"Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-cypress.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://scope.klaytn.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),mr=e({id:1001,name:"Klaytn Baobab Testnet",network:"klaytn-baobab",nativeCurrency:{decimals:18,name:"Baobab Klaytn",symbol:"KLAY"},rpcUrls:{default:{http:["https://public-en-baobab.klaytn.net"]}},blockExplorers:{default:{name:"KlaytnScope",url:"https://baobab.klaytnscope.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),ur=e({id:255,name:"Kroma",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.kroma.network"]}},blockExplorers:{default:{name:"Kroma Explorer",url:"https://blockscout.kroma.network",apiUrl:"https://blockscout.kroma.network/api"}},testnet:!1}),br=e({id:2358,name:"Kroma Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://api.sepolia.kroma.network"]}},blockExplorers:{default:{name:"Kroma Sepolia Explorer",url:"https://blockscout.sepolia.kroma.network",apiUrl:"https://blockscout.sepolia.kroma.network/api"}},testnet:!0}),hr=e({id:12324,name:"L3X Protocol",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.l3x.com"],webSocket:["wss://rpc-mainnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Mainnet Explorer",url:"https://explorer.l3x.com",apiUrl:"https://explorer.l3x.com/api/v2"}},testnet:!1}),kr=e({id:12325,name:"L3X Protocol Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.l3x.com"],webSocket:["wss://rpc-testnet.l3x.com"]}},blockExplorers:{default:{name:"L3X Testnet Explorer",url:"https://explorer-testnet.l3x.com",apiUrl:"https://explorer-testnet.l3x.com/api/v2"}},testnet:!0}),xr=e({id:1891,name:"LightLink Pegasus Testnet",network:"lightlink-pegasus",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.pegasus.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Pegasus Explorer",url:"https://pegasus.lightlink.io"}},testnet:!0}),fr=e({id:1890,name:"LightLink Phoenix Mainnet",network:"lightlink-phoenix",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://replicator.phoenix.lightlink.io/rpc/v1"]}},blockExplorers:{default:{name:"LightLink Phoenix Explorer",url:"https://phoenix.lightlink.io"}},testnet:!1}),yr=e({id:59144,name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),Er=e({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://api-goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),Cr=e({id:59141,name:"Linea Sepolia Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.linea.build"],webSocket:["wss://rpc.sepolia.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.lineascan.build",apiUrl:"https://api-sepolia.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:227427}},testnet:!0}),wr=e({id:59140,name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build",apiUrl:"https://goerli.lineascan.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:498623}},testnet:!0}),$=50000n,Q=he*32n,le={block:G({format(t){var s;const a=(s=t.transactions)==null?void 0:s.map(r=>{var c;if(typeof r=="string")return r;const n=(c=le.transaction)==null?void 0:c.format(r);return n.typeHex==="0x71"?n.type="eip712":n.typeHex==="0xff"&&(n.type="priority"),n});return{l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTimestamp:t.l1BatchTimestamp?i(t.l1BatchTimestamp):null,transactions:a}}}),transaction:V({format(t){const a={};return t.type==="0x71"?a.type="eip712":t.type==="0xff"&&(a.type="priority"),{...a,l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?i(t.l1BatchTxIndex):null}}}),transactionReceipt:ee({format(t){return{l1BatchNumber:t.l1BatchNumber?i(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?i(t.l1BatchTxIndex):null,logs:t.logs.map(a=>({...ke(a),l1BatchNumber:a.l1BatchNumber?i(a.l1BatchNumber):null,transactionLogIndex:fe(a.transactionLogIndex),logType:a.logType})),l2ToL1Logs:t.l2ToL1Logs.map(a=>({blockNumber:i(a.blockHash),blockHash:a.blockHash,l1BatchNumber:i(a.l1BatchNumber),transactionIndex:i(a.transactionIndex),shardId:i(a.shardId),isService:a.isService,sender:a.sender,key:a.key,value:a.value,transactionHash:a.transactionHash,logIndex:i(a.logIndex)}))}}}),transactionRequest:te({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(t){return t.gasPerPubdata||t.paymaster&&t.paymasterInput||t.factoryDeps||t.customSignature?{eip712Meta:{...t.gasPerPubdata?{gasPerPubdata:o(t.gasPerPubdata)}:{gasPerPubdata:o($)},...t.paymaster&&t.paymasterInput?{paymasterParams:{paymaster:t.paymaster,paymasterInput:Array.from(R(t.paymasterInput))}}:{},...t.factoryDeps?{factoryDeps:t.factoryDeps.map(a=>Array.from(R(a)))}:{},...t.customSignature?{customSignature:Array.from(R(t.customSignature))}:{}},type:"0x71"}:{}}})};class Le extends u{constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(` `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidEip712TransactionError"})}}function oe(t){return!!(t.type==="eip712"||"customSignature"in t&&t.customSignature||"paymaster"in t&&t.paymaster||"paymasterInput"in t&&t.paymasterInput||"gasPerPubdata"in t&&typeof t.gasPerPubdata=="bigint"||"factoryDeps"in t&&t.factoryDeps)}function ce(t){const{chainId:a,to:s,from:r,paymaster:n,paymasterInput:c}=t;if(!oe(t))throw new Le;if(!a||a<=0)throw new ae({chainId:a});if(s&&!k(s))throw new E({address:s});if(r&&!k(r))throw new E({address:r});if(n&&!k(n))throw new E({address:n});if(n&&!c)throw new u("`paymasterInput` must be provided when `paymaster` is defined");if(!n&&c)throw new u("`paymaster` must be provided when `paymasterInput` is defined")}function Ne(t,a){return oe(t)?Ke(t):X(t,a)}const Re={transaction:Ne};function Ke(t){const{chainId:a,gas:s,nonce:r,to:n,from:c,value:p,maxFeePerGas:m,maxPriorityFeePerGas:d,customSignature:b,factoryDeps:f,paymaster:y,paymasterInput:h,gasPerPubdata:v,data:ie}=t;ce(t);const pe=[r?o(r):"0x",d?o(d):"0x",m?o(m):"0x",s?o(s):"0x",n??"0x",p?o(p):"0x",ie??"0x0",o(a),o(""),o(""),o(a),c??"0x",v?o(v):o($),f??[],b??"0x",y&&h?[y,h]:[]];return q(["0x71",j(pe)])}class Ge extends u{constructor({givenLength:a,maxBytecodeSize:s}){super(`Bytecode cannot be longer than ${s} bytes. Given length: ${a}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytecodeLengthExceedsMaxSizeError"})}}class Ve extends u{constructor({givenLengthInWords:a}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${a}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytecodeLengthInWordsMustBeOddError"})}}class Xe extends u{constructor({givenLength:a}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${a}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytecodeLengthMustBeDivisibleBy32Error"})}}function qe(t){const a=K(t);if(a.length%32!==0)throw new Xe({givenLength:a.length});if(a.length>Q)throw new Ge({givenLength:a.length,maxBytecodeSize:Q});const s=xe(a),r=K(s),n=a.length/32;if(n%2===0)throw new Ve({givenLengthInWords:n});const c=K(n),p=ye(c,{size:2}),m=new Uint8Array([1,0]);return r.set(m,0),r.set(p,2),r}const je=t=>{ce(t);const a=Ze(t);return{domain:{name:"zkSync",version:"2",chainId:t.chainId},types:{Transaction:[{name:"txType",type:"uint256"},{name:"from",type:"uint256"},{name:"to",type:"uint256"},{name:"gasLimit",type:"uint256"},{name:"gasPerPubdataByteLimit",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymaster",type:"uint256"},{name:"nonce",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"factoryDeps",type:"bytes32[]"},{name:"paymasterInput",type:"bytes"}]},primaryType:"Transaction",message:a}};function Ze(t){const{gas:a,nonce:s,to:r,from:n,value:c,maxFeePerGas:p,maxPriorityFeePerGas:m,factoryDeps:d,paymaster:b,paymasterInput:f,gasPerPubdata:y,data:h}=t;return{txType:113n,from:BigInt(n),to:r?BigInt(r):0n,gasLimit:a??0n,gasPerPubdataByteLimit:y??$,maxFeePerGas:p??0n,maxPriorityFeePerGas:m??0n,paymaster:b?BigInt(b):0n,nonce:s?BigInt(s):0n,value:c??0n,data:h||"0x0",factoryDeps:(d==null?void 0:d.map(v=>o(qe(v))))??[],paymasterInput:f||"0x"}}const x={formatters:le,serializers:Re,custom:{getEip712Domain:je}},vr=e({...x,id:1135,name:"Lisk",network:"lisk",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.lisk.com",apiUrl:"https://blockscout.lisk.com/api"}},contracts:{multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"}}}),M=11155111,Tr=e({...l,id:4202,network:"lisk-sepolia",name:"Lisk Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia-api.lisk.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.lisk.com",apiUrl:"https://sepolia-blockscout.lisk.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[M]:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[M]:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{[M]:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:M}),Ur=e({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),gr=e({id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network",apiUrl:"https://api.explorer.execution.mainnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:468183}}}),Sr=e({id:4201,name:"LUKSO Testnet",nativeCurrency:{decimals:18,name:"LUKSO Testnet",symbol:"LYXt"},rpcUrls:{default:{http:["https://rpc.testnet.lukso.network"],webSocket:["wss://ws-rpc.testnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Testnet Explorer",url:"https://explorer.execution.testnet.lukso.network",apiUrl:"https://api.explorer.execution.testnet.lukso.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:605348}},testnet:!0}),Ar=e({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Br=e({id:595,name:"Mandala TC9",network:"mandala",nativeCurrency:{name:"Mandala",symbol:"mACA",decimals:18},rpcUrls:{public:{http:["https://eth-rpc-tc9.aca-staging.network"],webSocket:["wss://eth-rpc-tc9.aca-staging.network"]},default:{http:["https://eth-rpc-tc9.aca-staging.network"],webSocket:["wss://eth-rpc-tc9.aca-staging.network"]}},blockExplorers:{default:{name:"Mandala Blockscout",url:"https://blockscout.mandala.aca-staging.network",apiUrl:"https://blockscout.mandala.aca-staging.network/api"}},testnet:!0}),Fr=e({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network",apiUrl:"https://pacific-explorer.manta.network/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),Mr=e({id:3441006,name:"Manta Pacific Sepolia Testnet",network:"manta-sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.sepolia-testnet.manta.network/http"]}},blockExplorers:{default:{name:"Manta Sepolia Testnet Explorer",url:"https://pacific-explorer.sepolia-testnet.manta.network",apiUrl:"https://pacific-explorer.sepolia-testnet.manta.network/api"}},contracts:{multicall3:{address:"0xca54918f7B525C8df894668846506767412b53E3",blockCreated:479584}},testnet:!0}),zr=e({id:3441005,name:"Manta Pacific Testnet",network:"manta-testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://manta-testnet.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Manta Testnet Explorer",url:"https://pacific-explorer.testnet.manta.network",apiUrl:"https://pacific-explorer.testnet.manta.network/api"}},contracts:{multicall3:{address:"0x211B1643b95Fe76f11eD8880EE810ABD9A4cf56C",blockCreated:419915}},testnet:!0}),Dr=e({id:5e3,name:"Mantle",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Explorer",url:"https://mantlescan.xyz/",apiUrl:"https://api.mantlescan.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:304717}}}),Ir=e({id:5003,name:"Mantle Sepolia Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.sepolia.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.sepolia.mantle.xyz/",apiUrl:"https://explorer.sepolia.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4584012}},testnet:!0}),_r=e({id:5001,name:"Mantle Testnet",nativeCurrency:{decimals:18,name:"MNT",symbol:"MNT"},rpcUrls:{default:{http:["https://rpc.testnet.mantle.xyz"]}},blockExplorers:{default:{name:"Mantle Testnet Explorer",url:"https://explorer.testnet.mantle.xyz",apiUrl:"https://explorer.testnet.mantle.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:561333}},testnet:!0}),Hr=e({id:4200,name:"Merlin",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://scan.merlinchain.io",apiUrl:"https://scan.merlinchain.io/api"}}}),Pr=e({id:571,name:"MetaChain Mainnet",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://rpc.metatime.com"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://explorer.metatime.com"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}}}),Or=e({id:1453,name:"MetaChain Istanbul",nativeCurrency:{name:"Metatime Coin",symbol:"MTC",decimals:18},rpcUrls:{default:{http:["https://istanbul-rpc.metachain.dev"]}},blockExplorers:{default:{name:"MetaExplorer",url:"https://istanbul-explorer.metachain.dev"}},contracts:{multicall3:{address:"0x0000000000000000000000000000000000003001",blockCreated:0}},testnet:!0}),z=1,Lr=e({...l,id:1750,name:"Metal L2",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.metall2.com"],webSocket:["wss://rpc.metall2.com"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.metall2.com",apiUrl:"https://explorer.metall2.com/api"}},contracts:{...l.contracts,l2OutputOracle:{[z]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[z]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[z]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:z}),Nr=e({id:82,name:"Meter",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpc.meter.io"]}},blockExplorers:{default:{name:"MeterScan",url:"https://scan.meter.io"}}}),Rr=e({id:83,name:"Meter Testnet",nativeCurrency:{decimals:18,name:"MTR",symbol:"MTR"},rpcUrls:{default:{http:["https://rpctest.meter.io"]}},blockExplorers:{default:{name:"MeterTestnetScan",url:"https://scan-warringstakes.meter.io"}}}),Kr=e({id:1088,name:"Metis",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://andromeda.metis.io/?owner=1088"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api"},blockscout:{name:"Andromeda Explorer",url:"https://andromeda-explorer.metis.io",apiUrl:"https://andromeda-explorer.metis.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}}),Gr=e({id:599,name:"Metis Goerli",nativeCurrency:{decimals:18,name:"Metis Goerli",symbol:"METIS"},rpcUrls:{default:{http:["https://goerli.gateway.metisdevops.link"]}},blockExplorers:{default:{name:"Metis Goerli Explorer",url:"https://goerli.explorer.metisdevops.link",apiUrl:"https://goerli.explorer.metisdevops.link/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1006207}}}),Vr=e({id:7518,name:"MEVerse Chain Mainnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversemainnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://www.meversescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:86881340}}}),Xr=e({id:4759,name:"MEVerse Chain Testnet",nativeCurrency:{decimals:18,name:"MEVerse",symbol:"MEV"},rpcUrls:{default:{http:["https://rpc.meversetestnet.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.meversescan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:64371115}},testnet:!0}),qr=e({id:1686,name:"Mint Sepolia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain Testnet explorer",url:"https://testnet-explorer.mintchain.io"}},testnet:!0}),$e=1,jr=e({id:34443,name:"Mode Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.mode.network"]}},blockExplorers:{default:{name:"Modescan",url:"https://modescan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882}},sourceId:$e}),We=11155111,Zr=e({id:919,name:"Mode Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.mode.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.mode.network",apiUrl:"https://sepolia.explorer.mode.network/api"}},contracts:{multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:We}),$r=e({id:1287,name:"Moonbase Alpha",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["https://rpc.api.moonbase.moonbeam.network"],webSocket:["wss://wss.api.moonbase.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonbase.moonscan.io",apiUrl:"https://moonbase.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1850686}},testnet:!0}),Wr=e({id:1284,name:"Moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io",apiUrl:"https://api-moonbeam.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),Qr=e({id:1281,name:"Moonbeam Development Node",nativeCurrency:{decimals:18,name:"DEV",symbol:"DEV"},rpcUrls:{default:{http:["http://127.0.0.1:9944"],webSocket:["wss://127.0.0.1:9944"]}}}),Yr=e({id:1285,name:"Moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{default:{http:["https://moonriver.public.blastapi.io"],webSocket:["wss://moonriver.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io",apiUrl:"https://api-moonriver.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1}),Jr=e({id:2710,name:"Morph Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.morphl2.io"]}},blockExplorers:{default:{name:"Morph Testnet Explorer",url:"https://explorer-testnet.morphl2.io",apiUrl:"https://explorer-api-testnet.morphl2.io/api"}},testnet:!0}),es=e({id:22222,name:"Nautilus Mainnet",nativeCurrency:{name:"ZBC",symbol:"ZBC",decimals:9},rpcUrls:{default:{http:["https://api.nautilus.nautchain.xyz"]}},blockExplorers:{default:{name:"NautScan",url:"https://nautscan.com"}}}),ts=e({id:245022926,name:"Neon EVM DevNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://devnet.neonevm.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://devnet.neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:205206112}},testnet:!0}),as=e({id:245022934,network:"neonMainnet",name:"Neon EVM MainNet",nativeCurrency:{name:"NEON",symbol:"NEON",decimals:18},rpcUrls:{default:{http:["https://neon-proxy-mainnet.solana.p2p.org"]}},blockExplorers:{default:{name:"Neonscan",url:"https://neonscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:206545524}},testnet:!1}),rs=e({id:4242,name:"Nexi",nativeCurrency:{name:"Nexi",symbol:"NEXI",decimals:18},rpcUrls:{default:{http:["https://rpc.chain.nexi.technology"]}},blockExplorers:{default:{name:"NexiScan",url:"https://www.nexiscan.com",apiUrl:"https://www.nexiscan.com/api"}},contracts:{multicall3:{address:"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E",blockCreated:25770160}}}),ss=e({id:240,name:"Nexilix Smart Chain",nativeCurrency:{decimals:18,name:"Nexilix",symbol:"NEXILIX"},rpcUrls:{default:{http:["https://rpcurl.pos.nexilix.com"]}},blockExplorers:{default:{name:"NexilixScan",url:"https://scan.nexilix.com"}},contracts:{multicall3:{address:"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244",blockCreated:74448}}}),ns=e({id:248,name:"Oasys",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.oasys.games"]}},blockExplorers:{default:{name:"OasysScan",url:"https://scan.oasys.games",apiUrl:"https://scan.oasys.games/api"}}}),ls=e({id:4090,network:"oasis-testnet",name:"Oasis Testnet",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.oasis.bahamutchain.com"]},public:{http:["https://rpc1.oasis.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://oasis.ftnscan.com",apiUrl:"https://oasis.ftnscan.com/api"}},testnet:!0}),os=e({id:66,name:"OKC",nativeCurrency:{decimals:18,name:"OKT",symbol:"OKT"},rpcUrls:{default:{http:["https://exchainrpc.okex.org"]}},blockExplorers:{default:{name:"oklink",url:"https://www.oklink.com/okc"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10364792}}}),D=1,cs=e({...l,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...l.contracts,l2OutputOracle:{[D]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[D]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[D]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:D}),I=5,is=e({...l,id:420,name:"Optimism Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://goerli.optimism.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io",apiUrl:"https://goerli-optimism.etherscan.io/api"}},contracts:{...l.contracts,l2OutputOracle:{[I]:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{[I]:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{[I]:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:I}),C=11155111,ps=e({...l,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...l.contracts,disputeGameFactory:{[C]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[C]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[C]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[C]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:C}),ds=e({id:204,name:"opBNB",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://opbnb-mainnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opbnbscan",url:"https://mainnet.opbnbscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881}}}),ms=e({id:5611,name:"opBNB Testnet",nativeCurrency:{decimals:18,name:"tBNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://opbnb-testnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opbnbscan",url:"https://testnet.opbnbscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108}},testnet:!0}),us=e({id:9700,name:"OORT MainnetDev",nativeCurrency:{decimals:18,name:"OORT",symbol:"OORT"},rpcUrls:{default:{http:["https://dev-rpc.oortech.com"]}},blockExplorers:{oort:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"},default:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"}}}),bs=e({id:41144114,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),hs=e({id:11297108109,name:"Palm",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}}}),ks=e({id:11297108099,name:"Palm Testnet",nativeCurrency:{decimals:18,name:"PALM",symbol:"PALM"},rpcUrls:{default:{http:["https://palm-mainnet.public.blastapi.io"],webSocket:["wss://palm-mainnet.public.blastapi.io"]}},blockExplorers:{default:{name:"Chainlens",url:"https://palm.chainlens.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15429248}},testnet:!0}),xs=e({...x,id:1612127,name:"PlayFi Albireo Testnet",network:"albireo",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://albireo-rpc.playfi.ai"],webSocket:["wss://albireo-rpc-ws.playfi.ai/ws"]}},blockExplorers:{default:{name:"PlayFi Albireo Explorer",url:"https://albireo-explorer.playfi.ai"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),_=1,fs=e({id:424,network:"pgn",name:"PGN",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Explorer",url:"https://explorer.publicgoods.network",apiUrl:"https://explorer.publicgoods.network/api"},blocksout:{name:"PGN Explorer",url:"https://explorer.publicgoods.network",apiUrl:"https://explorer.publicgoods.network/api"}},contracts:{l2OutputOracle:{[_]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{[_]:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{[_]:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:Z,sourceId:_}),H=11155111,ys=e({id:58008,network:"pgn-testnet",name:"PGN ",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.publicgoods.network"]}},blockExplorers:{default:{name:"PGN Testnet Explorer",url:"https://explorer.sepolia.publicgoods.network",apiUrl:"https://explorer.sepolia.publicgoods.network/api"},blocksout:{name:"PGN Testnet Explorer",url:"https://explorer.sepolia.publicgoods.network",apiUrl:"https://explorer.sepolia.publicgoods.network/api"}},contracts:{l2OutputOracle:{[H]:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{[H]:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{[H]:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:Z,sourceId:H,testnet:!0}),Es=e({id:13381,name:"Phoenix Blockchain",nativeCurrency:{name:"Phoenix",symbol:"PHX",decimals:18},rpcUrls:{default:{http:["https://rpc.phoenixplorer.com"]}},blockExplorers:{default:{name:"Phoenixplorer",url:"https://phoenixplorer.com",apiUrl:"https://phoenixplorer.com/api"}},contracts:{multicall3:{address:"0x498cF757a575cFF2c2Ed9f532f56Efa797f86442",blockCreated:5620192}}}),Cs=e({id:242,name:"Plinga",nativeCurrency:{name:"Plinga",symbol:"PLINGA",decimals:18},rpcUrls:{default:{http:["https://rpcurl.mainnet.plgchain.com"]}},blockExplorers:{default:{name:"Plgscan",url:"https://www.plgscan.com"}},contracts:{multicall3:{address:"0x0989576160f2e7092908BB9479631b901060b6e4",blockCreated:204489}}}),Qe=11155111,ws=e({id:161221135,name:"Plume Testnet",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plumenetwork.xyz/http"],webSocket:["wss://testnet-rpc.plumenetwork.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plumenetwork.xyz",apiUrl:"https://testnet-explorer.plumenetwork.xyz/api"}},testnet:!0,sourceId:Qe}),vs=e({id:137,name:"Polygon",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),Ts=e({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com/",apiUrl:"https://api-amoy.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),Us=e({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/polygon_mumbai"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),gs=e({id:1101,name:"Polygon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com",apiUrl:"https://api-zkevm.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),Ss=e({id:2442,name:"Polygon zkEVM Cardona",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.cardona.zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://cardona-zkevm.polygonscan.com",apiUrl:"https://cardona-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:114091}}}),As=e({id:1442,name:"Polygon zkEVM Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.public.zkevm-test.net"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://testnet-zkevm.polygonscan.com",apiUrl:"https://testnet-zkevm.polygonscan.com/api"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:525686}}}),Bs=e({id:369,name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.pulsechain.com",apiUrl:"https://api.scan.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Fs=e({id:943,name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},rpcUrls:{default:{http:["https://rpc.v4.testnet.pulsechain.com"],webSocket:["wss://ws.v4.testnet.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://scan.v4.testnet.pulsechain.com",apiUrl:"https://scan.v4.testnet.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Ms=e({id:35441,name:"Q Mainnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.q.org"]}},blockExplorers:{default:{name:"Q Mainnet Explorer",url:"https://explorer.q.org",apiUrl:"https://explorer.q.org/api"}}}),zs=e({id:35443,name:"Q Testnet",nativeCurrency:{decimals:18,name:"Q",symbol:"Q"},rpcUrls:{default:{http:["https://rpc.qtestnet.org"]}},blockExplorers:{default:{name:"Q Testnet Explorer",url:"https://explorer.qtestnet.org",apiUrl:"https://explorer.qtestnet.org/api"}},testnet:!0}),Ds=e({id:1729,name:"Reya Network",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.reya.network"],webSocket:["wss://ws.reya.network"]}},blockExplorers:{default:{name:"Reya Network Explorer",url:"https://explorer.reya.network"}},testnet:!1}),Is=e({id:570,name:"Rollux Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.rollux.com"],webSocket:["wss://rpc.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxExplorer",url:"https://explorer.rollux.com",apiUrl:"https://explorer.rollux.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:119222}}}),_s=e({id:57e3,name:"Rollux Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc-tanenbaum.rollux.com/"],webSocket:["wss://rpc-tanenbaum.rollux.com/wss"]}},blockExplorers:{default:{name:"RolluxTestnetExplorer",url:"https://rollux.tanenbaum.io",apiUrl:"https://rollux.tanenbaum.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1813675}}}),Hs=e({id:2020,name:"Ronin",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://api.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Ronin Explorer",url:"https://app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:26023535}}}),Ps=e({id:30,name:"Rootstock Mainnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"RBTC"},rpcUrls:{default:{http:["https://public-node.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.rsk.co"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4249540}}}),Os=e({id:31,name:"Rootstock Testnet",network:"rootstock",nativeCurrency:{decimals:18,name:"Rootstock Bitcoin",symbol:"tRBTC"},rpcUrls:{default:{http:["https://public-node.testnet.rsk.co"]}},blockExplorers:{default:{name:"RSK Explorer",url:"https://explorer.testnet.rootstock.io"}}}),P=1,Ls=e({...l,id:12553,name:"RSS3 VSL Mainnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Mainnet Scan",url:"https://scan.rss3.io",apiUrl:"https://scan.rss3.io/api"}},contracts:{...l.contracts,l2OutputOracle:{[P]:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{[P]:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:19387057}},l1StandardBridge:{[P]:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:P}),O=11155111,Ns=e({...l,id:2331,name:"RSS3 VSL Sepolia Testnet",nativeCurrency:{name:"RSS3",symbol:"RSS3",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.rss3.io"]}},blockExplorers:{default:{name:"RSS3 VSL Sepolia Testnet Scan",url:"https://scan.testnet.rss3.io",apiUrl:"https://scan.testnet.rss3.io/api"}},contracts:{...l.contracts,l2OutputOracle:{[O]:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{[O]:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{[O]:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:O}),Rs=e({id:2021,name:"Saigon Testnet",nativeCurrency:{name:"RON",symbol:"RON",decimals:18},rpcUrls:{default:{http:["https://saigon-testnet.roninchain.com/rpc"]}},blockExplorers:{default:{name:"Saigon Explorer",url:"https://saigon-app.roninchain.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:18736871}},testnet:!0}),Ks=e({id:23294,name:"Oasis Sapphire",network:"sapphire",nativeCurrency:{name:"Sapphire Rose",symbol:"ROSE",decimals:18},rpcUrls:{default:{http:["https://sapphire.oasis.io"],webSocket:["wss://sapphire.oasis.io/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/mainnet/sapphire"},blockscout:{name:"Oasis Sapphire Explorer",url:"https://old-explorer.sapphire.oasis.io",apiUrl:"https://old-explorer.sapphire.oasis.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}}),Gs=e({id:23295,name:"Oasis Sapphire Testnet",network:"sapphire-testnet",nativeCurrency:{name:"Sapphire Test Rose",symbol:"TEST",decimals:18},rpcUrls:{default:{http:["https://testnet.sapphire.oasis.dev"],webSocket:["wss://testnet.sapphire.oasis.dev/ws"]}},blockExplorers:{default:{name:"Oasis Explorer",url:"https://explorer.oasis.io/testnet/sapphire"},blockscout:{name:"Oasis Sapphire Testnet Explorer",url:"https://testnet.old-explorer.sapphire.oasis.dev",apiUrl:"https://testnet.old-explorer.sapphire.oasis.dev/api"}},testnet:!0}),Vs=e({id:534352,name:"Scroll",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com",apiUrl:"https://api.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),Xs=e({id:534351,name:"Scroll Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-blockscout.scroll.io",apiUrl:"https://sepolia-blockscout.scroll.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9473}},testnet:!0}),qs=e({id:534353,name:"Scroll Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc.scroll.io/l2"],webSocket:["wss://alpha-rpc.scroll.io/l2/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.scroll.io",apiUrl:"https://blockscout.scroll.io/api"}},testnet:!0}),js=e({id:713715,name:"Sei Devnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-arctic-1.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},testnet:!0}),Zs=e({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.sepolia.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),$s=e({id:148,name:"Shimmer",network:"shimmer",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.shimmer.network",apiUrl:"https://explorer.evm.shimmer.network/api"}}}),Ws=e({id:1073,name:"Shimmer Testnet",network:"shimmer-testnet",nativeCurrency:{decimals:18,name:"Shimmer",symbol:"SMR"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.shimmer.network"]}},blockExplorers:{default:{name:"Shimmer Network Explorer",url:"https://explorer.evm.testnet.shimmer.network",apiUrl:"https://explorer.evm.testnet.shimmer.network/api"}},testnet:!0}),Qs=e({id:391845894,name:"SKALE | Block Brawlers",nativeCurrency:{name:"BRAWL",symbol:"BRAWL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/frayed-decent-antares"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/frayed-decent-antares"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://frayed-decent-antares.explorer.mainnet.skalenodes.com"}},contracts:{}}),Ys=e({id:1564830818,name:"SKALE | Calypso NFT Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/honorable-steel-rasalhague"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3107626}}}),Js=e({id:974399131,name:"SKALE Calypso Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/giant-half-dual-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/giant-half-dual-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:103220}},testnet:!0}),en=e({id:1026062157,name:"SKALE | CryptoBlades",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/affectionate-immediate-pollux"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com"}},contracts:{}}),tn=e({id:1032942172,name:"SKALE | Crypto Colosseum",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/haunting-devoted-deneb"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/haunting-devoted-deneb"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com"}},contracts:{}}),an=e({id:2046399126,name:"SKALE | Europa Liquidity Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/elated-tan-skat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/elated-tan-skat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3113495}}}),rn=e({id:1444673419,name:"SKALE Europa Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/juicy-low-small-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/juicy-low-small-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:110858}},testnet:!0}),sn=e({id:2139927552,name:"SKALE | Exorde",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/light-vast-diphda"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/light-vast-diphda"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://light-vast-diphda.explorer.mainnet.skalenodes.com"}},contracts:{}}),nn=e({id:1273227453,name:"SKALE | Human Protocol",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/wan-red-ain"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/wan-red-ain"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://wan-red-ain.explorer.mainnet.skalenodes.com"}},contracts:{}}),ln=e({id:1482601649,name:"SKALE | Nebula Gaming Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/green-giddy-denebola"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/green-giddy-denebola"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2372986}}}),on=e({id:37084624,name:"SKALE Nebula Testnet",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/lanky-ill-funny-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:105141}},testnet:!0}),cn=e({id:278611351,name:"SKALE | Razor Network",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/turbulent-unique-scheat"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/turbulent-unique-scheat"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com"}},contracts:{}}),pn=e({id:1350216234,name:"SKALE | Titan Community Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://mainnet.skalenodes.com/v1/parallel-stormy-spica"],webSocket:["wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2076458}}}),dn=e({id:1020352220,name:"SKALE Titan Hub",nativeCurrency:{name:"sFUEL",symbol:"sFUEL",decimals:18},rpcUrls:{default:{http:["https://testnet.skalenodes.com/v1/aware-fake-trim-testnet"],webSocket:["wss://testnet.skalenodes.com/v1/ws/aware-fake-trim-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:104072}},testnet:!0}),mn=e({id:19,name:"Songbird Mainnet",nativeCurrency:{decimals:18,name:"songbird",symbol:"SGB"},rpcUrls:{default:{http:["https://songbird-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Songbird Explorer",url:"https://songbird-explorer.flare.network",apiUrl:"https://songbird-explorer.flare.network/api"}}}),un=e({id:16,name:"Coston",nativeCurrency:{decimals:18,name:"costonflare",symbol:"CFLR"},rpcUrls:{default:{http:["https://coston-api.flare.network/ext/C/rpc"]}},blockExplorers:{default:{name:"Coston Explorer",url:"https://coston-explorer.flare.network",apiUrl:"https://coston-explorer.flare.network/api"}},testnet:!0}),bn=e({id:88882,name:"Chiliz Spicy Testnet",network:"chiliz-spicy-Testnet",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://spicy-rpc.chiliz.com","https://chiliz-spicy-rpc.publicnode.com"],webSocket:["wss://spicy-rpc-ws.chiliz.com","wss://chiliz-spicy-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"http://spicy-explorer.chiliz.com",apiUrl:"http://spicy-explorer.chiliz.com/api"}},testnet:!0}),hn=e({id:8082,name:"Shardeum Sphinx",nativeCurrency:{name:"SHARDEUM",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://sphinx.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer-sphinx.shardeum.org"}},testnet:!0}),kn=e({id:109,name:"Shibarium",network:"shibarium",nativeCurrency:{name:"Bone",symbol:"BONE",decimals:18},rpcUrls:{default:{http:["https://rpc.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://shibariumscan.io"}},contracts:{multicall3:{address:"0x864Bf681ADD6052395188A89101A1B37d3B4C961",blockCreated:265900}}}),xn=e({id:105105,name:"Stratis Mainnet",network:"stratis",nativeCurrency:{name:"Stratis",symbol:"STRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.stratisevm.com"]}},blockExplorers:{default:{name:"Stratis Explorer",url:"https://explorer.stratisevm.com"}}}),fn=e({id:57,name:"Syscoin Mainnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.syscoin.org"],webSocket:["wss://rpc.syscoin.org/wss"]}},blockExplorers:{default:{name:"SyscoinExplorer",url:"https://explorer.syscoin.org",apiUrl:"https://explorer.syscoin.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:287139}}}),yn=e({id:5700,name:"Syscoin Tanenbaum Testnet",nativeCurrency:{decimals:18,name:"Syscoin",symbol:"SYS"},rpcUrls:{default:{http:["https://rpc.tanenbaum.io"],webSocket:["wss://rpc.tanenbaum.io/wss"]}},blockExplorers:{default:{name:"SyscoinTestnetExplorer",url:"https://tanenbaum.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:271288}}}),En=e({id:841,name:"Taraxa Mainnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.mainnet.taraxa.io"}}}),Cn=e({id:167009,name:"Taiko Hekla L2",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hekla.taiko.xyz"]}},blockExplorers:{default:{name:"Taikoscan",url:"https://hekla.taikoscan.network"}}}),wn=e({id:167007,name:"Taiko Jolnir (Alpha-5 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.jolnir.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.jolnir.taiko.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:732706}},testnet:!0}),vn=e({id:167008,name:"Taiko Katla (Alpha-6 Testnet)",network:"tko-katla",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katla.taiko.xyz"]},public:{http:["https://rpc.katla.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.katla.taiko.xyz"}}}),Tn=e({id:167005,name:"Taiko (Alpha-3 Testnet)",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.test.taiko.xyz"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.test.taiko.xyz"}}}),Un=e({id:842,name:"Taraxa Testnet",nativeCurrency:{name:"Tara",symbol:"TARA",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.taraxa.io"]}},blockExplorers:{default:{name:"Taraxa Explorer",url:"https://explorer.testnet.taraxa.io"}},testnet:!0}),gn=e({id:2017,name:"Telcoin Adiri Testnet",nativeCurrency:{name:"Telcoin",symbol:"TEL",decimals:18},rpcUrls:{default:{http:["https://rpc.telcoin.network"]}},blockExplorers:{default:{name:"telscan",url:"https://telscan.io"}},testnet:!0}),Sn=e({id:40,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://mainnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:246530709}}}),An=e({id:41,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://testnet.telos.net/evm"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0}),Bn=e({id:1559,name:"Tenet",network:"tenet-mainnet",nativeCurrency:{name:"TENET",symbol:"TENET",decimals:18},rpcUrls:{default:{http:["https://rpc.tenet.org"]}},blockExplorers:{default:{name:"TenetScan Mainnet",url:"https://tenetscan.io",apiUrl:"https://tenetscan.io/api"}},testnet:!1}),Fn=e({id:7,name:"ThaiChain",nativeCurrency:{name:"TCH",symbol:"TCH",decimals:18},rpcUrls:{default:{http:["hhttps://rpc.thaichain.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://exp.thaichain.org",apiUrl:"https://exp.thaichain.org/api"}},contracts:{multicall3:{address:"0x0DaD6130e832c21719C5CE3bae93454E16A84826",blockCreated:4806386}},testnet:!1}),Mn=e({id:997,name:"5ireChain Thunder Testnet",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Explorer",url:"https://explorer.5ire.network"}},testnet:!0}),zn=e({id:100009,name:"Vechain",nativeCurrency:{name:"VeChain",symbol:"VET",decimals:18},rpcUrls:{default:{http:["https://mainnet.vechain.org"]}},blockExplorers:{default:{name:"Vechain Explorer",url:"https://explore.vechain.org"},vechainStats:{name:"Vechain Stats",url:"https://vechainstats.com"}}}),Dn=e({id:888,name:"Wanchain",nativeCurrency:{name:"WANCHAIN",symbol:"WAN",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:56891","https://gwan2-ssl.wandevs.org"]}},blockExplorers:{default:{name:"WanScan",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB",blockCreated:25312390}}}),In=e({id:999,name:"Wanchain Testnet",nativeCurrency:{name:"WANCHAIN",symbol:"WANt",decimals:18},rpcUrls:{default:{http:["https://gwan-ssl.wandevs.org:46891"]}},blockExplorers:{default:{name:"WanScanTest",url:"https://wanscan.org"}},contracts:{multicall3:{address:"0x11c89bF4496c39FB80535Ffb4c92715839CC5324",blockCreated:24743448}},testnet:!0}),_n=e({id:1111,name:"WEMIX",network:"wemix-mainnet",nativeCurrency:{name:"WEMIX",symbol:"WEMIX",decimals:18},rpcUrls:{default:{http:["https://api.wemix.com"]},public:{http:["https://api.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://explorer.wemix.com"}}}),Hn=e({id:1112,name:"WEMIX Testnet",network:"wemix-testnet",nativeCurrency:{name:"WEMIX",symbol:"tWEMIX",decimals:18},rpcUrls:{default:{http:["https://api.test.wemix.com"]},public:{http:["https://api.test.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://testnet.wemixscan.com",apiUrl:"https://testnet.wemixscan.com/api"}},testnet:!0}),Pn=e({id:195,name:"X1 Testnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://x1testrpc.okx.com"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/x1-test"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:624344}},testnet:!0}),On=e({id:196,name:"X Layer Mainnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://rpc.xlayer.tech"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer"}}}),Ln=e({id:50,name:"XinFin Network",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xinfin.network"]}},blockExplorers:{xinfin:{name:"XinFin",url:"https://explorer.xinfin.network"},default:{name:"Blocksscan",url:"https://xdc.blocksscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:71542788}}}),Nn=e({id:51,name:"Apothem Network",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]}},blockExplorers:{default:{name:"Blocksscan",url:"https://apothem.blocksscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59765389}}}),Rn=e({id:50005,name:"Yooldo Verse",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Explorer",url:"https://explorer.yooldo-verse.xyz"}}}),Kn=e({id:50006,name:"Yooldo Verse Testnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.yooldo-verse.xyz"]}},blockExplorers:{default:{name:"Yooldo Verse Testnet Explorer",url:"https://explorer.testnet.yooldo-verse.xyz"}},testnet:!0}),Gn=e({id:7e3,name:"ZetaChain",nativeCurrency:{decimals:18,name:"Zeta",symbol:"ZETA"},rpcUrls:{default:{http:["https://zetachain-evm.blockpi.network/v1/rpc/public"]}},blockExplorers:{default:{name:"ZetaScan",url:"https://explorer.zetachain.com"}},testnet:!1}),Vn=e({id:7001,name:"ZetaChain Athens Testnet",nativeCurrency:{decimals:18,name:"Zeta",symbol:"aZETA"},rpcUrls:{default:{http:["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"]}},blockExplorers:{default:{name:"ZetaScan",url:"https://athens.explorer.zetachain.com"}},testnet:!0}),Xn=e({id:1337803,name:"Zhejiang",nativeCurrency:{name:"Zhejiang Ether",symbol:"ZhejETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zhejiang.ethpandaops.io"]}},blockExplorers:{default:{name:"Beaconchain",url:"https://zhejiang.beaconcha.in"}},testnet:!0}),qn=e({id:32769,name:"Zilliqa",network:"zilliqa",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.zilliqa.com"}},testnet:!1}),jn=e({id:33101,name:"Zilliqa Testnet",network:"zilliqa-testnet",nativeCurrency:{name:"Zilliqa",symbol:"ZIL",decimals:18},rpcUrls:{default:{http:["https://dev-api.zilliqa.com"]}},blockExplorers:{default:{name:"Ethernal",url:"https://evmx.testnet.zilliqa.com"}},testnet:!0}),Zn=e({id:42766,name:"ZKFair Mainnet",network:"zkfair-mainnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://rpc.zkfair.io"]},public:{http:["https://rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://scan.zkfair.io",apiUrl:"https://scan.zkfair.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6090959}},testnet:!1}),$n=e({id:43851,name:"ZKFair Testnet",network:"zkfair-testnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://testnet-rpc.zkfair.io"]},public:{http:["https://testnet-rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://testnet-scan.zkfair.io"}},testnet:!0}),Wn=e({...x,id:324,name:"zkSync Era",network:"zksync-era",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.era.zksync.io"],webSocket:["wss://mainnet.era.zksync.io/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://era.zksync.network/",apiUrl:"https://api-era.zksync.network/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}}}),Qn=e({...x,id:260,name:"zkSync InMemory Node",network:"zksync-in-memory-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:8011"]}},testnet:!0}),Yn=e({...x,id:270,name:"zkSync CLI Local Node",network:"zksync-cli-local-node",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:3050"]}},testnet:!0}),Jn=e({...x,id:300,name:"zkSync Sepolia Testnet",network:"zksync-sepolia-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.era.zksync.dev"],webSocket:["wss://sepolia.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://sepolia.explorer.zksync.io/"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),el=e({...x,id:280,name:"zkSync Era Testnet",network:"zksync-era-testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.era.zksync.dev"],webSocket:["wss://testnet.era.zksync.dev/ws"]}},blockExplorers:{default:{name:"zkExplorer",url:"https://goerli.explorer.zksync.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"}},testnet:!0}),L=1,tl=e({...l,id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy",apiUrl:"https://explorer.zora.energy/api"}},contracts:{...l.contracts,l2OutputOracle:{[L]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[L]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[L]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:L}),N=11155111,al=e({...l,id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/",apiUrl:"https://sepolia.explorer.zora.energy/api"}},contracts:{...l.contracts,l2OutputOracle:{[N]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[N]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[N]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:N,testnet:!0}),Y=5,rl=e({...l,id:999,name:"Zora Goerli Testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy",apiUrl:"https://testnet.explorer.zora.energy/api"}},contracts:{...l.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[Y]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:Y,testnet:!0});export{et as acala,tt as ancient8,at as ancient8Sepolia,rt as anvil,st as apexTestnet,nt as arbitrum,lt as arbitrumGoerli,ot as arbitrumNova,dt as arbitrumSepolia,mt as areonNetwork,ut as areonNetworkTestnet,ct as astar,it as astarZkEVM,pt as astarZkyoto,bt as aurora,ht as auroraTestnet,kt as auroria,xt as avalanche,ft as avalancheFuji,yt as bahamut,Et as base,Ct as baseGoerli,wt as baseSepolia,vt as beam,Tt as beamTestnet,Ut as bearNetworkChainMainnet,gt as bearNetworkChainTestnet,St as berachainTestnet,At as bevmMainnet,Bt as bitTorrent,Ft as bitTorrentTestnet,Mt as blast,zt as blastSepolia,Dt as bob,It as boba,_t as bronos,Ht as bronosTestnet,Pt as bsc,Lt as bscGreenfield,Ot as bscTestnet,Nt as btr,Rt as btrTestnet,Kt as bxn,Gt as bxnTestnet,Vt as canto,Xt as celo,qt as celoAlfajores,jt as chiliz,Zt as classic,$t as confluxESpace,Wt as confluxESpaceTestnet,Qt as coreDao,Yt as cronos,Jt as cronosTestnet,ea as crossbell,ta as cyber,aa as cyberTestnet,ra as darwinia,sa as defichainEvm,na as defichainEvmTestnet,la as degen,oa as dfk,ca as dodochainTestnet,ia as dogechain,pa as dreyerxMainnet,da as edgeless,ma as edgelessTestnet,ua as edgeware,ba as edgewareTestnet,Ca as ekta,wa as ektaTestnet,ha as eon,ka as eos,xa as eosTestnet,fa as etherlinkTestnet,ya as evmos,Ea as evmosTestnet,va as fantom,Ta as fantomSonicTestnet,Ua as fantomTestnet,ga as fibo,Sa as filecoin,Aa as filecoinCalibration,Ba as filecoinHyperspace,Fa as flare,Ma as flareTestnet,Da as flowMainnet,za as flowPreviewnet,Ia as flowTestnet,_a as foundry,Ha as fraxtal,Pa as fraxtalTestnet,Oa as funkiSepolia,La as fuse,Na as fuseSparknet,Za as gnosis,$a as gnosisChiado,qa as gobi,ja as goerli,Ya as haqqMainnet,Ja as haqqTestedge2,Wa as hardhat,Qa as harmonyOne,er as hedera,ar as hederaPreviewnet,tr as hederaTestnet,rr as holesky,sr as immutableZkEvm,nr as immutableZkEvmTestnet,lr as inEVM,Ra as iotex,Ka as iotexTestnet,Ga as jbc,Va as jbcTestnet,or as kakarotSepolia,Xa as karura,cr as kava,ir as kavaTestnet,pr as kcc,dr as klaytn,mr as klaytnBaobab,ur as kroma,br as kromaSepolia,hr as l3x,kr as l3xTestnet,xr as lightlinkPegasus,fr as lightlinkPhoenix,yr as linea,Er as lineaGoerli,Cr as lineaSepolia,wr as lineaTestnet,vr as lisk,Tr as liskSepolia,Ur as localhost,gr as lukso,Sr as luksoTestnet,Ar as mainnet,Br as mandala,Fr as manta,Mr as mantaSepoliaTestnet,zr as mantaTestnet,Dr as mantle,Ir as mantleSepoliaTestnet,_r as mantleTestnet,Hr as merlin,Pr as metachain,Or as metachainIstanbul,Lr as metalL2,Nr as meter,Rr as meterTestnet,Kr as metis,Gr as metisGoerli,Vr as mev,Xr as mevTestnet,qr as mintSepoliaTestnet,jr as mode,Zr as modeTestnet,$r as moonbaseAlpha,Wr as moonbeam,Qr as moonbeamDev,Yr as moonriver,Jr as morphSepolia,es as nautilus,ts as neonDevnet,as as neonMainnet,rs as nexi,ss as nexilix,ls as oasisTestnet,ns as oasys,os as okc,us as oortMainnetDev,ds as opBNB,ms as opBNBTestnet,cs as optimism,is as optimismGoerli,ps as optimismSepolia,bs as otimDevnet,hs as palm,ks as palmTestnet,fs as pgn,ys as pgnTestnet,Es as phoenix,xs as playfiAlbireo,Cs as plinga,ws as plumeTestnet,vs as polygon,Ts as polygonAmoy,Us as polygonMumbai,gs as polygonZkEvm,Ss as polygonZkEvmCardona,As as polygonZkEvmTestnet,Bs as pulsechain,Fs as pulsechainV4,Ms as qMainnet,zs as qTestnet,Ds as reyaNetwork,Is as rollux,_s as rolluxTestnet,Hs as ronin,Ps as rootstock,Os as rootstockTestnet,Ls as rss3,Ns as rss3Sepolia,Rs as saigon,Ks as sapphire,Gs as sapphireTestnet,Vs as scroll,Xs as scrollSepolia,qs as scrollTestnet,js as seiDevnet,Zs as sepolia,hn as shardeumSphinx,kn as shibarium,$s as shimmer,Ws as shimmerTestnet,Qs as skaleBlockBrawlers,Ys as skaleCalypso,Js as skaleCalypsoTestnet,en as skaleCryptoBlades,tn as skaleCryptoColosseum,an as skaleEuropa,rn as skaleEuropaTestnet,sn as skaleExorde,nn as skaleHumanProtocol,ln as skaleNebula,on as skaleNebulaTestnet,cn as skaleRazor,pn as skaleTitan,dn as skaleTitanTestnet,mn as songbird,un as songbirdTestnet,bn as spicy,xn as stratis,fn as syscoin,yn as syscoinTestnet,Cn as taikoHekla,wn as taikoJolnir,vn as taikoKatla,Tn as taikoTestnetSepolia,En as taraxa,Un as taraxaTestnet,gn as telcoinTestnet,Sn as telos,An as telosTestnet,Bn as tenet,Fn as thaiChain,Mn as thunderTestnet,zn as vechain,Dn as wanchain,In as wanchainTestnet,_n as wemix,Hn as wemixTestnet,Pn as x1Testnet,On as xLayer,Pn as xLayerTestnet,Ln as xdc,Nn as xdcTestnet,Rn as yooldoVerse,Kn as yooldoVerseTestnet,Gn as zetachain,Vn as zetachainAthensTestnet,Xn as zhejiang,qn as zilliqa,jn as zilliqaTestnet,Zn as zkFair,$n as zkFairTestnet,Wn as zkSync,Qn as zkSyncInMemoryNode,Yn as zkSyncLocalNode,Jn as zkSyncSepoliaTestnet,el as zkSyncTestnet,tl as zora,al as zoraSepolia,rl as zoraTestnet}; diff --git a/assets/index-BY8dqRha.js b/assets/index-CEX9b7PI.js similarity index 94% rename from assets/index-BY8dqRha.js rename to assets/index-CEX9b7PI.js index 34052e8..cefb155 100644 --- a/assets/index-BY8dqRha.js +++ b/assets/index-CEX9b7PI.js @@ -1 +1 @@ -import{a_ as i,a$ as n,b0 as b,b2 as c,b1 as T,b3 as d,b4 as l,b9 as m,ba as f,aY as x,bd as p,be as E,aT as h,aZ as B,bf as g,bg as y,b5 as H,bh as u,bi as I,aR as S,b6 as v,bb as z,bj as k,bk as C,bl as O,aQ as R,bm as A,bn as L,b7 as U,bc as w,b8 as P,aS as q,bo as F}from"./index-DgzvH8Qi.js";import{F as j,a as G,I as K,b as N,c as D,d as J,T as M,q as Q,s as Y,u as Z,v as _,y as $,E as W,w as X,x as aa,B as sa,e as ea,C as ra,h as oa,j as ta,l as ia,f as na,D as ba,g as ca,i as Ta,k as da,n as la,o as ma,G as fa,H as xa,m as pa,r as Ea,K as ha,L as Ba,J as ga,M as ya,N as Ha,O as ua,z as Ia,A as Sa,p as va,t as za}from"./number-Bkt_BtbB.js";function r({chains:a,id:s}){return a.find(e=>e.id===s)}export{i as BaseError,j as FeeCapTooHighError,n as IntegerOutOfRangeError,G as InvalidAddressError,K as InvalidChainIdError,b as InvalidHexBooleanError,N as InvalidLegacyVError,D as InvalidSerializableTransactionError,J as InvalidStorageKeySizeError,c as SizeExceedsPaddingSizeError,T as SizeOverflowError,d as SliceOffsetOutOfBoundsError,M as TipAboveFeeCapError,Q as assertTransactionEIP1559,Y as assertTransactionEIP2930,Z as assertTransactionLegacy,_ as blobsToCommitments,$ as blobsToProofs,l as boolToBytes,m as boolToHex,f as bytesToHex,W as checksumAddress,X as commitmentToVersionedHash,aa as commitmentsToVersionedHashes,sa as concatHex,ea as defineBlock,ra as defineChain,oa as defineTransaction,ta as defineTransactionReceipt,ia as defineTransactionRequest,x as etherUnits,r as extractChain,na as formatBlock,p as formatEther,ba as formatGwei,ca as formatLog,Ta as formatTransaction,da as formatTransactionReceipt,la as formatTransactionRequest,E as formatUnits,h as fromHex,ma as getTransactionType,B as gweiUnits,g as hexToBigInt,y as hexToBool,H as hexToBytes,u as hexToNumber,I as hexToString,fa as isAddress,S as isHex,xa as keccak256,pa as maxUint16,v as numberToBytes,z as numberToHex,k as pad,C as padBytes,O as padHex,R as parseEther,A as parseUnits,Ea as rpcTransactionType,ha as serializeAccessList,Ba as serializeTransaction,ga as sha256,L as size,ya as slice,Ha as sliceBytes,ua as sliceHex,U as stringToBytes,w as stringToHex,Ia as toBlobSidecars,Sa as toBlobs,P as toBytes,q as toHex,va as toRlp,za as transactionType,F as trim}; +import{a_ as i,a$ as n,b0 as b,b2 as c,b1 as T,b3 as d,b4 as l,b9 as m,ba as f,aY as x,bd as p,be as E,aT as h,aZ as B,bf as g,bg as y,b5 as H,bh as u,bi as I,aR as S,b6 as v,bb as z,bj as k,bk as C,bl as O,aQ as R,bm as A,bn as L,b7 as U,bc as w,b8 as P,aS as q,bo as F}from"./index-VLNutAkM.js";import{F as j,a as G,I as K,b as N,c as D,d as J,T as M,q as Q,s as Y,u as Z,v as _,y as $,E as W,w as X,x as aa,B as sa,e as ea,C as ra,h as oa,j as ta,l as ia,f as na,D as ba,g as ca,i as Ta,k as da,n as la,o as ma,G as fa,H as xa,m as pa,r as Ea,K as ha,L as Ba,J as ga,M as ya,N as Ha,O as ua,z as Ia,A as Sa,p as va,t as za}from"./number-LIp8TDoP.js";function r({chains:a,id:s}){return a.find(e=>e.id===s)}export{i as BaseError,j as FeeCapTooHighError,n as IntegerOutOfRangeError,G as InvalidAddressError,K as InvalidChainIdError,b as InvalidHexBooleanError,N as InvalidLegacyVError,D as InvalidSerializableTransactionError,J as InvalidStorageKeySizeError,c as SizeExceedsPaddingSizeError,T as SizeOverflowError,d as SliceOffsetOutOfBoundsError,M as TipAboveFeeCapError,Q as assertTransactionEIP1559,Y as assertTransactionEIP2930,Z as assertTransactionLegacy,_ as blobsToCommitments,$ as blobsToProofs,l as boolToBytes,m as boolToHex,f as bytesToHex,W as checksumAddress,X as commitmentToVersionedHash,aa as commitmentsToVersionedHashes,sa as concatHex,ea as defineBlock,ra as defineChain,oa as defineTransaction,ta as defineTransactionReceipt,ia as defineTransactionRequest,x as etherUnits,r as extractChain,na as formatBlock,p as formatEther,ba as formatGwei,ca as formatLog,Ta as formatTransaction,da as formatTransactionReceipt,la as formatTransactionRequest,E as formatUnits,h as fromHex,ma as getTransactionType,B as gweiUnits,g as hexToBigInt,y as hexToBool,H as hexToBytes,u as hexToNumber,I as hexToString,fa as isAddress,S as isHex,xa as keccak256,pa as maxUint16,v as numberToBytes,z as numberToHex,k as pad,C as padBytes,O as padHex,R as parseEther,A as parseUnits,Ea as rpcTransactionType,ha as serializeAccessList,Ba as serializeTransaction,ga as sha256,L as size,ya as slice,Ha as sliceBytes,ua as sliceHex,U as stringToBytes,w as stringToHex,Ia as toBlobSidecars,Sa as toBlobs,P as toBytes,q as toHex,va as toRlp,za as transactionType,F as trim}; diff --git a/assets/index-pnCaYn__.js b/assets/index-CV4p6XM9.js similarity index 99% rename from assets/index-pnCaYn__.js rename to assets/index-CV4p6XM9.js index fd7166e..23ad1fb 100644 --- a/assets/index-pnCaYn__.js +++ b/assets/index-CV4p6XM9.js @@ -1,4 +1,4 @@ -import{bD as B,bE as U,bF as ne,bG as Se,bH as kn,bI as F,bJ as Fe,bK as zr,bL as Ae,bM as uo,bN as fo,bO as H,bP as tt,bQ as lo,bR as pe,bS as ho,bT as vt,bU as cr,bz as bo}from"./index-DgzvH8Qi.js";import{bV as Cu,bX as ju,bW as Ru,bY as Lu}from"./index-DgzvH8Qi.js";function po(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const ur=/^tuple(?(\[(\d*)\])*)$/;function an(e){let t=e.type;if(ur.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s{var s,o;return((s=e[t.name])==null?void 0:s.call(e,r))??((o=e[n])==null?void 0:o.call(e,r))??t(e,r)}}function ue(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new $o(e.type);return`${e.name}(${Rt(e.inputs,{includeName:t})})`}function Rt(e,{includeName:t=!1}={}){return e?e.map(n=>yo(n,{includeName:t})).join(t?", ":","):""}function yo(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Rt(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class mo extends B{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +import{bD as B,bE as U,bF as ne,bG as Se,bH as kn,bI as F,bJ as Fe,bK as zr,bL as Ae,bM as uo,bN as fo,bO as H,bP as tt,bQ as lo,bR as pe,bS as ho,bT as vt,bU as cr,bz as bo}from"./index-VLNutAkM.js";import{bV as Cu,bX as ju,bW as Ru,bY as Lu}from"./index-VLNutAkM.js";function po(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const ur=/^tuple(?(\[(\d*)\])*)$/;function an(e){let t=e.type;if(ur.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s{var s,o;return((s=e[t.name])==null?void 0:s.call(e,r))??((o=e[n])==null?void 0:o.call(e,r))??t(e,r)}}function ue(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new $o(e.type);return`${e.name}(${Rt(e.inputs,{includeName:t})})`}function Rt(e,{includeName:t=!1}={}){return e?e.map(n=>yo(n,{includeName:t})).join(t?", ":","):""}function yo(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Rt(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class mo extends B{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` `),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class fr extends B{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` `),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class Ur extends B{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(` `),{metaMessages:[`Params: (${Rt(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class Lt extends B{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class wo extends B{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(` diff --git a/assets/index-B_Er0c8S.js b/assets/index-CxSnFqrK.js similarity index 99% rename from assets/index-B_Er0c8S.js rename to assets/index-CxSnFqrK.js index 16440c1..ec4c2c1 100644 --- a/assets/index-B_Er0c8S.js +++ b/assets/index-CxSnFqrK.js @@ -1,4 +1,4 @@ -import{bC as ue,bB as Kn,bA as Lo}from"./index-DgzvH8Qi.js";import{e as os,r as as,i as Pe}from"./inherits_browser-DBMiyxZF.js";var cs={},At={},ir={};Object.defineProperty(ir,"__esModule",{value:!0});ir.walletLogo=void 0;const Bo=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg width='${t}' 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 `}};ir.walletLogo=Bo;var sr={},us={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(h,_,m){this.fn=h,this.context=_,this.once=m||!1}function c(h,_,m,g,b){if(typeof m!="function")throw new TypeError("The listener must be a function");var v=new o(m,g||h,b),I=r?r+_:_;return h._events[I]?h._events[I].fn?h._events[I]=[h._events[I],v]:h._events[I].push(v):(h._events[I]=v,h._eventsCount++),h}function u(h,_){--h._eventsCount===0?h._events=new n:delete h._events[_]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var _=[],m,g;if(this._eventsCount===0)return _;for(g in m=this._events)t.call(m,g)&&_.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(m)):_},a.prototype.listeners=function(_){var m=r?r+_:_,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var b=0,v=g.length,I=new Array(v);b=-32099&&b<=-32e3}function _(b){return b&&typeof b=="object"&&!Array.isArray(b)?Object.assign({},b):b}function m(b,v){return Object.prototype.hasOwnProperty.call(b,v)}function g(b,v){return typeof b=="object"&&b!==null&&v in b&&typeof b[v]=="string"}})(zn);Object.defineProperty(or,"__esModule",{value:!0});or.standardErrors=void 0;const fe=Je,ls=zn;or.standardErrors={rpc:{parse:e=>Se(fe.standardErrorCodes.rpc.parse,e),invalidRequest:e=>Se(fe.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>Se(fe.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>Se(fe.standardErrorCodes.rpc.methodNotFound,e),internal:e=>Se(fe.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Se(t,e)},invalidInput:e=>Se(fe.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>Se(fe.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Se(fe.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Se(fe.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Se(fe.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Se(fe.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>ht(fe.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>ht(fe.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>ht(fe.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>ht(fe.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>ht(fe.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>ht(fe.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new fs(t,r,n)}}};function Se(e,t){const[r,n]=hs(t);return new ds(e,r||(0,ls.getMessageFromCode)(e),n)}function ht(e,t){const[r,n]=hs(t);return new fs(e,r||(0,ls.getMessageFromCode)(e),n)}function hs(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}class ds extends Error{constructor(t,r,n){if(!Number.isInteger(t))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=t,n!==void 0&&(this.data=n)}}class fs extends ds{constructor(t,r,n){if(!Po(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}}function Po(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=void 0;var t=Je;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});var r=or;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}})})(qe);var ar={},Et={};Object.defineProperty(Et,"__esModule",{value:!0});Et.isErrorResponse=void 0;function No(e){return e.errorMessage!==void 0}Et.isErrorResponse=No;var ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.LIB_VERSION=void 0;ot.LIB_VERSION="4.0.3";Object.defineProperty(ar,"__esModule",{value:!0});ar.serializeError=void 0;const Do=Et,Oo=ot,Uo=Je,Fo=zn;function jo(e,t){const r=(0,Fo.serialize)(Wo(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",Oo.LIB_VERSION),n.searchParams.set("code",r.code.toString());const o=$o(r.data,t);return o&&n.searchParams.set("method",o),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}ar.serializeError=jo;function Wo(e){return typeof e=="string"?{message:e,code:Uo.standardErrorCodes.rpc.internal}:(0,Do.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function $o(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}var ge={};Object.defineProperty(ge,"__esModule",{value:!0});ge.RegExpString=ge.IntNumber=ge.BigIntString=ge.AddressString=ge.HexString=ge.OpaqueType=void 0;function Bt(){return e=>e}ge.OpaqueType=Bt;ge.HexString=Bt();ge.AddressString=Bt();ge.BigIntString=Bt();function Ho(e){return Math.floor(e)}ge.IntNumber=Ho;ge.RegExpString=Bt();var O={};Object.defineProperty(O,"__esModule",{value:!0});O.areAddressArraysEqual=O.getFavicon=O.range=O.isBigNumber=O.ensureParsedJSONObject=O.ensureBigInt=O.ensureRegExpString=O.ensureIntNumber=O.ensureBuffer=O.ensureAddressString=O.ensureEvenLengthHexString=O.ensureHexString=O.isHexString=O.prepend0x=O.strip0x=O.has0xPrefix=O.hexStringFromIntNumber=O.intNumberFromHexString=O.bigIntStringFromBigInt=O.hexStringFromBuffer=O.hexStringToUint8Array=O.uint8ArrayToHex=O.randomBytesHex=void 0;const at=qe,Ie=ge,ps=/^[0-9]*$/,_s=/^[a-f0-9]*$/;function qo(e){return gs(crypto.getRandomValues(new Uint8Array(e)))}O.randomBytesHex=qo;function gs(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}O.uint8ArrayToHex=gs;function Ko(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}O.hexStringToUint8Array=Ko;function zo(e,t=!1){const r=e.toString("hex");return(0,Ie.HexString)(t?`0x${r}`:r)}O.hexStringFromBuffer=zo;function Vo(e){return(0,Ie.BigIntString)(e.toString(10))}O.bigIntStringFromBigInt=Vo;function Go(e){return(0,Ie.IntNumber)(Number(BigInt(Pt(e,!0))))}O.intNumberFromHexString=Go;function Zo(e){return(0,Ie.HexString)(`0x${BigInt(e).toString(16)}`)}O.hexStringFromIntNumber=Zo;function Vn(e){return e.startsWith("0x")||e.startsWith("0X")}O.has0xPrefix=Vn;function cr(e){return Vn(e)?e.slice(2):e}O.strip0x=cr;function ys(e){return Vn(e)?`0x${e.slice(2)}`:`0x${e}`}O.prepend0x=ys;function Tt(e){if(typeof e!="string")return!1;const t=cr(e).toLowerCase();return _s.test(t)}O.isHexString=Tt;function bs(e,t=!1){if(typeof e=="string"){const r=cr(e).toLowerCase();if(_s.test(r))return(0,Ie.HexString)(t?`0x${r}`:r)}throw at.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}O.ensureHexString=bs;function Pt(e,t=!1){let r=bs(e,!1);return r.length%2===1&&(r=(0,Ie.HexString)(`0${r}`)),t?(0,Ie.HexString)(`0x${r}`):r}O.ensureEvenLengthHexString=Pt;function Yo(e){if(typeof e=="string"){const t=cr(e).toLowerCase();if(Tt(t)&&t.length===40)return(0,Ie.AddressString)(ys(t))}throw at.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}O.ensureAddressString=Yo;function Jo(e){if(Buffer.isBuffer(e))return e;if(typeof e=="string"){if(Tt(e)){const t=Pt(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw at.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}O.ensureBuffer=Jo;function ws(e){if(typeof e=="number"&&Number.isInteger(e))return(0,Ie.IntNumber)(e);if(typeof e=="string"){if(ps.test(e))return(0,Ie.IntNumber)(Number(e));if(Tt(e))return(0,Ie.IntNumber)(Number(BigInt(Pt(e,!0))))}throw at.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureIntNumber=ws;function Qo(e){if(e instanceof RegExp)return(0,Ie.RegExpString)(e.toString());throw at.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}O.ensureRegExpString=Qo;function Xo(e){if(e!==null&&(typeof e=="bigint"||ms(e)))return BigInt(e.toString(10));if(typeof e=="number")return BigInt(ws(e));if(typeof e=="string"){if(ps.test(e))return BigInt(e);if(Tt(e))return BigInt(Pt(e,!0))}throw at.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureBigInt=Xo;function ea(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw at.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}O.ensureParsedJSONObject=ea;function ms(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}O.isBigNumber=ms;function ta(e,t){return Array.from({length:t-e},(r,n)=>e+n)}O.range=ta;function ra(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}O.getFavicon=ra;function na(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}O.areAddressArraysEqual=na;var We={},ur={},lr={},oe={};Object.defineProperty(oe,"__esModule",{value:!0});oe.decryptContent=oe.encryptContent=oe.importKeyFromHexString=oe.exportKeyToHexString=oe.decrypt=oe.encrypt=oe.deriveSharedSecret=oe.generateKeyPair=void 0;const vs=O;async function ia(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}oe.generateKeyPair=ia;async function sa(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}oe.deriveSharedSecret=sa;async function Es(e,t){const r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,new TextEncoder().encode(t));return{iv:r,cipherText:n}}oe.encrypt=Es;async function Ss(e,{iv:t,cipherText:r}){const n=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,r);return new TextDecoder().decode(n)}oe.decrypt=Ss;function xs(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function oa(e,t){const r=xs(e),n=await crypto.subtle.exportKey(r,t);return(0,vs.uint8ArrayToHex)(new Uint8Array(n))}oe.exportKeyToHexString=oa;async function aa(e,t){const r=xs(e),n=(0,vs.hexStringToUint8Array)(t).buffer;return await crypto.subtle.importKey(r,n,{name:"ECDH",namedCurve:"P-256"},!0,e==="private"?["deriveKey"]:[])}oe.importKeyFromHexString=aa;async function ca(e,t){const r=JSON.stringify(e,(n,o)=>{if(!(o instanceof Error))return o;const c=o;return Object.assign(Object.assign({},c.code?{code:c.code}:{}),{message:c.message})});return Es(t,r)}oe.encryptContent=ca;async function ua(e,t){return JSON.parse(await Ss(t,e))}oe.decryptContent=ua;var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.ScopedLocalStorage=void 0;class tr{constructor(t,r){this.scope=t,this.module=r}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(t){return`-${this.scope}${this.module?`:${this.module}`:""}:${t}`}static clearAll(){new tr("CBWSDK").clear(),new tr("walletlink").clear()}}Ke.ScopedLocalStorage=tr;Object.defineProperty(lr,"__esModule",{value:!0});lr.SCWKeyManager=void 0;const qt=oe,la=Ke,yn={storageKey:"ownPrivateKey",keyType:"private"},bn={storageKey:"ownPublicKey",keyType:"public"},wn={storageKey:"peerPublicKey",keyType:"public"};class ha{constructor(){this.storage=new la.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(t){this.sharedSecret=null,this.peerPublicKey=t,await this.storeKey(wn,t),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(bn.storageKey),this.storage.removeItem(yn.storageKey),this.storage.removeItem(wn.storageKey)}async generateKeyPair(){const t=await(0,qt.generateKeyPair)();this.ownPrivateKey=t.privateKey,this.ownPublicKey=t.publicKey,await this.storeKey(yn,t.privateKey),await this.storeKey(bn,t.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(yn)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(bn)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(wn)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await(0,qt.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(t){const r=this.storage.getItem(t.storageKey);return r?(0,qt.importKeyFromHexString)(t.keyType,r):null}async storeKey(t,r){const n=await(0,qt.exportKeyToHexString)(t.keyType,r);this.storage.setItem(t.storageKey,n)}}lr.SCWKeyManager=ha;var hr={};Object.defineProperty(hr,"__esModule",{value:!0});hr.SCWStateManager=void 0;const da=Ke,oi="accounts",ai="activeChain",ci="availableChains",ui="walletCapabilities";class fa{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(t){var r,n;this.storage=new da.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=t.updateListener,this.availableChains=this.loadItemFromStorage(ci),this._walletCapabilities=this.loadItemFromStorage(ui);const o=this.loadItemFromStorage(oi),c=this.loadItemFromStorage(ai);o&&this.updateListener.onAccountsUpdate({accounts:o,source:"storage"}),c&&this.updateListener.onChainUpdate({chain:c,source:"storage"}),this._accounts=o||[],this._activeChain=c||{id:(n=(r=t.appChainIds)===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:1}}updateAccounts(t){this._accounts=t,this.storeItemToStorage(oi,t),this.updateListener.onAccountsUpdate({accounts:t,source:"wallet"})}switchChain(t){var r;const n=(r=this.availableChains)===null||r===void 0?void 0:r.find(o=>o.id===t);return n?(n===this._activeChain||(this._activeChain=n,this.storeItemToStorage(ai,n),this.updateListener.onChainUpdate({chain:n,source:"wallet"})),!0):!1}updateAvailableChains(t){if(!t||Object.keys(t).length===0)return;const r=Object.entries(t).map(([n,o])=>({id:Number(n),rpcUrl:o}));this.availableChains=r,this.storeItemToStorage(ci,r),this.switchChain(this._activeChain.id)}updateWalletCapabilities(t){this._walletCapabilities=t,this.storeItemToStorage(ui,t)}storeItemToStorage(t,r){this.storage.setItem(t,JSON.stringify(r))}loadItemFromStorage(t){const r=this.storage.getItem(t);return r?JSON.parse(r):void 0}clear(){this.storage.clear()}}hr.SCWStateManager=fa;Object.defineProperty(ur,"__esModule",{value:!0});ur.SCWSigner=void 0;const pa=lr,_a=hr,Kt=qe,li=O,zt=oe;class ga{constructor(t){this.metadata=t.metadata,this.communicator=t.communicator,this.keyManager=new pa.SCWKeyManager,this.stateManager=new _a.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:t.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){const t=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),r=await this.communicator.postRequestAndWaitForResponse(t);if("failure"in r.content)throw r.content.failure;const n=await(0,zt.importKeyFromHexString)("public",r.sender);await this.keyManager.setPeerPublicKey(n);const o=await this.decryptResponseMessage(r);this.updateInternalState({method:"eth_requestAccounts"},o);const c=o.result;if("error"in c)throw c.error;return this.stateManager.accounts}async request(t){const r=this.tryLocalHandling(t);if(r!==void 0){if(r instanceof Error)throw r;return r}await this.communicator.waitForPopupLoaded();const n=await this.sendEncryptedRequest(t),o=await this.decryptResponseMessage(n);this.updateInternalState(t,o);const c=o.result;if("error"in c)throw c.error;return c.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(t){var r;switch(t.method){case"wallet_switchEthereumChain":{const n=t.params;if(!n||!(!((r=n[0])===null||r===void 0)&&r.chainId))throw Kt.standardErrors.rpc.invalidParams();const o=(0,li.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(o)?null:void 0}case"wallet_getCapabilities":{const n=this.stateManager.walletCapabilities;if(!n)throw Kt.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return n}default:return}}async sendEncryptedRequest(t){const r=await this.keyManager.getSharedSecret();if(!r)throw Kt.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const n=await(0,zt.encryptContent)({action:t,chainId:this.stateManager.activeChain.id},r),o=await this.createRequestMessage({encrypted:n});return this.communicator.postRequestAndWaitForResponse(o)}async createRequestMessage(t){const r=await(0,zt.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:r,content:t,timestamp:new Date}}async decryptResponseMessage(t){const r=t.content;if("failure"in r)throw r.failure;const n=await this.keyManager.getSharedSecret();if(!n)throw Kt.standardErrors.provider.unauthorized("Invalid session");return(0,zt.decryptContent)(r.encrypted,n)}updateInternalState(t,r){var n,o;const c=(n=r.data)===null||n===void 0?void 0:n.chains;c&&this.stateManager.updateAvailableChains(c);const u=(o=r.data)===null||o===void 0?void 0:o.capabilities;u&&this.stateManager.updateWalletCapabilities(u);const a=r.result;if(!("error"in a))switch(t.method){case"eth_requestAccounts":{const h=a.value;this.stateManager.updateAccounts(h);break}case"wallet_switchEthereumChain":{if(a.value!==null)return;const h=t.params,_=(0,li.ensureIntNumber)(h[0].chainId);this.stateManager.switchChain(_);break}}}}ur.SCWSigner=ga;var dr={},Nn={exports:{}},Cs=os.EventEmitter,Nt={},fr={};fr.byteLength=wa;fr.toByteArray=va;fr.fromByteArray=xa;var je=[],xe=[],ya=typeof Uint8Array<"u"?Uint8Array:Array,mn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var dt=0,ba=mn.length;dt0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function wa(e){var t=Is(e),r=t[0],n=t[1];return(r+n)*3/4-n}function ma(e,t,r){return(t+r)*3/4-r}function va(e){var t,r=Is(e),n=r[0],o=r[1],c=new ya(ma(e,n,o)),u=0,a=o>0?n-4:n,h;for(h=0;h>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=xe[e.charCodeAt(h)]<<2|xe[e.charCodeAt(h+1)]>>4,c[u++]=t&255),o===1&&(t=xe[e.charCodeAt(h)]<<10|xe[e.charCodeAt(h+1)]<<4|xe[e.charCodeAt(h+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function Ea(e){return je[e>>18&63]+je[e>>12&63]+je[e>>6&63]+je[e&63]}function Sa(e,t,r){for(var n,o=[],c=t;ca?a:u+c));return n===1?(t=e[r-1],o.push(je[t>>2]+je[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(je[t>>10]+je[t>>4&63]+je[t<<2&63]+"=")),o.join("")}var Gn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Gn.read=function(e,t,r,n,o){var c,u,a=o*8-n-1,h=(1<>1,m=-7,g=r?o-1:0,b=r?-1:1,v=e[t+g];for(g+=b,c=v&(1<<-m)-1,v>>=-m,m+=a;m>0;c=c*256+e[t+g],g+=b,m-=8);for(u=c&(1<<-m)-1,c>>=-m,m+=n;m>0;u=u*256+e[t+g],g+=b,m-=8);if(c===0)c=1-_;else{if(c===h)return u?NaN:(v?-1:1)*(1/0);u=u+Math.pow(2,n),c=c-_}return(v?-1:1)*u*Math.pow(2,c-n)};Gn.write=function(e,t,r,n,o,c){var u,a,h,_=c*8-o-1,m=(1<<_)-1,g=m>>1,b=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:c-1,I=n?1:-1,T=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=m):(u=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+g>=1?t+=b/h:t+=b*Math.pow(2,1-g),t*h>=2&&(u++,h/=2),u+g>=m?(a=0,u=m):u+g>=1?(a=(t*h-1)*Math.pow(2,o),u=u+g):(a=t*Math.pow(2,g-1)*Math.pow(2,o),u=0));o>=8;e[r+v]=a&255,v+=I,a/=256,o-=8);for(u=u<0;e[r+v]=u&255,v+=I,u/=256,_-=8);e[r+v-I]|=T*128};/*! +import{bC as ue,bB as Kn,bA as Lo}from"./index-VLNutAkM.js";import{e as os,r as as,i as Pe}from"./inherits_browser-nIpjPFVU.js";var cs={},At={},ir={};Object.defineProperty(ir,"__esModule",{value:!0});ir.walletLogo=void 0;const Bo=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg width='${t}' 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 `}};ir.walletLogo=Bo;var sr={},us={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(h,_,m){this.fn=h,this.context=_,this.once=m||!1}function c(h,_,m,g,b){if(typeof m!="function")throw new TypeError("The listener must be a function");var v=new o(m,g||h,b),I=r?r+_:_;return h._events[I]?h._events[I].fn?h._events[I]=[h._events[I],v]:h._events[I].push(v):(h._events[I]=v,h._eventsCount++),h}function u(h,_){--h._eventsCount===0?h._events=new n:delete h._events[_]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var _=[],m,g;if(this._eventsCount===0)return _;for(g in m=this._events)t.call(m,g)&&_.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(m)):_},a.prototype.listeners=function(_){var m=r?r+_:_,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var b=0,v=g.length,I=new Array(v);b=-32099&&b<=-32e3}function _(b){return b&&typeof b=="object"&&!Array.isArray(b)?Object.assign({},b):b}function m(b,v){return Object.prototype.hasOwnProperty.call(b,v)}function g(b,v){return typeof b=="object"&&b!==null&&v in b&&typeof b[v]=="string"}})(zn);Object.defineProperty(or,"__esModule",{value:!0});or.standardErrors=void 0;const fe=Je,ls=zn;or.standardErrors={rpc:{parse:e=>Se(fe.standardErrorCodes.rpc.parse,e),invalidRequest:e=>Se(fe.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>Se(fe.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>Se(fe.standardErrorCodes.rpc.methodNotFound,e),internal:e=>Se(fe.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Se(t,e)},invalidInput:e=>Se(fe.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>Se(fe.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Se(fe.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Se(fe.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Se(fe.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Se(fe.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>ht(fe.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>ht(fe.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>ht(fe.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>ht(fe.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>ht(fe.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>ht(fe.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new fs(t,r,n)}}};function Se(e,t){const[r,n]=hs(t);return new ds(e,r||(0,ls.getMessageFromCode)(e),n)}function ht(e,t){const[r,n]=hs(t);return new fs(e,r||(0,ls.getMessageFromCode)(e),n)}function hs(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}class ds extends Error{constructor(t,r,n){if(!Number.isInteger(t))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=t,n!==void 0&&(this.data=n)}}class fs extends ds{constructor(t,r,n){if(!Po(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}}function Po(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=void 0;var t=Je;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});var r=or;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}})})(qe);var ar={},Et={};Object.defineProperty(Et,"__esModule",{value:!0});Et.isErrorResponse=void 0;function No(e){return e.errorMessage!==void 0}Et.isErrorResponse=No;var ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.LIB_VERSION=void 0;ot.LIB_VERSION="4.0.3";Object.defineProperty(ar,"__esModule",{value:!0});ar.serializeError=void 0;const Do=Et,Oo=ot,Uo=Je,Fo=zn;function jo(e,t){const r=(0,Fo.serialize)(Wo(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",Oo.LIB_VERSION),n.searchParams.set("code",r.code.toString());const o=$o(r.data,t);return o&&n.searchParams.set("method",o),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}ar.serializeError=jo;function Wo(e){return typeof e=="string"?{message:e,code:Uo.standardErrorCodes.rpc.internal}:(0,Do.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function $o(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}var ge={};Object.defineProperty(ge,"__esModule",{value:!0});ge.RegExpString=ge.IntNumber=ge.BigIntString=ge.AddressString=ge.HexString=ge.OpaqueType=void 0;function Bt(){return e=>e}ge.OpaqueType=Bt;ge.HexString=Bt();ge.AddressString=Bt();ge.BigIntString=Bt();function Ho(e){return Math.floor(e)}ge.IntNumber=Ho;ge.RegExpString=Bt();var O={};Object.defineProperty(O,"__esModule",{value:!0});O.areAddressArraysEqual=O.getFavicon=O.range=O.isBigNumber=O.ensureParsedJSONObject=O.ensureBigInt=O.ensureRegExpString=O.ensureIntNumber=O.ensureBuffer=O.ensureAddressString=O.ensureEvenLengthHexString=O.ensureHexString=O.isHexString=O.prepend0x=O.strip0x=O.has0xPrefix=O.hexStringFromIntNumber=O.intNumberFromHexString=O.bigIntStringFromBigInt=O.hexStringFromBuffer=O.hexStringToUint8Array=O.uint8ArrayToHex=O.randomBytesHex=void 0;const at=qe,Ie=ge,ps=/^[0-9]*$/,_s=/^[a-f0-9]*$/;function qo(e){return gs(crypto.getRandomValues(new Uint8Array(e)))}O.randomBytesHex=qo;function gs(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}O.uint8ArrayToHex=gs;function Ko(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}O.hexStringToUint8Array=Ko;function zo(e,t=!1){const r=e.toString("hex");return(0,Ie.HexString)(t?`0x${r}`:r)}O.hexStringFromBuffer=zo;function Vo(e){return(0,Ie.BigIntString)(e.toString(10))}O.bigIntStringFromBigInt=Vo;function Go(e){return(0,Ie.IntNumber)(Number(BigInt(Pt(e,!0))))}O.intNumberFromHexString=Go;function Zo(e){return(0,Ie.HexString)(`0x${BigInt(e).toString(16)}`)}O.hexStringFromIntNumber=Zo;function Vn(e){return e.startsWith("0x")||e.startsWith("0X")}O.has0xPrefix=Vn;function cr(e){return Vn(e)?e.slice(2):e}O.strip0x=cr;function ys(e){return Vn(e)?`0x${e.slice(2)}`:`0x${e}`}O.prepend0x=ys;function Tt(e){if(typeof e!="string")return!1;const t=cr(e).toLowerCase();return _s.test(t)}O.isHexString=Tt;function bs(e,t=!1){if(typeof e=="string"){const r=cr(e).toLowerCase();if(_s.test(r))return(0,Ie.HexString)(t?`0x${r}`:r)}throw at.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}O.ensureHexString=bs;function Pt(e,t=!1){let r=bs(e,!1);return r.length%2===1&&(r=(0,Ie.HexString)(`0${r}`)),t?(0,Ie.HexString)(`0x${r}`):r}O.ensureEvenLengthHexString=Pt;function Yo(e){if(typeof e=="string"){const t=cr(e).toLowerCase();if(Tt(t)&&t.length===40)return(0,Ie.AddressString)(ys(t))}throw at.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}O.ensureAddressString=Yo;function Jo(e){if(Buffer.isBuffer(e))return e;if(typeof e=="string"){if(Tt(e)){const t=Pt(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw at.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}O.ensureBuffer=Jo;function ws(e){if(typeof e=="number"&&Number.isInteger(e))return(0,Ie.IntNumber)(e);if(typeof e=="string"){if(ps.test(e))return(0,Ie.IntNumber)(Number(e));if(Tt(e))return(0,Ie.IntNumber)(Number(BigInt(Pt(e,!0))))}throw at.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureIntNumber=ws;function Qo(e){if(e instanceof RegExp)return(0,Ie.RegExpString)(e.toString());throw at.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}O.ensureRegExpString=Qo;function Xo(e){if(e!==null&&(typeof e=="bigint"||ms(e)))return BigInt(e.toString(10));if(typeof e=="number")return BigInt(ws(e));if(typeof e=="string"){if(ps.test(e))return BigInt(e);if(Tt(e))return BigInt(Pt(e,!0))}throw at.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureBigInt=Xo;function ea(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw at.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}O.ensureParsedJSONObject=ea;function ms(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}O.isBigNumber=ms;function ta(e,t){return Array.from({length:t-e},(r,n)=>e+n)}O.range=ta;function ra(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}O.getFavicon=ra;function na(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}O.areAddressArraysEqual=na;var We={},ur={},lr={},oe={};Object.defineProperty(oe,"__esModule",{value:!0});oe.decryptContent=oe.encryptContent=oe.importKeyFromHexString=oe.exportKeyToHexString=oe.decrypt=oe.encrypt=oe.deriveSharedSecret=oe.generateKeyPair=void 0;const vs=O;async function ia(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}oe.generateKeyPair=ia;async function sa(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}oe.deriveSharedSecret=sa;async function Es(e,t){const r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,new TextEncoder().encode(t));return{iv:r,cipherText:n}}oe.encrypt=Es;async function Ss(e,{iv:t,cipherText:r}){const n=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,r);return new TextDecoder().decode(n)}oe.decrypt=Ss;function xs(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function oa(e,t){const r=xs(e),n=await crypto.subtle.exportKey(r,t);return(0,vs.uint8ArrayToHex)(new Uint8Array(n))}oe.exportKeyToHexString=oa;async function aa(e,t){const r=xs(e),n=(0,vs.hexStringToUint8Array)(t).buffer;return await crypto.subtle.importKey(r,n,{name:"ECDH",namedCurve:"P-256"},!0,e==="private"?["deriveKey"]:[])}oe.importKeyFromHexString=aa;async function ca(e,t){const r=JSON.stringify(e,(n,o)=>{if(!(o instanceof Error))return o;const c=o;return Object.assign(Object.assign({},c.code?{code:c.code}:{}),{message:c.message})});return Es(t,r)}oe.encryptContent=ca;async function ua(e,t){return JSON.parse(await Ss(t,e))}oe.decryptContent=ua;var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.ScopedLocalStorage=void 0;class tr{constructor(t,r){this.scope=t,this.module=r}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(t){return`-${this.scope}${this.module?`:${this.module}`:""}:${t}`}static clearAll(){new tr("CBWSDK").clear(),new tr("walletlink").clear()}}Ke.ScopedLocalStorage=tr;Object.defineProperty(lr,"__esModule",{value:!0});lr.SCWKeyManager=void 0;const qt=oe,la=Ke,yn={storageKey:"ownPrivateKey",keyType:"private"},bn={storageKey:"ownPublicKey",keyType:"public"},wn={storageKey:"peerPublicKey",keyType:"public"};class ha{constructor(){this.storage=new la.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(t){this.sharedSecret=null,this.peerPublicKey=t,await this.storeKey(wn,t),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(bn.storageKey),this.storage.removeItem(yn.storageKey),this.storage.removeItem(wn.storageKey)}async generateKeyPair(){const t=await(0,qt.generateKeyPair)();this.ownPrivateKey=t.privateKey,this.ownPublicKey=t.publicKey,await this.storeKey(yn,t.privateKey),await this.storeKey(bn,t.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(yn)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(bn)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(wn)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await(0,qt.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(t){const r=this.storage.getItem(t.storageKey);return r?(0,qt.importKeyFromHexString)(t.keyType,r):null}async storeKey(t,r){const n=await(0,qt.exportKeyToHexString)(t.keyType,r);this.storage.setItem(t.storageKey,n)}}lr.SCWKeyManager=ha;var hr={};Object.defineProperty(hr,"__esModule",{value:!0});hr.SCWStateManager=void 0;const da=Ke,oi="accounts",ai="activeChain",ci="availableChains",ui="walletCapabilities";class fa{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(t){var r,n;this.storage=new da.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=t.updateListener,this.availableChains=this.loadItemFromStorage(ci),this._walletCapabilities=this.loadItemFromStorage(ui);const o=this.loadItemFromStorage(oi),c=this.loadItemFromStorage(ai);o&&this.updateListener.onAccountsUpdate({accounts:o,source:"storage"}),c&&this.updateListener.onChainUpdate({chain:c,source:"storage"}),this._accounts=o||[],this._activeChain=c||{id:(n=(r=t.appChainIds)===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:1}}updateAccounts(t){this._accounts=t,this.storeItemToStorage(oi,t),this.updateListener.onAccountsUpdate({accounts:t,source:"wallet"})}switchChain(t){var r;const n=(r=this.availableChains)===null||r===void 0?void 0:r.find(o=>o.id===t);return n?(n===this._activeChain||(this._activeChain=n,this.storeItemToStorage(ai,n),this.updateListener.onChainUpdate({chain:n,source:"wallet"})),!0):!1}updateAvailableChains(t){if(!t||Object.keys(t).length===0)return;const r=Object.entries(t).map(([n,o])=>({id:Number(n),rpcUrl:o}));this.availableChains=r,this.storeItemToStorage(ci,r),this.switchChain(this._activeChain.id)}updateWalletCapabilities(t){this._walletCapabilities=t,this.storeItemToStorage(ui,t)}storeItemToStorage(t,r){this.storage.setItem(t,JSON.stringify(r))}loadItemFromStorage(t){const r=this.storage.getItem(t);return r?JSON.parse(r):void 0}clear(){this.storage.clear()}}hr.SCWStateManager=fa;Object.defineProperty(ur,"__esModule",{value:!0});ur.SCWSigner=void 0;const pa=lr,_a=hr,Kt=qe,li=O,zt=oe;class ga{constructor(t){this.metadata=t.metadata,this.communicator=t.communicator,this.keyManager=new pa.SCWKeyManager,this.stateManager=new _a.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:t.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){const t=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),r=await this.communicator.postRequestAndWaitForResponse(t);if("failure"in r.content)throw r.content.failure;const n=await(0,zt.importKeyFromHexString)("public",r.sender);await this.keyManager.setPeerPublicKey(n);const o=await this.decryptResponseMessage(r);this.updateInternalState({method:"eth_requestAccounts"},o);const c=o.result;if("error"in c)throw c.error;return this.stateManager.accounts}async request(t){const r=this.tryLocalHandling(t);if(r!==void 0){if(r instanceof Error)throw r;return r}await this.communicator.waitForPopupLoaded();const n=await this.sendEncryptedRequest(t),o=await this.decryptResponseMessage(n);this.updateInternalState(t,o);const c=o.result;if("error"in c)throw c.error;return c.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(t){var r;switch(t.method){case"wallet_switchEthereumChain":{const n=t.params;if(!n||!(!((r=n[0])===null||r===void 0)&&r.chainId))throw Kt.standardErrors.rpc.invalidParams();const o=(0,li.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(o)?null:void 0}case"wallet_getCapabilities":{const n=this.stateManager.walletCapabilities;if(!n)throw Kt.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return n}default:return}}async sendEncryptedRequest(t){const r=await this.keyManager.getSharedSecret();if(!r)throw Kt.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const n=await(0,zt.encryptContent)({action:t,chainId:this.stateManager.activeChain.id},r),o=await this.createRequestMessage({encrypted:n});return this.communicator.postRequestAndWaitForResponse(o)}async createRequestMessage(t){const r=await(0,zt.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:r,content:t,timestamp:new Date}}async decryptResponseMessage(t){const r=t.content;if("failure"in r)throw r.failure;const n=await this.keyManager.getSharedSecret();if(!n)throw Kt.standardErrors.provider.unauthorized("Invalid session");return(0,zt.decryptContent)(r.encrypted,n)}updateInternalState(t,r){var n,o;const c=(n=r.data)===null||n===void 0?void 0:n.chains;c&&this.stateManager.updateAvailableChains(c);const u=(o=r.data)===null||o===void 0?void 0:o.capabilities;u&&this.stateManager.updateWalletCapabilities(u);const a=r.result;if(!("error"in a))switch(t.method){case"eth_requestAccounts":{const h=a.value;this.stateManager.updateAccounts(h);break}case"wallet_switchEthereumChain":{if(a.value!==null)return;const h=t.params,_=(0,li.ensureIntNumber)(h[0].chainId);this.stateManager.switchChain(_);break}}}}ur.SCWSigner=ga;var dr={},Nn={exports:{}},Cs=os.EventEmitter,Nt={},fr={};fr.byteLength=wa;fr.toByteArray=va;fr.fromByteArray=xa;var je=[],xe=[],ya=typeof Uint8Array<"u"?Uint8Array:Array,mn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var dt=0,ba=mn.length;dt0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function wa(e){var t=Is(e),r=t[0],n=t[1];return(r+n)*3/4-n}function ma(e,t,r){return(t+r)*3/4-r}function va(e){var t,r=Is(e),n=r[0],o=r[1],c=new ya(ma(e,n,o)),u=0,a=o>0?n-4:n,h;for(h=0;h>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=xe[e.charCodeAt(h)]<<2|xe[e.charCodeAt(h+1)]>>4,c[u++]=t&255),o===1&&(t=xe[e.charCodeAt(h)]<<10|xe[e.charCodeAt(h+1)]<<4|xe[e.charCodeAt(h+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function Ea(e){return je[e>>18&63]+je[e>>12&63]+je[e>>6&63]+je[e&63]}function Sa(e,t,r){for(var n,o=[],c=t;ca?a:u+c));return n===1?(t=e[r-1],o.push(je[t>>2]+je[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(je[t>>10]+je[t>>4&63]+je[t<<2&63]+"=")),o.join("")}var Gn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Gn.read=function(e,t,r,n,o){var c,u,a=o*8-n-1,h=(1<>1,m=-7,g=r?o-1:0,b=r?-1:1,v=e[t+g];for(g+=b,c=v&(1<<-m)-1,v>>=-m,m+=a;m>0;c=c*256+e[t+g],g+=b,m-=8);for(u=c&(1<<-m)-1,c>>=-m,m+=n;m>0;u=u*256+e[t+g],g+=b,m-=8);if(c===0)c=1-_;else{if(c===h)return u?NaN:(v?-1:1)*(1/0);u=u+Math.pow(2,n),c=c-_}return(v?-1:1)*u*Math.pow(2,c-n)};Gn.write=function(e,t,r,n,o,c){var u,a,h,_=c*8-o-1,m=(1<<_)-1,g=m>>1,b=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:c-1,I=n?1:-1,T=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=m):(u=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+g>=1?t+=b/h:t+=b*Math.pow(2,1-g),t*h>=2&&(u++,h/=2),u+g>=m?(a=0,u=m):u+g>=1?(a=(t*h-1)*Math.pow(2,o),u=u+g):(a=t*Math.pow(2,g-1)*Math.pow(2,o),u=0));o>=8;e[r+v]=a&255,v+=I,a/=256,o-=8);for(u=u<0;e[r+v]=u&255,v+=I,u/=256,_-=8);e[r+v-I]|=T*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh diff --git a/assets/index-OBL8cfjx.js b/assets/index-DAnovpM3.js similarity index 93% rename from assets/index-OBL8cfjx.js rename to assets/index-DAnovpM3.js index 00cc79f..c9a1151 100644 --- a/assets/index-OBL8cfjx.js +++ b/assets/index-DAnovpM3.js @@ -1,4 +1,4 @@ -import{aJ as s,af as o,aF as t,aP as i,aV as n,aW as f,aX as d,aK as c,aO as l,aT as h,aN as m,aR as p,aQ as I,aS as x,aU as V,aL as w,aM as E}from"./index-DgzvH8Qi.js";const a=` +import{aJ as s,af as o,aF as t,aP as i,aV as n,aW as f,aX as d,aK as c,aO as l,aT as h,aN as m,aR as p,aQ as I,aS as x,aU as V,aL as w,aM as E}from"./index-VLNutAkM.js";const a=` @font-face { font-family: 'Inter'; font-style: normal; diff --git a/assets/index-CwO9kn06.js b/assets/index-DJgpWg3r.js similarity index 98% rename from assets/index-CwO9kn06.js rename to assets/index-DJgpWg3r.js index c922c64..2f3ba8b 100644 --- a/assets/index-CwO9kn06.js +++ b/assets/index-DJgpWg3r.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-2lrILkeJ.js","assets/index-DgzvH8Qi.js","assets/index-BgH4b0Mv.css"])))=>i.map(i=>d[i]); -import{bz as fe}from"./index-DgzvH8Qi.js";const me=Symbol(),ee=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,te=(e,t=!0)=>{G.set(e,t)},z={BASE_URL:"/push-keys/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_ENV:"dev",VITE_APP_WALLETCONNECT_PROJECT_ID:"a9782e50cde6e67b10c297f1834e43ea"},q=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>q(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const y=l.get(n);if((y==null?void 0:y[0])===g)return y[1];const v=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return te(v,!0),l.set(n,[g,v]),Reflect.ownKeys(n).forEach(D=>{if(Object.getOwnPropertyDescriptor(v,D))return;const O=Reflect.get(n,D),M={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete M.value,M.get=()=>I(O);else if(A.has(O)){const[b,H]=A.get(O);M.value=c(b,H(),I)}Object.defineProperty(v,D,M)}),Object.preventExtensions(v)},m=new WeakMap,f=[1,1],W=n=>{if(!q(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=f[0];const y=new Set,v=(i,a=++f[0])=>{I!==a&&(I=a,y.forEach(o=>o(i,a)))};let D=f[1];const O=(i=++f[1])=>(D!==i&&!y.size&&(D=i,b.forEach(([a])=>{const o=a[1](i);o>I&&(I=o)})),I),M=i=>(a,o)=>{const h=[...a];h[1]=[i,...h[1]],v(h,o)},b=new Map,H=(i,a)=>{if((z?"production":void 0)!=="production"&&b.has(i))throw new Error("prop listener already exists");if(y.size){const o=a[3](M(i));b.set(i,[a,o])}else b.set(i,[a])},Z=i=>{var a;const o=b.get(i);o&&(b.delete(i),(a=o[1])==null||a.call(o))},ue=i=>(y.add(i),y.size===1&&b.forEach(([o,h],S)=>{if((z?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(S));b.set(S,[o,T])}),()=>{y.delete(i),y.size===0&&b.forEach(([o,h],S)=>{h&&(h(),b.set(S,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),V=t(J,{deleteProperty(i,a){const o=Reflect.get(i,a);Z(a);const h=Reflect.deleteProperty(i,a);return h&&v(["delete",[a],o]),h},set(i,a,o,h){const S=Reflect.has(i,a),T=Reflect.get(i,a,h);if(S&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;Z(a),q(o)&&(o=ge(o)||o);let $=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,v(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,v(["reject",[a],C])});else{!A.has(o)&&s(o)&&($=W(o));const C=!x.has($)&&A.get($);C&&H(a,C)}return Reflect.set(i,a,$,h),v(["set",[a],o,T]),!0}});m.set(n,V);const pe=[J,O,c,ue];return A.set(V,pe),Reflect.ownKeys(n).forEach(i=>{const a=Object.getOwnPropertyDescriptor(n,i);"value"in a&&(V[i]=n[i],delete a.value,delete a.writable),Object.defineProperty(J,i,a)}),V})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function U(e,t,s){const r=A.get(e);(z?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:d,subscribe(e){return U(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return p.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(p.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!p.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return U(u.events,()=>e(ve(u.events[u.events.length-1])))},initialize(){u.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},E=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:E,subscribe(e){return U(E,()=>e(E))},setChains(e){E.chains=e},setWalletConnectUri(e){E.walletConnectUri=e},setIsCustomDesktop(e){E.isCustomDesktop=e},setIsCustomMobile(e){E.isCustomMobile=e},setIsDataLoaded(e){E.isDataLoaded=e},setIsUiLoaded(e){E.isUiLoaded=e},setIsAuth(e){E.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),N={state:B,subscribe(e){return U(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,We=(e,t)=>{for(var s in t||(t={}))Le.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))Oe.call(t,s)&&ne(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",N.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const P={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Me=(e,t)=>{for(var s in t||(t={}))Ae.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))je.call(t,s)&&re(e,s,t[s]);return e};const ae=p.isMobile(),L=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Re={state:L,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=N.state;if(e==="NONE"||t==="ALL"&&!e)return L.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await P.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),L.recomendedWallets=l}else{const{chains:s,isAuth:r}=w.state,l=s==null?void 0:s.join(","),c=p.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:p.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ae?await P.getMobileListings(m):await P.getDesktopListings(m);L.recomendedWallets=Object.values(f)}return L.recomendedWallets},async getWallets(e){const t=Me({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=N.state,{recomendedWallets:l}=L;if(r==="ALL")return L.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=ae?await P.getMobileListings(t):await P.getDesktopListings(t),n=Object.values(f),g=m?"search":"wallets";return L[g]={listings:[...L[g].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return P.getWalletImageUrl(e)},getAssetImageUrl(e){return P.getAssetImageUrl(e)},resetSearch(){L.search={listings:[],total:0,page:1}}},k=j({open:!1}),F={state:k,subscribe(e){return U(k,()=>e(k))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=w.state;if(p.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&r)k.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),k.open=!0,t())},200)}})},close(){k.open=!1}};var Pe=Object.defineProperty,ie=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&le(e,s,t[s]);if(ie)for(var s of ie(t))Ue.call(t,s)&&le(e,s,t[s]);return e};function Se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:Se()?"dark":"light"}),ce={state:R,subscribe(e){return U(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},_=j({open:!1,message:"",variant:"success"}),Ve={state:_,subscribe(e){return U(_,()=>e(_))},openToast(e,t){_.open=!0,_.message=e,_.variant=t},closeToast(){_.open=!1}};class ke{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),N.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await fe(()=>import("./index-2lrILkeJ.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const $e=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:ke},Symbol.toStringTag,{value:"Module"}));export{Ie as R,de as T,p as a,$e as i,ce as n,Ve as o,w as p,F as s,Re as t,N as y}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-LHQ3-BAe.js","assets/index-VLNutAkM.js","assets/index-BgH4b0Mv.css"])))=>i.map(i=>d[i]); +import{bz as fe}from"./index-VLNutAkM.js";const me=Symbol(),ee=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,te=(e,t=!0)=>{G.set(e,t)},z={BASE_URL:"/push-keys/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_ENV:"dev",VITE_APP_WALLETCONNECT_PROJECT_ID:"a9782e50cde6e67b10c297f1834e43ea"},q=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>q(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const y=l.get(n);if((y==null?void 0:y[0])===g)return y[1];const v=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return te(v,!0),l.set(n,[g,v]),Reflect.ownKeys(n).forEach(D=>{if(Object.getOwnPropertyDescriptor(v,D))return;const O=Reflect.get(n,D),M={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete M.value,M.get=()=>I(O);else if(A.has(O)){const[b,H]=A.get(O);M.value=c(b,H(),I)}Object.defineProperty(v,D,M)}),Object.preventExtensions(v)},m=new WeakMap,f=[1,1],W=n=>{if(!q(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=f[0];const y=new Set,v=(i,a=++f[0])=>{I!==a&&(I=a,y.forEach(o=>o(i,a)))};let D=f[1];const O=(i=++f[1])=>(D!==i&&!y.size&&(D=i,b.forEach(([a])=>{const o=a[1](i);o>I&&(I=o)})),I),M=i=>(a,o)=>{const h=[...a];h[1]=[i,...h[1]],v(h,o)},b=new Map,H=(i,a)=>{if((z?"production":void 0)!=="production"&&b.has(i))throw new Error("prop listener already exists");if(y.size){const o=a[3](M(i));b.set(i,[a,o])}else b.set(i,[a])},Z=i=>{var a;const o=b.get(i);o&&(b.delete(i),(a=o[1])==null||a.call(o))},ue=i=>(y.add(i),y.size===1&&b.forEach(([o,h],S)=>{if((z?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(S));b.set(S,[o,T])}),()=>{y.delete(i),y.size===0&&b.forEach(([o,h],S)=>{h&&(h(),b.set(S,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),V=t(J,{deleteProperty(i,a){const o=Reflect.get(i,a);Z(a);const h=Reflect.deleteProperty(i,a);return h&&v(["delete",[a],o]),h},set(i,a,o,h){const S=Reflect.has(i,a),T=Reflect.get(i,a,h);if(S&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;Z(a),q(o)&&(o=ge(o)||o);let $=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,v(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,v(["reject",[a],C])});else{!A.has(o)&&s(o)&&($=W(o));const C=!x.has($)&&A.get($);C&&H(a,C)}return Reflect.set(i,a,$,h),v(["set",[a],o,T]),!0}});m.set(n,V);const pe=[J,O,c,ue];return A.set(V,pe),Reflect.ownKeys(n).forEach(i=>{const a=Object.getOwnPropertyDescriptor(n,i);"value"in a&&(V[i]=n[i],delete a.value,delete a.writable),Object.defineProperty(J,i,a)}),V})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function U(e,t,s){const r=A.get(e);(z?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:d,subscribe(e){return U(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return p.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(p.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!p.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return U(u.events,()=>e(ve(u.events[u.events.length-1])))},initialize(){u.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},E=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:E,subscribe(e){return U(E,()=>e(E))},setChains(e){E.chains=e},setWalletConnectUri(e){E.walletConnectUri=e},setIsCustomDesktop(e){E.isCustomDesktop=e},setIsCustomMobile(e){E.isCustomMobile=e},setIsDataLoaded(e){E.isDataLoaded=e},setIsUiLoaded(e){E.isUiLoaded=e},setIsAuth(e){E.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),N={state:B,subscribe(e){return U(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,We=(e,t)=>{for(var s in t||(t={}))Le.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))Oe.call(t,s)&&ne(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",N.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const P={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Me=(e,t)=>{for(var s in t||(t={}))Ae.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))je.call(t,s)&&re(e,s,t[s]);return e};const ae=p.isMobile(),L=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Re={state:L,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=N.state;if(e==="NONE"||t==="ALL"&&!e)return L.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await P.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),L.recomendedWallets=l}else{const{chains:s,isAuth:r}=w.state,l=s==null?void 0:s.join(","),c=p.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:p.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ae?await P.getMobileListings(m):await P.getDesktopListings(m);L.recomendedWallets=Object.values(f)}return L.recomendedWallets},async getWallets(e){const t=Me({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=N.state,{recomendedWallets:l}=L;if(r==="ALL")return L.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=ae?await P.getMobileListings(t):await P.getDesktopListings(t),n=Object.values(f),g=m?"search":"wallets";return L[g]={listings:[...L[g].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return P.getWalletImageUrl(e)},getAssetImageUrl(e){return P.getAssetImageUrl(e)},resetSearch(){L.search={listings:[],total:0,page:1}}},k=j({open:!1}),F={state:k,subscribe(e){return U(k,()=>e(k))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=w.state;if(p.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&r)k.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),k.open=!0,t())},200)}})},close(){k.open=!1}};var Pe=Object.defineProperty,ie=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))_e.call(t,s)&&le(e,s,t[s]);if(ie)for(var s of ie(t))Ue.call(t,s)&&le(e,s,t[s]);return e};function Se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:Se()?"dark":"light"}),ce={state:R,subscribe(e){return U(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},_=j({open:!1,message:"",variant:"success"}),Ve={state:_,subscribe(e){return U(_,()=>e(_))},openToast(e,t){_.open=!0,_.message=e,_.variant=t},closeToast(){_.open=!1}};class ke{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),N.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await fe(()=>import("./index-LHQ3-BAe.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const $e=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:ke},Symbol.toStringTag,{value:"Module"}));export{Ie as R,de as T,p as a,$e as i,ce as n,Ve as o,w as p,F as s,Re as t,N as y}; diff --git a/assets/index-2lrILkeJ.js b/assets/index-LHQ3-BAe.js similarity index 99% rename from assets/index-2lrILkeJ.js rename to assets/index-LHQ3-BAe.js index 866b035..96fbc87 100644 --- a/assets/index-2lrILkeJ.js +++ b/assets/index-LHQ3-BAe.js @@ -1,4 +1,4 @@ -import{n as _t,s as ce,T as N,t as H,a as C,o as ot,R as Do,p as K,y as gt}from"./index-CwO9kn06.js";import"./index-DgzvH8Qi.js";/** +import{n as _t,s as ce,T as N,t as H,a as C,o as ot,R as Do,p as K,y as gt}from"./index-DJgpWg3r.js";import"./index-VLNutAkM.js";/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause diff --git a/assets/index-DgzvH8Qi.js b/assets/index-VLNutAkM.js similarity index 89% rename from assets/index-DgzvH8Qi.js rename to assets/index-VLNutAkM.js index 134a4ca..21d1f6c 100644 --- a/assets/index-DgzvH8Qi.js +++ b/assets/index-VLNutAkM.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CROOOhj5.js","assets/number-Bkt_BtbB.js","assets/index-BY8dqRha.js","assets/index-40a497ea-B-e4dja1.js","assets/index-021f6a62-BcF70HI7.js","assets/Index-a4a1058e-DBreb4CD.js","assets/index-BmjJoMIO.js","assets/index-BPbOMfKu.js","assets/index-B_Er0c8S.js","assets/inherits_browser-DBMiyxZF.js","assets/index.es-D8Q_dfUU.js"])))=>i.map(i=>d[i]); -var fS=Object.defineProperty;var dS=(e,t,n)=>t in e?fS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Se=(e,t,n)=>dS(e,typeof t!="symbol"?t+"":t,n);function hS(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mK(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var g3={exports:{}},Np={},y3={exports:{}},qe={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BYP1Ti20.js","assets/number-LIp8TDoP.js","assets/index-CEX9b7PI.js","assets/index-40a497ea-B-e4dja1.js","assets/index-021f6a62-BcF70HI7.js","assets/Index-a4a1058e-D0a-yFFT.js","assets/index-YxUBmkeZ.js","assets/index-vmC98Bu8.js","assets/index-CxSnFqrK.js","assets/inherits_browser-nIpjPFVU.js","assets/index.es-Brf_WupR.js"])))=>i.map(i=>d[i]); +var fS=Object.defineProperty;var dS=(e,t,n)=>t in e?fS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Se=(e,t,n)=>dS(e,typeof t!="symbol"?t+"":t,n);function hS(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mK(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var y3={exports:{}},Np={},b3={exports:{}},qe={};/** * @license React * react.production.min.js * @@ -7,7 +7,7 @@ var fS=Object.defineProperty;var dS=(e,t,n)=>t in e?fS(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var zf=Symbol.for("react.element"),pS=Symbol.for("react.portal"),mS=Symbol.for("react.fragment"),gS=Symbol.for("react.strict_mode"),yS=Symbol.for("react.profiler"),bS=Symbol.for("react.provider"),vS=Symbol.for("react.context"),wS=Symbol.for("react.forward_ref"),_S=Symbol.for("react.suspense"),xS=Symbol.for("react.memo"),ES=Symbol.for("react.lazy"),aw=Symbol.iterator;function SS(e){return e===null||typeof e!="object"?null:(e=aw&&e[aw]||e["@@iterator"],typeof e=="function"?e:null)}var b3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v3=Object.assign,w3={};function rc(e,t,n){this.props=e,this.context=t,this.refs=w3,this.updater=n||b3}rc.prototype.isReactComponent={};rc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};rc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _3(){}_3.prototype=rc.prototype;function yy(e,t,n){this.props=e,this.context=t,this.refs=w3,this.updater=n||b3}var by=yy.prototype=new _3;by.constructor=yy;v3(by,rc.prototype);by.isPureReactComponent=!0;var lw=Array.isArray,x3=Object.prototype.hasOwnProperty,vy={current:null},E3={key:!0,ref:!0,__self:!0,__source:!0};function S3(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)x3.call(t,r)&&!E3.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1t in e?fS(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var $S=de,PS=Symbol.for("react.element"),OS=Symbol.for("react.fragment"),RS=Object.prototype.hasOwnProperty,LS=$S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,BS={key:!0,ref:!0,__self:!0,__source:!0};function A3(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)RS.call(t,r)&&!BS.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:PS,type:e,key:o,ref:s,props:i,_owner:LS.current}}Np.Fragment=OS;Np.jsx=A3;Np.jsxs=A3;g3.exports=Np;var fe=g3.exports,dg={},T3={exports:{}},ar={},I3={exports:{}},$3={};/** + */var $S=de,PS=Symbol.for("react.element"),OS=Symbol.for("react.fragment"),RS=Object.prototype.hasOwnProperty,LS=$S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,BS={key:!0,ref:!0,__self:!0,__source:!0};function T3(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)RS.call(t,r)&&!BS.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:PS,type:e,key:o,ref:s,props:i,_owner:LS.current}}Np.Fragment=OS;Np.jsx=T3;Np.jsxs=T3;y3.exports=Np;var fe=y3.exports,dg={},I3={exports:{}},ar={},$3={exports:{}},P3={};/** * @license React * scheduler.production.min.js * @@ -23,7 +23,7 @@ var fS=Object.defineProperty;var dS=(e,t,n)=>t in e?fS(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(j,W){var Y=j.length;j.push(W);e:for(;0>>1,ae=j[te];if(0>>1;tei(Ie,Y))_ei(Ce,Ie)?(j[te]=Ce,j[_e]=Y,te=_e):(j[te]=Ie,j[pe]=Y,te=pe);else if(_ei(Ce,Y))j[te]=Ce,j[_e]=Y,te=_e;else break e}}return W}function i(j,W){var Y=j.sortIndex-W.sortIndex;return Y!==0?Y:j.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],d=1,c=null,f=3,m=!1,p=!1,h=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(j){for(var W=n(u);W!==null;){if(W.callback===null)r(u);else if(W.startTime<=j)r(u),W.sortIndex=W.expirationTime,t(l,W);else break;W=n(u)}}function w(j){if(h=!1,v(j),!p)if(n(l)!==null)p=!0,B(E);else{var W=n(u);W!==null&&V(w,W.startTime-j)}}function E(j,W){p=!1,h&&(h=!1,g(_),_=-1),m=!0;var Y=f;try{for(v(W),c=n(l);c!==null&&(!(c.expirationTime>W)||j&&!I());){var te=c.callback;if(typeof te=="function"){c.callback=null,f=c.priorityLevel;var ae=te(c.expirationTime<=W);W=e.unstable_now(),typeof ae=="function"?c.callback=ae:c===n(l)&&r(l),v(W)}else r(l);c=n(l)}if(c!==null)var Z=!0;else{var pe=n(u);pe!==null&&V(w,pe.startTime-W),Z=!1}return Z}finally{c=null,f=Y,m=!1}}var C=!1,k=null,_=-1,S=5,A=-1;function I(){return!(e.unstable_now()-Aj||125te?(j.sortIndex=Y,t(u,j),n(l)===null&&j===n(u)&&(h?(g(_),_=-1):h=!0,V(w,Y-te))):(j.sortIndex=ae,t(l,j),p||m||(p=!0,B(E))),j},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(j){var W=f;return function(){var Y=f;f=W;try{return j.apply(this,arguments)}finally{f=Y}}}})($3);I3.exports=$3;var NS=I3.exports;/** + */(function(e){function t(j,W){var Y=j.length;j.push(W);e:for(;0>>1,ae=j[te];if(0>>1;tei(Ie,Y))_ei(Ce,Ie)?(j[te]=Ce,j[_e]=Y,te=_e):(j[te]=Ie,j[pe]=Y,te=pe);else if(_ei(Ce,Y))j[te]=Ce,j[_e]=Y,te=_e;else break e}}return W}function i(j,W){var Y=j.sortIndex-W.sortIndex;return Y!==0?Y:j.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],d=1,c=null,f=3,m=!1,p=!1,h=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(j){for(var W=n(u);W!==null;){if(W.callback===null)r(u);else if(W.startTime<=j)r(u),W.sortIndex=W.expirationTime,t(l,W);else break;W=n(u)}}function w(j){if(h=!1,v(j),!p)if(n(l)!==null)p=!0,B(E);else{var W=n(u);W!==null&&V(w,W.startTime-j)}}function E(j,W){p=!1,h&&(h=!1,g(_),_=-1),m=!0;var Y=f;try{for(v(W),c=n(l);c!==null&&(!(c.expirationTime>W)||j&&!I());){var te=c.callback;if(typeof te=="function"){c.callback=null,f=c.priorityLevel;var ae=te(c.expirationTime<=W);W=e.unstable_now(),typeof ae=="function"?c.callback=ae:c===n(l)&&r(l),v(W)}else r(l);c=n(l)}if(c!==null)var Z=!0;else{var pe=n(u);pe!==null&&V(w,pe.startTime-W),Z=!1}return Z}finally{c=null,f=Y,m=!1}}var C=!1,k=null,_=-1,S=5,A=-1;function I(){return!(e.unstable_now()-Aj||125te?(j.sortIndex=Y,t(u,j),n(l)===null&&j===n(u)&&(h?(g(_),_=-1):h=!0,V(w,Y-te))):(j.sortIndex=ae,t(l,j),p||m||(p=!0,B(E))),j},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(j){var W=f;return function(){var Y=f;f=W;try{return j.apply(this,arguments)}finally{f=Y}}}})(P3);$3.exports=P3;var NS=$3.exports;/** * @license React * react-dom.production.min.js * @@ -31,14 +31,14 @@ var fS=Object.defineProperty;var dS=(e,t,n)=>t in e?fS(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var MS=de,sr=NS;function se(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hg=Object.prototype.hasOwnProperty,jS=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,uw={},fw={};function DS(e){return hg.call(fw,e)?!0:hg.call(uw,e)?!1:jS.test(e)?fw[e]=!0:(uw[e]=!0,!1)}function FS(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function US(e,t,n,r){if(t===null||typeof t>"u"||FS(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Bn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var pn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pn[e]=new Bn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pn[t]=new Bn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pn[e]=new Bn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pn[e]=new Bn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pn[e]=new Bn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pn[e]=new Bn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pn[e]=new Bn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pn[e]=new Bn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pn[e]=new Bn(e,5,!1,e.toLowerCase(),null,!1,!1)});var _y=/[\-:]([a-z])/g;function xy(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_y,xy);pn[t]=new Bn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_y,xy);pn[t]=new Bn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_y,xy);pn[t]=new Bn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pn[e]=new Bn(e,1,!1,e.toLowerCase(),null,!1,!1)});pn.xlinkHref=new Bn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pn[e]=new Bn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ey(e,t,n,r){var i=pn.hasOwnProperty(t)?pn[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hg=Object.prototype.hasOwnProperty,jS=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,fw={},dw={};function DS(e){return hg.call(dw,e)?!0:hg.call(fw,e)?!1:jS.test(e)?dw[e]=!0:(fw[e]=!0,!1)}function FS(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function US(e,t,n,r){if(t===null||typeof t>"u"||FS(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Bn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var pn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pn[e]=new Bn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pn[t]=new Bn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pn[e]=new Bn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pn[e]=new Bn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pn[e]=new Bn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pn[e]=new Bn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pn[e]=new Bn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pn[e]=new Bn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pn[e]=new Bn(e,5,!1,e.toLowerCase(),null,!1,!1)});var _y=/[\-:]([a-z])/g;function xy(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_y,xy);pn[t]=new Bn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_y,xy);pn[t]=new Bn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_y,xy);pn[t]=new Bn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pn[e]=new Bn(e,1,!1,e.toLowerCase(),null,!1,!1)});pn.xlinkHref=new Bn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pn[e]=new Bn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ey(e,t,n,r){var i=pn.hasOwnProperty(t)?pn[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{G0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?du(e):""}function HS(e){switch(e.tag){case 5:return du(e.type);case 16:return du("Lazy");case 13:return du("Suspense");case 19:return du("SuspenseList");case 0:case 2:case 15:return e=K0(e.type,!1),e;case 11:return e=K0(e.type.render,!1),e;case 1:return e=K0(e.type,!0),e;default:return""}}function yg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Qa:return"Fragment";case Ya:return"Portal";case pg:return"Profiler";case Sy:return"StrictMode";case mg:return"Suspense";case gg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case R3:return(e.displayName||"Context")+".Consumer";case O3:return(e._context.displayName||"Context")+".Provider";case ky:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Cy:return t=e.displayName||null,t!==null?t:yg(e.type)||"Memo";case No:t=e._payload,e=e._init;try{return yg(e(t))}catch{}}return null}function zS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return yg(t);case 8:return t===Sy?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function os(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function B3(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function WS(e){var t=B3(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _d(e){e._valueTracker||(e._valueTracker=WS(e))}function N3(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=B3(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Oh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bg(e,t){var n=t.checked;return St({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function hw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=os(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function M3(e,t){t=t.checked,t!=null&&Ey(e,"checked",t,!1)}function vg(e,t){M3(e,t);var n=os(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?wg(e,t.type,n):t.hasOwnProperty("defaultValue")&&wg(e,t.type,os(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function wg(e,t,n){(t!=="number"||Oh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hu=Array.isArray;function pl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=xd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},VS=["Webkit","ms","Moz","O"];Object.keys(Cu).forEach(function(e){VS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cu[t]=Cu[e]})});function U3(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cu.hasOwnProperty(e)&&Cu[e]?(""+t).trim():t+"px"}function H3(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=U3(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var qS=St({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Eg(e,t){if(t){if(qS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(se(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(se(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(se(61))}if(t.style!=null&&typeof t.style!="object")throw Error(se(62))}}function Sg(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kg=null;function Ay(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cg=null,ml=null,gl=null;function yw(e){if(e=qf(e)){if(typeof Cg!="function")throw Error(se(280));var t=e.stateNode;t&&(t=Up(t),Cg(e.stateNode,e.type,t))}}function z3(e){ml?gl?gl.push(e):gl=[e]:ml=e}function W3(){if(ml){var e=ml,t=gl;if(gl=ml=null,yw(e),t)for(e=0;e>>=0,e===0?32:31-(rk(e)/ik|0)|0}var Ed=64,Sd=4194304;function pu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Nh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=pu(a):(o&=s,o!==0&&(r=pu(o)))}else s=n&~i,s!==0?r=pu(s):o!==0&&(r=pu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Wf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wr(t),e[t]=n}function lk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Tu),Cw=" ",Aw=!1;function u5(e,t){switch(e){case"keyup":return Nk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f5(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ja=!1;function jk(e,t){switch(e){case"compositionend":return f5(t);case"keypress":return t.which!==32?null:(Aw=!0,Cw);case"textInput":return e=t.data,e===Cw&&Aw?null:e;default:return null}}function Dk(e,t){if(Ja)return e==="compositionend"||!By&&u5(e,t)?(e=l5(),ch=Oy=Ho=null,Ja=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Pw(n)}}function m5(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?m5(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function g5(){for(var e=window,t=Oh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Oh(e.document)}return t}function Ny(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Kk(e){var t=g5(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&m5(n.ownerDocument.documentElement,n)){if(r!==null&&Ny(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ow(n,o);var s=Ow(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,el=null,Og=null,$u=null,Rg=!1;function Rw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rg||el==null||el!==Oh(r)||(r=el,"selectionStart"in r&&Ny(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$u&&Zu($u,r)||($u=r,r=Dh(Og,"onSelect"),0rl||(e.current=Dg[rl],Dg[rl]=null,rl--)}function ft(e,t){rl++,Dg[rl]=e.current,e.current=t}var ss={},vn=ys(ss),Fn=ys(!1),fa=ss;function $l(e,t){var n=e.type.contextTypes;if(!n)return ss;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Un(e){return e=e.childContextTypes,e!=null}function Uh(){yt(Fn),yt(vn)}function Fw(e,t,n){if(vn.current!==ss)throw Error(se(168));ft(vn,t),ft(Fn,n)}function k5(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(se(108,zS(e)||"Unknown",i));return St({},n,r)}function Hh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ss,fa=vn.current,ft(vn,e),ft(Fn,Fn.current),!0}function Uw(e,t,n){var r=e.stateNode;if(!r)throw Error(se(169));n?(e=k5(e,t,fa),r.__reactInternalMemoizedMergedChildContext=e,yt(Fn),yt(vn),ft(vn,e)):yt(Fn),ft(Fn,n)}var zi=null,Hp=!1,lm=!1;function C5(e){zi===null?zi=[e]:zi.push(e)}function sC(e){Hp=!0,C5(e)}function bs(){if(!lm&&zi!==null){lm=!0;var e=0,t=at;try{var n=zi;for(at=1;e>=s,i-=s,Gi=1<<32-Wr(t)+i|n<_?(S=k,k=null):S=k.sibling;var A=f(g,k,v[_],w);if(A===null){k===null&&(k=S);break}e&&k&&A.alternate===null&&t(g,k),b=o(A,b,_),C===null?E=A:C.sibling=A,C=A,k=S}if(_===v.length)return n(g,k),vt&&Fs(g,_),E;if(k===null){for(;__?(S=k,k=null):S=k.sibling;var I=f(g,k,A.value,w);if(I===null){k===null&&(k=S);break}e&&k&&I.alternate===null&&t(g,k),b=o(I,b,_),C===null?E=I:C.sibling=I,C=I,k=S}if(A.done)return n(g,k),vt&&Fs(g,_),E;if(k===null){for(;!A.done;_++,A=v.next())A=c(g,A.value,w),A!==null&&(b=o(A,b,_),C===null?E=A:C.sibling=A,C=A);return vt&&Fs(g,_),E}for(k=r(g,k);!A.done;_++,A=v.next())A=m(k,g,_,A.value,w),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?_:A.key),b=o(A,b,_),C===null?E=A:C.sibling=A,C=A);return e&&k.forEach(function(L){return t(g,L)}),vt&&Fs(g,_),E}function y(g,b,v,w){if(typeof v=="object"&&v!==null&&v.type===Qa&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case wd:e:{for(var E=v.key,C=b;C!==null;){if(C.key===E){if(E=v.type,E===Qa){if(C.tag===7){n(g,C.sibling),b=i(C,v.props.children),b.return=g,g=b;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===No&&Ww(E)===C.type){n(g,C.sibling),b=i(C,v.props),b.ref=tu(g,C,v),b.return=g,g=b;break e}n(g,C);break}else t(g,C);C=C.sibling}v.type===Qa?(b=ta(v.props.children,g.mode,w,v.key),b.return=g,g=b):(w=yh(v.type,v.key,v.props,null,g.mode,w),w.ref=tu(g,b,v),w.return=g,g=w)}return s(g);case Ya:e:{for(C=v.key;b!==null;){if(b.key===C)if(b.tag===4&&b.stateNode.containerInfo===v.containerInfo&&b.stateNode.implementation===v.implementation){n(g,b.sibling),b=i(b,v.children||[]),b.return=g,g=b;break e}else{n(g,b);break}else t(g,b);b=b.sibling}b=gm(v,g.mode,w),b.return=g,g=b}return s(g);case No:return C=v._init,y(g,b,C(v._payload),w)}if(hu(v))return p(g,b,v,w);if(Xc(v))return h(g,b,v,w);Pd(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,b!==null&&b.tag===6?(n(g,b.sibling),b=i(b,v),b.return=g,g=b):(n(g,b),b=mm(v,g.mode,w),b.return=g,g=b),s(g)):n(g,b)}return y}var Ol=$5(!0),P5=$5(!1),Vh=ys(null),qh=null,sl=null,Fy=null;function Uy(){Fy=sl=qh=null}function Hy(e){var t=Vh.current;yt(Vh),e._currentValue=t}function Hg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function bl(e,t){qh=e,Fy=sl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dn=!0),e.firstContext=null)}function _r(e){var t=e._currentValue;if(Fy!==e)if(e={context:e,memoizedValue:t,next:null},sl===null){if(qh===null)throw Error(se(308));sl=e,qh.dependencies={lanes:0,firstContext:e}}else sl=sl.next=e;return t}var Ks=null;function zy(e){Ks===null?Ks=[e]:Ks.push(e)}function O5(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,zy(t)):(n.next=i.next,i.next=n),t.interleaved=n,eo(e,r)}function eo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Mo=!1;function Wy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function R5(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,et&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,eo(e,n)}return i=r.interleaved,i===null?(t.next=t,zy(r)):(t.next=i.next,i.next=t),r.interleaved=t,eo(e,n)}function fh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Iy(e,n)}}function Vw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gh(e,t,n,r){var i=e.updateQueue;Mo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(o!==null){var c=i.baseState;s=0,d=u=l=null,a=o;do{var f=a.lane,m=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,h=a;switch(f=t,m=n,h.tag){case 1:if(p=h.payload,typeof p=="function"){c=p.call(m,c,f);break e}c=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=h.payload,f=typeof p=="function"?p.call(m,c,f):p,f==null)break e;c=St({},c,f);break e;case 2:Mo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,l=c):d=d.next=m,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);pa|=s,e.lanes=s,e.memoizedState=c}}function qw(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=um.transition;um.transition={};try{e(!1),t()}finally{at=n,um.transition=r}}function X5(){return xr().memoizedState}function uC(e,t,n){var r=es(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Y5(e))Q5(t,n);else if(n=O5(e,t,n,r),n!==null){var i=$n();Vr(n,e,r,i),J5(n,t,r)}}function fC(e,t,n){var r=es(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Y5(e))Q5(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,qr(a,s)){var l=t.interleaved;l===null?(i.next=i,zy(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=O5(e,t,i,r),n!==null&&(i=$n(),Vr(n,e,r,i),J5(n,t,r))}}function Y5(e){var t=e.alternate;return e===Et||t!==null&&t===Et}function Q5(e,t){Pu=Zh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function J5(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Iy(e,n)}}var Xh={readContext:_r,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useInsertionEffect:gn,useLayoutEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useMutableSource:gn,useSyncExternalStore:gn,useId:gn,unstable_isNewReconciler:!1},dC={readContext:_r,useCallback:function(e,t){return ai().memoizedState=[e,t===void 0?null:t],e},useContext:_r,useEffect:Kw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,hh(4194308,4,V5.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hh(4194308,4,e,t)},useInsertionEffect:function(e,t){return hh(4,2,e,t)},useMemo:function(e,t){var n=ai();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ai();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=uC.bind(null,Et,e),[r.memoizedState,e]},useRef:function(e){var t=ai();return e={current:e},t.memoizedState=e},useState:Gw,useDebugValue:Qy,useDeferredValue:function(e){return ai().memoizedState=e},useTransition:function(){var e=Gw(!1),t=e[0];return e=cC.bind(null,e[1]),ai().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Et,i=ai();if(vt){if(n===void 0)throw Error(se(407));n=n()}else{if(n=t(),rn===null)throw Error(se(349));ha&30||M5(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Kw(D5.bind(null,r,o,e),[e]),r.flags|=2048,rf(9,j5.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ai(),t=rn.identifierPrefix;if(vt){var n=Ki,r=Gi;n=(r&~(1<<32-Wr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tf++,0")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{G0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?du(e):""}function HS(e){switch(e.tag){case 5:return du(e.type);case 16:return du("Lazy");case 13:return du("Suspense");case 19:return du("SuspenseList");case 0:case 2:case 15:return e=K0(e.type,!1),e;case 11:return e=K0(e.type.render,!1),e;case 1:return e=K0(e.type,!0),e;default:return""}}function yg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ja:return"Fragment";case Qa:return"Portal";case pg:return"Profiler";case Sy:return"StrictMode";case mg:return"Suspense";case gg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L3:return(e.displayName||"Context")+".Consumer";case R3:return(e._context.displayName||"Context")+".Provider";case ky:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Cy:return t=e.displayName||null,t!==null?t:yg(e.type)||"Memo";case No:t=e._payload,e=e._init;try{return yg(e(t))}catch{}}return null}function zS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return yg(t);case 8:return t===Sy?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function os(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function N3(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function WS(e){var t=N3(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _d(e){e._valueTracker||(e._valueTracker=WS(e))}function M3(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=N3(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Oh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function bg(e,t){var n=t.checked;return St({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=os(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function j3(e,t){t=t.checked,t!=null&&Ey(e,"checked",t,!1)}function vg(e,t){j3(e,t);var n=os(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?wg(e,t.type,n):t.hasOwnProperty("defaultValue")&&wg(e,t.type,os(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function wg(e,t,n){(t!=="number"||Oh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hu=Array.isArray;function ml(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=xd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},VS=["Webkit","ms","Moz","O"];Object.keys(Cu).forEach(function(e){VS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cu[t]=Cu[e]})});function H3(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cu.hasOwnProperty(e)&&Cu[e]?(""+t).trim():t+"px"}function z3(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=H3(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var qS=St({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Eg(e,t){if(t){if(qS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(se(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(se(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(se(61))}if(t.style!=null&&typeof t.style!="object")throw Error(se(62))}}function Sg(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kg=null;function Ay(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cg=null,gl=null,yl=null;function bw(e){if(e=qf(e)){if(typeof Cg!="function")throw Error(se(280));var t=e.stateNode;t&&(t=Up(t),Cg(e.stateNode,e.type,t))}}function W3(e){gl?yl?yl.push(e):yl=[e]:gl=e}function V3(){if(gl){var e=gl,t=yl;if(yl=gl=null,bw(e),t)for(e=0;e>>=0,e===0?32:31-(rk(e)/ik|0)|0}var Ed=64,Sd=4194304;function pu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Nh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=pu(a):(o&=s,o!==0&&(r=pu(o)))}else s=n&~i,s!==0?r=pu(s):o!==0&&(r=pu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Wf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wr(t),e[t]=n}function lk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Tu),Aw=" ",Tw=!1;function f5(e,t){switch(e){case"keyup":return Nk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function d5(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var el=!1;function jk(e,t){switch(e){case"compositionend":return d5(t);case"keypress":return t.which!==32?null:(Tw=!0,Aw);case"textInput":return e=t.data,e===Aw&&Tw?null:e;default:return null}}function Dk(e,t){if(el)return e==="compositionend"||!By&&f5(e,t)?(e=c5(),ch=Oy=Ho=null,el=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ow(n)}}function g5(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?g5(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function y5(){for(var e=window,t=Oh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Oh(e.document)}return t}function Ny(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Kk(e){var t=y5(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&g5(n.ownerDocument.documentElement,n)){if(r!==null&&Ny(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Rw(n,o);var s=Rw(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,tl=null,Og=null,$u=null,Rg=!1;function Lw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rg||tl==null||tl!==Oh(r)||(r=tl,"selectionStart"in r&&Ny(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$u&&Zu($u,r)||($u=r,r=Dh(Og,"onSelect"),0il||(e.current=Dg[il],Dg[il]=null,il--)}function ft(e,t){il++,Dg[il]=e.current,e.current=t}var ss={},vn=ys(ss),Fn=ys(!1),fa=ss;function Pl(e,t){var n=e.type.contextTypes;if(!n)return ss;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Un(e){return e=e.childContextTypes,e!=null}function Uh(){yt(Fn),yt(vn)}function Uw(e,t,n){if(vn.current!==ss)throw Error(se(168));ft(vn,t),ft(Fn,n)}function C5(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(se(108,zS(e)||"Unknown",i));return St({},n,r)}function Hh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ss,fa=vn.current,ft(vn,e),ft(Fn,Fn.current),!0}function Hw(e,t,n){var r=e.stateNode;if(!r)throw Error(se(169));n?(e=C5(e,t,fa),r.__reactInternalMemoizedMergedChildContext=e,yt(Fn),yt(vn),ft(vn,e)):yt(Fn),ft(Fn,n)}var zi=null,Hp=!1,lm=!1;function A5(e){zi===null?zi=[e]:zi.push(e)}function sC(e){Hp=!0,A5(e)}function bs(){if(!lm&&zi!==null){lm=!0;var e=0,t=at;try{var n=zi;for(at=1;e>=s,i-=s,Gi=1<<32-Wr(t)+i|n<_?(S=k,k=null):S=k.sibling;var A=f(g,k,v[_],w);if(A===null){k===null&&(k=S);break}e&&k&&A.alternate===null&&t(g,k),b=o(A,b,_),C===null?E=A:C.sibling=A,C=A,k=S}if(_===v.length)return n(g,k),vt&&Fs(g,_),E;if(k===null){for(;__?(S=k,k=null):S=k.sibling;var I=f(g,k,A.value,w);if(I===null){k===null&&(k=S);break}e&&k&&I.alternate===null&&t(g,k),b=o(I,b,_),C===null?E=I:C.sibling=I,C=I,k=S}if(A.done)return n(g,k),vt&&Fs(g,_),E;if(k===null){for(;!A.done;_++,A=v.next())A=c(g,A.value,w),A!==null&&(b=o(A,b,_),C===null?E=A:C.sibling=A,C=A);return vt&&Fs(g,_),E}for(k=r(g,k);!A.done;_++,A=v.next())A=m(k,g,_,A.value,w),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?_:A.key),b=o(A,b,_),C===null?E=A:C.sibling=A,C=A);return e&&k.forEach(function(L){return t(g,L)}),vt&&Fs(g,_),E}function y(g,b,v,w){if(typeof v=="object"&&v!==null&&v.type===Ja&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case wd:e:{for(var E=v.key,C=b;C!==null;){if(C.key===E){if(E=v.type,E===Ja){if(C.tag===7){n(g,C.sibling),b=i(C,v.props.children),b.return=g,g=b;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===No&&Vw(E)===C.type){n(g,C.sibling),b=i(C,v.props),b.ref=tu(g,C,v),b.return=g,g=b;break e}n(g,C);break}else t(g,C);C=C.sibling}v.type===Ja?(b=ta(v.props.children,g.mode,w,v.key),b.return=g,g=b):(w=yh(v.type,v.key,v.props,null,g.mode,w),w.ref=tu(g,b,v),w.return=g,g=w)}return s(g);case Qa:e:{for(C=v.key;b!==null;){if(b.key===C)if(b.tag===4&&b.stateNode.containerInfo===v.containerInfo&&b.stateNode.implementation===v.implementation){n(g,b.sibling),b=i(b,v.children||[]),b.return=g,g=b;break e}else{n(g,b);break}else t(g,b);b=b.sibling}b=gm(v,g.mode,w),b.return=g,g=b}return s(g);case No:return C=v._init,y(g,b,C(v._payload),w)}if(hu(v))return p(g,b,v,w);if(Xc(v))return h(g,b,v,w);Pd(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,b!==null&&b.tag===6?(n(g,b.sibling),b=i(b,v),b.return=g,g=b):(n(g,b),b=mm(v,g.mode,w),b.return=g,g=b),s(g)):n(g,b)}return y}var Rl=P5(!0),O5=P5(!1),Vh=ys(null),qh=null,al=null,Fy=null;function Uy(){Fy=al=qh=null}function Hy(e){var t=Vh.current;yt(Vh),e._currentValue=t}function Hg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function vl(e,t){qh=e,Fy=al=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dn=!0),e.firstContext=null)}function _r(e){var t=e._currentValue;if(Fy!==e)if(e={context:e,memoizedValue:t,next:null},al===null){if(qh===null)throw Error(se(308));al=e,qh.dependencies={lanes:0,firstContext:e}}else al=al.next=e;return t}var Ks=null;function zy(e){Ks===null?Ks=[e]:Ks.push(e)}function R5(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,zy(t)):(n.next=i.next,i.next=n),t.interleaved=n,eo(e,r)}function eo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Mo=!1;function Wy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function L5(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,et&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,eo(e,n)}return i=r.interleaved,i===null?(t.next=t,zy(r)):(t.next=i.next,i.next=t),r.interleaved=t,eo(e,n)}function fh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Iy(e,n)}}function qw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gh(e,t,n,r){var i=e.updateQueue;Mo=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(o!==null){var c=i.baseState;s=0,d=u=l=null,a=o;do{var f=a.lane,m=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,h=a;switch(f=t,m=n,h.tag){case 1:if(p=h.payload,typeof p=="function"){c=p.call(m,c,f);break e}c=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=h.payload,f=typeof p=="function"?p.call(m,c,f):p,f==null)break e;c=St({},c,f);break e;case 2:Mo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=m,l=c):d=d.next=m,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);pa|=s,e.lanes=s,e.memoizedState=c}}function Gw(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=um.transition;um.transition={};try{e(!1),t()}finally{at=n,um.transition=r}}function Y5(){return xr().memoizedState}function uC(e,t,n){var r=es(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Q5(e))J5(t,n);else if(n=R5(e,t,n,r),n!==null){var i=$n();Vr(n,e,r,i),e4(n,t,r)}}function fC(e,t,n){var r=es(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Q5(e))J5(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,qr(a,s)){var l=t.interleaved;l===null?(i.next=i,zy(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=R5(e,t,i,r),n!==null&&(i=$n(),Vr(n,e,r,i),e4(n,t,r))}}function Q5(e){var t=e.alternate;return e===Et||t!==null&&t===Et}function J5(e,t){Pu=Zh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function e4(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Iy(e,n)}}var Xh={readContext:_r,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useInsertionEffect:gn,useLayoutEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useMutableSource:gn,useSyncExternalStore:gn,useId:gn,unstable_isNewReconciler:!1},dC={readContext:_r,useCallback:function(e,t){return ai().memoizedState=[e,t===void 0?null:t],e},useContext:_r,useEffect:Zw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,hh(4194308,4,q5.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hh(4194308,4,e,t)},useInsertionEffect:function(e,t){return hh(4,2,e,t)},useMemo:function(e,t){var n=ai();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ai();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=uC.bind(null,Et,e),[r.memoizedState,e]},useRef:function(e){var t=ai();return e={current:e},t.memoizedState=e},useState:Kw,useDebugValue:Qy,useDeferredValue:function(e){return ai().memoizedState=e},useTransition:function(){var e=Kw(!1),t=e[0];return e=cC.bind(null,e[1]),ai().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Et,i=ai();if(vt){if(n===void 0)throw Error(se(407));n=n()}else{if(n=t(),rn===null)throw Error(se(349));ha&30||j5(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Zw(F5.bind(null,r,o,e),[e]),r.flags|=2048,rf(9,D5.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ai(),t=rn.identifierPrefix;if(vt){var n=Ki,r=Gi;n=(r&~(1<<32-Wr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=tf++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ci]=t,e[Qu]=r,c4(e,t,!1,!1),t.stateNode=e;e:{switch(s=Sg(n,r),n){case"dialog":pt("cancel",e),pt("close",e),i=r;break;case"iframe":case"object":case"embed":pt("load",e),i=r;break;case"video":case"audio":for(i=0;iBl&&(t.flags|=128,r=!0,nu(o,!1),t.lanes=4194304)}else{if(!r)if(e=Kh(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!vt)return yn(t),null}else 2*It()-o.renderingStartTime>Bl&&n!==1073741824&&(t.flags|=128,r=!0,nu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=It(),t.sibling=null,n=xt.current,ft(xt,r?n&1|2:n&1),t):(yn(t),null);case 22:case 23:return ib(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?tr&1073741824&&(yn(t),t.subtreeFlags&6&&(t.flags|=8192)):yn(t),null;case 24:return null;case 25:return null}throw Error(se(156,t.tag))}function wC(e,t){switch(jy(t),t.tag){case 1:return Un(t.type)&&Uh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Rl(),yt(Fn),yt(vn),Gy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qy(t),null;case 13:if(yt(xt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(se(340));Pl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return yt(xt),null;case 4:return Rl(),null;case 10:return Hy(t.type._context),null;case 22:case 23:return ib(),null;case 24:return null;default:return null}}var Rd=!1,bn=!1,_C=typeof WeakSet=="function"?WeakSet:Set,be=null;function al(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ct(e,t,r)}else n.current=null}function Yg(e,t,n){try{n()}catch(r){Ct(e,t,r)}}var o2=!1;function xC(e,t){if(Lg=Mh,e=g5(),Ny(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var m;c!==n||i!==0&&c.nodeType!==3||(a=s+i),c!==o||r!==0&&c.nodeType!==3||(l=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(m=c.firstChild)!==null;)f=c,c=m;for(;;){if(c===e)break t;if(f===n&&++u===i&&(a=s),f===o&&++d===r&&(l=s),(m=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bg={focusedElem:e,selectionRange:n},Mh=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var h=p.memoizedProps,y=p.memoizedState,g=t.stateNode,b=g.getSnapshotBeforeUpdate(t.elementType===t.type?h:Lr(t.type,h),y);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(w){Ct(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,be=e;break}be=t.return}return p=o2,o2=!1,p}function Ou(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Yg(t,n,o)}i=i.next}while(i!==r)}}function Vp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Qg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function d4(e){var t=e.alternate;t!==null&&(e.alternate=null,d4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ci],delete t[Qu],delete t[jg],delete t[iC],delete t[oC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function h4(e){return e.tag===5||e.tag===3||e.tag===4}function s2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h4(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Fh));else if(r!==4&&(e=e.child,e!==null))for(Jg(e,t,n),e=e.sibling;e!==null;)Jg(e,t,n),e=e.sibling}function e1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(e1(e,t,n),e=e.sibling;e!==null;)e1(e,t,n),e=e.sibling}var un=null,Mr=!1;function So(e,t,n){for(n=n.child;n!==null;)p4(e,t,n),n=n.sibling}function p4(e,t,n){if(di&&typeof di.onCommitFiberUnmount=="function")try{di.onCommitFiberUnmount(Mp,n)}catch{}switch(n.tag){case 5:bn||al(n,t);case 6:var r=un,i=Mr;un=null,So(e,t,n),un=r,Mr=i,un!==null&&(Mr?(e=un,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):un.removeChild(n.stateNode));break;case 18:un!==null&&(Mr?(e=un,n=n.stateNode,e.nodeType===8?am(e.parentNode,n):e.nodeType===1&&am(e,n),Gu(e)):am(un,n.stateNode));break;case 4:r=un,i=Mr,un=n.stateNode.containerInfo,Mr=!0,So(e,t,n),un=r,Mr=i;break;case 0:case 11:case 14:case 15:if(!bn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Yg(n,t,s),i=i.next}while(i!==r)}So(e,t,n);break;case 1:if(!bn&&(al(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ct(n,t,a)}So(e,t,n);break;case 21:So(e,t,n);break;case 22:n.mode&1?(bn=(r=bn)||n.memoizedState!==null,So(e,t,n),bn=r):So(e,t,n);break;default:So(e,t,n)}}function a2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _C),t.forEach(function(r){var i=PC.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Or(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=It()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*SC(r/1960))-r,10e?16:e,zo===null)var r=!1;else{if(e=zo,zo=null,Jh=0,et&6)throw Error(se(331));var i=et;for(et|=4,be=e.current;be!==null;){var o=be,s=o.child;if(be.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lIt()-nb?ea(e,0):tb|=n),Hn(e,t)}function x4(e,t){t===0&&(e.mode&1?(t=Sd,Sd<<=1,!(Sd&130023424)&&(Sd=4194304)):t=1);var n=$n();e=eo(e,t),e!==null&&(Wf(e,t,n),Hn(e,n))}function $C(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),x4(e,n)}function PC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(se(314))}r!==null&&r.delete(t),x4(e,n)}var E4;E4=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fn.current)Dn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Dn=!1,bC(e,t,n);Dn=!!(e.flags&131072)}else Dn=!1,vt&&t.flags&1048576&&A5(t,Wh,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ph(e,t),e=t.pendingProps;var i=$l(t,vn.current);bl(t,n),i=Zy(null,t,r,e,i,n);var o=Xy();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Un(r)?(o=!0,Hh(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Wy(t),i.updater=Wp,t.stateNode=i,i._reactInternals=t,Wg(t,r,e,n),t=Gg(null,t,r,!0,o,n)):(t.tag=0,vt&&o&&My(t),An(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ph(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=RC(r),e=Lr(r,e),i){case 0:t=qg(null,t,r,e,n);break e;case 1:t=n2(null,t,r,e,n);break e;case 11:t=e2(null,t,r,e,n);break e;case 14:t=t2(null,t,r,Lr(r.type,e),n);break e}throw Error(se(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lr(r,i),qg(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lr(r,i),n2(e,t,r,i,n);case 3:e:{if(s4(t),e===null)throw Error(se(387));r=t.pendingProps,o=t.memoizedState,i=o.element,R5(e,t),Gh(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ll(Error(se(423)),t),t=r2(e,t,r,n,i);break e}else if(r!==i){i=Ll(Error(se(424)),t),t=r2(e,t,r,n,i);break e}else for(rr=Yo(t.stateNode.containerInfo.firstChild),ir=t,vt=!0,Dr=null,n=P5(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Pl(),r===i){t=to(e,t,n);break e}An(e,t,r,n)}t=t.child}return t;case 5:return L5(t),e===null&&Ug(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Ng(r,i)?s=null:o!==null&&Ng(r,o)&&(t.flags|=32),o4(e,t),An(e,t,s,n),t.child;case 6:return e===null&&Ug(t),null;case 13:return a4(e,t,n);case 4:return Vy(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ol(t,null,r,n):An(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lr(r,i),e2(e,t,r,i,n);case 7:return An(e,t,t.pendingProps,n),t.child;case 8:return An(e,t,t.pendingProps.children,n),t.child;case 12:return An(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,ft(Vh,r._currentValue),r._currentValue=s,o!==null)if(qr(o.value,s)){if(o.children===i.children&&!Fn.current){t=to(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Xi(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Hg(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(se(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Hg(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}An(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,bl(t,n),i=_r(i),r=r(i),t.flags|=1,An(e,t,r,n),t.child;case 14:return r=t.type,i=Lr(r,t.pendingProps),i=Lr(r.type,i),t2(e,t,r,i,n);case 15:return r4(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lr(r,i),ph(e,t),t.tag=1,Un(r)?(e=!0,Hh(t)):e=!1,bl(t,n),e4(t,r,i),Wg(t,r,i,n),Gg(null,t,r,!0,e,n);case 19:return l4(e,t,n);case 22:return i4(e,t,n)}throw Error(se(156,t.tag))};function S4(e,t){return Y3(e,t)}function OC(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vr(e,t,n,r){return new OC(e,t,n,r)}function sb(e){return e=e.prototype,!(!e||!e.isReactComponent)}function RC(e){if(typeof e=="function")return sb(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ky)return 11;if(e===Cy)return 14}return 2}function ts(e,t){var n=e.alternate;return n===null?(n=vr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function yh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")sb(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Qa:return ta(n.children,i,o,t);case Sy:s=8,i|=8;break;case pg:return e=vr(12,n,t,i|2),e.elementType=pg,e.lanes=o,e;case mg:return e=vr(13,n,t,i),e.elementType=mg,e.lanes=o,e;case gg:return e=vr(19,n,t,i),e.elementType=gg,e.lanes=o,e;case L3:return Gp(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O3:s=10;break e;case R3:s=9;break e;case ky:s=11;break e;case Cy:s=14;break e;case No:s=16,r=null;break e}throw Error(se(130,e==null?e:typeof e,""))}return t=vr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ta(e,t,n,r){return e=vr(7,e,r,t),e.lanes=n,e}function Gp(e,t,n,r){return e=vr(22,e,r,t),e.elementType=L3,e.lanes=n,e.stateNode={isHidden:!1},e}function mm(e,t,n){return e=vr(6,e,null,t),e.lanes=n,e}function gm(e,t,n){return t=vr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function LC(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=X0(0),this.expirationTimes=X0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=X0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ab(e,t,n,r,i,o,s,a,l){return e=new LC(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=vr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wy(o),e}function BC(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(T4)}catch(e){console.error(e)}}T4(),T3.exports=ar;var FC=T3.exports,m2=FC;dg.createRoot=m2.createRoot,dg.hydrateRoot=m2.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function hm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Vg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var mC=typeof WeakMap=="function"?WeakMap:Map;function n4(e,t,n){n=Xi(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Qh||(Qh=!0,t1=r),Vg(e,t)},n}function r4(e,t,n){n=Xi(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Vg(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Vg(e,t),typeof r!="function"&&(Jo===null?Jo=new Set([this]):Jo.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Qw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new mC;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=IC.bind(null,e,t,n),t.then(e,e))}function Jw(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function e2(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Xi(-1,1),t.tag=2,Qo(n,t,1))),n.lanes|=1),e)}var gC=oo.ReactCurrentOwner,Dn=!1;function An(e,t,n,r){t.child=e===null?O5(t,null,n,r):Rl(t,e.child,n,r)}function t2(e,t,n,r,i){n=n.render;var o=t.ref;return vl(t,i),r=Zy(e,t,n,r,o,i),n=Xy(),e!==null&&!Dn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,to(e,t,i)):(vt&&n&&My(t),t.flags|=1,An(e,t,r,i),t.child)}function n2(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!sb(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,i4(e,t,o,r,i)):(e=yh(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Zu,n(s,r)&&e.ref===t.ref)return to(e,t,i)}return t.flags|=1,e=ts(o,r),e.ref=t.ref,e.return=t,t.child=e}function i4(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Zu(o,r)&&e.ref===t.ref)if(Dn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Dn=!0);else return t.lanes=e.lanes,to(e,t,i)}return qg(e,t,n,r,i)}function o4(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ft(cl,tr),tr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ft(cl,tr),tr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ft(cl,tr),tr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ft(cl,tr),tr|=r;return An(e,t,i,n),t.child}function s4(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function qg(e,t,n,r,i){var o=Un(n)?fa:vn.current;return o=Pl(t,o),vl(t,i),n=Zy(e,t,n,r,o,i),r=Xy(),e!==null&&!Dn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,to(e,t,i)):(vt&&r&&My(t),t.flags|=1,An(e,t,n,i),t.child)}function r2(e,t,n,r,i){if(Un(n)){var o=!0;Hh(t)}else o=!1;if(vl(t,i),t.stateNode===null)ph(e,t),t4(t,n,r),Wg(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=_r(u):(u=Un(n)?fa:vn.current,u=Pl(t,u));var d=n.getDerivedStateFromProps,c=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";c||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Yw(t,s,r,u),Mo=!1;var f=t.memoizedState;s.state=f,Gh(t,r,s,i),l=t.memoizedState,a!==r||f!==l||Fn.current||Mo?(typeof d=="function"&&(zg(t,n,d,r),l=t.memoizedState),(a=Mo||Xw(t,n,a,r,f,l,u))?(c||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,L5(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Lr(t.type,a),s.props=u,c=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=_r(l):(l=Un(n)?fa:vn.current,l=Pl(t,l));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==c||f!==l)&&Yw(t,s,r,l),Mo=!1,f=t.memoizedState,s.state=f,Gh(t,r,s,i);var p=t.memoizedState;a!==c||f!==p||Fn.current||Mo?(typeof m=="function"&&(zg(t,n,m,r),p=t.memoizedState),(u=Mo||Xw(t,n,u,r,f,p,l)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Gg(e,t,n,r,o,i)}function Gg(e,t,n,r,i,o){s4(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Hw(t,n,!1),to(e,t,o);r=t.stateNode,gC.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Rl(t,e.child,null,o),t.child=Rl(t,null,a,o)):An(e,t,a,o),t.memoizedState=r.state,i&&Hw(t,n,!0),t.child}function a4(e){var t=e.stateNode;t.pendingContext?Uw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Uw(e,t.context,!1),Vy(e,t.containerInfo)}function i2(e,t,n,r,i){return Ol(),Dy(i),t.flags|=256,An(e,t,n,r),t.child}var Kg={dehydrated:null,treeContext:null,retryLane:0};function Zg(e){return{baseLanes:e,cachePool:null,transitions:null}}function l4(e,t,n){var r=t.pendingProps,i=xt.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ft(xt,i&1),e===null)return Ug(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Gp(s,r,0,null),e=ta(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Zg(n),t.memoizedState=Kg,e):Jy(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return yC(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=ts(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=ts(a,o):(o=ta(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Zg(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Kg,r}return o=e.child,e=o.sibling,r=ts(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Jy(e,t){return t=Gp({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Od(e,t,n,r){return r!==null&&Dy(r),Rl(t,e.child,null,n),e=Jy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yC(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=hm(Error(se(422))),Od(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Gp({mode:"visible",children:r.children},i,0,null),o=ta(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Rl(t,e.child,null,s),t.child.memoizedState=Zg(s),t.memoizedState=Kg,o);if(!(t.mode&1))return Od(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(se(419)),r=hm(o,r,void 0),Od(e,t,s,r)}if(a=(s&e.childLanes)!==0,Dn||a){if(r=rn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,eo(e,i),Vr(r,e,i,-1))}return ob(),r=hm(Error(se(421))),Od(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=$C.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,rr=Yo(i.nextSibling),ir=t,vt=!0,Dr=null,e!==null&&(gr[yr++]=Gi,gr[yr++]=Ki,gr[yr++]=da,Gi=e.id,Ki=e.overflow,da=t),t=Jy(t,r.children),t.flags|=4096,t)}function o2(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hg(e.return,t,n)}function pm(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function c4(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(An(e,t,r.children,n),r=xt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&o2(e,n,t);else if(e.tag===19)o2(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ft(xt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Kh(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),pm(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Kh(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}pm(t,!0,n,null,o);break;case"together":pm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ph(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function to(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pa|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(se(153));if(t.child!==null){for(e=t.child,n=ts(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ts(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function bC(e,t,n){switch(t.tag){case 3:a4(t),Ol();break;case 5:B5(t);break;case 1:Un(t.type)&&Hh(t);break;case 4:Vy(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ft(Vh,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ft(xt,xt.current&1),t.flags|=128,null):n&t.child.childLanes?l4(e,t,n):(ft(xt,xt.current&1),e=to(e,t,n),e!==null?e.sibling:null);ft(xt,xt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return c4(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ft(xt,xt.current),r)break;return null;case 22:case 23:return t.lanes=0,o4(e,t,n)}return to(e,t,n)}var u4,Xg,f4,d4;u4=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Xg=function(){};f4=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Zs(hi.current);var o=null;switch(n){case"input":i=bg(e,i),r=bg(e,r),o=[];break;case"select":i=St({},i,{value:void 0}),r=St({},r,{value:void 0}),o=[];break;case"textarea":i=_g(e,i),r=_g(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Fh)}Eg(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Hu.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Hu.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&pt("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};d4=function(e,t,n,r){n!==r&&(t.flags|=4)};function nu(e,t){if(!vt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function yn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function vC(e,t,n){var r=t.pendingProps;switch(jy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yn(t),null;case 1:return Un(t.type)&&Uh(),yn(t),null;case 3:return r=t.stateNode,Ll(),yt(Fn),yt(vn),Gy(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($d(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Dr!==null&&(i1(Dr),Dr=null))),Xg(e,t),yn(t),null;case 5:qy(t);var i=Zs(ef.current);if(n=t.type,e!==null&&t.stateNode!=null)f4(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(se(166));return yn(t),null}if(e=Zs(hi.current),$d(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ci]=t,r[Qu]=o,e=(t.mode&1)!==0,n){case"dialog":pt("cancel",r),pt("close",r);break;case"iframe":case"object":case"embed":pt("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ci]=t,e[Qu]=r,u4(e,t,!1,!1),t.stateNode=e;e:{switch(s=Sg(n,r),n){case"dialog":pt("cancel",e),pt("close",e),i=r;break;case"iframe":case"object":case"embed":pt("load",e),i=r;break;case"video":case"audio":for(i=0;iNl&&(t.flags|=128,r=!0,nu(o,!1),t.lanes=4194304)}else{if(!r)if(e=Kh(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!vt)return yn(t),null}else 2*It()-o.renderingStartTime>Nl&&n!==1073741824&&(t.flags|=128,r=!0,nu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=It(),t.sibling=null,n=xt.current,ft(xt,r?n&1|2:n&1),t):(yn(t),null);case 22:case 23:return ib(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?tr&1073741824&&(yn(t),t.subtreeFlags&6&&(t.flags|=8192)):yn(t),null;case 24:return null;case 25:return null}throw Error(se(156,t.tag))}function wC(e,t){switch(jy(t),t.tag){case 1:return Un(t.type)&&Uh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ll(),yt(Fn),yt(vn),Gy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qy(t),null;case 13:if(yt(xt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(se(340));Ol()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return yt(xt),null;case 4:return Ll(),null;case 10:return Hy(t.type._context),null;case 22:case 23:return ib(),null;case 24:return null;default:return null}}var Rd=!1,bn=!1,_C=typeof WeakSet=="function"?WeakSet:Set,be=null;function ll(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ct(e,t,r)}else n.current=null}function Yg(e,t,n){try{n()}catch(r){Ct(e,t,r)}}var s2=!1;function xC(e,t){if(Lg=Mh,e=y5(),Ny(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var m;c!==n||i!==0&&c.nodeType!==3||(a=s+i),c!==o||r!==0&&c.nodeType!==3||(l=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(m=c.firstChild)!==null;)f=c,c=m;for(;;){if(c===e)break t;if(f===n&&++u===i&&(a=s),f===o&&++d===r&&(l=s),(m=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bg={focusedElem:e,selectionRange:n},Mh=!1,be=t;be!==null;)if(t=be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,be=e;else for(;be!==null;){t=be;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var h=p.memoizedProps,y=p.memoizedState,g=t.stateNode,b=g.getSnapshotBeforeUpdate(t.elementType===t.type?h:Lr(t.type,h),y);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(w){Ct(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,be=e;break}be=t.return}return p=s2,s2=!1,p}function Ou(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Yg(t,n,o)}i=i.next}while(i!==r)}}function Vp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Qg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function h4(e){var t=e.alternate;t!==null&&(e.alternate=null,h4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ci],delete t[Qu],delete t[jg],delete t[iC],delete t[oC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function p4(e){return e.tag===5||e.tag===3||e.tag===4}function a2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||p4(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Fh));else if(r!==4&&(e=e.child,e!==null))for(Jg(e,t,n),e=e.sibling;e!==null;)Jg(e,t,n),e=e.sibling}function e1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(e1(e,t,n),e=e.sibling;e!==null;)e1(e,t,n),e=e.sibling}var un=null,Mr=!1;function So(e,t,n){for(n=n.child;n!==null;)m4(e,t,n),n=n.sibling}function m4(e,t,n){if(di&&typeof di.onCommitFiberUnmount=="function")try{di.onCommitFiberUnmount(Mp,n)}catch{}switch(n.tag){case 5:bn||ll(n,t);case 6:var r=un,i=Mr;un=null,So(e,t,n),un=r,Mr=i,un!==null&&(Mr?(e=un,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):un.removeChild(n.stateNode));break;case 18:un!==null&&(Mr?(e=un,n=n.stateNode,e.nodeType===8?am(e.parentNode,n):e.nodeType===1&&am(e,n),Gu(e)):am(un,n.stateNode));break;case 4:r=un,i=Mr,un=n.stateNode.containerInfo,Mr=!0,So(e,t,n),un=r,Mr=i;break;case 0:case 11:case 14:case 15:if(!bn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Yg(n,t,s),i=i.next}while(i!==r)}So(e,t,n);break;case 1:if(!bn&&(ll(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ct(n,t,a)}So(e,t,n);break;case 21:So(e,t,n);break;case 22:n.mode&1?(bn=(r=bn)||n.memoizedState!==null,So(e,t,n),bn=r):So(e,t,n);break;default:So(e,t,n)}}function l2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _C),t.forEach(function(r){var i=PC.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Or(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=It()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*SC(r/1960))-r,10e?16:e,zo===null)var r=!1;else{if(e=zo,zo=null,Jh=0,et&6)throw Error(se(331));var i=et;for(et|=4,be=e.current;be!==null;){var o=be,s=o.child;if(be.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lIt()-nb?ea(e,0):tb|=n),Hn(e,t)}function E4(e,t){t===0&&(e.mode&1?(t=Sd,Sd<<=1,!(Sd&130023424)&&(Sd=4194304)):t=1);var n=$n();e=eo(e,t),e!==null&&(Wf(e,t,n),Hn(e,n))}function $C(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),E4(e,n)}function PC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(se(314))}r!==null&&r.delete(t),E4(e,n)}var S4;S4=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fn.current)Dn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Dn=!1,bC(e,t,n);Dn=!!(e.flags&131072)}else Dn=!1,vt&&t.flags&1048576&&T5(t,Wh,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ph(e,t),e=t.pendingProps;var i=Pl(t,vn.current);vl(t,n),i=Zy(null,t,r,e,i,n);var o=Xy();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Un(r)?(o=!0,Hh(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Wy(t),i.updater=Wp,t.stateNode=i,i._reactInternals=t,Wg(t,r,e,n),t=Gg(null,t,r,!0,o,n)):(t.tag=0,vt&&o&&My(t),An(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ph(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=RC(r),e=Lr(r,e),i){case 0:t=qg(null,t,r,e,n);break e;case 1:t=r2(null,t,r,e,n);break e;case 11:t=t2(null,t,r,e,n);break e;case 14:t=n2(null,t,r,Lr(r.type,e),n);break e}throw Error(se(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lr(r,i),qg(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lr(r,i),r2(e,t,r,i,n);case 3:e:{if(a4(t),e===null)throw Error(se(387));r=t.pendingProps,o=t.memoizedState,i=o.element,L5(e,t),Gh(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Bl(Error(se(423)),t),t=i2(e,t,r,n,i);break e}else if(r!==i){i=Bl(Error(se(424)),t),t=i2(e,t,r,n,i);break e}else for(rr=Yo(t.stateNode.containerInfo.firstChild),ir=t,vt=!0,Dr=null,n=O5(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ol(),r===i){t=to(e,t,n);break e}An(e,t,r,n)}t=t.child}return t;case 5:return B5(t),e===null&&Ug(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Ng(r,i)?s=null:o!==null&&Ng(r,o)&&(t.flags|=32),s4(e,t),An(e,t,s,n),t.child;case 6:return e===null&&Ug(t),null;case 13:return l4(e,t,n);case 4:return Vy(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Rl(t,null,r,n):An(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lr(r,i),t2(e,t,r,i,n);case 7:return An(e,t,t.pendingProps,n),t.child;case 8:return An(e,t,t.pendingProps.children,n),t.child;case 12:return An(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,ft(Vh,r._currentValue),r._currentValue=s,o!==null)if(qr(o.value,s)){if(o.children===i.children&&!Fn.current){t=to(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Xi(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Hg(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(se(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Hg(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}An(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,vl(t,n),i=_r(i),r=r(i),t.flags|=1,An(e,t,r,n),t.child;case 14:return r=t.type,i=Lr(r,t.pendingProps),i=Lr(r.type,i),n2(e,t,r,i,n);case 15:return i4(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Lr(r,i),ph(e,t),t.tag=1,Un(r)?(e=!0,Hh(t)):e=!1,vl(t,n),t4(t,r,i),Wg(t,r,i,n),Gg(null,t,r,!0,e,n);case 19:return c4(e,t,n);case 22:return o4(e,t,n)}throw Error(se(156,t.tag))};function k4(e,t){return Q3(e,t)}function OC(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vr(e,t,n,r){return new OC(e,t,n,r)}function sb(e){return e=e.prototype,!(!e||!e.isReactComponent)}function RC(e){if(typeof e=="function")return sb(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ky)return 11;if(e===Cy)return 14}return 2}function ts(e,t){var n=e.alternate;return n===null?(n=vr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function yh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")sb(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Ja:return ta(n.children,i,o,t);case Sy:s=8,i|=8;break;case pg:return e=vr(12,n,t,i|2),e.elementType=pg,e.lanes=o,e;case mg:return e=vr(13,n,t,i),e.elementType=mg,e.lanes=o,e;case gg:return e=vr(19,n,t,i),e.elementType=gg,e.lanes=o,e;case B3:return Gp(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R3:s=10;break e;case L3:s=9;break e;case ky:s=11;break e;case Cy:s=14;break e;case No:s=16,r=null;break e}throw Error(se(130,e==null?e:typeof e,""))}return t=vr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ta(e,t,n,r){return e=vr(7,e,r,t),e.lanes=n,e}function Gp(e,t,n,r){return e=vr(22,e,r,t),e.elementType=B3,e.lanes=n,e.stateNode={isHidden:!1},e}function mm(e,t,n){return e=vr(6,e,null,t),e.lanes=n,e}function gm(e,t,n){return t=vr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function LC(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=X0(0),this.expirationTimes=X0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=X0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ab(e,t,n,r,i,o,s,a,l){return e=new LC(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=vr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wy(o),e}function BC(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(I4)}catch(e){console.error(e)}}I4(),I3.exports=ar;var FC=I3.exports,g2=FC;dg.createRoot=g2.createRoot,dg.hydrateRoot=g2.hydrateRoot;/** * @remix-run/router v1.19.2 * * Copyright (c) Remix Software Inc. @@ -47,7 +47,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function sf(){return sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function I4(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function HC(){return Math.random().toString(36).substr(2,8)}function y2(e,t){return{usr:e.state,key:e.key,idx:t}}function o1(e,t,n,r){return n===void 0&&(n=null),sf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?sc(t):t,{state:n,key:t&&t.key||r||HC()})}function $4(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function sc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zC(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Wo.Pop,l=null,u=d();u==null&&(u=0,s.replaceState(sf({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function c(){a=Wo.Pop;let y=d(),g=y==null?null:y-u;u=y,l&&l({action:a,location:h.location,delta:g})}function f(y,g){a=Wo.Push;let b=o1(h.location,y,g);u=d()+1;let v=y2(b,u),w=h.createHref(b);try{s.pushState(v,"",w)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(w)}o&&l&&l({action:a,location:h.location,delta:1})}function m(y,g){a=Wo.Replace;let b=o1(h.location,y,g);u=d();let v=y2(b,u),w=h.createHref(b);s.replaceState(v,"",w),o&&l&&l({action:a,location:h.location,delta:0})}function p(y){let g=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:$4(y);return b=b.replace(/ $/,"%20"),Bt(g,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,g)}let h={get action(){return a},get location(){return e(i,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(g2,c),l=y,()=>{i.removeEventListener(g2,c),l=null}},createHref(y){return t(i,y)},createURL:p,encodeLocation(y){let g=p(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:m,go(y){return s.go(y)}};return h}var b2;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(b2||(b2={}));function WC(e,t,n){return n===void 0&&(n="/"),VC(e,t,n,!1)}function VC(e,t,n,r){let i=typeof t=="string"?sc(t):t,o=R4(i.pathname||"/",n);if(o==null)return null;let s=P4(e);qC(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Bt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=na([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(Bt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),P4(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:JC(u,o.index),routesMeta:d})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of O4(o.path))i(o,s,l)}),t}function O4(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=O4(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function qC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const GC=/^:[\w-]+$/,KC=3,ZC=2,XC=1,YC=10,QC=-2,v2=e=>e==="*";function JC(e,t){let n=e.split("/"),r=n.length;return n.some(v2)&&(r+=QC),t&&(r+=ZC),n.filter(i=>!v2(i)).reduce((i,o)=>i+(GC.test(o)?KC:o===""?XC:YC),r)}function eA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function tA(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:f,isOptional:m}=d;if(f==="*"){let h=a[c]||"";s=o.slice(0,o.length-h.length).replace(/(.)\/+$/,"$1")}const p=a[c];return m&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function nA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),I4(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function rA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return I4(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function R4(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function iA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?sc(e):e;return{pathname:n?n.startsWith("/")?n:oA(n,t):t,search:lA(r),hash:cA(i)}}function oA(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ym(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function sA(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function L4(e,t){let n=sA(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function B4(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=sc(e):(i=sf({},e),Bt(!i.pathname||!i.pathname.includes("?"),ym("?","pathname","search",i)),Bt(!i.pathname||!i.pathname.includes("#"),ym("#","pathname","hash",i)),Bt(!i.search||!i.search.includes("#"),ym("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let c=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),c-=1;i.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=iA(i,a),u=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const na=e=>e.join("/").replace(/\/\/+/g,"/"),aA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function uA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const N4=["post","put","patch","delete"];new Set(N4);const fA=["get",...N4];new Set(fA);/** + */function sf(){return sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function fb(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function HC(){return Math.random().toString(36).substr(2,8)}function b2(e,t){return{usr:e.state,key:e.key,idx:t}}function o1(e,t,n,r){return n===void 0&&(n=null),sf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Aa(t):t,{state:n,key:t&&t.key||r||HC()})}function $4(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Aa(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zC(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Wo.Pop,l=null,u=d();u==null&&(u=0,s.replaceState(sf({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function c(){a=Wo.Pop;let y=d(),g=y==null?null:y-u;u=y,l&&l({action:a,location:h.location,delta:g})}function f(y,g){a=Wo.Push;let b=o1(h.location,y,g);n&&n(b,y),u=d()+1;let v=b2(b,u),w=h.createHref(b);try{s.pushState(v,"",w)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(w)}o&&l&&l({action:a,location:h.location,delta:1})}function m(y,g){a=Wo.Replace;let b=o1(h.location,y,g);n&&n(b,y),u=d();let v=b2(b,u),w=h.createHref(b);s.replaceState(v,"",w),o&&l&&l({action:a,location:h.location,delta:0})}function p(y){let g=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:$4(y);return b=b.replace(/ $/,"%20"),Bt(g,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,g)}let h={get action(){return a},get location(){return e(i,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(y2,c),l=y,()=>{i.removeEventListener(y2,c),l=null}},createHref(y){return t(i,y)},createURL:p,encodeLocation(y){let g=p(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:m,go(y){return s.go(y)}};return h}var v2;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(v2||(v2={}));function WC(e,t,n){return n===void 0&&(n="/"),VC(e,t,n,!1)}function VC(e,t,n,r){let i=typeof t=="string"?Aa(t):t,o=R4(i.pathname||"/",n);if(o==null)return null;let s=P4(e);qC(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Bt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=na([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(Bt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),P4(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:JC(u,o.index),routesMeta:d})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of O4(o.path))i(o,s,l)}),t}function O4(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=O4(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function qC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const GC=/^:[\w-]+$/,KC=3,ZC=2,XC=1,YC=10,QC=-2,w2=e=>e==="*";function JC(e,t){let n=e.split("/"),r=n.length;return n.some(w2)&&(r+=QC),t&&(r+=ZC),n.filter(i=>!w2(i)).reduce((i,o)=>i+(GC.test(o)?KC:o===""?XC:YC),r)}function eA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function tA(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:f,isOptional:m}=d;if(f==="*"){let h=a[c]||"";s=o.slice(0,o.length-h.length).replace(/(.)\/+$/,"$1")}const p=a[c];return m&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function nA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),fb(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function rA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fb(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function R4(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function iA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Aa(e):e;return{pathname:n?n.startsWith("/")?n:oA(n,t):t,search:lA(r),hash:cA(i)}}function oA(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ym(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function sA(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function L4(e,t){let n=sA(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function B4(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Aa(e):(i=sf({},e),Bt(!i.pathname||!i.pathname.includes("?"),ym("?","pathname","search",i)),Bt(!i.pathname||!i.pathname.includes("#"),ym("#","pathname","hash",i)),Bt(!i.search||!i.search.includes("#"),ym("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let c=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),c-=1;i.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=iA(i,a),u=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const na=e=>e.join("/").replace(/\/\/+/g,"/"),aA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function uA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const N4=["post","put","patch","delete"];new Set(N4);const fA=["get",...N4];new Set(fA);/** * React Router v6.26.2 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function af(){return af=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),de.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=B4(u,JSON.parse(s),o,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:na([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,s,o,e])}function pA(e,t){return mA(e,t)}function mA(e,t,n,r){Zf()||Bt(!1);let{navigator:i}=de.useContext(Kf),{matches:o}=de.useContext(Aa),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=db(),d;if(t){var c;let y=typeof t=="string"?sc(t):t;l==="/"||(c=y.pathname)!=null&&c.startsWith(l)||Bt(!1),d=y}else d=u;let f=d.pathname||"/",m=f;if(l!=="/"){let y=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=WC(e,{pathname:m}),h=wA(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:na([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:na([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,r);return t&&h?de.createElement(Qp.Provider,{value:{location:af({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Wo.Pop}},h):h}function gA(){let e=SA(),t=uA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return de.createElement(de.Fragment,null,de.createElement("h2",null,"Unexpected Application Error!"),de.createElement("h3",{style:{fontStyle:"italic"}},t),n?de.createElement("pre",{style:i},n):null,null)}const yA=de.createElement(gA,null);class bA extends de.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?de.createElement(Aa.Provider,{value:this.props.routeContext},de.createElement(M4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function vA(e){let{routeContext:t,match:n,children:r}=e,i=de.useContext(fb);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),de.createElement(Aa.Provider,{value:t},r)}function wA(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=s.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||Bt(!1),s=s.slice(0,Math.min(s.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((d,c,f)=>{let m,p=!1,h=null,y=null;n&&(m=a&&c.route.id?a[c.route.id]:void 0,h=c.route.errorElement||yA,l&&(u<0&&f===0?(p=!0,y=null):u===f&&(p=!0,y=c.route.hydrateFallbackElement||null)));let g=t.concat(s.slice(0,f+1)),b=()=>{let v;return m?v=h:p?v=y:c.route.Component?v=de.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=d,de.createElement(vA,{match:c,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?de.createElement(bA,{location:n.location,revalidation:n.revalidation,component:h,error:m,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var D4=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(D4||{}),np=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(np||{});function _A(e){let t=de.useContext(fb);return t||Bt(!1),t}function xA(e){let t=de.useContext(dA);return t||Bt(!1),t}function EA(e){let t=de.useContext(Aa);return t||Bt(!1),t}function F4(e){let t=EA(),n=t.matches[t.matches.length-1];return n.route.id||Bt(!1),n.route.id}function SA(){var e;let t=de.useContext(M4),n=xA(np.UseRouteError),r=F4(np.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function kA(){let{router:e}=_A(D4.UseNavigateStable),t=F4(np.UseNavigateStable),n=de.useRef(!1);return j4(()=>{n.current=!0}),de.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,af({fromRouteId:t},o)))},[e,t])}function CA(e){let{to:t,replace:n,state:r,relative:i}=e;Zf()||Bt(!1);let{future:o,static:s}=de.useContext(Kf),{matches:a}=de.useContext(Aa),{pathname:l}=db(),u=Xf(),d=B4(t,L4(a,o.v7_relativeSplatPath),l,i==="path"),c=JSON.stringify(d);return de.useEffect(()=>u(JSON.parse(c),{replace:n,state:r,relative:i}),[u,c,i,n,r]),null}function gu(e){Bt(!1)}function AA(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Wo.Pop,navigator:o,static:s=!1,future:a}=e;Zf()&&Bt(!1);let l=t.replace(/^\/*/,"/"),u=de.useMemo(()=>({basename:l,navigator:o,static:s,future:af({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=sc(r));let{pathname:d="/",search:c="",hash:f="",state:m=null,key:p="default"}=r,h=de.useMemo(()=>{let y=R4(d,l);return y==null?null:{location:{pathname:y,search:c,hash:f,state:m,key:p},navigationType:i}},[l,d,c,f,m,p,i]);return h==null?null:de.createElement(Kf.Provider,{value:u},de.createElement(Qp.Provider,{children:n,value:h}))}function TA(e){let{children:t,location:n}=e;return pA(s1(t),n)}new Promise(()=>{});function s1(e,t){t===void 0&&(t=[]);let n=[];return de.Children.forEach(e,(r,i)=>{if(!de.isValidElement(r))return;let o=[...t,i];if(r.type===de.Fragment){n.push.apply(n,s1(r.props.children,o));return}r.type!==gu&&Bt(!1),!r.props.index||!r.props.children||Bt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=s1(r.props.children,o)),n.push(s)}),n}/** + */function af(){return af=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),de.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=B4(u,JSON.parse(s),o,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:na([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,s,o,e])}function pA(e,t){return mA(e,t)}function mA(e,t,n,r){Zf()||Bt(!1);let{navigator:i}=de.useContext(Kf),{matches:o}=de.useContext(Ta),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=hb(),d;if(t){var c;let y=typeof t=="string"?Aa(t):t;l==="/"||(c=y.pathname)!=null&&c.startsWith(l)||Bt(!1),d=y}else d=u;let f=d.pathname||"/",m=f;if(l!=="/"){let y=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=WC(e,{pathname:m}),h=wA(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:na([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:na([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n,r);return t&&h?de.createElement(Qp.Provider,{value:{location:af({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Wo.Pop}},h):h}function gA(){let e=SA(),t=uA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return de.createElement(de.Fragment,null,de.createElement("h2",null,"Unexpected Application Error!"),de.createElement("h3",{style:{fontStyle:"italic"}},t),n?de.createElement("pre",{style:i},n):null,null)}const yA=de.createElement(gA,null);class bA extends de.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?de.createElement(Ta.Provider,{value:this.props.routeContext},de.createElement(M4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function vA(e){let{routeContext:t,match:n,children:r}=e,i=de.useContext(db);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),de.createElement(Ta.Provider,{value:t},r)}function wA(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=s.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||Bt(!1),s=s.slice(0,Math.min(s.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((d,c,f)=>{let m,p=!1,h=null,y=null;n&&(m=a&&c.route.id?a[c.route.id]:void 0,h=c.route.errorElement||yA,l&&(u<0&&f===0?(p=!0,y=null):u===f&&(p=!0,y=c.route.hydrateFallbackElement||null)));let g=t.concat(s.slice(0,f+1)),b=()=>{let v;return m?v=h:p?v=y:c.route.Component?v=de.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=d,de.createElement(vA,{match:c,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?de.createElement(bA,{location:n.location,revalidation:n.revalidation,component:h,error:m,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var D4=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(D4||{}),np=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(np||{});function _A(e){let t=de.useContext(db);return t||Bt(!1),t}function xA(e){let t=de.useContext(dA);return t||Bt(!1),t}function EA(e){let t=de.useContext(Ta);return t||Bt(!1),t}function F4(e){let t=EA(),n=t.matches[t.matches.length-1];return n.route.id||Bt(!1),n.route.id}function SA(){var e;let t=de.useContext(M4),n=xA(np.UseRouteError),r=F4(np.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function kA(){let{router:e}=_A(D4.UseNavigateStable),t=F4(np.UseNavigateStable),n=de.useRef(!1);return j4(()=>{n.current=!0}),de.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,af({fromRouteId:t},o)))},[e,t])}function CA(e){let{to:t,replace:n,state:r,relative:i}=e;Zf()||Bt(!1);let{future:o,static:s}=de.useContext(Kf),{matches:a}=de.useContext(Ta),{pathname:l}=hb(),u=Xf(),d=B4(t,L4(a,o.v7_relativeSplatPath),l,i==="path"),c=JSON.stringify(d);return de.useEffect(()=>u(JSON.parse(c),{replace:n,state:r,relative:i}),[u,c,i,n,r]),null}function gu(e){Bt(!1)}function AA(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Wo.Pop,navigator:o,static:s=!1,future:a}=e;Zf()&&Bt(!1);let l=t.replace(/^\/*/,"/"),u=de.useMemo(()=>({basename:l,navigator:o,static:s,future:af({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Aa(r));let{pathname:d="/",search:c="",hash:f="",state:m=null,key:p="default"}=r,h=de.useMemo(()=>{let y=R4(d,l);return y==null?null:{location:{pathname:y,search:c,hash:f,state:m,key:p},navigationType:i}},[l,d,c,f,m,p,i]);return h==null?null:de.createElement(Kf.Provider,{value:u},de.createElement(Qp.Provider,{children:n,value:h}))}function TA(e){let{children:t,location:n}=e;return pA(s1(t),n)}new Promise(()=>{});function s1(e,t){t===void 0&&(t=[]);let n=[];return de.Children.forEach(e,(r,i)=>{if(!de.isValidElement(r))return;let o=[...t,i];if(r.type===de.Fragment){n.push.apply(n,s1(r.props.children,o));return}r.type!==gu&&Bt(!1),!r.props.index||!r.props.children||Bt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=s1(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.26.2 * * Copyright (c) Remix Software Inc. @@ -65,7 +65,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */const IA="6";try{window.__reactRouterVersion=IA}catch{}const $A="startTransition",_2=IS[$A];function PA(e){let{basename:t,children:n,future:r,window:i}=e,o=de.useRef();o.current==null&&(o.current=UC({window:i,v5Compat:!0}));let s=o.current,[a,l]=de.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=de.useCallback(c=>{u&&_2?_2(()=>l(c)):l(c)},[l,u]);return de.useLayoutEffect(()=>s.listen(d),[s,d]),de.createElement(AA,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var x2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(x2||(x2={}));var E2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(E2||(E2={}));const OA=()=>{const e=Xf();return fe.jsxs("div",{className:"flex gap-5",children:[fe.jsx("button",{onClick:()=>e("signup"),className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-44",children:"Sign Up"}),fe.jsx("button",{onClick:()=>e("login"),className:"bg-green-600 text-white px-6 py-3 rounded-lg w-44",children:"Login"})]})},RA=()=>{const e=Xf();return fe.jsx("div",{className:"flex flex-col items-center justify-center",children:fe.jsxs("div",{className:"p-8 w-full max-w-md",children:[fe.jsx("input",{type:"text",placeholder:"Push Wallet Address",value:"",disabled:!0,className:"w-full px-4 py-3 mb-4 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"}),fe.jsx("button",{onClick:()=>console.log("View Connected Accounts"),className:"w-full py-3 mb-4 text-blue-600 bg-white border border-blue-600 rounded-md hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"View Connected Accounts"}),fe.jsx("button",{onClick:()=>console.log("View Connected Apps"),className:"w-full py-3 mb-4 text-blue-600 bg-white border border-blue-600 rounded-md hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"View App Connections"}),fe.jsxs("button",{onClick:()=>e("login"),className:"w-full py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-center",children:[fe.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:fe.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),"Lock Push Account"]})]})})},U4={wallet:null,theme:"light"};function LA(e,t){switch(t.type){case"INITIALIZE_WALLET":return{...e,wallet:t.payload};case"RESET_WALLET":return{...e,wallet:null};case"SET_THEME":return{...e,theme:t.payload};default:return e}}const H4=de.createContext({state:U4,dispatch:()=>null});function hb(){const e=de.useContext(H4);if(!e)throw new Error("useGlobalState must be used within a GlobalProvider");return e}const BA=({children:e})=>{const[t,n]=de.useReducer(LA,U4);return fe.jsx(H4.Provider,{value:{state:t,dispatch:n},children:e})};function NA(){const{state:e}=hb();return fe.jsx(fe.Fragment,{children:e.wallet===null?fe.jsx(OA,{}):fe.jsx(RA,{})})}function wl(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function MA(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Fr(e,...t){if(!MA(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function z4(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");wl(e.outputLen),wl(e.blockLen)}function rp(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function jA(e,t){Fr(e);const n=t.outputLen;if(e.lengthnew DataView(e.buffer,e.byteOffset,e.byteLength),oi=(e,t)=>e<<32-t|e>>>t,Nd=(e,t)=>e<>>32-t>>>0;new Uint8Array(new Uint32Array([287454020]).buffer)[0];const DA=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function nr(e){Fr(e);let t="";for(let n=0;n=Ni._0&&e<=Ni._9)return e-Ni._0;if(e>=Ni._A&&e<=Ni._F)return e-(Ni._A-10);if(e>=Ni._a&&e<=Ni._f)return e-(Ni._a-10)}function Hs(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;i{};async function UA(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update(lf(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function gb(e=32){if(za&&typeof za.getRandomValues=="function")return za.getRandomValues(new Uint8Array(e));if(za&&typeof za.randomBytes=="function")return za.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}let V4=class extends W4{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,z4(t);const r=lf(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let s=0;snew V4(e,t).update(n).digest();cf.create=(e,t)=>new V4(e,t);function q4(e,t,n,r){z4(e);const i=zA({dkLen:32,asyncTick:10},r),{c:o,dkLen:s,asyncTick:a}=i;if(wl(o),wl(s),wl(a),o<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=lf(t),u=lf(n),d=new Uint8Array(s),c=cf.create(e,l),f=c._cloneInto().update(u);return{c:o,dkLen:s,asyncTick:a,DK:d,PRF:c,PRFSalt:f}}function G4(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}function WA(e,t,n,r){const{c:i,dkLen:o,DK:s,PRF:a,PRFSalt:l}=q4(e,t,n,r);let u;const d=new Uint8Array(4),c=ns(d),f=new Uint8Array(a.outputLen);for(let m=1,p=0;p{l._cloneInto(d).update(m).digestInto(m);for(let g=0;g>i&o),a=Number(n&o),l=r?4:0,u=r?0:4;e.setUint32(t+l,s,r),e.setUint32(t+u,a,r)}const GA=(e,t,n)=>e&t^~e&n,KA=(e,t,n)=>e&t^e&n^t&n;let yb=class extends W4{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ns(this.buffer)}update(t){rp(this);const{view:n,buffer:r,blockLen:i}=this;t=lf(t);const o=t.length;for(let s=0;si-s&&(this.process(r,0),s=0);for(let c=s;cd.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c>>3,h=oi(m,17)^oi(m,19)^m>>>10;Co[c]=h+Co[c-7]+p+Co[c-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:l,G:u,H:d}=this;for(let c=0;c<64;c++){const f=oi(a,6)^oi(a,11)^oi(a,25),m=d+f+GA(a,l,u)+ZA[c]+Co[c]|0,h=(oi(r,2)^oi(r,13)^oi(r,22))+KA(r,i,o)|0;d=u,u=l,l=a,a=s+m|0,s=o,o=i,i=r,r=m+h|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,i,o,s,a,l,u,d)}roundClean(){Co.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const ra=mb(()=>new XA),Md=BigInt(2**32-1),a1=BigInt(32);function K4(e,t=!1){return t?{h:Number(e&Md),l:Number(e>>a1&Md)}:{h:Number(e>>a1&Md)|0,l:Number(e&Md)|0}}function YA(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0),JA=(e,t,n)=>e>>>n,eT=(e,t,n)=>e<<32-n|t>>>n,tT=(e,t,n)=>e>>>n|t<<32-n,nT=(e,t,n)=>e<<32-n|t>>>n,rT=(e,t,n)=>e<<64-n|t>>>n-32,iT=(e,t,n)=>e>>>n-32|t<<64-n,oT=(e,t)=>t,sT=(e,t)=>e,aT=(e,t,n)=>e<>>32-n,lT=(e,t,n)=>t<>>32-n,cT=(e,t,n)=>t<>>64-n,uT=(e,t,n)=>e<>>64-n;function fT(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}const dT=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),hT=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,pT=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),mT=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,gT=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),yT=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0,Ne={fromBig:K4,split:YA,toBig:QA,shrSH:JA,shrSL:eT,rotrSH:tT,rotrSL:nT,rotrBH:rT,rotrBL:iT,rotr32H:oT,rotr32L:sT,rotlSH:aT,rotlSL:lT,rotlBH:cT,rotlBL:uT,add:fT,add3L:dT,add3H:hT,add4L:pT,add4H:mT,add5H:yT,add5L:gT},[bT,vT]=Ne.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ao=new Uint32Array(80),To=new Uint32Array(80);let wT=class extends yb{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:n,Bh:r,Bl:i,Ch:o,Cl:s,Dh:a,Dl:l,Eh:u,El:d,Fh:c,Fl:f,Gh:m,Gl:p,Hh:h,Hl:y}=this;return[t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y]}set(t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=a|0,this.Dl=l|0,this.Eh=u|0,this.El=d|0,this.Fh=c|0,this.Fl=f|0,this.Gh=m|0,this.Gl=p|0,this.Hh=h|0,this.Hl=y|0}process(t,n){for(let v=0;v<16;v++,n+=4)Ao[v]=t.getUint32(n),To[v]=t.getUint32(n+=4);for(let v=16;v<80;v++){const w=Ao[v-15]|0,E=To[v-15]|0,C=Ne.rotrSH(w,E,1)^Ne.rotrSH(w,E,8)^Ne.shrSH(w,E,7),k=Ne.rotrSL(w,E,1)^Ne.rotrSL(w,E,8)^Ne.shrSL(w,E,7),_=Ao[v-2]|0,S=To[v-2]|0,A=Ne.rotrSH(_,S,19)^Ne.rotrBH(_,S,61)^Ne.shrSH(_,S,6),I=Ne.rotrSL(_,S,19)^Ne.rotrBL(_,S,61)^Ne.shrSL(_,S,6),L=Ne.add4L(k,I,To[v-7],To[v-16]),F=Ne.add4H(L,C,A,Ao[v-7],Ao[v-16]);Ao[v]=F|0,To[v]=L|0}let{Ah:r,Al:i,Bh:o,Bl:s,Ch:a,Cl:l,Dh:u,Dl:d,Eh:c,El:f,Fh:m,Fl:p,Gh:h,Gl:y,Hh:g,Hl:b}=this;for(let v=0;v<80;v++){const w=Ne.rotrSH(c,f,14)^Ne.rotrSH(c,f,18)^Ne.rotrBH(c,f,41),E=Ne.rotrSL(c,f,14)^Ne.rotrSL(c,f,18)^Ne.rotrBL(c,f,41),C=c&m^~c&h,k=f&p^~f&y,_=Ne.add5L(b,E,k,vT[v],To[v]),S=Ne.add5H(_,g,w,C,bT[v],Ao[v]),A=_|0,I=Ne.rotrSH(r,i,28)^Ne.rotrBH(r,i,34)^Ne.rotrBH(r,i,39),L=Ne.rotrSL(r,i,28)^Ne.rotrBL(r,i,34)^Ne.rotrBL(r,i,39),F=r&o^r&a^o&a,N=i&s^i&l^s&l;g=h|0,b=y|0,h=m|0,y=p|0,m=c|0,p=f|0,{h:c,l:f}=Ne.add(u|0,d|0,S|0,A|0),u=a|0,d=l|0,a=o|0,l=s|0,o=r|0,s=i|0;const R=Ne.add3L(A,L,N);r=Ne.add3H(R,S,I,F),i=R|0}({h:r,l:i}=Ne.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:s}=Ne.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:a,l}=Ne.add(this.Ch|0,this.Cl|0,a|0,l|0),{h:u,l:d}=Ne.add(this.Dh|0,this.Dl|0,u|0,d|0),{h:c,l:f}=Ne.add(this.Eh|0,this.El|0,c|0,f|0),{h:m,l:p}=Ne.add(this.Fh|0,this.Fl|0,m|0,p|0),{h,l:y}=Ne.add(this.Gh|0,this.Gl|0,h|0,y|0),{h:g,l:b}=Ne.add(this.Hh|0,this.Hl|0,g|0,b|0),this.set(r,i,o,s,a,l,u,d,c,f,m,p,h,y,g,b)}roundClean(){Ao.fill(0),To.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const ip=mb(()=>new wT);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function op(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function bb(...e){const t=o=>o,n=(o,s)=>a=>o(s(a)),r=e.map(o=>o.encode).reduceRight(n,t),i=e.map(o=>o.decode).reduce(n,t);return{encode:r,decode:i}}function Z4(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})}}}function X4(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of t)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function _T(e,t="="){if(typeof t!="string")throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let r of n)if(typeof r!="string")throw new Error(`padding.encode: non-string input=${r}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let i of n)if(typeof i!="string")throw new Error(`padding.decode: non-string input=${i}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function l1(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const i=[],o=Array.from(e);for(o.forEach(s=>{if(s<0||s>=t)throw new Error(`Wrong integer: ${s}`)});;){let s=0,a=!0;for(let l=r;lt?Y4(t,e%t):e,sp=(e,t)=>e+(t-Y4(e,t));function c1(e,t,n,r){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(sp(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${sp(t,n)}`);let i=0,o=0;const s=2**n-1,a=[];for(const l of e){if(l>=2**t)throw new Error(`convertRadix2: invalid data word=${l} from=${t}`);if(i=i<32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)a.push((i>>o-n&s)>>>0);i&=2**o-1}if(i=i<=t)throw new Error("Excess padding");if(!r&&i)throw new Error(`Non-zero padding: ${i}`);return r&&o>0&&a.push(i>>>0),a}function Q4(e){return{encode:t=>{if(!op(t))throw new Error("radix.encode input should be Uint8Array");return l1(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(l1(t,e,2**8))}}}function xT(e,t=!1){if(e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(sp(8,e)>32||sp(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!op(n))throw new Error("radix2.encode input should be Uint8Array");return c1(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&typeof n[0]!="number")throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(c1(n,e,8,t))}}}function J4(e,t){if(typeof t!="function")throw new Error("checksum fn should be function");return{encode(n){if(!op(n))throw new Error("checksum.encode: input should be Uint8Array");const r=t(n).slice(0,e),i=new Uint8Array(n.length+e);return i.set(n),i.set(r,n.length),i},decode(n){if(!op(n))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-e),i=t(r).slice(0,e),o=n.slice(-e);for(let s=0;sbb(Q4(58),Z4(e),X4("")),ST=ET("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),ex=e=>bb(J4(4,t=>e(e(t))),ST);/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const kT=e=>e[0]==="あいこくしん";function tx(e){if(typeof e!="string")throw new TypeError(`Invalid mnemonic type: ${typeof e}`);return e.normalize("NFKD")}function nx(e){const t=tx(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}function CT(e){Fr(e,16,20,24,28,32)}function AT(e,t=128){if(wl(t),t%32!==0||t>256)throw new TypeError("Invalid entropy");return $T(gb(t/8),e)}const TT=e=>{const t=8-e.length/4;return new Uint8Array([ra(e)[0]>>t<{if(typeof t!="string")throw new Error(`Wordlist: non-string element: ${t}`)}),jd.chain(jd.checksum(1,TT),jd.radix2(11,!0),jd.alphabet(e))}function $T(e,t){return CT(e),IT(t).encode(e).join(kT(t)?" ":" ")}const rx=e=>tx(`mnemonic${e}`);function bm(e,t=""){return VA(ip,nx(e).nfkd,rx(t),{c:2048,dkLen:64})}function PT(e,t=""){return WA(ip,nx(e).nfkd,rx(t),{c:2048,dkLen:64})}const OT=`abandon + */const IA="6";try{window.__reactRouterVersion=IA}catch{}const $A="startTransition",x2=IS[$A];function PA(e){let{basename:t,children:n,future:r,window:i}=e,o=de.useRef();o.current==null&&(o.current=UC({window:i,v5Compat:!0}));let s=o.current,[a,l]=de.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=de.useCallback(c=>{u&&x2?x2(()=>l(c)):l(c)},[l,u]);return de.useLayoutEffect(()=>s.listen(d),[s,d]),de.createElement(AA,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}var E2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(E2||(E2={}));var S2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(S2||(S2={}));const OA=()=>{const e=Xf();return fe.jsxs("div",{className:"flex gap-5",children:[fe.jsx("button",{onClick:()=>e("signup"),className:"bg-blue-600 text-white px-6 py-3 rounded-lg w-44",children:"Sign Up"}),fe.jsx("button",{onClick:()=>e("login"),className:"bg-green-600 text-white px-6 py-3 rounded-lg w-44",children:"Login"})]})},RA=()=>{const e=Xf();return fe.jsx("div",{className:"flex flex-col items-center justify-center",children:fe.jsxs("div",{className:"p-8 w-full max-w-md",children:[fe.jsx("input",{type:"text",placeholder:"Push Wallet Address",value:"",disabled:!0,className:"w-full px-4 py-3 mb-4 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"}),fe.jsx("button",{onClick:()=>console.log("View Connected Accounts"),className:"w-full py-3 mb-4 text-blue-600 bg-white border border-blue-600 rounded-md hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"View Connected Accounts"}),fe.jsx("button",{onClick:()=>console.log("View Connected Apps"),className:"w-full py-3 mb-4 text-blue-600 bg-white border border-blue-600 rounded-md hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"View App Connections"}),fe.jsxs("button",{onClick:()=>e("login"),className:"w-full py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-center",children:[fe.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:fe.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),"Lock Push Account"]})]})})},U4={wallet:null,theme:"light"};function LA(e,t){switch(t.type){case"INITIALIZE_WALLET":return{...e,wallet:t.payload};case"RESET_WALLET":return{...e,wallet:null};case"SET_THEME":return{...e,theme:t.payload};default:return e}}const H4=de.createContext({state:U4,dispatch:()=>null});function pb(){const e=de.useContext(H4);if(!e)throw new Error("useGlobalState must be used within a GlobalProvider");return e}const BA=({children:e})=>{const[t,n]=de.useReducer(LA,U4);return fe.jsx(H4.Provider,{value:{state:t,dispatch:n},children:e})};function NA(){const{state:e}=pb();return fe.jsx(fe.Fragment,{children:e.wallet===null?fe.jsx(OA,{}):fe.jsx(RA,{})})}function _l(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function MA(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Fr(e,...t){if(!MA(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function z4(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");_l(e.outputLen),_l(e.blockLen)}function rp(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function jA(e,t){Fr(e);const n=t.outputLen;if(e.lengthnew DataView(e.buffer,e.byteOffset,e.byteLength),oi=(e,t)=>e<<32-t|e>>>t,Nd=(e,t)=>e<>>32-t>>>0;new Uint8Array(new Uint32Array([287454020]).buffer)[0];const DA=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function nr(e){Fr(e);let t="";for(let n=0;n=Ni._0&&e<=Ni._9)return e-Ni._0;if(e>=Ni._A&&e<=Ni._F)return e-(Ni._A-10);if(e>=Ni._a&&e<=Ni._f)return e-(Ni._a-10)}function Hs(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;i{};async function UA(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update(lf(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function yb(e=32){if(Wa&&typeof Wa.getRandomValues=="function")return Wa.getRandomValues(new Uint8Array(e));if(Wa&&typeof Wa.randomBytes=="function")return Wa.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}let V4=class extends W4{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,z4(t);const r=lf(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let s=0;snew V4(e,t).update(n).digest();cf.create=(e,t)=>new V4(e,t);function q4(e,t,n,r){z4(e);const i=zA({dkLen:32,asyncTick:10},r),{c:o,dkLen:s,asyncTick:a}=i;if(_l(o),_l(s),_l(a),o<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=lf(t),u=lf(n),d=new Uint8Array(s),c=cf.create(e,l),f=c._cloneInto().update(u);return{c:o,dkLen:s,asyncTick:a,DK:d,PRF:c,PRFSalt:f}}function G4(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}function WA(e,t,n,r){const{c:i,dkLen:o,DK:s,PRF:a,PRFSalt:l}=q4(e,t,n,r);let u;const d=new Uint8Array(4),c=ns(d),f=new Uint8Array(a.outputLen);for(let m=1,p=0;p{l._cloneInto(d).update(m).digestInto(m);for(let g=0;g>i&o),a=Number(n&o),l=r?4:0,u=r?0:4;e.setUint32(t+l,s,r),e.setUint32(t+u,a,r)}const GA=(e,t,n)=>e&t^~e&n,KA=(e,t,n)=>e&t^e&n^t&n;let bb=class extends W4{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ns(this.buffer)}update(t){rp(this);const{view:n,buffer:r,blockLen:i}=this;t=lf(t);const o=t.length;for(let s=0;si-s&&(this.process(r,0),s=0);for(let c=s;cd.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c>>3,h=oi(m,17)^oi(m,19)^m>>>10;Co[c]=h+Co[c-7]+p+Co[c-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:l,G:u,H:d}=this;for(let c=0;c<64;c++){const f=oi(a,6)^oi(a,11)^oi(a,25),m=d+f+GA(a,l,u)+ZA[c]+Co[c]|0,h=(oi(r,2)^oi(r,13)^oi(r,22))+KA(r,i,o)|0;d=u,u=l,l=a,a=s+m|0,s=o,o=i,i=r,r=m+h|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,i,o,s,a,l,u,d)}roundClean(){Co.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const ra=gb(()=>new XA),Md=BigInt(2**32-1),a1=BigInt(32);function K4(e,t=!1){return t?{h:Number(e&Md),l:Number(e>>a1&Md)}:{h:Number(e>>a1&Md)|0,l:Number(e&Md)|0}}function YA(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0),JA=(e,t,n)=>e>>>n,eT=(e,t,n)=>e<<32-n|t>>>n,tT=(e,t,n)=>e>>>n|t<<32-n,nT=(e,t,n)=>e<<32-n|t>>>n,rT=(e,t,n)=>e<<64-n|t>>>n-32,iT=(e,t,n)=>e>>>n-32|t<<64-n,oT=(e,t)=>t,sT=(e,t)=>e,aT=(e,t,n)=>e<>>32-n,lT=(e,t,n)=>t<>>32-n,cT=(e,t,n)=>t<>>64-n,uT=(e,t,n)=>e<>>64-n;function fT(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}const dT=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),hT=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,pT=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),mT=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,gT=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),yT=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0,Ne={fromBig:K4,split:YA,toBig:QA,shrSH:JA,shrSL:eT,rotrSH:tT,rotrSL:nT,rotrBH:rT,rotrBL:iT,rotr32H:oT,rotr32L:sT,rotlSH:aT,rotlSL:lT,rotlBH:cT,rotlBL:uT,add:fT,add3L:dT,add3H:hT,add4L:pT,add4H:mT,add5H:yT,add5L:gT},[bT,vT]=Ne.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ao=new Uint32Array(80),To=new Uint32Array(80);let wT=class extends bb{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:n,Bh:r,Bl:i,Ch:o,Cl:s,Dh:a,Dl:l,Eh:u,El:d,Fh:c,Fl:f,Gh:m,Gl:p,Hh:h,Hl:y}=this;return[t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y]}set(t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=a|0,this.Dl=l|0,this.Eh=u|0,this.El=d|0,this.Fh=c|0,this.Fl=f|0,this.Gh=m|0,this.Gl=p|0,this.Hh=h|0,this.Hl=y|0}process(t,n){for(let v=0;v<16;v++,n+=4)Ao[v]=t.getUint32(n),To[v]=t.getUint32(n+=4);for(let v=16;v<80;v++){const w=Ao[v-15]|0,E=To[v-15]|0,C=Ne.rotrSH(w,E,1)^Ne.rotrSH(w,E,8)^Ne.shrSH(w,E,7),k=Ne.rotrSL(w,E,1)^Ne.rotrSL(w,E,8)^Ne.shrSL(w,E,7),_=Ao[v-2]|0,S=To[v-2]|0,A=Ne.rotrSH(_,S,19)^Ne.rotrBH(_,S,61)^Ne.shrSH(_,S,6),I=Ne.rotrSL(_,S,19)^Ne.rotrBL(_,S,61)^Ne.shrSL(_,S,6),L=Ne.add4L(k,I,To[v-7],To[v-16]),F=Ne.add4H(L,C,A,Ao[v-7],Ao[v-16]);Ao[v]=F|0,To[v]=L|0}let{Ah:r,Al:i,Bh:o,Bl:s,Ch:a,Cl:l,Dh:u,Dl:d,Eh:c,El:f,Fh:m,Fl:p,Gh:h,Gl:y,Hh:g,Hl:b}=this;for(let v=0;v<80;v++){const w=Ne.rotrSH(c,f,14)^Ne.rotrSH(c,f,18)^Ne.rotrBH(c,f,41),E=Ne.rotrSL(c,f,14)^Ne.rotrSL(c,f,18)^Ne.rotrBL(c,f,41),C=c&m^~c&h,k=f&p^~f&y,_=Ne.add5L(b,E,k,vT[v],To[v]),S=Ne.add5H(_,g,w,C,bT[v],Ao[v]),A=_|0,I=Ne.rotrSH(r,i,28)^Ne.rotrBH(r,i,34)^Ne.rotrBH(r,i,39),L=Ne.rotrSL(r,i,28)^Ne.rotrBL(r,i,34)^Ne.rotrBL(r,i,39),F=r&o^r&a^o&a,N=i&s^i&l^s&l;g=h|0,b=y|0,h=m|0,y=p|0,m=c|0,p=f|0,{h:c,l:f}=Ne.add(u|0,d|0,S|0,A|0),u=a|0,d=l|0,a=o|0,l=s|0,o=r|0,s=i|0;const R=Ne.add3L(A,L,N);r=Ne.add3H(R,S,I,F),i=R|0}({h:r,l:i}=Ne.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:s}=Ne.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:a,l}=Ne.add(this.Ch|0,this.Cl|0,a|0,l|0),{h:u,l:d}=Ne.add(this.Dh|0,this.Dl|0,u|0,d|0),{h:c,l:f}=Ne.add(this.Eh|0,this.El|0,c|0,f|0),{h:m,l:p}=Ne.add(this.Fh|0,this.Fl|0,m|0,p|0),{h,l:y}=Ne.add(this.Gh|0,this.Gl|0,h|0,y|0),{h:g,l:b}=Ne.add(this.Hh|0,this.Hl|0,g|0,b|0),this.set(r,i,o,s,a,l,u,d,c,f,m,p,h,y,g,b)}roundClean(){Ao.fill(0),To.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const ip=gb(()=>new wT);/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function op(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function vb(...e){const t=o=>o,n=(o,s)=>a=>o(s(a)),r=e.map(o=>o.encode).reduceRight(n,t),i=e.map(o=>o.decode).reduce(n,t);return{encode:r,decode:i}}function Z4(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})}}}function X4(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of t)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function _T(e,t="="){if(typeof t!="string")throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let r of n)if(typeof r!="string")throw new Error(`padding.encode: non-string input=${r}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let i of n)if(typeof i!="string")throw new Error(`padding.decode: non-string input=${i}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function l1(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let r=0;const i=[],o=Array.from(e);for(o.forEach(s=>{if(s<0||s>=t)throw new Error(`Wrong integer: ${s}`)});;){let s=0,a=!0;for(let l=r;lt?Y4(t,e%t):e,sp=(e,t)=>e+(t-Y4(e,t));function c1(e,t,n,r){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(sp(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${sp(t,n)}`);let i=0,o=0;const s=2**n-1,a=[];for(const l of e){if(l>=2**t)throw new Error(`convertRadix2: invalid data word=${l} from=${t}`);if(i=i<32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)a.push((i>>o-n&s)>>>0);i&=2**o-1}if(i=i<=t)throw new Error("Excess padding");if(!r&&i)throw new Error(`Non-zero padding: ${i}`);return r&&o>0&&a.push(i>>>0),a}function Q4(e){return{encode:t=>{if(!op(t))throw new Error("radix.encode input should be Uint8Array");return l1(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(l1(t,e,2**8))}}}function xT(e,t=!1){if(e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(sp(8,e)>32||sp(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!op(n))throw new Error("radix2.encode input should be Uint8Array");return c1(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&typeof n[0]!="number")throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(c1(n,e,8,t))}}}function J4(e,t){if(typeof t!="function")throw new Error("checksum fn should be function");return{encode(n){if(!op(n))throw new Error("checksum.encode: input should be Uint8Array");const r=t(n).slice(0,e),i=new Uint8Array(n.length+e);return i.set(n),i.set(r,n.length),i},decode(n){if(!op(n))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-e),i=t(r).slice(0,e),o=n.slice(-e);for(let s=0;svb(Q4(58),Z4(e),X4("")),ST=ET("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),ex=e=>vb(J4(4,t=>e(e(t))),ST);/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const kT=e=>e[0]==="あいこくしん";function tx(e){if(typeof e!="string")throw new TypeError(`Invalid mnemonic type: ${typeof e}`);return e.normalize("NFKD")}function nx(e){const t=tx(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}function CT(e){Fr(e,16,20,24,28,32)}function AT(e,t=128){if(_l(t),t%32!==0||t>256)throw new TypeError("Invalid entropy");return $T(yb(t/8),e)}const TT=e=>{const t=8-e.length/4;return new Uint8Array([ra(e)[0]>>t<{if(typeof t!="string")throw new Error(`Wordlist: non-string element: ${t}`)}),jd.chain(jd.checksum(1,TT),jd.radix2(11,!0),jd.alphabet(e))}function $T(e,t){return CT(e),IT(t).encode(e).join(kT(t)?" ":" ")}const rx=e=>tx(`mnemonic${e}`);function bm(e,t=""){return VA(ip,nx(e).nfkd,rx(t),{c:2048,dkLen:64})}function PT(e,t=""){return WA(ip,nx(e).nfkd,rx(t),{c:2048,dkLen:64})}const OT=`abandon ability able about @@ -2113,21 +2113,21 @@ zebra zero zone zoo`.split(` -`),RT=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),ix=new Uint8Array(new Array(16).fill(0).map((e,t)=>t)),LT=ix.map(e=>(9*e+5)%16);let vb=[ix],wb=[LT];for(let e=0;e<4;e++)for(let t of[vb,wb])t.push(t[e].map(n=>RT[n]));const ox=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),BT=vb.map((e,t)=>e.map(n=>ox[t][n])),NT=wb.map((e,t)=>e.map(n=>ox[t][n])),MT=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),jT=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]);function k2(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}const Dd=new Uint32Array(16);let DT=class extends yb{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:t,h1:n,h2:r,h3:i,h4:o}=this;return[t,n,r,i,o]}set(t,n,r,i,o){this.h0=t|0,this.h1=n|0,this.h2=r|0,this.h3=i|0,this.h4=o|0}process(t,n){for(let m=0;m<16;m++,n+=4)Dd[m]=t.getUint32(n,!0);let r=this.h0|0,i=r,o=this.h1|0,s=o,a=this.h2|0,l=a,u=this.h3|0,d=u,c=this.h4|0,f=c;for(let m=0;m<5;m++){const p=4-m,h=MT[m],y=jT[m],g=vb[m],b=wb[m],v=BT[m],w=NT[m];for(let E=0;E<16;E++){const C=Nd(r+k2(m,o,a,u)+Dd[g[E]]+h,v[E])+c|0;r=c,c=u,u=Nd(a,10)|0,a=o,o=C}for(let E=0;E<16;E++){const C=Nd(i+k2(p,s,l,d)+Dd[b[E]]+y,w[E])+f|0;i=f,f=d,d=Nd(l,10)|0,l=s,s=C}}this.set(this.h1+a+d|0,this.h2+u+f|0,this.h3+c+i|0,this.h4+r+s|0,this.h0+o+l|0)}roundClean(){Dd.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}};const FT=mb(()=>new DT);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _b=BigInt(0),Jp=BigInt(1),UT=BigInt(2);function ga(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Yf(e){if(!ga(e))throw new Error("Uint8Array expected")}function Nl(e,t){if(typeof t!="boolean")throw new Error(`${e} must be valid boolean, got "${t}".`)}const HT=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ml(e){Yf(e);let t="";for(let n=0;n=Mi._0&&e<=Mi._9)return e-Mi._0;if(e>=Mi._A&&e<=Mi._F)return e-(Mi._A-10);if(e>=Mi._a&&e<=Mi._f)return e-(Mi._a-10)}function jl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;itypeof e=="bigint"&&_b<=e;function e0(e,t,n){return vm(e)&&vm(t)&&vm(n)&&t<=e&&e_b;e>>=Jp,t+=1);return t}function qT(e,t){return e>>BigInt(t)&Jp}function GT(e,t,n){return e|(n?Jp:_b)<(UT<new Uint8Array(e),A2=e=>Uint8Array.from(e);function ax(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=wm(e),i=wm(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=(...c)=>n(i,r,...c),l=(c=wm())=>{i=a(A2([0]),c),r=a(),c.length!==0&&(i=a(A2([1]),c),r=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let c=0;const f=[];for(;c{s(),l(c);let m;for(;!(m=f(u()));)l();return s(),m}}const KT={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||ga(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Qf(e,t,n={}){const r=(i,o,s)=>{const a=KT[o];if(typeof a!="function")throw new Error(`Invalid validator "${o}", expected function`);const l=e[i];if(!(s&&l===void 0)&&!a(l,e))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(n))r(i,o,!0);return e}const ZT=()=>{throw new Error("not implemented")};function u1(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(i!==void 0)return i;const o=e(n,...r);return t.set(n,o),o}}const XT=Object.freeze(Object.defineProperty({__proto__:null,aInRange:oa,abool:Nl,abytes:Yf,bitGet:qT,bitLen:sx,bitMask:kb,bitSet:GT,bytesToHex:Ml,bytesToNumberBE:ia,bytesToNumberLE:Eb,concatBytes:uf,createHmacDrbg:ax,ensureBytes:Br,equalBytes:WT,hexToBytes:jl,hexToNumber:xb,inRange:e0,isBytes:ga,memoized:u1,notImplemented:ZT,numberToBytesBE:Dl,numberToBytesLE:Sb,numberToHexUnpadded:cl,numberToVarBytesBE:zT,utf8ToBytes:VT,validateObject:Qf},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const tn=BigInt(0),$t=BigInt(1),zs=BigInt(2),YT=BigInt(3),f1=BigInt(4),T2=BigInt(5),I2=BigInt(8);BigInt(9);BigInt(16);function Tn(e,t){const n=e%t;return n>=tn?n:t+n}function QT(e,t,n){if(n<=tn||t 0");if(n===$t)return tn;let r=$t;for(;t>tn;)t&$t&&(r=r*e%n),e=e*e%n,t>>=$t;return r}function hr(e,t,n){let r=e;for(;t-- >tn;)r*=r,r%=n;return r}function d1(e,t){if(e===tn||t<=tn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=Tn(e,t),r=t,i=tn,o=$t;for(;n!==tn;){const a=r/n,l=r%n,u=i-o*a;r=n,n=l,i=o,o=u}if(r!==$t)throw new Error("invert: does not exist");return Tn(i,t)}function JT(e){const t=(e-$t)/zs;let n,r,i;for(n=e-$t,r=0;n%zs===tn;n/=zs,r++);for(i=zs;i(r[i]="function",r),t);return Qf(e,n)}function rI(e,t,n){if(n 0");if(n===tn)return e.ONE;if(n===$t)return t;let r=e.ONE,i=t;for(;n>tn;)n&$t&&(r=e.mul(r,i)),i=e.sqr(i),n>>=$t;return r}function iI(e,t){const n=new Array(t.length),r=t.reduce((o,s,a)=>e.is0(s)?o:(n[a]=o,e.mul(o,s)),e.ONE),i=e.inv(r);return t.reduceRight((o,s,a)=>e.is0(s)?o:(n[a]=e.mul(o,n[a]),e.mul(o,s)),i),n}function lx(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function cx(e,t,n=!1,r={}){if(e<=tn)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=lx(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=eI(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:kb(i),ZERO:tn,ONE:$t,create:l=>Tn(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return tn<=l&&ll===tn,isOdd:l=>(l&$t)===$t,neg:l=>Tn(-l,e),eql:(l,u)=>l===u,sqr:l=>Tn(l*l,e),add:(l,u)=>Tn(l+u,e),sub:(l,u)=>Tn(l-u,e),mul:(l,u)=>Tn(l*u,e),pow:(l,u)=>rI(a,l,u),div:(l,u)=>Tn(l*d1(u,e),e),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>d1(l,e),sqrt:r.sqrt||(l=>s(a,l)),invertBatch:l=>iI(a,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>n?Sb(l,o):Dl(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return n?Eb(l):ia(l)}});return Object.freeze(a)}function ux(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function fx(e){const t=ux(e);return t+Math.ceil(t/2)}function oI(e,t,n=!1){const r=e.length,i=ux(t),o=fx(t);if(r<16||r1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const s=n?ia(e):Eb(e),a=Tn(s,t-$t)+$t;return n?Sb(a,i):Dl(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const sI=BigInt(0),_m=BigInt(1),xm=new WeakMap,$2=new WeakMap;function aI(e,t){const n=(o,s)=>{const a=s.negate();return o?a:s},r=o=>{if(!Number.isSafeInteger(o)||o<=0||o>t)throw new Error(`Wrong window size=${o}, should be [1..${t}]`)},i=o=>{r(o);const s=Math.ceil(t/o)+1,a=2**(o-1);return{windows:s,windowSize:a}};return{constTimeNegate:n,unsafeLadder(o,s){let a=e.ZERO,l=o;for(;s>sI;)s&_m&&(a=a.add(l)),l=l.double(),s>>=_m;return a},precomputeWindow(o,s){const{windows:a,windowSize:l}=i(s),u=[];let d=o,c=d;for(let f=0;f>=p,g>u&&(g-=m,a+=_m);const b=y,v=y+Math.abs(g)-1,w=h%2!==0,E=g<0;g===0?c=c.add(n(w,s[b])):d=d.add(n(E,s[v]))}return{p:d,f:c}},wNAFCached(o,s,a){const l=$2.get(o)||1;let u=xm.get(o);return u||(u=this.precomputeWindow(o,l),l!==1&&xm.set(o,a(u))),this.wNAF(l,u,s)},setWindowSize(o,s){r(s),$2.set(o,s),xm.delete(o)}}}function lI(e,t,n,r){if(!Array.isArray(n)||!Array.isArray(r)||r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");r.forEach((d,c)=>{if(!t.isValid(d))throw new Error(`wrong scalar at index ${c}`)}),n.forEach((d,c)=>{if(!(d instanceof e))throw new Error(`wrong point at index ${c}`)});const i=sx(BigInt(n.length)),o=i>12?i-3:i>4?i-2:i?2:1,s=(1<=0;d-=o){a.fill(e.ZERO);for(let f=0;f>BigInt(d)&BigInt(s));a[p]=a[p].add(n[f])}let c=e.ZERO;for(let f=a.length-1,m=e.ZERO;f>0;f--)m=m.add(a[f]),c=c.add(m);if(u=u.add(c),d!==0)for(let f=0;f{const{Err:n}=Wi;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,i=cl(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const o=r>127?cl(i.length/2|128):"";return`${cl(e)}${o}${i}${t}`},decode(e,t){const{Err:n}=Wi;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const i=t[r++],o=!!(i&128);let s=0;if(!o)s=i;else{const l=i&127;if(!l)throw new n("tlv.decode(long): indefinite length not supported");if(l>4)throw new n("tlv.decode(long): byte length is too big");const u=t.subarray(r,r+l);if(u.length!==l)throw new n("tlv.decode: length bytes not complete");if(u[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const d of u)s=s<<8|d;if(r+=l,s<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+s);if(a.length!==s)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+s)}}},_int:{encode(e){const{Err:t}=Wi;if(e{const b=y.toAffine();return uf(Uint8Array.from([4]),n.toBytes(b.x),n.toBytes(b.y))}),o=t.fromBytes||(h=>{const y=h.subarray(1),g=n.fromBytes(y.subarray(0,n.BYTES)),b=n.fromBytes(y.subarray(n.BYTES,2*n.BYTES));return{x:g,y:b}});function s(h){const{a:y,b:g}=t,b=n.sqr(h),v=n.mul(b,h);return n.add(n.add(v,n.mul(h,y)),g)}if(!n.eql(n.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function a(h){return e0(h,Jt,t.n)}function l(h){const{allowedPrivateKeyLengths:y,nByteLength:g,wrapPrivateKey:b,n:v}=t;if(y&&typeof h!="bigint"){if(ga(h)&&(h=Ml(h)),typeof h!="string"||!y.includes(h.length))throw new Error("Invalid key");h=h.padStart(g*2,"0")}let w;try{w=typeof h=="bigint"?h:ia(Br("private key",h,g))}catch{throw new Error(`private key must be ${g} bytes, hex or bigint, not ${typeof h}`)}return b&&(w=Tn(w,v)),oa("private key",w,Jt,v),w}function u(h){if(!(h instanceof f))throw new Error("ProjectivePoint expected")}const d=u1((h,y)=>{const{px:g,py:b,pz:v}=h;if(n.eql(v,n.ONE))return{x:g,y:b};const w=h.is0();y==null&&(y=w?n.ONE:n.inv(v));const E=n.mul(g,y),C=n.mul(b,y),k=n.mul(v,y);if(w)return{x:n.ZERO,y:n.ZERO};if(!n.eql(k,n.ONE))throw new Error("invZ was invalid");return{x:E,y:C}}),c=u1(h=>{if(h.is0()){if(t.allowInfinityPoint&&!n.is0(h.py))return;throw new Error("bad point: ZERO")}const{x:y,y:g}=h.toAffine();if(!n.isValid(y)||!n.isValid(g))throw new Error("bad point: x or y not FE");const b=n.sqr(g),v=s(y);if(!n.eql(b,v))throw new Error("bad point: equation left != right");if(!h.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class f{constructor(y,g,b){if(this.px=y,this.py=g,this.pz=b,y==null||!n.isValid(y))throw new Error("x required");if(g==null||!n.isValid(g))throw new Error("y required");if(b==null||!n.isValid(b))throw new Error("z required");Object.freeze(this)}static fromAffine(y){const{x:g,y:b}=y||{};if(!y||!n.isValid(g)||!n.isValid(b))throw new Error("invalid affine point");if(y instanceof f)throw new Error("projective point not allowed");const v=w=>n.eql(w,n.ZERO);return v(g)&&v(b)?f.ZERO:new f(g,b,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){const g=n.invertBatch(y.map(b=>b.pz));return y.map((b,v)=>b.toAffine(g[v])).map(f.fromAffine)}static fromHex(y){const g=f.fromAffine(o(Br("pointHex",y)));return g.assertValidity(),g}static fromPrivateKey(y){return f.BASE.multiply(l(y))}static msm(y,g){return lI(f,r,y,g)}_setWindowSize(y){p.setWindowSize(this,y)}assertValidity(){c(this)}hasEvenY(){const{y}=this.toAffine();if(n.isOdd)return!n.isOdd(y);throw new Error("Field doesn't support isOdd")}equals(y){u(y);const{px:g,py:b,pz:v}=this,{px:w,py:E,pz:C}=y,k=n.eql(n.mul(g,C),n.mul(w,v)),_=n.eql(n.mul(b,C),n.mul(E,v));return k&&_}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:y,b:g}=t,b=n.mul(g,O2),{px:v,py:w,pz:E}=this;let C=n.ZERO,k=n.ZERO,_=n.ZERO,S=n.mul(v,v),A=n.mul(w,w),I=n.mul(E,E),L=n.mul(v,w);return L=n.add(L,L),_=n.mul(v,E),_=n.add(_,_),C=n.mul(y,_),k=n.mul(b,I),k=n.add(C,k),C=n.sub(A,k),k=n.add(A,k),k=n.mul(C,k),C=n.mul(L,C),_=n.mul(b,_),I=n.mul(y,I),L=n.sub(S,I),L=n.mul(y,L),L=n.add(L,_),_=n.add(S,S),S=n.add(_,S),S=n.add(S,I),S=n.mul(S,L),k=n.add(k,S),I=n.mul(w,E),I=n.add(I,I),S=n.mul(I,L),C=n.sub(C,S),_=n.mul(I,A),_=n.add(_,_),_=n.add(_,_),new f(C,k,_)}add(y){u(y);const{px:g,py:b,pz:v}=this,{px:w,py:E,pz:C}=y;let k=n.ZERO,_=n.ZERO,S=n.ZERO;const A=t.a,I=n.mul(t.b,O2);let L=n.mul(g,w),F=n.mul(b,E),N=n.mul(v,C),R=n.add(g,b),B=n.add(w,E);R=n.mul(R,B),B=n.add(L,F),R=n.sub(R,B),B=n.add(g,v);let V=n.add(w,C);return B=n.mul(B,V),V=n.add(L,N),B=n.sub(B,V),V=n.add(b,v),k=n.add(E,C),V=n.mul(V,k),k=n.add(F,N),V=n.sub(V,k),S=n.mul(A,B),k=n.mul(I,N),S=n.add(k,S),k=n.sub(F,S),S=n.add(F,S),_=n.mul(k,S),F=n.add(L,L),F=n.add(F,L),N=n.mul(A,N),B=n.mul(I,B),F=n.add(F,N),N=n.sub(L,N),N=n.mul(A,N),B=n.add(B,N),L=n.mul(F,B),_=n.add(_,L),L=n.mul(V,B),k=n.mul(R,k),k=n.sub(k,L),L=n.mul(R,F),S=n.mul(V,S),S=n.add(S,L),new f(k,_,S)}subtract(y){return this.add(y.negate())}is0(){return this.equals(f.ZERO)}wNAF(y){return p.wNAFCached(this,y,f.normalizeZ)}multiplyUnsafe(y){oa("scalar",y,Vi,t.n);const g=f.ZERO;if(y===Vi)return g;if(y===Jt)return this;const{endo:b}=t;if(!b)return p.unsafeLadder(this,y);let{k1neg:v,k1:w,k2neg:E,k2:C}=b.splitScalar(y),k=g,_=g,S=this;for(;w>Vi||C>Vi;)w&Jt&&(k=k.add(S)),C&Jt&&(_=_.add(S)),S=S.double(),w>>=Jt,C>>=Jt;return v&&(k=k.negate()),E&&(_=_.negate()),_=new f(n.mul(_.px,b.beta),_.py,_.pz),k.add(_)}multiply(y){const{endo:g,n:b}=t;oa("scalar",y,Jt,b);let v,w;if(g){const{k1neg:E,k1:C,k2neg:k,k2:_}=g.splitScalar(y);let{p:S,f:A}=this.wNAF(C),{p:I,f:L}=this.wNAF(_);S=p.constTimeNegate(E,S),I=p.constTimeNegate(k,I),I=new f(n.mul(I.px,g.beta),I.py,I.pz),v=S.add(I),w=A.add(L)}else{const{p:E,f:C}=this.wNAF(y);v=E,w=C}return f.normalizeZ([v,w])[0]}multiplyAndAddUnsafe(y,g,b){const v=f.BASE,w=(C,k)=>k===Vi||k===Jt||!C.equals(v)?C.multiplyUnsafe(k):C.multiply(k),E=w(this,g).add(w(y,b));return E.is0()?void 0:E}toAffine(y){return d(this,y)}isTorsionFree(){const{h:y,isTorsionFree:g}=t;if(y===Jt)return!0;if(g)return g(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:y,clearCofactor:g}=t;return y===Jt?this:g?g(f,this):this.multiplyUnsafe(t.h)}toRawBytes(y=!0){return Nl("isCompressed",y),this.assertValidity(),i(f,this,y)}toHex(y=!0){return Nl("isCompressed",y),Ml(this.toRawBytes(y))}}f.BASE=new f(t.Gx,t.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const m=t.nBitLength,p=aI(f,t.endo?Math.ceil(m/2):m);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:a}}function hI(e){const t=dx(e);return Qf(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function pI(e){const t=hI(e),{Fp:n,n:r}=t,i=n.BYTES+1,o=2*n.BYTES+1;function s(N){return Tn(N,r)}function a(N){return d1(N,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:c}=dI({...t,toBytes(N,R,B){const V=R.toAffine(),j=n.toBytes(V.x),W=uf;return Nl("isCompressed",B),B?W(Uint8Array.from([R.hasEvenY()?2:3]),j):W(Uint8Array.from([4]),j,n.toBytes(V.y))},fromBytes(N){const R=N.length,B=N[0],V=N.subarray(1);if(R===i&&(B===2||B===3)){const j=ia(V);if(!e0(j,Jt,n.ORDER))throw new Error("Point is not on curve");const W=d(j);let Y;try{Y=n.sqrt(W)}catch(Z){const pe=Z instanceof Error?": "+Z.message:"";throw new Error("Point is not on curve"+pe)}const te=(Y&Jt)===Jt;return(B&1)===1!==te&&(Y=n.neg(Y)),{x:j,y:Y}}else if(R===o&&B===4){const j=n.fromBytes(V.subarray(0,n.BYTES)),W=n.fromBytes(V.subarray(n.BYTES,2*n.BYTES));return{x:j,y:W}}else throw new Error(`Point of length ${R} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}}),f=N=>Ml(Dl(N,t.nByteLength));function m(N){const R=r>>Jt;return N>R}function p(N){return m(N)?s(-N):N}const h=(N,R,B)=>ia(N.slice(R,B));class y{constructor(R,B,V){this.r=R,this.s=B,this.recovery=V,this.assertValidity()}static fromCompact(R){const B=t.nByteLength;return R=Br("compactSignature",R,B*2),new y(h(R,0,B),h(R,B,2*B))}static fromDER(R){const{r:B,s:V}=Wi.toSig(Br("DER",R));return new y(B,V)}assertValidity(){oa("r",this.r,Jt,r),oa("s",this.s,Jt,r)}addRecoveryBit(R){return new y(this.r,this.s,R)}recoverPublicKey(R){const{r:B,s:V,recovery:j}=this,W=C(Br("msgHash",R));if(j==null||![0,1,2,3].includes(j))throw new Error("recovery id invalid");const Y=j===2||j===3?B+t.n:B;if(Y>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const te=j&1?"03":"02",ae=l.fromHex(te+f(Y)),Z=a(Y),pe=s(-W*Z),Ie=s(V*Z),_e=l.BASE.multiplyAndAddUnsafe(ae,pe,Ie);if(!_e)throw new Error("point at infinify");return _e.assertValidity(),_e}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return jl(this.toDERHex())}toDERHex(){return Wi.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return jl(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const g={isValidPrivateKey(N){try{return u(N),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const N=fx(t.n);return oI(t.randomBytes(N),t.n)},precompute(N=8,R=l.BASE){return R._setWindowSize(N),R.multiply(BigInt(3)),R}};function b(N,R=!0){return l.fromPrivateKey(N).toRawBytes(R)}function v(N){const R=ga(N),B=typeof N=="string",V=(R||B)&&N.length;return R?V===i||V===o:B?V===2*i||V===2*o:N instanceof l}function w(N,R,B=!0){if(v(N))throw new Error("first arg must be private key");if(!v(R))throw new Error("second arg must be public key");return l.fromHex(R).multiply(u(N)).toRawBytes(B)}const E=t.bits2int||function(N){const R=ia(N),B=N.length*8-t.nBitLength;return B>0?R>>BigInt(B):R},C=t.bits2int_modN||function(N){return s(E(N))},k=kb(t.nBitLength);function _(N){return oa(`num < 2^${t.nBitLength}`,N,Vi,k),Dl(N,t.nByteLength)}function S(N,R,B=A){if(["recovered","canonical"].some(le=>le in B))throw new Error("sign() legacy options not supported");const{hash:V,randomBytes:j}=t;let{lowS:W,prehash:Y,extraEntropy:te}=B;W==null&&(W=!0),N=Br("msgHash",N),P2(B),Y&&(N=Br("prehashed msgHash",V(N)));const ae=C(N),Z=u(R),pe=[_(Z),_(ae)];if(te!=null&&te!==!1){const le=te===!0?j(n.BYTES):te;pe.push(Br("extraEntropy",le))}const Ie=uf(...pe),_e=ae;function Ce(le){const $e=E(le);if(!c($e))return;const rt=a($e),je=l.BASE.multiply($e).toAffine(),nt=s(je.x);if(nt===Vi)return;const Le=s(rt*s(_e+nt*Z));if(Le===Vi)return;let _t=(je.x===nt?0:2)|Number(je.y&Jt),Kn=Le;return W&&m(Le)&&(Kn=p(Le),_t^=1),new y(nt,Kn,_t)}return{seed:Ie,k2sig:Ce}}const A={lowS:t.lowS,prehash:!1},I={lowS:t.lowS,prehash:!1};function L(N,R,B=A){const{seed:V,k2sig:j}=S(N,R,B),W=t;return ax(W.hash.outputLen,W.nByteLength,W.hmac)(V,j)}l.BASE._setWindowSize(8);function F(N,R,B,V=I){var je;const j=N;if(R=Br("msgHash",R),B=Br("publicKey",B),"strict"in V)throw new Error("options.strict was renamed to lowS");P2(V);const{lowS:W,prehash:Y}=V;let te,ae;try{if(typeof j=="string"||ga(j))try{te=y.fromDER(j)}catch(nt){if(!(nt instanceof Wi.Err))throw nt;te=y.fromCompact(j)}else if(typeof j=="object"&&typeof j.r=="bigint"&&typeof j.s=="bigint"){const{r:nt,s:Le}=j;te=new y(nt,Le)}else throw new Error("PARSE");ae=l.fromHex(B)}catch(nt){if(nt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(W&&te.hasHighS())return!1;Y&&(R=t.hash(R));const{r:Z,s:pe}=te,Ie=C(R),_e=a(pe),Ce=s(Ie*_e),le=s(Z*_e),$e=(je=l.BASE.multiplyAndAddUnsafe(ae,Ce,le))==null?void 0:je.toAffine();return $e?s($e.x)===Z:!1}return{CURVE:t,getPublicKey:b,getSharedSecret:w,sign:L,verify:F,ProjectivePoint:l,Signature:y,utils:g}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mI(e){return{hash:e,hmac:(t,...n)=>cf(e,t,yu(...n)),randomBytes:gb}}function gI(e,t){const n=r=>pI({...e,...mI(r)});return Object.freeze({...n(t),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hx=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),R2=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),yI=BigInt(1),h1=BigInt(2),L2=(e,t)=>(e+t/h1)/t;function bI(e){const t=hx,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),l=BigInt(88),u=e*e*e%t,d=u*u*e%t,c=hr(d,n,t)*d%t,f=hr(c,n,t)*d%t,m=hr(f,h1,t)*u%t,p=hr(m,i,t)*m%t,h=hr(p,o,t)*p%t,y=hr(h,a,t)*h%t,g=hr(y,l,t)*y%t,b=hr(g,a,t)*h%t,v=hr(b,n,t)*d%t,w=hr(v,s,t)*p%t,E=hr(w,r,t)*u%t,C=hr(E,h1,t);if(!p1.eql(p1.sqr(C),e))throw new Error("Cannot find square root");return C}const p1=cx(hx,void 0,void 0,{sqrt:bI}),li=gI({a:BigInt(0),b:BigInt(7),Fp:p1,n:R2,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=R2,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-yI*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=L2(o*e,t),l=L2(-r*e,t);let u=Tn(e-a*n-l*i,t),d=Tn(-a*r-l*o,t);const c=u>s,f=d>s;if(c&&(u=t-u),f&&(d=t-d),u>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:c,k1:u,k2neg:f,k2:d}}}},ra);BigInt(0);li.ProjectivePoint;/*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const Fd=li.ProjectivePoint,Em=ex(ra);function B2(e){return BigInt(`0x${nr(e)}`)}function vI(e){return Hs(e.toString(16).padStart(64,"0"))}const wI=pb("Bitcoin seed"),Sm={private:76066276,public:76067358},km=2147483648,_I=e=>FT(ra(e)),xI=e=>ns(e).getUint32(0,!1),Ud=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error(`Invalid number=${e}. Should be from 0 to 2 ** 32 - 1`);const t=new Uint8Array(4);return ns(t).setUint32(0,e,!1),t};let iu=class qa{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return xI(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const t=this.privateKey;if(!t)throw new Error("No private key");return Em.encode(this.serialize(this.versions.private,yu(new Uint8Array([0]),t)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return Em.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(t,n=Sm){if(Fr(t),8*t.length<128||8*t.length>512)throw new Error(`HDKey: wrong seed length=${t.length}. Should be between 128 and 512 bits; 256 bits is advised)`);const r=cf(ip,wI,t);return new qa({versions:n,chainCode:r.slice(32),privateKey:r.slice(0,32)})}static fromExtendedKey(t,n=Sm){const r=Em.decode(t),i=ns(r),o=i.getUint32(0,!1),s={versions:n,depth:r[4],parentFingerprint:i.getUint32(5,!1),index:i.getUint32(9,!1),chainCode:r.slice(13,45)},a=r.slice(45),l=a[0]===0;if(o!==n[l?"private":"public"])throw new Error("Version mismatch");return l?new qa({...s,privateKey:a.slice(1)}):new qa({...s,publicKey:a})}static fromJSON(t){return qa.fromExtendedKey(t.xpriv)}constructor(t){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!t||typeof t!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=t.versions||Sm,this.depth=t.depth||0,this.chainCode=t.chainCode||null,this.index=t.index||0,this.parentFingerprint=t.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(t.publicKey&&t.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(t.privateKey){if(!li.utils.isValidPrivateKey(t.privateKey))throw new Error("Invalid private key");this.privKey=typeof t.privateKey=="bigint"?t.privateKey:B2(t.privateKey),this.privKeyBytes=vI(this.privKey),this.pubKey=li.getPublicKey(t.privateKey,!0)}else if(t.publicKey)this.pubKey=Fd.fromHex(t.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=_I(this.pubKey)}derive(t){if(!/^[mM]'?/.test(t))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(t))return this;const n=t.replace(/^[mM]'?\//,"").split("/");let r=this;for(const i of n){const o=/^(\d+)('?)$/.exec(i),s=o&&o[1];if(!o||o.length!==3||typeof s!="string")throw new Error(`Invalid child index: ${i}`);let a=+s;if(!Number.isSafeInteger(a)||a>=km)throw new Error("Invalid index");o[2]==="'"&&(a+=km),r=r.deriveChild(a)}return r}deriveChild(t){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=Ud(t);if(t>=km){const a=this.privateKey;if(!a)throw new Error("Could not derive hardened child key");n=yu(new Uint8Array([0]),a,n)}else n=yu(this.pubKey,n);const r=cf(ip,this.chainCode,n),i=B2(r.slice(0,32)),o=r.slice(32);if(!li.utils.isValidPrivateKey(i))throw new Error("Tweak bigger than curve order");const s={versions:this.versions,chainCode:o,depth:this.depth+1,parentFingerprint:this.fingerprint,index:t};try{if(this.privateKey){const a=Tn(this.privKey+i,li.CURVE.n);if(!li.utils.isValidPrivateKey(a))throw new Error("The tweak was out of range or the resulted private key is invalid");s.privateKey=a}else{const a=Fd.fromHex(this.pubKey).add(Fd.fromPrivateKey(i));if(a.equals(Fd.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");s.publicKey=a.toRawBytes(!0)}return new qa(s)}catch{return this.deriveChild(t+1)}}sign(t){if(!this.privateKey)throw new Error("No privateKey set!");return Fr(t,32),li.sign(t,this.privKey).toCompactRawBytes()}verify(t,n){if(Fr(t,32),Fr(n,64),!this.publicKey)throw new Error("No publicKey set!");let r;try{r=li.Signature.fromCompact(n)}catch{return!1}return li.verify(r,t,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(t,n){if(!this.chainCode)throw new Error("No chainCode set");return Fr(n,33),yu(Ud(t),new Uint8Array([this.depth]),Ud(this.parentFingerprint),Ud(this.index),this.chainCode,n)}};const EI=e=>{if(e.length===0)throw new Error("Array cannot be empty");const t=Math.floor(Math.random()*e.length);return e[t]};function px(e,t){return function(){return e.apply(t,arguments)}}const{toString:SI}=Object.prototype,{getPrototypeOf:Cb}=Object,t0=(e=>t=>{const n=SI.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gr=e=>(e=e.toLowerCase(),t=>t0(t)===e),n0=e=>t=>typeof t===e,{isArray:ac}=Array,ff=n0("undefined");function kI(e){return e!==null&&!ff(e)&&e.constructor!==null&&!ff(e.constructor)&&or(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mx=Gr("ArrayBuffer");function CI(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mx(e.buffer),t}const AI=n0("string"),or=n0("function"),gx=n0("number"),r0=e=>e!==null&&typeof e=="object",TI=e=>e===!0||e===!1,bh=e=>{if(t0(e)!=="object")return!1;const t=Cb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},II=Gr("Date"),$I=Gr("File"),PI=Gr("Blob"),OI=Gr("FileList"),RI=e=>r0(e)&&or(e.pipe),LI=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||or(e.append)&&((t=t0(e))==="formdata"||t==="object"&&or(e.toString)&&e.toString()==="[object FormData]"))},BI=Gr("URLSearchParams"),[NI,MI,jI,DI]=["ReadableStream","Request","Response","Headers"].map(Gr),FI=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ac(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Xs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bx=e=>!ff(e)&&e!==Xs;function m1(){const{caseless:e}=bx(this)&&this||{},t={},n=(r,i)=>{const o=e&&yx(t,i)||i;bh(t[o])&&bh(r)?t[o]=m1(t[o],r):bh(r)?t[o]=m1({},r):ac(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Jf(t,(i,o)=>{n&&or(i)?e[o]=px(i,n):e[o]=i},{allOwnKeys:r}),e),HI=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zI=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},WI=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Cb(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},VI=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},qI=e=>{if(!e)return null;if(ac(e))return e;let t=e.length;if(!gx(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},GI=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Cb(Uint8Array)),KI=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},ZI=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},XI=Gr("HTMLFormElement"),YI=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),N2=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),QI=Gr("RegExp"),vx=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jf(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},JI=e=>{vx(e,(t,n)=>{if(or(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(or(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},e$=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ac(e)?r(e):r(String(e).split(t)),n},t$=()=>{},n$=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Cm="abcdefghijklmnopqrstuvwxyz",M2="0123456789",wx={DIGIT:M2,ALPHA:Cm,ALPHA_DIGIT:Cm+Cm.toUpperCase()+M2},r$=(e=16,t=wx.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function i$(e){return!!(e&&or(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const o$=e=>{const t=new Array(10),n=(r,i)=>{if(r0(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=ac(r)?[]:{};return Jf(r,(s,a)=>{const l=n(s,i+1);!ff(l)&&(o[a]=l)}),t[i]=void 0,o}}return r};return n(e,0)},s$=Gr("AsyncFunction"),a$=e=>e&&(r0(e)||or(e))&&or(e.then)&&or(e.catch),_x=((e,t)=>e?setImmediate:t?((n,r)=>(Xs.addEventListener("message",({source:i,data:o})=>{i===Xs&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Xs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",or(Xs.postMessage)),l$=typeof queueMicrotask<"u"?queueMicrotask.bind(Xs):typeof process<"u"&&process.nextTick||_x,q={isArray:ac,isArrayBuffer:mx,isBuffer:kI,isFormData:LI,isArrayBufferView:CI,isString:AI,isNumber:gx,isBoolean:TI,isObject:r0,isPlainObject:bh,isReadableStream:NI,isRequest:MI,isResponse:jI,isHeaders:DI,isUndefined:ff,isDate:II,isFile:$I,isBlob:PI,isRegExp:QI,isFunction:or,isStream:RI,isURLSearchParams:BI,isTypedArray:GI,isFileList:OI,forEach:Jf,merge:m1,extend:UI,trim:FI,stripBOM:HI,inherits:zI,toFlatObject:WI,kindOf:t0,kindOfTest:Gr,endsWith:VI,toArray:qI,forEachEntry:KI,matchAll:ZI,isHTMLForm:XI,hasOwnProperty:N2,hasOwnProp:N2,reduceDescriptors:vx,freezeMethods:JI,toObjectSet:e$,toCamelCase:YI,noop:t$,toFiniteNumber:n$,findKey:yx,global:Xs,isContextDefined:bx,ALPHABET:wx,generateString:r$,isSpecCompliantForm:i$,toJSONObject:o$,isAsyncFn:s$,isThenable:a$,setImmediate:_x,asap:l$};function Oe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}q.inherits(Oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const xx=Oe.prototype,Ex={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ex[e]={value:e}});Object.defineProperties(Oe,Ex);Object.defineProperty(xx,"isAxiosError",{value:!0});Oe.from=(e,t,n,r,i,o)=>{const s=Object.create(xx);return q.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Oe.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const c$=null;function g1(e){return q.isPlainObject(e)||q.isArray(e)}function Sx(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function j2(e,t,n){return e?e.concat(t).map(function(i,o){return i=Sx(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function u$(e){return q.isArray(e)&&!e.some(g1)}const f$=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function i0(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!q.isUndefined(y[h])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(q.isDate(p))return p.toISOString();if(!l&&q.isBlob(p))throw new Oe("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(p)||q.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,h,y){let g=p;if(p&&!y&&typeof p=="object"){if(q.endsWith(h,"{}"))h=r?h:h.slice(0,-2),p=JSON.stringify(p);else if(q.isArray(p)&&u$(p)||(q.isFileList(p)||q.endsWith(h,"[]"))&&(g=q.toArray(p)))return h=Sx(h),g.forEach(function(v,w){!(q.isUndefined(v)||v===null)&&t.append(s===!0?j2([h],w,o):s===null?h:h+"[]",u(v))}),!1}return g1(p)?!0:(t.append(j2(y,h,o),u(p)),!1)}const c=[],f=Object.assign(f$,{defaultVisitor:d,convertValue:u,isVisitable:g1});function m(p,h){if(!q.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));c.push(p),q.forEach(p,function(g,b){(!(q.isUndefined(g)||g===null)&&i.call(t,g,q.isString(b)?b.trim():b,h,f))===!0&&m(g,h?h.concat(b):[b])}),c.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return m(e),t}function D2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ab(e,t){this._pairs=[],e&&i0(e,this,t)}const kx=Ab.prototype;kx.append=function(t,n){this._pairs.push([t,n])};kx.toString=function(t){const n=t?function(r){return t.call(this,r,D2)}:D2;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function d$(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cx(e,t,n){if(!t)return e;const r=n&&n.encode||d$,i=n&&n.serialize;let o;if(i?o=i(t,n):o=q.isURLSearchParams(t)?t.toString():new Ab(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class F2{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ax={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},h$=typeof URLSearchParams<"u"?URLSearchParams:Ab,p$=typeof FormData<"u"?FormData:null,m$=typeof Blob<"u"?Blob:null,g$={isBrowser:!0,classes:{URLSearchParams:h$,FormData:p$,Blob:m$},protocols:["http","https","file","blob","url","data"]},Tb=typeof window<"u"&&typeof document<"u",y1=typeof navigator=="object"&&navigator||void 0,y$=Tb&&(!y1||["ReactNative","NativeScript","NS"].indexOf(y1.product)<0),b$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",v$=Tb&&window.location.href||"http://localhost",w$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Tb,hasStandardBrowserEnv:y$,hasStandardBrowserWebWorkerEnv:b$,navigator:y1,origin:v$},Symbol.toStringTag,{value:"Module"})),zn={...w$,...g$};function _$(e,t){return i0(e,new zn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return zn.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function x$(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function E$(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&q.isArray(i)?i.length:s,l?(q.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!q.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&q.isArray(i[s])&&(i[s]=E$(i[s])),!a)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,i)=>{t(x$(r),i,n,0)}),n}return null}function S$(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ed={transitional:Ax,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return i?JSON.stringify(Tx(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _$(t,this.formSerializer).toString();if((a=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return i0(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),S$(t)):t}],transformResponse:[function(t){const n=this.transitional||ed.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?Oe.from(a,Oe.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zn.classes.FormData,Blob:zn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{ed.headers[e]={}});const k$=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),C$=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&k$[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},U2=Symbol("internals");function ou(e){return e&&String(e).trim().toLowerCase()}function vh(e){return e===!1||e==null?e:q.isArray(e)?e.map(vh):String(e)}function A$(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const T$=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Am(e,t,n,r,i){if(q.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function I$(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function $$(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class Wn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,l,u){const d=ou(l);if(!d)throw new Error("header name must be a non-empty string");const c=q.findKey(i,d);(!c||i[c]===void 0||u===!0||u===void 0&&i[c]!==!1)&&(i[c||l]=vh(a))}const s=(a,l)=>q.forEach(a,(u,d)=>o(u,d,l));if(q.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(q.isString(t)&&(t=t.trim())&&!T$(t))s(C$(t),n);else if(q.isHeaders(t))for(const[a,l]of t.entries())o(l,a,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=ou(t),t){const r=q.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return A$(i);if(q.isFunction(n))return n.call(this,i,r);if(q.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ou(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Am(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=ou(s),s){const a=q.findKey(r,s);a&&(!n||Am(r,r[a],a,n))&&(delete r[a],i=!0)}}return q.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Am(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return q.forEach(this,(i,o)=>{const s=q.findKey(r,o);if(s){n[s]=vh(i),delete n[o];return}const a=t?I$(o):String(o).trim();a!==o&&delete n[o],n[a]=vh(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[U2]=this[U2]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=ou(s);r[a]||($$(i,s),r[a]=!0)}return q.isArray(t)?t.forEach(o):o(t),this}}Wn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(Wn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});q.freezeMethods(Wn);function Tm(e,t){const n=this||ed,r=t||n,i=Wn.from(r.headers);let o=r.data;return q.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ix(e){return!!(e&&e.__CANCEL__)}function lc(e,t,n){Oe.call(this,e??"canceled",Oe.ERR_CANCELED,t,n),this.name="CanceledError"}q.inherits(lc,Oe,{__CANCEL__:!0});function $x(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Oe("Request failed with status code "+n.status,[Oe.ERR_BAD_REQUEST,Oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function P$(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function O$(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=r[o];s||(s=u),n[i]=l,r[i]=u;let c=o,f=0;for(;c!==i;)f+=n[c++],c=c%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s{n=d,i=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),c=d-n;c>=r?s(u,d):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-c)))},()=>i&&s(i)]}const ap=(e,t,n=3)=>{let r=0;const i=O$(50,250);return R$(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,u=i(l),d=s<=a;r=s;const c={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&d?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},H2=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},z2=e=>(...t)=>q.asap(()=>e(...t)),L$=zn.hasStandardBrowserEnv?function(){const t=zn.navigator&&/(msie|trident)/i.test(zn.navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=q.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),B$=zn.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];q.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),q.isString(r)&&s.push("path="+r),q.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function N$(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function M$(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Px(e,t){return e&&!N$(t)?M$(e,t):t}const W2=e=>e instanceof Wn?{...e}:e;function ya(e,t){t=t||{};const n={};function r(u,d,c){return q.isPlainObject(u)&&q.isPlainObject(d)?q.merge.call({caseless:c},u,d):q.isPlainObject(d)?q.merge({},d):q.isArray(d)?d.slice():d}function i(u,d,c){if(q.isUndefined(d)){if(!q.isUndefined(u))return r(void 0,u,c)}else return r(u,d,c)}function o(u,d){if(!q.isUndefined(d))return r(void 0,d)}function s(u,d){if(q.isUndefined(d)){if(!q.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,c){if(c in t)return r(u,d);if(c in e)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,d)=>i(W2(u),W2(d),!0)};return q.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=l[d]||i,f=c(e[d],t[d],d);q.isUndefined(f)&&c!==a||(n[d]=f)}),n}const Ox=e=>{const t=ya({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;t.headers=s=Wn.from(s),t.url=Cx(Px(t.baseURL,t.url),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(q.isFormData(n)){if(zn.hasStandardBrowserEnv||zn.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...d]=l?l.split(";").map(c=>c.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(zn.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(t)),r||r!==!1&&L$(t.url))){const u=i&&o&&B$.read(o);u&&s.set(i,u)}return t},j$=typeof XMLHttpRequest<"u",D$=j$&&function(e){return new Promise(function(n,r){const i=Ox(e);let o=i.data;const s=Wn.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,d,c,f,m,p;function h(){m&&m(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function g(){if(!y)return;const v=Wn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:v,config:e,request:y};$x(function(k){n(k),h()},function(k){r(k),h()},E),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(g)},y.onabort=function(){y&&(r(new Oe("Request aborted",Oe.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new Oe("Network Error",Oe.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let w=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Ax;i.timeoutErrorMessage&&(w=i.timeoutErrorMessage),r(new Oe(w,E.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,e,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&q.forEach(s.toJSON(),function(w,E){y.setRequestHeader(E,w)}),q.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),a&&a!=="json"&&(y.responseType=i.responseType),u&&([f,p]=ap(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([c,m]=ap(l),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(d=v=>{y&&(r(!v||v.type?new lc(null,e,y):v),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const b=P$(i.url);if(b&&zn.protocols.indexOf(b)===-1){r(new Oe("Unsupported protocol "+b+":",Oe.ERR_BAD_REQUEST,e));return}y.send(o||null)})},F$=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof Oe?d:new lc(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,o(new Oe(`timeout ${t} of ms exceeded`,Oe.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>q.asap(a),l}},U$=function*(e,t){let n=e.byteLength;if(!t||n{const i=H$(e,t);let o=0,s,a=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await i.next();if(u){a(),l.close();return}let c=d.byteLength;if(n){let f=o+=c;n(f)}l.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},o0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rx=o0&&typeof ReadableStream=="function",W$=o0&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Lx=(e,...t)=>{try{return!!e(...t)}catch{return!1}},V$=Rx&&Lx(()=>{let e=!1;const t=new Request(zn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),q2=64*1024,b1=Rx&&Lx(()=>q.isReadableStream(new Response("").body)),lp={stream:b1&&(e=>e.body)};o0&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!lp[t]&&(lp[t]=q.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Oe(`Response type '${t}' is not supported`,Oe.ERR_NOT_SUPPORT,r)})})})(new Response);const q$=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e))return(await new Request(zn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e=e+""),q.isString(e))return(await W$(e)).byteLength},G$=async(e,t)=>{const n=q.toFiniteNumber(e.getContentLength());return n??q$(t)},K$=o0&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:d,withCredentials:c="same-origin",fetchOptions:f}=Ox(e);u=u?(u+"").toLowerCase():"text";let m=F$([i,o&&o.toAbortSignal()],s),p;const h=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(l&&V$&&n!=="get"&&n!=="head"&&(y=await G$(d,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(q.isFormData(r)&&(C=E.headers.get("content-type"))&&d.setContentType(C),E.body){const[k,_]=H2(y,ap(z2(l)));r=V2(E.body,q2,k,_)}}q.isString(c)||(c=c?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...f,signal:m,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:g?c:void 0});let b=await fetch(p);const v=b1&&(u==="stream"||u==="response");if(b1&&(a||v&&h)){const E={};["status","statusText","headers"].forEach(S=>{E[S]=b[S]});const C=q.toFiniteNumber(b.headers.get("content-length")),[k,_]=a&&H2(C,ap(z2(a),!0))||[];b=new Response(V2(b.body,q2,k,()=>{_&&_(),h&&h()}),E)}u=u||"text";let w=await lp[q.findKey(lp,u)||"text"](b,e);return!v&&h&&h(),await new Promise((E,C)=>{$x(E,C,{data:w,headers:Wn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:p})})}catch(g){throw h&&h(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Oe("Network Error",Oe.ERR_NETWORK,e,p),{cause:g.cause||g}):Oe.from(g,g&&g.code,e,p)}}),v1={http:c$,xhr:D$,fetch:K$};q.forEach(v1,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const G2=e=>`- ${e}`,Z$=e=>q.isFunction(e)||e===null||e===!1,Bx={getAdapter:e=>{e=q.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since : -`+o.map(G2).join(` -`):" "+G2(o[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:v1};function Im(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new lc(null,e)}function K2(e){return Im(e),e.headers=Wn.from(e.headers),e.data=Tm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bx.getAdapter(e.adapter||ed.adapter)(e).then(function(r){return Im(e),r.data=Tm.call(e,e.transformResponse,r),r.headers=Wn.from(r.headers),r},function(r){return Ix(r)||(Im(e),r&&r.response&&(r.response.data=Tm.call(e,e.transformResponse,r.response),r.response.headers=Wn.from(r.response.headers))),Promise.reject(r)})}const Nx="1.7.7",Ib={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ib[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Z2={};Ib.transitional=function(t,n,r){function i(o,s){return"[Axios v"+Nx+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new Oe(i(s," has been removed"+(n?" in "+n:"")),Oe.ERR_DEPRECATED);return n&&!Z2[s]&&(Z2[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function X$(e,t,n){if(typeof e!="object")throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new Oe("option "+o+" must be "+l,Oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Oe("Unknown option "+o,Oe.ERR_BAD_OPTION)}}const w1={assertOptions:X$,validators:Ib},Io=w1.validators;class sa{constructor(t){this.defaults=t,this.interceptors={request:new F2,response:new F2}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ya(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&w1.assertOptions(r,{silentJSONParsing:Io.transitional(Io.boolean),forcedJSONParsing:Io.transitional(Io.boolean),clarifyTimeoutError:Io.transitional(Io.boolean)},!1),i!=null&&(q.isFunction(i)?n.paramsSerializer={serialize:i}:w1.assertOptions(i,{encode:Io.function,serialize:Io.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&q.merge(o.common,o[n.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=Wn.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let d,c=0,f;if(!l){const p=[K2.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),f=p.length,d=Promise.resolve(n);c{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new lc(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new $b(function(i){t=i}),cancel:t}}}function Y$(e){return function(n){return e.apply(null,n)}}function Q$(e){return q.isObject(e)&&e.isAxiosError===!0}const _1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_1).forEach(([e,t])=>{_1[t]=e});function Mx(e){const t=new sa(e),n=px(sa.prototype.request,t);return q.extend(n,sa.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Mx(ya(e,i))},n}const Nt=Mx(ed);Nt.Axios=sa;Nt.CanceledError=lc;Nt.CancelToken=$b;Nt.isCancel=Ix;Nt.VERSION=Nx;Nt.toFormData=i0;Nt.AxiosError=Oe;Nt.Cancel=Nt.CanceledError;Nt.all=function(t){return Promise.all(t)};Nt.spread=Y$;Nt.isAxiosError=Q$;Nt.mergeConfig=ya;Nt.AxiosHeaders=Wn;Nt.formToJSON=e=>Tx(q.isHTMLForm(e)?new FormData(e):e);Nt.getAdapter=Bx.getAdapter;Nt.HttpStatusCode=_1;Nt.default=Nt;const J$="1.0.5";let Cr=class x1 extends Error{constructor(t,n={}){var s;const r=n.cause instanceof x1?n.cause.details:(s=n.cause)!=null&&s.message?n.cause.message:n.details,i=n.cause instanceof x1&&n.cause.docsPath||n.docsPath,o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${J$}`].join(` -`);super(o),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}};function vs(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const jx=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Dx=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Fx=/^\(.+?\).*?$/,X2=/^tuple(?(\[(\d*)\])*)$/;function E1(e){let t=e.type;if(X2.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let i=0;i[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function tP(e){return Ux.test(e)}function nP(e){return vs(Ux,e)}const Hx=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function rP(e){return Hx.test(e)}function iP(e){return vs(Hx,e)}const zx=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;function oP(e){return zx.test(e)}function sP(e){return vs(zx,e)}const Wx=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;function Vx(e){return Wx.test(e)}function aP(e){return vs(Wx,e)}const qx=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;function lP(e){return qx.test(e)}function cP(e){return vs(qx,e)}const uP=/^fallback\(\) external(?:\s(?payable{1}))?$/;function fP(e){return uP.test(e)}const dP=/^receive\(\) external payable$/;function hP(e){return dP.test(e)}const pP=new Set(["indexed"]),S1=new Set(["calldata","memory","storage"]);class mP extends Cr{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class gP extends Cr{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class yP extends Cr{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class bP extends Cr{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class vP extends Cr{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class wP extends Cr{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class _P extends Cr{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class bu extends Cr{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class xP extends Cr{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class EP extends Cr{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class SP extends Cr{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class kP extends Cr{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function CP(e,t){return t?`${t}:${e}`:e}const $m=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function AP(e,t={}){if(oP(e)){const n=sP(e);if(!n)throw new bu({signature:e,type:"function"});const r=Ur(n.parameters),i=[],o=r.length;for(let a=0;a[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,IP=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,$P=/^u?int$/;function Ws(e,t){var c,f;const n=CP(e,t==null?void 0:t.type);if($m.has(n))return $m.get(n);const r=Fx.test(e),i=vs(r?IP:TP,e);if(!i)throw new yP({param:e});if(i.name&&OP(i.name))throw new bP({param:e,name:i.name});const o=i.name?{name:i.name}:{},s=i.modifier==="indexed"?{indexed:!0}:{},a=(t==null?void 0:t.structs)??{};let l,u={};if(r){l="tuple";const m=Ur(i.type),p=[],h=m.length;for(let y=0;y[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function Kx(e,t,n=new Set){const r=[],i=e.length;for(let o=0;ot(e,o)}function no(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new KP(e.type);return`${e.name}(${s0(e.inputs,{includeName:t})})`}function s0(e,{includeName:t=!1}={}){return e?e.map(n=>NP(n,{includeName:t})).join(t?", ":","):""}function NP(e,{includeName:t}){return e.type.startsWith("tuple")?`(${s0(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function Er(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function At(e){return Er(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Xx="2.21.6";let Hd={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:Xx},J=class k1 extends Error{constructor(t,n={}){var a;const r=(()=>{var l;return n.cause instanceof k1?n.cause.details:(l=n.cause)!=null&&l.message?n.cause.message:n.details})(),i=n.cause instanceof k1&&n.cause.docsPath||n.docsPath,o=(a=Hd.getDocsUrl)==null?void 0:a.call(Hd,{...n,docsPath:i}),s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],`Version: ${Hd.version}`].join(` +`),RT=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),ix=new Uint8Array(new Array(16).fill(0).map((e,t)=>t)),LT=ix.map(e=>(9*e+5)%16);let wb=[ix],_b=[LT];for(let e=0;e<4;e++)for(let t of[wb,_b])t.push(t[e].map(n=>RT[n]));const ox=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),BT=wb.map((e,t)=>e.map(n=>ox[t][n])),NT=_b.map((e,t)=>e.map(n=>ox[t][n])),MT=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),jT=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]);function C2(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}const Dd=new Uint32Array(16);let DT=class extends bb{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:t,h1:n,h2:r,h3:i,h4:o}=this;return[t,n,r,i,o]}set(t,n,r,i,o){this.h0=t|0,this.h1=n|0,this.h2=r|0,this.h3=i|0,this.h4=o|0}process(t,n){for(let m=0;m<16;m++,n+=4)Dd[m]=t.getUint32(n,!0);let r=this.h0|0,i=r,o=this.h1|0,s=o,a=this.h2|0,l=a,u=this.h3|0,d=u,c=this.h4|0,f=c;for(let m=0;m<5;m++){const p=4-m,h=MT[m],y=jT[m],g=wb[m],b=_b[m],v=BT[m],w=NT[m];for(let E=0;E<16;E++){const C=Nd(r+C2(m,o,a,u)+Dd[g[E]]+h,v[E])+c|0;r=c,c=u,u=Nd(a,10)|0,a=o,o=C}for(let E=0;E<16;E++){const C=Nd(i+C2(p,s,l,d)+Dd[b[E]]+y,w[E])+f|0;i=f,f=d,d=Nd(l,10)|0,l=s,s=C}}this.set(this.h1+a+d|0,this.h2+u+f|0,this.h3+c+i|0,this.h4+r+s|0,this.h0+o+l|0)}roundClean(){Dd.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}};const FT=gb(()=>new DT);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xb=BigInt(0),Jp=BigInt(1),UT=BigInt(2);function ga(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Yf(e){if(!ga(e))throw new Error("Uint8Array expected")}function Ml(e,t){if(typeof t!="boolean")throw new Error(`${e} must be valid boolean, got "${t}".`)}const HT=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function jl(e){Yf(e);let t="";for(let n=0;n=Mi._0&&e<=Mi._9)return e-Mi._0;if(e>=Mi._A&&e<=Mi._F)return e-(Mi._A-10);if(e>=Mi._a&&e<=Mi._f)return e-(Mi._a-10)}function Dl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;itypeof e=="bigint"&&xb<=e;function e0(e,t,n){return vm(e)&&vm(t)&&vm(n)&&t<=e&&exb;e>>=Jp,t+=1);return t}function qT(e,t){return e>>BigInt(t)&Jp}function GT(e,t,n){return e|(n?Jp:xb)<(UT<new Uint8Array(e),T2=e=>Uint8Array.from(e);function ax(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=wm(e),i=wm(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=(...c)=>n(i,r,...c),l=(c=wm())=>{i=a(T2([0]),c),r=a(),c.length!==0&&(i=a(T2([1]),c),r=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let c=0;const f=[];for(;c{s(),l(c);let m;for(;!(m=f(u()));)l();return s(),m}}const KT={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||ga(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Qf(e,t,n={}){const r=(i,o,s)=>{const a=KT[o];if(typeof a!="function")throw new Error(`Invalid validator "${o}", expected function`);const l=e[i];if(!(s&&l===void 0)&&!a(l,e))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(n))r(i,o,!0);return e}const ZT=()=>{throw new Error("not implemented")};function u1(e){const t=new WeakMap;return(n,...r)=>{const i=t.get(n);if(i!==void 0)return i;const o=e(n,...r);return t.set(n,o),o}}const XT=Object.freeze(Object.defineProperty({__proto__:null,aInRange:oa,abool:Ml,abytes:Yf,bitGet:qT,bitLen:sx,bitMask:Cb,bitSet:GT,bytesToHex:jl,bytesToNumberBE:ia,bytesToNumberLE:Sb,concatBytes:uf,createHmacDrbg:ax,ensureBytes:Br,equalBytes:WT,hexToBytes:Dl,hexToNumber:Eb,inRange:e0,isBytes:ga,memoized:u1,notImplemented:ZT,numberToBytesBE:Fl,numberToBytesLE:kb,numberToHexUnpadded:ul,numberToVarBytesBE:zT,utf8ToBytes:VT,validateObject:Qf},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const tn=BigInt(0),$t=BigInt(1),zs=BigInt(2),YT=BigInt(3),f1=BigInt(4),I2=BigInt(5),$2=BigInt(8);BigInt(9);BigInt(16);function Tn(e,t){const n=e%t;return n>=tn?n:t+n}function QT(e,t,n){if(n<=tn||t 0");if(n===$t)return tn;let r=$t;for(;t>tn;)t&$t&&(r=r*e%n),e=e*e%n,t>>=$t;return r}function hr(e,t,n){let r=e;for(;t-- >tn;)r*=r,r%=n;return r}function d1(e,t){if(e===tn||t<=tn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=Tn(e,t),r=t,i=tn,o=$t;for(;n!==tn;){const a=r/n,l=r%n,u=i-o*a;r=n,n=l,i=o,o=u}if(r!==$t)throw new Error("invert: does not exist");return Tn(i,t)}function JT(e){const t=(e-$t)/zs;let n,r,i;for(n=e-$t,r=0;n%zs===tn;n/=zs,r++);for(i=zs;i(r[i]="function",r),t);return Qf(e,n)}function rI(e,t,n){if(n 0");if(n===tn)return e.ONE;if(n===$t)return t;let r=e.ONE,i=t;for(;n>tn;)n&$t&&(r=e.mul(r,i)),i=e.sqr(i),n>>=$t;return r}function iI(e,t){const n=new Array(t.length),r=t.reduce((o,s,a)=>e.is0(s)?o:(n[a]=o,e.mul(o,s)),e.ONE),i=e.inv(r);return t.reduceRight((o,s,a)=>e.is0(s)?o:(n[a]=e.mul(o,n[a]),e.mul(o,s)),i),n}function lx(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function cx(e,t,n=!1,r={}){if(e<=tn)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=lx(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=eI(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:Cb(i),ZERO:tn,ONE:$t,create:l=>Tn(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return tn<=l&&ll===tn,isOdd:l=>(l&$t)===$t,neg:l=>Tn(-l,e),eql:(l,u)=>l===u,sqr:l=>Tn(l*l,e),add:(l,u)=>Tn(l+u,e),sub:(l,u)=>Tn(l-u,e),mul:(l,u)=>Tn(l*u,e),pow:(l,u)=>rI(a,l,u),div:(l,u)=>Tn(l*d1(u,e),e),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>d1(l,e),sqrt:r.sqrt||(l=>s(a,l)),invertBatch:l=>iI(a,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>n?kb(l,o):Fl(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return n?Sb(l):ia(l)}});return Object.freeze(a)}function ux(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function fx(e){const t=ux(e);return t+Math.ceil(t/2)}function oI(e,t,n=!1){const r=e.length,i=ux(t),o=fx(t);if(r<16||r1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const s=n?ia(e):Sb(e),a=Tn(s,t-$t)+$t;return n?kb(a,i):Fl(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const sI=BigInt(0),_m=BigInt(1),xm=new WeakMap,P2=new WeakMap;function aI(e,t){const n=(o,s)=>{const a=s.negate();return o?a:s},r=o=>{if(!Number.isSafeInteger(o)||o<=0||o>t)throw new Error(`Wrong window size=${o}, should be [1..${t}]`)},i=o=>{r(o);const s=Math.ceil(t/o)+1,a=2**(o-1);return{windows:s,windowSize:a}};return{constTimeNegate:n,unsafeLadder(o,s){let a=e.ZERO,l=o;for(;s>sI;)s&_m&&(a=a.add(l)),l=l.double(),s>>=_m;return a},precomputeWindow(o,s){const{windows:a,windowSize:l}=i(s),u=[];let d=o,c=d;for(let f=0;f>=p,g>u&&(g-=m,a+=_m);const b=y,v=y+Math.abs(g)-1,w=h%2!==0,E=g<0;g===0?c=c.add(n(w,s[b])):d=d.add(n(E,s[v]))}return{p:d,f:c}},wNAFCached(o,s,a){const l=P2.get(o)||1;let u=xm.get(o);return u||(u=this.precomputeWindow(o,l),l!==1&&xm.set(o,a(u))),this.wNAF(l,u,s)},setWindowSize(o,s){r(s),P2.set(o,s),xm.delete(o)}}}function lI(e,t,n,r){if(!Array.isArray(n)||!Array.isArray(r)||r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");r.forEach((d,c)=>{if(!t.isValid(d))throw new Error(`wrong scalar at index ${c}`)}),n.forEach((d,c)=>{if(!(d instanceof e))throw new Error(`wrong point at index ${c}`)});const i=sx(BigInt(n.length)),o=i>12?i-3:i>4?i-2:i?2:1,s=(1<=0;d-=o){a.fill(e.ZERO);for(let f=0;f>BigInt(d)&BigInt(s));a[p]=a[p].add(n[f])}let c=e.ZERO;for(let f=a.length-1,m=e.ZERO;f>0;f--)m=m.add(a[f]),c=c.add(m);if(u=u.add(c),d!==0)for(let f=0;f{const{Err:n}=Wi;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,i=ul(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const o=r>127?ul(i.length/2|128):"";return`${ul(e)}${o}${i}${t}`},decode(e,t){const{Err:n}=Wi;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const i=t[r++],o=!!(i&128);let s=0;if(!o)s=i;else{const l=i&127;if(!l)throw new n("tlv.decode(long): indefinite length not supported");if(l>4)throw new n("tlv.decode(long): byte length is too big");const u=t.subarray(r,r+l);if(u.length!==l)throw new n("tlv.decode: length bytes not complete");if(u[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const d of u)s=s<<8|d;if(r+=l,s<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+s);if(a.length!==s)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+s)}}},_int:{encode(e){const{Err:t}=Wi;if(e{const b=y.toAffine();return uf(Uint8Array.from([4]),n.toBytes(b.x),n.toBytes(b.y))}),o=t.fromBytes||(h=>{const y=h.subarray(1),g=n.fromBytes(y.subarray(0,n.BYTES)),b=n.fromBytes(y.subarray(n.BYTES,2*n.BYTES));return{x:g,y:b}});function s(h){const{a:y,b:g}=t,b=n.sqr(h),v=n.mul(b,h);return n.add(n.add(v,n.mul(h,y)),g)}if(!n.eql(n.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function a(h){return e0(h,Jt,t.n)}function l(h){const{allowedPrivateKeyLengths:y,nByteLength:g,wrapPrivateKey:b,n:v}=t;if(y&&typeof h!="bigint"){if(ga(h)&&(h=jl(h)),typeof h!="string"||!y.includes(h.length))throw new Error("Invalid key");h=h.padStart(g*2,"0")}let w;try{w=typeof h=="bigint"?h:ia(Br("private key",h,g))}catch{throw new Error(`private key must be ${g} bytes, hex or bigint, not ${typeof h}`)}return b&&(w=Tn(w,v)),oa("private key",w,Jt,v),w}function u(h){if(!(h instanceof f))throw new Error("ProjectivePoint expected")}const d=u1((h,y)=>{const{px:g,py:b,pz:v}=h;if(n.eql(v,n.ONE))return{x:g,y:b};const w=h.is0();y==null&&(y=w?n.ONE:n.inv(v));const E=n.mul(g,y),C=n.mul(b,y),k=n.mul(v,y);if(w)return{x:n.ZERO,y:n.ZERO};if(!n.eql(k,n.ONE))throw new Error("invZ was invalid");return{x:E,y:C}}),c=u1(h=>{if(h.is0()){if(t.allowInfinityPoint&&!n.is0(h.py))return;throw new Error("bad point: ZERO")}const{x:y,y:g}=h.toAffine();if(!n.isValid(y)||!n.isValid(g))throw new Error("bad point: x or y not FE");const b=n.sqr(g),v=s(y);if(!n.eql(b,v))throw new Error("bad point: equation left != right");if(!h.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class f{constructor(y,g,b){if(this.px=y,this.py=g,this.pz=b,y==null||!n.isValid(y))throw new Error("x required");if(g==null||!n.isValid(g))throw new Error("y required");if(b==null||!n.isValid(b))throw new Error("z required");Object.freeze(this)}static fromAffine(y){const{x:g,y:b}=y||{};if(!y||!n.isValid(g)||!n.isValid(b))throw new Error("invalid affine point");if(y instanceof f)throw new Error("projective point not allowed");const v=w=>n.eql(w,n.ZERO);return v(g)&&v(b)?f.ZERO:new f(g,b,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(y){const g=n.invertBatch(y.map(b=>b.pz));return y.map((b,v)=>b.toAffine(g[v])).map(f.fromAffine)}static fromHex(y){const g=f.fromAffine(o(Br("pointHex",y)));return g.assertValidity(),g}static fromPrivateKey(y){return f.BASE.multiply(l(y))}static msm(y,g){return lI(f,r,y,g)}_setWindowSize(y){p.setWindowSize(this,y)}assertValidity(){c(this)}hasEvenY(){const{y}=this.toAffine();if(n.isOdd)return!n.isOdd(y);throw new Error("Field doesn't support isOdd")}equals(y){u(y);const{px:g,py:b,pz:v}=this,{px:w,py:E,pz:C}=y,k=n.eql(n.mul(g,C),n.mul(w,v)),_=n.eql(n.mul(b,C),n.mul(E,v));return k&&_}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:y,b:g}=t,b=n.mul(g,R2),{px:v,py:w,pz:E}=this;let C=n.ZERO,k=n.ZERO,_=n.ZERO,S=n.mul(v,v),A=n.mul(w,w),I=n.mul(E,E),L=n.mul(v,w);return L=n.add(L,L),_=n.mul(v,E),_=n.add(_,_),C=n.mul(y,_),k=n.mul(b,I),k=n.add(C,k),C=n.sub(A,k),k=n.add(A,k),k=n.mul(C,k),C=n.mul(L,C),_=n.mul(b,_),I=n.mul(y,I),L=n.sub(S,I),L=n.mul(y,L),L=n.add(L,_),_=n.add(S,S),S=n.add(_,S),S=n.add(S,I),S=n.mul(S,L),k=n.add(k,S),I=n.mul(w,E),I=n.add(I,I),S=n.mul(I,L),C=n.sub(C,S),_=n.mul(I,A),_=n.add(_,_),_=n.add(_,_),new f(C,k,_)}add(y){u(y);const{px:g,py:b,pz:v}=this,{px:w,py:E,pz:C}=y;let k=n.ZERO,_=n.ZERO,S=n.ZERO;const A=t.a,I=n.mul(t.b,R2);let L=n.mul(g,w),F=n.mul(b,E),N=n.mul(v,C),R=n.add(g,b),B=n.add(w,E);R=n.mul(R,B),B=n.add(L,F),R=n.sub(R,B),B=n.add(g,v);let V=n.add(w,C);return B=n.mul(B,V),V=n.add(L,N),B=n.sub(B,V),V=n.add(b,v),k=n.add(E,C),V=n.mul(V,k),k=n.add(F,N),V=n.sub(V,k),S=n.mul(A,B),k=n.mul(I,N),S=n.add(k,S),k=n.sub(F,S),S=n.add(F,S),_=n.mul(k,S),F=n.add(L,L),F=n.add(F,L),N=n.mul(A,N),B=n.mul(I,B),F=n.add(F,N),N=n.sub(L,N),N=n.mul(A,N),B=n.add(B,N),L=n.mul(F,B),_=n.add(_,L),L=n.mul(V,B),k=n.mul(R,k),k=n.sub(k,L),L=n.mul(R,F),S=n.mul(V,S),S=n.add(S,L),new f(k,_,S)}subtract(y){return this.add(y.negate())}is0(){return this.equals(f.ZERO)}wNAF(y){return p.wNAFCached(this,y,f.normalizeZ)}multiplyUnsafe(y){oa("scalar",y,Vi,t.n);const g=f.ZERO;if(y===Vi)return g;if(y===Jt)return this;const{endo:b}=t;if(!b)return p.unsafeLadder(this,y);let{k1neg:v,k1:w,k2neg:E,k2:C}=b.splitScalar(y),k=g,_=g,S=this;for(;w>Vi||C>Vi;)w&Jt&&(k=k.add(S)),C&Jt&&(_=_.add(S)),S=S.double(),w>>=Jt,C>>=Jt;return v&&(k=k.negate()),E&&(_=_.negate()),_=new f(n.mul(_.px,b.beta),_.py,_.pz),k.add(_)}multiply(y){const{endo:g,n:b}=t;oa("scalar",y,Jt,b);let v,w;if(g){const{k1neg:E,k1:C,k2neg:k,k2:_}=g.splitScalar(y);let{p:S,f:A}=this.wNAF(C),{p:I,f:L}=this.wNAF(_);S=p.constTimeNegate(E,S),I=p.constTimeNegate(k,I),I=new f(n.mul(I.px,g.beta),I.py,I.pz),v=S.add(I),w=A.add(L)}else{const{p:E,f:C}=this.wNAF(y);v=E,w=C}return f.normalizeZ([v,w])[0]}multiplyAndAddUnsafe(y,g,b){const v=f.BASE,w=(C,k)=>k===Vi||k===Jt||!C.equals(v)?C.multiplyUnsafe(k):C.multiply(k),E=w(this,g).add(w(y,b));return E.is0()?void 0:E}toAffine(y){return d(this,y)}isTorsionFree(){const{h:y,isTorsionFree:g}=t;if(y===Jt)return!0;if(g)return g(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:y,clearCofactor:g}=t;return y===Jt?this:g?g(f,this):this.multiplyUnsafe(t.h)}toRawBytes(y=!0){return Ml("isCompressed",y),this.assertValidity(),i(f,this,y)}toHex(y=!0){return Ml("isCompressed",y),jl(this.toRawBytes(y))}}f.BASE=new f(t.Gx,t.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const m=t.nBitLength,p=aI(f,t.endo?Math.ceil(m/2):m);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:l,weierstrassEquation:s,isWithinCurveOrder:a}}function hI(e){const t=dx(e);return Qf(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function pI(e){const t=hI(e),{Fp:n,n:r}=t,i=n.BYTES+1,o=2*n.BYTES+1;function s(N){return Tn(N,r)}function a(N){return d1(N,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:c}=dI({...t,toBytes(N,R,B){const V=R.toAffine(),j=n.toBytes(V.x),W=uf;return Ml("isCompressed",B),B?W(Uint8Array.from([R.hasEvenY()?2:3]),j):W(Uint8Array.from([4]),j,n.toBytes(V.y))},fromBytes(N){const R=N.length,B=N[0],V=N.subarray(1);if(R===i&&(B===2||B===3)){const j=ia(V);if(!e0(j,Jt,n.ORDER))throw new Error("Point is not on curve");const W=d(j);let Y;try{Y=n.sqrt(W)}catch(Z){const pe=Z instanceof Error?": "+Z.message:"";throw new Error("Point is not on curve"+pe)}const te=(Y&Jt)===Jt;return(B&1)===1!==te&&(Y=n.neg(Y)),{x:j,y:Y}}else if(R===o&&B===4){const j=n.fromBytes(V.subarray(0,n.BYTES)),W=n.fromBytes(V.subarray(n.BYTES,2*n.BYTES));return{x:j,y:W}}else throw new Error(`Point of length ${R} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}}),f=N=>jl(Fl(N,t.nByteLength));function m(N){const R=r>>Jt;return N>R}function p(N){return m(N)?s(-N):N}const h=(N,R,B)=>ia(N.slice(R,B));class y{constructor(R,B,V){this.r=R,this.s=B,this.recovery=V,this.assertValidity()}static fromCompact(R){const B=t.nByteLength;return R=Br("compactSignature",R,B*2),new y(h(R,0,B),h(R,B,2*B))}static fromDER(R){const{r:B,s:V}=Wi.toSig(Br("DER",R));return new y(B,V)}assertValidity(){oa("r",this.r,Jt,r),oa("s",this.s,Jt,r)}addRecoveryBit(R){return new y(this.r,this.s,R)}recoverPublicKey(R){const{r:B,s:V,recovery:j}=this,W=C(Br("msgHash",R));if(j==null||![0,1,2,3].includes(j))throw new Error("recovery id invalid");const Y=j===2||j===3?B+t.n:B;if(Y>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const te=j&1?"03":"02",ae=l.fromHex(te+f(Y)),Z=a(Y),pe=s(-W*Z),Ie=s(V*Z),_e=l.BASE.multiplyAndAddUnsafe(ae,pe,Ie);if(!_e)throw new Error("point at infinify");return _e.assertValidity(),_e}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return Dl(this.toDERHex())}toDERHex(){return Wi.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Dl(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const g={isValidPrivateKey(N){try{return u(N),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const N=fx(t.n);return oI(t.randomBytes(N),t.n)},precompute(N=8,R=l.BASE){return R._setWindowSize(N),R.multiply(BigInt(3)),R}};function b(N,R=!0){return l.fromPrivateKey(N).toRawBytes(R)}function v(N){const R=ga(N),B=typeof N=="string",V=(R||B)&&N.length;return R?V===i||V===o:B?V===2*i||V===2*o:N instanceof l}function w(N,R,B=!0){if(v(N))throw new Error("first arg must be private key");if(!v(R))throw new Error("second arg must be public key");return l.fromHex(R).multiply(u(N)).toRawBytes(B)}const E=t.bits2int||function(N){const R=ia(N),B=N.length*8-t.nBitLength;return B>0?R>>BigInt(B):R},C=t.bits2int_modN||function(N){return s(E(N))},k=Cb(t.nBitLength);function _(N){return oa(`num < 2^${t.nBitLength}`,N,Vi,k),Fl(N,t.nByteLength)}function S(N,R,B=A){if(["recovered","canonical"].some(le=>le in B))throw new Error("sign() legacy options not supported");const{hash:V,randomBytes:j}=t;let{lowS:W,prehash:Y,extraEntropy:te}=B;W==null&&(W=!0),N=Br("msgHash",N),O2(B),Y&&(N=Br("prehashed msgHash",V(N)));const ae=C(N),Z=u(R),pe=[_(Z),_(ae)];if(te!=null&&te!==!1){const le=te===!0?j(n.BYTES):te;pe.push(Br("extraEntropy",le))}const Ie=uf(...pe),_e=ae;function Ce(le){const $e=E(le);if(!c($e))return;const rt=a($e),je=l.BASE.multiply($e).toAffine(),nt=s(je.x);if(nt===Vi)return;const Le=s(rt*s(_e+nt*Z));if(Le===Vi)return;let _t=(je.x===nt?0:2)|Number(je.y&Jt),Kn=Le;return W&&m(Le)&&(Kn=p(Le),_t^=1),new y(nt,Kn,_t)}return{seed:Ie,k2sig:Ce}}const A={lowS:t.lowS,prehash:!1},I={lowS:t.lowS,prehash:!1};function L(N,R,B=A){const{seed:V,k2sig:j}=S(N,R,B),W=t;return ax(W.hash.outputLen,W.nByteLength,W.hmac)(V,j)}l.BASE._setWindowSize(8);function F(N,R,B,V=I){var je;const j=N;if(R=Br("msgHash",R),B=Br("publicKey",B),"strict"in V)throw new Error("options.strict was renamed to lowS");O2(V);const{lowS:W,prehash:Y}=V;let te,ae;try{if(typeof j=="string"||ga(j))try{te=y.fromDER(j)}catch(nt){if(!(nt instanceof Wi.Err))throw nt;te=y.fromCompact(j)}else if(typeof j=="object"&&typeof j.r=="bigint"&&typeof j.s=="bigint"){const{r:nt,s:Le}=j;te=new y(nt,Le)}else throw new Error("PARSE");ae=l.fromHex(B)}catch(nt){if(nt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(W&&te.hasHighS())return!1;Y&&(R=t.hash(R));const{r:Z,s:pe}=te,Ie=C(R),_e=a(pe),Ce=s(Ie*_e),le=s(Z*_e),$e=(je=l.BASE.multiplyAndAddUnsafe(ae,Ce,le))==null?void 0:je.toAffine();return $e?s($e.x)===Z:!1}return{CURVE:t,getPublicKey:b,getSharedSecret:w,sign:L,verify:F,ProjectivePoint:l,Signature:y,utils:g}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mI(e){return{hash:e,hmac:(t,...n)=>cf(e,t,yu(...n)),randomBytes:yb}}function gI(e,t){const n=r=>pI({...e,...mI(r)});return Object.freeze({...n(t),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hx=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),L2=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),yI=BigInt(1),h1=BigInt(2),B2=(e,t)=>(e+t/h1)/t;function bI(e){const t=hx,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),l=BigInt(88),u=e*e*e%t,d=u*u*e%t,c=hr(d,n,t)*d%t,f=hr(c,n,t)*d%t,m=hr(f,h1,t)*u%t,p=hr(m,i,t)*m%t,h=hr(p,o,t)*p%t,y=hr(h,a,t)*h%t,g=hr(y,l,t)*y%t,b=hr(g,a,t)*h%t,v=hr(b,n,t)*d%t,w=hr(v,s,t)*p%t,E=hr(w,r,t)*u%t,C=hr(E,h1,t);if(!p1.eql(p1.sqr(C),e))throw new Error("Cannot find square root");return C}const p1=cx(hx,void 0,void 0,{sqrt:bI}),li=gI({a:BigInt(0),b:BigInt(7),Fp:p1,n:L2,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=L2,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-yI*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=B2(o*e,t),l=B2(-r*e,t);let u=Tn(e-a*n-l*i,t),d=Tn(-a*r-l*o,t);const c=u>s,f=d>s;if(c&&(u=t-u),f&&(d=t-d),u>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:c,k1:u,k2neg:f,k2:d}}}},ra);BigInt(0);li.ProjectivePoint;/*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const Fd=li.ProjectivePoint,Em=ex(ra);function N2(e){return BigInt(`0x${nr(e)}`)}function vI(e){return Hs(e.toString(16).padStart(64,"0"))}const wI=mb("Bitcoin seed"),Sm={private:76066276,public:76067358},km=2147483648,_I=e=>FT(ra(e)),xI=e=>ns(e).getUint32(0,!1),Ud=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error(`Invalid number=${e}. Should be from 0 to 2 ** 32 - 1`);const t=new Uint8Array(4);return ns(t).setUint32(0,e,!1),t};let iu=class Ga{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return xI(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const t=this.privateKey;if(!t)throw new Error("No private key");return Em.encode(this.serialize(this.versions.private,yu(new Uint8Array([0]),t)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return Em.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(t,n=Sm){if(Fr(t),8*t.length<128||8*t.length>512)throw new Error(`HDKey: wrong seed length=${t.length}. Should be between 128 and 512 bits; 256 bits is advised)`);const r=cf(ip,wI,t);return new Ga({versions:n,chainCode:r.slice(32),privateKey:r.slice(0,32)})}static fromExtendedKey(t,n=Sm){const r=Em.decode(t),i=ns(r),o=i.getUint32(0,!1),s={versions:n,depth:r[4],parentFingerprint:i.getUint32(5,!1),index:i.getUint32(9,!1),chainCode:r.slice(13,45)},a=r.slice(45),l=a[0]===0;if(o!==n[l?"private":"public"])throw new Error("Version mismatch");return l?new Ga({...s,privateKey:a.slice(1)}):new Ga({...s,publicKey:a})}static fromJSON(t){return Ga.fromExtendedKey(t.xpriv)}constructor(t){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!t||typeof t!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=t.versions||Sm,this.depth=t.depth||0,this.chainCode=t.chainCode||null,this.index=t.index||0,this.parentFingerprint=t.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(t.publicKey&&t.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(t.privateKey){if(!li.utils.isValidPrivateKey(t.privateKey))throw new Error("Invalid private key");this.privKey=typeof t.privateKey=="bigint"?t.privateKey:N2(t.privateKey),this.privKeyBytes=vI(this.privKey),this.pubKey=li.getPublicKey(t.privateKey,!0)}else if(t.publicKey)this.pubKey=Fd.fromHex(t.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=_I(this.pubKey)}derive(t){if(!/^[mM]'?/.test(t))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(t))return this;const n=t.replace(/^[mM]'?\//,"").split("/");let r=this;for(const i of n){const o=/^(\d+)('?)$/.exec(i),s=o&&o[1];if(!o||o.length!==3||typeof s!="string")throw new Error(`Invalid child index: ${i}`);let a=+s;if(!Number.isSafeInteger(a)||a>=km)throw new Error("Invalid index");o[2]==="'"&&(a+=km),r=r.deriveChild(a)}return r}deriveChild(t){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=Ud(t);if(t>=km){const a=this.privateKey;if(!a)throw new Error("Could not derive hardened child key");n=yu(new Uint8Array([0]),a,n)}else n=yu(this.pubKey,n);const r=cf(ip,this.chainCode,n),i=N2(r.slice(0,32)),o=r.slice(32);if(!li.utils.isValidPrivateKey(i))throw new Error("Tweak bigger than curve order");const s={versions:this.versions,chainCode:o,depth:this.depth+1,parentFingerprint:this.fingerprint,index:t};try{if(this.privateKey){const a=Tn(this.privKey+i,li.CURVE.n);if(!li.utils.isValidPrivateKey(a))throw new Error("The tweak was out of range or the resulted private key is invalid");s.privateKey=a}else{const a=Fd.fromHex(this.pubKey).add(Fd.fromPrivateKey(i));if(a.equals(Fd.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");s.publicKey=a.toRawBytes(!0)}return new Ga(s)}catch{return this.deriveChild(t+1)}}sign(t){if(!this.privateKey)throw new Error("No privateKey set!");return Fr(t,32),li.sign(t,this.privKey).toCompactRawBytes()}verify(t,n){if(Fr(t,32),Fr(n,64),!this.publicKey)throw new Error("No publicKey set!");let r;try{r=li.Signature.fromCompact(n)}catch{return!1}return li.verify(r,t,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(t,n){if(!this.chainCode)throw new Error("No chainCode set");return Fr(n,33),yu(Ud(t),new Uint8Array([this.depth]),Ud(this.parentFingerprint),Ud(this.index),this.chainCode,n)}};const EI=e=>{if(e.length===0)throw new Error("Array cannot be empty");const t=Math.floor(Math.random()*e.length);return e[t]};function px(e,t){return function(){return e.apply(t,arguments)}}const{toString:SI}=Object.prototype,{getPrototypeOf:Ab}=Object,t0=(e=>t=>{const n=SI.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gr=e=>(e=e.toLowerCase(),t=>t0(t)===e),n0=e=>t=>typeof t===e,{isArray:ac}=Array,ff=n0("undefined");function kI(e){return e!==null&&!ff(e)&&e.constructor!==null&&!ff(e.constructor)&&or(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mx=Gr("ArrayBuffer");function CI(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mx(e.buffer),t}const AI=n0("string"),or=n0("function"),gx=n0("number"),r0=e=>e!==null&&typeof e=="object",TI=e=>e===!0||e===!1,bh=e=>{if(t0(e)!=="object")return!1;const t=Ab(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},II=Gr("Date"),$I=Gr("File"),PI=Gr("Blob"),OI=Gr("FileList"),RI=e=>r0(e)&&or(e.pipe),LI=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||or(e.append)&&((t=t0(e))==="formdata"||t==="object"&&or(e.toString)&&e.toString()==="[object FormData]"))},BI=Gr("URLSearchParams"),[NI,MI,jI,DI]=["ReadableStream","Request","Response","Headers"].map(Gr),FI=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ac(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Xs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bx=e=>!ff(e)&&e!==Xs;function m1(){const{caseless:e}=bx(this)&&this||{},t={},n=(r,i)=>{const o=e&&yx(t,i)||i;bh(t[o])&&bh(r)?t[o]=m1(t[o],r):bh(r)?t[o]=m1({},r):ac(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Jf(t,(i,o)=>{n&&or(i)?e[o]=px(i,n):e[o]=i},{allOwnKeys:r}),e),HI=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zI=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},WI=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Ab(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},VI=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},qI=e=>{if(!e)return null;if(ac(e))return e;let t=e.length;if(!gx(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},GI=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ab(Uint8Array)),KI=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},ZI=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},XI=Gr("HTMLFormElement"),YI=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),M2=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),QI=Gr("RegExp"),vx=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jf(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},JI=e=>{vx(e,(t,n)=>{if(or(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(or(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},e$=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ac(e)?r(e):r(String(e).split(t)),n},t$=()=>{},n$=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Cm="abcdefghijklmnopqrstuvwxyz",j2="0123456789",wx={DIGIT:j2,ALPHA:Cm,ALPHA_DIGIT:Cm+Cm.toUpperCase()+j2},r$=(e=16,t=wx.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function i$(e){return!!(e&&or(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const o$=e=>{const t=new Array(10),n=(r,i)=>{if(r0(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=ac(r)?[]:{};return Jf(r,(s,a)=>{const l=n(s,i+1);!ff(l)&&(o[a]=l)}),t[i]=void 0,o}}return r};return n(e,0)},s$=Gr("AsyncFunction"),a$=e=>e&&(r0(e)||or(e))&&or(e.then)&&or(e.catch),_x=((e,t)=>e?setImmediate:t?((n,r)=>(Xs.addEventListener("message",({source:i,data:o})=>{i===Xs&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Xs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",or(Xs.postMessage)),l$=typeof queueMicrotask<"u"?queueMicrotask.bind(Xs):typeof process<"u"&&process.nextTick||_x,q={isArray:ac,isArrayBuffer:mx,isBuffer:kI,isFormData:LI,isArrayBufferView:CI,isString:AI,isNumber:gx,isBoolean:TI,isObject:r0,isPlainObject:bh,isReadableStream:NI,isRequest:MI,isResponse:jI,isHeaders:DI,isUndefined:ff,isDate:II,isFile:$I,isBlob:PI,isRegExp:QI,isFunction:or,isStream:RI,isURLSearchParams:BI,isTypedArray:GI,isFileList:OI,forEach:Jf,merge:m1,extend:UI,trim:FI,stripBOM:HI,inherits:zI,toFlatObject:WI,kindOf:t0,kindOfTest:Gr,endsWith:VI,toArray:qI,forEachEntry:KI,matchAll:ZI,isHTMLForm:XI,hasOwnProperty:M2,hasOwnProp:M2,reduceDescriptors:vx,freezeMethods:JI,toObjectSet:e$,toCamelCase:YI,noop:t$,toFiniteNumber:n$,findKey:yx,global:Xs,isContextDefined:bx,ALPHABET:wx,generateString:r$,isSpecCompliantForm:i$,toJSONObject:o$,isAsyncFn:s$,isThenable:a$,setImmediate:_x,asap:l$};function Oe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}q.inherits(Oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const xx=Oe.prototype,Ex={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ex[e]={value:e}});Object.defineProperties(Oe,Ex);Object.defineProperty(xx,"isAxiosError",{value:!0});Oe.from=(e,t,n,r,i,o)=>{const s=Object.create(xx);return q.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Oe.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const c$=null;function g1(e){return q.isPlainObject(e)||q.isArray(e)}function Sx(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function D2(e,t,n){return e?e.concat(t).map(function(i,o){return i=Sx(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function u$(e){return q.isArray(e)&&!e.some(g1)}const f$=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function i0(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!q.isUndefined(y[h])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(q.isDate(p))return p.toISOString();if(!l&&q.isBlob(p))throw new Oe("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(p)||q.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,h,y){let g=p;if(p&&!y&&typeof p=="object"){if(q.endsWith(h,"{}"))h=r?h:h.slice(0,-2),p=JSON.stringify(p);else if(q.isArray(p)&&u$(p)||(q.isFileList(p)||q.endsWith(h,"[]"))&&(g=q.toArray(p)))return h=Sx(h),g.forEach(function(v,w){!(q.isUndefined(v)||v===null)&&t.append(s===!0?D2([h],w,o):s===null?h:h+"[]",u(v))}),!1}return g1(p)?!0:(t.append(D2(y,h,o),u(p)),!1)}const c=[],f=Object.assign(f$,{defaultVisitor:d,convertValue:u,isVisitable:g1});function m(p,h){if(!q.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));c.push(p),q.forEach(p,function(g,b){(!(q.isUndefined(g)||g===null)&&i.call(t,g,q.isString(b)?b.trim():b,h,f))===!0&&m(g,h?h.concat(b):[b])}),c.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return m(e),t}function F2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Tb(e,t){this._pairs=[],e&&i0(e,this,t)}const kx=Tb.prototype;kx.append=function(t,n){this._pairs.push([t,n])};kx.toString=function(t){const n=t?function(r){return t.call(this,r,F2)}:F2;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function d$(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cx(e,t,n){if(!t)return e;const r=n&&n.encode||d$,i=n&&n.serialize;let o;if(i?o=i(t,n):o=q.isURLSearchParams(t)?t.toString():new Tb(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class U2{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ax={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},h$=typeof URLSearchParams<"u"?URLSearchParams:Tb,p$=typeof FormData<"u"?FormData:null,m$=typeof Blob<"u"?Blob:null,g$={isBrowser:!0,classes:{URLSearchParams:h$,FormData:p$,Blob:m$},protocols:["http","https","file","blob","url","data"]},Ib=typeof window<"u"&&typeof document<"u",y1=typeof navigator=="object"&&navigator||void 0,y$=Ib&&(!y1||["ReactNative","NativeScript","NS"].indexOf(y1.product)<0),b$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",v$=Ib&&window.location.href||"http://localhost",w$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ib,hasStandardBrowserEnv:y$,hasStandardBrowserWebWorkerEnv:b$,navigator:y1,origin:v$},Symbol.toStringTag,{value:"Module"})),zn={...w$,...g$};function _$(e,t){return i0(e,new zn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return zn.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function x$(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function E$(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&q.isArray(i)?i.length:s,l?(q.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!q.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&q.isArray(i[s])&&(i[s]=E$(i[s])),!a)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,i)=>{t(x$(r),i,n,0)}),n}return null}function S$(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ed={transitional:Ax,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return i?JSON.stringify(Tx(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _$(t,this.formSerializer).toString();if((a=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return i0(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),S$(t)):t}],transformResponse:[function(t){const n=this.transitional||ed.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?Oe.from(a,Oe.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zn.classes.FormData,Blob:zn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{ed.headers[e]={}});const k$=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),C$=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&k$[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},H2=Symbol("internals");function ou(e){return e&&String(e).trim().toLowerCase()}function vh(e){return e===!1||e==null?e:q.isArray(e)?e.map(vh):String(e)}function A$(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const T$=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Am(e,t,n,r,i){if(q.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function I$(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function $$(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class Wn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,l,u){const d=ou(l);if(!d)throw new Error("header name must be a non-empty string");const c=q.findKey(i,d);(!c||i[c]===void 0||u===!0||u===void 0&&i[c]!==!1)&&(i[c||l]=vh(a))}const s=(a,l)=>q.forEach(a,(u,d)=>o(u,d,l));if(q.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(q.isString(t)&&(t=t.trim())&&!T$(t))s(C$(t),n);else if(q.isHeaders(t))for(const[a,l]of t.entries())o(l,a,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=ou(t),t){const r=q.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return A$(i);if(q.isFunction(n))return n.call(this,i,r);if(q.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ou(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Am(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=ou(s),s){const a=q.findKey(r,s);a&&(!n||Am(r,r[a],a,n))&&(delete r[a],i=!0)}}return q.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Am(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return q.forEach(this,(i,o)=>{const s=q.findKey(r,o);if(s){n[s]=vh(i),delete n[o];return}const a=t?I$(o):String(o).trim();a!==o&&delete n[o],n[a]=vh(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[H2]=this[H2]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=ou(s);r[a]||($$(i,s),r[a]=!0)}return q.isArray(t)?t.forEach(o):o(t),this}}Wn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(Wn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});q.freezeMethods(Wn);function Tm(e,t){const n=this||ed,r=t||n,i=Wn.from(r.headers);let o=r.data;return q.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ix(e){return!!(e&&e.__CANCEL__)}function lc(e,t,n){Oe.call(this,e??"canceled",Oe.ERR_CANCELED,t,n),this.name="CanceledError"}q.inherits(lc,Oe,{__CANCEL__:!0});function $x(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Oe("Request failed with status code "+n.status,[Oe.ERR_BAD_REQUEST,Oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function P$(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function O$(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=r[o];s||(s=u),n[i]=l,r[i]=u;let c=o,f=0;for(;c!==i;)f+=n[c++],c=c%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s{n=d,i=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),c=d-n;c>=r?s(u,d):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-c)))},()=>i&&s(i)]}const ap=(e,t,n=3)=>{let r=0;const i=O$(50,250);return R$(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,u=i(l),d=s<=a;r=s;const c={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&d?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},z2=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},W2=e=>(...t)=>q.asap(()=>e(...t)),L$=zn.hasStandardBrowserEnv?function(){const t=zn.navigator&&/(msie|trident)/i.test(zn.navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=q.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),B$=zn.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];q.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),q.isString(r)&&s.push("path="+r),q.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function N$(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function M$(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Px(e,t){return e&&!N$(t)?M$(e,t):t}const V2=e=>e instanceof Wn?{...e}:e;function ya(e,t){t=t||{};const n={};function r(u,d,c){return q.isPlainObject(u)&&q.isPlainObject(d)?q.merge.call({caseless:c},u,d):q.isPlainObject(d)?q.merge({},d):q.isArray(d)?d.slice():d}function i(u,d,c){if(q.isUndefined(d)){if(!q.isUndefined(u))return r(void 0,u,c)}else return r(u,d,c)}function o(u,d){if(!q.isUndefined(d))return r(void 0,d)}function s(u,d){if(q.isUndefined(d)){if(!q.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,c){if(c in t)return r(u,d);if(c in e)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,d)=>i(V2(u),V2(d),!0)};return q.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=l[d]||i,f=c(e[d],t[d],d);q.isUndefined(f)&&c!==a||(n[d]=f)}),n}const Ox=e=>{const t=ya({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;t.headers=s=Wn.from(s),t.url=Cx(Px(t.baseURL,t.url),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(q.isFormData(n)){if(zn.hasStandardBrowserEnv||zn.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...d]=l?l.split(";").map(c=>c.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(zn.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(t)),r||r!==!1&&L$(t.url))){const u=i&&o&&B$.read(o);u&&s.set(i,u)}return t},j$=typeof XMLHttpRequest<"u",D$=j$&&function(e){return new Promise(function(n,r){const i=Ox(e);let o=i.data;const s=Wn.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,d,c,f,m,p;function h(){m&&m(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function g(){if(!y)return;const v=Wn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:v,config:e,request:y};$x(function(k){n(k),h()},function(k){r(k),h()},E),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(g)},y.onabort=function(){y&&(r(new Oe("Request aborted",Oe.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new Oe("Network Error",Oe.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let w=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Ax;i.timeoutErrorMessage&&(w=i.timeoutErrorMessage),r(new Oe(w,E.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,e,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&q.forEach(s.toJSON(),function(w,E){y.setRequestHeader(E,w)}),q.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),a&&a!=="json"&&(y.responseType=i.responseType),u&&([f,p]=ap(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([c,m]=ap(l),y.upload.addEventListener("progress",c),y.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(d=v=>{y&&(r(!v||v.type?new lc(null,e,y):v),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const b=P$(i.url);if(b&&zn.protocols.indexOf(b)===-1){r(new Oe("Unsupported protocol "+b+":",Oe.ERR_BAD_REQUEST,e));return}y.send(o||null)})},F$=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const d=u instanceof Error?u:this.reason;r.abort(d instanceof Oe?d:new lc(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,o(new Oe(`timeout ${t} of ms exceeded`,Oe.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>q.asap(a),l}},U$=function*(e,t){let n=e.byteLength;if(!t||n{const i=H$(e,t);let o=0,s,a=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await i.next();if(u){a(),l.close();return}let c=d.byteLength;if(n){let f=o+=c;n(f)}l.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},o0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rx=o0&&typeof ReadableStream=="function",W$=o0&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Lx=(e,...t)=>{try{return!!e(...t)}catch{return!1}},V$=Rx&&Lx(()=>{let e=!1;const t=new Request(zn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),G2=64*1024,b1=Rx&&Lx(()=>q.isReadableStream(new Response("").body)),lp={stream:b1&&(e=>e.body)};o0&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!lp[t]&&(lp[t]=q.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Oe(`Response type '${t}' is not supported`,Oe.ERR_NOT_SUPPORT,r)})})})(new Response);const q$=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e))return(await new Request(zn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e=e+""),q.isString(e))return(await W$(e)).byteLength},G$=async(e,t)=>{const n=q.toFiniteNumber(e.getContentLength());return n??q$(t)},K$=o0&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:d,withCredentials:c="same-origin",fetchOptions:f}=Ox(e);u=u?(u+"").toLowerCase():"text";let m=F$([i,o&&o.toAbortSignal()],s),p;const h=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(l&&V$&&n!=="get"&&n!=="head"&&(y=await G$(d,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(q.isFormData(r)&&(C=E.headers.get("content-type"))&&d.setContentType(C),E.body){const[k,_]=z2(y,ap(W2(l)));r=q2(E.body,G2,k,_)}}q.isString(c)||(c=c?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...f,signal:m,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:g?c:void 0});let b=await fetch(p);const v=b1&&(u==="stream"||u==="response");if(b1&&(a||v&&h)){const E={};["status","statusText","headers"].forEach(S=>{E[S]=b[S]});const C=q.toFiniteNumber(b.headers.get("content-length")),[k,_]=a&&z2(C,ap(W2(a),!0))||[];b=new Response(q2(b.body,G2,k,()=>{_&&_(),h&&h()}),E)}u=u||"text";let w=await lp[q.findKey(lp,u)||"text"](b,e);return!v&&h&&h(),await new Promise((E,C)=>{$x(E,C,{data:w,headers:Wn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:p})})}catch(g){throw h&&h(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Oe("Network Error",Oe.ERR_NETWORK,e,p),{cause:g.cause||g}):Oe.from(g,g&&g.code,e,p)}}),v1={http:c$,xhr:D$,fetch:K$};q.forEach(v1,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const K2=e=>`- ${e}`,Z$=e=>q.isFunction(e)||e===null||e===!1,Bx={getAdapter:e=>{e=q.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since : +`+o.map(K2).join(` +`):" "+K2(o[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:v1};function Im(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new lc(null,e)}function Z2(e){return Im(e),e.headers=Wn.from(e.headers),e.data=Tm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bx.getAdapter(e.adapter||ed.adapter)(e).then(function(r){return Im(e),r.data=Tm.call(e,e.transformResponse,r),r.headers=Wn.from(r.headers),r},function(r){return Ix(r)||(Im(e),r&&r.response&&(r.response.data=Tm.call(e,e.transformResponse,r.response),r.response.headers=Wn.from(r.response.headers))),Promise.reject(r)})}const Nx="1.7.7",$b={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$b[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const X2={};$b.transitional=function(t,n,r){function i(o,s){return"[Axios v"+Nx+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new Oe(i(s," has been removed"+(n?" in "+n:"")),Oe.ERR_DEPRECATED);return n&&!X2[s]&&(X2[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function X$(e,t,n){if(typeof e!="object")throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new Oe("option "+o+" must be "+l,Oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Oe("Unknown option "+o,Oe.ERR_BAD_OPTION)}}const w1={assertOptions:X$,validators:$b},Io=w1.validators;class sa{constructor(t){this.defaults=t,this.interceptors={request:new U2,response:new U2}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ya(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&w1.assertOptions(r,{silentJSONParsing:Io.transitional(Io.boolean),forcedJSONParsing:Io.transitional(Io.boolean),clarifyTimeoutError:Io.transitional(Io.boolean)},!1),i!=null&&(q.isFunction(i)?n.paramsSerializer={serialize:i}:w1.assertOptions(i,{encode:Io.function,serialize:Io.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&q.merge(o.common,o[n.method]);o&&q.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=Wn.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let d,c=0,f;if(!l){const p=[Z2.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),f=p.length,d=Promise.resolve(n);c{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new lc(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Pb(function(i){t=i}),cancel:t}}}function Y$(e){return function(n){return e.apply(null,n)}}function Q$(e){return q.isObject(e)&&e.isAxiosError===!0}const _1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_1).forEach(([e,t])=>{_1[t]=e});function Mx(e){const t=new sa(e),n=px(sa.prototype.request,t);return q.extend(n,sa.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Mx(ya(e,i))},n}const Nt=Mx(ed);Nt.Axios=sa;Nt.CanceledError=lc;Nt.CancelToken=Pb;Nt.isCancel=Ix;Nt.VERSION=Nx;Nt.toFormData=i0;Nt.AxiosError=Oe;Nt.Cancel=Nt.CanceledError;Nt.all=function(t){return Promise.all(t)};Nt.spread=Y$;Nt.isAxiosError=Q$;Nt.mergeConfig=ya;Nt.AxiosHeaders=Wn;Nt.formToJSON=e=>Tx(q.isHTMLForm(e)?new FormData(e):e);Nt.getAdapter=Bx.getAdapter;Nt.HttpStatusCode=_1;Nt.default=Nt;const J$="1.0.5";let Cr=class x1 extends Error{constructor(t,n={}){var s;const r=n.cause instanceof x1?n.cause.details:(s=n.cause)!=null&&s.message?n.cause.message:n.details,i=n.cause instanceof x1&&n.cause.docsPath||n.docsPath,o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${J$}`].join(` +`);super(o),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}};function vs(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const jx=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Dx=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Fx=/^\(.+?\).*?$/,Y2=/^tuple(?(\[(\d*)\])*)$/;function E1(e){let t=e.type;if(Y2.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let i=0;i[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function tP(e){return Ux.test(e)}function nP(e){return vs(Ux,e)}const Hx=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function rP(e){return Hx.test(e)}function iP(e){return vs(Hx,e)}const zx=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;function oP(e){return zx.test(e)}function sP(e){return vs(zx,e)}const Wx=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;function Vx(e){return Wx.test(e)}function aP(e){return vs(Wx,e)}const qx=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;function lP(e){return qx.test(e)}function cP(e){return vs(qx,e)}const uP=/^fallback\(\) external(?:\s(?payable{1}))?$/;function fP(e){return uP.test(e)}const dP=/^receive\(\) external payable$/;function hP(e){return dP.test(e)}const pP=new Set(["indexed"]),S1=new Set(["calldata","memory","storage"]);class mP extends Cr{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class gP extends Cr{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class yP extends Cr{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class bP extends Cr{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class vP extends Cr{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class wP extends Cr{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class _P extends Cr{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class bu extends Cr{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class xP extends Cr{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class EP extends Cr{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class SP extends Cr{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class kP extends Cr{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function CP(e,t){return t?`${t}:${e}`:e}const $m=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function AP(e,t={}){if(oP(e)){const n=sP(e);if(!n)throw new bu({signature:e,type:"function"});const r=Ur(n.parameters),i=[],o=r.length;for(let a=0;a[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,IP=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,$P=/^u?int$/;function Ws(e,t){var c,f;const n=CP(e,t==null?void 0:t.type);if($m.has(n))return $m.get(n);const r=Fx.test(e),i=vs(r?IP:TP,e);if(!i)throw new yP({param:e});if(i.name&&OP(i.name))throw new bP({param:e,name:i.name});const o=i.name?{name:i.name}:{},s=i.modifier==="indexed"?{indexed:!0}:{},a=(t==null?void 0:t.structs)??{};let l,u={};if(r){l="tuple";const m=Ur(i.type),p=[],h=m.length;for(let y=0;y[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function Kx(e,t,n=new Set){const r=[],i=e.length;for(let o=0;ot(e,o)}function no(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new KP(e.type);return`${e.name}(${s0(e.inputs,{includeName:t})})`}function s0(e,{includeName:t=!1}={}){return e?e.map(n=>NP(n,{includeName:t})).join(t?", ":","):""}function NP(e,{includeName:t}){return e.type.startsWith("tuple")?`(${s0(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function Er(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function At(e){return Er(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Xx="2.21.6";let Hd={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:Xx},J=class k1 extends Error{constructor(t,n={}){var a;const r=(()=>{var l;return n.cause instanceof k1?n.cause.details:(l=n.cause)!=null&&l.message?n.cause.message:n.details})(),i=n.cause instanceof k1&&n.cause.docsPath||n.docsPath,o=(a=Hd.getDocsUrl)==null?void 0:a.call(Hd,{...n,docsPath:i}),s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],`Version: ${Hd.version}`].join(` `);super(s,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Xx}walk(t){return Yx(this,t)}};function Yx(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?Yx(e.cause,t):t?null:e}class MP extends J{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` -`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class Y2 extends J{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class Q2 extends J{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class Qx extends J{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(` `),{metaMessages:[`Params: (${s0(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class a0 extends J{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class jP extends J{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(` `),{name:"AbiEncodingArrayLengthMismatchError"})}}class DP extends J{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${At(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class FP extends J{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(` `),{name:"AbiEncodingLengthMismatchError"})}}class Jx extends J{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(` `),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class UP extends J{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class e8 extends J{constructor(t,{docsPath:n}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(` -`),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class Q2 extends J{constructor(t,{docsPath:n}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` +`),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class J2 extends J{constructor(t,{docsPath:n}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` `),{docsPath:n,name:"AbiEventNotFoundError"})}}class cp extends J{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` `),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class HP extends J{constructor(t,{docsPath:n}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` `),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class zP extends J{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${no(t.abiItem)}\`, and`,`\`${n.type}\` in \`${no(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class WP extends J{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}}class df extends J{constructor({abiItem:t,data:n,params:r,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join(` @@ -2136,43 +2136,43 @@ zoo`.split(` `),{docsPath:n,name:"InvalidAbiEncodingType"})}}class qP extends J{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` `),{docsPath:n,name:"InvalidAbiDecodingType"})}}class GP extends J{constructor(t){super([`Value "${t}" is not a valid array.`].join(` `),{name:"InvalidArrayError"})}}class KP extends J{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` -`),{name:"InvalidDefinitionTypeError"})}}class ZP extends J{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}let t8=class extends J{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},n8=class extends J{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}},J2=class extends J{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}};function cc(e,{dir:t,size:n=32}={}){return typeof e=="string"?rs(e,{dir:t,size:n}):XP(e,{dir:t,size:n})}function rs(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new n8({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function XP(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new n8({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new JP({givenSize:At(e),maxSize:t})}function ls(e,t={}){const{signed:n}=t;t.size&&_i(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function Te(e,t={}){return typeof e=="number"||typeof e=="bigint"?Ae(e,t):typeof e=="string"?Fl(e,t):typeof e=="boolean"?r8(e,t):Mt(e,t)}function r8(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(_i(n,{size:t.size}),cc(n,{size:t.size})):n}function Mt(e,t={}){let n="";for(let i=0;io||i=ji.zero&&e<=ji.nine)return e-ji.zero;if(e>=ji.A&&e<=ji.F)return e-(ji.A-10);if(e>=ji.a&&e<=ji.f)return e-(ji.a-10)}function Sr(e,t={}){let n=e;t.size&&(_i(n,{size:t.size}),n=cc(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let s=0,a=0;s0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function sO(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");up(e.outputLen),up(e.blockLen)}function Ul(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function i8(e,t){Hr(e);const n=t.outputLen;if(e.length>C1&zd)}:{h:Number(e>>C1&zd)|0,l:Number(e&zd)|0}}function s8(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0),lO=(e,t,n)=>e>>>n,cO=(e,t,n)=>e<<32-n|t>>>n,uO=(e,t,n)=>e>>>n|t<<32-n,fO=(e,t,n)=>e<<32-n|t>>>n,dO=(e,t,n)=>e<<64-n|t>>>n-32,hO=(e,t,n)=>e>>>n-32|t<<64-n,pO=(e,t)=>t,mO=(e,t)=>e,a8=(e,t,n)=>e<>>32-n,l8=(e,t,n)=>t<>>32-n,c8=(e,t,n)=>t<>>64-n,u8=(e,t,n)=>e<>>64-n;function gO(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}const yO=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),bO=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,vO=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),wO=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,_O=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),xO=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0,Me={fromBig:o8,split:s8,toBig:aO,shrSH:lO,shrSL:cO,rotrSH:uO,rotrSL:fO,rotrBH:dO,rotrBL:hO,rotr32H:pO,rotr32L:mO,rotlSH:a8,rotlSL:l8,rotlBH:c8,rotlBL:u8,add:gO,add3L:yO,add3H:bO,add4L:vO,add4H:wO,add5H:xO,add5L:_O},Pm=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const EO=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),_l=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),si=(e,t)=>e<<32-t|e>>>t,Wd=(e,t)=>e<>>32-t>>>0,t6=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,SO=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function n6(e){for(let t=0;tt.toString(16).padStart(2,"0"));function CO(e){Hr(e);let t="";for(let n=0;n=Di._0&&e<=Di._9)return e-Di._0;if(e>=Di._A&&e<=Di._F)return e-(Di._A-10);if(e>=Di._a&&e<=Di._f)return e-(Di._a-10)}function AO(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;ie().update(c0(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function TO(e=32){if(Pm&&typeof Pm.getRandomValues=="function")return Pm.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const d8=[],h8=[],p8=[],IO=BigInt(0),au=BigInt(1),$O=BigInt(2),PO=BigInt(7),OO=BigInt(256),RO=BigInt(113);for(let e=0,t=au,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],d8.push(2*(5*r+n)),h8.push((e+1)*(e+2)/2%64);let i=IO;for(let o=0;o<7;o++)t=(t<>PO)*RO)%OO,t&$O&&(i^=au<<(au<n>32?c8(e,t,n):a8(e,t,n),o6=(e,t,n)=>n>32?u8(e,t,n):l8(e,t,n);function NO(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){const a=(s+8)%10,l=(s+2)%10,u=n[l],d=n[l+1],c=i6(u,d,1)^n[a],f=o6(u,d,1)^n[a+1];for(let m=0;m<50;m+=10)e[s+m]^=c,e[s+m+1]^=f}let i=e[2],o=e[3];for(let s=0;s<24;s++){const a=h8[s],l=i6(i,o,a),u=o6(i,o,a),d=d8[s];i=e[d],o=e[d+1],e[d]=l,e[d+1]=u}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)n[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=LO[r],e[1]^=BO[r]}n.fill(0)}class Ob extends Pb{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,up(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=EO(this.state)}keccak(){t6||n6(this.state32),NO(this.state32,this.rounds),t6||n6(this.state32),this.posOut=0,this.pos=0}update(t){Ul(this);const{blockLen:n,state:r}=this;t=c0(t);const i=t.length;for(let o=0;o=r&&this.keccak();const s=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return up(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(i8(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new Ob(n,r,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}}const MO=(e,t,n)=>u0(()=>new Ob(t,e,n)),jO=MO(1,136,256/8);function zt(e,t){const n=t||"hex",r=jO(Er(e,{strict:!1})?cs(e):e);return n==="bytes"?r:Te(r)}const DO=e=>zt(cs(e));function FO(e){return DO(e)}function UO(e){let t=!0,n="",r=0,i="",o=!1;for(let s=0;s{const t=typeof e=="string"?e:eP(e);return UO(t)};function m8(e){return FO(HO(e))}const f0=m8;class Pn extends J{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class Rb extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const Om=new Rb(8192);function td(e,t){if(Om.has(`${e}.${t}`))return Om.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=zt(aa(n),"bytes"),i=n.split("");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&i[s]&&(i[s]=i[s].toUpperCase()),(r[s>>1]&15)>=8&&i[s+1]&&(i[s+1]=i[s+1].toUpperCase());const o=`0x${i.join("")}`;return Om.set(`${e}.${t}`,o),o}function fp(e,t){if(!on(e,{strict:!1}))throw new Pn({address:e});return td(e,t)}const zO=/^0x[a-fA-F0-9]{40}$/,Rm=new Rb(8192);function on(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(Rm.has(r))return Rm.get(r);const i=zO.test(e)?e.toLowerCase()===e?!0:n?td(e)===e:!0:!1;return Rm.set(r,i),i}function ro(e){return typeof e[0]=="string"?so(e):WO(e)}function WO(e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function so(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function hf(e,t,n,{strict:r}={}){return Er(e,{strict:!1})?v8(e,t,n,{strict:r}):b8(e,t,n,{strict:r})}function g8(e,t){if(typeof t=="number"&&t>0&&t>At(e)-1)throw new t8({offset:t,position:"start",size:At(e)})}function y8(e,t,n){if(typeof t=="number"&&typeof n=="number"&&At(e)!==n-t)throw new t8({offset:n,position:"end",size:At(e)})}function b8(e,t,n,{strict:r}={}){g8(e,t);const i=e.slice(t,n);return r&&y8(i,t,n),i}function v8(e,t,n,{strict:r}={}){g8(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&y8(i,t,n),i}function uc(e,t){if(e.length!==t.length)throw new FP({expectedLength:e.length,givenLength:t.length});const n=VO({params:e,values:t}),r=Bb(n);return r.length===0?"0x":r}function VO({params:e,values:t}){const n=[];for(let r=0;r0?ro([a,s]):a}}if(i)return{dynamic:!0,encoded:s}}return{dynamic:!1,encoded:ro(o.map(({encoded:s})=>s))}}function KO(e,{param:t}){const[,n]=t.type.split("bytes"),r=At(e);if(!n){let i=e;return r%32!==0&&(i=rs(i,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:ro([rs(Ae(r,{size:32})),i])}}if(r!==Number.parseInt(n))throw new DP({expectedSize:Number.parseInt(n),value:e});return{dynamic:!1,encoded:rs(e,{dir:"right"})}}function ZO(e){if(typeof e!="boolean")throw new J(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:rs(r8(e))}}function XO(e,{signed:t}){return{dynamic:!1,encoded:Ae(e,{size:32,signed:t})}}function YO(e){const t=Fl(e),n=Math.ceil(At(t)/32),r=[];for(let i=0;ii))}}function Nb(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Mb=e=>hf(m8(e),0,4);function nd(e){const{abi:t,args:n=[],name:r}=e,i=Er(r,{strict:!1}),o=t.filter(a=>i?a.type==="function"?Mb(a)===r:a.type==="event"?f0(a)===r:!1:"name"in a&&a.name===r);if(o.length===0)return;if(o.length===1)return o[0];let s;for(const a of o){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((u,d)=>{const c="inputs"in a&&a.inputs[d];return c?A1(u,c):!1})){if(s&&"inputs"in s&&s.inputs){const u=w8(a.inputs,s.inputs,n);if(u)throw new zP({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a}}return s||o[0]}function A1(e,t){const n=typeof e,r=t.type;switch(r){case"address":return on(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((i,o)=>A1(Object.values(e)[o],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(i=>A1(i,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function w8(e,t,n){for(const r in e){const i=e[r],o=t[r];if(i.type==="tuple"&&o.type==="tuple"&&"components"in i&&"components"in o)return w8(i.components,o.components,n[r]);const s=[i.type,o.type];if(s.includes("address")&&s.includes("bytes20")?!0:s.includes("address")&&s.includes("string")?on(n[r],{strict:!1}):s.includes("address")&&s.includes("bytes")?on(n[r],{strict:!1}):!1)return s}}const s6="/docs/contract/encodeEventTopics";function rd(e){var l;const{abi:t,eventName:n,args:r}=e;let i=t[0];if(n){const u=nd({abi:t,name:n});if(!u)throw new Q2(n,{docsPath:s6});i=u}if(i.type!=="event")throw new Q2(void 0,{docsPath:s6});const o=no(i),s=f0(o);let a=[];if(r&&"inputs"in i){const u=(l=i.inputs)==null?void 0:l.filter(c=>"indexed"in c&&c.indexed),d=Array.isArray(r)?r:Object.values(r).length>0?(u==null?void 0:u.map(c=>r[c.name]))??[]:[];d.length>0&&(a=(u==null?void 0:u.map((c,f)=>Array.isArray(d[f])?d[f].map((m,p)=>a6({param:c,value:d[f][p]})):d[f]?a6({param:c,value:d[f]}):null))??[])}return[s,...a]}function a6({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return zt(cs(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new ZP(e.type);return uc([e],[t])}function d0(e,{method:t}){var r,i;const n={};return e.transport.type==="fallback"&&((i=(r=e.transport).onResponse)==null||i.call(r,({method:o,response:s,status:a,transport:l})=>{a==="success"&&t===o&&(n[s]=l.request)})),o=>n[o]||e.request}async function jb(e,t){const{address:n,abi:r,args:i,eventName:o,fromBlock:s,strict:a,toBlock:l}=t,u=d0(e,{method:"eth_newFilter"}),d=o?rd({abi:r,args:i,eventName:o}):void 0,c=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof s=="bigint"?Ae(s):s,toBlock:typeof l=="bigint"?Ae(l):l,topics:d}]});return{abi:r,args:i,eventName:o,id:c,request:u(c),strict:!!a,type:"event"}}function cr(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const l6="/docs/contract/encodeFunctionData";function JO(e){const{abi:t,args:n,functionName:r}=e;let i=t[0];if(r){const o=nd({abi:t,args:n,name:r});if(!o)throw new cp(r,{docsPath:l6});i=o}if(i.type!=="function")throw new cp(void 0,{docsPath:l6});return{abi:[i],functionName:Mb(no(i))}}function ws(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:JO(e)})(),i=n[0],o=r,s="inputs"in i&&i.inputs?uc(i.inputs,t??[]):void 0;return so([o,s??"0x"])}const _8={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},eR={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},tR={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};class c6 extends J{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class x8 extends J{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class nR extends J{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const rR={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new nR({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new x8({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new c6({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new c6({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Db(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(rR);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function iR(e,t={}){typeof t.size<"u"&&_i(e,{size:t.size});const n=Mt(e,t);return ls(n,t)}function oR(e,t={}){let n=e;if(typeof t.size<"u"&&(_i(n,{size:t.size}),n=as(n)),n.length>1||n[0]>1)throw new QP(n);return!!n[0]}function Yi(e,t={}){typeof t.size<"u"&&_i(e,{size:t.size});const n=Mt(e,t);return yi(n,t)}function sR(e,t={}){let n=e;return typeof t.size<"u"&&(_i(n,{size:t.size}),n=as(n,{dir:"right"})),new TextDecoder().decode(n)}function h0(e,t){const n=typeof t=="string"?Sr(t):t,r=Db(n);if(At(n)===0&&e.length>0)throw new a0;if(At(t)&&At(t)<32)throw new Qx({data:typeof t=="string"?t:Mt(t),params:e,size:At(t)});let i=0;const o=[];for(let s=0;s48?iR(i,{signed:n}):Yi(i,{signed:n}),32]}function dR(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:s})=>!s),i=r?[]:{};let o=0;if(pf(t)){const s=Yi(e.readBytes(T1)),a=n+s;for(let l=0;ls.type==="error"&&r===Mb(no(s)));if(!o)throw new Jx(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:o,args:"inputs"in o&&o.inputs&&o.inputs.length>0?h0(o.inputs,hf(n,4)):void 0,errorName:o.name}}const hn=(e,t,n)=>JSON.stringify(e,(r,i)=>typeof i=="bigint"?i.toString():i,n);function E8({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((i,o)=>`${r&&i.name?`${i.name}: `:""}${typeof t[o]=="object"?hn(t[o]):t[o]}`).join(", ")})`}const mR={gwei:9,wei:18},gR={ether:-9,wei:9};function S8(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${o?`.${o}`:""}`}function Fb(e,t="wei"){return S8(e,mR[t])}function Vn(e,t="wei"){return S8(e,gR[t])}class yR extends J{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class bR extends J{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function f6(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r} +`),{name:"InvalidDefinitionTypeError"})}}class ZP extends J{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}let t8=class extends J{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},n8=class extends J{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}},e6=class extends J{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}};function cc(e,{dir:t,size:n=32}={}){return typeof e=="string"?rs(e,{dir:t,size:n}):XP(e,{dir:t,size:n})}function rs(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new n8({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function XP(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new n8({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new JP({givenSize:At(e),maxSize:t})}function ls(e,t={}){const{signed:n}=t;t.size&&_i(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function Te(e,t={}){return typeof e=="number"||typeof e=="bigint"?Ae(e,t):typeof e=="string"?Ul(e,t):typeof e=="boolean"?r8(e,t):Mt(e,t)}function r8(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(_i(n,{size:t.size}),cc(n,{size:t.size})):n}function Mt(e,t={}){let n="";for(let i=0;io||i=ji.zero&&e<=ji.nine)return e-ji.zero;if(e>=ji.A&&e<=ji.F)return e-(ji.A-10);if(e>=ji.a&&e<=ji.f)return e-(ji.a-10)}function Sr(e,t={}){let n=e;t.size&&(_i(n,{size:t.size}),n=cc(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let s=0,a=0;s0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function sO(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");up(e.outputLen),up(e.blockLen)}function Hl(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function i8(e,t){Hr(e);const n=t.outputLen;if(e.length>C1&zd)}:{h:Number(e>>C1&zd)|0,l:Number(e&zd)|0}}function s8(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0),lO=(e,t,n)=>e>>>n,cO=(e,t,n)=>e<<32-n|t>>>n,uO=(e,t,n)=>e>>>n|t<<32-n,fO=(e,t,n)=>e<<32-n|t>>>n,dO=(e,t,n)=>e<<64-n|t>>>n-32,hO=(e,t,n)=>e>>>n-32|t<<64-n,pO=(e,t)=>t,mO=(e,t)=>e,a8=(e,t,n)=>e<>>32-n,l8=(e,t,n)=>t<>>32-n,c8=(e,t,n)=>t<>>64-n,u8=(e,t,n)=>e<>>64-n;function gO(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}const yO=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),bO=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,vO=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),wO=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,_O=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),xO=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0,Me={fromBig:o8,split:s8,toBig:aO,shrSH:lO,shrSL:cO,rotrSH:uO,rotrSL:fO,rotrBH:dO,rotrBL:hO,rotr32H:pO,rotr32L:mO,rotlSH:a8,rotlSL:l8,rotlBH:c8,rotlBL:u8,add:gO,add3L:yO,add3H:bO,add4L:vO,add4H:wO,add5H:xO,add5L:_O},Pm=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const EO=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),xl=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),si=(e,t)=>e<<32-t|e>>>t,Wd=(e,t)=>e<>>32-t>>>0,n6=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,SO=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function r6(e){for(let t=0;tt.toString(16).padStart(2,"0"));function CO(e){Hr(e);let t="";for(let n=0;n=Di._0&&e<=Di._9)return e-Di._0;if(e>=Di._A&&e<=Di._F)return e-(Di._A-10);if(e>=Di._a&&e<=Di._f)return e-(Di._a-10)}function AO(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;ie().update(c0(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function TO(e=32){if(Pm&&typeof Pm.getRandomValues=="function")return Pm.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const d8=[],h8=[],p8=[],IO=BigInt(0),au=BigInt(1),$O=BigInt(2),PO=BigInt(7),OO=BigInt(256),RO=BigInt(113);for(let e=0,t=au,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],d8.push(2*(5*r+n)),h8.push((e+1)*(e+2)/2%64);let i=IO;for(let o=0;o<7;o++)t=(t<>PO)*RO)%OO,t&$O&&(i^=au<<(au<n>32?c8(e,t,n):a8(e,t,n),s6=(e,t,n)=>n>32?u8(e,t,n):l8(e,t,n);function NO(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){const a=(s+8)%10,l=(s+2)%10,u=n[l],d=n[l+1],c=o6(u,d,1)^n[a],f=s6(u,d,1)^n[a+1];for(let m=0;m<50;m+=10)e[s+m]^=c,e[s+m+1]^=f}let i=e[2],o=e[3];for(let s=0;s<24;s++){const a=h8[s],l=o6(i,o,a),u=s6(i,o,a),d=d8[s];i=e[d],o=e[d+1],e[d]=l,e[d+1]=u}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)n[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=LO[r],e[1]^=BO[r]}n.fill(0)}class Rb extends Ob{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,up(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=EO(this.state)}keccak(){n6||r6(this.state32),NO(this.state32,this.rounds),n6||r6(this.state32),this.posOut=0,this.pos=0}update(t){Hl(this);const{blockLen:n,state:r}=this;t=c0(t);const i=t.length;for(let o=0;o=r&&this.keccak();const s=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return up(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(i8(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new Rb(n,r,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}}const MO=(e,t,n)=>u0(()=>new Rb(t,e,n)),jO=MO(1,136,256/8);function zt(e,t){const n=t||"hex",r=jO(Er(e,{strict:!1})?cs(e):e);return n==="bytes"?r:Te(r)}const DO=e=>zt(cs(e));function FO(e){return DO(e)}function UO(e){let t=!0,n="",r=0,i="",o=!1;for(let s=0;s{const t=typeof e=="string"?e:eP(e);return UO(t)};function m8(e){return FO(HO(e))}const f0=m8;class Pn extends J{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class Lb extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const Om=new Lb(8192);function td(e,t){if(Om.has(`${e}.${t}`))return Om.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=zt(aa(n),"bytes"),i=n.split("");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&i[s]&&(i[s]=i[s].toUpperCase()),(r[s>>1]&15)>=8&&i[s+1]&&(i[s+1]=i[s+1].toUpperCase());const o=`0x${i.join("")}`;return Om.set(`${e}.${t}`,o),o}function fp(e,t){if(!on(e,{strict:!1}))throw new Pn({address:e});return td(e,t)}const zO=/^0x[a-fA-F0-9]{40}$/,Rm=new Lb(8192);function on(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(Rm.has(r))return Rm.get(r);const i=zO.test(e)?e.toLowerCase()===e?!0:n?td(e)===e:!0:!1;return Rm.set(r,i),i}function ro(e){return typeof e[0]=="string"?so(e):WO(e)}function WO(e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function so(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function hf(e,t,n,{strict:r}={}){return Er(e,{strict:!1})?v8(e,t,n,{strict:r}):b8(e,t,n,{strict:r})}function g8(e,t){if(typeof t=="number"&&t>0&&t>At(e)-1)throw new t8({offset:t,position:"start",size:At(e)})}function y8(e,t,n){if(typeof t=="number"&&typeof n=="number"&&At(e)!==n-t)throw new t8({offset:n,position:"end",size:At(e)})}function b8(e,t,n,{strict:r}={}){g8(e,t);const i=e.slice(t,n);return r&&y8(i,t,n),i}function v8(e,t,n,{strict:r}={}){g8(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&y8(i,t,n),i}function uc(e,t){if(e.length!==t.length)throw new FP({expectedLength:e.length,givenLength:t.length});const n=VO({params:e,values:t}),r=Nb(n);return r.length===0?"0x":r}function VO({params:e,values:t}){const n=[];for(let r=0;r0?ro([a,s]):a}}if(i)return{dynamic:!0,encoded:s}}return{dynamic:!1,encoded:ro(o.map(({encoded:s})=>s))}}function KO(e,{param:t}){const[,n]=t.type.split("bytes"),r=At(e);if(!n){let i=e;return r%32!==0&&(i=rs(i,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:ro([rs(Ae(r,{size:32})),i])}}if(r!==Number.parseInt(n))throw new DP({expectedSize:Number.parseInt(n),value:e});return{dynamic:!1,encoded:rs(e,{dir:"right"})}}function ZO(e){if(typeof e!="boolean")throw new J(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:rs(r8(e))}}function XO(e,{signed:t}){return{dynamic:!1,encoded:Ae(e,{size:32,signed:t})}}function YO(e){const t=Ul(e),n=Math.ceil(At(t)/32),r=[];for(let i=0;ii))}}function Mb(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const jb=e=>hf(m8(e),0,4);function nd(e){const{abi:t,args:n=[],name:r}=e,i=Er(r,{strict:!1}),o=t.filter(a=>i?a.type==="function"?jb(a)===r:a.type==="event"?f0(a)===r:!1:"name"in a&&a.name===r);if(o.length===0)return;if(o.length===1)return o[0];let s;for(const a of o){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((u,d)=>{const c="inputs"in a&&a.inputs[d];return c?A1(u,c):!1})){if(s&&"inputs"in s&&s.inputs){const u=w8(a.inputs,s.inputs,n);if(u)throw new zP({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a}}return s||o[0]}function A1(e,t){const n=typeof e,r=t.type;switch(r){case"address":return on(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((i,o)=>A1(Object.values(e)[o],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(i=>A1(i,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function w8(e,t,n){for(const r in e){const i=e[r],o=t[r];if(i.type==="tuple"&&o.type==="tuple"&&"components"in i&&"components"in o)return w8(i.components,o.components,n[r]);const s=[i.type,o.type];if(s.includes("address")&&s.includes("bytes20")?!0:s.includes("address")&&s.includes("string")?on(n[r],{strict:!1}):s.includes("address")&&s.includes("bytes")?on(n[r],{strict:!1}):!1)return s}}const a6="/docs/contract/encodeEventTopics";function rd(e){var l;const{abi:t,eventName:n,args:r}=e;let i=t[0];if(n){const u=nd({abi:t,name:n});if(!u)throw new J2(n,{docsPath:a6});i=u}if(i.type!=="event")throw new J2(void 0,{docsPath:a6});const o=no(i),s=f0(o);let a=[];if(r&&"inputs"in i){const u=(l=i.inputs)==null?void 0:l.filter(c=>"indexed"in c&&c.indexed),d=Array.isArray(r)?r:Object.values(r).length>0?(u==null?void 0:u.map(c=>r[c.name]))??[]:[];d.length>0&&(a=(u==null?void 0:u.map((c,f)=>Array.isArray(d[f])?d[f].map((m,p)=>l6({param:c,value:d[f][p]})):d[f]?l6({param:c,value:d[f]}):null))??[])}return[s,...a]}function l6({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return zt(cs(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new ZP(e.type);return uc([e],[t])}function d0(e,{method:t}){var r,i;const n={};return e.transport.type==="fallback"&&((i=(r=e.transport).onResponse)==null||i.call(r,({method:o,response:s,status:a,transport:l})=>{a==="success"&&t===o&&(n[s]=l.request)})),o=>n[o]||e.request}async function Db(e,t){const{address:n,abi:r,args:i,eventName:o,fromBlock:s,strict:a,toBlock:l}=t,u=d0(e,{method:"eth_newFilter"}),d=o?rd({abi:r,args:i,eventName:o}):void 0,c=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof s=="bigint"?Ae(s):s,toBlock:typeof l=="bigint"?Ae(l):l,topics:d}]});return{abi:r,args:i,eventName:o,id:c,request:u(c),strict:!!a,type:"event"}}function cr(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const c6="/docs/contract/encodeFunctionData";function JO(e){const{abi:t,args:n,functionName:r}=e;let i=t[0];if(r){const o=nd({abi:t,args:n,name:r});if(!o)throw new cp(r,{docsPath:c6});i=o}if(i.type!=="function")throw new cp(void 0,{docsPath:c6});return{abi:[i],functionName:jb(no(i))}}function ws(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:JO(e)})(),i=n[0],o=r,s="inputs"in i&&i.inputs?uc(i.inputs,t??[]):void 0;return so([o,s??"0x"])}const _8={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},eR={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},tR={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};class u6 extends J{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class x8 extends J{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class nR extends J{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const rR={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new nR({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new x8({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new u6({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new u6({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Fb(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(rR);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function iR(e,t={}){typeof t.size<"u"&&_i(e,{size:t.size});const n=Mt(e,t);return ls(n,t)}function oR(e,t={}){let n=e;if(typeof t.size<"u"&&(_i(n,{size:t.size}),n=as(n)),n.length>1||n[0]>1)throw new QP(n);return!!n[0]}function Yi(e,t={}){typeof t.size<"u"&&_i(e,{size:t.size});const n=Mt(e,t);return yi(n,t)}function sR(e,t={}){let n=e;return typeof t.size<"u"&&(_i(n,{size:t.size}),n=as(n,{dir:"right"})),new TextDecoder().decode(n)}function h0(e,t){const n=typeof t=="string"?Sr(t):t,r=Fb(n);if(At(n)===0&&e.length>0)throw new a0;if(At(t)&&At(t)<32)throw new Qx({data:typeof t=="string"?t:Mt(t),params:e,size:At(t)});let i=0;const o=[];for(let s=0;s48?iR(i,{signed:n}):Yi(i,{signed:n}),32]}function dR(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:s})=>!s),i=r?[]:{};let o=0;if(pf(t)){const s=Yi(e.readBytes(T1)),a=n+s;for(let l=0;ls.type==="error"&&r===jb(no(s)));if(!o)throw new Jx(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:o,args:"inputs"in o&&o.inputs&&o.inputs.length>0?h0(o.inputs,hf(n,4)):void 0,errorName:o.name}}const hn=(e,t,n)=>JSON.stringify(e,(r,i)=>typeof i=="bigint"?i.toString():i,n);function E8({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((i,o)=>`${r&&i.name?`${i.name}: `:""}${typeof t[o]=="object"?hn(t[o]):t[o]}`).join(", ")})`}const mR={gwei:9,wei:18},gR={ether:-9,wei:9};function S8(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${o?`.${o}`:""}`}function Ub(e,t="wei"){return S8(e,mR[t])}function Vn(e,t="wei"){return S8(e,gR[t])}class yR extends J{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class bR extends J{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function d6(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r} `,"")}function vR(e){return e.reduce((t,{address:n,...r})=>{let i=`${t} ${n}: `;return r.nonce&&(i+=` nonce: ${r.nonce} `),r.balance&&(i+=` balance: ${r.balance} `),r.code&&(i+=` code: ${r.code} `),r.state&&(i+=` state: -`,i+=f6(r.state)),r.stateDiff&&(i+=` stateDiff: -`,i+=f6(r.stateDiff)),i},` State Override: +`,i+=d6(r.state)),r.stateDiff&&(i+=` stateDiff: +`,i+=d6(r.stateDiff)),i},` State Override: `).slice(0,-1)}function id(e){const t=Object.entries(e).map(([r,i])=>i===void 0||i===!1?null:[r,i]).filter(Boolean),n=t.reduce((r,[i])=>Math.max(r,i.length),0);return t.map(([r,i])=>` ${`${r}:`.padEnd(n+1)} ${i}`).join(` `)}class wR extends J{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` -`),{name:"FeeConflictError"})}}class _R extends J{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class xR extends J{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",id(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class ER extends J{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class SR extends J{constructor(t,{account:n,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:c,value:f}){var p;const m=id({chain:i&&`${i==null?void 0:i.name} (id: ${i==null?void 0:i.id})`,from:n==null?void 0:n.address,to:c,value:typeof f<"u"&&`${Fb(f)} ${((p=i==null?void 0:i.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof a<"u"&&`${Vn(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${Vn(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Vn(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class k8 extends J{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:i,index:o}){let s="Transaction";r&&o!==void 0&&(s=`Transaction at block time "${r}" at index "${o}"`),t&&o!==void 0&&(s=`Transaction at block hash "${t}" at index "${o}"`),n&&o!==void 0&&(s=`Transaction at block number "${n}" at index "${o}"`),i&&(s=`Transaction with hash "${i}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"})}}class C8 extends J{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class d6 extends J{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const kR=e=>e,Ub=e=>e;class A8 extends J{constructor(t,{account:n,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:c,value:f,stateOverride:m}){var y;const p=n?cr(n):void 0;let h=id({from:p==null?void 0:p.address,to:c,value:typeof f<"u"&&`${Fb(f)} ${((y=i==null?void 0:i.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof a<"u"&&`${Vn(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${Vn(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Vn(u)} gwei`,nonce:d});m&&(h+=` +`),{name:"FeeConflictError"})}}class _R extends J{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class xR extends J{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",id(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class ER extends J{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class SR extends J{constructor(t,{account:n,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:c,value:f}){var p;const m=id({chain:i&&`${i==null?void 0:i.name} (id: ${i==null?void 0:i.id})`,from:n==null?void 0:n.address,to:c,value:typeof f<"u"&&`${Ub(f)} ${((p=i==null?void 0:i.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof a<"u"&&`${Vn(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${Vn(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Vn(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class k8 extends J{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:i,index:o}){let s="Transaction";r&&o!==void 0&&(s=`Transaction at block time "${r}" at index "${o}"`),t&&o!==void 0&&(s=`Transaction at block hash "${t}" at index "${o}"`),n&&o!==void 0&&(s=`Transaction at block number "${n}" at index "${o}"`),i&&(s=`Transaction with hash "${i}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"})}}class C8 extends J{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class h6 extends J{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const kR=e=>e,Hb=e=>e;class A8 extends J{constructor(t,{account:n,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:c,value:f,stateOverride:m}){var y;const p=n?cr(n):void 0;let h=id({from:p==null?void 0:p.address,to:c,value:typeof f<"u"&&`${Ub(f)} ${((y=i==null?void 0:i.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof a<"u"&&`${Vn(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${Vn(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Vn(u)} gwei`,nonce:d});m&&(h+=` ${vR(m)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",h].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class CR extends J{constructor(t,{abi:n,args:r,contractAddress:i,docsPath:o,functionName:s,sender:a}){const l=nd({abi:n,args:r,name:s}),u=l?E8({abiItem:l,args:r,includeFunctionName:!1,includeName:!1}):void 0,d=l?no(l,{includeName:!0}):void 0,c=id({address:i&&kR(i),function:d,args:u&&u!=="()"&&`${[...Array((s==null?void 0:s.length)??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],c&&"Contract Call:",c].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=i,this.functionName=s,this.sender=a}}class I1 extends J{constructor({abi:t,data:n,functionName:r,message:i}){let o,s,a,l;if(n&&n!=="0x")try{s=pR({abi:t,data:n});const{abiItem:d,errorName:c,args:f}=s;if(c==="Error")l=f[0];else if(c==="Panic"){const[m]=f;l=_8[m]}else{const m=d?no(d,{includeName:!0}):void 0,p=d&&f?E8({abiItem:d,args:f,includeFunctionName:!1,includeName:!1}):void 0;a=[m?`Error: ${m}`:"",p&&p!=="()"?` ${[...Array((c==null?void 0:c.length)??0).keys()].map(()=>" ").join("")}${p}`:""]}}catch(d){o=d}else i&&(l=i);let u;o instanceof Jx&&(u=o.signature,a=[`Unable to decode signature "${u}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`]),super(l&&l!=="execution reverted"||u?[`The contract function "${r}" reverted with the following ${u?"signature":"reason"}:`,l||u].join(` -`):`The contract function "${r}" reverted.`,{cause:o,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=s,this.reason=l,this.signature=u}}class AR extends J{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class TR extends J{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class Hb extends J{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}class Bu extends J{constructor({body:t,cause:n,details:r,headers:i,status:o,url:s}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[o&&`Status: ${o}`,`URL: ${Ub(s)}`,t&&`Request body: ${hn(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=i,this.status=o,this.url=s}}class T8 extends J{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${Ub(r)}`,`Request body: ${hn(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code}}class h6 extends J{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Ub(n)}`,`Request body: ${hn(t)}`],name:"TimeoutError"})}}const IR=-1;class Gn extends J{constructor(t,{code:n,docsPath:r,metaMessages:i,name:o,shortMessage:s}){super(s,{cause:t,docsPath:r,metaMessages:i||(t==null?void 0:t.metaMessages),name:o||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o||t.name,this.code=t instanceof T8?t.code:n??IR}}let fc=class extends Gn{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}};class mf extends Gn{constructor(t){super(t,{code:mf.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(mf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class gf extends Gn{constructor(t){super(t,{code:gf.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(gf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class yf extends Gn{constructor(t,{method:n}={}){super(t,{code:yf.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(yf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class bf extends Gn{constructor(t){super(t,{code:bf.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`):`The contract function "${r}" reverted.`,{cause:o,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=s,this.reason=l,this.signature=u}}class AR extends J{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class TR extends J{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class zb extends J{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}class Bu extends J{constructor({body:t,cause:n,details:r,headers:i,status:o,url:s}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[o&&`Status: ${o}`,`URL: ${Hb(s)}`,t&&`Request body: ${hn(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=i,this.status=o,this.url=s}}class T8 extends J{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${Hb(r)}`,`Request body: ${hn(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code}}class p6 extends J{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Hb(n)}`,`Request body: ${hn(t)}`],name:"TimeoutError"})}}const IR=-1;class Gn extends J{constructor(t,{code:n,docsPath:r,metaMessages:i,name:o,shortMessage:s}){super(s,{cause:t,docsPath:r,metaMessages:i||(t==null?void 0:t.metaMessages),name:o||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o||t.name,this.code=t instanceof T8?t.code:n??IR}}let fc=class extends Gn{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}};class mf extends Gn{constructor(t){super(t,{code:mf.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(mf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class gf extends Gn{constructor(t){super(t,{code:gf.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(gf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class yf extends Gn{constructor(t,{method:n}={}){super(t,{code:yf.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(yf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class bf extends Gn{constructor(t){super(t,{code:bf.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` `)})}}Object.defineProperty(bf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class ba extends Gn{constructor(t){super(t,{code:ba.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(ba,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class va extends Gn{constructor(t){super(t,{code:va.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` -`)})}}Object.defineProperty(va,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class vf extends Gn{constructor(t){super(t,{code:vf.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(vf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class wf extends Gn{constructor(t){super(t,{code:wf.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(wf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class _f extends Gn{constructor(t){super(t,{code:_f.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(_f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class xf extends Gn{constructor(t,{method:n}={}){super(t,{code:xf.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not implemented.`})}}Object.defineProperty(xf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Hl extends Gn{constructor(t){super(t,{code:Hl.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Hl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Ef extends Gn{constructor(t){super(t,{code:Ef.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Ef,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class El extends fc{constructor(t){super(t,{code:El.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(El,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Sf extends fc{constructor(t){super(t,{code:Sf.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Sf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class kf extends fc{constructor(t,{method:n}={}){super(t,{code:kf.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(kf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Cf extends fc{constructor(t){super(t,{code:Cf.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Cf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Af extends fc{constructor(t){super(t,{code:Af.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Af,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Tf extends fc{constructor(t){super(t,{code:Tf.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Tf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class $R extends Gn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const PR=3;function zl(e,{abi:t,address:n,args:r,docsPath:i,functionName:o,sender:s}){const{code:a,data:l,message:u,shortMessage:d}=e instanceof Hb?e:e instanceof J?e.walk(f=>"data"in f)||e.walk():{},c=e instanceof a0?new AR({functionName:o}):[PR,ba.code].includes(a)&&(l||u||d)?new I1({abi:t,data:typeof l=="object"?l.data:l,functionName:o,message:d??u}):e;return new CR(c,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:o,sender:s})}function I8(e){const t=zt(`0x${e.substring(4)}`).substring(26);return td(`0x${t}`)}const OR="modulepreload",RR=function(e){return"/push-keys/"+e},p6={},ue=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(a=>{if(a=RR(a),a in p6)return;p6[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":OR,l||(d.as="script"),d.crossOrigin="",d.href=a,s&&d.setAttribute("nonce",s),document.head.appendChild(d),l)return new Promise((c,f)=>{d.addEventListener("load",c),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(o=>{for(const s of o||[]){if(s.status!=="rejected")continue;const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s.reason,window.dispatchEvent(a),!a.defaultPrevented)throw s.reason}return t()})};async function LR({hash:e,signature:t}){const n=Er(e)?e:Te(e),{secp256k1:r}=await ue(async()=>{const{secp256k1:s}=await Promise.resolve().then(()=>kN);return{secp256k1:s}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:u,s:d,v:c,yParity:f}=t,m=Number(f??c),p=m6(m);return new r.Signature(ls(u),ls(d)).addRecoveryBit(p)}const s=Er(t)?t:Te(t),a=yi(`0x${s.slice(130)}`),l=m6(a);return r.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(l)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function m6(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function $8({hash:e,signature:t}){return I8(await LR({hash:e,signature:t}))}function wa(e,t="hex"){const n=P8(e),r=Db(new Uint8Array(n.length));return n.encode(r),t==="hex"?Mt(r.bytes):r.bytes}function P8(e){return Array.isArray(e)?BR(e.map(t=>P8(t))):NR(e)}function BR(e){const t=e.reduce((i,o)=>i+o.length,0),n=O8(t);return{length:t<=55?1+t:1+n+t,encode(i){t<=55?i.pushByte(192+t):(i.pushByte(247+n),n===1?i.pushUint8(t):n===2?i.pushUint16(t):n===3?i.pushUint24(t):i.pushUint32(t));for(const{encode:o}of e)o(i)}}}function NR(e){const t=typeof e=="string"?Sr(e):e,n=O8(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(i){t.length===1&&t[0]<128?i.pushBytes(t):t.length<=55?(i.pushByte(128+t.length),i.pushBytes(t)):(i.pushByte(183+n),n===1?i.pushUint8(t.length):n===2?i.pushUint16(t.length):n===3?i.pushUint24(t.length):i.pushUint32(t.length),i.pushBytes(t))}}}function O8(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new J("Length is too large.")}function R8(e){const{chainId:t,contractAddress:n,nonce:r,to:i}=e,o=zt(so(["0x05",wa([Ae(t),n,Ae(r)])]));return i==="bytes"?Sr(o):o}async function L8(e){const{authorization:t,signature:n}=e;return $8({hash:R8(t),signature:n??t})}class MR extends J{constructor(t,{account:n,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:c,value:f}){var p;const m=id({from:n==null?void 0:n.address,to:c,value:typeof f<"u"&&`${Fb(f)} ${((p=i==null?void 0:i.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof a<"u"&&`${Vn(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${Vn(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Vn(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class ul extends J{constructor({cause:t,message:n}={}){var i;const r=(i=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(ul,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(ul,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class _a extends J{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Vn(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(_a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class $1 extends J{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Vn(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty($1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class P1 extends J{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(P1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class O1 extends J{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`)})}}Object.defineProperty(va,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class vf extends Gn{constructor(t){super(t,{code:vf.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(vf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class wf extends Gn{constructor(t){super(t,{code:wf.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(wf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class _f extends Gn{constructor(t){super(t,{code:_f.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(_f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class xf extends Gn{constructor(t,{method:n}={}){super(t,{code:xf.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not implemented.`})}}Object.defineProperty(xf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class zl extends Gn{constructor(t){super(t,{code:zl.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(zl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Ef extends Gn{constructor(t){super(t,{code:Ef.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Ef,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Sl extends fc{constructor(t){super(t,{code:Sl.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Sl,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Sf extends fc{constructor(t){super(t,{code:Sf.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Sf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class kf extends fc{constructor(t,{method:n}={}){super(t,{code:kf.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(kf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Cf extends fc{constructor(t){super(t,{code:Cf.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Cf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Af extends fc{constructor(t){super(t,{code:Af.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Af,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Tf extends fc{constructor(t){super(t,{code:Tf.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Tf,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class $R extends Gn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const PR=3;function Wl(e,{abi:t,address:n,args:r,docsPath:i,functionName:o,sender:s}){const{code:a,data:l,message:u,shortMessage:d}=e instanceof zb?e:e instanceof J?e.walk(f=>"data"in f)||e.walk():{},c=e instanceof a0?new AR({functionName:o}):[PR,ba.code].includes(a)&&(l||u||d)?new I1({abi:t,data:typeof l=="object"?l.data:l,functionName:o,message:d??u}):e;return new CR(c,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:o,sender:s})}function I8(e){const t=zt(`0x${e.substring(4)}`).substring(26);return td(`0x${t}`)}const OR="modulepreload",RR=function(e){return"/push-keys/"+e},m6={},ue=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(a=>{if(a=RR(a),a in m6)return;m6[a]=!0;const l=a.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":OR,l||(d.as="script"),d.crossOrigin="",d.href=a,s&&d.setAttribute("nonce",s),document.head.appendChild(d),l)return new Promise((c,f)=>{d.addEventListener("load",c),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(o=>{for(const s of o||[]){if(s.status!=="rejected")continue;const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s.reason,window.dispatchEvent(a),!a.defaultPrevented)throw s.reason}return t()})};async function LR({hash:e,signature:t}){const n=Er(e)?e:Te(e),{secp256k1:r}=await ue(async()=>{const{secp256k1:s}=await Promise.resolve().then(()=>kN);return{secp256k1:s}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:u,s:d,v:c,yParity:f}=t,m=Number(f??c),p=g6(m);return new r.Signature(ls(u),ls(d)).addRecoveryBit(p)}const s=Er(t)?t:Te(t),a=yi(`0x${s.slice(130)}`),l=g6(a);return r.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(l)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function g6(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function $8({hash:e,signature:t}){return I8(await LR({hash:e,signature:t}))}function wa(e,t="hex"){const n=P8(e),r=Fb(new Uint8Array(n.length));return n.encode(r),t==="hex"?Mt(r.bytes):r.bytes}function P8(e){return Array.isArray(e)?BR(e.map(t=>P8(t))):NR(e)}function BR(e){const t=e.reduce((i,o)=>i+o.length,0),n=O8(t);return{length:t<=55?1+t:1+n+t,encode(i){t<=55?i.pushByte(192+t):(i.pushByte(247+n),n===1?i.pushUint8(t):n===2?i.pushUint16(t):n===3?i.pushUint24(t):i.pushUint32(t));for(const{encode:o}of e)o(i)}}}function NR(e){const t=typeof e=="string"?Sr(e):e,n=O8(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(i){t.length===1&&t[0]<128?i.pushBytes(t):t.length<=55?(i.pushByte(128+t.length),i.pushBytes(t)):(i.pushByte(183+n),n===1?i.pushUint8(t.length):n===2?i.pushUint16(t.length):n===3?i.pushUint24(t.length):i.pushUint32(t.length),i.pushBytes(t))}}}function O8(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new J("Length is too large.")}function R8(e){const{chainId:t,contractAddress:n,nonce:r,to:i}=e,o=zt(so(["0x05",wa([Ae(t),n,Ae(r)])]));return i==="bytes"?Sr(o):o}async function L8(e){const{authorization:t,signature:n}=e;return $8({hash:R8(t),signature:n??t})}class MR extends J{constructor(t,{account:n,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:c,value:f}){var p;const m=id({from:n==null?void 0:n.address,to:c,value:typeof f<"u"&&`${Ub(f)} ${((p=i==null?void 0:i.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:o,gas:s,gasPrice:typeof a<"u"&&`${Vn(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${Vn(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Vn(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class fl extends J{constructor({cause:t,message:n}={}){var i;const r=(i=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(fl,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(fl,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class _a extends J{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Vn(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(_a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class $1 extends J{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Vn(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty($1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class P1 extends J{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(P1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class O1 extends J{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(O1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class R1 extends J{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(R1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class L1 extends J{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(L1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class B1 extends J{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(B1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class N1 extends J{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(N1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class M1 extends J{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(M1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class If extends J{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Vn(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Vn(r)} gwei`:""}).`].join(` -`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(If,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class p0 extends J{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function zb(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof J?e.walk(i=>i.code===ul.code):e;return r instanceof J?new ul({cause:e,message:r.details}):ul.nodeMessage.test(n)?new ul({cause:e,message:e.details}):_a.nodeMessage.test(n)?new _a({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):$1.nodeMessage.test(n)?new $1({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):P1.nodeMessage.test(n)?new P1({cause:e,nonce:t==null?void 0:t.nonce}):O1.nodeMessage.test(n)?new O1({cause:e,nonce:t==null?void 0:t.nonce}):R1.nodeMessage.test(n)?new R1({cause:e,nonce:t==null?void 0:t.nonce}):L1.nodeMessage.test(n)?new L1({cause:e}):B1.nodeMessage.test(n)?new B1({cause:e,gas:t==null?void 0:t.gas}):N1.nodeMessage.test(n)?new N1({cause:e,gas:t==null?void 0:t.gas}):M1.nodeMessage.test(n)?new M1({cause:e}):If.nodeMessage.test(n)?new If({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new p0({cause:e})}function jR(e,{docsPath:t,...n}){const r=(()=>{const i=zb(e,n);return i instanceof p0?e:i})();return new MR(r,{docsPath:t,...n})}function Wb(e,{format:t}){if(!t)return{};const n={};function r(o){const s=Object.keys(o);for(const a of s)a in e&&(n[a]=e[a]),o[a]&&typeof o[a]=="object"&&!Array.isArray(o[a])&&r(o[a])}const i=t(e||{});return r(i),n}const DR={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function m0(e){const t={};return typeof e.authorizationList<"u"&&(t.authorizationList=FR(e.authorizationList)),typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(n=>Mt(n)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=Ae(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=Ae(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=Ae(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=Ae(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=Ae(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=Ae(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=DR[e.type]),typeof e.value<"u"&&(t.value=Ae(e.value)),t}function FR(e){return e.map(t=>({address:t.contractAddress,r:t.r,s:t.s,chainId:Ae(t.chainId),nonce:Ae(t.nonce),...typeof t.yParity<"u"?{yParity:Ae(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:Ae(t.v)}:{}}))}function g6(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new J2({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new J2({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function UR(e){const{balance:t,nonce:n,state:r,stateDiff:i,code:o}=e,s={};if(o!==void 0&&(s.code=o),t!==void 0&&(s.balance=Ae(t)),n!==void 0&&(s.nonce=Ae(n)),r!==void 0&&(s.state=g6(r)),i!==void 0){if(s.state)throw new bR;s.stateDiff=g6(i)}return s}function B8(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!on(n,{strict:!1}))throw new Pn({address:n});if(t[n])throw new yR({address:n});t[n]=UR(r)}return t}const g0=2n**256n-1n;function od(e){const{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:i,to:o}=e,s=t?cr(t):void 0;if(s&&!on(s.address))throw new Pn({address:s.address});if(o&&!on(o))throw new Pn({address:o});if(typeof n<"u"&&(typeof r<"u"||typeof i<"u"))throw new wR;if(r&&r>g0)throw new _a({maxFeePerGas:r});if(i&&r&&i>r)throw new If({maxFeePerGas:r,maxPriorityFeePerGas:i})}class HR extends J{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Vb extends J{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class zR extends J{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Vn(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class N8 extends J{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const M8={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function j8(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?yi(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?yi(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?M8[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=WR(e.authorizationList)),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}function WR(e){return e.map(t=>({contractAddress:t.address,r:t.r,s:t.s,chainId:Number(t.chainId),nonce:Number(t.nonce),...typeof t.yParity<"u"?{yParity:Number(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:Number(t.v)}:{}}))}function D8(e){var n;const t=(n=e.transactions)==null?void 0:n.map(r=>typeof r=="string"?r:j8(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function us(e,{blockHash:t,blockNumber:n,blockTag:r,includeTransactions:i}={}){var d,c,f;const o=r??"latest",s=i??!1,a=n!==void 0?Ae(n):void 0;let l=null;if(t?l=await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):l=await e.request({method:"eth_getBlockByNumber",params:[a||o,s]},{dedupe:!!a}),!l)throw new N8({blockHash:t,blockNumber:n});return(((f=(c=(d=e.chain)==null?void 0:d.formatters)==null?void 0:c.block)==null?void 0:f.format)||D8)(l)}async function qb(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function VR(e,t){return F8(e,t)}async function F8(e,t){var o,s;const{block:n,chain:r=e.chain,request:i}=t||{};try{const a=((o=r==null?void 0:r.fees)==null?void 0:o.maxPriorityFeePerGas)??((s=r==null?void 0:r.fees)==null?void 0:s.defaultPriorityFee);if(typeof a=="function"){const u=n||await Ee(e,us,"getBlock")({}),d=await a({block:u,client:e,request:i});if(d===null)throw new Error;return d}if(typeof a<"u")return a;const l=await e.request({method:"eth_maxPriorityFeePerGas"});return ls(l)}catch{const[a,l]=await Promise.all([n?Promise.resolve(n):Ee(e,us,"getBlock")({}),Ee(e,qb,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new Vb;const u=l-a.baseFeePerGas;return u<0n?0n:u}}async function qR(e,t){return j1(e,t)}async function j1(e,t){var f,m;const{block:n,chain:r=e.chain,request:i,type:o="eip1559"}=t||{},s=await(async()=>{var p,h;return typeof((p=r==null?void 0:r.fees)==null?void 0:p.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:i}):((h=r==null?void 0:r.fees)==null?void 0:h.baseFeeMultiplier)??1.2})();if(s<1)throw new HR;const l=10**(((f=s.toString().split(".")[1])==null?void 0:f.length)??0),u=p=>p*BigInt(Math.ceil(s*l))/BigInt(l),d=n||await Ee(e,us,"getBlock")({});if(typeof((m=r==null?void 0:r.fees)==null?void 0:m.estimateFeesPerGas)=="function"){const p=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:u,request:i,type:o});if(p!==null)return p}if(o==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new Vb;const p=typeof(i==null?void 0:i.maxPriorityFeePerGas)=="bigint"?i.maxPriorityFeePerGas:await F8(e,{block:d,chain:r,request:i}),h=u(d.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??h+p,maxPriorityFeePerGas:p}}return{gasPrice:(i==null?void 0:i.gasPrice)??u(await Ee(e,qb,"getGasPrice")({}))}}async function U8(e,{address:t,blockTag:n="latest",blockNumber:r}){const i=await e.request({method:"eth_getTransactionCount",params:[t,r?Ae(r):n]},{dedupe:!!r});return yi(i)}function Gb(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(o=>Sr(o)):e.blobs,i=[];for(const o of r)i.push(Uint8Array.from(t.blobToKzgCommitment(o)));return n==="bytes"?i:i.map(o=>Mt(o))}function Kb(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>Sr(s)):e.blobs,i=typeof e.commitments[0]=="string"?e.commitments.map(s=>Sr(s)):e.commitments,o=[];for(let s=0;sMt(s))}function GR(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),l=r?4:0,u=r?0:4;e.setUint32(t+l,s,r),e.setUint32(t+u,a,r)}const KR=(e,t,n)=>e&t^~e&n,ZR=(e,t,n)=>e&t^e&n^t&n;class Zb extends Pb{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=_l(this.buffer)}update(t){Ul(this);const{view:n,buffer:r,blockLen:i}=this;t=c0(t);const o=t.length;for(let s=0;si-s&&(this.process(r,0),s=0);for(let c=s;cd.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c>>3,h=si(m,17)^si(m,19)^m>>>10;Po[c]=h+Po[c-7]+p+Po[c-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:l,G:u,H:d}=this;for(let c=0;c<64;c++){const f=si(a,6)^si(a,11)^si(a,25),m=d+f+KR(a,l,u)+XR[c]+Po[c]|0,h=(si(r,2)^si(r,13)^si(r,22))+ZR(r,i,o)|0;d=u,u=l,l=a,a=s+m|0,s=o,o=i,i=r,r=m+h|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,i,o,s,a,l,u,d)}roundClean(){Po.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const y0=u0(()=>new YR);function QR(e,t){return y0(Er(e,{strict:!1})?cs(e):e)}function JR(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),i=QR(t);return i.set([n],0),r==="bytes"?i:Mt(i)}function H8(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),i=[];for(const o of t)i.push(JR({commitment:o,to:r,version:n}));return i}const y6=6,z8=32,Xb=4096,W8=z8*Xb,b6=W8*y6-1-1*Xb*y6,V8=1;class eL extends J{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class q8 extends J{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class tL extends J{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class nL extends J{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${V8}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function rL(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Sr(e.data):e.data,r=At(n);if(!r)throw new q8;if(r>b6)throw new eL({maxSize:b6,size:r});const i=[];let o=!0,s=0;for(;o;){const a=Db(new Uint8Array(W8));let l=0;for(;la.bytes):i.map(a=>Mt(a.bytes))}function G8(e){const{data:t,kzg:n,to:r}=e,i=e.blobs??rL({data:t,to:r}),o=e.commitments??Gb({blobs:i,kzg:n,to:r}),s=e.proofs??Kb({blobs:i,commitments:o,kzg:n,to:r}),a=[];for(let l=0;l"u"&&c)if(l){const g=await y();f.nonce=await l.consume({address:c.address,chainId:g,client:e})}else f.nonce=await Ee(e,U8,"getTransactionCount")({address:c.address,blockTag:"pending"});if((u.includes("fees")||u.includes("type"))&&typeof d>"u")try{f.type=K8(f)}catch{const g=await p();f.type=typeof(g==null?void 0:g.baseFeePerGas)=="bigint"?"eip1559":"legacy"}if(u.includes("fees"))if(f.type!=="legacy"&&f.type!=="eip2930"){if(typeof f.maxFeePerGas>"u"||typeof f.maxPriorityFeePerGas>"u"){const g=await p(),{maxFeePerGas:b,maxPriorityFeePerGas:v}=await j1(e,{block:g,chain:i,request:f});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas"u"&&(f.gas=await Ee(e,Yb,"estimateGas")({...f,account:c?{address:c.address,type:"json-rpc"}:void 0})),od(f),delete f.parameters,f}async function X8(e,{address:t,blockNumber:n,blockTag:r="latest"}){const i=n?Ae(n):void 0,o=await e.request({method:"eth_getBalance",params:[t,i||r]});return BigInt(o)}async function Yb(e,t){var i,o,s;const n=t.account??e.account,r=n?cr(n):void 0;try{let N=function(B){const{block:V,request:j,rpcStateOverride:W}=B;return e.request({method:"eth_estimateGas",params:W?[j,V??"latest",W]:V?[j,V]:[j]})};const{accessList:a,authorizationList:l,blobs:u,blobVersionedHashes:d,blockNumber:c,blockTag:f,data:m,gas:p,gasPrice:h,maxFeePerBlobGas:y,maxFeePerGas:g,maxPriorityFeePerGas:b,nonce:v,value:w,stateOverride:E,...C}=await b0(e,{...t,parameters:(r==null?void 0:r.type)==="local"?void 0:["blobVersionedHashes"]}),_=(c?Ae(c):void 0)||f,S=B8(E),A=await(async()=>{if(C.to)return C.to;if(l&&l.length>0)return await L8({authorization:l[0]}).catch(()=>{throw new J("`to` is required. Could not infer from `authorizationList`")})})();od(t);const I=(s=(o=(i=e.chain)==null?void 0:i.formatters)==null?void 0:o.transactionRequest)==null?void 0:s.format,F=(I||m0)({...Wb(C,{format:I}),from:r==null?void 0:r.address,accessList:a,authorizationList:l,blobs:u,blobVersionedHashes:d,data:m,gas:p,gasPrice:h,maxFeePerBlobGas:y,maxFeePerGas:g,maxPriorityFeePerGas:b,nonce:v,to:A,value:w});let R=BigInt(await N({block:_,request:F,rpcStateOverride:S}));if(l){const B=await X8(e,{address:F.from}),V=await Promise.all(l.map(async j=>{const{contractAddress:W}=j,Y=await N({block:_,request:{authorizationList:void 0,data:m,from:r==null?void 0:r.address,to:W,value:Ae(B)},rpcStateOverride:S}).catch(()=>100000n);return 2n*BigInt(Y)}));R+=V.reduce((j,W)=>j+W,0n)}return R}catch(a){throw jR(a,{...t,account:r,chain:e.chain})}}async function Y8(e,t){const{abi:n,address:r,args:i,functionName:o,...s}=t,a=ws({abi:n,args:i,functionName:o});try{return await Ee(e,Yb,"estimateGas")({data:a,to:r,...s})}catch(l){const u=s.account?cr(s.account):void 0;throw zl(l,{abi:n,address:r,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:o,sender:u==null?void 0:u.address})}}function Qb(e,t){if(!on(e,{strict:!1}))throw new Pn({address:e});if(!on(t,{strict:!1}))throw new Pn({address:t});return e.toLowerCase()===t.toLowerCase()}const v6="/docs/contract/decodeEventLog";function Jb(e){const{abi:t,data:n,strict:r,topics:i}=e,o=r??!0,[s,...a]=i;if(!s)throw new UP({docsPath:v6});const l=t.length===1?t[0]:t.find(h=>h.type==="event"&&s===f0(no(h)));if(!(l&&"name"in l)||l.type!=="event")throw new e8(s,{docsPath:v6});const{name:u,inputs:d}=l,c=d==null?void 0:d.some(h=>!("name"in h&&h.name));let f=c?[]:{};const m=d.filter(h=>"indexed"in h&&h.indexed);for(let h=0;h!("indexed"in h&&h.indexed));if(p.length>0){if(n&&n!=="0x")try{const h=h0(p,n);if(h)if(c)f=[...f,...h];else for(let y=0;y0?f:void 0}}function iL({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(h0([e],t)||[])[0]}function ev(e){const{abi:t,args:n,logs:r,strict:i=!0}=e,o=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return r.map(s=>{var a;try{const l=t.find(d=>d.type==="event"&&s.topics[0]===f0(d));if(!l)return null;const u=Jb({...s,abi:[l],strict:i});return o&&!o.includes(u.eventName)||!oL({args:u.args,inputs:l.inputs,matchArgs:n})?null:{...u,...s}}catch(l){let u,d;if(l instanceof e8)return null;if(l instanceof df||l instanceof l0){if(i)return null;u=l.abiItem.name,d=(a=l.abiItem.inputs)==null?void 0:a.some(c=>!("name"in c&&c.name))}return{...s,args:d?[]:{},eventName:u}}}).filter(Boolean)}function oL(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function i(o,s,a){try{return o.type==="address"?Qb(s,a):o.type==="string"||o.type==="bytes"?zt(cs(s))===a:s===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((o,s)=>{if(!o)return!0;const a=n[s];return a?(Array.isArray(o)?o:[o]).some(u=>i(a,u,t[s])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([o,s])=>{if(!s)return!0;const a=n.find(u=>u.name===o);return a?(Array.isArray(s)?s:[s]).some(u=>i(a,u,t[o])):!1}):!1}function fs(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}async function tv(e,{address:t,blockHash:n,fromBlock:r,toBlock:i,event:o,events:s,args:a,strict:l}={}){const u=l??!1,d=s??(o?[o]:void 0);let c=[];d&&(c=[d.flatMap(h=>rd({abi:[h],eventName:h.name,args:s?void 0:a}))],o&&(c=c[0]));let f;n?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:c,blockHash:n}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:c,fromBlock:typeof r=="bigint"?Ae(r):r,toBlock:typeof i=="bigint"?Ae(i):i}]});const m=f.map(p=>fs(p));return d?ev({abi:d,args:a,logs:m,strict:u}):m}async function nv(e,t){const{abi:n,address:r,args:i,blockHash:o,eventName:s,fromBlock:a,toBlock:l,strict:u}=t,d=s?nd({abi:n,name:s}):void 0,c=d?void 0:n.filter(f=>f.type==="event");return Ee(e,tv,"getLogs")({address:r,args:i,blockHash:o,event:d,events:c,fromBlock:a,toBlock:l,strict:u})}const Lm="/docs/contract/decodeFunctionResult";function dc(e){const{abi:t,args:n,functionName:r,data:i}=e;let o=t[0];if(r){const a=nd({abi:t,args:n,name:r});if(!a)throw new cp(r,{docsPath:Lm});o=a}if(o.type!=="function")throw new cp(void 0,{docsPath:Lm});if(!o.outputs)throw new HP(o.name,{docsPath:Lm});const s=h0(o.outputs,i);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}const D1=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],Q8=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],J8=[...Q8,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],sL=[...Q8,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],w6=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],_6=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],aL=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],lL="0x82ad56cb",cL="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",uL="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",fL="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";class F1 extends J{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class dL extends J{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class hL extends J{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` -`),{name:"ChainNotFoundError"})}}class eE extends J{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class v0 extends J{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}const Bm="/docs/contract/encodeDeployData";function w0(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const i=t.find(s=>"type"in s&&s.type==="constructor");if(!i)throw new MP({docsPath:Bm});if(!("inputs"in i))throw new Y2({docsPath:Bm});if(!i.inputs||i.inputs.length===0)throw new Y2({docsPath:Bm});const o=uc(i.inputs,n);return so([r,o])}function hc({blockNumber:e,chain:t,contract:n}){var i;const r=(i=t==null?void 0:t.contracts)==null?void 0:i[n];if(!r)throw new F1({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new F1({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function pL(e,{docsPath:t,...n}){const r=(()=>{const i=zb(e,n);return i instanceof p0?e:i})();return new A8(r,{docsPath:t,...n})}const Nm=new Map;function tE({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:i}){const o=async()=>{const d=l();s();const c=d.map(({args:f})=>f);c.length!==0&&e(c).then(f=>{var m;i&&Array.isArray(f)&&f.sort(i);for(let p=0;p{var m;for(let p=0;pNm.delete(t),a=()=>l().map(({args:d})=>d),l=()=>Nm.get(t)||[],u=d=>Nm.set(t,[...l(),d]);return{flush:s,async schedule(d){const c={},f=new Promise((h,y)=>{c.resolve=h,c.reject=y});return(n==null?void 0:n([...a(),d]))&&o(),l().length>0?(u({args:d,pendingPromise:c}),f):(u({args:d,pendingPromise:c}),setTimeout(o,r),f)}}}async function _0(e,t){var I,L,F,N;const{account:n=e.account,batch:r=!!((I=e.batch)!=null&&I.multicall),blockNumber:i,blockTag:o="latest",accessList:s,blobs:a,code:l,data:u,factory:d,factoryData:c,gas:f,gasPrice:m,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:b,value:v,stateOverride:w,...E}=t,C=n?cr(n):void 0;if(l&&(d||c))throw new J("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&b)throw new J("Cannot provide both `code` & `to` as parameters.");const k=l&&u,_=d&&c&&b&&u,S=k||_,A=k?yL({code:l,data:u}):_?bL({data:u,factory:d,factoryData:c,to:b}):u;try{od(t);const B=(i?Ae(i):void 0)||o,V=B8(w),j=(N=(F=(L=e.chain)==null?void 0:L.formatters)==null?void 0:F.transactionRequest)==null?void 0:N.format,Y=(j||m0)({...Wb(E,{format:j}),from:C==null?void 0:C.address,accessList:s,blobs:a,data:A,gas:f,gasPrice:m,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:S?void 0:b,value:v});if(r&&mL({request:Y})&&!V)try{return await gL(e,{...Y,blockNumber:i,blockTag:o})}catch(ae){if(!(ae instanceof eE)&&!(ae instanceof F1))throw ae}const te=await e.request({method:"eth_call",params:V?[Y,B,V]:[Y,B]});return te==="0x"?{data:void 0}:{data:te}}catch(R){const B=vL(R),{offchainLookup:V,offchainLookupSignature:j}=await ue(async()=>{const{offchainLookup:W,offchainLookupSignature:Y}=await import("./ccip-BH5iUcu2.js");return{offchainLookup:W,offchainLookupSignature:Y}},[]);if(e.ccipRead!==!1&&(B==null?void 0:B.slice(0,10))===j&&b)return{data:await V(e,{data:B,to:b})};throw S&&(B==null?void 0:B.slice(0,10))==="0x101bb98d"?new TR({factory:d}):pL(R,{...t,account:C,chain:e.chain})}}function mL({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(lL)||!n||Object.values(r).filter(i=>typeof i<"u").length>0)}async function gL(e,t){var h;const{batchSize:n=1024,wait:r=0}=typeof((h=e.batch)==null?void 0:h.multicall)=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:o="latest",data:s,multicallAddress:a,to:l}=t;let u=a;if(!u){if(!e.chain)throw new eE;u=hc({blockNumber:i,chain:e.chain,contract:"multicall3"})}const c=(i?Ae(i):void 0)||o,{schedule:f}=tE({id:`${e.uid}.${c}`,wait:r,shouldSplitBatch(y){return y.reduce((b,{data:v})=>b+(v.length-2),0)>n*2},fn:async y=>{const g=y.map(w=>({allowFailure:!0,callData:w.data,target:w.to})),b=ws({abi:D1,args:[g],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{data:b,to:u},c]});return dc({abi:D1,args:[g],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:m,success:p}]=await f({data:s,to:l});if(!p)throw new Hb({data:m});return m==="0x"?{data:void 0}:{data:m}}function yL(e){const{code:t,data:n}=e;return w0({abi:Zx(["constructor(bytes, bytes)"]),bytecode:cL,args:[t,n]})}function bL(e){const{data:t,factory:n,factoryData:r,to:i}=e;return w0({abi:Zx(["constructor(address, bytes, address, bytes)"]),bytecode:uL,args:[i,t,n,r]})}function vL(e){var n;if(!(e instanceof J))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function bi(e,t){const{abi:n,address:r,args:i,functionName:o,...s}=t,a=ws({abi:n,args:i,functionName:o});try{const{data:l}=await Ee(e,_0,"call")({...s,data:a,to:r});return dc({abi:n,args:i,functionName:o,data:l||"0x"})}catch(l){throw zl(l,{abi:n,address:r,args:i,docsPath:"/docs/contract/readContract",functionName:o})}}async function nE(e,t){const{abi:n,address:r,args:i,dataSuffix:o,functionName:s,...a}=t,l=a.account?cr(a.account):e.account,u=ws({abi:n,args:i,functionName:s});try{const{data:d}=await Ee(e,_0,"call")({batch:!1,data:`${u}${o?o.replace("0x",""):""}`,to:r,...a,account:l}),c=dc({abi:n,args:i,functionName:s,data:d||"0x"}),f=n.filter(m=>"name"in m&&m.name===t.functionName);return{result:c,request:{abi:f,address:r,args:i,dataSuffix:o,functionName:s,...a,account:l}}}catch(d){throw zl(d,{abi:n,address:r,args:i,docsPath:"/docs/contract/simulateContract",functionName:s,sender:l==null?void 0:l.address})}}const Mm=new Map,x6=new Map;let wL=0;function ds(e,t,n){const r=++wL,i=()=>Mm.get(e)||[],o=()=>{const d=i();Mm.set(e,d.filter(c=>c.id!==r))},s=()=>{const d=x6.get(e);i().length===1&&d&&d(),o()},a=i();if(Mm.set(e,[...a,{id:r,fns:t}]),a&&a.length>0)return s;const l={};for(const d in t)l[d]=(...c)=>{var m,p;const f=i();if(f.length!==0)for(const h of f)(p=(m=h.fns)[d])==null||p.call(m,...c)};const u=n(l);return typeof u=="function"&&x6.set(e,u),s}async function U1(e){return new Promise(t=>setTimeout(t,e))}function ad(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let i=!0;const o=()=>i=!1;return(async()=>{let a;t&&(a=await e({unpoll:o}));const l=await(n==null?void 0:n(a))??r;await U1(l);const u=async()=>{i&&(await e({unpoll:o}),await U1(r),u())};u()})(),o}const _L=new Map,xL=new Map;function EL(e){const t=(i,o)=>({clear:()=>o.delete(i),get:()=>o.get(i),set:s=>o.set(i,s)}),n=t(e,_L),r=t(e,xL);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function SL(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=EL(t),i=r.response.get();if(i&&n>0&&new Date().getTime()-i.created.getTime()`blockNumber.${e}`;async function ld(e,{cacheTime:t=e.cacheTime}={}){const n=await SL(()=>e.request({method:"eth_blockNumber"}),{cacheKey:kL(e.uid),cacheTime:t});return BigInt(n)}async function x0(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const i=r.map(o=>fs(o));return!("abi"in t)||!t.abi?i:ev({abi:t.abi,logs:i,strict:n})}async function E0(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function rE(e,t){const{abi:n,address:r,args:i,batch:o=!0,eventName:s,fromBlock:a,onError:l,onLogs:u,poll:d,pollingInterval:c=e.pollingInterval,strict:f}=t;return(typeof d<"u"?d:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"))?(()=>{const y=f??!1,g=hn(["watchContractEvent",r,i,o,e.uid,s,c,y,a]);return ds(g,{onLogs:u,onError:l},b=>{let v;a!==void 0&&(v=a-1n);let w,E=!1;const C=ad(async()=>{var k;if(!E){try{w=await Ee(e,jb,"createContractEventFilter")({abi:n,address:r,args:i,eventName:s,strict:y,fromBlock:a})}catch{}E=!0;return}try{let _;if(w)_=await Ee(e,x0,"getFilterChanges")({filter:w});else{const S=await Ee(e,ld,"getBlockNumber")({});v&&v{w&&await Ee(e,E0,"uninstallFilter")({filter:w}),C()}})})():(()=>{const y=f??!1,g=hn(["watchContractEvent",r,i,o,e.uid,s,c,y]);let b=!0,v=()=>b=!1;return ds(g,{onLogs:u,onError:l},w=>((async()=>{try{const E=(()=>{if(e.transport.type==="fallback"){const _=e.transport.transports.find(S=>S.config.type==="webSocket");return _?_.value:e.transport}return e.transport})(),C=s?rd({abi:n,eventName:s,args:i}):[],{unsubscribe:k}=await E.subscribe({params:["logs",{address:r,topics:C}],onData(_){var A;if(!b)return;const S=_.result;try{const{eventName:I,args:L}=Jb({abi:n,data:S.data,topics:S.topics,strict:f}),F=fs(S,{args:L,eventName:I});w.onLogs([F])}catch(I){let L,F;if(I instanceof df||I instanceof l0){if(f)return;L=I.abiItem.name,F=(A=I.abiItem.inputs)==null?void 0:A.some(R=>!("name"in R&&R.name))}const N=fs(S,{args:F?[]:{},eventName:L});w.onLogs([N])}},onError(_){var S;(S=w.onError)==null||S.call(w,_)}});v=k,b||v()}catch(E){l==null||l(E)}})(),()=>v()))})()}class cd extends J{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` -`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class jm extends J{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function iE({chain:e,currentChainId:t}){if(!e)throw new hL;if(t!==e.id)throw new dL({chain:e,currentChainId:t})}function CL(e,{docsPath:t,...n}){const r=(()=>{const i=zb(e,n);return i instanceof p0?e:i})();return new SR(r,{docsPath:t,...n})}async function rv(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}async function iv(e,t){var g,b,v,w;const{account:n=e.account,chain:r=e.chain,accessList:i,authorizationList:o,blobs:s,data:a,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:m,value:p,...h}=t;if(!n)throw new cd({docsPath:"/docs/actions/wallet/sendTransaction"});const y=cr(n);try{od(t);const E=await(async()=>{if(t.to)return t.to;if(o&&o.length>0)return await L8({authorization:o[0]}).catch(()=>{throw new J("`to` is required. Could not infer from `authorizationList`.")})})();if(y.type==="json-rpc"){let C;r!==null&&(C=await Ee(e,sd,"getChainId")({}),iE({currentChainId:C,chain:r}));const k=(v=(b=(g=e.chain)==null?void 0:g.formatters)==null?void 0:b.transactionRequest)==null?void 0:v.format,S=(k||m0)({...Wb(h,{format:k}),accessList:i,authorizationList:o,blobs:s,chainId:C,data:a,from:y.address,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:m,to:E,value:p});return await e.request({method:"eth_sendTransaction",params:[S]},{retryCount:0})}if(y.type==="local"){const C=await Ee(e,b0,"prepareTransactionRequest")({account:y,accessList:i,authorizationList:o,blobs:s,chain:r,data:a,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:m,nonceManager:y.nonceManager,parameters:[...Z8,"sidecars"],value:p,...h,to:E}),k=(w=r==null?void 0:r.serializers)==null?void 0:w.transaction,_=await y.signTransaction(C,{serializer:k});return await Ee(e,rv,"sendRawTransaction")({serializedTransaction:_})}throw y.type==="smart"?new jm({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new jm({docsPath:"/docs/actions/wallet/sendTransaction",type:y.type})}catch(E){throw E instanceof jm?E:CL(E,{...t,account:y,chain:t.chain||void 0})}}async function oE(e,t){const{abi:n,account:r=e.account,address:i,args:o,dataSuffix:s,functionName:a,...l}=t;if(!r)throw new cd({docsPath:"/docs/contract/writeContract"});const u=cr(r),d=ws({abi:n,args:o,functionName:a});try{return await Ee(e,iv,"sendTransaction")({data:`${d}${s?s.replace("0x",""):""}`,to:i,account:u,...l})}catch(c){throw zl(c,{abi:n,address:i,args:o,docsPath:"/docs/contract/writeContract",functionName:a,sender:u.address})}}function AL({abi:e,address:t,client:n}){const r=n,[i,o]=r?"public"in r&&"wallet"in r?[r.public,r.wallet]:"public"in r?[r.public,void 0]:"wallet"in r?[void 0,r.wallet]:[r,r]:[void 0,void 0],s=i!=null,a=o!=null,l={};let u=!1,d=!1,c=!1;for(const f of e)if(f.type==="function"?f.stateMutability==="view"||f.stateMutability==="pure"?u=!0:d=!0:f.type==="event"&&(c=!0),u&&d&&c)break;return s&&(u&&(l.read=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(i,bi,"readContract")({abi:e,address:t,functionName:m,args:h,...y})}}})),d&&(l.simulate=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(i,nE,"simulateContract")({abi:e,address:t,functionName:m,args:h,...y})}}})),c&&(l.createEventFilter=new Proxy({},{get(f,m){return(...p)=>{const h=e.find(b=>b.type==="event"&&b.name===m),{args:y,options:g}=Dm(p,h);return Ee(i,jb,"createContractEventFilter")({abi:e,address:t,eventName:m,args:y,...g})}}}),l.getEvents=new Proxy({},{get(f,m){return(...p)=>{const h=e.find(b=>b.type==="event"&&b.name===m),{args:y,options:g}=Dm(p,h);return Ee(i,nv,"getContractEvents")({abi:e,address:t,eventName:m,args:y,...g})}}}),l.watchEvent=new Proxy({},{get(f,m){return(...p)=>{const h=e.find(b=>b.type==="event"&&b.name===m),{args:y,options:g}=Dm(p,h);return Ee(i,rE,"watchContractEvent")({abi:e,address:t,eventName:m,args:y,...g})}}}))),a&&d&&(l.write=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(o,oE,"writeContract")({abi:e,address:t,functionName:m,args:h,...y})}}})),(s||a)&&d&&(l.estimateGas=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(i??o,Y8,"estimateContractGas")({abi:e,address:t,functionName:m,args:h,...y,account:y.account??o.account})}}})),l.address=t,l.abi=e,l}function Vd(e){const t=e.length&&Array.isArray(e[0]),n=t?e[0]:[],r=(t?e[1]:e[0])??{};return{args:n,options:r}}function Dm(e,t){let n=!1;Array.isArray(e[0])?n=!0:e.length===1?n=t.inputs.some(o=>o.indexed):e.length===2&&(n=!0);const r=n?e[0]:void 0,i=(n?e[1]:e[0])??{};return{args:r,options:i}}class TL extends J{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function IL(e,t){const{address:n,factory:r,factoryData:i}=t;try{const[o,s,a,l,u,d,c]=await Ee(e,bi,"readContract")({abi:$L,address:n,functionName:"eip712Domain",factory:r,factoryData:i});return{domain:{name:s,version:a,chainId:Number(l),verifyingContract:u,salt:d},extensions:c,fields:o}}catch(o){const s=o;throw s.name==="ContractFunctionExecutionError"&&s.cause.name==="ContractFunctionZeroDataError"?new TL({address:n}):s}}const $L=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];async function PL(e,{chain:t}){const{id:n,name:r,nativeCurrency:i,rpcUrls:o,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:Ae(n),chainName:r,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:s?Object.values(s).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}const H1=256;let qd=H1,Gd;function sE(e=11){if(!Gd||qd+e>H1*2){Gd="",qd=0;for(let t=0;t{const b=g(y);for(const w in p)delete b[w];const v={...y,...b};return Object.assign(v,{extend:h(v)})}}return Object.assign(p,{extend:h(p)})}const Kd=new Rb(8192);function OL(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(Kd.get(n))return Kd.get(n);const r=e().finally(()=>Kd.delete(n));return Kd.set(n,r),r}function z1(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((i,o)=>{const s=async({count:a=0}={})=>{const l=async({error:u})=>{const d=typeof t=="function"?t({count:a,error:u}):t;d&&await U1(d),s({count:a+1})};try{const u=await e();i(u)}catch(u){if(a{const{dedupe:i=!1,retryDelay:o=150,retryCount:s=3,uid:a}={...t,...r},l=i?zt(Fl(`${a}.${hn(n)}`)):void 0;return OL(()=>z1(async()=>{try{return await e(n)}catch(u){const d=u;switch(d.code){case mf.code:throw new mf(d);case gf.code:throw new gf(d);case yf.code:throw new yf(d,{method:n.method});case bf.code:throw new bf(d);case ba.code:throw new ba(d);case va.code:throw new va(d);case vf.code:throw new vf(d);case wf.code:throw new wf(d);case _f.code:throw new _f(d);case xf.code:throw new xf(d,{method:n.method});case Hl.code:throw new Hl(d);case Ef.code:throw new Ef(d);case El.code:throw new El(d);case Sf.code:throw new Sf(d);case kf.code:throw new kf(d);case Cf.code:throw new Cf(d);case Af.code:throw new Af(d);case Tf.code:throw new Tf(d);case 5e3:throw new El(d);default:throw u instanceof J?u:new $R(d)}}},{delay:({count:u,error:d})=>{var c;if(d&&d instanceof Bu){const f=(c=d==null?void 0:d.headers)==null?void 0:c.get("Retry-After");if(f!=null&&f.match(/\d/))return Number.parseInt(f)*1e3}return~~(1<LL(u)}),{enabled:i,id:l})}}function LL(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Hl.code||e.code===ba.code:e instanceof Bu&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function lE({key:e,name:t,request:n,retryCount:r=3,retryDelay:i=150,timeout:o,type:s},a){const l=sE();return{config:{key:e,name:t,request:n,retryCount:r,retryDelay:i,timeout:o,type:s},request:RL(n,{retryCount:r,retryDelay:i,uid:l}),value:a}}function BL(e,t={}){const{key:n="custom",name:r="Custom Provider",retryDelay:i}=t;return({retryCount:o})=>lE({key:n,name:r,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:i,type:"custom"})}class NL extends J{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function ML(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((i,o)=>{(async()=>{let s;try{const a=new AbortController;n>0&&(s=setTimeout(()=>{r?a.abort():o(t)},n)),i(await e({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&o(t),o(a)}finally{clearTimeout(s)}})()})}function jL(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const E6=jL();function DL(e,t={}){return{async request(n){var c;const{body:r,onRequest:i=t.onRequest,onResponse:o=t.onResponse,timeout:s=t.timeout??1e4}=n,a={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:l,method:u,signal:d}=a;try{const f=await ML(async({signal:p})=>{const h={...a,body:Array.isArray(r)?hn(r.map(b=>({jsonrpc:"2.0",id:b.id??E6.take(),...b}))):hn({jsonrpc:"2.0",id:r.id??E6.take(),...r}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(s>0?p:null)},y=new Request(e,h);return i&&await i(y),await fetch(e,h)},{errorInstance:new h6({body:r,url:e}),timeout:s,signal:!0});o&&await o(f);let m;if((c=f.headers.get("Content-Type"))!=null&&c.startsWith("application/json")?m=await f.json():(m=await f.text(),m=JSON.parse(m||"{}")),!f.ok)throw new Bu({body:r,details:hn(m.error)||f.statusText,headers:f.headers,status:f.status,url:e});return m}catch(f){throw f instanceof Bu||f instanceof h6?f:new Bu({body:r,cause:f,url:e})}}}}function cE(e,t={}){const{batch:n,fetchOptions:r,key:i="http",name:o="HTTP JSON-RPC",onFetchRequest:s,onFetchResponse:a,retryDelay:l}=t;return({chain:u,retryCount:d,timeout:c})=>{const{batchSize:f=1e3,wait:m=0}=typeof n=="object"?n:{},p=t.retryCount??d,h=c??t.timeout??1e4,y=u==null?void 0:u.rpcUrls.default.http[0];if(!y)throw new NL;const g=DL(y,{fetchOptions:r,onRequest:s,onResponse:a,timeout:h});return lE({key:i,name:o,async request({method:b,params:v}){const w={method:b,params:v},{schedule:E}=tE({id:y,wait:m,shouldSplitBatch(S){return S.length>f},fn:S=>g.request({body:S}),sort:(S,A)=>S.id-A.id}),C=async S=>n?E(S):[await g.request({body:S})],[{error:k,result:_}]=await C(w);if(k)throw new T8({body:w,error:k,url:y});return _},retryCount:p,retryDelay:l,timeout:h,type:"http"},{fetchOptions:r,url:y})}}function ov(e,t){var r,i,o,s,a,l;if(!(e instanceof J))return!1;const n=e.walk(u=>u instanceof I1);return n instanceof I1?!!(((r=n.data)==null?void 0:r.errorName)==="ResolverNotFound"||((i=n.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||((o=n.data)==null?void 0:o.errorName)==="ResolverNotContract"||((s=n.data)==null?void 0:s.errorName)==="ResolverError"||((a=n.data)==null?void 0:a.errorName)==="HttpError"||(l=n.reason)!=null&&l.includes("Wildcard on non-extended resolvers is not supported")||t==="reverse"&&n.reason===_8[50]):!1}function uE(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Er(t)?t:null}function wh(e){let t=new Uint8Array(32).fill(0);if(!e)return Mt(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const i=uE(n[r]),o=i?cs(i):zt(aa(n[r]),"bytes");t=zt(ro([t,o]),"bytes")}return Mt(t)}function FL(e){return`[${e.slice(2)}]`}function UL(e){const t=new Uint8Array(32).fill(0);return e?uE(e)||zt(aa(e)):Mt(t)}function S0(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(aa(t).byteLength+2);let r=0;const i=t.split(".");for(let o=0;o255&&(s=aa(FL(UL(i[o])))),n[r]=s.length,n.set(s,r+1),r+=s.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}async function HL(e,{blockNumber:t,blockTag:n,coinType:r,name:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){let l=a;if(!l){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=hc({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const u=ws({abi:_6,functionName:"addr",...r!=null?{args:[wh(i),BigInt(r)]}:{args:[wh(i)]}}),d={address:l,abi:J8,functionName:"resolve",args:[Te(S0(i)),u],blockNumber:t,blockTag:n},c=Ee(e,bi,"readContract"),f=o?await c({...d,args:[...d.args,o]}):await c(d);if(f[0]==="0x")return null;const m=dc({abi:_6,args:r!=null?[wh(i),BigInt(r)]:void 0,functionName:"addr",data:f[0]});return m==="0x"||as(m)==="0x00"?null:m}catch(u){if(s)throw u;if(ov(u,"resolve"))return null;throw u}}class zL extends J{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class lu extends J{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class sv extends J{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class WL extends J{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const VL=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,qL=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,GL=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,KL=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function ZL(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function S6(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function fE({uri:e,gatewayUrls:t}){const n=GL.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=S6(t==null?void 0:t.ipfs,"https://ipfs.io"),i=S6(t==null?void 0:t.arweave,"https://arweave.net"),o=e.match(VL),{protocol:s,subpath:a,target:l,subtarget:u=""}=(o==null?void 0:o.groups)||{},d=s==="ipns:/"||a==="ipns/",c=s==="ipfs:/"||a==="ipfs/"||qL.test(e);if(e.startsWith("http")&&!d&&!c){let m=e;return t!=null&&t.arweave&&(m=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:m,isOnChain:!1,isEncoded:!1}}if((d||c)&&l)return{uri:`${r}/${d?"ipns":"ipfs"}/${l}${u}`,isOnChain:!1,isEncoded:!1};if(s==="ar:/"&&l)return{uri:`${i}/${l}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(KL,"");if(f.startsWith("i.json());return await av({gatewayUrls:e,uri:dE(n)})}catch{throw new sv({uri:t})}}async function av({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=fE({uri:t,gatewayUrls:e});if(r||await ZL(n))return n;throw new sv({uri:t})}function YL(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,i]=t.split("/"),[o,s]=n.split(":"),[a,l]=r.split(":");if(!o||o.toLowerCase()!=="eip155")throw new lu({reason:"Only EIP-155 supported"});if(!s)throw new lu({reason:"Chain ID not found"});if(!l)throw new lu({reason:"Contract address not found"});if(!i)throw new lu({reason:"Token ID not found"});if(!a)throw new lu({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s),namespace:a.toLowerCase(),contractAddress:l,tokenID:i}}async function QL(e,{nft:t}){if(t.namespace==="erc721")return bi(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return bi(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new WL({namespace:t.namespace})}async function JL(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?eB(e,{gatewayUrls:t,record:n}):av({uri:n,gatewayUrls:t})}async function eB(e,{gatewayUrls:t,record:n}){const r=YL(n),i=await QL(e,{nft:r}),{uri:o,isOnChain:s,isEncoded:a}=fE({uri:i,gatewayUrls:t});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){const u=a?atob(o.replace("data:application/json;base64,","")):o,d=JSON.parse(u);return av({uri:dE(d),gatewayUrls:t})}let l=r.tokenID;return r.namespace==="erc1155"&&(l=l.replace("0x","").padStart(64,"0")),XL({gatewayUrls:t,uri:o.replace(/(?:0x)?{id}/,l)})}async function hE(e,{blockNumber:t,blockTag:n,name:r,key:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){let l=a;if(!l){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=hc({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const u={address:l,abi:J8,functionName:"resolve",args:[Te(S0(r)),ws({abi:w6,functionName:"text",args:[wh(r),i]})],blockNumber:t,blockTag:n},d=Ee(e,bi,"readContract"),c=o?await d({...u,args:[...u.args,o]}):await d(u);if(c[0]==="0x")return null;const f=dc({abi:w6,functionName:"text",data:c[0]});return f===""?null:f}catch(u){if(s)throw u;if(ov(u,"resolve"))return null;throw u}}async function tB(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){const l=await Ee(e,hE,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:i,universalResolverAddress:a,gatewayUrls:o,strict:s});if(!l)return null;try{return await JL(e,{record:l,gatewayUrls:r})}catch{return null}}async function nB(e,{address:t,blockNumber:n,blockTag:r,gatewayUrls:i,strict:o,universalResolverAddress:s}){let a=s;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=hc({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const l=`${t.toLowerCase().substring(2)}.addr.reverse`;try{const u={address:a,abi:sL,functionName:"reverse",args:[Te(S0(l))],blockNumber:n,blockTag:r},d=Ee(e,bi,"readContract"),[c,f]=i?await d({...u,args:[...u.args,i]}):await d(u);return t.toLowerCase()!==f.toLowerCase()?null:c}catch(u){if(o)throw u;if(ov(u,"reverse"))return null;throw u}}async function rB(e,{blockNumber:t,blockTag:n,name:r,universalResolverAddress:i}){let o=i;if(!o){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=hc({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[s]=await Ee(e,bi,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Te(S0(r))],blockNumber:t,blockTag:n});return s}async function iB(e){const t=d0(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}async function pE(e,{address:t,args:n,event:r,events:i,fromBlock:o,strict:s,toBlock:a}={}){const l=i??(r?[r]:void 0),u=d0(e,{method:"eth_newFilter"});let d=[];l&&(d=[l.flatMap(m=>rd({abi:[m],eventName:m.name,args:n}))],r&&(d=d[0]));const c=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof o=="bigint"?Ae(o):o,toBlock:typeof a=="bigint"?Ae(a):a,...d.length?{topics:d}:{}}]});return{abi:l,args:n,eventName:r?r.name:void 0,fromBlock:o,id:c,request:u(c),strict:!!s,toBlock:a,type:"event"}}async function mE(e){const t=d0(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}async function oB(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function sB(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const i=n!==void 0?Ae(n):void 0;let o;return t?o=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):o=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[i||r]},{dedupe:!!i}),yi(o)}async function k6(e,{address:t,blockNumber:n,blockTag:r="latest"}){const i=n!==void 0?Ae(n):void 0,o=await e.request({method:"eth_getCode",params:[t,i||r]},{dedupe:!!i});if(o!=="0x")return o}function aB(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function lB(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:i}){const o=n?Ae(n):void 0,s=await e.request({method:"eth_feeHistory",params:[Ae(t),o||r,i]},{dedupe:!!o});return aB(s)}async function cB(e,{filter:t}){const n=t.strict??!1,i=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(o=>fs(o));return t.abi?ev({abi:t.abi,logs:i,strict:n}):i}function lv(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}const uB=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,fB=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function gE(e){const{domain:t={},message:n,primaryType:r}=e,i={EIP712Domain:xE({domain:t}),...e.types};_E({domain:t,message:n,primaryType:r,types:i});const o=["0x1901"];return t&&o.push(dB({domain:t,types:i})),r!=="EIP712Domain"&&o.push(yE({data:n,primaryType:r,types:i})),zt(ro(o))}function dB({domain:e,types:t}){return yE({data:e,primaryType:"EIP712Domain",types:t})}function yE({data:e,primaryType:t,types:n}){const r=bE({data:e,primaryType:t,types:n});return zt(r)}function bE({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],i=[hB({primaryType:t,types:n})];for(const o of n[t]){const[s,a]=wE({types:n,name:o.name,type:o.type,value:e[o.name]});r.push(s),i.push(a)}return uc(r,i)}function hB({primaryType:e,types:t}){const n=Te(pB({primaryType:e,types:t}));return zt(n)}function pB({primaryType:e,types:t}){let n="";const r=vE({primaryType:e,types:t});r.delete(e);const i=[e,...Array.from(r).sort()];for(const o of i)n+=`${o}(${t[o].map(({name:s,type:a})=>`${a} ${s}`).join(",")})`;return n}function vE({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),i=r==null?void 0:r[0];if(n.has(i)||t[i]===void 0)return n;n.add(i);for(const o of t[i])vE({primaryType:o.type,types:t},n);return n}function wE({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},zt(bE({data:r,primaryType:n,types:e}))];if(n==="bytes")return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},zt(r)];if(n==="string")return[{type:"bytes32"},zt(Te(r))];if(n.lastIndexOf("]")===n.length-1){const i=n.slice(0,n.lastIndexOf("[")),o=r.map(s=>wE({name:t,type:i,types:e,value:s}));return[{type:"bytes32"},zt(uc(o.map(([s])=>s),o.map(([,s])=>s)))]}return[{type:n},r]}function mB(e){const{domain:t,message:n,primaryType:r,types:i}=e,o=(l,u)=>{const d={...u};for(const c of l){const{name:f,type:m}=c;m==="address"&&(d[f]=d[f].toLowerCase())}return d},s=i.EIP712Domain?t?o(i.EIP712Domain,t):{}:{},a=(()=>{if(r!=="EIP712Domain")return o(i[r],n)})();return hn({domain:s,message:a,primaryType:r,types:i})}function _E(e){const{domain:t,message:n,primaryType:r,types:i}=e,o=(s,a)=>{for(const l of s){const{name:u,type:d}=l,c=a[u],f=d.match(fB);if(f&&(typeof c=="number"||typeof c=="bigint")){const[h,y,g]=f;Ae(c,{signed:y==="int",size:Number.parseInt(g)/8})}if(d==="address"&&typeof c=="string"&&!on(c))throw new Pn({address:c});const m=d.match(uB);if(m){const[h,y]=m;if(y&&At(c)!==Number.parseInt(y))throw new WP({expectedSize:Number.parseInt(y),givenSize:At(c)})}const p=i[d];p&&o(p,c)}};i.EIP712Domain&&t&&o(i.EIP712Domain,t),r!=="EIP712Domain"&&o(i[r],n)}function xE({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},typeof(e==null?void 0:e.chainId)=="number"&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const gB={"0x0":"reverted","0x1":"success"};function yB(e){const t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(n=>fs(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?yi(e.transactionIndex):null,status:e.status?gB[e.status]:null,type:e.type?M8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}const bB=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),EE=new Uint8Array(new Array(16).fill(0).map((e,t)=>t)),vB=EE.map(e=>(9*e+5)%16);let cv=[EE],uv=[vB];for(let e=0;e<4;e++)for(let t of[cv,uv])t.push(t[e].map(n=>bB[n]));const SE=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),wB=cv.map((e,t)=>e.map(n=>SE[t][n])),_B=uv.map((e,t)=>e.map(n=>SE[t][n])),xB=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),EB=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]);function C6(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}const Zd=new Uint32Array(16);class SB extends Zb{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:t,h1:n,h2:r,h3:i,h4:o}=this;return[t,n,r,i,o]}set(t,n,r,i,o){this.h0=t|0,this.h1=n|0,this.h2=r|0,this.h3=i|0,this.h4=o|0}process(t,n){for(let m=0;m<16;m++,n+=4)Zd[m]=t.getUint32(n,!0);let r=this.h0|0,i=r,o=this.h1|0,s=o,a=this.h2|0,l=a,u=this.h3|0,d=u,c=this.h4|0,f=c;for(let m=0;m<5;m++){const p=4-m,h=xB[m],y=EB[m],g=cv[m],b=uv[m],v=wB[m],w=_B[m];for(let E=0;E<16;E++){const C=Wd(r+C6(m,o,a,u)+Zd[g[E]]+h,v[E])+c|0;r=c,c=u,u=Wd(a,10)|0,a=o,o=C}for(let E=0;E<16;E++){const C=Wd(i+C6(p,s,l,d)+Zd[b[E]]+y,w[E])+f|0;i=f,f=d,d=Wd(l,10)|0,l=s,s=C}}this.set(this.h1+a+d|0,this.h2+u+f|0,this.h3+c+i|0,this.h4+r+s|0,this.h0+o+l|0)}roundClean(){Zd.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const kB=u0(()=>new SB),CB=`Ethereum Signed Message: -`;function AB(e){const t=typeof e=="string"?Fl(e):typeof e.raw=="string"?e.raw:Mt(e.raw),n=Fl(`${CB}${At(t)}`);return ro([n,t])}function fv(e,t){return zt(AB(e),t)}const kE="0x6492649264926492649264926492649264926492649264926492649264926492";function TB(e){return v8(e,-32)===kE}function IB(e){const{address:t,data:n,signature:r,to:i="hex"}=e,o=so([uc([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,n,r]),kE]);return i==="hex"?o:Sr(o)}function $B(e){const{authorizationList:t}=e;if(t)for(const n of t){const{contractAddress:r,chainId:i}=n;if(!on(r))throw new Pn({address:r});if(i<=0)throw new v0({chainId:i})}dv(e)}function PB(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new q8;for(const n of t){const r=At(n),i=yi(hf(n,0,1));if(r!==32)throw new tL({hash:n,size:r});if(i!==V8)throw new nL({hash:n,version:i})}}dv(e)}function dv(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new v0({chainId:t});if(i&&!on(i))throw new Pn({address:i});if(r&&r>g0)throw new _a({maxFeePerGas:r});if(n&&r&&n>r)throw new If({maxFeePerGas:r,maxPriorityFeePerGas:n})}function OB(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(t<=0)throw new v0({chainId:t});if(o&&!on(o))throw new Pn({address:o});if(n||i)throw new J("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>g0)throw new _a({maxFeePerGas:r})}function RB(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(o&&!on(o))throw new Pn({address:o});if(typeof t<"u"&&t<=0)throw new v0({chainId:t});if(n||i)throw new J("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>g0)throw new _a({maxFeePerGas:r})}function LB(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{contractAddress:r,chainId:i,nonce:o,...s}=n;t.push([Te(i),r,Te(o),...ud({},s)])}return t}function k0(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n"u"||typeof m>"u")){const v=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(C=>Mt(C)),w=e.kzg,E=Gb({blobs:v,kzg:w});if(typeof f>"u"&&(f=H8({commitments:E})),typeof m>"u"){const C=Kb({blobs:v,commitments:E,kzg:w});m=G8({blobs:v,commitments:E,proofs:C})}}const p=k0(d),h=[Te(n),i?Te(i):"0x",u?Te(u):"0x",l?Te(l):"0x",r?Te(r):"0x",o??"0x",s?Te(s):"0x",c??"0x",p,a?Te(a):"0x",f??[],...ud(e,t)],y=[],g=[],b=[];if(m)for(let v=0;v{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const m=27n+(t.v===27n?0n:1n);if(t.v!==m)throw new _R({v:t.v});return m})(),c=as(t.r),f=as(t.s);u=[...u,Te(d),c==="0x00"?"0x":c,f==="0x00"?"0x":f]}else n>0&&(u=[...u,Te(n),"0x","0x"]);return wa(u)}function ud(e,t){const n=t??e,{v:r,yParity:i}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof r>"u"&&typeof i>"u")return[];const o=as(n.r),s=as(n.s);return[typeof i=="number"?i?Te(1):"0x":r===0n?"0x":r===1n?Te(1):r===27n?"0x":Te(1),o==="0x00"?"0x":o,s==="0x00"?"0x":s]}function UB(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function HB(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?yi(e.nonce):void 0,storageProof:e.storageProof?UB(e.storageProof):void 0}}async function zB(e,{address:t,blockNumber:n,blockTag:r,storageKeys:i}){const o=r??"latest",s=n!==void 0?Ae(n):void 0,a=await e.request({method:"eth_getProof",params:[t,i,s||o]});return HB(a)}async function WB(e,{address:t,blockNumber:n,blockTag:r="latest",slot:i}){const o=n!==void 0?Ae(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,o||r]})}async function hv(e,{blockHash:t,blockNumber:n,blockTag:r,hash:i,index:o}){var d,c,f;const s=r||"latest",a=n!==void 0?Ae(n):void 0;let l=null;if(i?l=await e.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):t?l=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,Ae(o)]},{dedupe:!0}):(a||s)&&(l=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||s,Ae(o)]},{dedupe:!!a})),!l)throw new k8({blockHash:t,blockNumber:n,blockTag:s,hash:i,index:o});return(((f=(c=(d=e.chain)==null?void 0:d.formatters)==null?void 0:c.transaction)==null?void 0:f.format)||j8)(l)}async function VB(e,{hash:t,transactionReceipt:n}){const[r,i]=await Promise.all([Ee(e,ld,"getBlockNumber")({}),t?Ee(e,hv,"getTransaction")({hash:t}):void 0]),o=(n==null?void 0:n.blockNumber)||(i==null?void 0:i.blockNumber);return o?r-o+1n:0n}async function W1(e,{hash:t}){var i,o,s;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new C8({hash:t});return(((s=(o=(i=e.chain)==null?void 0:i.formatters)==null?void 0:o.transactionReceipt)==null?void 0:s.format)||yB)(n)}async function qB(e,t){var y;const{allowFailure:n=!0,batchSize:r,blockNumber:i,blockTag:o,multicallAddress:s,stateOverride:a}=t,l=t.contracts,u=r??(typeof((y=e.batch)==null?void 0:y.multicall)=="object"&&e.batch.multicall.batchSize||1024);let d=s;if(!d){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");d=hc({blockNumber:i,chain:e.chain,contract:"multicall3"})}const c=[[]];let f=0,m=0;for(let g=0;g0&&m>u&&c[f].length>0&&(f++,m=(C.length-2)/2,c[f]=[]),c[f]=[...c[f],{allowFailure:!0,callData:C,target:v}]}catch(C){const k=zl(C,{abi:b,address:v,args:w,docsPath:"/docs/contract/multicall",functionName:E});if(!n)throw k;c[f]=[...c[f],{allowFailure:!0,callData:"0x",target:v}]}}const p=await Promise.allSettled(c.map(g=>Ee(e,bi,"readContract")({abi:D1,address:d,args:[g],blockNumber:i,blockTag:o,functionName:"aggregate3",stateOverride:a}))),h=[];for(let g=0;gt.toString(16).padStart(2,"0"));function Wl(e){fd(e);let t="";for(let n=0;n=Fi._0&&e<=Fi._9)return e-Fi._0;if(e>=Fi._A&&e<=Fi._F)return e-(Fi._A-10);if(e>=Fi._a&&e<=Fi._f)return e-(Fi._a-10)}function Vl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;iCE;e>>=C0,t+=1);return t}function QB(e,t){return e>>BigInt(t)&C0}function JB(e,t,n){return e|(n?C0:CE)<(GB<new Uint8Array(e),T6=e=>Uint8Array.from(e);function IE(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=Fm(e),i=Fm(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=(...c)=>n(i,r,...c),l=(c=Fm())=>{i=a(T6([0]),c),r=a(),c.length!==0&&(i=a(T6([1]),c),r=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let c=0;const f=[];for(;c{s(),l(c);let m;for(;!(m=f(u()));)l();return s(),m}}const eN={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||xa(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function dd(e,t,n={}){const r=(i,o,s)=>{const a=eN[o];if(typeof a!="function")throw new Error(`Invalid validator "${o}", expected function`);const l=e[i];if(!(s&&l===void 0)&&!a(l,e))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(n))r(i,o,!0);return e}const tN=Object.freeze(Object.defineProperty({__proto__:null,abytes:fd,bitGet:QB,bitLen:YB,bitMask:yv,bitSet:JB,bytesToHex:Wl,bytesToNumberBE:la,bytesToNumberLE:mv,concatBytes:$f,createHmacDrbg:IE,ensureBytes:Nr,equalBytes:TE,hexToBytes:Vl,hexToNumber:pv,isBytes:xa,numberToBytesBE:ql,numberToBytesLE:gv,numberToHexUnpadded:AE,numberToVarBytesBE:ZB,utf8ToBytes:XB,validateObject:dd},Symbol.toStringTag,{value:"Module"}));function nN(e,t){const n=Er(e)?cs(e):e,r=Er(t)?cs(t):t;return TE(n,r)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const nn=BigInt(0),Pt=BigInt(1),Vs=BigInt(2),rN=BigInt(3),V1=BigInt(4),I6=BigInt(5),$6=BigInt(8);BigInt(9);BigInt(16);function In(e,t){const n=e%t;return n>=nn?n:t+n}function iN(e,t,n){if(n<=nn||t 0");if(n===Pt)return nn;let r=Pt;for(;t>nn;)t&Pt&&(r=r*e%n),e=e*e%n,t>>=Pt;return r}function pr(e,t,n){let r=e;for(;t-- >nn;)r*=r,r%=n;return r}function q1(e,t){if(e===nn||t<=nn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=In(e,t),r=t,i=nn,o=Pt;for(;n!==nn;){const a=r/n,l=r%n,u=i-o*a;r=n,n=l,i=o,o=u}if(r!==Pt)throw new Error("invert: does not exist");return In(i,t)}function oN(e){const t=(e-Pt)/Vs;let n,r,i;for(n=e-Pt,r=0;n%Vs===nn;n/=Vs,r++);for(i=Vs;i(r[i]="function",r),t);return dd(e,n)}function cN(e,t,n){if(n 0");if(n===nn)return e.ONE;if(n===Pt)return t;let r=e.ONE,i=t;for(;n>nn;)n&Pt&&(r=e.mul(r,i)),i=e.sqr(i),n>>=Pt;return r}function uN(e,t){const n=new Array(t.length),r=t.reduce((o,s,a)=>e.is0(s)?o:(n[a]=o,e.mul(o,s)),e.ONE),i=e.inv(r);return t.reduceRight((o,s,a)=>e.is0(s)?o:(n[a]=e.mul(o,n[a]),e.mul(o,s)),i),n}function $E(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function fN(e,t,n=!1,r={}){if(e<=nn)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=$E(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=sN(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:yv(i),ZERO:nn,ONE:Pt,create:l=>In(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return nn<=l&&ll===nn,isOdd:l=>(l&Pt)===Pt,neg:l=>In(-l,e),eql:(l,u)=>l===u,sqr:l=>In(l*l,e),add:(l,u)=>In(l+u,e),sub:(l,u)=>In(l-u,e),mul:(l,u)=>In(l*u,e),pow:(l,u)=>cN(a,l,u),div:(l,u)=>In(l*q1(u,e),e),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>q1(l,e),sqrt:r.sqrt||(l=>s(a,l)),invertBatch:l=>uN(a,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>n?gv(l,o):ql(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return n?mv(l):la(l)}});return Object.freeze(a)}function PE(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function OE(e){const t=PE(e);return t+Math.ceil(t/2)}function dN(e,t,n=!1){const r=e.length,i=PE(t),o=OE(t);if(r<16||r1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const s=n?la(e):mv(e),a=In(s,t-Pt)+Pt;return n?gv(a,i):ql(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hN=BigInt(0),Um=BigInt(1);function pN(e,t){const n=(i,o)=>{const s=o.negate();return i?s:o},r=i=>{const o=Math.ceil(t/i)+1,s=2**(i-1);return{windows:o,windowSize:s}};return{constTimeNegate:n,unsafeLadder(i,o){let s=e.ZERO,a=i;for(;o>hN;)o&Um&&(s=s.add(a)),a=a.double(),o>>=Um;return s},precomputeWindow(i,o){const{windows:s,windowSize:a}=r(o),l=[];let u=i,d=u;for(let c=0;c>=m,y>l&&(y-=f,s+=Um);const g=h,b=h+Math.abs(y)-1,v=p%2!==0,w=y<0;y===0?d=d.add(n(v,o[g])):u=u.add(n(w,o[b]))}return{p:u,f:d}},wNAFCached(i,o,s,a){const l=i._WINDOW_SIZE||1;let u=o.get(i);return u||(u=this.precomputeWindow(i,l),l!==1&&o.set(i,a(u))),this.wNAF(l,u,s)}}}function RE(e){return lN(e.Fp),dd(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...$E(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mN(e){const t=RE(e);dd(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:gN,hexToBytes:yN}=tN,Ys={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=Ys;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:gN(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=Ys,n=typeof e=="string"?yN(e):e;fd(n);let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=Ys._parseInt(n.subarray(2)),{d:s,l:a}=Ys._parseInt(o);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(e){const t=u=>Number.parseInt(u[0],16)&8?"00"+u:u,n=u=>{const d=u.toString(16);return d.length&1?`0${d}`:d},r=t(n(e.s)),i=t(n(e.r)),o=r.length/2,s=i.length/2,a=n(o),l=n(s);return`30${n(s+o+4)}02${l}${i}02${a}${r}`}},qi=BigInt(0),mr=BigInt(1);BigInt(2);const P6=BigInt(3);BigInt(4);function bN(e){const t=mN(e),{Fp:n}=t,r=t.toBytes||((p,h,y)=>{const g=h.toAffine();return $f(Uint8Array.from([4]),n.toBytes(g.x),n.toBytes(g.y))}),i=t.fromBytes||(p=>{const h=p.subarray(1),y=n.fromBytes(h.subarray(0,n.BYTES)),g=n.fromBytes(h.subarray(n.BYTES,2*n.BYTES));return{x:y,y:g}});function o(p){const{a:h,b:y}=t,g=n.sqr(p),b=n.mul(g,p);return n.add(n.add(b,n.mul(p,h)),y)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function s(p){return typeof p=="bigint"&&qin.eql(v,n.ZERO);return b(y)&&b(g)?c.ZERO:new c(y,g,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){const y=n.invertBatch(h.map(g=>g.pz));return h.map((g,b)=>g.toAffine(y[b])).map(c.fromAffine)}static fromHex(h){const y=c.fromAffine(i(Nr("pointHex",h)));return y.assertValidity(),y}static fromPrivateKey(h){return c.BASE.multiply(l(h))}_setWindowSize(h){this._WINDOW_SIZE=h,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:h,y}=this.toAffine();if(!n.isValid(h)||!n.isValid(y))throw new Error("bad point: x or y not FE");const g=n.sqr(y),b=o(h);if(!n.eql(g,b))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:h}=this.toAffine();if(n.isOdd)return!n.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){d(h);const{px:y,py:g,pz:b}=this,{px:v,py:w,pz:E}=h,C=n.eql(n.mul(y,E),n.mul(v,b)),k=n.eql(n.mul(g,E),n.mul(w,b));return C&&k}negate(){return new c(this.px,n.neg(this.py),this.pz)}double(){const{a:h,b:y}=t,g=n.mul(y,P6),{px:b,py:v,pz:w}=this;let E=n.ZERO,C=n.ZERO,k=n.ZERO,_=n.mul(b,b),S=n.mul(v,v),A=n.mul(w,w),I=n.mul(b,v);return I=n.add(I,I),k=n.mul(b,w),k=n.add(k,k),E=n.mul(h,k),C=n.mul(g,A),C=n.add(E,C),E=n.sub(S,C),C=n.add(S,C),C=n.mul(E,C),E=n.mul(I,E),k=n.mul(g,k),A=n.mul(h,A),I=n.sub(_,A),I=n.mul(h,I),I=n.add(I,k),k=n.add(_,_),_=n.add(k,_),_=n.add(_,A),_=n.mul(_,I),C=n.add(C,_),A=n.mul(v,w),A=n.add(A,A),_=n.mul(A,I),E=n.sub(E,_),k=n.mul(A,S),k=n.add(k,k),k=n.add(k,k),new c(E,C,k)}add(h){d(h);const{px:y,py:g,pz:b}=this,{px:v,py:w,pz:E}=h;let C=n.ZERO,k=n.ZERO,_=n.ZERO;const S=t.a,A=n.mul(t.b,P6);let I=n.mul(y,v),L=n.mul(g,w),F=n.mul(b,E),N=n.add(y,g),R=n.add(v,w);N=n.mul(N,R),R=n.add(I,L),N=n.sub(N,R),R=n.add(y,b);let B=n.add(v,E);return R=n.mul(R,B),B=n.add(I,F),R=n.sub(R,B),B=n.add(g,b),C=n.add(w,E),B=n.mul(B,C),C=n.add(L,F),B=n.sub(B,C),_=n.mul(S,R),C=n.mul(A,F),_=n.add(C,_),C=n.sub(L,_),_=n.add(L,_),k=n.mul(C,_),L=n.add(I,I),L=n.add(L,I),F=n.mul(S,F),R=n.mul(A,R),L=n.add(L,F),F=n.sub(I,F),F=n.mul(S,F),R=n.add(R,F),I=n.mul(L,R),k=n.add(k,I),I=n.mul(B,R),C=n.mul(N,C),C=n.sub(C,I),I=n.mul(N,L),_=n.mul(B,_),_=n.add(_,I),new c(C,k,_)}subtract(h){return this.add(h.negate())}is0(){return this.equals(c.ZERO)}wNAF(h){return m.wNAFCached(this,u,h,y=>{const g=n.invertBatch(y.map(b=>b.pz));return y.map((b,v)=>b.toAffine(g[v])).map(c.fromAffine)})}multiplyUnsafe(h){const y=c.ZERO;if(h===qi)return y;if(a(h),h===mr)return this;const{endo:g}=t;if(!g)return m.unsafeLadder(this,h);let{k1neg:b,k1:v,k2neg:w,k2:E}=g.splitScalar(h),C=y,k=y,_=this;for(;v>qi||E>qi;)v&mr&&(C=C.add(_)),E&mr&&(k=k.add(_)),_=_.double(),v>>=mr,E>>=mr;return b&&(C=C.negate()),w&&(k=k.negate()),k=new c(n.mul(k.px,g.beta),k.py,k.pz),C.add(k)}multiply(h){a(h);let y=h,g,b;const{endo:v}=t;if(v){const{k1neg:w,k1:E,k2neg:C,k2:k}=v.splitScalar(y);let{p:_,f:S}=this.wNAF(E),{p:A,f:I}=this.wNAF(k);_=m.constTimeNegate(w,_),A=m.constTimeNegate(C,A),A=new c(n.mul(A.px,v.beta),A.py,A.pz),g=_.add(A),b=S.add(I)}else{const{p:w,f:E}=this.wNAF(y);g=w,b=E}return c.normalizeZ([g,b])[0]}multiplyAndAddUnsafe(h,y,g){const b=c.BASE,v=(E,C)=>C===qi||C===mr||!E.equals(b)?E.multiplyUnsafe(C):E.multiply(C),w=v(this,y).add(v(h,g));return w.is0()?void 0:w}toAffine(h){const{px:y,py:g,pz:b}=this,v=this.is0();h==null&&(h=v?n.ONE:n.inv(b));const w=n.mul(y,h),E=n.mul(g,h),C=n.mul(b,h);if(v)return{x:n.ZERO,y:n.ZERO};if(!n.eql(C,n.ONE))throw new Error("invZ was invalid");return{x:w,y:E}}isTorsionFree(){const{h,isTorsionFree:y}=t;if(h===mr)return!0;if(y)return y(c,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h,clearCofactor:y}=t;return h===mr?this:y?y(c,this):this.multiplyUnsafe(t.h)}toRawBytes(h=!0){return this.assertValidity(),r(c,this,h)}toHex(h=!0){return Wl(this.toRawBytes(h))}}c.BASE=new c(t.Gx,t.Gy,n.ONE),c.ZERO=new c(n.ZERO,n.ONE,n.ZERO);const f=t.nBitLength,m=pN(c,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:s}}function vN(e){const t=RE(e);return dd(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function wN(e){const t=vN(e),{Fp:n,n:r}=t,i=n.BYTES+1,o=2*n.BYTES+1;function s(R){return qiWl(ql(R,t.nByteLength));function p(R){const B=r>>mr;return R>B}function h(R){return p(R)?a(-R):R}const y=(R,B,V)=>la(R.slice(B,V));class g{constructor(B,V,j){this.r=B,this.s=V,this.recovery=j,this.assertValidity()}static fromCompact(B){const V=t.nByteLength;return B=Nr("compactSignature",B,V*2),new g(y(B,0,V),y(B,V,2*V))}static fromDER(B){const{r:V,s:j}=Ys.toSig(Nr("DER",B));return new g(V,j)}assertValidity(){if(!f(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!f(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(B){return new g(this.r,this.s,B)}recoverPublicKey(B){const{r:V,s:j,recovery:W}=this,Y=k(Nr("msgHash",B));if(W==null||![0,1,2,3].includes(W))throw new Error("recovery id invalid");const te=W===2||W===3?V+t.n:V;if(te>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const ae=W&1?"03":"02",Z=u.fromHex(ae+m(te)),pe=l(te),Ie=a(-Y*pe),_e=a(j*pe),Ce=u.BASE.multiplyAndAddUnsafe(Z,Ie,_e);if(!Ce)throw new Error("point at infinify");return Ce.assertValidity(),Ce}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Vl(this.toDERHex())}toDERHex(){return Ys.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Vl(this.toCompactHex())}toCompactHex(){return m(this.r)+m(this.s)}}const b={isValidPrivateKey(R){try{return d(R),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const R=OE(t.n);return dN(t.randomBytes(R),t.n)},precompute(R=8,B=u.BASE){return B._setWindowSize(R),B.multiply(BigInt(3)),B}};function v(R,B=!0){return u.fromPrivateKey(R).toRawBytes(B)}function w(R){const B=xa(R),V=typeof R=="string",j=(B||V)&&R.length;return B?j===i||j===o:V?j===2*i||j===2*o:R instanceof u}function E(R,B,V=!0){if(w(R))throw new Error("first arg must be private key");if(!w(B))throw new Error("second arg must be public key");return u.fromHex(B).multiply(d(R)).toRawBytes(V)}const C=t.bits2int||function(R){const B=la(R),V=R.length*8-t.nBitLength;return V>0?B>>BigInt(V):B},k=t.bits2int_modN||function(R){return a(C(R))},_=yv(t.nBitLength);function S(R){if(typeof R!="bigint")throw new Error("bigint expected");if(!(qi<=R&&R<_))throw new Error(`bigint expected < 2^${t.nBitLength}`);return ql(R,t.nByteLength)}function A(R,B,V=I){if(["recovered","canonical"].some($e=>$e in V))throw new Error("sign() legacy options not supported");const{hash:j,randomBytes:W}=t;let{lowS:Y,prehash:te,extraEntropy:ae}=V;Y==null&&(Y=!0),R=Nr("msgHash",R),te&&(R=Nr("prehashed msgHash",j(R)));const Z=k(R),pe=d(B),Ie=[S(pe),S(Z)];if(ae!=null&&ae!==!1){const $e=ae===!0?W(n.BYTES):ae;Ie.push(Nr("extraEntropy",$e))}const _e=$f(...Ie),Ce=Z;function le($e){const rt=C($e);if(!f(rt))return;const je=l(rt),nt=u.BASE.multiply(rt).toAffine(),Le=a(nt.x);if(Le===qi)return;const _t=a(je*a(Ce+Le*pe));if(_t===qi)return;let Kn=(nt.x===Le?0:2)|Number(nt.y&mr),Zr=_t;return Y&&p(_t)&&(Zr=h(_t),Kn^=1),new g(Le,Zr,Kn)}return{seed:_e,k2sig:le}}const I={lowS:t.lowS,prehash:!1},L={lowS:t.lowS,prehash:!1};function F(R,B,V=I){const{seed:j,k2sig:W}=A(R,B,V),Y=t;return IE(Y.hash.outputLen,Y.nByteLength,Y.hmac)(j,W)}u.BASE._setWindowSize(8);function N(R,B,V,j=L){var nt;const W=R;if(B=Nr("msgHash",B),V=Nr("publicKey",V),"strict"in j)throw new Error("options.strict was renamed to lowS");const{lowS:Y,prehash:te}=j;let ae,Z;try{if(typeof W=="string"||xa(W))try{ae=g.fromDER(W)}catch(Le){if(!(Le instanceof Ys.Err))throw Le;ae=g.fromCompact(W)}else if(typeof W=="object"&&typeof W.r=="bigint"&&typeof W.s=="bigint"){const{r:Le,s:_t}=W;ae=new g(Le,_t)}else throw new Error("PARSE");Z=u.fromHex(V)}catch(Le){if(Le.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Y&&ae.hasHighS())return!1;te&&(B=t.hash(B));const{r:pe,s:Ie}=ae,_e=k(B),Ce=l(Ie),le=a(_e*Ce),$e=a(pe*Ce),rt=(nt=u.BASE.multiplyAndAddUnsafe(Z,le,$e))==null?void 0:nt.toAffine();return rt?a(rt.x)===pe:!1}return{CURVE:t,getPublicKey:v,getSharedSecret:E,sign:F,verify:N,ProjectivePoint:u,Signature:g,utils:b}}class LE extends Pb{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,sO(t);const r=c0(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let s=0;snew LE(e,t).update(n).digest();dp.create=(e,t)=>new LE(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function _N(e){return{hash:e,hmac:(t,...n)=>dp(e,t,vu(...n)),randomBytes:TO}}function xN(e,t){const n=r=>wN({...e,..._N(r)});return Object.freeze({...n(t),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const BE=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),O6=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),EN=BigInt(1),G1=BigInt(2),R6=(e,t)=>(e+t/G1)/t;function SN(e){const t=BE,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),l=BigInt(88),u=e*e*e%t,d=u*u*e%t,c=pr(d,n,t)*d%t,f=pr(c,n,t)*d%t,m=pr(f,G1,t)*u%t,p=pr(m,i,t)*m%t,h=pr(p,o,t)*p%t,y=pr(h,a,t)*h%t,g=pr(y,l,t)*y%t,b=pr(g,a,t)*h%t,v=pr(b,n,t)*d%t,w=pr(v,s,t)*p%t,E=pr(w,r,t)*u%t,C=pr(E,G1,t);if(!K1.eql(K1.sqr(C),e))throw new Error("Cannot find square root");return C}const K1=fN(BE,void 0,void 0,{sqrt:SN}),Mn=xN({a:BigInt(0),b:BigInt(7),Fp:K1,n:O6,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=O6,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-EN*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=R6(o*e,t),l=R6(-r*e,t);let u=In(e-a*n-l*i,t),d=In(-a*r-l*o,t);const c=u>s,f=d>s;if(c&&(u=t-u),f&&(d=t-d),u>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:c,k1:u,k2neg:f,k2:d}}}},y0);BigInt(0);Mn.ProjectivePoint;const kN=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:Mn},Symbol.toStringTag,{value:"Module"}));function NE({r:e,s:t,to:n="hex",v:r,yParity:i}){const o=(()=>{if(i===0||i===1)return i;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new Mn.Signature(ls(e),ls(t)).toCompactHex()}${o===0?"1b":"1c"}`;return n==="hex"?s:Sr(s)}async function bv(e,t){const{address:n,factory:r,factoryData:i,hash:o,signature:s,...a}=t,l=Er(s)?s:typeof s=="object"&&"r"in s&&"s"in s?NE(s):Mt(s),u=await(async()=>!r&&!i||TB(l)?l:IB({address:r,data:i,signature:l}))();try{const{data:d}=await Ee(e,_0,"call")({data:w0({abi:aL,args:[n,o,u],bytecode:fL}),...a});return nN(d??"0x0","0x1")}catch(d){try{if(Qb(fp(n),await $8({hash:o,signature:s})))return!0}catch{}if(d instanceof A8)return!1;throw d}}async function CN(e,{address:t,message:n,factory:r,factoryData:i,signature:o,...s}){const a=fv(n);return bv(e,{address:t,factory:r,factoryData:i,hash:a,signature:o,...s})}async function AN(e,t){const{address:n,factory:r,factoryData:i,signature:o,message:s,primaryType:a,types:l,domain:u,...d}=t,c=gE({message:s,primaryType:a,types:l,domain:u});return bv(e,{address:n,factory:r,factoryData:i,hash:c,signature:o,...d})}function ME(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:i,poll:o,pollingInterval:s=e.pollingInterval}){const a=typeof o<"u"?o:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket");let l;return a?(()=>{const c=hn(["watchBlockNumber",e.uid,t,n,s]);return ds(c,{onBlockNumber:r,onError:i},f=>ad(async()=>{var m;try{const p=await Ee(e,ld,"getBlockNumber")({cacheTime:0});if(l){if(p===l)return;if(p-l>1&&n)for(let h=l+1n;hl)&&(f.onBlockNumber(p,l),l=p)}catch(p){(m=f.onError)==null||m.call(f,p)}},{emitOnBegin:t,interval:s}))})():(()=>{const c=hn(["watchBlockNumber",e.uid,t,n]);return ds(c,{onBlockNumber:r,onError:i},f=>{let m=!0,p=()=>m=!1;return(async()=>{try{const h=(()=>{if(e.transport.type==="fallback"){const g=e.transport.transports.find(b=>b.config.type==="webSocket");return g?g.value:e.transport}return e.transport})(),{unsubscribe:y}=await h.subscribe({params:["newHeads"],onData(g){var v;if(!m)return;const b=ls((v=g.result)==null?void 0:v.number);f.onBlockNumber(b,l),l=b},onError(g){var b;(b=f.onError)==null||b.call(f,g)}});p=y,m||p()}catch(h){i==null||i(h)}})(),()=>p()})})()}async function TN(e,{confirmations:t=1,hash:n,onReplaced:r,pollingInterval:i=e.pollingInterval,retryCount:o=6,retryDelay:s=({count:l})=>~~(1<{a&&setTimeout(()=>h(new d6({hash:n})),a);const y=ds(l,{onReplaced:r,resolve:p,reject:h},g=>{const b=Ee(e,ME,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(v){const w=C=>{b(),C(),y()};let E=v;if(!m){u>o&&w(()=>g.reject(new d6({hash:n})));try{if(f){if(t>1&&(!f.blockNumber||E-f.blockNumber+1ng.resolve(f));return}if(d||(m=!0,await z1(async()=>{d=await Ee(e,hv,"getTransaction")({hash:n}),d.blockNumber&&(E=d.blockNumber)},{delay:s,retryCount:o}),m=!1),f=await Ee(e,W1,"getTransactionReceipt")({hash:n}),t>1&&(!f.blockNumber||E-f.blockNumber+1ng.resolve(f))}catch(C){if(C instanceof k8||C instanceof C8){if(!d){m=!1;return}try{c=d,m=!0;const k=await z1(()=>Ee(e,us,"getBlock")({blockNumber:E,includeTransactions:!0}),{delay:s,retryCount:o,shouldRetry:({error:A})=>A instanceof N8});m=!1;const _=k.transactions.find(({from:A,nonce:I})=>A===c.from&&I===c.nonce);if(!_||(f=await Ee(e,W1,"getTransactionReceipt")({hash:_.hash}),t>1&&(!f.blockNumber||E-f.blockNumber+1n{var A;(A=g.onReplaced)==null||A.call(g,{reason:S,replacedTransaction:c,transaction:_,transactionReceipt:f}),g.resolve(f)})}catch(k){w(()=>g.reject(k))}}else w(()=>g.reject(C))}finally{u++}}}})})})}function IN(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:i,onError:o,includeTransactions:s,poll:a,pollingInterval:l=e.pollingInterval}){const u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),d=s??!1;let c;return u?(()=>{const p=hn(["watchBlocks",e.uid,t,n,r,d,l]);return ds(p,{onBlock:i,onError:o},h=>ad(async()=>{var y;try{const g=await Ee(e,us,"getBlock")({blockTag:t,includeTransactions:d});if(g.number&&(c!=null&&c.number)){if(g.number===c.number)return;if(g.number-c.number>1&&n)for(let b=(c==null?void 0:c.number)+1n;bc.number)&&(h.onBlock(g,c),c=g)}catch(g){(y=h.onError)==null||y.call(h,g)}},{emitOnBegin:r,interval:l}))})():(()=>{let p=!0,h=()=>p=!1;return(async()=>{try{const y=(()=>{if(e.transport.type==="fallback"){const b=e.transport.transports.find(v=>v.config.type==="webSocket");return b?b.value:e.transport}return e.transport})(),{unsubscribe:g}=await y.subscribe({params:["newHeads"],onData(b){var E,C,k;if(!p)return;const w=(((k=(C=(E=e.chain)==null?void 0:E.formatters)==null?void 0:C.block)==null?void 0:k.format)||D8)(b.result);i(w,c),c=w},onError(b){o==null||o(b)}});h=g,p||h()}catch(y){o==null||o(y)}})(),()=>h()})()}function $N(e,{address:t,args:n,batch:r=!0,event:i,events:o,fromBlock:s,onError:a,onLogs:l,poll:u,pollingInterval:d=e.pollingInterval,strict:c}){const f=typeof u<"u"?u:typeof s=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),m=c??!1;return f?(()=>{const y=hn(["watchEvent",t,n,r,e.uid,i,d,s]);return ds(y,{onLogs:l,onError:a},g=>{let b;s!==void 0&&(b=s-1n);let v,w=!1;const E=ad(async()=>{var C;if(!w){try{v=await Ee(e,pE,"createEventFilter")({address:t,args:n,event:i,events:o,strict:m,fromBlock:s})}catch{}w=!0;return}try{let k;if(v)k=await Ee(e,x0,"getFilterChanges")({filter:v});else{const _=await Ee(e,ld,"getBlockNumber")({});b&&b!==_?k=await Ee(e,tv,"getLogs")({address:t,args:n,event:i,events:o,fromBlock:b+1n,toBlock:_}):k=[],b=_}if(k.length===0)return;if(r)g.onLogs(k);else for(const _ of k)g.onLogs([_])}catch(k){v&&k instanceof va&&(w=!1),(C=g.onError)==null||C.call(g,k)}},{emitOnBegin:!0,interval:d});return async()=>{v&&await Ee(e,E0,"uninstallFilter")({filter:v}),E()}})})():(()=>{let y=!0,g=()=>y=!1;return(async()=>{try{const b=(()=>{if(e.transport.type==="fallback"){const C=e.transport.transports.find(k=>k.config.type==="webSocket");return C?C.value:e.transport}return e.transport})(),v=o??(i?[i]:void 0);let w=[];v&&(w=[v.flatMap(k=>rd({abi:[k],eventName:k.name,args:n}))],i&&(w=w[0]));const{unsubscribe:E}=await b.subscribe({params:["logs",{address:t,topics:w}],onData(C){var _;if(!y)return;const k=C.result;try{const{eventName:S,args:A}=Jb({abi:v??[],data:k.data,topics:k.topics,strict:m}),I=fs(k,{args:A,eventName:S});l([I])}catch(S){let A,I;if(S instanceof df||S instanceof l0){if(c)return;A=S.abiItem.name,I=(_=S.abiItem.inputs)==null?void 0:_.some(F=>!("name"in F&&F.name))}const L=fs(k,{args:I?[]:{},eventName:A});l([L])}},onError(C){a==null||a(C)}});g=E,y||g()}catch(b){a==null||a(b)}})(),()=>g()})()}function PN(e,{batch:t=!0,onError:n,onTransactions:r,poll:i,pollingInterval:o=e.pollingInterval}){return(typeof i<"u"?i:e.transport.type!=="webSocket")?(()=>{const u=hn(["watchPendingTransactions",e.uid,t,o]);return ds(u,{onTransactions:r,onError:n},d=>{let c;const f=ad(async()=>{var m;try{if(!c)try{c=await Ee(e,mE,"createPendingTransactionFilter")({});return}catch(h){throw f(),h}const p=await Ee(e,x0,"getFilterChanges")({filter:c});if(p.length===0)return;if(t)d.onTransactions(p);else for(const h of p)d.onTransactions([h])}catch(p){(m=d.onError)==null||m.call(d,p)}},{emitOnBegin:!0,interval:o});return async()=>{c&&await Ee(e,E0,"uninstallFilter")({filter:c}),f()}})})():(()=>{let u=!0,d=()=>u=!1;return(async()=>{try{const{unsubscribe:c}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!u)return;const m=f.result;r([m])},onError(f){n==null||n(f)}});d=c,u||d()}catch(c){n==null||n(c)}})(),()=>d()})()}function ON(e){var c,f,m;const{scheme:t,statement:n,...r}=((c=e.match(RN))==null?void 0:c.groups)??{},{chainId:i,expirationTime:o,issuedAt:s,notBefore:a,requestId:l,...u}=((f=e.match(LN))==null?void 0:f.groups)??{},d=(m=e.split("Resources:")[1])==null?void 0:m.split(` -- `).slice(1);return{...r,...u,...i?{chainId:Number(i)}:{},...o?{expirationTime:new Date(o)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...l?{requestId:l}:{},...d?{resources:d}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const RN=/^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?
0x[a-fA-F0-9]{40})\n\n(?:(?.*)\n\n)?/,LN=/(?:URI: (?.+))\n(?:Version: (?.+))\n(?:Chain ID: (?\d+))\n(?:Nonce: (?[a-zA-Z0-9]+))\n(?:Issued At: (?.+))(?:\nExpiration Time: (?.+))?(?:\nNot Before: (?.+))?(?:\nRequest ID: (?.+))?/;function BN(e){const{address:t,domain:n,message:r,nonce:i,scheme:o,time:s=new Date}=e;if(n&&r.domain!==n||i&&r.nonce!==i||o&&r.scheme!==o||r.expirationTime&&s>=r.expirationTime||r.notBefore&&s_0(e,t),createBlockFilter:()=>iB(e),createContractEventFilter:t=>jb(e,t),createEventFilter:t=>pE(e,t),createPendingTransactionFilter:()=>mE(e),estimateContractGas:t=>Y8(e,t),estimateGas:t=>Yb(e,t),getBalance:t=>X8(e,t),getBlobBaseFee:()=>oB(e),getBlock:t=>us(e,t),getBlockNumber:t=>ld(e,t),getBlockTransactionCount:t=>sB(e,t),getBytecode:t=>k6(e,t),getChainId:()=>sd(e),getCode:t=>k6(e,t),getContractEvents:t=>nv(e,t),getEip712Domain:t=>IL(e,t),getEnsAddress:t=>HL(e,t),getEnsAvatar:t=>tB(e,t),getEnsName:t=>nB(e,t),getEnsResolver:t=>rB(e,t),getEnsText:t=>hE(e,t),getFeeHistory:t=>lB(e,t),estimateFeesPerGas:t=>qR(e,t),getFilterChanges:t=>x0(e,t),getFilterLogs:t=>cB(e,t),getGasPrice:()=>qb(e),getLogs:t=>tv(e,t),getProof:t=>zB(e,t),estimateMaxPriorityFeePerGas:t=>VR(e,t),getStorageAt:t=>WB(e,t),getTransaction:t=>hv(e,t),getTransactionConfirmations:t=>VB(e,t),getTransactionCount:t=>U8(e,t),getTransactionReceipt:t=>W1(e,t),multicall:t=>qB(e,t),prepareTransactionRequest:t=>b0(e,t),readContract:t=>bi(e,t),sendRawTransaction:t=>rv(e,t),simulateContract:t=>nE(e,t),verifyMessage:t=>CN(e,t),verifySiweMessage:t=>NN(e,t),verifyTypedData:t=>AN(e,t),uninstallFilter:t=>E0(e,t),waitForTransactionReceipt:t=>TN(e,t),watchBlocks:t=>IN(e,t),watchBlockNumber:t=>ME(e,t),watchContractEvent:t=>rE(e,t),watchEvent:t=>$N(e,t),watchPendingTransactions:t=>PN(e,t)}}function jN(e){const{key:t="public",name:n="Public Client"}=e;return aE({...e,key:t,name:n,type:"publicClient"}).extend(MN)}function DN(e,t){const{abi:n,args:r,bytecode:i,...o}=t,s=w0({abi:n,args:r,bytecode:i});return iv(e,{...o,data:s})}async function FN(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>td(r))}async function UN(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function HN(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>fp(n))}async function zN(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function WN(e,{account:t=e.account,message:n}){if(!t)throw new cd({docsPath:"/docs/actions/wallet/signMessage"});const r=cr(t);if(r.signMessage)return r.signMessage({message:n});const i=typeof n=="string"?Fl(n):n.raw instanceof Uint8Array?Te(n.raw):n.raw;return e.request({method:"personal_sign",params:[i,r.address]},{retryCount:0})}async function VN(e,t){var u,d,c,f;const{account:n=e.account,chain:r=e.chain,...i}=t;if(!n)throw new cd({docsPath:"/docs/actions/wallet/signTransaction"});const o=cr(n);od({account:o,...t});const s=await Ee(e,sd,"getChainId")({});r!==null&&iE({currentChainId:s,chain:r});const a=(r==null?void 0:r.formatters)||((u=e.chain)==null?void 0:u.formatters),l=((d=a==null?void 0:a.transactionRequest)==null?void 0:d.format)||m0;return o.signTransaction?o.signTransaction({...i,chainId:s},{serializer:(f=(c=e.chain)==null?void 0:c.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...l(i),chainId:Ae(s),from:o.address}]},{retryCount:0})}async function qN(e,t){const{account:n=e.account,domain:r,message:i,primaryType:o}=t;if(!n)throw new cd({docsPath:"/docs/actions/wallet/signTypedData"});const s=cr(n),a={EIP712Domain:xE({domain:r}),...t.types};if(_E({domain:r,message:i,primaryType:o,types:a}),s.signTypedData)return s.signTypedData({domain:r,message:i,primaryType:o,types:a});const l=mB({domain:r,message:i,primaryType:o,types:a});return e.request({method:"eth_signTypedData_v4",params:[s.address,l]},{retryCount:0})}async function GN(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:Ae(t)}]},{retryCount:0})}async function KN(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}function ZN(e){return{addChain:t=>PL(e,t),deployContract:t=>DN(e,t),getAddresses:()=>FN(e),getChainId:()=>sd(e),getPermissions:()=>UN(e),prepareTransactionRequest:t=>b0(e,t),requestAddresses:()=>HN(e),requestPermissions:t=>zN(e,t),sendRawTransaction:t=>rv(e,t),sendTransaction:t=>iv(e,t),signMessage:t=>WN(e,t),signTransaction:t=>VN(e,t),signTypedData:t=>qN(e,t),switchChain:t=>GN(e,t),watchAsset:t=>KN(e,t),writeContract:t=>oE(e,t)}}function jE(e){const{key:t="wallet",name:n="Wallet Client",transport:r}=e;return aE({...e,key:t,name:n,transport:r,type:"walletClient"}).extend(ZN)}var zr=(e=>(e.PROD="prod",e.STAGING="staging",e.DEV="dev",e.LOCAL="local",e))(zr||{});const XN=lv({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),vv=lv({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),L6=lv({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc2.sepolia.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),YN=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"valPerBlock",type:"uint16"},{indexed:!1,internalType:"uint16",name:"valPerBlockTarget",type:"uint16"}],name:"BlockParamsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"ownerWallet",type:"address"},{indexed:!0,internalType:"address",name:"nodeWallet",type:"address"},{indexed:!1,internalType:"enum ValidatorV1.NodeType",name:"nodeType",type:"uint8"},{indexed:!1,internalType:"uint256",name:"nodeTokens",type:"uint256"},{indexed:!1,internalType:"string",name:"nodeApiBaseUrl",type:"string"}],name:"NodeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"nodeWallet",type:"address"},{indexed:!1,internalType:"address",name:"reporterWallet",type:"address"},{indexed:!1,internalType:"address[]",name:"voters",type:"address[]"},{indexed:!1,internalType:"enum ValidatorV1.VoteAction",name:"voteAction",type:"uint8"}],name:"NodeReported",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"nodeWallet",type:"address"},{indexed:!1,internalType:"enum ValidatorV1.NodeStatus",name:"nodeStatus",type:"uint8"},{indexed:!1,internalType:"uint256",name:"nodeTokens",type:"uint256"}],name:"NodeStatusChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"nodeRandomMinCount",type:"uint16"},{indexed:!1,internalType:"uint16",name:"nodeRandomPingCount",type:"uint16"}],name:"RandomParamsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[],name:"BAN_PERCENT",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"REPORTS_BEFORE_SLASH_S",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"REPORTS_BEFORE_SLASH_V",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"REPORT_THRESHOLD_PER_BLOCK",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"SLASHES_BEFORE_BAN_S",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"SLASHES_BEFORE_BAN_V",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"SLASH_PERCENT",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"acceptOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"dnodes",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActiveVNodes",outputs:[{components:[{internalType:"address",name:"nodeWallet",type:"address"},{internalType:"string",name:"nodeApiBaseUrl",type:"string"}],internalType:"struct ValidatorV1.ActiveValidator[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDNodes",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDNodesLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_nodeWallet",type:"address"}],name:"getNodeInfo",outputs:[{components:[{internalType:"address",name:"ownerWallet",type:"address"},{internalType:"address",name:"nodeWallet",type:"address"},{internalType:"enum ValidatorV1.NodeType",name:"nodeType",type:"uint8"},{internalType:"uint256",name:"nodeTokens",type:"uint256"},{internalType:"string",name:"nodeApiBaseUrl",type:"string"},{components:[{internalType:"uint16",name:"reportCounter",type:"uint16"},{internalType:"uint16",name:"slashCounter",type:"uint16"},{internalType:"uint128[]",name:"reportedInBlocks",type:"uint128[]"},{internalType:"address[]",name:"reportedBy",type:"address[]"},{internalType:"uint128[]",name:"reportedKeys",type:"uint128[]"}],internalType:"struct ValidatorV1.NodeCounters",name:"counters",type:"tuple"},{internalType:"enum ValidatorV1.NodeStatus",name:"status",type:"uint8"}],internalType:"struct ValidatorV1.NodeInfo",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSNodes",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSNodesLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVNodes",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVNodesLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"protocolVersion_",type:"uint16"},{internalType:"address",name:"pushToken_",type:"address"},{internalType:"uint16",name:"valPerBlockTarget_",type:"uint16"},{internalType:"uint16",name:"nodeRandomMinCount_",type:"uint16"},{internalType:"uint16",name:"nodeRandomPingCount_",type:"uint16"},{internalType:"uint16",name:"REPORTS_BEFORE_SLASH_V_",type:"uint16"},{internalType:"uint16",name:"REPORTS_BEFORE_SLASH_S_",type:"uint16"},{internalType:"uint16",name:"SLASHES_BEFORE_BAN_V_",type:"uint16"},{internalType:"uint16",name:"SLASHES_BEFORE_BAN_S_",type:"uint16"},{internalType:"uint16",name:"SLASH_PERCENT_",type:"uint16"},{internalType:"uint16",name:"BAN_PERCENT_",type:"uint16"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"minStakeD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minStakeS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minStakeV",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeMap",outputs:[{internalType:"address",name:"ownerWallet",type:"address"},{internalType:"address",name:"nodeWallet",type:"address"},{internalType:"enum ValidatorV1.NodeType",name:"nodeType",type:"uint8"},{internalType:"uint256",name:"nodeTokens",type:"uint256"},{internalType:"string",name:"nodeApiBaseUrl",type:"string"},{components:[{internalType:"uint16",name:"reportCounter",type:"uint16"},{internalType:"uint16",name:"slashCounter",type:"uint16"},{internalType:"uint128[]",name:"reportedInBlocks",type:"uint128[]"},{internalType:"address[]",name:"reportedBy",type:"address[]"},{internalType:"uint128[]",name:"reportedKeys",type:"uint128[]"}],internalType:"struct ValidatorV1.NodeCounters",name:"counters",type:"tuple"},{internalType:"enum ValidatorV1.NodeStatus",name:"status",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"nodeRandomMinCount",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"nodeRandomPingCount",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolVersion",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from_",type:"address"},{internalType:"address",name:"to_",type:"address"},{internalType:"uint256",name:"amount_",type:"uint256"}],name:"redistributeStaked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"nodeTokens_",type:"uint256"},{internalType:"enum ValidatorV1.NodeType",name:"nodeType_",type:"uint8"},{internalType:"string",name:"nodeApiBaseUrl_",type:"string"},{internalType:"address",name:"nodeWallet_",type:"address"}],name:"registerNodeAndStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum ValidatorV1.NodeType",name:"targetNodeType_",type:"uint8"},{internalType:"bytes",name:"voteBlob_",type:"bytes"},{internalType:"bytes[]",name:"signatures_",type:"bytes[]"}],name:"reportNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"addr_",type:"address"}],name:"setStorageContract",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"snodes",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"storageContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalFees",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalStaked",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to_",type:"address"},{internalType:"uint256",name:"amount_",type:"uint256"}],name:"unstakeFees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"nodeWallet_",type:"address"}],name:"unstakeNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"valPerBlockTarget_",type:"uint16"}],name:"updateBlockParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"nodeRandomMinCount_",type:"uint16"},{internalType:"uint16",name:"nodeRandomPingCount_",type:"uint16"}],name:"updateRandomParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"valPerBlock",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"valPerBlockTarget",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"vnodes",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"vnodesActive",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"}],Hm={ABIS:{VALIDATOR:YN},VALIDATOR:{[zr.PROD]:{NETWORK:vv,VALIDATOR_CONTRACT:"TODO"},[zr.STAGING]:{NETWORK:L6,VALIDATOR_CONTRACT:"TODO"},[zr.DEV]:{NETWORK:L6,VALIDATOR_CONTRACT:"0xb08d2cA537F6183138955eD4fCb012f94f681954"},[zr.LOCAL]:{NETWORK:XN,VALIDATOR_CONTRACT:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9"}}},Ft=class Ft{constructor(t,n,r){Se(this,"call",async(t,n=[],r=this.activeValidatorURL)=>await Ft.sendJsonRpcRequest(r,t,n));this.activeValidatorURL=t,this.env=n,this.validatorContractClient=r}};Se(Ft,"instance"),Se(Ft,"idCounter",0),Se(Ft,"initalize",async t=>{const n={env:(t==null?void 0:t.env)||zr.STAGING};if(!Ft.instance||Ft.instance.env!==n.env){const r=Ft.createValidatorContractClient(n.env),i=await Ft.getActiveValidator(r);Ft.instance=new Ft(i.nodeApiBaseUrl,n.env,r)}return Ft.instance}),Se(Ft,"createValidatorContractClient",t=>{const n=jN({chain:Hm.VALIDATOR[t].NETWORK,transport:cE()});return AL({abi:Hm.ABIS.VALIDATOR,address:Hm.VALIDATOR[t].VALIDATOR_CONTRACT,client:{public:n}})}),Se(Ft,"sendJsonRpcRequest",async(t,n,r)=>{const i={jsonrpc:"2.0",method:n,params:r,id:Ft.idCounter++},o=()=>t.includes(".local")?t.replace(".local",".localh"):t;try{const s=await Nt.post(`${o()}/api/v1/rpc`,i);if(s.data.error)throw console.error("JSON-RPC Error:",s.data.error),Error(s.data.error.message);return s.data.result}catch(s){throw console.error("Error sending JSON-RPC request:",s),s}}),Se(Ft,"ping",async t=>await Ft.sendJsonRpcRequest(t,"push_listening")),Se(Ft,"getActiveValidator",async t=>{const n=await t.read.getActiveVNodes();return EI(n)});let Pf=Ft;function QN(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>>o,a=!(!(s>>>7)&&t==0),l=(a?s|128:s)&255;if(n.push(l),!a)return}const r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),!!i){for(let o=3;o<31;o=o+7){const s=t>>>o,a=!!(s>>>7),l=(a?s|128:s)&255;if(n.push(l),!a)return}n.push(t>>>31&1)}}const _h=4294967296;function B6(e){const t=e[0]==="-";t&&(e=e.slice(1));const n=1e6;let r=0,i=0;function o(s,a){const l=Number(e.slice(s,a));i*=n,r=r*n+l,r>=_h&&(i=i+(r/_h|0),r=r%_h)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),t?FE(r,i):wv(r,i)}function JN(e,t){let n=wv(e,t);const r=n.hi&2147483648;r&&(n=FE(n.lo,n.hi));const i=DE(n.lo,n.hi);return r?"-"+i:i}function DE(e,t){if({lo:e,hi:t}=eM(e,t),t<=2097151)return String(_h*t+e);const n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535;let o=n+r*6777216+i*6710656,s=r+i*8147497,a=i*2;const l=1e7;return o>=l&&(s+=Math.floor(o/l),o%=l),s>=l&&(a+=Math.floor(s/l),s%=l),a.toString()+N6(s)+N6(o)}function eM(e,t){return{lo:e>>>0,hi:t>>>0}}function wv(e,t){return{lo:e|0,hi:t|0}}function FE(e,t){return t=~t,e?e=~e+1:t+=1,wv(e,t)}const N6=e=>{const t=String(e);return"0000000".slice(t.length)+t};function M6(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function tM(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}var j6={};const ui=nM();function nM(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof j6!="object"||j6.BUF_BIGINT_DISABLE!=="1")){const n=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),i=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(s){const a=typeof s=="bigint"?s:BigInt(s);if(a>r||ao||a>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(U6(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return Vm(t),M6(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.encodeUtf8(t);return this.uint32(n.byteLength),this.raw(n)}float(t){lM(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){U6(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){Vm(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return Vm(t),t=(t<<1^t>>31)>>>0,M6(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=ui.enc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=ui.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=ui.enc(t);return zm(n.lo,n.hi,this.buf),this}sint64(t){let n=ui.enc(t),r=n.hi>>31,i=n.lo<<1^r,o=(n.hi<<1|n.lo>>>31)^r;return zm(i,o,this.buf),this}uint64(t){let n=ui.uEnc(t);return zm(n.lo,n.hi,this.buf),this}}class hs{constructor(t,n=UE().decodeUtf8){this.decodeUtf8=n,this.varint64=QN,this.uint32=tM,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength)}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t,n){let r=this.pos;switch(t){case jo.Varint:for(;this.buf[this.pos++]&128;);break;case jo.Bit64:this.pos+=4;case jo.Bit32:this.pos+=4;break;case jo.LengthDelimited:let i=this.uint32();this.pos+=i;break;case jo.StartGroup:for(;;){const[o,s]=this.tag();if(s===jo.EndGroup){if(n!==void 0&&o!==n)throw new Error("invalid end group tag");break}this.skip(s,o)}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return ui.dec(...this.varint64())}uint64(){return ui.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,ui.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ui.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ui.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.decodeUtf8(this.bytes())}}function Vm(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>sM||eoM||e<0)throw new Error("invalid uint32: "+e)}function lM(e){if(typeof e=="string"){const t=e;if(e=Number(e),isNaN(e)&&t!=="NaN")throw new Error("invalid float32: "+t)}else if(typeof e!="number")throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>rM||e>>3){case 1:if(o!==8)break;i.type=n.uint32();continue;case 2:if(o!==18)break;i.category=n.string();continue;case 3:if(o!==26)break;i.sender=n.string();continue;case 4:if(o!==34)break;i.recipients.push(n.string());continue;case 5:if(o!==42)break;i.data=n.bytes();continue;case 6:if(o!==50)break;i.salt=n.bytes();continue;case 7:if(o!==58)break;i.apiToken=n.bytes();continue;case 8:if(o!==66)break;i.signature=n.bytes();continue;case 9:if(o!==74)break;i.fee=n.string();continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{type:Oo(e.type)?globalThis.Number(e.type):0,category:Oo(e.category)?globalThis.String(e.category):"",sender:Oo(e.sender)?globalThis.String(e.sender):"",recipients:globalThis.Array.isArray(e==null?void 0:e.recipients)?e.recipients.map(t=>globalThis.String(t)):[],data:Oo(e.data)?Xd(e.data):new Uint8Array(0),salt:Oo(e.salt)?Xd(e.salt):new Uint8Array(0),apiToken:Oo(e.apiToken)?Xd(e.apiToken):new Uint8Array(0),signature:Oo(e.signature)?Xd(e.signature):new Uint8Array(0),fee:Oo(e.fee)?globalThis.String(e.fee):""}},toJSON(e){var n;const t={};return e.type!==0&&(t.type=Math.round(e.type)),e.category!==""&&(t.category=e.category),e.sender!==""&&(t.sender=e.sender),(n=e.recipients)!=null&&n.length&&(t.recipients=e.recipients),e.data.length!==0&&(t.data=Yd(e.data)),e.salt.length!==0&&(t.salt=Yd(e.salt)),e.apiToken.length!==0&&(t.apiToken=Yd(e.apiToken)),e.signature.length!==0&&(t.signature=Yd(e.signature)),e.fee!==""&&(t.fee=e.fee),t},create(e){return wu.fromPartial(e??{})},fromPartial(e){var n;const t=H6();return t.type=e.type??0,t.category=e.category??"",t.sender=e.sender??"",t.recipients=((n=e.recipients)==null?void 0:n.map(r=>r))||[],t.data=e.data??new Uint8Array(0),t.salt=e.salt??new Uint8Array(0),t.apiToken=e.apiToken??new Uint8Array(0),t.signature=e.signature??new Uint8Array(0),t.fee=e.fee??"",t}};function Xd(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),n=new Uint8Array(t.length);for(let r=0;r{t.push(globalThis.String.fromCharCode(n))}),globalThis.btoa(t.join(""))}}function Oo(e){return e!=null}const cM=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function uM(e){return typeof e=="string"&&cM.test(e)}function fM(e){if(!uM(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}var cn=[];for(var qm=0;qm<256;++qm)cn.push((qm+256).toString(16).slice(1));function dM(e,t=0){return(cn[e[t+0]]+cn[e[t+1]]+cn[e[t+2]]+cn[e[t+3]]+"-"+cn[e[t+4]]+cn[e[t+5]]+"-"+cn[e[t+6]]+cn[e[t+7]]+"-"+cn[e[t+8]]+cn[e[t+9]]+"-"+cn[e[t+10]]+cn[e[t+11]]+cn[e[t+12]]+cn[e[t+13]]+cn[e[t+14]]+cn[e[t+15]]).toLowerCase()}var Qd,hM=new Uint8Array(16);function pM(){if(!Qd&&(Qd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qd(hM)}var mM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const z6={randomUUID:mM};function gM(e,t,n){if(z6.randomUUID&&!t&&!e)return z6.randomUUID();e=e||{};var r=e.random||(e.rng||pM)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,dM(r)}var Qs=(e=>(e.INIT_DID="INIT_DID",e.INIT_SESSION_KEY="INIT_SESSION_KEY",e))(Qs||{});function W6(){return{did:"",masterPubKey:"",derivedKeyIndex:0,derivedPubKey:"",walletToEncDerivedKey:{}}}const xh={encode(e,t=new A0){return e.did!==""&&t.uint32(10).string(e.did),e.masterPubKey!==""&&t.uint32(18).string(e.masterPubKey),e.derivedKeyIndex!==0&&t.uint32(24).uint32(e.derivedKeyIndex),e.derivedPubKey!==""&&t.uint32(34).string(e.derivedPubKey),Object.entries(e.walletToEncDerivedKey).forEach(([n,r])=>{Z1.encode({key:n,value:r},t.uint32(50).fork()).join()}),t},decode(e,t){const n=e instanceof hs?e:new hs(e);let r=t===void 0?n.len:n.pos+t;const i=W6();for(;n.pos>>3){case 1:if(o!==10)break;i.did=n.string();continue;case 2:if(o!==18)break;i.masterPubKey=n.string();continue;case 3:if(o!==24)break;i.derivedKeyIndex=n.uint32();continue;case 4:if(o!==34)break;i.derivedPubKey=n.string();continue;case 6:if(o!==50)break;const s=Z1.decode(n,n.uint32());s.value!==void 0&&(i.walletToEncDerivedKey[s.key]=s.value);continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{did:fl(e.did)?globalThis.String(e.did):"",masterPubKey:fl(e.masterPubKey)?globalThis.String(e.masterPubKey):"",derivedKeyIndex:fl(e.derivedKeyIndex)?globalThis.Number(e.derivedKeyIndex):0,derivedPubKey:fl(e.derivedPubKey)?globalThis.String(e.derivedPubKey):"",walletToEncDerivedKey:yM(e.walletToEncDerivedKey)?Object.entries(e.walletToEncDerivedKey).reduce((t,[n,r])=>(t[n]=String(r),t),{}):{}}},toJSON(e){const t={};if(e.did!==""&&(t.did=e.did),e.masterPubKey!==""&&(t.masterPubKey=e.masterPubKey),e.derivedKeyIndex!==0&&(t.derivedKeyIndex=Math.round(e.derivedKeyIndex)),e.derivedPubKey!==""&&(t.derivedPubKey=e.derivedPubKey),e.walletToEncDerivedKey){const n=Object.entries(e.walletToEncDerivedKey);n.length>0&&(t.walletToEncDerivedKey={},n.forEach(([r,i])=>{t.walletToEncDerivedKey[r]=i}))}return t},create(e){return xh.fromPartial(e??{})},fromPartial(e){const t=W6();return t.did=e.did??"",t.masterPubKey=e.masterPubKey??"",t.derivedKeyIndex=e.derivedKeyIndex??0,t.derivedPubKey=e.derivedPubKey??"",t.walletToEncDerivedKey=Object.entries(e.walletToEncDerivedKey??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=globalThis.String(i)),n),{}),t}};function V6(){return{key:"",value:""}}const Z1={encode(e,t=new A0){return e.key!==""&&t.uint32(10).string(e.key),e.value!==""&&t.uint32(18).string(e.value),t},decode(e,t){const n=e instanceof hs?e:new hs(e);let r=t===void 0?n.len:n.pos+t;const i=V6();for(;n.pos>>3){case 1:if(o!==10)break;i.key=n.string();continue;case 2:if(o!==18)break;i.value=n.string();continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{key:fl(e.key)?globalThis.String(e.key):"",value:fl(e.value)?globalThis.String(e.value):""}},toJSON(e){const t={};return e.key!==""&&(t.key=e.key),e.value!==""&&(t.value=e.value),t},create(e){return Z1.fromPartial(e??{})},fromPartial(e){const t=V6();return t.key=e.key??"",t.value=e.value??"",t}};function yM(e){return typeof e=="object"&&e!==null}function fl(e){return e!=null}function bM(e){switch(e){case 0:case"PUBLISH_KEY":return 0;case 1:case"REVOKE_KEY":return 1;case-1:case"UNRECOGNIZED":default:return-1}}function vM(e){switch(e){case 0:return"PUBLISH_KEY";case 1:return"REVOKE_KEY";case-1:default:return"UNRECOGNIZED"}}function q6(){return{keyIndex:0,keyAddress:"",action:0}}const Eh={encode(e,t=new A0){return e.keyIndex!==0&&t.uint32(8).int32(e.keyIndex),e.keyAddress!==""&&t.uint32(18).string(e.keyAddress),e.action!==0&&t.uint32(24).int32(e.action),t},decode(e,t){const n=e instanceof hs?e:new hs(e);let r=t===void 0?n.len:n.pos+t;const i=q6();for(;n.pos>>3){case 1:if(o!==8)break;i.keyIndex=n.int32();continue;case 2:if(o!==18)break;i.keyAddress=n.string();continue;case 3:if(o!==24)break;i.action=n.int32();continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{keyIndex:Gm(e.keyIndex)?globalThis.Number(e.keyIndex):0,keyAddress:Gm(e.keyAddress)?globalThis.String(e.keyAddress):"",action:Gm(e.action)?bM(e.action):0}},toJSON(e){const t={};return e.keyIndex!==0&&(t.keyIndex=Math.round(e.keyIndex)),e.keyAddress!==""&&(t.keyAddress=e.keyAddress),e.action!==0&&(t.action=vM(e.action)),t},create(e){return Eh.fromPartial(e??{})},fromPartial(e){const t=q6();return t.keyIndex=e.keyIndex??0,t.keyAddress=e.keyAddress??"",t.action=e.action??0,t}};function Gm(e){return e!=null}const[wM,_M]=Me.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ro=new Uint32Array(80),Lo=new Uint32Array(80);class xM extends Zb{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:n,Bh:r,Bl:i,Ch:o,Cl:s,Dh:a,Dl:l,Eh:u,El:d,Fh:c,Fl:f,Gh:m,Gl:p,Hh:h,Hl:y}=this;return[t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y]}set(t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=a|0,this.Dl=l|0,this.Eh=u|0,this.El=d|0,this.Fh=c|0,this.Fl=f|0,this.Gh=m|0,this.Gl=p|0,this.Hh=h|0,this.Hl=y|0}process(t,n){for(let v=0;v<16;v++,n+=4)Ro[v]=t.getUint32(n),Lo[v]=t.getUint32(n+=4);for(let v=16;v<80;v++){const w=Ro[v-15]|0,E=Lo[v-15]|0,C=Me.rotrSH(w,E,1)^Me.rotrSH(w,E,8)^Me.shrSH(w,E,7),k=Me.rotrSL(w,E,1)^Me.rotrSL(w,E,8)^Me.shrSL(w,E,7),_=Ro[v-2]|0,S=Lo[v-2]|0,A=Me.rotrSH(_,S,19)^Me.rotrBH(_,S,61)^Me.shrSH(_,S,6),I=Me.rotrSL(_,S,19)^Me.rotrBL(_,S,61)^Me.shrSL(_,S,6),L=Me.add4L(k,I,Lo[v-7],Lo[v-16]),F=Me.add4H(L,C,A,Ro[v-7],Ro[v-16]);Ro[v]=F|0,Lo[v]=L|0}let{Ah:r,Al:i,Bh:o,Bl:s,Ch:a,Cl:l,Dh:u,Dl:d,Eh:c,El:f,Fh:m,Fl:p,Gh:h,Gl:y,Hh:g,Hl:b}=this;for(let v=0;v<80;v++){const w=Me.rotrSH(c,f,14)^Me.rotrSH(c,f,18)^Me.rotrBH(c,f,41),E=Me.rotrSL(c,f,14)^Me.rotrSL(c,f,18)^Me.rotrBL(c,f,41),C=c&m^~c&h,k=f&p^~f&y,_=Me.add5L(b,E,k,_M[v],Lo[v]),S=Me.add5H(_,g,w,C,wM[v],Ro[v]),A=_|0,I=Me.rotrSH(r,i,28)^Me.rotrBH(r,i,34)^Me.rotrBH(r,i,39),L=Me.rotrSL(r,i,28)^Me.rotrBL(r,i,34)^Me.rotrBL(r,i,39),F=r&o^r&a^o&a,N=i&s^i&l^s&l;g=h|0,b=y|0,h=m|0,y=p|0,m=c|0,p=f|0,{h:c,l:f}=Me.add(u|0,d|0,S|0,A|0),u=a|0,d=l|0,a=o|0,l=s|0,o=r|0,s=i|0;const R=Me.add3L(A,L,N);r=Me.add3H(R,S,I,F),i=R|0}({h:r,l:i}=Me.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:s}=Me.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:a,l}=Me.add(this.Ch|0,this.Cl|0,a|0,l|0),{h:u,l:d}=Me.add(this.Dh|0,this.Dl|0,u|0,d|0),{h:c,l:f}=Me.add(this.Eh|0,this.El|0,c|0,f|0),{h:m,l:p}=Me.add(this.Fh|0,this.Fl|0,m|0,p|0),{h,l:y}=Me.add(this.Gh|0,this.Gl|0,h|0,y|0),{h:g,l:b}=Me.add(this.Hh|0,this.Hl|0,g|0,b|0),this.set(r,i,o,s,a,l,u,d,c,f,m,p,h,y,g,b)}roundClean(){Ro.fill(0),Lo.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const G6=u0(()=>new xM);/*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const Jd=Mn.ProjectivePoint,Km=ex(y0);function K6(e){return BigInt(`0x${CO(e)}`)}function EM(e){return AO(e.toString(16).padStart(64,"0"))}const SM=f8("Bitcoin seed"),Zm={private:76066276,public:76067358},Xm=2147483648,kM=e=>kB(y0(e)),CM=e=>_l(e).getUint32(0,!1),eh=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error(`Invalid number=${e}. Should be from 0 to 2 ** 32 - 1`);const t=new Uint8Array(4);return _l(t).setUint32(0,e,!1),t};class qs{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return CM(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const t=this.privateKey;if(!t)throw new Error("No private key");return Km.encode(this.serialize(this.versions.private,vu(new Uint8Array([0]),t)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return Km.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(t,n=Zm){if(Hr(t),8*t.length<128||8*t.length>512)throw new Error(`HDKey: wrong seed length=${t.length}. Should be between 128 and 512 bits; 256 bits is advised)`);const r=dp(G6,SM,t);return new qs({versions:n,chainCode:r.slice(32),privateKey:r.slice(0,32)})}static fromExtendedKey(t,n=Zm){const r=Km.decode(t),i=_l(r),o=i.getUint32(0,!1),s={versions:n,depth:r[4],parentFingerprint:i.getUint32(5,!1),index:i.getUint32(9,!1),chainCode:r.slice(13,45)},a=r.slice(45),l=a[0]===0;if(o!==n[l?"private":"public"])throw new Error("Version mismatch");return l?new qs({...s,privateKey:a.slice(1)}):new qs({...s,publicKey:a})}static fromJSON(t){return qs.fromExtendedKey(t.xpriv)}constructor(t){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!t||typeof t!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=t.versions||Zm,this.depth=t.depth||0,this.chainCode=t.chainCode||null,this.index=t.index||0,this.parentFingerprint=t.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(t.publicKey&&t.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(t.privateKey){if(!Mn.utils.isValidPrivateKey(t.privateKey))throw new Error("Invalid private key");this.privKey=typeof t.privateKey=="bigint"?t.privateKey:K6(t.privateKey),this.privKeyBytes=EM(this.privKey),this.pubKey=Mn.getPublicKey(t.privateKey,!0)}else if(t.publicKey)this.pubKey=Jd.fromHex(t.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=kM(this.pubKey)}derive(t){if(!/^[mM]'?/.test(t))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(t))return this;const n=t.replace(/^[mM]'?\//,"").split("/");let r=this;for(const i of n){const o=/^(\d+)('?)$/.exec(i),s=o&&o[1];if(!o||o.length!==3||typeof s!="string")throw new Error(`Invalid child index: ${i}`);let a=+s;if(!Number.isSafeInteger(a)||a>=Xm)throw new Error("Invalid index");o[2]==="'"&&(a+=Xm),r=r.deriveChild(a)}return r}deriveChild(t){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=eh(t);if(t>=Xm){const a=this.privateKey;if(!a)throw new Error("Could not derive hardened child key");n=vu(new Uint8Array([0]),a,n)}else n=vu(this.pubKey,n);const r=dp(G6,this.chainCode,n),i=K6(r.slice(0,32)),o=r.slice(32);if(!Mn.utils.isValidPrivateKey(i))throw new Error("Tweak bigger than curve order");const s={versions:this.versions,chainCode:o,depth:this.depth+1,parentFingerprint:this.fingerprint,index:t};try{if(this.privateKey){const a=In(this.privKey+i,Mn.CURVE.n);if(!Mn.utils.isValidPrivateKey(a))throw new Error("The tweak was out of range or the resulted private key is invalid");s.privateKey=a}else{const a=Jd.fromHex(this.pubKey).add(Jd.fromPrivateKey(i));if(a.equals(Jd.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");s.publicKey=a.toRawBytes(!0)}return new qs(s)}catch{return this.deriveChild(t+1)}}sign(t){if(!this.privateKey)throw new Error("No privateKey set!");return Hr(t,32),Mn.sign(t,this.privKey).toCompactRawBytes()}verify(t,n){if(Hr(t,32),Hr(n,64),!this.publicKey)throw new Error("No publicKey set!");let r;try{r=Mn.Signature.fromCompact(n)}catch{return!1}return Mn.verify(r,t,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(t,n){if(!this.chainCode)throw new Error("No chainCode set");return Hr(n,33),vu(eh(t),new Uint8Array([this.depth]),eh(this.parentFingerprint),eh(this.index),this.chainCode,n)}}function AM(e){if(typeof e=="string"){if(!on(e,{strict:!1}))throw new Pn({address:e});return{address:e,type:"json-rpc"}}if(!on(e.address,{strict:!1}))throw new Pn({address:e.address});return{address:e.address,nonceManager:e.nonceManager,sign:e.sign,experimental_signAuthorization:e.experimental_signAuthorization,signMessage:e.signMessage,signTransaction:e.signTransaction,signTypedData:e.signTypedData,source:"custom",type:"local"}}async function hd({hash:e,privateKey:t,to:n="object"}){const{r,s:i,recovery:o}=Mn.sign(e.slice(2),t.slice(2)),s={r:Ae(r,{size:32}),s:Ae(i,{size:32}),v:o?28n:27n,yParity:o};return n==="bytes"||n==="hex"?NE({...s,to:n}):s}async function TM(e){const{contractAddress:t,chainId:n,nonce:r,privateKey:i,to:o="object"}=e,s=await hd({hash:R8({contractAddress:t,chainId:n,nonce:r}),privateKey:i,to:o});return o==="object"?{contractAddress:t,chainId:n,nonce:r,...s}:s}async function IM({message:e,privateKey:t}){return await hd({hash:fv(e),privateKey:t,to:"hex"})}async function $M(e){const{privateKey:t,transaction:n,serializer:r=BB}=e,i=n.type==="eip4844"?{...n,sidecars:!1}:n,o=await hd({hash:zt(r(i)),privateKey:t});return r(n,o)}async function PM(e){const{privateKey:t,...n}=e;return await hd({hash:gE(n),privateKey:t,to:"hex"})}function HE(e,t={}){const{nonceManager:n}=t,r=Te(Mn.getPublicKey(e.slice(2),!1)),i=I8(r);return{...AM({address:i,nonceManager:n,async sign({hash:s}){return hd({hash:s,privateKey:e,to:"hex"})},async experimental_signAuthorization(s){return TM({...s,privateKey:e})},async signMessage({message:s}){return IM({message:s,privateKey:e})},async signTransaction(s,{serializer:a}={}){return $M({privateKey:e,transaction:s,serializer:a})},async signTypedData(s){return PM({...s,privateKey:e})}}),publicKey:r,source:"privateKey"}}function OM(e,{accountIndex:t=0,addressIndex:n=0,changeIndex:r=0,path:i,...o}={}){const s=e.derive(i||`m/44'/60'/${t}'/${r}/${n}`);return{...HE(Te(s.privateKey),o),getHdKey:()=>s,source:"hd"}}function th(e,t={}){const n=PT(e);return OM(qs.fromMasterSeed(n),t)}const Rr=class Rr{constructor(t){Se(this,"createUnsigned",(t,n,r)=>wu.create({type:0,category:t,recipients:n,data:r,salt:fM(gM()),fee:"0"}));Se(this,"get",async(t=Math.floor(Date.now()/1e3),n="ASC",r=30,i=1,o)=>await this.validator.call("push_getTransactions",[t,n,r,i,o]));Se(this,"search",async t=>await this.validator.call("push_getTransactionByHash",[t]));Se(this,"send",async(t,n)=>{const r=await this.validator.call("push_getApiToken");let i;if(n){const o=Rr.serialize({...t,sender:n.sender,signature:new Uint8Array(0),apiToken:new Uint8Array(Buffer.from(r.apiToken,"base64"))}),a=await HE(n.privKey).signMessage({message:{raw:o}});i=Rr.serialize({...t,sender:n.sender,signature:Sr(a),apiToken:pb(Buffer.from(r.apiToken,"base64").toString("utf-8"))})}else i=Rr.serialize(t);return await this.validator.call("push_sendTransaction",[nr(i)],r.apiUrl)});this.validator=t}};Se(Rr,"initialize",async t=>{const n=await Pf.initalize({env:t});return new Rr(n)}),Se(Rr,"serialize",t=>{const n=wu.create(t);return wu.encode(n).finish()}),Se(Rr,"deserialize",t=>wu.decode(t)),Se(Rr,"serializeData",(t,n)=>{switch(n){case Qs.INIT_DID:{const r=t,i=xh.create(r);return xh.encode(i).finish()}case Qs.INIT_SESSION_KEY:{const r=t,i=Eh.create(r);return Eh.encode(i).finish()}default:throw new Error("Serialization Not Supported for given TxCateory")}}),Se(Rr,"deserializeData",(t,n)=>{switch(n){case Qs.INIT_DID:return xh.decode(t);case Qs.INIT_SESSION_KEY:return Eh.decode(t);default:throw new Error("Deserialization Not Supported for given TxCateory")}});let hp=Rr;var Of={};Object.defineProperty(Of,"__esModule",{value:!0});var _u=Of.bech32m=Of.bech32=void 0;const pp="qpzry9x8gf2tvdw0s3jn54khce6mua7l",zE={};for(let e=0;e>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function Z6(e){let t=1;for(let n=0;n126)return"Invalid prefix ("+e+")";t=Sl(t)^r>>5}t=Sl(t);for(let n=0;n=n;)o-=n,a.push(i>>o&s);if(r)o>0&&a.push(i<=t)return"Excess padding";if(i<l)throw new TypeError("Exceeds length limit");s=s.toLowerCase();let u=Z6(s);if(typeof u=="string")throw new Error(u);let d=s+"1";for(let c=0;c>5)throw new Error("Non 5-bit word");u=Sl(u)^f,d+=pp.charAt(f)}for(let c=0;c<6;++c)u=Sl(u);u^=t;for(let c=0;c<6;++c){const f=u>>(5-c)*5&31;d+=pp.charAt(f)}return d}function r(s,a){if(a=a||90,s.length<8)return s+" too short";if(s.length>a)return"Exceeds length limit";const l=s.toLowerCase(),u=s.toUpperCase();if(s!==l&&s!==u)return"Mixed-case string "+s;s=l;const d=s.lastIndexOf("1");if(d===-1)return"No separator character for "+s;if(d===0)return"Missing prefix for "+s;const c=s.slice(0,d),f=s.slice(d+1);if(f.length<6)return"Data too short";let m=Z6(c);if(typeof m=="string")return m;const p=[];for(let h=0;h=f.length)&&p.push(g)}return m!==t?"Invalid checksum for "+s:{prefix:c,words:p}}function i(s,a){const l=r(s,a);if(typeof l=="object")return l}function o(s,a){const l=r(s,a);if(typeof l=="object")return l;throw new Error(l)}return{decodeUnsafe:i,decode:o,encode:n,toWords:RM,fromWordsUnsafe:LM,fromWords:BM}}Of.bech32=WE("bech32");_u=Of.bech32m=WE("bech32m");var Sh=(e=>(e.DEVNET="devnet",e.TESTNET="testnet",e.MAINNET="mainnet",e))(Sh||{});const NM="push";class Js{}Se(Js,"evmToPush",t=>{try{const n=_u.toWords(Hs(fp(t).slice(2)));return _u.encode(NM,n)}catch{throw new Error("Invalid EVM address")}}),Se(Js,"pushToEvm",t=>{try{const n=_u.decode(t),r=new Uint8Array(_u.fromWords(n.words));return fp(`0x${nr(r)}`)}catch{throw new Error("Invalid Push address")}}),Se(Js,"toPushCAIP",(t,n=zr.STAGING)=>{let r;switch(n){case zr.LOCAL:case zr.DEV:{r=Sh.DEVNET;break}case zr.STAGING:{r=Sh.TESTNET;break}case zr.PROD:{r=Sh.MAINNET;break}default:throw Error("Invalid ENV")}return`push:${r}:${t}`});const Uu=class Uu{};Se(Uu,"initialize",async t=>Uu.convertViemWalletClient(t)),Se(Uu,"convertViemWalletClient",async t=>{try{const n=await t.account;if(!n)throw new Error("WalletClient Account Undefined");const r=await t.getChainId(),i=async o=>await t.signMessage({message:o,account:n});return{account:`eip155:${r}:${n.address}`,signMessage:i}}catch{throw new Error("Invalid WalletClient")}});let Nu=Uu;var xu=(e=>(e.V1="x25519-xsalsa20-poly1305",e.V2="aes256GcmHkdfSha256",e.V3="eip191-aes256-gcm-hkdf-sha256",e.V4="pgpv1:nft",e.V5="push:v5",e))(xu||{});const hl=class hl{constructor(t){Se(this,"hkdf",async(t,n)=>{const r=await crypto.subtle.importKey("raw",t,"HKDF",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:n,info:new ArrayBuffer(0)},r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"])});Se(this,"aesGcmEncryption",async(t,n,r)=>{const s=crypto.getRandomValues(new Uint8Array(32)),a=crypto.getRandomValues(new Uint8Array(12)),l=await this.hkdf(n,s),u={name:"AES-GCM",iv:a};r&&(u.additionalData=r);const d=await crypto.subtle.encrypt(u,l,t);return{ciphertext:nr(new Uint8Array(d)),salt:nr(s),nonce:nr(a)}});Se(this,"aesGcmDecryption",async(t,n,r)=>{const i=await this.hkdf(n,Hs(t.salt)),o={name:"AES-GCM",iv:Hs(t.nonce)};r&&(o.additionalData=r);const s=await crypto.subtle.decrypt(o,i,Hs(t.ciphertext));return new Uint8Array(s)});Se(this,"encryptV5",async t=>{const n=nr(await crypto.getRandomValues(new Uint8Array(32))),r=`Enable Push Network Profile +`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(If,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class p0 extends J{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function Wb(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof J?e.walk(i=>i.code===fl.code):e;return r instanceof J?new fl({cause:e,message:r.details}):fl.nodeMessage.test(n)?new fl({cause:e,message:e.details}):_a.nodeMessage.test(n)?new _a({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):$1.nodeMessage.test(n)?new $1({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):P1.nodeMessage.test(n)?new P1({cause:e,nonce:t==null?void 0:t.nonce}):O1.nodeMessage.test(n)?new O1({cause:e,nonce:t==null?void 0:t.nonce}):R1.nodeMessage.test(n)?new R1({cause:e,nonce:t==null?void 0:t.nonce}):L1.nodeMessage.test(n)?new L1({cause:e}):B1.nodeMessage.test(n)?new B1({cause:e,gas:t==null?void 0:t.gas}):N1.nodeMessage.test(n)?new N1({cause:e,gas:t==null?void 0:t.gas}):M1.nodeMessage.test(n)?new M1({cause:e}):If.nodeMessage.test(n)?new If({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new p0({cause:e})}function jR(e,{docsPath:t,...n}){const r=(()=>{const i=Wb(e,n);return i instanceof p0?e:i})();return new MR(r,{docsPath:t,...n})}function Vb(e,{format:t}){if(!t)return{};const n={};function r(o){const s=Object.keys(o);for(const a of s)a in e&&(n[a]=e[a]),o[a]&&typeof o[a]=="object"&&!Array.isArray(o[a])&&r(o[a])}const i=t(e||{});return r(i),n}const DR={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function m0(e){const t={};return typeof e.authorizationList<"u"&&(t.authorizationList=FR(e.authorizationList)),typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(n=>Mt(n)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=Ae(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=Ae(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=Ae(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=Ae(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=Ae(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=Ae(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=DR[e.type]),typeof e.value<"u"&&(t.value=Ae(e.value)),t}function FR(e){return e.map(t=>({address:t.contractAddress,r:t.r,s:t.s,chainId:Ae(t.chainId),nonce:Ae(t.nonce),...typeof t.yParity<"u"?{yParity:Ae(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:Ae(t.v)}:{}}))}function y6(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new e6({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new e6({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function UR(e){const{balance:t,nonce:n,state:r,stateDiff:i,code:o}=e,s={};if(o!==void 0&&(s.code=o),t!==void 0&&(s.balance=Ae(t)),n!==void 0&&(s.nonce=Ae(n)),r!==void 0&&(s.state=y6(r)),i!==void 0){if(s.state)throw new bR;s.stateDiff=y6(i)}return s}function B8(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!on(n,{strict:!1}))throw new Pn({address:n});if(t[n])throw new yR({address:n});t[n]=UR(r)}return t}const g0=2n**256n-1n;function od(e){const{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:i,to:o}=e,s=t?cr(t):void 0;if(s&&!on(s.address))throw new Pn({address:s.address});if(o&&!on(o))throw new Pn({address:o});if(typeof n<"u"&&(typeof r<"u"||typeof i<"u"))throw new wR;if(r&&r>g0)throw new _a({maxFeePerGas:r});if(i&&r&&i>r)throw new If({maxFeePerGas:r,maxPriorityFeePerGas:i})}class HR extends J{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class qb extends J{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class zR extends J{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Vn(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class N8 extends J{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const M8={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function j8(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?yi(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?yi(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?M8[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=WR(e.authorizationList)),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}function WR(e){return e.map(t=>({contractAddress:t.address,r:t.r,s:t.s,chainId:Number(t.chainId),nonce:Number(t.nonce),...typeof t.yParity<"u"?{yParity:Number(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:Number(t.v)}:{}}))}function D8(e){var n;const t=(n=e.transactions)==null?void 0:n.map(r=>typeof r=="string"?r:j8(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function us(e,{blockHash:t,blockNumber:n,blockTag:r,includeTransactions:i}={}){var d,c,f;const o=r??"latest",s=i??!1,a=n!==void 0?Ae(n):void 0;let l=null;if(t?l=await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):l=await e.request({method:"eth_getBlockByNumber",params:[a||o,s]},{dedupe:!!a}),!l)throw new N8({blockHash:t,blockNumber:n});return(((f=(c=(d=e.chain)==null?void 0:d.formatters)==null?void 0:c.block)==null?void 0:f.format)||D8)(l)}async function Gb(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function VR(e,t){return F8(e,t)}async function F8(e,t){var o,s;const{block:n,chain:r=e.chain,request:i}=t||{};try{const a=((o=r==null?void 0:r.fees)==null?void 0:o.maxPriorityFeePerGas)??((s=r==null?void 0:r.fees)==null?void 0:s.defaultPriorityFee);if(typeof a=="function"){const u=n||await Ee(e,us,"getBlock")({}),d=await a({block:u,client:e,request:i});if(d===null)throw new Error;return d}if(typeof a<"u")return a;const l=await e.request({method:"eth_maxPriorityFeePerGas"});return ls(l)}catch{const[a,l]=await Promise.all([n?Promise.resolve(n):Ee(e,us,"getBlock")({}),Ee(e,Gb,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new qb;const u=l-a.baseFeePerGas;return u<0n?0n:u}}async function qR(e,t){return j1(e,t)}async function j1(e,t){var f,m;const{block:n,chain:r=e.chain,request:i,type:o="eip1559"}=t||{},s=await(async()=>{var p,h;return typeof((p=r==null?void 0:r.fees)==null?void 0:p.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:i}):((h=r==null?void 0:r.fees)==null?void 0:h.baseFeeMultiplier)??1.2})();if(s<1)throw new HR;const l=10**(((f=s.toString().split(".")[1])==null?void 0:f.length)??0),u=p=>p*BigInt(Math.ceil(s*l))/BigInt(l),d=n||await Ee(e,us,"getBlock")({});if(typeof((m=r==null?void 0:r.fees)==null?void 0:m.estimateFeesPerGas)=="function"){const p=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:u,request:i,type:o});if(p!==null)return p}if(o==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new qb;const p=typeof(i==null?void 0:i.maxPriorityFeePerGas)=="bigint"?i.maxPriorityFeePerGas:await F8(e,{block:d,chain:r,request:i}),h=u(d.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??h+p,maxPriorityFeePerGas:p}}return{gasPrice:(i==null?void 0:i.gasPrice)??u(await Ee(e,Gb,"getGasPrice")({}))}}async function U8(e,{address:t,blockTag:n="latest",blockNumber:r}){const i=await e.request({method:"eth_getTransactionCount",params:[t,r?Ae(r):n]},{dedupe:!!r});return yi(i)}function Kb(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(o=>Sr(o)):e.blobs,i=[];for(const o of r)i.push(Uint8Array.from(t.blobToKzgCommitment(o)));return n==="bytes"?i:i.map(o=>Mt(o))}function Zb(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>Sr(s)):e.blobs,i=typeof e.commitments[0]=="string"?e.commitments.map(s=>Sr(s)):e.commitments,o=[];for(let s=0;sMt(s))}function GR(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),l=r?4:0,u=r?0:4;e.setUint32(t+l,s,r),e.setUint32(t+u,a,r)}const KR=(e,t,n)=>e&t^~e&n,ZR=(e,t,n)=>e&t^e&n^t&n;class Xb extends Ob{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=xl(this.buffer)}update(t){Hl(this);const{view:n,buffer:r,blockLen:i}=this;t=c0(t);const o=t.length;for(let s=0;si-s&&(this.process(r,0),s=0);for(let c=s;cd.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c>>3,h=si(m,17)^si(m,19)^m>>>10;Po[c]=h+Po[c-7]+p+Po[c-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:l,G:u,H:d}=this;for(let c=0;c<64;c++){const f=si(a,6)^si(a,11)^si(a,25),m=d+f+KR(a,l,u)+XR[c]+Po[c]|0,h=(si(r,2)^si(r,13)^si(r,22))+ZR(r,i,o)|0;d=u,u=l,l=a,a=s+m|0,s=o,o=i,i=r,r=m+h|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(r,i,o,s,a,l,u,d)}roundClean(){Po.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const y0=u0(()=>new YR);function QR(e,t){return y0(Er(e,{strict:!1})?cs(e):e)}function JR(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),i=QR(t);return i.set([n],0),r==="bytes"?i:Mt(i)}function H8(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),i=[];for(const o of t)i.push(JR({commitment:o,to:r,version:n}));return i}const b6=6,z8=32,Yb=4096,W8=z8*Yb,v6=W8*b6-1-1*Yb*b6,V8=1;class eL extends J{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class q8 extends J{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class tL extends J{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class nL extends J{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${V8}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function rL(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Sr(e.data):e.data,r=At(n);if(!r)throw new q8;if(r>v6)throw new eL({maxSize:v6,size:r});const i=[];let o=!0,s=0;for(;o;){const a=Fb(new Uint8Array(W8));let l=0;for(;la.bytes):i.map(a=>Mt(a.bytes))}function G8(e){const{data:t,kzg:n,to:r}=e,i=e.blobs??rL({data:t,to:r}),o=e.commitments??Kb({blobs:i,kzg:n,to:r}),s=e.proofs??Zb({blobs:i,commitments:o,kzg:n,to:r}),a=[];for(let l=0;l"u"&&c)if(l){const g=await y();f.nonce=await l.consume({address:c.address,chainId:g,client:e})}else f.nonce=await Ee(e,U8,"getTransactionCount")({address:c.address,blockTag:"pending"});if((u.includes("fees")||u.includes("type"))&&typeof d>"u")try{f.type=K8(f)}catch{const g=await p();f.type=typeof(g==null?void 0:g.baseFeePerGas)=="bigint"?"eip1559":"legacy"}if(u.includes("fees"))if(f.type!=="legacy"&&f.type!=="eip2930"){if(typeof f.maxFeePerGas>"u"||typeof f.maxPriorityFeePerGas>"u"){const g=await p(),{maxFeePerGas:b,maxPriorityFeePerGas:v}=await j1(e,{block:g,chain:i,request:f});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas"u"&&(f.gas=await Ee(e,Qb,"estimateGas")({...f,account:c?{address:c.address,type:"json-rpc"}:void 0})),od(f),delete f.parameters,f}async function X8(e,{address:t,blockNumber:n,blockTag:r="latest"}){const i=n?Ae(n):void 0,o=await e.request({method:"eth_getBalance",params:[t,i||r]});return BigInt(o)}async function Qb(e,t){var i,o,s;const n=t.account??e.account,r=n?cr(n):void 0;try{let N=function(B){const{block:V,request:j,rpcStateOverride:W}=B;return e.request({method:"eth_estimateGas",params:W?[j,V??"latest",W]:V?[j,V]:[j]})};const{accessList:a,authorizationList:l,blobs:u,blobVersionedHashes:d,blockNumber:c,blockTag:f,data:m,gas:p,gasPrice:h,maxFeePerBlobGas:y,maxFeePerGas:g,maxPriorityFeePerGas:b,nonce:v,value:w,stateOverride:E,...C}=await b0(e,{...t,parameters:(r==null?void 0:r.type)==="local"?void 0:["blobVersionedHashes"]}),_=(c?Ae(c):void 0)||f,S=B8(E),A=await(async()=>{if(C.to)return C.to;if(l&&l.length>0)return await L8({authorization:l[0]}).catch(()=>{throw new J("`to` is required. Could not infer from `authorizationList`")})})();od(t);const I=(s=(o=(i=e.chain)==null?void 0:i.formatters)==null?void 0:o.transactionRequest)==null?void 0:s.format,F=(I||m0)({...Vb(C,{format:I}),from:r==null?void 0:r.address,accessList:a,authorizationList:l,blobs:u,blobVersionedHashes:d,data:m,gas:p,gasPrice:h,maxFeePerBlobGas:y,maxFeePerGas:g,maxPriorityFeePerGas:b,nonce:v,to:A,value:w});let R=BigInt(await N({block:_,request:F,rpcStateOverride:S}));if(l){const B=await X8(e,{address:F.from}),V=await Promise.all(l.map(async j=>{const{contractAddress:W}=j,Y=await N({block:_,request:{authorizationList:void 0,data:m,from:r==null?void 0:r.address,to:W,value:Ae(B)},rpcStateOverride:S}).catch(()=>100000n);return 2n*BigInt(Y)}));R+=V.reduce((j,W)=>j+W,0n)}return R}catch(a){throw jR(a,{...t,account:r,chain:e.chain})}}async function Y8(e,t){const{abi:n,address:r,args:i,functionName:o,...s}=t,a=ws({abi:n,args:i,functionName:o});try{return await Ee(e,Qb,"estimateGas")({data:a,to:r,...s})}catch(l){const u=s.account?cr(s.account):void 0;throw Wl(l,{abi:n,address:r,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:o,sender:u==null?void 0:u.address})}}function Jb(e,t){if(!on(e,{strict:!1}))throw new Pn({address:e});if(!on(t,{strict:!1}))throw new Pn({address:t});return e.toLowerCase()===t.toLowerCase()}const w6="/docs/contract/decodeEventLog";function ev(e){const{abi:t,data:n,strict:r,topics:i}=e,o=r??!0,[s,...a]=i;if(!s)throw new UP({docsPath:w6});const l=t.length===1?t[0]:t.find(h=>h.type==="event"&&s===f0(no(h)));if(!(l&&"name"in l)||l.type!=="event")throw new e8(s,{docsPath:w6});const{name:u,inputs:d}=l,c=d==null?void 0:d.some(h=>!("name"in h&&h.name));let f=c?[]:{};const m=d.filter(h=>"indexed"in h&&h.indexed);for(let h=0;h!("indexed"in h&&h.indexed));if(p.length>0){if(n&&n!=="0x")try{const h=h0(p,n);if(h)if(c)f=[...f,...h];else for(let y=0;y0?f:void 0}}function iL({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(h0([e],t)||[])[0]}function tv(e){const{abi:t,args:n,logs:r,strict:i=!0}=e,o=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return r.map(s=>{var a;try{const l=t.find(d=>d.type==="event"&&s.topics[0]===f0(d));if(!l)return null;const u=ev({...s,abi:[l],strict:i});return o&&!o.includes(u.eventName)||!oL({args:u.args,inputs:l.inputs,matchArgs:n})?null:{...u,...s}}catch(l){let u,d;if(l instanceof e8)return null;if(l instanceof df||l instanceof l0){if(i)return null;u=l.abiItem.name,d=(a=l.abiItem.inputs)==null?void 0:a.some(c=>!("name"in c&&c.name))}return{...s,args:d?[]:{},eventName:u}}}).filter(Boolean)}function oL(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function i(o,s,a){try{return o.type==="address"?Jb(s,a):o.type==="string"||o.type==="bytes"?zt(cs(s))===a:s===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((o,s)=>{if(!o)return!0;const a=n[s];return a?(Array.isArray(o)?o:[o]).some(u=>i(a,u,t[s])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([o,s])=>{if(!s)return!0;const a=n.find(u=>u.name===o);return a?(Array.isArray(s)?s:[s]).some(u=>i(a,u,t[o])):!1}):!1}function fs(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}async function nv(e,{address:t,blockHash:n,fromBlock:r,toBlock:i,event:o,events:s,args:a,strict:l}={}){const u=l??!1,d=s??(o?[o]:void 0);let c=[];d&&(c=[d.flatMap(h=>rd({abi:[h],eventName:h.name,args:s?void 0:a}))],o&&(c=c[0]));let f;n?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:c,blockHash:n}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:c,fromBlock:typeof r=="bigint"?Ae(r):r,toBlock:typeof i=="bigint"?Ae(i):i}]});const m=f.map(p=>fs(p));return d?tv({abi:d,args:a,logs:m,strict:u}):m}async function rv(e,t){const{abi:n,address:r,args:i,blockHash:o,eventName:s,fromBlock:a,toBlock:l,strict:u}=t,d=s?nd({abi:n,name:s}):void 0,c=d?void 0:n.filter(f=>f.type==="event");return Ee(e,nv,"getLogs")({address:r,args:i,blockHash:o,event:d,events:c,fromBlock:a,toBlock:l,strict:u})}const Lm="/docs/contract/decodeFunctionResult";function dc(e){const{abi:t,args:n,functionName:r,data:i}=e;let o=t[0];if(r){const a=nd({abi:t,args:n,name:r});if(!a)throw new cp(r,{docsPath:Lm});o=a}if(o.type!=="function")throw new cp(void 0,{docsPath:Lm});if(!o.outputs)throw new HP(o.name,{docsPath:Lm});const s=h0(o.outputs,i);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}const D1=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],Q8=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],J8=[...Q8,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],sL=[...Q8,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],_6=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],x6=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],aL=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],lL="0x82ad56cb",cL="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",uL="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",fL="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";class F1 extends J{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class dL extends J{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class hL extends J{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`),{name:"ChainNotFoundError"})}}class eE extends J{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class v0 extends J{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}const Bm="/docs/contract/encodeDeployData";function w0(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const i=t.find(s=>"type"in s&&s.type==="constructor");if(!i)throw new MP({docsPath:Bm});if(!("inputs"in i))throw new Q2({docsPath:Bm});if(!i.inputs||i.inputs.length===0)throw new Q2({docsPath:Bm});const o=uc(i.inputs,n);return so([r,o])}function hc({blockNumber:e,chain:t,contract:n}){var i;const r=(i=t==null?void 0:t.contracts)==null?void 0:i[n];if(!r)throw new F1({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new F1({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function pL(e,{docsPath:t,...n}){const r=(()=>{const i=Wb(e,n);return i instanceof p0?e:i})();return new A8(r,{docsPath:t,...n})}const Nm=new Map;function tE({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:i}){const o=async()=>{const d=l();s();const c=d.map(({args:f})=>f);c.length!==0&&e(c).then(f=>{var m;i&&Array.isArray(f)&&f.sort(i);for(let p=0;p{var m;for(let p=0;pNm.delete(t),a=()=>l().map(({args:d})=>d),l=()=>Nm.get(t)||[],u=d=>Nm.set(t,[...l(),d]);return{flush:s,async schedule(d){const c={},f=new Promise((h,y)=>{c.resolve=h,c.reject=y});return(n==null?void 0:n([...a(),d]))&&o(),l().length>0?(u({args:d,pendingPromise:c}),f):(u({args:d,pendingPromise:c}),setTimeout(o,r),f)}}}async function _0(e,t){var I,L,F,N;const{account:n=e.account,batch:r=!!((I=e.batch)!=null&&I.multicall),blockNumber:i,blockTag:o="latest",accessList:s,blobs:a,code:l,data:u,factory:d,factoryData:c,gas:f,gasPrice:m,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:b,value:v,stateOverride:w,...E}=t,C=n?cr(n):void 0;if(l&&(d||c))throw new J("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&b)throw new J("Cannot provide both `code` & `to` as parameters.");const k=l&&u,_=d&&c&&b&&u,S=k||_,A=k?yL({code:l,data:u}):_?bL({data:u,factory:d,factoryData:c,to:b}):u;try{od(t);const B=(i?Ae(i):void 0)||o,V=B8(w),j=(N=(F=(L=e.chain)==null?void 0:L.formatters)==null?void 0:F.transactionRequest)==null?void 0:N.format,Y=(j||m0)({...Vb(E,{format:j}),from:C==null?void 0:C.address,accessList:s,blobs:a,data:A,gas:f,gasPrice:m,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:y,nonce:g,to:S?void 0:b,value:v});if(r&&mL({request:Y})&&!V)try{return await gL(e,{...Y,blockNumber:i,blockTag:o})}catch(ae){if(!(ae instanceof eE)&&!(ae instanceof F1))throw ae}const te=await e.request({method:"eth_call",params:V?[Y,B,V]:[Y,B]});return te==="0x"?{data:void 0}:{data:te}}catch(R){const B=vL(R),{offchainLookup:V,offchainLookupSignature:j}=await ue(async()=>{const{offchainLookup:W,offchainLookupSignature:Y}=await import("./ccip-Dj_Ke-Rh.js");return{offchainLookup:W,offchainLookupSignature:Y}},[]);if(e.ccipRead!==!1&&(B==null?void 0:B.slice(0,10))===j&&b)return{data:await V(e,{data:B,to:b})};throw S&&(B==null?void 0:B.slice(0,10))==="0x101bb98d"?new TR({factory:d}):pL(R,{...t,account:C,chain:e.chain})}}function mL({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(lL)||!n||Object.values(r).filter(i=>typeof i<"u").length>0)}async function gL(e,t){var h;const{batchSize:n=1024,wait:r=0}=typeof((h=e.batch)==null?void 0:h.multicall)=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:o="latest",data:s,multicallAddress:a,to:l}=t;let u=a;if(!u){if(!e.chain)throw new eE;u=hc({blockNumber:i,chain:e.chain,contract:"multicall3"})}const c=(i?Ae(i):void 0)||o,{schedule:f}=tE({id:`${e.uid}.${c}`,wait:r,shouldSplitBatch(y){return y.reduce((b,{data:v})=>b+(v.length-2),0)>n*2},fn:async y=>{const g=y.map(w=>({allowFailure:!0,callData:w.data,target:w.to})),b=ws({abi:D1,args:[g],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{data:b,to:u},c]});return dc({abi:D1,args:[g],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:m,success:p}]=await f({data:s,to:l});if(!p)throw new zb({data:m});return m==="0x"?{data:void 0}:{data:m}}function yL(e){const{code:t,data:n}=e;return w0({abi:Zx(["constructor(bytes, bytes)"]),bytecode:cL,args:[t,n]})}function bL(e){const{data:t,factory:n,factoryData:r,to:i}=e;return w0({abi:Zx(["constructor(address, bytes, address, bytes)"]),bytecode:uL,args:[i,t,n,r]})}function vL(e){var n;if(!(e instanceof J))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function bi(e,t){const{abi:n,address:r,args:i,functionName:o,...s}=t,a=ws({abi:n,args:i,functionName:o});try{const{data:l}=await Ee(e,_0,"call")({...s,data:a,to:r});return dc({abi:n,args:i,functionName:o,data:l||"0x"})}catch(l){throw Wl(l,{abi:n,address:r,args:i,docsPath:"/docs/contract/readContract",functionName:o})}}async function nE(e,t){const{abi:n,address:r,args:i,dataSuffix:o,functionName:s,...a}=t,l=a.account?cr(a.account):e.account,u=ws({abi:n,args:i,functionName:s});try{const{data:d}=await Ee(e,_0,"call")({batch:!1,data:`${u}${o?o.replace("0x",""):""}`,to:r,...a,account:l}),c=dc({abi:n,args:i,functionName:s,data:d||"0x"}),f=n.filter(m=>"name"in m&&m.name===t.functionName);return{result:c,request:{abi:f,address:r,args:i,dataSuffix:o,functionName:s,...a,account:l}}}catch(d){throw Wl(d,{abi:n,address:r,args:i,docsPath:"/docs/contract/simulateContract",functionName:s,sender:l==null?void 0:l.address})}}const Mm=new Map,E6=new Map;let wL=0;function ds(e,t,n){const r=++wL,i=()=>Mm.get(e)||[],o=()=>{const d=i();Mm.set(e,d.filter(c=>c.id!==r))},s=()=>{const d=E6.get(e);i().length===1&&d&&d(),o()},a=i();if(Mm.set(e,[...a,{id:r,fns:t}]),a&&a.length>0)return s;const l={};for(const d in t)l[d]=(...c)=>{var m,p;const f=i();if(f.length!==0)for(const h of f)(p=(m=h.fns)[d])==null||p.call(m,...c)};const u=n(l);return typeof u=="function"&&E6.set(e,u),s}async function U1(e){return new Promise(t=>setTimeout(t,e))}function ad(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let i=!0;const o=()=>i=!1;return(async()=>{let a;t&&(a=await e({unpoll:o}));const l=await(n==null?void 0:n(a))??r;await U1(l);const u=async()=>{i&&(await e({unpoll:o}),await U1(r),u())};u()})(),o}const _L=new Map,xL=new Map;function EL(e){const t=(i,o)=>({clear:()=>o.delete(i),get:()=>o.get(i),set:s=>o.set(i,s)}),n=t(e,_L),r=t(e,xL);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function SL(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=EL(t),i=r.response.get();if(i&&n>0&&new Date().getTime()-i.created.getTime()`blockNumber.${e}`;async function ld(e,{cacheTime:t=e.cacheTime}={}){const n=await SL(()=>e.request({method:"eth_blockNumber"}),{cacheKey:kL(e.uid),cacheTime:t});return BigInt(n)}async function x0(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const i=r.map(o=>fs(o));return!("abi"in t)||!t.abi?i:tv({abi:t.abi,logs:i,strict:n})}async function E0(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function rE(e,t){const{abi:n,address:r,args:i,batch:o=!0,eventName:s,fromBlock:a,onError:l,onLogs:u,poll:d,pollingInterval:c=e.pollingInterval,strict:f}=t;return(typeof d<"u"?d:typeof a=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"))?(()=>{const y=f??!1,g=hn(["watchContractEvent",r,i,o,e.uid,s,c,y,a]);return ds(g,{onLogs:u,onError:l},b=>{let v;a!==void 0&&(v=a-1n);let w,E=!1;const C=ad(async()=>{var k;if(!E){try{w=await Ee(e,Db,"createContractEventFilter")({abi:n,address:r,args:i,eventName:s,strict:y,fromBlock:a})}catch{}E=!0;return}try{let _;if(w)_=await Ee(e,x0,"getFilterChanges")({filter:w});else{const S=await Ee(e,ld,"getBlockNumber")({});v&&v{w&&await Ee(e,E0,"uninstallFilter")({filter:w}),C()}})})():(()=>{const y=f??!1,g=hn(["watchContractEvent",r,i,o,e.uid,s,c,y]);let b=!0,v=()=>b=!1;return ds(g,{onLogs:u,onError:l},w=>((async()=>{try{const E=(()=>{if(e.transport.type==="fallback"){const _=e.transport.transports.find(S=>S.config.type==="webSocket");return _?_.value:e.transport}return e.transport})(),C=s?rd({abi:n,eventName:s,args:i}):[],{unsubscribe:k}=await E.subscribe({params:["logs",{address:r,topics:C}],onData(_){var A;if(!b)return;const S=_.result;try{const{eventName:I,args:L}=ev({abi:n,data:S.data,topics:S.topics,strict:f}),F=fs(S,{args:L,eventName:I});w.onLogs([F])}catch(I){let L,F;if(I instanceof df||I instanceof l0){if(f)return;L=I.abiItem.name,F=(A=I.abiItem.inputs)==null?void 0:A.some(R=>!("name"in R&&R.name))}const N=fs(S,{args:F?[]:{},eventName:L});w.onLogs([N])}},onError(_){var S;(S=w.onError)==null||S.call(w,_)}});v=k,b||v()}catch(E){l==null||l(E)}})(),()=>v()))})()}class cd extends J{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` +`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class jm extends J{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function iE({chain:e,currentChainId:t}){if(!e)throw new hL;if(t!==e.id)throw new dL({chain:e,currentChainId:t})}function CL(e,{docsPath:t,...n}){const r=(()=>{const i=Wb(e,n);return i instanceof p0?e:i})();return new SR(r,{docsPath:t,...n})}async function iv(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}async function ov(e,t){var g,b,v,w;const{account:n=e.account,chain:r=e.chain,accessList:i,authorizationList:o,blobs:s,data:a,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:m,value:p,...h}=t;if(!n)throw new cd({docsPath:"/docs/actions/wallet/sendTransaction"});const y=cr(n);try{od(t);const E=await(async()=>{if(t.to)return t.to;if(o&&o.length>0)return await L8({authorization:o[0]}).catch(()=>{throw new J("`to` is required. Could not infer from `authorizationList`.")})})();if(y.type==="json-rpc"){let C;r!==null&&(C=await Ee(e,sd,"getChainId")({}),iE({currentChainId:C,chain:r}));const k=(v=(b=(g=e.chain)==null?void 0:g.formatters)==null?void 0:b.transactionRequest)==null?void 0:v.format,S=(k||m0)({...Vb(h,{format:k}),accessList:i,authorizationList:o,blobs:s,chainId:C,data:a,from:y.address,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:m,to:E,value:p});return await e.request({method:"eth_sendTransaction",params:[S]},{retryCount:0})}if(y.type==="local"){const C=await Ee(e,b0,"prepareTransactionRequest")({account:y,accessList:i,authorizationList:o,blobs:s,chain:r,data:a,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:m,nonceManager:y.nonceManager,parameters:[...Z8,"sidecars"],value:p,...h,to:E}),k=(w=r==null?void 0:r.serializers)==null?void 0:w.transaction,_=await y.signTransaction(C,{serializer:k});return await Ee(e,iv,"sendRawTransaction")({serializedTransaction:_})}throw y.type==="smart"?new jm({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new jm({docsPath:"/docs/actions/wallet/sendTransaction",type:y.type})}catch(E){throw E instanceof jm?E:CL(E,{...t,account:y,chain:t.chain||void 0})}}async function oE(e,t){const{abi:n,account:r=e.account,address:i,args:o,dataSuffix:s,functionName:a,...l}=t;if(!r)throw new cd({docsPath:"/docs/contract/writeContract"});const u=cr(r),d=ws({abi:n,args:o,functionName:a});try{return await Ee(e,ov,"sendTransaction")({data:`${d}${s?s.replace("0x",""):""}`,to:i,account:u,...l})}catch(c){throw Wl(c,{abi:n,address:i,args:o,docsPath:"/docs/contract/writeContract",functionName:a,sender:u.address})}}function AL({abi:e,address:t,client:n}){const r=n,[i,o]=r?"public"in r&&"wallet"in r?[r.public,r.wallet]:"public"in r?[r.public,void 0]:"wallet"in r?[void 0,r.wallet]:[r,r]:[void 0,void 0],s=i!=null,a=o!=null,l={};let u=!1,d=!1,c=!1;for(const f of e)if(f.type==="function"?f.stateMutability==="view"||f.stateMutability==="pure"?u=!0:d=!0:f.type==="event"&&(c=!0),u&&d&&c)break;return s&&(u&&(l.read=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(i,bi,"readContract")({abi:e,address:t,functionName:m,args:h,...y})}}})),d&&(l.simulate=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(i,nE,"simulateContract")({abi:e,address:t,functionName:m,args:h,...y})}}})),c&&(l.createEventFilter=new Proxy({},{get(f,m){return(...p)=>{const h=e.find(b=>b.type==="event"&&b.name===m),{args:y,options:g}=Dm(p,h);return Ee(i,Db,"createContractEventFilter")({abi:e,address:t,eventName:m,args:y,...g})}}}),l.getEvents=new Proxy({},{get(f,m){return(...p)=>{const h=e.find(b=>b.type==="event"&&b.name===m),{args:y,options:g}=Dm(p,h);return Ee(i,rv,"getContractEvents")({abi:e,address:t,eventName:m,args:y,...g})}}}),l.watchEvent=new Proxy({},{get(f,m){return(...p)=>{const h=e.find(b=>b.type==="event"&&b.name===m),{args:y,options:g}=Dm(p,h);return Ee(i,rE,"watchContractEvent")({abi:e,address:t,eventName:m,args:y,...g})}}}))),a&&d&&(l.write=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(o,oE,"writeContract")({abi:e,address:t,functionName:m,args:h,...y})}}})),(s||a)&&d&&(l.estimateGas=new Proxy({},{get(f,m){return(...p)=>{const{args:h,options:y}=Vd(p);return Ee(i??o,Y8,"estimateContractGas")({abi:e,address:t,functionName:m,args:h,...y,account:y.account??o.account})}}})),l.address=t,l.abi=e,l}function Vd(e){const t=e.length&&Array.isArray(e[0]),n=t?e[0]:[],r=(t?e[1]:e[0])??{};return{args:n,options:r}}function Dm(e,t){let n=!1;Array.isArray(e[0])?n=!0:e.length===1?n=t.inputs.some(o=>o.indexed):e.length===2&&(n=!0);const r=n?e[0]:void 0,i=(n?e[1]:e[0])??{};return{args:r,options:i}}class TL extends J{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function IL(e,t){const{address:n,factory:r,factoryData:i}=t;try{const[o,s,a,l,u,d,c]=await Ee(e,bi,"readContract")({abi:$L,address:n,functionName:"eip712Domain",factory:r,factoryData:i});return{domain:{name:s,version:a,chainId:Number(l),verifyingContract:u,salt:d},extensions:c,fields:o}}catch(o){const s=o;throw s.name==="ContractFunctionExecutionError"&&s.cause.name==="ContractFunctionZeroDataError"?new TL({address:n}):s}}const $L=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];async function PL(e,{chain:t}){const{id:n,name:r,nativeCurrency:i,rpcUrls:o,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:Ae(n),chainName:r,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:s?Object.values(s).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}const H1=256;let qd=H1,Gd;function sE(e=11){if(!Gd||qd+e>H1*2){Gd="",qd=0;for(let t=0;t{const b=g(y);for(const w in p)delete b[w];const v={...y,...b};return Object.assign(v,{extend:h(v)})}}return Object.assign(p,{extend:h(p)})}const Kd=new Lb(8192);function OL(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(Kd.get(n))return Kd.get(n);const r=e().finally(()=>Kd.delete(n));return Kd.set(n,r),r}function z1(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((i,o)=>{const s=async({count:a=0}={})=>{const l=async({error:u})=>{const d=typeof t=="function"?t({count:a,error:u}):t;d&&await U1(d),s({count:a+1})};try{const u=await e();i(u)}catch(u){if(a{const{dedupe:i=!1,retryDelay:o=150,retryCount:s=3,uid:a}={...t,...r},l=i?zt(Ul(`${a}.${hn(n)}`)):void 0;return OL(()=>z1(async()=>{try{return await e(n)}catch(u){const d=u;switch(d.code){case mf.code:throw new mf(d);case gf.code:throw new gf(d);case yf.code:throw new yf(d,{method:n.method});case bf.code:throw new bf(d);case ba.code:throw new ba(d);case va.code:throw new va(d);case vf.code:throw new vf(d);case wf.code:throw new wf(d);case _f.code:throw new _f(d);case xf.code:throw new xf(d,{method:n.method});case zl.code:throw new zl(d);case Ef.code:throw new Ef(d);case Sl.code:throw new Sl(d);case Sf.code:throw new Sf(d);case kf.code:throw new kf(d);case Cf.code:throw new Cf(d);case Af.code:throw new Af(d);case Tf.code:throw new Tf(d);case 5e3:throw new Sl(d);default:throw u instanceof J?u:new $R(d)}}},{delay:({count:u,error:d})=>{var c;if(d&&d instanceof Bu){const f=(c=d==null?void 0:d.headers)==null?void 0:c.get("Retry-After");if(f!=null&&f.match(/\d/))return Number.parseInt(f)*1e3}return~~(1<LL(u)}),{enabled:i,id:l})}}function LL(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===zl.code||e.code===ba.code:e instanceof Bu&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function lE({key:e,name:t,request:n,retryCount:r=3,retryDelay:i=150,timeout:o,type:s},a){const l=sE();return{config:{key:e,name:t,request:n,retryCount:r,retryDelay:i,timeout:o,type:s},request:RL(n,{retryCount:r,retryDelay:i,uid:l}),value:a}}function BL(e,t={}){const{key:n="custom",name:r="Custom Provider",retryDelay:i}=t;return({retryCount:o})=>lE({key:n,name:r,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:i,type:"custom"})}class NL extends J{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function ML(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((i,o)=>{(async()=>{let s;try{const a=new AbortController;n>0&&(s=setTimeout(()=>{r?a.abort():o(t)},n)),i(await e({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&o(t),o(a)}finally{clearTimeout(s)}})()})}function jL(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const S6=jL();function DL(e,t={}){return{async request(n){var c;const{body:r,onRequest:i=t.onRequest,onResponse:o=t.onResponse,timeout:s=t.timeout??1e4}=n,a={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:l,method:u,signal:d}=a;try{const f=await ML(async({signal:p})=>{const h={...a,body:Array.isArray(r)?hn(r.map(b=>({jsonrpc:"2.0",id:b.id??S6.take(),...b}))):hn({jsonrpc:"2.0",id:r.id??S6.take(),...r}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(s>0?p:null)},y=new Request(e,h);return i&&await i(y),await fetch(e,h)},{errorInstance:new p6({body:r,url:e}),timeout:s,signal:!0});o&&await o(f);let m;if((c=f.headers.get("Content-Type"))!=null&&c.startsWith("application/json")?m=await f.json():(m=await f.text(),m=JSON.parse(m||"{}")),!f.ok)throw new Bu({body:r,details:hn(m.error)||f.statusText,headers:f.headers,status:f.status,url:e});return m}catch(f){throw f instanceof Bu||f instanceof p6?f:new Bu({body:r,cause:f,url:e})}}}}function cE(e,t={}){const{batch:n,fetchOptions:r,key:i="http",name:o="HTTP JSON-RPC",onFetchRequest:s,onFetchResponse:a,retryDelay:l}=t;return({chain:u,retryCount:d,timeout:c})=>{const{batchSize:f=1e3,wait:m=0}=typeof n=="object"?n:{},p=t.retryCount??d,h=c??t.timeout??1e4,y=u==null?void 0:u.rpcUrls.default.http[0];if(!y)throw new NL;const g=DL(y,{fetchOptions:r,onRequest:s,onResponse:a,timeout:h});return lE({key:i,name:o,async request({method:b,params:v}){const w={method:b,params:v},{schedule:E}=tE({id:y,wait:m,shouldSplitBatch(S){return S.length>f},fn:S=>g.request({body:S}),sort:(S,A)=>S.id-A.id}),C=async S=>n?E(S):[await g.request({body:S})],[{error:k,result:_}]=await C(w);if(k)throw new T8({body:w,error:k,url:y});return _},retryCount:p,retryDelay:l,timeout:h,type:"http"},{fetchOptions:r,url:y})}}function sv(e,t){var r,i,o,s,a,l;if(!(e instanceof J))return!1;const n=e.walk(u=>u instanceof I1);return n instanceof I1?!!(((r=n.data)==null?void 0:r.errorName)==="ResolverNotFound"||((i=n.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||((o=n.data)==null?void 0:o.errorName)==="ResolverNotContract"||((s=n.data)==null?void 0:s.errorName)==="ResolverError"||((a=n.data)==null?void 0:a.errorName)==="HttpError"||(l=n.reason)!=null&&l.includes("Wildcard on non-extended resolvers is not supported")||t==="reverse"&&n.reason===_8[50]):!1}function uE(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Er(t)?t:null}function wh(e){let t=new Uint8Array(32).fill(0);if(!e)return Mt(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const i=uE(n[r]),o=i?cs(i):zt(aa(n[r]),"bytes");t=zt(ro([t,o]),"bytes")}return Mt(t)}function FL(e){return`[${e.slice(2)}]`}function UL(e){const t=new Uint8Array(32).fill(0);return e?uE(e)||zt(aa(e)):Mt(t)}function S0(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(aa(t).byteLength+2);let r=0;const i=t.split(".");for(let o=0;o255&&(s=aa(FL(UL(i[o])))),n[r]=s.length,n.set(s,r+1),r+=s.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}async function HL(e,{blockNumber:t,blockTag:n,coinType:r,name:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){let l=a;if(!l){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=hc({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const u=ws({abi:x6,functionName:"addr",...r!=null?{args:[wh(i),BigInt(r)]}:{args:[wh(i)]}}),d={address:l,abi:J8,functionName:"resolve",args:[Te(S0(i)),u],blockNumber:t,blockTag:n},c=Ee(e,bi,"readContract"),f=o?await c({...d,args:[...d.args,o]}):await c(d);if(f[0]==="0x")return null;const m=dc({abi:x6,args:r!=null?[wh(i),BigInt(r)]:void 0,functionName:"addr",data:f[0]});return m==="0x"||as(m)==="0x00"?null:m}catch(u){if(s)throw u;if(sv(u,"resolve"))return null;throw u}}class zL extends J{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class lu extends J{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class av extends J{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class WL extends J{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const VL=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,qL=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,GL=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,KL=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function ZL(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function k6(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function fE({uri:e,gatewayUrls:t}){const n=GL.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=k6(t==null?void 0:t.ipfs,"https://ipfs.io"),i=k6(t==null?void 0:t.arweave,"https://arweave.net"),o=e.match(VL),{protocol:s,subpath:a,target:l,subtarget:u=""}=(o==null?void 0:o.groups)||{},d=s==="ipns:/"||a==="ipns/",c=s==="ipfs:/"||a==="ipfs/"||qL.test(e);if(e.startsWith("http")&&!d&&!c){let m=e;return t!=null&&t.arweave&&(m=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:m,isOnChain:!1,isEncoded:!1}}if((d||c)&&l)return{uri:`${r}/${d?"ipns":"ipfs"}/${l}${u}`,isOnChain:!1,isEncoded:!1};if(s==="ar:/"&&l)return{uri:`${i}/${l}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(KL,"");if(f.startsWith("i.json());return await lv({gatewayUrls:e,uri:dE(n)})}catch{throw new av({uri:t})}}async function lv({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=fE({uri:t,gatewayUrls:e});if(r||await ZL(n))return n;throw new av({uri:t})}function YL(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,i]=t.split("/"),[o,s]=n.split(":"),[a,l]=r.split(":");if(!o||o.toLowerCase()!=="eip155")throw new lu({reason:"Only EIP-155 supported"});if(!s)throw new lu({reason:"Chain ID not found"});if(!l)throw new lu({reason:"Contract address not found"});if(!i)throw new lu({reason:"Token ID not found"});if(!a)throw new lu({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s),namespace:a.toLowerCase(),contractAddress:l,tokenID:i}}async function QL(e,{nft:t}){if(t.namespace==="erc721")return bi(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return bi(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new WL({namespace:t.namespace})}async function JL(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?eB(e,{gatewayUrls:t,record:n}):lv({uri:n,gatewayUrls:t})}async function eB(e,{gatewayUrls:t,record:n}){const r=YL(n),i=await QL(e,{nft:r}),{uri:o,isOnChain:s,isEncoded:a}=fE({uri:i,gatewayUrls:t});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){const u=a?atob(o.replace("data:application/json;base64,","")):o,d=JSON.parse(u);return lv({uri:dE(d),gatewayUrls:t})}let l=r.tokenID;return r.namespace==="erc1155"&&(l=l.replace("0x","").padStart(64,"0")),XL({gatewayUrls:t,uri:o.replace(/(?:0x)?{id}/,l)})}async function hE(e,{blockNumber:t,blockTag:n,name:r,key:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){let l=a;if(!l){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=hc({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{const u={address:l,abi:J8,functionName:"resolve",args:[Te(S0(r)),ws({abi:_6,functionName:"text",args:[wh(r),i]})],blockNumber:t,blockTag:n},d=Ee(e,bi,"readContract"),c=o?await d({...u,args:[...u.args,o]}):await d(u);if(c[0]==="0x")return null;const f=dc({abi:_6,functionName:"text",data:c[0]});return f===""?null:f}catch(u){if(s)throw u;if(sv(u,"resolve"))return null;throw u}}async function tB(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){const l=await Ee(e,hE,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:i,universalResolverAddress:a,gatewayUrls:o,strict:s});if(!l)return null;try{return await JL(e,{record:l,gatewayUrls:r})}catch{return null}}async function nB(e,{address:t,blockNumber:n,blockTag:r,gatewayUrls:i,strict:o,universalResolverAddress:s}){let a=s;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=hc({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}const l=`${t.toLowerCase().substring(2)}.addr.reverse`;try{const u={address:a,abi:sL,functionName:"reverse",args:[Te(S0(l))],blockNumber:n,blockTag:r},d=Ee(e,bi,"readContract"),[c,f]=i?await d({...u,args:[...u.args,i]}):await d(u);return t.toLowerCase()!==f.toLowerCase()?null:c}catch(u){if(o)throw u;if(sv(u,"reverse"))return null;throw u}}async function rB(e,{blockNumber:t,blockTag:n,name:r,universalResolverAddress:i}){let o=i;if(!o){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=hc({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const[s]=await Ee(e,bi,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Te(S0(r))],blockNumber:t,blockTag:n});return s}async function iB(e){const t=d0(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}async function pE(e,{address:t,args:n,event:r,events:i,fromBlock:o,strict:s,toBlock:a}={}){const l=i??(r?[r]:void 0),u=d0(e,{method:"eth_newFilter"});let d=[];l&&(d=[l.flatMap(m=>rd({abi:[m],eventName:m.name,args:n}))],r&&(d=d[0]));const c=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof o=="bigint"?Ae(o):o,toBlock:typeof a=="bigint"?Ae(a):a,...d.length?{topics:d}:{}}]});return{abi:l,args:n,eventName:r?r.name:void 0,fromBlock:o,id:c,request:u(c),strict:!!s,toBlock:a,type:"event"}}async function mE(e){const t=d0(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}async function oB(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function sB(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const i=n!==void 0?Ae(n):void 0;let o;return t?o=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):o=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[i||r]},{dedupe:!!i}),yi(o)}async function C6(e,{address:t,blockNumber:n,blockTag:r="latest"}){const i=n!==void 0?Ae(n):void 0,o=await e.request({method:"eth_getCode",params:[t,i||r]},{dedupe:!!i});if(o!=="0x")return o}function aB(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function lB(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:i}){const o=n?Ae(n):void 0,s=await e.request({method:"eth_feeHistory",params:[Ae(t),o||r,i]},{dedupe:!!o});return aB(s)}async function cB(e,{filter:t}){const n=t.strict??!1,i=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(o=>fs(o));return t.abi?tv({abi:t.abi,logs:i,strict:n}):i}function cv(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}const uB=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,fB=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function gE(e){const{domain:t={},message:n,primaryType:r}=e,i={EIP712Domain:xE({domain:t}),...e.types};_E({domain:t,message:n,primaryType:r,types:i});const o=["0x1901"];return t&&o.push(dB({domain:t,types:i})),r!=="EIP712Domain"&&o.push(yE({data:n,primaryType:r,types:i})),zt(ro(o))}function dB({domain:e,types:t}){return yE({data:e,primaryType:"EIP712Domain",types:t})}function yE({data:e,primaryType:t,types:n}){const r=bE({data:e,primaryType:t,types:n});return zt(r)}function bE({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],i=[hB({primaryType:t,types:n})];for(const o of n[t]){const[s,a]=wE({types:n,name:o.name,type:o.type,value:e[o.name]});r.push(s),i.push(a)}return uc(r,i)}function hB({primaryType:e,types:t}){const n=Te(pB({primaryType:e,types:t}));return zt(n)}function pB({primaryType:e,types:t}){let n="";const r=vE({primaryType:e,types:t});r.delete(e);const i=[e,...Array.from(r).sort()];for(const o of i)n+=`${o}(${t[o].map(({name:s,type:a})=>`${a} ${s}`).join(",")})`;return n}function vE({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),i=r==null?void 0:r[0];if(n.has(i)||t[i]===void 0)return n;n.add(i);for(const o of t[i])vE({primaryType:o.type,types:t},n);return n}function wE({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},zt(bE({data:r,primaryType:n,types:e}))];if(n==="bytes")return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},zt(r)];if(n==="string")return[{type:"bytes32"},zt(Te(r))];if(n.lastIndexOf("]")===n.length-1){const i=n.slice(0,n.lastIndexOf("[")),o=r.map(s=>wE({name:t,type:i,types:e,value:s}));return[{type:"bytes32"},zt(uc(o.map(([s])=>s),o.map(([,s])=>s)))]}return[{type:n},r]}function mB(e){const{domain:t,message:n,primaryType:r,types:i}=e,o=(l,u)=>{const d={...u};for(const c of l){const{name:f,type:m}=c;m==="address"&&(d[f]=d[f].toLowerCase())}return d},s=i.EIP712Domain?t?o(i.EIP712Domain,t):{}:{},a=(()=>{if(r!=="EIP712Domain")return o(i[r],n)})();return hn({domain:s,message:a,primaryType:r,types:i})}function _E(e){const{domain:t,message:n,primaryType:r,types:i}=e,o=(s,a)=>{for(const l of s){const{name:u,type:d}=l,c=a[u],f=d.match(fB);if(f&&(typeof c=="number"||typeof c=="bigint")){const[h,y,g]=f;Ae(c,{signed:y==="int",size:Number.parseInt(g)/8})}if(d==="address"&&typeof c=="string"&&!on(c))throw new Pn({address:c});const m=d.match(uB);if(m){const[h,y]=m;if(y&&At(c)!==Number.parseInt(y))throw new WP({expectedSize:Number.parseInt(y),givenSize:At(c)})}const p=i[d];p&&o(p,c)}};i.EIP712Domain&&t&&o(i.EIP712Domain,t),r!=="EIP712Domain"&&o(i[r],n)}function xE({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},typeof(e==null?void 0:e.chainId)=="number"&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const gB={"0x0":"reverted","0x1":"success"};function yB(e){const t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(n=>fs(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?yi(e.transactionIndex):null,status:e.status?gB[e.status]:null,type:e.type?M8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t}const bB=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),EE=new Uint8Array(new Array(16).fill(0).map((e,t)=>t)),vB=EE.map(e=>(9*e+5)%16);let uv=[EE],fv=[vB];for(let e=0;e<4;e++)for(let t of[uv,fv])t.push(t[e].map(n=>bB[n]));const SE=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),wB=uv.map((e,t)=>e.map(n=>SE[t][n])),_B=fv.map((e,t)=>e.map(n=>SE[t][n])),xB=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),EB=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]);function A6(e,t,n,r){return e===0?t^n^r:e===1?t&n|~t&r:e===2?(t|~n)^r:e===3?t&r|n&~r:t^(n|~r)}const Zd=new Uint32Array(16);class SB extends Xb{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:t,h1:n,h2:r,h3:i,h4:o}=this;return[t,n,r,i,o]}set(t,n,r,i,o){this.h0=t|0,this.h1=n|0,this.h2=r|0,this.h3=i|0,this.h4=o|0}process(t,n){for(let m=0;m<16;m++,n+=4)Zd[m]=t.getUint32(n,!0);let r=this.h0|0,i=r,o=this.h1|0,s=o,a=this.h2|0,l=a,u=this.h3|0,d=u,c=this.h4|0,f=c;for(let m=0;m<5;m++){const p=4-m,h=xB[m],y=EB[m],g=uv[m],b=fv[m],v=wB[m],w=_B[m];for(let E=0;E<16;E++){const C=Wd(r+A6(m,o,a,u)+Zd[g[E]]+h,v[E])+c|0;r=c,c=u,u=Wd(a,10)|0,a=o,o=C}for(let E=0;E<16;E++){const C=Wd(i+A6(p,s,l,d)+Zd[b[E]]+y,w[E])+f|0;i=f,f=d,d=Wd(l,10)|0,l=s,s=C}}this.set(this.h1+a+d|0,this.h2+u+f|0,this.h3+c+i|0,this.h4+r+s|0,this.h0+o+l|0)}roundClean(){Zd.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const kB=u0(()=>new SB),CB=`Ethereum Signed Message: +`;function AB(e){const t=typeof e=="string"?Ul(e):typeof e.raw=="string"?e.raw:Mt(e.raw),n=Ul(`${CB}${At(t)}`);return ro([n,t])}function dv(e,t){return zt(AB(e),t)}const kE="0x6492649264926492649264926492649264926492649264926492649264926492";function TB(e){return v8(e,-32)===kE}function IB(e){const{address:t,data:n,signature:r,to:i="hex"}=e,o=so([uc([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,n,r]),kE]);return i==="hex"?o:Sr(o)}function $B(e){const{authorizationList:t}=e;if(t)for(const n of t){const{contractAddress:r,chainId:i}=n;if(!on(r))throw new Pn({address:r});if(i<=0)throw new v0({chainId:i})}hv(e)}function PB(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new q8;for(const n of t){const r=At(n),i=yi(hf(n,0,1));if(r!==32)throw new tL({hash:n,size:r});if(i!==V8)throw new nL({hash:n,version:i})}}hv(e)}function hv(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new v0({chainId:t});if(i&&!on(i))throw new Pn({address:i});if(r&&r>g0)throw new _a({maxFeePerGas:r});if(n&&r&&n>r)throw new If({maxFeePerGas:r,maxPriorityFeePerGas:n})}function OB(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(t<=0)throw new v0({chainId:t});if(o&&!on(o))throw new Pn({address:o});if(n||i)throw new J("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>g0)throw new _a({maxFeePerGas:r})}function RB(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(o&&!on(o))throw new Pn({address:o});if(typeof t<"u"&&t<=0)throw new v0({chainId:t});if(n||i)throw new J("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>g0)throw new _a({maxFeePerGas:r})}function LB(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{contractAddress:r,chainId:i,nonce:o,...s}=n;t.push([Te(i),r,Te(o),...ud({},s)])}return t}function k0(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n"u"||typeof m>"u")){const v=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(C=>Mt(C)),w=e.kzg,E=Kb({blobs:v,kzg:w});if(typeof f>"u"&&(f=H8({commitments:E})),typeof m>"u"){const C=Zb({blobs:v,commitments:E,kzg:w});m=G8({blobs:v,commitments:E,proofs:C})}}const p=k0(d),h=[Te(n),i?Te(i):"0x",u?Te(u):"0x",l?Te(l):"0x",r?Te(r):"0x",o??"0x",s?Te(s):"0x",c??"0x",p,a?Te(a):"0x",f??[],...ud(e,t)],y=[],g=[],b=[];if(m)for(let v=0;v{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const m=27n+(t.v===27n?0n:1n);if(t.v!==m)throw new _R({v:t.v});return m})(),c=as(t.r),f=as(t.s);u=[...u,Te(d),c==="0x00"?"0x":c,f==="0x00"?"0x":f]}else n>0&&(u=[...u,Te(n),"0x","0x"]);return wa(u)}function ud(e,t){const n=t??e,{v:r,yParity:i}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof r>"u"&&typeof i>"u")return[];const o=as(n.r),s=as(n.s);return[typeof i=="number"?i?Te(1):"0x":r===0n?"0x":r===1n?Te(1):r===27n?"0x":Te(1),o==="0x00"?"0x":o,s==="0x00"?"0x":s]}function UB(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function HB(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?yi(e.nonce):void 0,storageProof:e.storageProof?UB(e.storageProof):void 0}}async function zB(e,{address:t,blockNumber:n,blockTag:r,storageKeys:i}){const o=r??"latest",s=n!==void 0?Ae(n):void 0,a=await e.request({method:"eth_getProof",params:[t,i,s||o]});return HB(a)}async function WB(e,{address:t,blockNumber:n,blockTag:r="latest",slot:i}){const o=n!==void 0?Ae(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,o||r]})}async function pv(e,{blockHash:t,blockNumber:n,blockTag:r,hash:i,index:o}){var d,c,f;const s=r||"latest",a=n!==void 0?Ae(n):void 0;let l=null;if(i?l=await e.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):t?l=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,Ae(o)]},{dedupe:!0}):(a||s)&&(l=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||s,Ae(o)]},{dedupe:!!a})),!l)throw new k8({blockHash:t,blockNumber:n,blockTag:s,hash:i,index:o});return(((f=(c=(d=e.chain)==null?void 0:d.formatters)==null?void 0:c.transaction)==null?void 0:f.format)||j8)(l)}async function VB(e,{hash:t,transactionReceipt:n}){const[r,i]=await Promise.all([Ee(e,ld,"getBlockNumber")({}),t?Ee(e,pv,"getTransaction")({hash:t}):void 0]),o=(n==null?void 0:n.blockNumber)||(i==null?void 0:i.blockNumber);return o?r-o+1n:0n}async function W1(e,{hash:t}){var i,o,s;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new C8({hash:t});return(((s=(o=(i=e.chain)==null?void 0:i.formatters)==null?void 0:o.transactionReceipt)==null?void 0:s.format)||yB)(n)}async function qB(e,t){var y;const{allowFailure:n=!0,batchSize:r,blockNumber:i,blockTag:o,multicallAddress:s,stateOverride:a}=t,l=t.contracts,u=r??(typeof((y=e.batch)==null?void 0:y.multicall)=="object"&&e.batch.multicall.batchSize||1024);let d=s;if(!d){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");d=hc({blockNumber:i,chain:e.chain,contract:"multicall3"})}const c=[[]];let f=0,m=0;for(let g=0;g0&&m>u&&c[f].length>0&&(f++,m=(C.length-2)/2,c[f]=[]),c[f]=[...c[f],{allowFailure:!0,callData:C,target:v}]}catch(C){const k=Wl(C,{abi:b,address:v,args:w,docsPath:"/docs/contract/multicall",functionName:E});if(!n)throw k;c[f]=[...c[f],{allowFailure:!0,callData:"0x",target:v}]}}const p=await Promise.allSettled(c.map(g=>Ee(e,bi,"readContract")({abi:D1,address:d,args:[g],blockNumber:i,blockTag:o,functionName:"aggregate3",stateOverride:a}))),h=[];for(let g=0;gt.toString(16).padStart(2,"0"));function Vl(e){fd(e);let t="";for(let n=0;n=Fi._0&&e<=Fi._9)return e-Fi._0;if(e>=Fi._A&&e<=Fi._F)return e-(Fi._A-10);if(e>=Fi._a&&e<=Fi._f)return e-(Fi._a-10)}function ql(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;iCE;e>>=C0,t+=1);return t}function QB(e,t){return e>>BigInt(t)&C0}function JB(e,t,n){return e|(n?C0:CE)<(GB<new Uint8Array(e),I6=e=>Uint8Array.from(e);function IE(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=Fm(e),i=Fm(e),o=0;const s=()=>{r.fill(1),i.fill(0),o=0},a=(...c)=>n(i,r,...c),l=(c=Fm())=>{i=a(I6([0]),c),r=a(),c.length!==0&&(i=a(I6([1]),c),r=a())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let c=0;const f=[];for(;c{s(),l(c);let m;for(;!(m=f(u()));)l();return s(),m}}const eN={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||xa(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function dd(e,t,n={}){const r=(i,o,s)=>{const a=eN[o];if(typeof a!="function")throw new Error(`Invalid validator "${o}", expected function`);const l=e[i];if(!(s&&l===void 0)&&!a(l,e))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(n))r(i,o,!0);return e}const tN=Object.freeze(Object.defineProperty({__proto__:null,abytes:fd,bitGet:QB,bitLen:YB,bitMask:bv,bitSet:JB,bytesToHex:Vl,bytesToNumberBE:la,bytesToNumberLE:gv,concatBytes:$f,createHmacDrbg:IE,ensureBytes:Nr,equalBytes:TE,hexToBytes:ql,hexToNumber:mv,isBytes:xa,numberToBytesBE:Gl,numberToBytesLE:yv,numberToHexUnpadded:AE,numberToVarBytesBE:ZB,utf8ToBytes:XB,validateObject:dd},Symbol.toStringTag,{value:"Module"}));function nN(e,t){const n=Er(e)?cs(e):e,r=Er(t)?cs(t):t;return TE(n,r)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const nn=BigInt(0),Pt=BigInt(1),Vs=BigInt(2),rN=BigInt(3),V1=BigInt(4),$6=BigInt(5),P6=BigInt(8);BigInt(9);BigInt(16);function In(e,t){const n=e%t;return n>=nn?n:t+n}function iN(e,t,n){if(n<=nn||t 0");if(n===Pt)return nn;let r=Pt;for(;t>nn;)t&Pt&&(r=r*e%n),e=e*e%n,t>>=Pt;return r}function pr(e,t,n){let r=e;for(;t-- >nn;)r*=r,r%=n;return r}function q1(e,t){if(e===nn||t<=nn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=In(e,t),r=t,i=nn,o=Pt;for(;n!==nn;){const a=r/n,l=r%n,u=i-o*a;r=n,n=l,i=o,o=u}if(r!==Pt)throw new Error("invert: does not exist");return In(i,t)}function oN(e){const t=(e-Pt)/Vs;let n,r,i;for(n=e-Pt,r=0;n%Vs===nn;n/=Vs,r++);for(i=Vs;i(r[i]="function",r),t);return dd(e,n)}function cN(e,t,n){if(n 0");if(n===nn)return e.ONE;if(n===Pt)return t;let r=e.ONE,i=t;for(;n>nn;)n&Pt&&(r=e.mul(r,i)),i=e.sqr(i),n>>=Pt;return r}function uN(e,t){const n=new Array(t.length),r=t.reduce((o,s,a)=>e.is0(s)?o:(n[a]=o,e.mul(o,s)),e.ONE),i=e.inv(r);return t.reduceRight((o,s,a)=>e.is0(s)?o:(n[a]=e.mul(o,n[a]),e.mul(o,s)),i),n}function $E(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function fN(e,t,n=!1,r={}){if(e<=nn)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:i,nByteLength:o}=$E(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=sN(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:bv(i),ZERO:nn,ONE:Pt,create:l=>In(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return nn<=l&&ll===nn,isOdd:l=>(l&Pt)===Pt,neg:l=>In(-l,e),eql:(l,u)=>l===u,sqr:l=>In(l*l,e),add:(l,u)=>In(l+u,e),sub:(l,u)=>In(l-u,e),mul:(l,u)=>In(l*u,e),pow:(l,u)=>cN(a,l,u),div:(l,u)=>In(l*q1(u,e),e),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>q1(l,e),sqrt:r.sqrt||(l=>s(a,l)),invertBatch:l=>uN(a,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>n?yv(l,o):Gl(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return n?gv(l):la(l)}});return Object.freeze(a)}function PE(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function OE(e){const t=PE(e);return t+Math.ceil(t/2)}function dN(e,t,n=!1){const r=e.length,i=PE(t),o=OE(t);if(r<16||r1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const s=n?la(e):gv(e),a=In(s,t-Pt)+Pt;return n?yv(a,i):Gl(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hN=BigInt(0),Um=BigInt(1);function pN(e,t){const n=(i,o)=>{const s=o.negate();return i?s:o},r=i=>{const o=Math.ceil(t/i)+1,s=2**(i-1);return{windows:o,windowSize:s}};return{constTimeNegate:n,unsafeLadder(i,o){let s=e.ZERO,a=i;for(;o>hN;)o&Um&&(s=s.add(a)),a=a.double(),o>>=Um;return s},precomputeWindow(i,o){const{windows:s,windowSize:a}=r(o),l=[];let u=i,d=u;for(let c=0;c>=m,y>l&&(y-=f,s+=Um);const g=h,b=h+Math.abs(y)-1,v=p%2!==0,w=y<0;y===0?d=d.add(n(v,o[g])):u=u.add(n(w,o[b]))}return{p:u,f:d}},wNAFCached(i,o,s,a){const l=i._WINDOW_SIZE||1;let u=o.get(i);return u||(u=this.precomputeWindow(i,l),l!==1&&o.set(i,a(u))),this.wNAF(l,u,s)}}}function RE(e){return lN(e.Fp),dd(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...$E(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function mN(e){const t=RE(e);dd(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:gN,hexToBytes:yN}=tN,Ys={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=Ys;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:gN(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=Ys,n=typeof e=="string"?yN(e):e;fd(n);let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=Ys._parseInt(n.subarray(2)),{d:s,l:a}=Ys._parseInt(o);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(e){const t=u=>Number.parseInt(u[0],16)&8?"00"+u:u,n=u=>{const d=u.toString(16);return d.length&1?`0${d}`:d},r=t(n(e.s)),i=t(n(e.r)),o=r.length/2,s=i.length/2,a=n(o),l=n(s);return`30${n(s+o+4)}02${l}${i}02${a}${r}`}},qi=BigInt(0),mr=BigInt(1);BigInt(2);const O6=BigInt(3);BigInt(4);function bN(e){const t=mN(e),{Fp:n}=t,r=t.toBytes||((p,h,y)=>{const g=h.toAffine();return $f(Uint8Array.from([4]),n.toBytes(g.x),n.toBytes(g.y))}),i=t.fromBytes||(p=>{const h=p.subarray(1),y=n.fromBytes(h.subarray(0,n.BYTES)),g=n.fromBytes(h.subarray(n.BYTES,2*n.BYTES));return{x:y,y:g}});function o(p){const{a:h,b:y}=t,g=n.sqr(p),b=n.mul(g,p);return n.add(n.add(b,n.mul(p,h)),y)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function s(p){return typeof p=="bigint"&&qin.eql(v,n.ZERO);return b(y)&&b(g)?c.ZERO:new c(y,g,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){const y=n.invertBatch(h.map(g=>g.pz));return h.map((g,b)=>g.toAffine(y[b])).map(c.fromAffine)}static fromHex(h){const y=c.fromAffine(i(Nr("pointHex",h)));return y.assertValidity(),y}static fromPrivateKey(h){return c.BASE.multiply(l(h))}_setWindowSize(h){this._WINDOW_SIZE=h,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:h,y}=this.toAffine();if(!n.isValid(h)||!n.isValid(y))throw new Error("bad point: x or y not FE");const g=n.sqr(y),b=o(h);if(!n.eql(g,b))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:h}=this.toAffine();if(n.isOdd)return!n.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){d(h);const{px:y,py:g,pz:b}=this,{px:v,py:w,pz:E}=h,C=n.eql(n.mul(y,E),n.mul(v,b)),k=n.eql(n.mul(g,E),n.mul(w,b));return C&&k}negate(){return new c(this.px,n.neg(this.py),this.pz)}double(){const{a:h,b:y}=t,g=n.mul(y,O6),{px:b,py:v,pz:w}=this;let E=n.ZERO,C=n.ZERO,k=n.ZERO,_=n.mul(b,b),S=n.mul(v,v),A=n.mul(w,w),I=n.mul(b,v);return I=n.add(I,I),k=n.mul(b,w),k=n.add(k,k),E=n.mul(h,k),C=n.mul(g,A),C=n.add(E,C),E=n.sub(S,C),C=n.add(S,C),C=n.mul(E,C),E=n.mul(I,E),k=n.mul(g,k),A=n.mul(h,A),I=n.sub(_,A),I=n.mul(h,I),I=n.add(I,k),k=n.add(_,_),_=n.add(k,_),_=n.add(_,A),_=n.mul(_,I),C=n.add(C,_),A=n.mul(v,w),A=n.add(A,A),_=n.mul(A,I),E=n.sub(E,_),k=n.mul(A,S),k=n.add(k,k),k=n.add(k,k),new c(E,C,k)}add(h){d(h);const{px:y,py:g,pz:b}=this,{px:v,py:w,pz:E}=h;let C=n.ZERO,k=n.ZERO,_=n.ZERO;const S=t.a,A=n.mul(t.b,O6);let I=n.mul(y,v),L=n.mul(g,w),F=n.mul(b,E),N=n.add(y,g),R=n.add(v,w);N=n.mul(N,R),R=n.add(I,L),N=n.sub(N,R),R=n.add(y,b);let B=n.add(v,E);return R=n.mul(R,B),B=n.add(I,F),R=n.sub(R,B),B=n.add(g,b),C=n.add(w,E),B=n.mul(B,C),C=n.add(L,F),B=n.sub(B,C),_=n.mul(S,R),C=n.mul(A,F),_=n.add(C,_),C=n.sub(L,_),_=n.add(L,_),k=n.mul(C,_),L=n.add(I,I),L=n.add(L,I),F=n.mul(S,F),R=n.mul(A,R),L=n.add(L,F),F=n.sub(I,F),F=n.mul(S,F),R=n.add(R,F),I=n.mul(L,R),k=n.add(k,I),I=n.mul(B,R),C=n.mul(N,C),C=n.sub(C,I),I=n.mul(N,L),_=n.mul(B,_),_=n.add(_,I),new c(C,k,_)}subtract(h){return this.add(h.negate())}is0(){return this.equals(c.ZERO)}wNAF(h){return m.wNAFCached(this,u,h,y=>{const g=n.invertBatch(y.map(b=>b.pz));return y.map((b,v)=>b.toAffine(g[v])).map(c.fromAffine)})}multiplyUnsafe(h){const y=c.ZERO;if(h===qi)return y;if(a(h),h===mr)return this;const{endo:g}=t;if(!g)return m.unsafeLadder(this,h);let{k1neg:b,k1:v,k2neg:w,k2:E}=g.splitScalar(h),C=y,k=y,_=this;for(;v>qi||E>qi;)v&mr&&(C=C.add(_)),E&mr&&(k=k.add(_)),_=_.double(),v>>=mr,E>>=mr;return b&&(C=C.negate()),w&&(k=k.negate()),k=new c(n.mul(k.px,g.beta),k.py,k.pz),C.add(k)}multiply(h){a(h);let y=h,g,b;const{endo:v}=t;if(v){const{k1neg:w,k1:E,k2neg:C,k2:k}=v.splitScalar(y);let{p:_,f:S}=this.wNAF(E),{p:A,f:I}=this.wNAF(k);_=m.constTimeNegate(w,_),A=m.constTimeNegate(C,A),A=new c(n.mul(A.px,v.beta),A.py,A.pz),g=_.add(A),b=S.add(I)}else{const{p:w,f:E}=this.wNAF(y);g=w,b=E}return c.normalizeZ([g,b])[0]}multiplyAndAddUnsafe(h,y,g){const b=c.BASE,v=(E,C)=>C===qi||C===mr||!E.equals(b)?E.multiplyUnsafe(C):E.multiply(C),w=v(this,y).add(v(h,g));return w.is0()?void 0:w}toAffine(h){const{px:y,py:g,pz:b}=this,v=this.is0();h==null&&(h=v?n.ONE:n.inv(b));const w=n.mul(y,h),E=n.mul(g,h),C=n.mul(b,h);if(v)return{x:n.ZERO,y:n.ZERO};if(!n.eql(C,n.ONE))throw new Error("invZ was invalid");return{x:w,y:E}}isTorsionFree(){const{h,isTorsionFree:y}=t;if(h===mr)return!0;if(y)return y(c,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h,clearCofactor:y}=t;return h===mr?this:y?y(c,this):this.multiplyUnsafe(t.h)}toRawBytes(h=!0){return this.assertValidity(),r(c,this,h)}toHex(h=!0){return Vl(this.toRawBytes(h))}}c.BASE=new c(t.Gx,t.Gy,n.ONE),c.ZERO=new c(n.ZERO,n.ONE,n.ZERO);const f=t.nBitLength,m=pN(c,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:s}}function vN(e){const t=RE(e);return dd(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function wN(e){const t=vN(e),{Fp:n,n:r}=t,i=n.BYTES+1,o=2*n.BYTES+1;function s(R){return qiVl(Gl(R,t.nByteLength));function p(R){const B=r>>mr;return R>B}function h(R){return p(R)?a(-R):R}const y=(R,B,V)=>la(R.slice(B,V));class g{constructor(B,V,j){this.r=B,this.s=V,this.recovery=j,this.assertValidity()}static fromCompact(B){const V=t.nByteLength;return B=Nr("compactSignature",B,V*2),new g(y(B,0,V),y(B,V,2*V))}static fromDER(B){const{r:V,s:j}=Ys.toSig(Nr("DER",B));return new g(V,j)}assertValidity(){if(!f(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!f(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(B){return new g(this.r,this.s,B)}recoverPublicKey(B){const{r:V,s:j,recovery:W}=this,Y=k(Nr("msgHash",B));if(W==null||![0,1,2,3].includes(W))throw new Error("recovery id invalid");const te=W===2||W===3?V+t.n:V;if(te>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const ae=W&1?"03":"02",Z=u.fromHex(ae+m(te)),pe=l(te),Ie=a(-Y*pe),_e=a(j*pe),Ce=u.BASE.multiplyAndAddUnsafe(Z,Ie,_e);if(!Ce)throw new Error("point at infinify");return Ce.assertValidity(),Ce}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return ql(this.toDERHex())}toDERHex(){return Ys.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return ql(this.toCompactHex())}toCompactHex(){return m(this.r)+m(this.s)}}const b={isValidPrivateKey(R){try{return d(R),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const R=OE(t.n);return dN(t.randomBytes(R),t.n)},precompute(R=8,B=u.BASE){return B._setWindowSize(R),B.multiply(BigInt(3)),B}};function v(R,B=!0){return u.fromPrivateKey(R).toRawBytes(B)}function w(R){const B=xa(R),V=typeof R=="string",j=(B||V)&&R.length;return B?j===i||j===o:V?j===2*i||j===2*o:R instanceof u}function E(R,B,V=!0){if(w(R))throw new Error("first arg must be private key");if(!w(B))throw new Error("second arg must be public key");return u.fromHex(B).multiply(d(R)).toRawBytes(V)}const C=t.bits2int||function(R){const B=la(R),V=R.length*8-t.nBitLength;return V>0?B>>BigInt(V):B},k=t.bits2int_modN||function(R){return a(C(R))},_=bv(t.nBitLength);function S(R){if(typeof R!="bigint")throw new Error("bigint expected");if(!(qi<=R&&R<_))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Gl(R,t.nByteLength)}function A(R,B,V=I){if(["recovered","canonical"].some($e=>$e in V))throw new Error("sign() legacy options not supported");const{hash:j,randomBytes:W}=t;let{lowS:Y,prehash:te,extraEntropy:ae}=V;Y==null&&(Y=!0),R=Nr("msgHash",R),te&&(R=Nr("prehashed msgHash",j(R)));const Z=k(R),pe=d(B),Ie=[S(pe),S(Z)];if(ae!=null&&ae!==!1){const $e=ae===!0?W(n.BYTES):ae;Ie.push(Nr("extraEntropy",$e))}const _e=$f(...Ie),Ce=Z;function le($e){const rt=C($e);if(!f(rt))return;const je=l(rt),nt=u.BASE.multiply(rt).toAffine(),Le=a(nt.x);if(Le===qi)return;const _t=a(je*a(Ce+Le*pe));if(_t===qi)return;let Kn=(nt.x===Le?0:2)|Number(nt.y&mr),Zr=_t;return Y&&p(_t)&&(Zr=h(_t),Kn^=1),new g(Le,Zr,Kn)}return{seed:_e,k2sig:le}}const I={lowS:t.lowS,prehash:!1},L={lowS:t.lowS,prehash:!1};function F(R,B,V=I){const{seed:j,k2sig:W}=A(R,B,V),Y=t;return IE(Y.hash.outputLen,Y.nByteLength,Y.hmac)(j,W)}u.BASE._setWindowSize(8);function N(R,B,V,j=L){var nt;const W=R;if(B=Nr("msgHash",B),V=Nr("publicKey",V),"strict"in j)throw new Error("options.strict was renamed to lowS");const{lowS:Y,prehash:te}=j;let ae,Z;try{if(typeof W=="string"||xa(W))try{ae=g.fromDER(W)}catch(Le){if(!(Le instanceof Ys.Err))throw Le;ae=g.fromCompact(W)}else if(typeof W=="object"&&typeof W.r=="bigint"&&typeof W.s=="bigint"){const{r:Le,s:_t}=W;ae=new g(Le,_t)}else throw new Error("PARSE");Z=u.fromHex(V)}catch(Le){if(Le.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Y&&ae.hasHighS())return!1;te&&(B=t.hash(B));const{r:pe,s:Ie}=ae,_e=k(B),Ce=l(Ie),le=a(_e*Ce),$e=a(pe*Ce),rt=(nt=u.BASE.multiplyAndAddUnsafe(Z,le,$e))==null?void 0:nt.toAffine();return rt?a(rt.x)===pe:!1}return{CURVE:t,getPublicKey:v,getSharedSecret:E,sign:F,verify:N,ProjectivePoint:u,Signature:g,utils:b}}class LE extends Ob{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,sO(t);const r=c0(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let s=0;snew LE(e,t).update(n).digest();dp.create=(e,t)=>new LE(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function _N(e){return{hash:e,hmac:(t,...n)=>dp(e,t,vu(...n)),randomBytes:TO}}function xN(e,t){const n=r=>wN({...e,..._N(r)});return Object.freeze({...n(t),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const BE=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),R6=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),EN=BigInt(1),G1=BigInt(2),L6=(e,t)=>(e+t/G1)/t;function SN(e){const t=BE,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),l=BigInt(88),u=e*e*e%t,d=u*u*e%t,c=pr(d,n,t)*d%t,f=pr(c,n,t)*d%t,m=pr(f,G1,t)*u%t,p=pr(m,i,t)*m%t,h=pr(p,o,t)*p%t,y=pr(h,a,t)*h%t,g=pr(y,l,t)*y%t,b=pr(g,a,t)*h%t,v=pr(b,n,t)*d%t,w=pr(v,s,t)*p%t,E=pr(w,r,t)*u%t,C=pr(E,G1,t);if(!K1.eql(K1.sqr(C),e))throw new Error("Cannot find square root");return C}const K1=fN(BE,void 0,void 0,{sqrt:SN}),Mn=xN({a:BigInt(0),b:BigInt(7),Fp:K1,n:R6,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=R6,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-EN*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,s=BigInt("0x100000000000000000000000000000000"),a=L6(o*e,t),l=L6(-r*e,t);let u=In(e-a*n-l*i,t),d=In(-a*r-l*o,t);const c=u>s,f=d>s;if(c&&(u=t-u),f&&(d=t-d),u>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:c,k1:u,k2neg:f,k2:d}}}},y0);BigInt(0);Mn.ProjectivePoint;const kN=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:Mn},Symbol.toStringTag,{value:"Module"}));function NE({r:e,s:t,to:n="hex",v:r,yParity:i}){const o=(()=>{if(i===0||i===1)return i;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new Mn.Signature(ls(e),ls(t)).toCompactHex()}${o===0?"1b":"1c"}`;return n==="hex"?s:Sr(s)}async function vv(e,t){const{address:n,factory:r,factoryData:i,hash:o,signature:s,...a}=t,l=Er(s)?s:typeof s=="object"&&"r"in s&&"s"in s?NE(s):Mt(s),u=await(async()=>!r&&!i||TB(l)?l:IB({address:r,data:i,signature:l}))();try{const{data:d}=await Ee(e,_0,"call")({data:w0({abi:aL,args:[n,o,u],bytecode:fL}),...a});return nN(d??"0x0","0x1")}catch(d){try{if(Jb(fp(n),await $8({hash:o,signature:s})))return!0}catch{}if(d instanceof A8)return!1;throw d}}async function CN(e,{address:t,message:n,factory:r,factoryData:i,signature:o,...s}){const a=dv(n);return vv(e,{address:t,factory:r,factoryData:i,hash:a,signature:o,...s})}async function AN(e,t){const{address:n,factory:r,factoryData:i,signature:o,message:s,primaryType:a,types:l,domain:u,...d}=t,c=gE({message:s,primaryType:a,types:l,domain:u});return vv(e,{address:n,factory:r,factoryData:i,hash:c,signature:o,...d})}function ME(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:i,poll:o,pollingInterval:s=e.pollingInterval}){const a=typeof o<"u"?o:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket");let l;return a?(()=>{const c=hn(["watchBlockNumber",e.uid,t,n,s]);return ds(c,{onBlockNumber:r,onError:i},f=>ad(async()=>{var m;try{const p=await Ee(e,ld,"getBlockNumber")({cacheTime:0});if(l){if(p===l)return;if(p-l>1&&n)for(let h=l+1n;hl)&&(f.onBlockNumber(p,l),l=p)}catch(p){(m=f.onError)==null||m.call(f,p)}},{emitOnBegin:t,interval:s}))})():(()=>{const c=hn(["watchBlockNumber",e.uid,t,n]);return ds(c,{onBlockNumber:r,onError:i},f=>{let m=!0,p=()=>m=!1;return(async()=>{try{const h=(()=>{if(e.transport.type==="fallback"){const g=e.transport.transports.find(b=>b.config.type==="webSocket");return g?g.value:e.transport}return e.transport})(),{unsubscribe:y}=await h.subscribe({params:["newHeads"],onData(g){var v;if(!m)return;const b=ls((v=g.result)==null?void 0:v.number);f.onBlockNumber(b,l),l=b},onError(g){var b;(b=f.onError)==null||b.call(f,g)}});p=y,m||p()}catch(h){i==null||i(h)}})(),()=>p()})})()}async function TN(e,{confirmations:t=1,hash:n,onReplaced:r,pollingInterval:i=e.pollingInterval,retryCount:o=6,retryDelay:s=({count:l})=>~~(1<{a&&setTimeout(()=>h(new h6({hash:n})),a);const y=ds(l,{onReplaced:r,resolve:p,reject:h},g=>{const b=Ee(e,ME,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(v){const w=C=>{b(),C(),y()};let E=v;if(!m){u>o&&w(()=>g.reject(new h6({hash:n})));try{if(f){if(t>1&&(!f.blockNumber||E-f.blockNumber+1ng.resolve(f));return}if(d||(m=!0,await z1(async()=>{d=await Ee(e,pv,"getTransaction")({hash:n}),d.blockNumber&&(E=d.blockNumber)},{delay:s,retryCount:o}),m=!1),f=await Ee(e,W1,"getTransactionReceipt")({hash:n}),t>1&&(!f.blockNumber||E-f.blockNumber+1ng.resolve(f))}catch(C){if(C instanceof k8||C instanceof C8){if(!d){m=!1;return}try{c=d,m=!0;const k=await z1(()=>Ee(e,us,"getBlock")({blockNumber:E,includeTransactions:!0}),{delay:s,retryCount:o,shouldRetry:({error:A})=>A instanceof N8});m=!1;const _=k.transactions.find(({from:A,nonce:I})=>A===c.from&&I===c.nonce);if(!_||(f=await Ee(e,W1,"getTransactionReceipt")({hash:_.hash}),t>1&&(!f.blockNumber||E-f.blockNumber+1n{var A;(A=g.onReplaced)==null||A.call(g,{reason:S,replacedTransaction:c,transaction:_,transactionReceipt:f}),g.resolve(f)})}catch(k){w(()=>g.reject(k))}}else w(()=>g.reject(C))}finally{u++}}}})})})}function IN(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:i,onError:o,includeTransactions:s,poll:a,pollingInterval:l=e.pollingInterval}){const u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),d=s??!1;let c;return u?(()=>{const p=hn(["watchBlocks",e.uid,t,n,r,d,l]);return ds(p,{onBlock:i,onError:o},h=>ad(async()=>{var y;try{const g=await Ee(e,us,"getBlock")({blockTag:t,includeTransactions:d});if(g.number&&(c!=null&&c.number)){if(g.number===c.number)return;if(g.number-c.number>1&&n)for(let b=(c==null?void 0:c.number)+1n;bc.number)&&(h.onBlock(g,c),c=g)}catch(g){(y=h.onError)==null||y.call(h,g)}},{emitOnBegin:r,interval:l}))})():(()=>{let p=!0,h=()=>p=!1;return(async()=>{try{const y=(()=>{if(e.transport.type==="fallback"){const b=e.transport.transports.find(v=>v.config.type==="webSocket");return b?b.value:e.transport}return e.transport})(),{unsubscribe:g}=await y.subscribe({params:["newHeads"],onData(b){var E,C,k;if(!p)return;const w=(((k=(C=(E=e.chain)==null?void 0:E.formatters)==null?void 0:C.block)==null?void 0:k.format)||D8)(b.result);i(w,c),c=w},onError(b){o==null||o(b)}});h=g,p||h()}catch(y){o==null||o(y)}})(),()=>h()})()}function $N(e,{address:t,args:n,batch:r=!0,event:i,events:o,fromBlock:s,onError:a,onLogs:l,poll:u,pollingInterval:d=e.pollingInterval,strict:c}){const f=typeof u<"u"?u:typeof s=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="fallback"&&e.transport.transports[0].config.type==="webSocket"),m=c??!1;return f?(()=>{const y=hn(["watchEvent",t,n,r,e.uid,i,d,s]);return ds(y,{onLogs:l,onError:a},g=>{let b;s!==void 0&&(b=s-1n);let v,w=!1;const E=ad(async()=>{var C;if(!w){try{v=await Ee(e,pE,"createEventFilter")({address:t,args:n,event:i,events:o,strict:m,fromBlock:s})}catch{}w=!0;return}try{let k;if(v)k=await Ee(e,x0,"getFilterChanges")({filter:v});else{const _=await Ee(e,ld,"getBlockNumber")({});b&&b!==_?k=await Ee(e,nv,"getLogs")({address:t,args:n,event:i,events:o,fromBlock:b+1n,toBlock:_}):k=[],b=_}if(k.length===0)return;if(r)g.onLogs(k);else for(const _ of k)g.onLogs([_])}catch(k){v&&k instanceof va&&(w=!1),(C=g.onError)==null||C.call(g,k)}},{emitOnBegin:!0,interval:d});return async()=>{v&&await Ee(e,E0,"uninstallFilter")({filter:v}),E()}})})():(()=>{let y=!0,g=()=>y=!1;return(async()=>{try{const b=(()=>{if(e.transport.type==="fallback"){const C=e.transport.transports.find(k=>k.config.type==="webSocket");return C?C.value:e.transport}return e.transport})(),v=o??(i?[i]:void 0);let w=[];v&&(w=[v.flatMap(k=>rd({abi:[k],eventName:k.name,args:n}))],i&&(w=w[0]));const{unsubscribe:E}=await b.subscribe({params:["logs",{address:t,topics:w}],onData(C){var _;if(!y)return;const k=C.result;try{const{eventName:S,args:A}=ev({abi:v??[],data:k.data,topics:k.topics,strict:m}),I=fs(k,{args:A,eventName:S});l([I])}catch(S){let A,I;if(S instanceof df||S instanceof l0){if(c)return;A=S.abiItem.name,I=(_=S.abiItem.inputs)==null?void 0:_.some(F=>!("name"in F&&F.name))}const L=fs(k,{args:I?[]:{},eventName:A});l([L])}},onError(C){a==null||a(C)}});g=E,y||g()}catch(b){a==null||a(b)}})(),()=>g()})()}function PN(e,{batch:t=!0,onError:n,onTransactions:r,poll:i,pollingInterval:o=e.pollingInterval}){return(typeof i<"u"?i:e.transport.type!=="webSocket")?(()=>{const u=hn(["watchPendingTransactions",e.uid,t,o]);return ds(u,{onTransactions:r,onError:n},d=>{let c;const f=ad(async()=>{var m;try{if(!c)try{c=await Ee(e,mE,"createPendingTransactionFilter")({});return}catch(h){throw f(),h}const p=await Ee(e,x0,"getFilterChanges")({filter:c});if(p.length===0)return;if(t)d.onTransactions(p);else for(const h of p)d.onTransactions([h])}catch(p){(m=d.onError)==null||m.call(d,p)}},{emitOnBegin:!0,interval:o});return async()=>{c&&await Ee(e,E0,"uninstallFilter")({filter:c}),f()}})})():(()=>{let u=!0,d=()=>u=!1;return(async()=>{try{const{unsubscribe:c}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!u)return;const m=f.result;r([m])},onError(f){n==null||n(f)}});d=c,u||d()}catch(c){n==null||n(c)}})(),()=>d()})()}function ON(e){var c,f,m;const{scheme:t,statement:n,...r}=((c=e.match(RN))==null?void 0:c.groups)??{},{chainId:i,expirationTime:o,issuedAt:s,notBefore:a,requestId:l,...u}=((f=e.match(LN))==null?void 0:f.groups)??{},d=(m=e.split("Resources:")[1])==null?void 0:m.split(` +- `).slice(1);return{...r,...u,...i?{chainId:Number(i)}:{},...o?{expirationTime:new Date(o)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...l?{requestId:l}:{},...d?{resources:d}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const RN=/^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?
0x[a-fA-F0-9]{40})\n\n(?:(?.*)\n\n)?/,LN=/(?:URI: (?.+))\n(?:Version: (?.+))\n(?:Chain ID: (?\d+))\n(?:Nonce: (?[a-zA-Z0-9]+))\n(?:Issued At: (?.+))(?:\nExpiration Time: (?.+))?(?:\nNot Before: (?.+))?(?:\nRequest ID: (?.+))?/;function BN(e){const{address:t,domain:n,message:r,nonce:i,scheme:o,time:s=new Date}=e;if(n&&r.domain!==n||i&&r.nonce!==i||o&&r.scheme!==o||r.expirationTime&&s>=r.expirationTime||r.notBefore&&s_0(e,t),createBlockFilter:()=>iB(e),createContractEventFilter:t=>Db(e,t),createEventFilter:t=>pE(e,t),createPendingTransactionFilter:()=>mE(e),estimateContractGas:t=>Y8(e,t),estimateGas:t=>Qb(e,t),getBalance:t=>X8(e,t),getBlobBaseFee:()=>oB(e),getBlock:t=>us(e,t),getBlockNumber:t=>ld(e,t),getBlockTransactionCount:t=>sB(e,t),getBytecode:t=>C6(e,t),getChainId:()=>sd(e),getCode:t=>C6(e,t),getContractEvents:t=>rv(e,t),getEip712Domain:t=>IL(e,t),getEnsAddress:t=>HL(e,t),getEnsAvatar:t=>tB(e,t),getEnsName:t=>nB(e,t),getEnsResolver:t=>rB(e,t),getEnsText:t=>hE(e,t),getFeeHistory:t=>lB(e,t),estimateFeesPerGas:t=>qR(e,t),getFilterChanges:t=>x0(e,t),getFilterLogs:t=>cB(e,t),getGasPrice:()=>Gb(e),getLogs:t=>nv(e,t),getProof:t=>zB(e,t),estimateMaxPriorityFeePerGas:t=>VR(e,t),getStorageAt:t=>WB(e,t),getTransaction:t=>pv(e,t),getTransactionConfirmations:t=>VB(e,t),getTransactionCount:t=>U8(e,t),getTransactionReceipt:t=>W1(e,t),multicall:t=>qB(e,t),prepareTransactionRequest:t=>b0(e,t),readContract:t=>bi(e,t),sendRawTransaction:t=>iv(e,t),simulateContract:t=>nE(e,t),verifyMessage:t=>CN(e,t),verifySiweMessage:t=>NN(e,t),verifyTypedData:t=>AN(e,t),uninstallFilter:t=>E0(e,t),waitForTransactionReceipt:t=>TN(e,t),watchBlocks:t=>IN(e,t),watchBlockNumber:t=>ME(e,t),watchContractEvent:t=>rE(e,t),watchEvent:t=>$N(e,t),watchPendingTransactions:t=>PN(e,t)}}function jN(e){const{key:t="public",name:n="Public Client"}=e;return aE({...e,key:t,name:n,type:"publicClient"}).extend(MN)}function DN(e,t){const{abi:n,args:r,bytecode:i,...o}=t,s=w0({abi:n,args:r,bytecode:i});return ov(e,{...o,data:s})}async function FN(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>td(r))}async function UN(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function HN(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>fp(n))}async function zN(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function WN(e,{account:t=e.account,message:n}){if(!t)throw new cd({docsPath:"/docs/actions/wallet/signMessage"});const r=cr(t);if(r.signMessage)return r.signMessage({message:n});const i=typeof n=="string"?Ul(n):n.raw instanceof Uint8Array?Te(n.raw):n.raw;return e.request({method:"personal_sign",params:[i,r.address]},{retryCount:0})}async function VN(e,t){var u,d,c,f;const{account:n=e.account,chain:r=e.chain,...i}=t;if(!n)throw new cd({docsPath:"/docs/actions/wallet/signTransaction"});const o=cr(n);od({account:o,...t});const s=await Ee(e,sd,"getChainId")({});r!==null&&iE({currentChainId:s,chain:r});const a=(r==null?void 0:r.formatters)||((u=e.chain)==null?void 0:u.formatters),l=((d=a==null?void 0:a.transactionRequest)==null?void 0:d.format)||m0;return o.signTransaction?o.signTransaction({...i,chainId:s},{serializer:(f=(c=e.chain)==null?void 0:c.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...l(i),chainId:Ae(s),from:o.address}]},{retryCount:0})}async function qN(e,t){const{account:n=e.account,domain:r,message:i,primaryType:o}=t;if(!n)throw new cd({docsPath:"/docs/actions/wallet/signTypedData"});const s=cr(n),a={EIP712Domain:xE({domain:r}),...t.types};if(_E({domain:r,message:i,primaryType:o,types:a}),s.signTypedData)return s.signTypedData({domain:r,message:i,primaryType:o,types:a});const l=mB({domain:r,message:i,primaryType:o,types:a});return e.request({method:"eth_signTypedData_v4",params:[s.address,l]},{retryCount:0})}async function GN(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:Ae(t)}]},{retryCount:0})}async function KN(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}function ZN(e){return{addChain:t=>PL(e,t),deployContract:t=>DN(e,t),getAddresses:()=>FN(e),getChainId:()=>sd(e),getPermissions:()=>UN(e),prepareTransactionRequest:t=>b0(e,t),requestAddresses:()=>HN(e),requestPermissions:t=>zN(e,t),sendRawTransaction:t=>iv(e,t),sendTransaction:t=>ov(e,t),signMessage:t=>WN(e,t),signTransaction:t=>VN(e,t),signTypedData:t=>qN(e,t),switchChain:t=>GN(e,t),watchAsset:t=>KN(e,t),writeContract:t=>oE(e,t)}}function jE(e){const{key:t="wallet",name:n="Wallet Client",transport:r}=e;return aE({...e,key:t,name:n,transport:r,type:"walletClient"}).extend(ZN)}var zr=(e=>(e.PROD="prod",e.STAGING="staging",e.DEV="dev",e.LOCAL="local",e))(zr||{});const XN=cv({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),wv=cv({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),B6=cv({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc2.sepolia.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0}),YN=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"valPerBlock",type:"uint16"},{indexed:!1,internalType:"uint16",name:"valPerBlockTarget",type:"uint16"}],name:"BlockParamsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"ownerWallet",type:"address"},{indexed:!0,internalType:"address",name:"nodeWallet",type:"address"},{indexed:!1,internalType:"enum ValidatorV1.NodeType",name:"nodeType",type:"uint8"},{indexed:!1,internalType:"uint256",name:"nodeTokens",type:"uint256"},{indexed:!1,internalType:"string",name:"nodeApiBaseUrl",type:"string"}],name:"NodeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"nodeWallet",type:"address"},{indexed:!1,internalType:"address",name:"reporterWallet",type:"address"},{indexed:!1,internalType:"address[]",name:"voters",type:"address[]"},{indexed:!1,internalType:"enum ValidatorV1.VoteAction",name:"voteAction",type:"uint8"}],name:"NodeReported",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"nodeWallet",type:"address"},{indexed:!1,internalType:"enum ValidatorV1.NodeStatus",name:"nodeStatus",type:"uint8"},{indexed:!1,internalType:"uint256",name:"nodeTokens",type:"uint256"}],name:"NodeStatusChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"nodeRandomMinCount",type:"uint16"},{indexed:!1,internalType:"uint16",name:"nodeRandomPingCount",type:"uint16"}],name:"RandomParamsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[],name:"BAN_PERCENT",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"REPORTS_BEFORE_SLASH_S",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"REPORTS_BEFORE_SLASH_V",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"REPORT_THRESHOLD_PER_BLOCK",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"SLASHES_BEFORE_BAN_S",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"SLASHES_BEFORE_BAN_V",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"SLASH_PERCENT",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"acceptOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"dnodes",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActiveVNodes",outputs:[{components:[{internalType:"address",name:"nodeWallet",type:"address"},{internalType:"string",name:"nodeApiBaseUrl",type:"string"}],internalType:"struct ValidatorV1.ActiveValidator[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDNodes",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDNodesLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_nodeWallet",type:"address"}],name:"getNodeInfo",outputs:[{components:[{internalType:"address",name:"ownerWallet",type:"address"},{internalType:"address",name:"nodeWallet",type:"address"},{internalType:"enum ValidatorV1.NodeType",name:"nodeType",type:"uint8"},{internalType:"uint256",name:"nodeTokens",type:"uint256"},{internalType:"string",name:"nodeApiBaseUrl",type:"string"},{components:[{internalType:"uint16",name:"reportCounter",type:"uint16"},{internalType:"uint16",name:"slashCounter",type:"uint16"},{internalType:"uint128[]",name:"reportedInBlocks",type:"uint128[]"},{internalType:"address[]",name:"reportedBy",type:"address[]"},{internalType:"uint128[]",name:"reportedKeys",type:"uint128[]"}],internalType:"struct ValidatorV1.NodeCounters",name:"counters",type:"tuple"},{internalType:"enum ValidatorV1.NodeStatus",name:"status",type:"uint8"}],internalType:"struct ValidatorV1.NodeInfo",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSNodes",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSNodesLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVNodes",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVNodesLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"protocolVersion_",type:"uint16"},{internalType:"address",name:"pushToken_",type:"address"},{internalType:"uint16",name:"valPerBlockTarget_",type:"uint16"},{internalType:"uint16",name:"nodeRandomMinCount_",type:"uint16"},{internalType:"uint16",name:"nodeRandomPingCount_",type:"uint16"},{internalType:"uint16",name:"REPORTS_BEFORE_SLASH_V_",type:"uint16"},{internalType:"uint16",name:"REPORTS_BEFORE_SLASH_S_",type:"uint16"},{internalType:"uint16",name:"SLASHES_BEFORE_BAN_V_",type:"uint16"},{internalType:"uint16",name:"SLASHES_BEFORE_BAN_S_",type:"uint16"},{internalType:"uint16",name:"SLASH_PERCENT_",type:"uint16"},{internalType:"uint16",name:"BAN_PERCENT_",type:"uint16"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"minStakeD",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minStakeS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minStakeV",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeMap",outputs:[{internalType:"address",name:"ownerWallet",type:"address"},{internalType:"address",name:"nodeWallet",type:"address"},{internalType:"enum ValidatorV1.NodeType",name:"nodeType",type:"uint8"},{internalType:"uint256",name:"nodeTokens",type:"uint256"},{internalType:"string",name:"nodeApiBaseUrl",type:"string"},{components:[{internalType:"uint16",name:"reportCounter",type:"uint16"},{internalType:"uint16",name:"slashCounter",type:"uint16"},{internalType:"uint128[]",name:"reportedInBlocks",type:"uint128[]"},{internalType:"address[]",name:"reportedBy",type:"address[]"},{internalType:"uint128[]",name:"reportedKeys",type:"uint128[]"}],internalType:"struct ValidatorV1.NodeCounters",name:"counters",type:"tuple"},{internalType:"enum ValidatorV1.NodeStatus",name:"status",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"nodeRandomMinCount",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"nodeRandomPingCount",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolVersion",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from_",type:"address"},{internalType:"address",name:"to_",type:"address"},{internalType:"uint256",name:"amount_",type:"uint256"}],name:"redistributeStaked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"nodeTokens_",type:"uint256"},{internalType:"enum ValidatorV1.NodeType",name:"nodeType_",type:"uint8"},{internalType:"string",name:"nodeApiBaseUrl_",type:"string"},{internalType:"address",name:"nodeWallet_",type:"address"}],name:"registerNodeAndStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum ValidatorV1.NodeType",name:"targetNodeType_",type:"uint8"},{internalType:"bytes",name:"voteBlob_",type:"bytes"},{internalType:"bytes[]",name:"signatures_",type:"bytes[]"}],name:"reportNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"addr_",type:"address"}],name:"setStorageContract",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"snodes",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"storageContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalFees",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalStaked",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to_",type:"address"},{internalType:"uint256",name:"amount_",type:"uint256"}],name:"unstakeFees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"nodeWallet_",type:"address"}],name:"unstakeNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"valPerBlockTarget_",type:"uint16"}],name:"updateBlockParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"nodeRandomMinCount_",type:"uint16"},{internalType:"uint16",name:"nodeRandomPingCount_",type:"uint16"}],name:"updateRandomParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"valPerBlock",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[],name:"valPerBlockTarget",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"vnodes",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"vnodesActive",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"}],Hm={ABIS:{VALIDATOR:YN},VALIDATOR:{[zr.PROD]:{NETWORK:wv,VALIDATOR_CONTRACT:"TODO"},[zr.STAGING]:{NETWORK:B6,VALIDATOR_CONTRACT:"TODO"},[zr.DEV]:{NETWORK:B6,VALIDATOR_CONTRACT:"0xb08d2cA537F6183138955eD4fCb012f94f681954"},[zr.LOCAL]:{NETWORK:XN,VALIDATOR_CONTRACT:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9"}}},Ft=class Ft{constructor(t,n,r){Se(this,"call",async(t,n=[],r=this.activeValidatorURL)=>await Ft.sendJsonRpcRequest(r,t,n));this.activeValidatorURL=t,this.env=n,this.validatorContractClient=r}};Se(Ft,"instance"),Se(Ft,"idCounter",0),Se(Ft,"initalize",async t=>{const n={env:(t==null?void 0:t.env)||zr.STAGING};if(!Ft.instance||Ft.instance.env!==n.env){const r=Ft.createValidatorContractClient(n.env),i=await Ft.getActiveValidator(r);Ft.instance=new Ft(i.nodeApiBaseUrl,n.env,r)}return Ft.instance}),Se(Ft,"createValidatorContractClient",t=>{const n=jN({chain:Hm.VALIDATOR[t].NETWORK,transport:cE()});return AL({abi:Hm.ABIS.VALIDATOR,address:Hm.VALIDATOR[t].VALIDATOR_CONTRACT,client:{public:n}})}),Se(Ft,"sendJsonRpcRequest",async(t,n,r)=>{const i={jsonrpc:"2.0",method:n,params:r,id:Ft.idCounter++},o=()=>t.includes(".local")?t.replace(".local",".localh"):t;try{const s=await Nt.post(`${o()}/api/v1/rpc`,i);if(s.data.error)throw console.error("JSON-RPC Error:",s.data.error),Error(s.data.error.message);return s.data.result}catch(s){throw console.error("Error sending JSON-RPC request:",s),s}}),Se(Ft,"ping",async t=>await Ft.sendJsonRpcRequest(t,"push_listening")),Se(Ft,"getActiveValidator",async t=>{const n=await t.read.getActiveVNodes();return EI(n)});let Pf=Ft;function QN(){let e=0,t=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<>4,!(n&128))return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<>>o,a=!(!(s>>>7)&&t==0),l=(a?s|128:s)&255;if(n.push(l),!a)return}const r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),!!i){for(let o=3;o<31;o=o+7){const s=t>>>o,a=!!(s>>>7),l=(a?s|128:s)&255;if(n.push(l),!a)return}n.push(t>>>31&1)}}const _h=4294967296;function N6(e){const t=e[0]==="-";t&&(e=e.slice(1));const n=1e6;let r=0,i=0;function o(s,a){const l=Number(e.slice(s,a));i*=n,r=r*n+l,r>=_h&&(i=i+(r/_h|0),r=r%_h)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),t?FE(r,i):_v(r,i)}function JN(e,t){let n=_v(e,t);const r=n.hi&2147483648;r&&(n=FE(n.lo,n.hi));const i=DE(n.lo,n.hi);return r?"-"+i:i}function DE(e,t){if({lo:e,hi:t}=eM(e,t),t<=2097151)return String(_h*t+e);const n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535;let o=n+r*6777216+i*6710656,s=r+i*8147497,a=i*2;const l=1e7;return o>=l&&(s+=Math.floor(o/l),o%=l),s>=l&&(a+=Math.floor(s/l),s%=l),a.toString()+M6(s)+M6(o)}function eM(e,t){return{lo:e>>>0,hi:t>>>0}}function _v(e,t){return{lo:e|0,hi:t|0}}function FE(e,t){return t=~t,e?e=~e+1:t+=1,_v(e,t)}const M6=e=>{const t=String(e);return"0000000".slice(t.length)+t};function j6(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function tM(){let e=this.buf[this.pos++],t=e&127;if(!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;e&128&&n<10;n++)e=this.buf[this.pos++];if(e&128)throw new Error("invalid varint");return this.assertBounds(),t>>>0}var D6={};const ui=nM();function nM(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof D6!="object"||D6.BUF_BIGINT_DISABLE!=="1")){const n=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),i=BigInt("0"),o=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(s){const a=typeof s=="bigint"?s:BigInt(s);if(a>r||ao||a>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(H6(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return Vm(t),j6(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.encodeUtf8(t);return this.uint32(n.byteLength),this.raw(n)}float(t){lM(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){H6(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){Vm(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return Vm(t),t=(t<<1^t>>31)>>>0,j6(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=ui.enc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=ui.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=ui.enc(t);return zm(n.lo,n.hi,this.buf),this}sint64(t){let n=ui.enc(t),r=n.hi>>31,i=n.lo<<1^r,o=(n.hi<<1|n.lo>>>31)^r;return zm(i,o,this.buf),this}uint64(t){let n=ui.uEnc(t);return zm(n.lo,n.hi,this.buf),this}}class hs{constructor(t,n=UE().decodeUtf8){this.decodeUtf8=n,this.varint64=QN,this.uint32=tM,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength)}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t,n){let r=this.pos;switch(t){case jo.Varint:for(;this.buf[this.pos++]&128;);break;case jo.Bit64:this.pos+=4;case jo.Bit32:this.pos+=4;break;case jo.LengthDelimited:let i=this.uint32();this.pos+=i;break;case jo.StartGroup:for(;;){const[o,s]=this.tag();if(s===jo.EndGroup){if(n!==void 0&&o!==n)throw new Error("invalid end group tag");break}this.skip(s,o)}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return ui.dec(...this.varint64())}uint64(){return ui.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,ui.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ui.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ui.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.decodeUtf8(this.bytes())}}function Vm(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>sM||eoM||e<0)throw new Error("invalid uint32: "+e)}function lM(e){if(typeof e=="string"){const t=e;if(e=Number(e),isNaN(e)&&t!=="NaN")throw new Error("invalid float32: "+t)}else if(typeof e!="number")throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>rM||e>>3){case 1:if(o!==8)break;i.type=n.uint32();continue;case 2:if(o!==18)break;i.category=n.string();continue;case 3:if(o!==26)break;i.sender=n.string();continue;case 4:if(o!==34)break;i.recipients.push(n.string());continue;case 5:if(o!==42)break;i.data=n.bytes();continue;case 6:if(o!==50)break;i.salt=n.bytes();continue;case 7:if(o!==58)break;i.apiToken=n.bytes();continue;case 8:if(o!==66)break;i.signature=n.bytes();continue;case 9:if(o!==74)break;i.fee=n.string();continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{type:Oo(e.type)?globalThis.Number(e.type):0,category:Oo(e.category)?globalThis.String(e.category):"",sender:Oo(e.sender)?globalThis.String(e.sender):"",recipients:globalThis.Array.isArray(e==null?void 0:e.recipients)?e.recipients.map(t=>globalThis.String(t)):[],data:Oo(e.data)?Xd(e.data):new Uint8Array(0),salt:Oo(e.salt)?Xd(e.salt):new Uint8Array(0),apiToken:Oo(e.apiToken)?Xd(e.apiToken):new Uint8Array(0),signature:Oo(e.signature)?Xd(e.signature):new Uint8Array(0),fee:Oo(e.fee)?globalThis.String(e.fee):""}},toJSON(e){var n;const t={};return e.type!==0&&(t.type=Math.round(e.type)),e.category!==""&&(t.category=e.category),e.sender!==""&&(t.sender=e.sender),(n=e.recipients)!=null&&n.length&&(t.recipients=e.recipients),e.data.length!==0&&(t.data=Yd(e.data)),e.salt.length!==0&&(t.salt=Yd(e.salt)),e.apiToken.length!==0&&(t.apiToken=Yd(e.apiToken)),e.signature.length!==0&&(t.signature=Yd(e.signature)),e.fee!==""&&(t.fee=e.fee),t},create(e){return wu.fromPartial(e??{})},fromPartial(e){var n;const t=z6();return t.type=e.type??0,t.category=e.category??"",t.sender=e.sender??"",t.recipients=((n=e.recipients)==null?void 0:n.map(r=>r))||[],t.data=e.data??new Uint8Array(0),t.salt=e.salt??new Uint8Array(0),t.apiToken=e.apiToken??new Uint8Array(0),t.signature=e.signature??new Uint8Array(0),t.fee=e.fee??"",t}};function Xd(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),n=new Uint8Array(t.length);for(let r=0;r{t.push(globalThis.String.fromCharCode(n))}),globalThis.btoa(t.join(""))}}function Oo(e){return e!=null}const cM=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function uM(e){return typeof e=="string"&&cM.test(e)}function fM(e){if(!uM(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}var cn=[];for(var qm=0;qm<256;++qm)cn.push((qm+256).toString(16).slice(1));function dM(e,t=0){return(cn[e[t+0]]+cn[e[t+1]]+cn[e[t+2]]+cn[e[t+3]]+"-"+cn[e[t+4]]+cn[e[t+5]]+"-"+cn[e[t+6]]+cn[e[t+7]]+"-"+cn[e[t+8]]+cn[e[t+9]]+"-"+cn[e[t+10]]+cn[e[t+11]]+cn[e[t+12]]+cn[e[t+13]]+cn[e[t+14]]+cn[e[t+15]]).toLowerCase()}var Qd,hM=new Uint8Array(16);function pM(){if(!Qd&&(Qd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qd(hM)}var mM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const W6={randomUUID:mM};function gM(e,t,n){if(W6.randomUUID&&!t&&!e)return W6.randomUUID();e=e||{};var r=e.random||(e.rng||pM)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,dM(r)}var Qs=(e=>(e.INIT_DID="INIT_DID",e.INIT_SESSION_KEY="INIT_SESSION_KEY",e))(Qs||{});function V6(){return{did:"",masterPubKey:"",derivedKeyIndex:0,derivedPubKey:"",walletToEncDerivedKey:{}}}const xh={encode(e,t=new A0){return e.did!==""&&t.uint32(10).string(e.did),e.masterPubKey!==""&&t.uint32(18).string(e.masterPubKey),e.derivedKeyIndex!==0&&t.uint32(24).uint32(e.derivedKeyIndex),e.derivedPubKey!==""&&t.uint32(34).string(e.derivedPubKey),Object.entries(e.walletToEncDerivedKey).forEach(([n,r])=>{Z1.encode({key:n,value:r},t.uint32(50).fork()).join()}),t},decode(e,t){const n=e instanceof hs?e:new hs(e);let r=t===void 0?n.len:n.pos+t;const i=V6();for(;n.pos>>3){case 1:if(o!==10)break;i.did=n.string();continue;case 2:if(o!==18)break;i.masterPubKey=n.string();continue;case 3:if(o!==24)break;i.derivedKeyIndex=n.uint32();continue;case 4:if(o!==34)break;i.derivedPubKey=n.string();continue;case 6:if(o!==50)break;const s=Z1.decode(n,n.uint32());s.value!==void 0&&(i.walletToEncDerivedKey[s.key]=s.value);continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{did:dl(e.did)?globalThis.String(e.did):"",masterPubKey:dl(e.masterPubKey)?globalThis.String(e.masterPubKey):"",derivedKeyIndex:dl(e.derivedKeyIndex)?globalThis.Number(e.derivedKeyIndex):0,derivedPubKey:dl(e.derivedPubKey)?globalThis.String(e.derivedPubKey):"",walletToEncDerivedKey:yM(e.walletToEncDerivedKey)?Object.entries(e.walletToEncDerivedKey).reduce((t,[n,r])=>(t[n]=String(r),t),{}):{}}},toJSON(e){const t={};if(e.did!==""&&(t.did=e.did),e.masterPubKey!==""&&(t.masterPubKey=e.masterPubKey),e.derivedKeyIndex!==0&&(t.derivedKeyIndex=Math.round(e.derivedKeyIndex)),e.derivedPubKey!==""&&(t.derivedPubKey=e.derivedPubKey),e.walletToEncDerivedKey){const n=Object.entries(e.walletToEncDerivedKey);n.length>0&&(t.walletToEncDerivedKey={},n.forEach(([r,i])=>{t.walletToEncDerivedKey[r]=i}))}return t},create(e){return xh.fromPartial(e??{})},fromPartial(e){const t=V6();return t.did=e.did??"",t.masterPubKey=e.masterPubKey??"",t.derivedKeyIndex=e.derivedKeyIndex??0,t.derivedPubKey=e.derivedPubKey??"",t.walletToEncDerivedKey=Object.entries(e.walletToEncDerivedKey??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=globalThis.String(i)),n),{}),t}};function q6(){return{key:"",value:""}}const Z1={encode(e,t=new A0){return e.key!==""&&t.uint32(10).string(e.key),e.value!==""&&t.uint32(18).string(e.value),t},decode(e,t){const n=e instanceof hs?e:new hs(e);let r=t===void 0?n.len:n.pos+t;const i=q6();for(;n.pos>>3){case 1:if(o!==10)break;i.key=n.string();continue;case 2:if(o!==18)break;i.value=n.string();continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{key:dl(e.key)?globalThis.String(e.key):"",value:dl(e.value)?globalThis.String(e.value):""}},toJSON(e){const t={};return e.key!==""&&(t.key=e.key),e.value!==""&&(t.value=e.value),t},create(e){return Z1.fromPartial(e??{})},fromPartial(e){const t=q6();return t.key=e.key??"",t.value=e.value??"",t}};function yM(e){return typeof e=="object"&&e!==null}function dl(e){return e!=null}function bM(e){switch(e){case 0:case"PUBLISH_KEY":return 0;case 1:case"REVOKE_KEY":return 1;case-1:case"UNRECOGNIZED":default:return-1}}function vM(e){switch(e){case 0:return"PUBLISH_KEY";case 1:return"REVOKE_KEY";case-1:default:return"UNRECOGNIZED"}}function G6(){return{keyIndex:0,keyAddress:"",action:0}}const Eh={encode(e,t=new A0){return e.keyIndex!==0&&t.uint32(8).int32(e.keyIndex),e.keyAddress!==""&&t.uint32(18).string(e.keyAddress),e.action!==0&&t.uint32(24).int32(e.action),t},decode(e,t){const n=e instanceof hs?e:new hs(e);let r=t===void 0?n.len:n.pos+t;const i=G6();for(;n.pos>>3){case 1:if(o!==8)break;i.keyIndex=n.int32();continue;case 2:if(o!==18)break;i.keyAddress=n.string();continue;case 3:if(o!==24)break;i.action=n.int32();continue}if((o&7)===4||o===0)break;n.skip(o&7)}return i},fromJSON(e){return{keyIndex:Gm(e.keyIndex)?globalThis.Number(e.keyIndex):0,keyAddress:Gm(e.keyAddress)?globalThis.String(e.keyAddress):"",action:Gm(e.action)?bM(e.action):0}},toJSON(e){const t={};return e.keyIndex!==0&&(t.keyIndex=Math.round(e.keyIndex)),e.keyAddress!==""&&(t.keyAddress=e.keyAddress),e.action!==0&&(t.action=vM(e.action)),t},create(e){return Eh.fromPartial(e??{})},fromPartial(e){const t=G6();return t.keyIndex=e.keyIndex??0,t.keyAddress=e.keyAddress??"",t.action=e.action??0,t}};function Gm(e){return e!=null}const[wM,_M]=Me.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ro=new Uint32Array(80),Lo=new Uint32Array(80);class xM extends Xb{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:n,Bh:r,Bl:i,Ch:o,Cl:s,Dh:a,Dl:l,Eh:u,El:d,Fh:c,Fl:f,Gh:m,Gl:p,Hh:h,Hl:y}=this;return[t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y]}set(t,n,r,i,o,s,a,l,u,d,c,f,m,p,h,y){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=s|0,this.Dh=a|0,this.Dl=l|0,this.Eh=u|0,this.El=d|0,this.Fh=c|0,this.Fl=f|0,this.Gh=m|0,this.Gl=p|0,this.Hh=h|0,this.Hl=y|0}process(t,n){for(let v=0;v<16;v++,n+=4)Ro[v]=t.getUint32(n),Lo[v]=t.getUint32(n+=4);for(let v=16;v<80;v++){const w=Ro[v-15]|0,E=Lo[v-15]|0,C=Me.rotrSH(w,E,1)^Me.rotrSH(w,E,8)^Me.shrSH(w,E,7),k=Me.rotrSL(w,E,1)^Me.rotrSL(w,E,8)^Me.shrSL(w,E,7),_=Ro[v-2]|0,S=Lo[v-2]|0,A=Me.rotrSH(_,S,19)^Me.rotrBH(_,S,61)^Me.shrSH(_,S,6),I=Me.rotrSL(_,S,19)^Me.rotrBL(_,S,61)^Me.shrSL(_,S,6),L=Me.add4L(k,I,Lo[v-7],Lo[v-16]),F=Me.add4H(L,C,A,Ro[v-7],Ro[v-16]);Ro[v]=F|0,Lo[v]=L|0}let{Ah:r,Al:i,Bh:o,Bl:s,Ch:a,Cl:l,Dh:u,Dl:d,Eh:c,El:f,Fh:m,Fl:p,Gh:h,Gl:y,Hh:g,Hl:b}=this;for(let v=0;v<80;v++){const w=Me.rotrSH(c,f,14)^Me.rotrSH(c,f,18)^Me.rotrBH(c,f,41),E=Me.rotrSL(c,f,14)^Me.rotrSL(c,f,18)^Me.rotrBL(c,f,41),C=c&m^~c&h,k=f&p^~f&y,_=Me.add5L(b,E,k,_M[v],Lo[v]),S=Me.add5H(_,g,w,C,wM[v],Ro[v]),A=_|0,I=Me.rotrSH(r,i,28)^Me.rotrBH(r,i,34)^Me.rotrBH(r,i,39),L=Me.rotrSL(r,i,28)^Me.rotrBL(r,i,34)^Me.rotrBL(r,i,39),F=r&o^r&a^o&a,N=i&s^i&l^s&l;g=h|0,b=y|0,h=m|0,y=p|0,m=c|0,p=f|0,{h:c,l:f}=Me.add(u|0,d|0,S|0,A|0),u=a|0,d=l|0,a=o|0,l=s|0,o=r|0,s=i|0;const R=Me.add3L(A,L,N);r=Me.add3H(R,S,I,F),i=R|0}({h:r,l:i}=Me.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:s}=Me.add(this.Bh|0,this.Bl|0,o|0,s|0),{h:a,l}=Me.add(this.Ch|0,this.Cl|0,a|0,l|0),{h:u,l:d}=Me.add(this.Dh|0,this.Dl|0,u|0,d|0),{h:c,l:f}=Me.add(this.Eh|0,this.El|0,c|0,f|0),{h:m,l:p}=Me.add(this.Fh|0,this.Fl|0,m|0,p|0),{h,l:y}=Me.add(this.Gh|0,this.Gl|0,h|0,y|0),{h:g,l:b}=Me.add(this.Hh|0,this.Hl|0,g|0,b|0),this.set(r,i,o,s,a,l,u,d,c,f,m,p,h,y,g,b)}roundClean(){Ro.fill(0),Lo.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const K6=u0(()=>new xM);/*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */const Jd=Mn.ProjectivePoint,Km=ex(y0);function Z6(e){return BigInt(`0x${CO(e)}`)}function EM(e){return AO(e.toString(16).padStart(64,"0"))}const SM=f8("Bitcoin seed"),Zm={private:76066276,public:76067358},Xm=2147483648,kM=e=>kB(y0(e)),CM=e=>xl(e).getUint32(0,!1),eh=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error(`Invalid number=${e}. Should be from 0 to 2 ** 32 - 1`);const t=new Uint8Array(4);return xl(t).setUint32(0,e,!1),t};class qs{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return CM(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){const t=this.privateKey;if(!t)throw new Error("No private key");return Km.encode(this.serialize(this.versions.private,vu(new Uint8Array([0]),t)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return Km.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(t,n=Zm){if(Hr(t),8*t.length<128||8*t.length>512)throw new Error(`HDKey: wrong seed length=${t.length}. Should be between 128 and 512 bits; 256 bits is advised)`);const r=dp(K6,SM,t);return new qs({versions:n,chainCode:r.slice(32),privateKey:r.slice(0,32)})}static fromExtendedKey(t,n=Zm){const r=Km.decode(t),i=xl(r),o=i.getUint32(0,!1),s={versions:n,depth:r[4],parentFingerprint:i.getUint32(5,!1),index:i.getUint32(9,!1),chainCode:r.slice(13,45)},a=r.slice(45),l=a[0]===0;if(o!==n[l?"private":"public"])throw new Error("Version mismatch");return l?new qs({...s,privateKey:a.slice(1)}):new qs({...s,publicKey:a})}static fromJSON(t){return qs.fromExtendedKey(t.xpriv)}constructor(t){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!t||typeof t!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=t.versions||Zm,this.depth=t.depth||0,this.chainCode=t.chainCode||null,this.index=t.index||0,this.parentFingerprint=t.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(t.publicKey&&t.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(t.privateKey){if(!Mn.utils.isValidPrivateKey(t.privateKey))throw new Error("Invalid private key");this.privKey=typeof t.privateKey=="bigint"?t.privateKey:Z6(t.privateKey),this.privKeyBytes=EM(this.privKey),this.pubKey=Mn.getPublicKey(t.privateKey,!0)}else if(t.publicKey)this.pubKey=Jd.fromHex(t.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=kM(this.pubKey)}derive(t){if(!/^[mM]'?/.test(t))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(t))return this;const n=t.replace(/^[mM]'?\//,"").split("/");let r=this;for(const i of n){const o=/^(\d+)('?)$/.exec(i),s=o&&o[1];if(!o||o.length!==3||typeof s!="string")throw new Error(`Invalid child index: ${i}`);let a=+s;if(!Number.isSafeInteger(a)||a>=Xm)throw new Error("Invalid index");o[2]==="'"&&(a+=Xm),r=r.deriveChild(a)}return r}deriveChild(t){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let n=eh(t);if(t>=Xm){const a=this.privateKey;if(!a)throw new Error("Could not derive hardened child key");n=vu(new Uint8Array([0]),a,n)}else n=vu(this.pubKey,n);const r=dp(K6,this.chainCode,n),i=Z6(r.slice(0,32)),o=r.slice(32);if(!Mn.utils.isValidPrivateKey(i))throw new Error("Tweak bigger than curve order");const s={versions:this.versions,chainCode:o,depth:this.depth+1,parentFingerprint:this.fingerprint,index:t};try{if(this.privateKey){const a=In(this.privKey+i,Mn.CURVE.n);if(!Mn.utils.isValidPrivateKey(a))throw new Error("The tweak was out of range or the resulted private key is invalid");s.privateKey=a}else{const a=Jd.fromHex(this.pubKey).add(Jd.fromPrivateKey(i));if(a.equals(Jd.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");s.publicKey=a.toRawBytes(!0)}return new qs(s)}catch{return this.deriveChild(t+1)}}sign(t){if(!this.privateKey)throw new Error("No privateKey set!");return Hr(t,32),Mn.sign(t,this.privKey).toCompactRawBytes()}verify(t,n){if(Hr(t,32),Hr(n,64),!this.publicKey)throw new Error("No publicKey set!");let r;try{r=Mn.Signature.fromCompact(n)}catch{return!1}return Mn.verify(r,t,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(t,n){if(!this.chainCode)throw new Error("No chainCode set");return Hr(n,33),vu(eh(t),new Uint8Array([this.depth]),eh(this.parentFingerprint),eh(this.index),this.chainCode,n)}}function AM(e){if(typeof e=="string"){if(!on(e,{strict:!1}))throw new Pn({address:e});return{address:e,type:"json-rpc"}}if(!on(e.address,{strict:!1}))throw new Pn({address:e.address});return{address:e.address,nonceManager:e.nonceManager,sign:e.sign,experimental_signAuthorization:e.experimental_signAuthorization,signMessage:e.signMessage,signTransaction:e.signTransaction,signTypedData:e.signTypedData,source:"custom",type:"local"}}async function hd({hash:e,privateKey:t,to:n="object"}){const{r,s:i,recovery:o}=Mn.sign(e.slice(2),t.slice(2)),s={r:Ae(r,{size:32}),s:Ae(i,{size:32}),v:o?28n:27n,yParity:o};return n==="bytes"||n==="hex"?NE({...s,to:n}):s}async function TM(e){const{contractAddress:t,chainId:n,nonce:r,privateKey:i,to:o="object"}=e,s=await hd({hash:R8({contractAddress:t,chainId:n,nonce:r}),privateKey:i,to:o});return o==="object"?{contractAddress:t,chainId:n,nonce:r,...s}:s}async function IM({message:e,privateKey:t}){return await hd({hash:dv(e),privateKey:t,to:"hex"})}async function $M(e){const{privateKey:t,transaction:n,serializer:r=BB}=e,i=n.type==="eip4844"?{...n,sidecars:!1}:n,o=await hd({hash:zt(r(i)),privateKey:t});return r(n,o)}async function PM(e){const{privateKey:t,...n}=e;return await hd({hash:gE(n),privateKey:t,to:"hex"})}function HE(e,t={}){const{nonceManager:n}=t,r=Te(Mn.getPublicKey(e.slice(2),!1)),i=I8(r);return{...AM({address:i,nonceManager:n,async sign({hash:s}){return hd({hash:s,privateKey:e,to:"hex"})},async experimental_signAuthorization(s){return TM({...s,privateKey:e})},async signMessage({message:s}){return IM({message:s,privateKey:e})},async signTransaction(s,{serializer:a}={}){return $M({privateKey:e,transaction:s,serializer:a})},async signTypedData(s){return PM({...s,privateKey:e})}}),publicKey:r,source:"privateKey"}}function OM(e,{accountIndex:t=0,addressIndex:n=0,changeIndex:r=0,path:i,...o}={}){const s=e.derive(i||`m/44'/60'/${t}'/${r}/${n}`);return{...HE(Te(s.privateKey),o),getHdKey:()=>s,source:"hd"}}function th(e,t={}){const n=PT(e);return OM(qs.fromMasterSeed(n),t)}const Rr=class Rr{constructor(t){Se(this,"createUnsigned",(t,n,r)=>wu.create({type:0,category:t,recipients:n,data:r,salt:fM(gM()),fee:"0"}));Se(this,"get",async(t=Math.floor(Date.now()/1e3),n="ASC",r=30,i=1,o)=>await this.validator.call("push_getTransactions",[t,n,r,i,o]));Se(this,"search",async t=>await this.validator.call("push_getTransactionByHash",[t]));Se(this,"send",async(t,n)=>{const r=await this.validator.call("push_getApiToken");let i;if(n){const o=Rr.serialize({...t,sender:n.sender,signature:new Uint8Array(0),apiToken:new Uint8Array(Buffer.from(r.apiToken,"base64"))}),a=await HE(n.privKey).signMessage({message:{raw:o}});i=Rr.serialize({...t,sender:n.sender,signature:Sr(a),apiToken:mb(Buffer.from(r.apiToken,"base64").toString("utf-8"))})}else i=Rr.serialize(t);return await this.validator.call("push_sendTransaction",[nr(i)],r.apiUrl)});this.validator=t}};Se(Rr,"initialize",async t=>{const n=await Pf.initalize({env:t});return new Rr(n)}),Se(Rr,"serialize",t=>{const n=wu.create(t);return wu.encode(n).finish()}),Se(Rr,"deserialize",t=>wu.decode(t)),Se(Rr,"serializeData",(t,n)=>{switch(n){case Qs.INIT_DID:{const r=t,i=xh.create(r);return xh.encode(i).finish()}case Qs.INIT_SESSION_KEY:{const r=t,i=Eh.create(r);return Eh.encode(i).finish()}default:throw new Error("Serialization Not Supported for given TxCateory")}}),Se(Rr,"deserializeData",(t,n)=>{switch(n){case Qs.INIT_DID:return xh.decode(t);case Qs.INIT_SESSION_KEY:return Eh.decode(t);default:throw new Error("Deserialization Not Supported for given TxCateory")}});let hp=Rr;var Of={};Object.defineProperty(Of,"__esModule",{value:!0});var _u=Of.bech32m=Of.bech32=void 0;const pp="qpzry9x8gf2tvdw0s3jn54khce6mua7l",zE={};for(let e=0;e>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function X6(e){let t=1;for(let n=0;n126)return"Invalid prefix ("+e+")";t=kl(t)^r>>5}t=kl(t);for(let n=0;n=n;)o-=n,a.push(i>>o&s);if(r)o>0&&a.push(i<=t)return"Excess padding";if(i<l)throw new TypeError("Exceeds length limit");s=s.toLowerCase();let u=X6(s);if(typeof u=="string")throw new Error(u);let d=s+"1";for(let c=0;c>5)throw new Error("Non 5-bit word");u=kl(u)^f,d+=pp.charAt(f)}for(let c=0;c<6;++c)u=kl(u);u^=t;for(let c=0;c<6;++c){const f=u>>(5-c)*5&31;d+=pp.charAt(f)}return d}function r(s,a){if(a=a||90,s.length<8)return s+" too short";if(s.length>a)return"Exceeds length limit";const l=s.toLowerCase(),u=s.toUpperCase();if(s!==l&&s!==u)return"Mixed-case string "+s;s=l;const d=s.lastIndexOf("1");if(d===-1)return"No separator character for "+s;if(d===0)return"Missing prefix for "+s;const c=s.slice(0,d),f=s.slice(d+1);if(f.length<6)return"Data too short";let m=X6(c);if(typeof m=="string")return m;const p=[];for(let h=0;h=f.length)&&p.push(g)}return m!==t?"Invalid checksum for "+s:{prefix:c,words:p}}function i(s,a){const l=r(s,a);if(typeof l=="object")return l}function o(s,a){const l=r(s,a);if(typeof l=="object")return l;throw new Error(l)}return{decodeUnsafe:i,decode:o,encode:n,toWords:RM,fromWordsUnsafe:LM,fromWords:BM}}Of.bech32=WE("bech32");_u=Of.bech32m=WE("bech32m");var Sh=(e=>(e.DEVNET="devnet",e.TESTNET="testnet",e.MAINNET="mainnet",e))(Sh||{});const NM="push";class Js{}Se(Js,"evmToPush",t=>{try{const n=_u.toWords(Hs(fp(t).slice(2)));return _u.encode(NM,n)}catch{throw new Error("Invalid EVM address")}}),Se(Js,"pushToEvm",t=>{try{const n=_u.decode(t),r=new Uint8Array(_u.fromWords(n.words));return fp(`0x${nr(r)}`)}catch{throw new Error("Invalid Push address")}}),Se(Js,"toPushCAIP",(t,n=zr.STAGING)=>{let r;switch(n){case zr.LOCAL:case zr.DEV:{r=Sh.DEVNET;break}case zr.STAGING:{r=Sh.TESTNET;break}case zr.PROD:{r=Sh.MAINNET;break}default:throw Error("Invalid ENV")}return`push:${r}:${t}`});const Uu=class Uu{};Se(Uu,"initialize",async t=>Uu.convertViemWalletClient(t)),Se(Uu,"convertViemWalletClient",async t=>{try{const n=await t.account;if(!n)throw new Error("WalletClient Account Undefined");const r=await t.getChainId(),i=async o=>await t.signMessage({message:o,account:n});return{account:`eip155:${r}:${n.address}`,signMessage:i}}catch{throw new Error("Invalid WalletClient")}});let Nu=Uu;var xu=(e=>(e.V1="x25519-xsalsa20-poly1305",e.V2="aes256GcmHkdfSha256",e.V3="eip191-aes256-gcm-hkdf-sha256",e.V4="pgpv1:nft",e.V5="push:v5",e))(xu||{});const pl=class pl{constructor(t){Se(this,"hkdf",async(t,n)=>{const r=await crypto.subtle.importKey("raw",t,"HKDF",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:n,info:new ArrayBuffer(0)},r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"])});Se(this,"aesGcmEncryption",async(t,n,r)=>{const s=crypto.getRandomValues(new Uint8Array(32)),a=crypto.getRandomValues(new Uint8Array(12)),l=await this.hkdf(n,s),u={name:"AES-GCM",iv:a};r&&(u.additionalData=r);const d=await crypto.subtle.encrypt(u,l,t);return{ciphertext:nr(new Uint8Array(d)),salt:nr(s),nonce:nr(a)}});Se(this,"aesGcmDecryption",async(t,n,r)=>{const i=await this.hkdf(n,Hs(t.salt)),o={name:"AES-GCM",iv:Hs(t.nonce)};r&&(o.additionalData=r);const s=await crypto.subtle.decrypt(o,i,Hs(t.ciphertext));return new Uint8Array(s)});Se(this,"encryptV5",async t=>{const n=nr(await crypto.getRandomValues(new Uint8Array(32))),r=`Enable Push Network Profile `+n,i=await this.signer.signMessage(r),s=new TextEncoder().encode(t);return{...await this.aesGcmEncryption(s,Hs(i.slice(2))),version:xu.V5,preKey:n}});Se(this,"decryptV5",async t=>{const n=`Enable Push Network Profile -`+t.preKey,r=await this.signer.signMessage(n),i=await this.aesGcmDecryption(t,Hs(r.slice(2)));return new TextDecoder().decode(i)});this.signer=t}};Se(hl,"encrypt",async(t,n,r=xu.V5)=>{const i=new hl(n);switch(r){case xu.V5:return await i.encryptV5(t);default:throw new Error("Invalid Key Encryption")}}),Se(hl,"decrypt",async(t,n)=>{const r=new hl(n);switch(t.version){case xu.V5:return r.decryptV5(t);default:throw new Error("Invalid Key Encryption")}});let Mu=hl;var Vo=(e=>(e.PROD="prod",e.STAGING="staging",e.DEV="dev",e.LOCAL="local",e))(Vo||{});const Xe=class Xe{constructor(t,n,r,i=void 0){Se(this,"appConnections");Se(this,"connectWalletWithAccount",async t=>{if(!Xe.unRegisteredProfile)throw Error("Only Allowed for Unregistered Profile");const n=await Nu.initialize(t),r=await Mu.encrypt(this.derivedHDNode.privateExtendedKey,n);Xe.walletToEncDerivedKey[n.account]=JSON.stringify(r)});Se(this,"registerPushAccount",async(t=Vo.STAGING)=>{if(!Xe.unRegisteredProfile)throw Error("Only Allowed for Unregistered Profile");const n=await bm(this.mnemonic),r=iu.fromMasterSeed(n),i={did:nr(ra(r.publicKey)),masterPubKey:nr(r.publicKey),derivedKeyIndex:this.derivedHDNode.index,derivedPubKey:nr(this.derivedHDNode.publicKey),walletToEncDerivedKey:Xe.walletToEncDerivedKey},o=await hp.initialize(t),s=o.createUnsigned(Qs.INIT_DID,[],hp.serializeData(i,Qs.INIT_DID)),a=th(this.mnemonic);await o.send(s,{sender:Js.toPushCAIP(a.address),privKey:`0x${nr(this.derivedHDNode.privateKey)}`}),Xe.walletToEncDerivedKey={},Xe.unRegisteredProfile=!1});Se(this,"sign",(t,n)=>{if(!this.appConnections.find(o=>o.origin===n))throw Error("App not Connected");const i=ra(t);return this.derivedHDNode.sign(i)});Se(this,"ConnectionStatus",t=>{const n=this.appConnections.find(r=>r.origin===t);return n?{isConnected:!n.isPending,isPending:n.isPending}:{isConnected:!1,isPending:!1}});Se(this,"requestToConnect",t=>{this.appConnections.find(r=>r.origin===t)||this.appConnections.push({origin:t,isPending:!0})});Se(this,"acceptConnectionReq",t=>{const n=this.appConnections.find(r=>r.origin===t);n&&(n.isPending=!1)});Se(this,"rejectConnectionReq",t=>{this.appConnections=this.appConnections.filter(n=>n.origin!==t)});Se(this,"generateRandomSessionKey",()=>{var r,i;let t=this.derivedHDNode;const n=9;for(let o=0;o{const n=this.generateRandomSessionKey();console.log(t,n)});Se(this,"revokeSessionKey",t=>{console.log(t)});this.did=t,this.account=n,this.derivedHDNode=r,this.mnemonic=i,this.appConnections=[]}};Se(Xe,"rootPath","m/44'/60'/0'"),Se(Xe,"pushValidator"),Se(Xe,"unRegisteredProfile",!1),Se(Xe,"walletToEncDerivedKey",{}),Se(Xe,"signUp",async()=>{Xe.unRegisteredProfile=!0;const t=await Xe.generatePushAccount();return new Xe(t.did,Js.toPushCAIP(th(t.mnemonic).address),t.derivedHDNode,t.mnemonic)}),Se(Xe,"logInWithMnemonic",async(t,n=Vo.STAGING)=>{Xe.pushValidator=await Pf.initalize({env:n});const r=Js.toPushCAIP(th(t).address),i=await Xe.getPushAccount(r);if(i==null)throw Error("Push Account Not Found!");{const o=await Xe.decryptPushAccount(i,void 0,t);return new Xe(o.did,r,o.derivedHDNode,o.mnemonic)}}),Se(Xe,"loginWithWallet",async(t,n=Vo.STAGING)=>{Xe.pushValidator=await Pf.initalize({env:n});const r=await Nu.initialize(t),i=await Xe.getPushAccount(r.account);if(i==null)throw Error("Push Account Not Found!");{const o=await Xe.decryptPushAccount(i,r);return new Xe(o.did,r.account,o.derivedHDNode,o.mnemonic)}}),Se(Xe,"loginWithSocial",async()=>{}),Se(Xe,"getPushAccount",async t=>null),Se(Xe,"generateDerivedKey",async(t,n=0)=>{const r=await bm(t),o=iu.fromMasterSeed(r).derive(`${Xe.rootPath}/0'/${n}'`);return{privateExtendedKey:o.privateExtendedKey,publicKey:nr(o.publicKey),index:o.index}}),Se(Xe,"generatePushAccount",async()=>{const t=AT(OT),n=await bm(t),r=iu.fromMasterSeed(n),i=await Xe.generateDerivedKey(t),o=th(t),s=jE({account:o,chain:vv,transport:cE()}),a=await Nu.initialize(s),l=await Mu.encrypt(i.privateExtendedKey,a);return Xe.walletToEncDerivedKey[Js.toPushCAIP(o.address)]=JSON.stringify(l),{did:nr(ra(r.publicKey)),mnemonic:t,derivedHDNode:iu.fromExtendedKey(i.privateExtendedKey)}}),Se(Xe,"decryptPushAccount",async(t,n=void 0,r=void 0)=>{let i;if(r)i=(await Xe.generateDerivedKey(r,t.derivedKeyIndex)).privateExtendedKey;else if(n)i=await Mu.decrypt(JSON.parse(t.encDerivedPrivKey),n);else throw Error("Unable to Decrypt Push Account without Signer or Mnemonic!");const o=iu.fromExtendedKey(i);return{did:t.did,derivedHDNode:o,mnemonic:r}});let Rf=Xe;const MM={},jM={APP_NAME:"Push Local Wallet",NODE_ENV:"local",APP_ENV:"local",ALLOWED_NETWORKS:[11155111,80002,97,11155420,2442,421614,123,111557560],DEFAULT_CHAIN:11155111},DM={APP_NAME:"Push Devnet Wallet",NODE_ENV:"dev",APP_ENV:"dev",ALLOWED_NETWORKS:[11155111,80002,97,11155420,2442,421614,123,111557560],DEFAULT_CHAIN:11155111},X6={APP_NAME:"Push Testnet Wallet",NODE_ENV:"staging",APP_ENV:"staging",ALLOWED_NETWORKS:[11155111,80002,97,11155420,2442,421614,123,111557560],DEFAULT_CHAIN:11155111},FM={APP_NAME:"Push Wallet",NODE_ENV:"prod",APP_ENV:"prod",ALLOWED_NETWORKS:[1,137,56,10,42161,1101,122,7560],DEFAULT_CHAIN:1},UM="dev";let Ga;switch(UM){case Vo.LOCAL:{Ga=jM;break}case Vo.DEV:{Ga=DM;break}case Vo.STAGING:{Ga=X6;break}case Vo.PROD:{Ga=FM;break}default:Ga=X6}const ps={...Ga,...MM};var X1=function(e,t){return X1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},X1(e,t)};function Kr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");X1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ot=function(){return ot=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ms(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function pi(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r1||l(m,h)})},p&&(i[m]=p(i[m])))}function l(m,p){try{u(r[m](p))}catch(h){f(o[0][3],h)}}function u(m){m.value instanceof kl?Promise.resolve(m.value.v).then(d,c):f(o[0][2],m)}function d(m){l("next",m)}function c(m){l("throw",m)}function f(m,p){m(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}function WM(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Gl=="function"?Gl(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){s=e[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(u){o({value:u,done:a})},s)}}function lt(e){return typeof e=="function"}function xv(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ym=xv(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription: +`+t.preKey,r=await this.signer.signMessage(n),i=await this.aesGcmDecryption(t,Hs(r.slice(2)));return new TextDecoder().decode(i)});this.signer=t}};Se(pl,"encrypt",async(t,n,r=xu.V5)=>{const i=new pl(n);switch(r){case xu.V5:return await i.encryptV5(t);default:throw new Error("Invalid Key Encryption")}}),Se(pl,"decrypt",async(t,n)=>{const r=new pl(n);switch(t.version){case xu.V5:return r.decryptV5(t);default:throw new Error("Invalid Key Encryption")}});let Mu=pl;var Vo=(e=>(e.PROD="prod",e.STAGING="staging",e.DEV="dev",e.LOCAL="local",e))(Vo||{});const Xe=class Xe{constructor(t,n,r,i=void 0){Se(this,"appConnections");Se(this,"connectWalletWithAccount",async t=>{if(!Xe.unRegisteredProfile)throw Error("Only Allowed for Unregistered Profile");const n=await Nu.initialize(t),r=await Mu.encrypt(this.derivedHDNode.privateExtendedKey,n);Xe.walletToEncDerivedKey[n.account]=JSON.stringify(r)});Se(this,"registerPushAccount",async(t=Vo.STAGING)=>{if(!Xe.unRegisteredProfile)throw Error("Only Allowed for Unregistered Profile");const n=await bm(this.mnemonic),r=iu.fromMasterSeed(n),i={did:nr(ra(r.publicKey)),masterPubKey:nr(r.publicKey),derivedKeyIndex:this.derivedHDNode.index,derivedPubKey:nr(this.derivedHDNode.publicKey),walletToEncDerivedKey:Xe.walletToEncDerivedKey},o=await hp.initialize(t),s=o.createUnsigned(Qs.INIT_DID,[],hp.serializeData(i,Qs.INIT_DID)),a=th(this.mnemonic);await o.send(s,{sender:Js.toPushCAIP(a.address),privKey:`0x${nr(this.derivedHDNode.privateKey)}`}),Xe.walletToEncDerivedKey={},Xe.unRegisteredProfile=!1});Se(this,"sign",(t,n)=>{if(!this.appConnections.find(o=>o.origin===n))throw Error("App not Connected");const i=ra(t);return this.derivedHDNode.sign(i)});Se(this,"ConnectionStatus",t=>{const n=this.appConnections.find(r=>r.origin===t);return n?{isConnected:!n.isPending,isPending:n.isPending}:{isConnected:!1,isPending:!1}});Se(this,"requestToConnect",t=>{this.appConnections.find(r=>r.origin===t)||this.appConnections.push({origin:t,isPending:!0})});Se(this,"acceptConnectionReq",t=>{const n=this.appConnections.find(r=>r.origin===t);n&&(n.isPending=!1)});Se(this,"rejectConnectionReq",t=>{this.appConnections=this.appConnections.filter(n=>n.origin!==t)});Se(this,"generateRandomSessionKey",()=>{var r,i;let t=this.derivedHDNode;const n=9;for(let o=0;o{const n=this.generateRandomSessionKey();console.log(t,n)});Se(this,"revokeSessionKey",t=>{console.log(t)});this.did=t,this.account=n,this.derivedHDNode=r,this.mnemonic=i,this.appConnections=[]}};Se(Xe,"rootPath","m/44'/60'/0'"),Se(Xe,"pushValidator"),Se(Xe,"unRegisteredProfile",!1),Se(Xe,"walletToEncDerivedKey",{}),Se(Xe,"signUp",async()=>{Xe.unRegisteredProfile=!0;const t=await Xe.generatePushAccount();return new Xe(t.did,Js.toPushCAIP(th(t.mnemonic).address),t.derivedHDNode,t.mnemonic)}),Se(Xe,"logInWithMnemonic",async(t,n=Vo.STAGING)=>{Xe.pushValidator=await Pf.initalize({env:n});const r=Js.toPushCAIP(th(t).address),i=await Xe.getPushAccount(r);if(i==null)throw Error("Push Account Not Found!");{const o=await Xe.decryptPushAccount(i,void 0,t);return new Xe(o.did,r,o.derivedHDNode,o.mnemonic)}}),Se(Xe,"loginWithWallet",async(t,n=Vo.STAGING)=>{Xe.pushValidator=await Pf.initalize({env:n});const r=await Nu.initialize(t),i=await Xe.getPushAccount(r.account);if(i==null)throw Error("Push Account Not Found!");{const o=await Xe.decryptPushAccount(i,r);return new Xe(o.did,r.account,o.derivedHDNode,o.mnemonic)}}),Se(Xe,"loginWithSocial",async()=>{}),Se(Xe,"getPushAccount",async t=>null),Se(Xe,"generateDerivedKey",async(t,n=0)=>{const r=await bm(t),o=iu.fromMasterSeed(r).derive(`${Xe.rootPath}/0'/${n}'`);return{privateExtendedKey:o.privateExtendedKey,publicKey:nr(o.publicKey),index:o.index}}),Se(Xe,"generatePushAccount",async()=>{const t=AT(OT),n=await bm(t),r=iu.fromMasterSeed(n),i=await Xe.generateDerivedKey(t),o=th(t),s=jE({account:o,chain:wv,transport:cE()}),a=await Nu.initialize(s),l=await Mu.encrypt(i.privateExtendedKey,a);return Xe.walletToEncDerivedKey[Js.toPushCAIP(o.address)]=JSON.stringify(l),{did:nr(ra(r.publicKey)),mnemonic:t,derivedHDNode:iu.fromExtendedKey(i.privateExtendedKey)}}),Se(Xe,"decryptPushAccount",async(t,n=void 0,r=void 0)=>{let i;if(r)i=(await Xe.generateDerivedKey(r,t.derivedKeyIndex)).privateExtendedKey;else if(n)i=await Mu.decrypt(JSON.parse(t.encDerivedPrivKey),n);else throw Error("Unable to Decrypt Push Account without Signer or Mnemonic!");const o=iu.fromExtendedKey(i);return{did:t.did,derivedHDNode:o,mnemonic:r}});let Rf=Xe;const MM={},jM={APP_NAME:"Push Local Wallet",NODE_ENV:"local",APP_ENV:"local",ALLOWED_NETWORKS:[11155111,80002,97,11155420,2442,421614,123,111557560],DEFAULT_CHAIN:11155111},DM={APP_NAME:"Push Devnet Wallet",NODE_ENV:"dev",APP_ENV:"dev",ALLOWED_NETWORKS:[11155111,80002,97,11155420,2442,421614,123,111557560],DEFAULT_CHAIN:11155111},Y6={APP_NAME:"Push Testnet Wallet",NODE_ENV:"staging",APP_ENV:"staging",ALLOWED_NETWORKS:[11155111,80002,97,11155420,2442,421614,123,111557560],DEFAULT_CHAIN:11155111},FM={APP_NAME:"Push Wallet",NODE_ENV:"prod",APP_ENV:"prod",ALLOWED_NETWORKS:[1,137,56,10,42161,1101,122,7560],DEFAULT_CHAIN:1},UM="dev";let Ka;switch(UM){case Vo.LOCAL:{Ka=jM;break}case Vo.DEV:{Ka=DM;break}case Vo.STAGING:{Ka=Y6;break}case Vo.PROD:{Ka=FM;break}default:Ka=Y6}const ps={...Ka,...MM};var X1=function(e,t){return X1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},X1(e,t)};function Kr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");X1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ot=function(){return ot=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ms(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function pi(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r1||l(m,h)})},p&&(i[m]=p(i[m])))}function l(m,p){try{u(r[m](p))}catch(h){f(o[0][3],h)}}function u(m){m.value instanceof Cl?Promise.resolve(m.value.v).then(d,c):f(o[0][2],m)}function d(m){l("next",m)}function c(m){l("throw",m)}function f(m,p){m(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}function WM(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Kl=="function"?Kl(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,l){s=e[o](s),i(a,l,s.done,s.value)})}}function i(o,s,a,l){Promise.resolve(l).then(function(u){o({value:u,done:a})},s)}}function lt(e){return typeof e=="function"}function Ev(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ym=Ev(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription: `+n.map(function(r,i){return i+1+") "+r.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=n}});function Y1(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var T0=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Gl(s),l=a.next();!l.done;l=a.next()){var u=l.value;u.remove(this)}}catch(h){t={error:h}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var d=this.initialTeardown;if(lt(d))try{d()}catch(h){o=h instanceof Ym?h.errors:[h]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var f=Gl(c),m=f.next();!m.done;m=f.next()){var p=m.value;try{Y6(p)}catch(h){o=o??[],h instanceof Ym?o=pi(pi([],ms(o)),ms(h.errors)):o.push(h)}}}catch(h){r={error:h}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Ym(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Y6(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Y1(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Y1(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),qE=T0.EMPTY;function GE(e){return e instanceof T0||e&&"closed"in e&<(e.remove)&<(e.add)&<(e.unsubscribe)}function Y6(e){lt(e)?e():e.unsubscribe()}var KE={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ZE={setTimeout:function(e,t){for(var n=[],r=2;r0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?qE:(this.currentObservers=null,a.push(n),new T0(function(){r.currentObservers=null,Y1(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,s=r.isStopped;i?n.error(o):s&&n.complete()},t.prototype.asObservable=function(){var n=new On;return n.source=this,n},t.create=function(n,r){return new J6(n,r)},t}(On),J6=function(e){Kr(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:qE},t}(ao),pd=function(e){Kr(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(ao),YE={now:function(){return(YE.delegate||Date).now()},delegate:void 0},tj=function(e){Kr(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=YE);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,s=r._infiniteTimeWindow,a=r._timestampProvider,l=r._windowTime;i||(o.push(n),!s&&o.push(a.now()+l)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,s=i._buffer,a=s.slice(),l=0;l0&&(d=new Kl({next:function(C){return E.next(C)},error:function(C){h=!0,y(),c=eg(g,i,C),E.error(C)},complete:function(){p=!0,y(),c=eg(g,s),E.complete()}}),Tr(v).subscribe(d))})(u)}}function eg(e,t){for(var n=[],r=2;r0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=Q.getVersionPrecision(t),o=Q.getVersionPrecision(n);let s=Math.max(i,o),a=0;const l=Q.map([t,n],u=>{const d=s-Q.getVersionPrecision(u),c=u+new Array(d+1).join(".0");return Q.map(c.split("."),f=>new Array(20-f.length).join("0")+f).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{r[l]=s[l]})}return t}static getBrowserAlias(t){return Bj[t]}static getBrowserTypeByAlias(t){return p7[t]||""}}const ut=/version\/(\d+(\.?_?\d+)+)/i,Nj=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=Q.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=Q.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=Q.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=Q.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=Q.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=Q.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=Q.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=Q.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Q.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=Q.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=Q.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=Q.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=Q.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=Q.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=Q.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=Q.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=Q.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=Q.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=Q.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=Q.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=Q.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=Q.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=Q.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=Q.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=Q.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=Q.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=Q.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:Q.getFirstMatch(i,e),version:Q.getSecondMatch(i,e)}}}],Mj=[{test:[/Roku\/DVP/],describe(e){const t=Q.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:kn.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=Q.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:kn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=Q.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Q.getWindowsVersionName(t);return{name:kn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:kn.iOS},n=Q.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=Q.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Q.getMacOSVersionName(t),r={name:kn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=Q.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:kn.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=Q.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Q.getAndroidVersionName(t),r={name:kn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=Q.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:kn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=Q.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Q.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Q.getFirstMatch(/\bbb(\d+)/i,e);return{name:kn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=Q.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:kn.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=Q.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:kn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:kn.Linux}}},{test:[/CrOS/],describe(){return{name:kn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=Q.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:kn.PlayStation4,version:t}}}],jj=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=Q.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Tt.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Tt.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Tt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Tt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Tt.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Tt.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Tt.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=Q.getFirstMatch(/(ipod|iphone)/i,e);return{type:Tt.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Tt.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Tt.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Tt.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Tt.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Tt.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Tt.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Tt.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Tt.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Tt.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Tt.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Tt.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Tt.tv}}}],Dj=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Bo.Blink};const n=Q.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Bo.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Bo.Trident},n=Q.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Bo.Presto},n=Q.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Bo.Gecko},n=Q.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Bo.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Bo.WebKit},n=Q.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];let r_=class{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=Q.find(Nj,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=Q.find(Mj,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=Q.find(jj,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=Q.find(Dj,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Q.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const l=t[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(n[a]=l,r+=1)}),r>0){const a=Object.keys(n),l=Q.find(a,d=>this.isOS(d));if(l){const d=this.satisfies(n[l]);if(d!==void 0)return d}const u=Q.find(a,d=>this.isPlatform(d));if(u){const d=this.satisfies(n[u]);if(d!==void 0)return d}}if(o>0){const a=Object.keys(i),l=Q.find(a,u=>this.isBrowser(u,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=Q.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(Q.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}};/*! + `):"",this.name="UnsubscriptionError",this.errors=n}});function Y1(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var T0=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Kl(s),l=a.next();!l.done;l=a.next()){var u=l.value;u.remove(this)}}catch(h){t={error:h}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var d=this.initialTeardown;if(lt(d))try{d()}catch(h){o=h instanceof Ym?h.errors:[h]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var f=Kl(c),m=f.next();!m.done;m=f.next()){var p=m.value;try{Q6(p)}catch(h){o=o??[],h instanceof Ym?o=pi(pi([],ms(o)),ms(h.errors)):o.push(h)}}}catch(h){r={error:h}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Ym(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Q6(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Y1(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Y1(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),qE=T0.EMPTY;function GE(e){return e instanceof T0||e&&"closed"in e&<(e.remove)&<(e.add)&<(e.unsubscribe)}function Q6(e){lt(e)?e():e.unsubscribe()}var KE={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ZE={setTimeout:function(e,t){for(var n=[],r=2;r0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?qE:(this.currentObservers=null,a.push(n),new T0(function(){r.currentObservers=null,Y1(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,s=r.isStopped;i?n.error(o):s&&n.complete()},t.prototype.asObservable=function(){var n=new On;return n.source=this,n},t.create=function(n,r){return new e_(n,r)},t}(On),e_=function(e){Kr(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:qE},t}(ao),pd=function(e){Kr(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(ao),YE={now:function(){return(YE.delegate||Date).now()},delegate:void 0},tj=function(e){Kr(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=YE);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,s=r._infiniteTimeWindow,a=r._timestampProvider,l=r._windowTime;i||(o.push(n),!s&&o.push(a.now()+l)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,s=i._buffer,a=s.slice(),l=0;l0&&(d=new Zl({next:function(C){return E.next(C)},error:function(C){h=!0,y(),c=eg(g,i,C),E.error(C)},complete:function(){p=!0,y(),c=eg(g,s),E.complete()}}),Tr(v).subscribe(d))})(u)}}function eg(e,t){for(var n=[],r=2;r0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=Q.getVersionPrecision(t),o=Q.getVersionPrecision(n);let s=Math.max(i,o),a=0;const l=Q.map([t,n],u=>{const d=s-Q.getVersionPrecision(u),c=u+new Array(d+1).join(".0");return Q.map(c.split("."),f=>new Array(20-f.length).join("0")+f).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{r[l]=s[l]})}return t}static getBrowserAlias(t){return Bj[t]}static getBrowserTypeByAlias(t){return p7[t]||""}}const ut=/version\/(\d+(\.?_?\d+)+)/i,Nj=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=Q.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=Q.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=Q.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=Q.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=Q.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=Q.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=Q.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=Q.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Q.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=Q.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=Q.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=Q.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=Q.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=Q.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=Q.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=Q.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=Q.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=Q.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=Q.getFirstMatch(ut,e)||Q.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=Q.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=Q.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=Q.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=Q.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=Q.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=Q.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=Q.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=Q.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=Q.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=Q.getFirstMatch(ut,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:Q.getFirstMatch(i,e),version:Q.getSecondMatch(i,e)}}}],Mj=[{test:[/Roku\/DVP/],describe(e){const t=Q.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:kn.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=Q.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:kn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=Q.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Q.getWindowsVersionName(t);return{name:kn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:kn.iOS},n=Q.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=Q.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Q.getMacOSVersionName(t),r={name:kn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=Q.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:kn.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=Q.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Q.getAndroidVersionName(t),r={name:kn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=Q.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:kn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=Q.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Q.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Q.getFirstMatch(/\bbb(\d+)/i,e);return{name:kn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=Q.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:kn.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=Q.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:kn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:kn.Linux}}},{test:[/CrOS/],describe(){return{name:kn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=Q.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:kn.PlayStation4,version:t}}}],jj=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=Q.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Tt.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Tt.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Tt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Tt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Tt.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Tt.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Tt.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=Q.getFirstMatch(/(ipod|iphone)/i,e);return{type:Tt.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Tt.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Tt.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Tt.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Tt.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Tt.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Tt.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Tt.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Tt.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Tt.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Tt.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Tt.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Tt.tv}}}],Dj=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Bo.Blink};const n=Q.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Bo.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Bo.Trident},n=Q.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Bo.Presto},n=Q.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Bo.Gecko},n=Q.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Bo.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Bo.WebKit},n=Q.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];let i_=class{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=Q.find(Nj,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=Q.find(Mj,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=Q.find(jj,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=Q.find(Dj,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Q.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const l=t[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(n[a]=l,r+=1)}),r>0){const a=Object.keys(n),l=Q.find(a,d=>this.isOS(d));if(l){const d=this.satisfies(n[l]);if(d!==void 0)return d}const u=Q.find(a,d=>this.isPlatform(d));if(u){const d=this.satisfies(n[u]);if(d!==void 0)return d}}if(o>0){const a=Object.keys(i),l=Q.find(a,u=>this.isBrowser(u,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=Q.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(Q.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}};/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 - */class Fj{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new r_(t,n)}static parse(t){return new r_(t).getResult()}static get BROWSER_MAP(){return p7}static get ENGINE_MAP(){return Bo}static get OS_MAP(){return kn}static get PLATFORMS_MAP(){return Tt}}function Cl(){}function Uj(e){return e()}function Hj(e){e.forEach(Uj)}function zj(e){return typeof e=="function"}function Wj(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function m7(e,...t){if(e==null)return Cl;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Vj(e){let t;return m7(e,n=>t=n)(),t}const Wa=[];function qj(e,t){return{subscribe:$0(e,t).subscribe}}function $0(e,t=Cl){let n;const r=new Set;function i(a){if(Wj(e,a)&&(e=a,n)){const l=!Wa.length;for(const u of r)u[1](),Wa.push(u,e);if(l){for(let u=0;u{r.delete(u),r.size===0&&n&&(n(),n=null)}}return{set:i,update:o,subscribe:s}}function pc(e,t,n){const r=!Array.isArray(e),i=r?[e]:e,o=t.length<2;return qj(n,s=>{let a=!1;const l=[];let u=0,d=Cl;const c=()=>{if(u)return;d();const m=t(r?l[0]:l,s);o?s(m):d=zj(m)?m:Cl},f=i.map((m,p)=>m7(m,h=>{l[p]=h,u&=~(1<{u|=1<0}),n=[],r=0,i=t;r1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(mD,function(l,u,d,c,f,m){if(u)t.minimumIntegerDigits=d.length;else{if(c&&f)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(C7.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(s_.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(s_,function(l,u,d,c,f,m){return d==="*"?t.minimumFractionDigits=u.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:f&&m?(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length+m.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?t=ot(ot({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=ot(ot({},t),a_(o)));continue}if(k7.test(i.stem)){t=ot(ot({},t),a_(i.stem));continue}var s=A7(i.stem);s&&(t=ot(ot({},t),s));var a=gD(i.stem);a&&(t=ot(ot({},t),a))}return t}var rh={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function bD(e,t){for(var n="",r=0;r>1),l="a",u=vD(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)n+=l;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function vD(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=rh[r||""]||rh[n||""]||rh["".concat(n,"-001")]||rh["001"];return i[0]}var tg,wD=new RegExp("^".concat(S7.source,"*")),_D=new RegExp("".concat(S7.source,"*$"));function Je(e,t){return{start:e,end:t}}var xD=!!String.prototype.startsWith,ED=!!String.fromCodePoint,SD=!!Object.fromEntries,kD=!!String.prototype.codePointAt,CD=!!String.prototype.trimStart,AD=!!String.prototype.trimEnd,TD=!!Number.isSafeInteger,ID=TD?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},ty=!0;try{var $D=I7("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ty=((tg=$D.exec("a"))===null||tg===void 0?void 0:tg[0])==="a"}catch{ty=!1}var c_=xD?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},ny=ED?String.fromCodePoint:function(){for(var t=[],n=0;no;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},u_=SD?Object.fromEntries:function(t){for(var n={},r=0,i=t;r=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},PD=CD?function(t){return t.trimStart()}:function(t){return t.replace(wD,"")},OD=AD?function(t){return t.trimEnd()}:function(t){return t.replace(_D,"")};function I7(e,t){return new RegExp(e,t)}var ry;if(ty){var f_=I7("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ry=function(t,n){var r;f_.lastIndex=n;var i=f_.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else ry=function(t,n){for(var r=[];;){var i=T7(t,n);if(i===void 0||$7(i)||ND(i))break;r.push(i),n+=i>=65536?2:1}return ny.apply(void 0,r)};var RD=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:bt.pound,location:Je(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Ye.UNMATCHED_CLOSING_TAG,Je(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&iy(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:bt.literal,value:"<".concat(i,"/>"),location:Je(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:bt.tag,value:i,children:s,location:Je(r,this.clonePosition())},err:null}:this.error(Ye.INVALID_TAG,Je(a,this.clonePosition())))}else return this.error(Ye.UNCLOSED_TAG,Je(r,this.clonePosition()))}else return this.error(Ye.INVALID_TAG,Je(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&BD(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var l=Je(r,this.clonePosition());return{val:{type:bt.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!LD(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return ny.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),ny(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,Je(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Ye.EMPTY_ARGUMENT,Je(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Ye.MALFORMED_ARGUMENT,Je(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,Je(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:bt.argument,value:i,location:Je(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,Je(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(Ye.MALFORMED_ARGUMENT,Je(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=ry(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),s=Je(t,o);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(Ye.EXPECT_ARGUMENT_TYPE,Je(s,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var f=OD(c.val);if(f.length===0)return this.error(Ye.EXPECT_ARGUMENT_STYLE,Je(this.clonePosition(),this.clonePosition()));var m=Je(d,this.clonePosition());u={style:f,styleLocation:m}}var p=this.tryParseArgumentClose(i);if(p.err)return p;var h=Je(i,this.clonePosition());if(u&&c_(u==null?void 0:u.style,"::",0)){var y=PD(u.style.slice(2));if(a==="number"){var c=this.parseNumberSkeletonFromString(y,u.styleLocation);return c.err?c:{val:{type:bt.number,value:r,location:h,style:c.val},err:null}}else{if(y.length===0)return this.error(Ye.EXPECT_DATE_TIME_SKELETON,h);var g=y;this.locale&&(g=bD(y,this.locale));var f={type:Yl.dateTime,pattern:g,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?fD(g):{}},b=a==="date"?bt.date:bt.time;return{val:{type:b,value:r,location:h,style:f},err:null}}}return{val:{type:a==="number"?bt.number:a==="date"?bt.date:bt.time,value:r,location:h,style:(o=u==null?void 0:u.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var v=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ye.EXPECT_SELECT_ARGUMENT_OPTIONS,Je(v,ot({},v)));this.bumpSpace();var w=this.parseIdentifierIfPossible(),E=0;if(a!=="select"&&w.value==="offset"){if(!this.bumpIf(":"))return this.error(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Je(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),w=this.parseIdentifierIfPossible(),E=c.val}var C=this.tryParsePluralOrSelectOptions(t,a,n,w);if(C.err)return C;var p=this.tryParseArgumentClose(i);if(p.err)return p;var k=Je(i,this.clonePosition());return a==="select"?{val:{type:bt.select,value:r,options:u_(C.val),location:k},err:null}:{val:{type:bt.plural,value:r,options:u_(C.val),offset:E,pluralType:a==="plural"?"cardinal":"ordinal",location:k},err:null}}default:return this.error(Ye.INVALID_ARGUMENT_TYPE,Je(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,Je(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Je(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=hD(t)}catch{return this.error(Ye.INVALID_NUMBER_SKELETON,n)}return{val:{type:Yl.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?yD(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,s=!1,a=[],l=new Set,u=i.value,d=i.location;;){if(u.length===0){var c=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;d=Je(c,this.clonePosition()),u=this.message.slice(c.offset,this.offset())}else break}if(l.has(u))return this.error(n==="select"?Ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);u==="other"&&(s=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Je(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,n,r);if(p.err)return p;var h=this.tryParseArgumentClose(m);if(h.err)return h;a.push([u,{value:p.val,location:Je(m,this.clonePosition())}]),l.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,d=o.location}return a.length===0?this.error(n==="select"?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Je(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Ye.MISSING_OTHER_CLAUSE,Je(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var l=Je(i,this.clonePosition());return o?(s*=r,ID(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=T7(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(c_(this.message,t,this.offset())){for(var n=0;n=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&$7(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function iy(e){return e>=97&&e<=122||e>=65&&e<=90}function LD(e){return iy(e)||e===47}function BD(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function $7(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ND(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function oy(e){e.forEach(function(t){if(delete t.location,w7(t)||_7(t))for(var n in t.options)delete t.options[n].location,oy(t.options[n].value);else y7(t)&&E7(t.style)||(b7(t)||v7(t))&&ey(t.style)?delete t.style.location:x7(t)&&oy(t.children)})}function MD(e,t){t===void 0&&(t={}),t=ot({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new RD(e,t).parse();if(n.err){var r=SyntaxError(Ye[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||oy(n.val),n.val}function ng(e,t){var n=t&&t.cache?t.cache:zD,r=t&&t.serializer?t.serializer:HD,i=t&&t.strategy?t.strategy:DD;return i(e,{cache:n,serializer:r})}function jD(e){return e==null||typeof e=="number"||typeof e=="boolean"}function P7(e,t,n,r){var i=jD(r)?r:n(r),o=t.get(i);return typeof o>"u"&&(o=e.call(this,r),t.set(i,o)),o}function O7(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,r),t.set(i,o)),o}function $v(e,t,n,r,i){return n.bind(t,e,r,i)}function DD(e,t){var n=e.length===1?P7:O7;return $v(e,this,n,t.cache.create(),t.serializer)}function FD(e,t){return $v(e,this,O7,t.cache.create(),t.serializer)}function UD(e,t){return $v(e,this,P7,t.cache.create(),t.serializer)}var HD=function(){return JSON.stringify(arguments)};function Pv(){this.cache=Object.create(null)}Pv.prototype.get=function(e){return this.cache[e]};Pv.prototype.set=function(e,t){this.cache[e]=t};var zD={create:function(){return new Pv}},rg={variadic:FD,monadic:UD},Ql;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ql||(Ql={}));var P0=function(e){Kr(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),d_=function(e){Kr(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Ql.INVALID_VALUE,o)||this}return t}(P0),WD=function(e){Kr(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Ql.INVALID_VALUE,i)||this}return t}(P0),VD=function(e){Kr(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Ql.MISSING_VALUE,r)||this}return t}(P0),Cn;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Cn||(Cn={}));function qD(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Cn.literal||n.type!==Cn.literal?t.push(n):r.value+=n.value,t},[])}function GD(e){return typeof e=="function"}function Ch(e,t,n,r,i,o,s){if(e.length===1&&o_(e[0]))return[{type:Cn.literal,value:e[0].value}];for(var a=[],l=0,u=e;ln.unsubscribe():n}function Vj(e){let t;return m7(e,n=>t=n)(),t}const Va=[];function qj(e,t){return{subscribe:$0(e,t).subscribe}}function $0(e,t=Al){let n;const r=new Set;function i(a){if(Wj(e,a)&&(e=a,n)){const l=!Va.length;for(const u of r)u[1](),Va.push(u,e);if(l){for(let u=0;u{r.delete(u),r.size===0&&n&&(n(),n=null)}}return{set:i,update:o,subscribe:s}}function pc(e,t,n){const r=!Array.isArray(e),i=r?[e]:e,o=t.length<2;return qj(n,s=>{let a=!1;const l=[];let u=0,d=Al;const c=()=>{if(u)return;d();const m=t(r?l[0]:l,s);o?s(m):d=zj(m)?m:Al},f=i.map((m,p)=>m7(m,h=>{l[p]=h,u&=~(1<{u|=1<0}),n=[],r=0,i=t;r1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(mD,function(l,u,d,c,f,m){if(u)t.minimumIntegerDigits=d.length;else{if(c&&f)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(C7.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(a_.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(a_,function(l,u,d,c,f,m){return d==="*"?t.minimumFractionDigits=u.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:f&&m?(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length+m.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?t=ot(ot({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=ot(ot({},t),l_(o)));continue}if(k7.test(i.stem)){t=ot(ot({},t),l_(i.stem));continue}var s=A7(i.stem);s&&(t=ot(ot({},t),s));var a=gD(i.stem);a&&(t=ot(ot({},t),a))}return t}var rh={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function bD(e,t){for(var n="",r=0;r>1),l="a",u=vD(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)n+=l;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function vD(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=rh[r||""]||rh[n||""]||rh["".concat(n,"-001")]||rh["001"];return i[0]}var tg,wD=new RegExp("^".concat(S7.source,"*")),_D=new RegExp("".concat(S7.source,"*$"));function Je(e,t){return{start:e,end:t}}var xD=!!String.prototype.startsWith,ED=!!String.fromCodePoint,SD=!!Object.fromEntries,kD=!!String.prototype.codePointAt,CD=!!String.prototype.trimStart,AD=!!String.prototype.trimEnd,TD=!!Number.isSafeInteger,ID=TD?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},ty=!0;try{var $D=I7("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ty=((tg=$D.exec("a"))===null||tg===void 0?void 0:tg[0])==="a"}catch{ty=!1}var u_=xD?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},ny=ED?String.fromCodePoint:function(){for(var t=[],n=0;no;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},f_=SD?Object.fromEntries:function(t){for(var n={},r=0,i=t;r=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},PD=CD?function(t){return t.trimStart()}:function(t){return t.replace(wD,"")},OD=AD?function(t){return t.trimEnd()}:function(t){return t.replace(_D,"")};function I7(e,t){return new RegExp(e,t)}var ry;if(ty){var d_=I7("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ry=function(t,n){var r;d_.lastIndex=n;var i=d_.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else ry=function(t,n){for(var r=[];;){var i=T7(t,n);if(i===void 0||$7(i)||ND(i))break;r.push(i),n+=i>=65536?2:1}return ny.apply(void 0,r)};var RD=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:bt.pound,location:Je(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Ye.UNMATCHED_CLOSING_TAG,Je(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&iy(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:bt.literal,value:"<".concat(i,"/>"),location:Je(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:bt.tag,value:i,children:s,location:Je(r,this.clonePosition())},err:null}:this.error(Ye.INVALID_TAG,Je(a,this.clonePosition())))}else return this.error(Ye.UNCLOSED_TAG,Je(r,this.clonePosition()))}else return this.error(Ye.INVALID_TAG,Je(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&BD(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var l=Je(r,this.clonePosition());return{val:{type:bt.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!LD(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return ny.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),ny(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,Je(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Ye.EMPTY_ARGUMENT,Je(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Ye.MALFORMED_ARGUMENT,Je(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,Je(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:bt.argument,value:i,location:Je(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,Je(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(Ye.MALFORMED_ARGUMENT,Je(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=ry(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),s=Je(t,o);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(Ye.EXPECT_ARGUMENT_TYPE,Je(s,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var f=OD(c.val);if(f.length===0)return this.error(Ye.EXPECT_ARGUMENT_STYLE,Je(this.clonePosition(),this.clonePosition()));var m=Je(d,this.clonePosition());u={style:f,styleLocation:m}}var p=this.tryParseArgumentClose(i);if(p.err)return p;var h=Je(i,this.clonePosition());if(u&&u_(u==null?void 0:u.style,"::",0)){var y=PD(u.style.slice(2));if(a==="number"){var c=this.parseNumberSkeletonFromString(y,u.styleLocation);return c.err?c:{val:{type:bt.number,value:r,location:h,style:c.val},err:null}}else{if(y.length===0)return this.error(Ye.EXPECT_DATE_TIME_SKELETON,h);var g=y;this.locale&&(g=bD(y,this.locale));var f={type:Ql.dateTime,pattern:g,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?fD(g):{}},b=a==="date"?bt.date:bt.time;return{val:{type:b,value:r,location:h,style:f},err:null}}}return{val:{type:a==="number"?bt.number:a==="date"?bt.date:bt.time,value:r,location:h,style:(o=u==null?void 0:u.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var v=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ye.EXPECT_SELECT_ARGUMENT_OPTIONS,Je(v,ot({},v)));this.bumpSpace();var w=this.parseIdentifierIfPossible(),E=0;if(a!=="select"&&w.value==="offset"){if(!this.bumpIf(":"))return this.error(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Je(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),w=this.parseIdentifierIfPossible(),E=c.val}var C=this.tryParsePluralOrSelectOptions(t,a,n,w);if(C.err)return C;var p=this.tryParseArgumentClose(i);if(p.err)return p;var k=Je(i,this.clonePosition());return a==="select"?{val:{type:bt.select,value:r,options:f_(C.val),location:k},err:null}:{val:{type:bt.plural,value:r,options:f_(C.val),offset:E,pluralType:a==="plural"?"cardinal":"ordinal",location:k},err:null}}default:return this.error(Ye.INVALID_ARGUMENT_TYPE,Je(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Ye.EXPECT_ARGUMENT_CLOSING_BRACE,Je(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Je(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=hD(t)}catch{return this.error(Ye.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ql.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?yD(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,s=!1,a=[],l=new Set,u=i.value,d=i.location;;){if(u.length===0){var c=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;d=Je(c,this.clonePosition()),u=this.message.slice(c.offset,this.offset())}else break}if(l.has(u))return this.error(n==="select"?Ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);u==="other"&&(s=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Je(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,n,r);if(p.err)return p;var h=this.tryParseArgumentClose(m);if(h.err)return h;a.push([u,{value:p.val,location:Je(m,this.clonePosition())}]),l.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,d=o.location}return a.length===0?this.error(n==="select"?Ye.EXPECT_SELECT_ARGUMENT_SELECTOR:Ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Je(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Ye.MISSING_OTHER_CLAUSE,Je(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var l=Je(i,this.clonePosition());return o?(s*=r,ID(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=T7(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(u_(this.message,t,this.offset())){for(var n=0;n=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&$7(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function iy(e){return e>=97&&e<=122||e>=65&&e<=90}function LD(e){return iy(e)||e===47}function BD(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function $7(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ND(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function oy(e){e.forEach(function(t){if(delete t.location,w7(t)||_7(t))for(var n in t.options)delete t.options[n].location,oy(t.options[n].value);else y7(t)&&E7(t.style)||(b7(t)||v7(t))&&ey(t.style)?delete t.style.location:x7(t)&&oy(t.children)})}function MD(e,t){t===void 0&&(t={}),t=ot({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new RD(e,t).parse();if(n.err){var r=SyntaxError(Ye[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||oy(n.val),n.val}function ng(e,t){var n=t&&t.cache?t.cache:zD,r=t&&t.serializer?t.serializer:HD,i=t&&t.strategy?t.strategy:DD;return i(e,{cache:n,serializer:r})}function jD(e){return e==null||typeof e=="number"||typeof e=="boolean"}function P7(e,t,n,r){var i=jD(r)?r:n(r),o=t.get(i);return typeof o>"u"&&(o=e.call(this,r),t.set(i,o)),o}function O7(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,r),t.set(i,o)),o}function Pv(e,t,n,r,i){return n.bind(t,e,r,i)}function DD(e,t){var n=e.length===1?P7:O7;return Pv(e,this,n,t.cache.create(),t.serializer)}function FD(e,t){return Pv(e,this,O7,t.cache.create(),t.serializer)}function UD(e,t){return Pv(e,this,P7,t.cache.create(),t.serializer)}var HD=function(){return JSON.stringify(arguments)};function Ov(){this.cache=Object.create(null)}Ov.prototype.get=function(e){return this.cache[e]};Ov.prototype.set=function(e,t){this.cache[e]=t};var zD={create:function(){return new Ov}},rg={variadic:FD,monadic:UD},Jl;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Jl||(Jl={}));var P0=function(e){Kr(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),h_=function(e){Kr(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Jl.INVALID_VALUE,o)||this}return t}(P0),WD=function(e){Kr(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Jl.INVALID_VALUE,i)||this}return t}(P0),VD=function(e){Kr(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Jl.MISSING_VALUE,r)||this}return t}(P0),Cn;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Cn||(Cn={}));function qD(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Cn.literal||n.type!==Cn.literal?t.push(n):r.value+=n.value,t},[])}function GD(e){return typeof e=="function"}function Ch(e,t,n,r,i,o,s){if(e.length===1&&s_(e[0]))return[{type:Cn.literal,value:e[0].value}];for(var a=[],l=0,u=e;l0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=MD,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function YD(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i0){const o=n.slice(i,n.length).join(".");if(o in r){r=r[o];break}}r=r[n[i]]}else r=void 0;return r}const qo={},QD=(e,t,n)=>n&&(t in qo||(qo[t]={}),e in qo[t]||(qo[t][e]=n),n),L7=(e,t)=>{if(t==null)return;if(t in qo&&e in qo[t])return qo[t][e];const n=yd(t);for(let r=0;r(n[e]=aD.all([n[e]||{},...t]),n))}pc([gd],([e])=>Object.keys(e));gd.subscribe(e=>Ov=e);const Th={};function nF(e,t){Th[e].delete(t),Th[e].size===0&&delete Th[e]}function N7(e){return Th[e]}function rF(e){return yd(e).map(t=>{const n=N7(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function gp(e){return e==null?!1:yd(e).some(t=>{var n;return(n=N7(t))==null?void 0:n.size})}function iF(e,t){return Promise.all(t.map(r=>(nF(e,r),r().then(i=>i.default||i)))).then(r=>Ah(e,...r))}const cu={};function M7(e){if(!gp(e))return e in cu?cu[e]:Promise.resolve();const t=rF(e);return cu[e]=Promise.all(t.map(([n,r])=>iF(n,r))).then(()=>{if(gp(e))return M7(e);delete cu[e]}),cu[e]}var h_=Object.getOwnPropertySymbols,oF=Object.prototype.hasOwnProperty,sF=Object.prototype.propertyIsEnumerable,aF=(e,t)=>{var n={};for(var r in e)oF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&h_)for(var r of h_(e))t.indexOf(r)<0&&sF.call(e,r)&&(n[r]=e[r]);return n};const lF={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function cF({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${yd(e).join('", "')}".${gp(_s())?` +`,Jl.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:d.pluralType}).select(f-(d.offset||0));v=d.options[w]||d.options.other}if(!v)throw new h_(d.value,f,Object.keys(d.options),s);a.push.apply(a,Ch(v.value,t,n,r,i,f-(d.offset||0)));continue}}return qD(a)}function KD(e,t){return t?ot(ot(ot({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=ot(ot({},e[r]),t[r]||{}),n},{})):e}function ZD(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=KD(e[r],t[r]),n},ot({},e)):e}function ig(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function XD(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ng(function(){for(var t,n=[],r=0;r0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=MD,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function YD(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i0){const o=n.slice(i,n.length).join(".");if(o in r){r=r[o];break}}r=r[n[i]]}else r=void 0;return r}const qo={},QD=(e,t,n)=>n&&(t in qo||(qo[t]={}),e in qo[t]||(qo[t][e]=n),n),L7=(e,t)=>{if(t==null)return;if(t in qo&&e in qo[t])return qo[t][e];const n=yd(t);for(let r=0;r(n[e]=aD.all([n[e]||{},...t]),n))}pc([gd],([e])=>Object.keys(e));gd.subscribe(e=>Rv=e);const Th={};function nF(e,t){Th[e].delete(t),Th[e].size===0&&delete Th[e]}function N7(e){return Th[e]}function rF(e){return yd(e).map(t=>{const n=N7(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function gp(e){return e==null?!1:yd(e).some(t=>{var n;return(n=N7(t))==null?void 0:n.size})}function iF(e,t){return Promise.all(t.map(r=>(nF(e,r),r().then(i=>i.default||i)))).then(r=>Ah(e,...r))}const cu={};function M7(e){if(!gp(e))return e in cu?cu[e]:Promise.resolve();const t=rF(e);return cu[e]=Promise.all(t.map(([n,r])=>iF(n,r))).then(()=>{if(gp(e))return M7(e);delete cu[e]}),cu[e]}var p_=Object.getOwnPropertySymbols,oF=Object.prototype.hasOwnProperty,sF=Object.prototype.propertyIsEnumerable,aF=(e,t)=>{var n={};for(var r in e)oF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&p_)for(var r of p_(e))t.indexOf(r)<0&&sF.call(e,r)&&(n[r]=e[r]);return n};const lF={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function cF({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${yd(e).join('", "')}".${gp(_s())?` -Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const uF={fallbackLocale:null,loadingDelay:200,formats:lF,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Eu=uF;function Jl(){return Eu}function fF(e){const t=e,{formats:n}=t,r=aF(t,["formats"]);let i=e.fallbackLocale;if(e.initialLocale)try{R7.resolveLocale(e.initialLocale)&&(i=e.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${e.initialLocale}" is not a valid locale.`)}return r.warnOnMissingMessages&&(delete r.warnOnMissingMessages,r.handleMissingMessage==null?r.handleMissingMessage=cF:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(Eu,r,{initialLocale:i}),n&&("number"in n&&Object.assign(Eu.formats.number,n.number),"date"in n&&Object.assign(Eu.formats.date,n.date),"time"in n&&Object.assign(Eu.formats.time,n.time)),Ta.set(i)}const og=$0(!1);var dF=Object.defineProperty,hF=Object.defineProperties,pF=Object.getOwnPropertyDescriptors,p_=Object.getOwnPropertySymbols,mF=Object.prototype.hasOwnProperty,gF=Object.prototype.propertyIsEnumerable,m_=(e,t,n)=>t in e?dF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yF=(e,t)=>{for(var n in t||(t={}))mF.call(t,n)&&m_(e,n,t[n]);if(p_)for(var n of p_(t))gF.call(t,n)&&m_(e,n,t[n]);return e},bF=(e,t)=>hF(e,pF(t));let sy;const yp=$0(null);function g_(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function yd(e,t=Jl().fallbackLocale){const n=g_(e);return t?[...new Set([...n,...g_(t)])]:n}function _s(){return sy??void 0}yp.subscribe(e=>{sy=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const vF=e=>{if(e&&tF(e)&&gp(e)){const{loadingDelay:t}=Jl();let n;return typeof window<"u"&&_s()!=null&&t?n=window.setTimeout(()=>og.set(!0),t):og.set(!0),M7(e).then(()=>{yp.set(e)}).finally(()=>{clearTimeout(n),og.set(!1)})}return yp.set(e)},Ta=bF(yF({},yp),{set:vF}),wF=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],O0=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var _F=Object.defineProperty,bp=Object.getOwnPropertySymbols,j7=Object.prototype.hasOwnProperty,D7=Object.prototype.propertyIsEnumerable,y_=(e,t,n)=>t in e?_F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rv=(e,t)=>{for(var n in t||(t={}))j7.call(t,n)&&y_(e,n,t[n]);if(bp)for(var n of bp(t))D7.call(t,n)&&y_(e,n,t[n]);return e},mc=(e,t)=>{var n={};for(var r in e)j7.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bp)for(var r of bp(e))t.indexOf(r)<0&&D7.call(e,r)&&(n[r]=e[r]);return n};const Mf=(e,t)=>{const{formats:n}=Jl();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},xF=O0(e=>{var t=e,{locale:n,format:r}=t,i=mc(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=Mf("number",r)),new Intl.NumberFormat(n,i)}),EF=O0(e=>{var t=e,{locale:n,format:r}=t,i=mc(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=Mf("date",r):Object.keys(i).length===0&&(i=Mf("date","short")),new Intl.DateTimeFormat(n,i)}),SF=O0(e=>{var t=e,{locale:n,format:r}=t,i=mc(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=Mf("time",r):Object.keys(i).length===0&&(i=Mf("time","short")),new Intl.DateTimeFormat(n,i)}),kF=(e={})=>{var t=e,{locale:n=_s()}=t,r=mc(t,["locale"]);return xF(Rv({locale:n},r))},CF=(e={})=>{var t=e,{locale:n=_s()}=t,r=mc(t,["locale"]);return EF(Rv({locale:n},r))},AF=(e={})=>{var t=e,{locale:n=_s()}=t,r=mc(t,["locale"]);return SF(Rv({locale:n},r))},TF=O0((e,t=_s())=>new R7(e,t,Jl().formats,{ignoreTag:Jl().ignoreTag})),IF=(e,t={})=>{var n,r,i,o;let s=t;typeof e=="object"&&(s=e,e=s.id);const{values:a,locale:l=_s(),default:u}=s;if(l==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let d=L7(e,l);if(!d)d=(o=(i=(r=(n=Jl()).handleMissingMessage)==null?void 0:r.call(n,{locale:l,id:e,defaultValue:u}))!=null?i:u)!=null?o:e;else if(typeof d!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof d}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),d;if(!a)return d;let c=d;try{c=TF(d,l).format(a)}catch(f){f instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,f.message)}return c},$F=(e,t)=>AF(t).format(e),PF=(e,t)=>CF(t).format(e),OF=(e,t)=>kF(t).format(e),RF=(e,t=_s())=>L7(e,t),xi=pc([Ta,gd],()=>IF);pc([Ta],()=>$F);pc([Ta],()=>PF);pc([Ta],()=>OF);pc([Ta,gd],()=>RF);let F7=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");var U7={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(self,()=>{return n={7629:(i,o,s)=>{const a=s(375),l=s(8571),u=s(9474),d=s(1687),c=s(8652),f=s(8160),m=s(3292),p=s(6354),h=s(8901),y=s(9708),g=s(6914),b=s(2294),v=s(6133),w=s(1152),E=s(8863),C=s(2036),k={Base:class{constructor(_){this.type=_,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new b.Ids,this._preferences=null,this._refs=new v.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return a(typeof y.describe=="function","Manifest functionality disabled"),y.describe(this)}allow(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];return f.verifyFlat(S,"allow"),this._values(S,"_valids")}alter(_){a(_&&typeof _=="object"&&!Array.isArray(_),"Invalid targets argument"),a(!this._inRuleset(),"Cannot set alterations inside a ruleset");const S=this.clone();S.$_terms.alterations=S.$_terms.alterations||[];for(const A in _){const I=_[A];a(typeof I=="function","Alteration adjuster for",A,"must be a function"),S.$_terms.alterations.push({target:A,adjuster:I})}return S.$_temp.ruleset=!1,S}artifact(_){return a(_!==void 0,"Artifact cannot be undefined"),a(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",_)}cast(_){return a(_===!1||typeof _=="string","Invalid to value"),a(_===!1||this._definition.cast[_],"Type",this.type,"does not support casting to",_),this.$_setFlag("cast",_===!1?void 0:_)}default(_,S){return this._default("default",_,S)}description(_){return a(_&&typeof _=="string","Description must be a non-empty string"),this.$_setFlag("description",_)}empty(_){const S=this.clone();return _!==void 0&&(_=S.$_compile(_,{override:!1})),S.$_setFlag("empty",_,{clone:!1})}error(_){return a(_,"Missing error"),a(_ instanceof Error||typeof _=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",_)}example(_){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a(_!==void 0,"Missing example"),f.assertOptions(S,["override"]),this._inner("examples",_,{single:!0,override:S.override})}external(_,S){return typeof _=="object"&&(a(!S,"Cannot combine options with description"),S=_.description,_=_.method),a(typeof _=="function","Method must be a function"),a(S===void 0||S&&typeof S=="string","Description must be a non-empty string"),this._inner("externals",{method:_,description:S},{single:!0})}failover(_,S){return this._default("failover",_,S)}forbidden(){return this.presence("forbidden")}id(_){return _?(a(typeof _=="string","id must be a non-empty string"),a(/^[^\.]+$/.test(_),"id cannot contain period character"),this.$_setFlag("id",_)):this.$_setFlag("id",void 0)}invalid(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];return this._values(S,"_invalids")}label(_){return a(_&&typeof _=="string","Label name must be a non-empty string"),this.$_setFlag("label",_)}meta(_){return a(_!==void 0,"Meta cannot be undefined"),this._inner("metas",_,{single:!0})}note(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];a(S.length,"Missing notes");for(const I of S)a(I&&typeof I=="string","Notes must be non-empty strings");return this._inner("notes",S)}only(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof _=="boolean","Invalid mode:",_),this.$_setFlag("only",_)}optional(){return this.presence("optional")}prefs(_){a(_,"Missing preferences"),a(_.context===void 0,"Cannot override context"),a(_.externals===void 0,"Cannot override externals"),a(_.warnings===void 0,"Cannot override warnings"),a(_.debug===void 0,"Cannot override debug"),f.checkPreferences(_);const S=this.clone();return S._preferences=f.preferences(S._preferences,_),S}presence(_){return a(["optional","required","forbidden"].includes(_),"Unknown presence mode",_),this.$_setFlag("presence",_)}raw(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",_?"raw":void 0)}result(_){return a(["raw","strip"].includes(_),"Unknown result mode",_),this.$_setFlag("result",_)}required(){return this.presence("required")}strict(_){const S=this.clone(),A=_!==void 0&&!_;return S._preferences=f.preferences(S._preferences,{convert:A}),S}strip(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",_?"strip":void 0)}tag(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];a(S.length,"Missing tags");for(const I of S)a(I&&typeof I=="string","Tags must be non-empty strings");return this._inner("tags",S)}unit(_){return a(_&&typeof _=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",_)}valid(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];f.verifyFlat(S,"valid");const I=this.allow(...S);return I.$_setFlag("only",!!I._valids,{clone:!1}),I}when(_,S){const A=this.clone();A.$_terms.whens||(A.$_terms.whens=[]);const I=m.when(A,_,S);if(!["any","link"].includes(A.type)){const L=I.is?[I]:I.switch;for(const F of L)a(!F.then||F.then.type==="any"||F.then.type===A.type,"Cannot combine",A.type,"with",F.then&&F.then.type),a(!F.otherwise||F.otherwise.type==="any"||F.otherwise.type===A.type,"Cannot combine",A.type,"with",F.otherwise&&F.otherwise.type)}return A.$_terms.whens.push(I),A.$_mutateRebuild()}cache(_){a(!this._inRuleset(),"Cannot set caching inside a ruleset"),a(!this._cache,"Cannot override schema cache"),a(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const S=this.clone();return S._cache=_||c.provider.provision(),S.$_temp.ruleset=!1,S}clone(){const _=Object.create(Object.getPrototypeOf(this));return this._assign(_)}concat(_){a(f.isSchema(_),"Invalid schema object"),a(this.type==="any"||_.type==="any"||_.type===this.type,"Cannot merge type",this.type,"with another type:",_.type),a(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),a(!_._inRuleset(),"Cannot concatenate a schema with open ruleset");let S=this.clone();if(this.type==="any"&&_.type!=="any"){const A=_.clone();for(const I of Object.keys(S))I!=="type"&&(A[I]=S[I]);S=A}S._ids.concat(_._ids),S._refs.register(_,v.toSibling),S._preferences=S._preferences?f.preferences(S._preferences,_._preferences):_._preferences,S._valids=C.merge(S._valids,_._valids,_._invalids),S._invalids=C.merge(S._invalids,_._invalids,_._valids);for(const A of _._singleRules.keys())S._singleRules.has(A)&&(S._rules=S._rules.filter(I=>I.keep||I.name!==A),S._singleRules.delete(A));for(const A of _._rules)_._definition.rules[A.method].multi||S._singleRules.set(A.name,A),S._rules.push(A);if(S._flags.empty&&_._flags.empty){S._flags.empty=S._flags.empty.concat(_._flags.empty);const A=Object.assign({},_._flags);delete A.empty,d(S._flags,A)}else if(_._flags.empty){S._flags.empty=_._flags.empty;const A=Object.assign({},_._flags);delete A.empty,d(S._flags,A)}else d(S._flags,_._flags);for(const A in _.$_terms){const I=_.$_terms[A];I?S.$_terms[A]?S.$_terms[A]=S.$_terms[A].concat(I):S.$_terms[A]=I.slice():S.$_terms[A]||(S.$_terms[A]=I)}return this.$_root._tracer&&this.$_root._tracer._combine(S,[this,_]),S.$_mutateRebuild()}extend(_){return a(!_.base,"Cannot extend type with another base"),h.type(this,_)}extract(_){return _=Array.isArray(_)?_:_.split("."),this._ids.reach(_)}fork(_,S){a(!this._inRuleset(),"Cannot fork inside a ruleset");let A=this;for(let I of[].concat(_))I=Array.isArray(I)?I:I.split("."),A=A._ids.fork(I,S,A);return A.$_temp.ruleset=!1,A}rule(_){const S=this._definition;f.assertOptions(_,Object.keys(S.modifiers)),a(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const A=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;a(A>=0&&AA.tailor(_),ref:!1}),S.$_temp.ruleset=!1,S.$_mutateRebuild()}tracer(){return w.location?w.location(this):this}validate(_,S){return E.entry(_,this,S)}validateAsync(_,S){return E.entryAsync(_,this,S)}$_addRule(_){typeof _=="string"&&(_={name:_}),a(_&&typeof _=="object","Invalid options"),a(_.name&&typeof _.name=="string","Invalid rule name");for(const F in _)a(F[0]!=="_","Cannot set private rule properties");const S=Object.assign({},_);S._resolve=[],S.method=S.method||S.name;const A=this._definition.rules[S.method],I=S.args;a(A,"Unknown rule",S.method);const L=this.clone();if(I){a(Object.keys(I).length===1||Object.keys(I).length===this._definition.rules[S.name].args.length,"Invalid rule definition for",this.type,S.name);for(const F in I){let N=I[F];if(A.argsByName){const R=A.argsByName.get(F);if(R.ref&&f.isResolvable(N))S._resolve.push(F),L.$_mutateRegister(N);else if(R.normalize&&(N=R.normalize(N),I[F]=N),R.assert){const B=f.validateArg(N,F,R);a(!B,B,"or reference")}}N!==void 0?I[F]=N:delete I[F]}}return A.multi||(L._ruleRemove(S.name,{clone:!1}),L._singleRules.set(S.name,S)),L.$_temp.ruleset===!1&&(L.$_temp.ruleset=null),A.priority?L._rules.unshift(S):L._rules.push(S),L}$_compile(_,S){return m.schema(this.$_root,_,S)}$_createError(_,S,A,I,L){let F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};const N=F.flags!==!1?this._flags:{},R=F.messages?g.merge(this._definition.messages,F.messages):this._definition.messages;return new p.Report(_,S,A,N,R,I,L)}$_getFlag(_){return this._flags[_]}$_getRule(_){return this._singleRules.get(_)}$_mapLabels(_){return _=Array.isArray(_)?_:_.split("."),this._ids.labels(_)}$_match(_,S,A,I){(A=Object.assign({},A)).abortEarly=!0,A._externals=!1,S.snapshot();const L=!E.validate(_,this,S,A,I).errors;return S.restore(),L}$_modify(_){return f.assertOptions(_,["each","once","ref","schema"]),b.schema(this,_)||this}$_mutateRebuild(){return a(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(_,S)=>{let{source:A,name:I,path:L,key:F}=S;const N=this._definition[A][I]&&this._definition[A][I].register;N!==!1&&this.$_mutateRegister(_,{family:N,key:F})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(_){let{family:S,key:A}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._refs.register(_,S),this._ids.register(_,{key:A})}$_property(_){return this._definition.properties[_]}$_reach(_){return this._ids.reach(_)}$_rootReferences(){return this._refs.roots()}$_setFlag(_,S){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(_[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const I=this._definition.flags[_]||{};if(u(S,I.default)&&(S=void 0),u(S,this._flags[_]))return this;const L=A.clone!==!1?this.clone():this;return S!==void 0?(L._flags[_]=S,L.$_mutateRegister(S)):delete L._flags[_],_[0]!=="_"&&(L.$_temp.ruleset=!1),L}$_parent(_){for(var S=arguments.length,A=new Array(S>1?S-1:0),I=1;I2&&arguments[2]!==void 0?arguments[2]:{};return f.assertOptions(A,"literal"),a(S!==void 0,"Missing",_,"value"),a(typeof S=="function"||!A.literal,"Only function value supports literal option"),typeof S=="function"&&A.literal&&(S={[f.symbols.literal]:!0,literal:S}),this.$_setFlag(_,S)}_generate(_,S,A){if(!this.$_terms.whens)return{schema:this};const I=[],L=[];for(let R=0;RW)break}const F=L.join(", ");if(S.mainstay.tracer.debug(S,"rule","when",F),!F)return{schema:this};if(!S.mainstay.tracer.active&&this.$_temp.whens[F])return{schema:this.$_temp.whens[F],id:F};let N=this;this._definition.generate&&(N=this._definition.generate(this,_,S,A));for(const R of I)N=N.concat(R);return this.$_root._tracer&&this.$_root._tracer._combine(N,[this,...I]),this.$_temp.whens[F]=N,{schema:N,id:F}}_inner(_,S){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(!this._inRuleset(),`Cannot set ${_} inside a ruleset`);const I=this.clone();return I.$_terms[_]&&!A.override||(I.$_terms[_]=[]),A.single?I.$_terms[_].push(S):I.$_terms[_].push(...S),I.$_temp.ruleset=!1,I}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(_){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this._singleRules.has(_))return this;const A=S.clone!==!1?this.clone():this;A._singleRules.delete(_);const I=[];for(let L=0;L{const a=s(375),l=s(8571),u=s(8160),d={max:1e3,supported:new Set(["undefined","boolean","number","string"])};o.provider={provision:c=>new d.Cache(c)},d.Cache=class{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};u.assertOptions(c,["max"]),a(c.max===void 0||c.max&&c.max>0&&isFinite(c.max),"Invalid max cache size"),this._max=c.max||d.max,this._map=new Map,this._list=new d.List}get length(){return this._map.size}set(c,f){if(c!==null&&!d.supported.has(typeof c))return;let m=this._map.get(c);if(m)return m.value=f,void this._list.first(m);m=this._list.unshift({key:c,value:f}),this._map.set(c,m),this._compact()}get(c){const f=this._map.get(c);if(f)return this._list.first(f),l(f.value)}_compact(){if(this._map.size>this._max){const c=this._list.pop();this._map.delete(c.key)}}},d.List=class{constructor(){this.tail=null,this.head=null}unshift(c){return c.next=null,c.prev=this.head,this.head&&(this.head.next=c),this.head=c,this.tail||(this.tail=c),c}first(c){c!==this.head&&(this._remove(c),this.unshift(c))}pop(){return this._remove(this.tail)}_remove(c){const{next:f,prev:m}=c;return f.prev=m,m&&(m.next=f),c===this.tail&&(this.tail=f),c.prev=null,c.next=null,c}}},8160:(i,o,s)=>{const a=s(375),l=s(7916),u=s(5934);let d,c;const f={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};o.version=u.version,o.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},o.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},o.assertOptions=function(m,p){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"Options";a(m&&typeof m=="object"&&!Array.isArray(m),"Options must be of type object");const y=Object.keys(m).filter(g=>!p.includes(g));a(y.length===0,`${h} contain unknown keys: ${y}`)},o.checkPreferences=function(m){c=c||s(3378);const p=c.preferences.validate(m);if(p.error)throw new l([p.error.details[0].message])},o.compare=function(m,p,h){switch(h){case"=":return m===p;case">":return m>p;case"<":return m=":return m>=p;case"<=":return m<=p}},o.default=function(m,p){return m===void 0?p:m},o.isIsoDate=function(m){return f.isoDate.test(m)},o.isNumber=function(m){return typeof m=="number"&&!isNaN(m)},o.isResolvable=function(m){return!!m&&(m[o.symbols.ref]||m[o.symbols.template])},o.isSchema=function(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const h=m&&m[o.symbols.any];return!!h&&(a(p.legacy||h.version===o.version,"Cannot mix different versions of joi schemas"),!0)},o.isValues=function(m){return m[o.symbols.values]},o.limit=function(m){return Number.isSafeInteger(m)&&m>=0},o.preferences=function(m,p){d=d||s(6914),m=m||{},p=p||{};const h=Object.assign({},m,p);return p.errors&&m.errors&&(h.errors=Object.assign({},m.errors,p.errors),h.errors.wrap=Object.assign({},m.errors.wrap,p.errors.wrap)),p.messages&&(h.messages=d.compile(p.messages,m.messages)),delete h[o.symbols.prefs],h},o.tryWithPath=function(m,p){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{return m()}catch(y){throw y.path!==void 0?y.path=p+"."+y.path:y.path=p,h.append&&(y.message=`${y.message} (${y.path})`),y}},o.validateArg=function(m,p,h){let{assert:y,message:g}=h;if(o.isSchema(y)){const b=y.validate(m);return b.error?b.error.message:void 0}if(!y(m))return p?`${p} ${g}`:g},o.verifyFlat=function(m,p){for(const h of m)a(!Array.isArray(h),"Method no longer accepts array arguments:",p)}},3292:(i,o,s)=>{const a=s(375),l=s(8160),u=s(6133),d={};o.schema=function(c,f){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l.assertOptions(m,["appendPath","override"]);try{return d.schema(c,f,m)}catch(p){throw m.appendPath&&p.path!==void 0&&(p.message=`${p.message} (${p.path})`),p}},d.schema=function(c,f,m){a(f!==void 0,"Invalid undefined schema"),Array.isArray(f)&&(a(f.length,"Invalid empty array schema"),f.length===1&&(f=f[0]));const p=function(h){for(var y=arguments.length,g=new Array(y>1?y-1:0),b=1;b2&&arguments[2]!==void 0?arguments[2]:{};l.assertOptions(m,["legacy"]);const p=f&&f[l.symbols.any];if(p)return a(m.legacy||p.version===l.version,"Cannot mix different versions of joi schemas:",p.version,l.version),f;if(typeof f!="object"||!m.legacy)return o.schema(c,f,{appendPath:!0});const h=d.walk(f);return h?h.compile(h.root,f):o.schema(c,f,{appendPath:!0})},d.walk=function(c){if(typeof c!="object")return null;if(Array.isArray(c)){for(const m of c){const p=d.walk(m);if(p)return p}return null}const f=c[l.symbols.any];if(f)return{root:c[f.root],compile:f.compile};a(Object.getPrototypeOf(c)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const m in c){const p=d.walk(c[m]);if(p)return p}return null},d.simple=function(c){return c===null||["boolean","string","number"].includes(typeof c)},o.when=function(c,f,m){if(m===void 0&&(a(f&&typeof f=="object","Missing options"),m=f,f=u.create(".")),Array.isArray(m)&&(m={switch:m}),l.assertOptions(m,["is","not","then","otherwise","switch","break"]),l.isSchema(f))return a(m.is===void 0,'"is" can not be used with a schema condition'),a(m.not===void 0,'"not" can not be used with a schema condition'),a(m.switch===void 0,'"switch" can not be used with a schema condition'),d.condition(c,{is:f,then:m.then,otherwise:m.otherwise,break:m.break});if(a(u.isRef(f)||typeof f=="string","Invalid condition:",f),a(m.not===void 0||m.is===void 0,'Cannot combine "is" with "not"'),m.switch===void 0){let h=m;m.not!==void 0&&(h={is:m.not,then:m.otherwise,otherwise:m.then,break:m.break});let y=h.is!==void 0?c.$_compile(h.is):c.$_root.invalid(null,!1,0,"").required();return a(h.then!==void 0||h.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),a(h.break===void 0||h.then===void 0||h.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),m.is===void 0||u.isRef(m.is)||l.isSchema(m.is)||(y=y.required()),d.condition(c,{ref:o.ref(f),is:y,then:h.then,otherwise:h.otherwise,break:h.break})}a(Array.isArray(m.switch),'"switch" must be an array'),a(m.is===void 0,'Cannot combine "switch" with "is"'),a(m.not===void 0,'Cannot combine "switch" with "not"'),a(m.then===void 0,'Cannot combine "switch" with "then"');const p={ref:o.ref(f),switch:[],break:m.break};for(let h=0;h{const a=s(5688),l=s(8160),u=s(3328);o.Report=class{constructor(d,c,f,m,p,h,y){if(this.code=d,this.flags=m,this.messages=p,this.path=h.path,this.prefs=y,this.state=h,this.value=c,this.message=null,this.template=null,this.local=f||{},this.local.label=o.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const g=this.path[this.path.length-1];typeof g!="object"&&(this.local.key=g)}}_setTemplate(d){if(this.template=d,!this.flags.label&&this.path.length===0){const c=this._template(this.template,"root");c&&(this.local.label=c)}}toString(){if(this.message)return this.message;const d=this.code;if(!this.prefs.errors.render)return this.code;const c=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return c===void 0?`Error code "${d}" is not defined, your custom type is missing the correct messages definition`:(this.message=c.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(d,c){return o.template(this.value,d,c||this.code,this.state,this.prefs)}},o.path=function(d){let c="";for(const f of d)typeof f!="object"&&(typeof f=="string"?(c&&(c+="."),c+=f):c+=`[${f}]`);return c},o.template=function(d,c,f,m,p){if(!c)return;if(u.isTemplate(c))return f!=="root"?c:null;let h=p.errors.language;if(l.isResolvable(h)&&(h=h.resolve(d,m,p)),h&&c[h]){if(c[h][f]!==void 0)return c[h][f];if(c[h]["*"]!==void 0)return c[h]["*"]}return c[f]?c[f]:c["*"]},o.label=function(d,c,f,m){if(d.label)return d.label;if(!f.errors.label)return"";let p=c.path;return f.errors.label==="key"&&c.path.length>1&&(p=c.path.slice(-1)),o.path(p)||o.template(null,f.messages,"root",c,f)||m&&o.template(null,m,"root",c,f)||"value"},o.process=function(d,c,f){if(!d)return null;const{override:m,message:p,details:h}=o.details(d);if(m)return m;if(f.errors.stack)return new o.ValidationError(p,h,c);const y=Error.stackTraceLimit;Error.stackTraceLimit=0;const g=new o.ValidationError(p,h,c);return Error.stackTraceLimit=y,g},o.details=function(d){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=[];const m=[];for(const p of d){if(p instanceof Error){if(c.override!==!1)return{override:p};const y=p.toString();f.push(y),m.push({message:y,type:"override",context:{error:p}});continue}const h=p.toString();f.push(h),m.push({message:h,path:p.path.filter(y=>typeof y!="object"),type:p.code,context:p.local})}return f.length>1&&(f=[...new Set(f)]),{message:f.join(". "),details:m}},o.ValidationError=class extends Error{constructor(d,c,f){super(d),this._original=f,this.details=c}static isError(d){return d instanceof o.ValidationError}},o.ValidationError.prototype.isJoi=!0,o.ValidationError.prototype.name="ValidationError",o.ValidationError.prototype.annotate=a.error},8901:(i,o,s)=>{const a=s(375),l=s(8571),u=s(8160),d=s(6914),c={};o.type=function(f,m){const p=Object.getPrototypeOf(f),h=l(p),y=f._assign(Object.create(h)),g=Object.assign({},m);delete g.base,h._definition=g;const b=p._definition||{};g.messages=d.merge(b.messages,g.messages),g.properties=Object.assign({},b.properties,g.properties),y.type=g.type,g.flags=Object.assign({},b.flags,g.flags);const v=Object.assign({},b.terms);if(g.terms)for(const k in g.terms){const _=g.terms[k];a(y.$_terms[k]===void 0,"Invalid term override for",g.type,k),y.$_terms[k]=_.init,v[k]=_}g.terms=v,g.args||(g.args=b.args),g.prepare=c.prepare(g.prepare,b.prepare),g.coerce&&(typeof g.coerce=="function"&&(g.coerce={method:g.coerce}),g.coerce.from&&!Array.isArray(g.coerce.from)&&(g.coerce={method:g.coerce.method,from:[].concat(g.coerce.from)})),g.coerce=c.coerce(g.coerce,b.coerce),g.validate=c.validate(g.validate,b.validate);const w=Object.assign({},b.rules);if(g.rules)for(const k in g.rules){const _=g.rules[k];a(typeof _=="object","Invalid rule definition for",g.type,k);let S=_.method;if(S===void 0&&(S=function(){return this.$_addRule(k)}),S&&(a(!h[k],"Rule conflict in",g.type,k),h[k]=S),a(!w[k],"Rule conflict in",g.type,k),w[k]=_,_.alias){const A=[].concat(_.alias);for(const I of A)h[I]=_.method}_.args&&(_.argsByName=new Map,_.args=_.args.map(A=>(typeof A=="string"&&(A={name:A}),a(!_.argsByName.has(A.name),"Duplicated argument name",A.name),u.isSchema(A.assert)&&(A.assert=A.assert.strict().label(A.name)),_.argsByName.set(A.name,A),A)))}g.rules=w;const E=Object.assign({},b.modifiers);if(g.modifiers)for(const k in g.modifiers){a(!h[k],"Rule conflict in",g.type,k);const _=g.modifiers[k];a(typeof _=="function","Invalid modifier definition for",g.type,k);const S=function(A){return this.rule({[k]:A})};h[k]=S,E[k]=_}if(g.modifiers=E,g.overrides){h._super=p,y.$_super={};for(const k in g.overrides)a(p[k],"Cannot override missing",k),g.overrides[k][u.symbols.parent]=p[k],y.$_super[k]=p[k].bind(y);Object.assign(h,g.overrides)}g.cast=Object.assign({},b.cast,g.cast);const C=Object.assign({},b.manifest,g.manifest);return C.build=c.build(g.manifest&&g.manifest.build,b.manifest&&b.manifest.build),g.manifest=C,g.rebuild=c.rebuild(g.rebuild,b.rebuild),y},c.build=function(f,m){return f&&m?function(p,h){return m(f(p,h),h)}:f||m},c.coerce=function(f,m){return f&&m?{from:f.from&&m.from?[...new Set([...f.from,...m.from])]:null,method(p,h){let y;if((!m.from||m.from.includes(typeof p))&&(y=m.method(p,h),y)){if(y.errors||y.value===void 0)return y;p=y.value}if(!f.from||f.from.includes(typeof p)){const g=f.method(p,h);if(g)return g}return y}}:f||m},c.prepare=function(f,m){return f&&m?function(p,h){const y=f(p,h);if(y){if(y.errors||y.value===void 0)return y;p=y.value}return m(p,h)||y}:f||m},c.rebuild=function(f,m){return f&&m?function(p){m(p),f(p)}:f||m},c.validate=function(f,m){return f&&m?function(p,h){const y=m(p,h);if(y){if(y.errors&&(!Array.isArray(y.errors)||y.errors.length))return y;p=y.value}return f(p,h)||y}:f||m}},5107:(i,o,s)=>{const a=s(375),l=s(8571),u=s(8652),d=s(8160),c=s(3292),f=s(6354),m=s(8901),p=s(9708),h=s(6133),y=s(3328),g=s(1152);let b;const v={types:{alternatives:s(4946),any:s(8068),array:s(546),boolean:s(4937),date:s(7500),function:s(390),link:s(8785),number:s(3832),object:s(8966),string:s(7417),symbol:s(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const w={_types:new Set(Object.keys(v.types))};for(const E of w._types)w[E]=function(){for(var C=arguments.length,k=new Array(C),_=0;_2?C-2:0),_=2;_2?C-2:0),_=2;_{const a=s(375),l=s(8571),u=s(3328);o.compile=function(d,c){if(typeof d=="string")return a(!c,"Cannot set single message string"),new u(d);if(u.isTemplate(d))return a(!c,"Cannot set single message template"),d;a(typeof d=="object"&&!Array.isArray(d),"Invalid message options"),c=c?l(c):{};for(let f in d){const m=d[f];if(f==="root"||u.isTemplate(m)){c[f]=m;continue}if(typeof m=="string"){c[f]=new u(m);continue}a(typeof m=="object"&&!Array.isArray(m),"Invalid message for",f);const p=f;for(f in c[p]=c[p]||{},m){const h=m[f];f==="root"||u.isTemplate(h)?c[p][f]=h:(a(typeof h=="string","Invalid message for",f,"in",p),c[p][f]=new u(h))}}return c},o.decompile=function(d){const c={};for(let f in d){const m=d[f];if(f==="root"){c.root=m;continue}if(u.isTemplate(m)){c[f]=m.describe({compact:!0});continue}const p=f;for(f in c[p]={},m){const h=m[f];f!=="root"?c[p][f]=h.describe({compact:!0}):c[p].root=h}}return c},o.merge=function(d,c){if(!d)return o.compile(c);if(!c)return d;if(typeof c=="string")return new u(c);if(u.isTemplate(c))return c;const f=l(d);for(let m in c){const p=c[m];if(m==="root"||u.isTemplate(p)){f[m]=p;continue}if(typeof p=="string"){f[m]=new u(p);continue}a(typeof p=="object"&&!Array.isArray(p),"Invalid message for",m);const h=m;for(m in f[h]=f[h]||{},p){const y=p[m];m==="root"||u.isTemplate(y)?f[h][m]=y:(a(typeof y=="string","Invalid message for",m,"in",h),f[h][m]=new u(y))}}return f}},2294:(i,o,s)=>{const a=s(375),l=s(8160),u=s(6133),d={};o.Ids=d.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const c=new d.Ids;return c._byId=new Map(this._byId),c._byKey=new Map(this._byKey),c._schemaChain=this._schemaChain,c}concat(c){c._schemaChain&&(this._schemaChain=!0);for(const[f,m]of c._byId.entries())a(!this._byKey.has(f),"Schema id conflicts with existing key:",f),this._byId.set(f,m);for(const[f,m]of c._byKey.entries())a(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,m)}fork(c,f,m){const p=this._collect(c);p.push({schema:m});const h=p.shift();let y={id:h.id,schema:f(h.schema)};a(l.isSchema(y.schema),"adjuster function failed to return a joi schema type");for(const g of p)y={id:g.id,schema:d.fork(g.schema,y.id,y.schema)};return y.schema}labels(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const m=c[0],p=this._get(m);if(!p)return[...f,...c].join(".");const h=c.slice(1);return f=[...f,p.schema._flags.label||m],h.length?p.schema._ids.labels(h,f):f.join(".")}reach(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const m=c[0],p=this._get(m);a(p,"Schema does not contain path",[...f,...c].join("."));const h=c.slice(1);return h.length?p.schema._ids.reach(h,[...f,m]):p.schema}register(c){let{key:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!c||!l.isSchema(c))return;(c.$_property("schemaChain")||c._ids._schemaChain)&&(this._schemaChain=!0);const m=c._flags.id;if(m){const p=this._byId.get(m);a(!p||p.schema===c,"Cannot add different schemas with the same id:",m),a(!this._byKey.has(m),"Schema id conflicts with existing key:",m),this._byId.set(m,{schema:c,id:m})}f&&(a(!this._byKey.has(f),"Schema already contains key:",f),a(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,{schema:c,id:f}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];const p=c[0],h=this._get(p);a(h,"Schema does not contain path",[...f,...c].join(".")),m=[h,...m];const y=c.slice(1);return y.length?h.schema._ids._collect(y,[...f,p],m):m}_get(c){return this._byId.get(c)||this._byKey.get(c)}},d.fork=function(c,f,m){const p=o.schema(c,{each:(h,y)=>{let{key:g}=y;if(f===(h._flags.id||g))return m},ref:!1});return p?p.$_mutateRebuild():c},o.schema=function(c,f){let m;for(const p in c._flags){if(p[0]==="_")continue;const h=d.scan(c._flags[p],{source:"flags",name:p},f);h!==void 0&&(m=m||c.clone(),m._flags[p]=h)}for(let p=0;p{const a=s(375),l=s(8571),u=s(9621),d=s(8160);let c;const f={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};o.create=function(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(typeof m=="string","Invalid reference key:",m),d.assertOptions(p,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),a(!p.prefix||typeof p.prefix=="object","options.prefix must be of type object");const h=Object.assign({},f.defaults,p);delete h.prefix;const y=h.separator,g=f.context(m,y,p.prefix);if(h.type=g.type,m=g.key,h.type==="value")if(g.root&&(a(!y||m[0]!==y,"Cannot specify relative path with root prefix"),h.ancestor="root",m||(m=null)),y&&y===m)m=null,h.ancestor=0;else if(h.ancestor!==void 0)a(!y||!m||m[0]!==y,"Cannot combine prefix with ancestor option");else{const[b,v]=f.ancestor(m,y);v&&(m=m.slice(v))===""&&(m=null),h.ancestor=b}return h.path=y?m===null?[]:m.split(y):[m],new f.Ref(h)},o.in=function(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o.create(m,{...p,in:!0})},o.isRef=function(m){return!!m&&!!m[d.symbols.ref]},f.Ref=class{constructor(m){a(typeof m=="object","Invalid reference construction"),d.assertOptions(m,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),a([!1,void 0].includes(m.separator)||typeof m.separator=="string"&&m.separator.length===1,"Invalid separator"),a(!m.adjust||typeof m.adjust=="function","options.adjust must be a function"),a(!m.map||Array.isArray(m.map),"options.map must be an array"),a(!m.map||!m.adjust,"Cannot set both map and adjust options"),Object.assign(this,f.defaults,m),a(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(m,p,h,y){let g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};return a(!this.in||g.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(h.context,p,g):this.type==="local"?this._resolve(y,p,g):this.ancestor?this.ancestor==="root"?this._resolve(p.ancestors[p.ancestors.length-1],p,g):(a(this.ancestor<=p.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(p.ancestors[this.ancestor-1],p,g)):this._resolve(m,p,g)}_resolve(m,p,h){let y;if(this.type==="value"&&p.mainstay.shadow&&h.shadow!==!1&&(y=p.mainstay.shadow.get(this.absolute(p))),y===void 0&&(y=u(m,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(y=this.adjust(y)),this.map){const g=this.map.get(y);g!==void 0&&(y=g)}return p.mainstay&&p.mainstay.tracer.resolve(p,this,y),y}toString(){return this.display}absolute(m){return[...m.path.slice(0,-this.ancestor),...this.path]}clone(){return new f.Ref(this)}describe(){const m={path:this.path};this.type!=="value"&&(m.type=this.type),this.separator!=="."&&(m.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(m.ancestor=this.ancestor),this.map&&(m.map=[...this.map]);for(const p of["adjust","iterables","render"])this[p]!==null&&this[p]!==void 0&&(m[p]=this[p]);return this.in!==!1&&(m.in=!0),{ref:m}}updateDisplay(){const m=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${m}`);if(!this.separator)return void(this.display=`ref:${m}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${m}`);if(this.ancestor==="root")return void(this.display=`ref:root:${m}`);if(this.ancestor===1)return void(this.display=`ref:${m||".."}`);const p=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${p}${m||""}`}},f.Ref.prototype[d.symbols.ref]=!0,o.build=function(m){return(m=Object.assign({},f.defaults,m)).type==="value"&&m.ancestor===void 0&&(m.ancestor=1),new f.Ref(m)},f.context=function(m,p){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(m=m.trim(),h){const y=h.global===void 0?"$":h.global;if(y!==p&&m.startsWith(y))return{key:m.slice(y.length),type:"global"};const g=h.local===void 0?"#":h.local;if(g!==p&&m.startsWith(g))return{key:m.slice(g.length),type:"local"};const b=h.root===void 0?"/":h.root;if(b!==p&&m.startsWith(b))return{key:m.slice(b.length),type:"value",root:!0}}return{key:m,type:"value"}},f.ancestor=function(m,p){if(!p)return[1,0];if(m[0]!==p)return[1,0];if(m[1]!==p)return[0,1];let h=2;for(;m[h]===p;)++h;return[h-1,h]},o.toSibling=0,o.toParent=1,o.Manager=class{constructor(){this.refs=[]}register(m,p){if(m)if(p=p===void 0?o.toParent:p,Array.isArray(m))for(const h of m)this.register(h,p);else if(d.isSchema(m))for(const h of m._refs.refs)h.ancestor-p>=0&&this.refs.push({ancestor:h.ancestor-p,root:h.root});else o.isRef(m)&&m.type==="value"&&m.ancestor-p>=0&&this.refs.push({ancestor:m.ancestor-p,root:m.root}),c=c||s(3328),c.isTemplate(m)&&this.register(m.refs(),p)}get length(){return this.refs.length}clone(){const m=new o.Manager;return m.refs=l(this.refs),m}reset(){this.refs=[]}roots(){return this.refs.filter(m=>!m.ancestor).map(m=>m.root)}}},3378:(i,o,s)=>{const a=s(5107),l={};l.wrap=a.string().min(1).max(2).allow(!1),o.preferences=a.object({allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),context:a.object(),convert:a.boolean(),dateFormat:a.valid("date","iso","string","time","utc"),debug:a.boolean(),errors:{escapeHtml:a.boolean(),label:a.valid("path","key",!1),language:[a.string(),a.object().ref()],render:a.boolean(),stack:a.boolean(),wrap:{label:l.wrap,array:l.wrap,string:l.wrap}},externals:a.boolean(),messages:a.object(),noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:a.valid("required","optional","forbidden"),skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()}).strict(),l.nameRx=/^[a-zA-Z0-9]\w*$/,l.rule=a.object({alias:a.array().items(a.string().pattern(l.nameRx)).single(),args:a.array().items(a.string(),a.object({name:a.string().pattern(l.nameRx).required(),ref:a.boolean(),assert:a.alternatives([a.function(),a.object().schema()]).conditional("ref",{is:!0,then:a.required()}),normalize:a.function(),message:a.string().when("assert",{is:a.function(),then:a.required()})})),convert:a.boolean(),manifest:a.boolean(),method:a.function().allow(!1),multi:a.boolean(),validate:a.function()}),o.extension=a.object({type:a.alternatives([a.string(),a.object().regex()]).required(),args:a.function(),cast:a.object().pattern(l.nameRx,a.object({from:a.function().maxArity(1).required(),to:a.function().minArity(1).maxArity(2).required()})),base:a.object().schema().when("type",{is:a.object().regex(),then:a.forbidden()}),coerce:[a.function().maxArity(3),a.object({method:a.function().maxArity(3).required(),from:a.array().items(a.string()).single()})],flags:a.object().pattern(l.nameRx,a.object({setter:a.string(),default:a.any()})),manifest:{build:a.function().arity(2)},messages:[a.object(),a.string()],modifiers:a.object().pattern(l.nameRx,a.function().minArity(1).maxArity(2)),overrides:a.object().pattern(l.nameRx,a.function()),prepare:a.function().maxArity(3),rebuild:a.function().arity(1),rules:a.object().pattern(l.nameRx,l.rule),terms:a.object().pattern(l.nameRx,a.object({init:a.array().allow(null).required(),manifest:a.object().pattern(/.+/,[a.valid("schema","single"),a.object({mapped:a.object({from:a.string().required(),to:a.string().required()}).required()})])})),validate:a.function().maxArity(3)}).strict(),o.extensions=a.array().items(a.object(),a.function().arity(1)).strict(),l.desc={buffer:a.object({buffer:a.string()}),func:a.object({function:a.function().required(),options:{literal:!0}}),override:a.object({override:!0}),ref:a.object({ref:a.object({type:a.valid("value","global","local"),path:a.array().required(),separator:a.string().length(1).allow(!1),ancestor:a.number().min(0).integer().allow("root"),map:a.array().items(a.array().length(2)).min(1),adjust:a.function(),iterables:a.boolean(),in:a.boolean(),render:a.boolean()}).required()}),regex:a.object({regex:a.string().min(3)}),special:a.object({special:a.valid("deep").required()}),template:a.object({template:a.string().required(),options:a.object()}),value:a.object({value:a.alternatives([a.object(),a.array()]).required()})},l.desc.entity=a.alternatives([a.array().items(a.link("...")),a.boolean(),a.function(),a.number(),a.string(),l.desc.buffer,l.desc.func,l.desc.ref,l.desc.regex,l.desc.special,l.desc.template,l.desc.value,a.link("/")]),l.desc.values=a.array().items(null,a.boolean(),a.function(),a.number().allow(1/0,-1/0),a.string().allow(""),a.symbol(),l.desc.buffer,l.desc.func,l.desc.override,l.desc.ref,l.desc.regex,l.desc.template,l.desc.value),l.desc.messages=a.object().pattern(/.+/,[a.string(),l.desc.template,a.object().pattern(/.+/,[a.string(),l.desc.template])]),o.description=a.object({type:a.string().required(),flags:a.object({cast:a.string(),default:a.any(),description:a.string(),empty:a.link("/"),failover:l.desc.entity,id:a.string(),label:a.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:a.boolean(),unit:a.string()}).unknown(),preferences:{allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),convert:a.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:a.boolean(),label:["path","key"],language:[a.string(),l.desc.ref],wrap:{label:l.wrap,array:l.wrap}},externals:a.boolean(),messages:l.desc.messages,noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:["required","optional","forbidden"],skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()},allow:l.desc.values,invalid:l.desc.values,rules:a.array().min(1).items({name:a.string().required(),args:a.object().min(1),keep:a.boolean(),message:[a.string(),l.desc.messages],warn:a.boolean()}),keys:a.object().pattern(/.*/,a.link("/")),link:l.desc.ref}).pattern(/^[a-z]\w*$/,a.any())},493:(i,o,s)=>{const a=s(8571),l=s(9621),u=s(8160),d={value:Symbol("value")};i.exports=d.State=class{constructor(c,f,m){this.path=c,this.ancestors=f,this.mainstay=m.mainstay,this.schemas=m.schemas,this.debug=null}localize(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const p=new d.State(c,f,this);return m&&p.schemas&&(p.schemas=[d.schemas(m),...p.schemas]),p}nest(c,f){const m=new d.State(this.path,this.ancestors,this);return m.schemas=m.schemas&&[d.schemas(c),...m.schemas],m.debug=f,m}shadow(c,f){this.mainstay.shadow=this.mainstay.shadow||new d.Shadow,this.mainstay.shadow.set(this.path,c,f)}snapshot(){this.mainstay.shadow&&(this._snapshot=a(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}},d.schemas=function(c){return u.isSchema(c)?{schema:c}:c},d.Shadow=class{constructor(){this._values=null}set(c,f,m){if(!c.length||m==="strip"&&typeof c[c.length-1]=="number")return;this._values=this._values||new Map;let p=this._values;for(let h=0;h{const a=s(375),l=s(8571),u=s(5277),d=s(1447),c=s(8160),f=s(6354),m=s(6133),p={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};i.exports=p.Template=class{constructor(h,y){a(typeof h=="string","Template source must be a string"),a(!h.includes("\0")&&!h.includes(""),"Template source cannot contain reserved control characters"),this.source=h,this.rendered=h,this._template=null,this._settings=l(y),this._parse()}_parse(){if(!this.source.includes("{"))return;const h=p.encode(this.source),y=p.split(h);let g=!1;const b=[],v=y.shift();v&&b.push(v);for(const w of y){const E=w[0]!=="{",C=E?"}":"}}",k=w.indexOf(C);if(k===-1||w[1]==="{"){b.push(`{${p.decode(w)}`);continue}let _=w.slice(E?0:1,k);const S=_[0]===":";S&&(_=_.slice(1));const A=this._ref(p.decode(_),{raw:E,wrapped:S});b.push(A),typeof A!="string"&&(g=!0);const I=w.slice(k+C.length);I&&b.push(p.decode(I))}g?this._template=b:this.rendered=b.join("")}static date(h,y){return p.dateFormat[y.dateFormat].call(h)}describe(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this._settings&&h.compact)return this.source;const y={template:this.source};return this._settings&&(y.options=this._settings),y}static build(h){return new p.Template(h.template,h.options)}isDynamic(){return!!this._template}static isTemplate(h){return!!h&&!!h[c.symbols.template]}refs(){if(!this._template)return;const h=[];for(const y of this._template)typeof y!="string"&&h.push(...y.refs);return h}resolve(h,y,g,b){return this._template&&this._template.length===1?this._part(this._template[0],h,y,g,b,{}):this.render(h,y,g,b)}_part(h){for(var y=arguments.length,g=new Array(y>1?y-1:0),b=1;b4&&arguments[4]!==void 0?arguments[4]:{};if(!this.isDynamic())return this.rendered;const w=[];for(const E of this._template)if(typeof E=="string")w.push(E);else{const C=this._part(E,h,y,g,b,v),k=p.stringify(C,h,y,g,b,v);if(k!==void 0){const _=E.raw||(v.errors&&v.errors.escapeHtml)===!1?k:u(k);w.push(p.wrap(_,E.wrapped&&g.errors.wrap.label))}}return w.join("")}_ref(h,y){let{raw:g,wrapped:b}=y;const v=[],w=C=>{const k=m.create(C,this._settings);return v.push(k),_=>k.resolve(..._)};try{var E=new d.Parser(h,{reference:w,functions:p.functions,constants:p.constants})}catch(C){throw C.message=`Invalid template variable "${h}" fails due to: ${C.message}`,C}if(E.single){if(E.single.type==="reference"){const C=v[0];return{ref:C,raw:g,refs:v,wrapped:b||C.type==="local"&&C.key==="label"}}return p.stringify(E.single.value)}return{formula:E,raw:g,refs:v}}toString(){return this.source}},p.Template.prototype[c.symbols.template]=!0,p.Template.prototype.isImmutable=!0,p.encode=function(h){return h.replace(/\\(\{+)/g,(y,g)=>p.opens.slice(0,g.length)).replace(/\\(\}+)/g,(y,g)=>p.closes.slice(0,g.length))},p.decode=function(h){return h.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},p.split=function(h){const y=[];let g="";for(let b=0;b5&&arguments[5]!==void 0?arguments[5]:{};const E=typeof h,C=b&&b.errors&&b.errors.wrap||{};let k=!1;if(m.isRef(h)&&h.render&&(k=h.in,h=h.resolve(y,g,b,v,{in:h.in,...w})),h===null)return"null";if(E==="string")return p.wrap(h,w.arrayItems&&C.string);if(E==="number"||E==="function"||E==="symbol")return h.toString();if(E!=="object")return JSON.stringify(h);if(h instanceof Date)return p.Template.date(h,b);if(h instanceof Map){const S=[];for(const[A,I]of h.entries())S.push(`${A.toString()} -> ${I.toString()}`);h=S}if(!Array.isArray(h))return h.toString();const _=[];for(const S of h)_.push(p.stringify(S,y,g,b,v,{arrayItems:!0,...w}));return p.wrap(_.join(", "),!k&&C.array)},p.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},p.functions={if:(h,y,g)=>h?y:g,length:h=>typeof h=="string"?h.length:h&&typeof h=="object"?Array.isArray(h)?h.length:Object.keys(h).length:null,msg(h){const[y,g,b,v,w]=this,E=w.messages;if(!E)return"";const C=f.template(y,E[0],h,g,b)||f.template(y,E[1],h,g,b);return C?C.render(y,g,b,v,w):""},number:h=>typeof h=="number"?h:typeof h=="string"?parseFloat(h):typeof h=="boolean"?h?1:0:h instanceof Date?h.getTime():null}},4946:(i,o,s)=>{const a=s(375),l=s(1687),u=s(8068),d=s(8160),c=s(3292),f=s(6354),m=s(6133),p={};i.exports=u.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:m.toSibling}},args(h){for(var y=arguments.length,g=new Array(y>1?y-1:0),b=1;bf.details(S,{override:!1}))})};if(g._flags.match==="one")return C.length===1?{value:C[0]}:{errors:b("alternatives.one")};if(C.length!==g.$_terms.matches.length)return{errors:b("alternatives.all",{details:k.map(S=>f.details(S,{override:!1}))})};const _=S=>S.$_terms.matches.some(A=>A.schema.type==="object"||A.schema.type==="alternatives"&&_(A.schema));return _(g)?{value:C.reduce((S,A)=>l(S,A,{mergeArrays:!1}))}:{value:C[C.length-1]}}const E=[];for(let C=0;Cg.path[0]!=="is"?y.label(h):void 0,ref:!1})}},rebuild(h){h.$_modify({each:y=>{d.isSchema(y)&&y.type==="array"&&h.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(h,y){if(y.matches)for(const g of y.matches){const{schema:b,ref:v,is:w,not:E,then:C,otherwise:k}=g;h=b?h.try(b):v?h.conditional(v,{is:w,then:C,not:E,otherwise:k,switch:g.switch}):h.conditional(w,{then:C,otherwise:k})}return h}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),p.errors=function(h,y){let{error:g,state:b}=y;if(!h.length)return{errors:g("alternatives.any")};if(h.length===1)return{errors:h[0].reports};const v=new Set,w=[];for(const{reports:E,schema:C}of h){if(E.length>1)return p.unmatched(h,g);const k=E[0];if(k instanceof f.Report==0)return p.unmatched(h,g);if(k.state.path.length!==b.path.length){w.push({type:C.type,report:k});continue}if(k.code==="any.only"){for(const A of k.local.valids)v.add(A);continue}const[_,S]=k.code.split(".");S==="base"?v.add(_):w.push({type:C.type,report:k})}return w.length?w.length===1?{errors:w[0].report}:p.unmatched(h,g):{errors:g("alternatives.types",{types:[...v]})}},p.unmatched=function(h,y){const g=[];for(const b of h)g.push(...b.reports);return{errors:y("alternatives.match",f.details(g,{override:!1}))}}},8068:(i,o,s)=>{const a=s(375),l=s(7629),u=s(8160),d=s(6914);i.exports=l.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(c,f){return a(typeof c=="function","Method must be a function"),a(f===void 0||f&&typeof f=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:c,description:f}})},validate(c,f,m){let{method:p}=m;try{return p(c,f)}catch(h){return f.error("any.custom",{error:h})}},args:["method","description"],multi:!0},messages:{method(c){return this.prefs({messages:c})}},shared:{method(c){a(u.isSchema(c)&&c._flags.id,"Schema must be a schema with an id");const f=this.clone();return f.$_terms.shared=f.$_terms.shared||[],f.$_terms.shared.push(c),f.$_mutateRegister(c),f}},warning:{method(c,f){return a(c&&typeof c=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:c,local:f},warn:!0})},validate(c,f,m){let{code:p,local:h}=m;return f.error(p,h)},args:["code","local"],multi:!0}},modifiers:{keep(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.keep=f},message(c,f){c.message=d.compile(f)},warn(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.warn=f}},manifest:{build(c,f){for(const m in f){const p=f[m];if(["examples","externals","metas","notes","tags"].includes(m))for(const h of p)c=c[m.slice(0,-1)](h);else if(m!=="alterations")if(m!=="whens"){if(m==="shared")for(const h of p)c=c.shared(h)}else for(const h of p){const{ref:y,is:g,not:b,then:v,otherwise:w,concat:E}=h;c=E?c.concat(E):y?c.when(y,{is:g,not:b,then:v,otherwise:w,switch:h.switch,break:h.break}):c.when(g,{then:v,otherwise:w,break:h.break})}else{const h={};for(const{target:y,adjuster:g}of p)h[y]=g;c=c.alter(h)}}return c}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(i,o,s)=>{const a=s(375),l=s(9474),u=s(9621),d=s(8068),c=s(8160),f=s(3292),m={};i.exports=d.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(p,h){let{schema:y,state:g,prefs:b}=h;if(!Array.isArray(p))return;const v=y.$_getRule("sort");return v?m.sort(y,p,v.args.options,g,b):void 0}},validate(p,h){let{schema:y,error:g}=h;if(!Array.isArray(p)){if(y._flags.single){const b=[p];return b[c.symbols.arraySingle]=!0,{value:b}}return{errors:g("array.base")}}if(y.$_getRule("items")||y.$_terms.externals)return{value:p.slice()}},rules:{has:{method(p){p=this.$_compile(p,{appendPath:!0});const h=this.$_addRule({name:"has",args:{schema:p}});return h.$_mutateRegister(p),h},validate(p,h,y){let{state:g,prefs:b,error:v}=h,{schema:w}=y;const E=[p,...g.ancestors];for(let k=0;kthis.$_compile(h[b]),b,{append:!0});g.$_terms.items.push(v)}return g.$_mutateRebuild()},validate(p,h){let{schema:y,error:g,state:b,prefs:v,errorsArray:w}=h;const E=y.$_terms._requireds.slice(),C=y.$_terms.ordered.slice(),k=[...y.$_terms._inclusions,...E],_=!p[c.symbols.arraySingle];delete p[c.symbols.arraySingle];const S=w();let A=p.length;for(let I=0;I="})}},ordered:{method(){for(var p=arguments.length,h=new Array(p),y=0;ythis.$_compile(h[b]),b,{append:!0});m.validateSingle(v,g),g.$_mutateRegister(v),g.$_terms.ordered.push(v)}return g.$_mutateRebuild()}},single:{method(p){const h=p===void 0||!!p;return a(!h||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",h)}},sort:{method(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c.assertOptions(p,["by","order"]);const h={order:p.order||"ascending"};return p.by&&(h.by=f.ref(p.by,{ancestor:0}),a(!h.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:h}})},validate(p,h,y){let{error:g,state:b,prefs:v,schema:w}=h,{options:E}=y;const{value:C,errors:k}=m.sort(w,p,E,b,v);if(k)return k;for(let _=0;_1&&arguments[1]!==void 0?arguments[1]:{};a(!p||typeof p=="function"||typeof p=="string","comparator must be a function or a string"),c.assertOptions(h,["ignoreUndefined","separator"]);const y={name:"unique",args:{options:h,comparator:p}};if(p)if(typeof p=="string"){const g=c.default(h.separator,".");y.path=g?p.split(g):[p]}else y.comparator=p;return this.$_addRule(y)},validate(p,h,y,g){let{state:b,error:v,schema:w}=h,{comparator:E,options:C}=y,{comparator:k,path:_}=g;const S={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},A=k||l,I=C.ignoreUndefined;for(let L=0;Lnew Set(p)}},rebuild(p){p.$_terms._inclusions=[],p.$_terms._exclusions=[],p.$_terms._requireds=[];for(const h of p.$_terms.items)m.validateSingle(h,p),h._flags.presence==="required"?p.$_terms._requireds.push(h):h._flags.presence==="forbidden"?p.$_terms._exclusions.push(h):p.$_terms._inclusions.push(h);for(const h of p.$_terms.ordered)m.validateSingle(h,p)},manifest:{build:(p,h)=>(h.items&&(p=p.items(...h.items)),h.ordered&&(p=p.ordered(...h.ordered)),p)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),m.fillMissedErrors=function(p,h,y,g,b,v){const w=[];let E=0;for(const C of y){const k=C._flags.label;k?w.push(k):++E}w.length?E?h.push(p.$_createError("array.includesRequiredBoth",g,{knownMisses:w,unknownMisses:E},b,v)):h.push(p.$_createError("array.includesRequiredKnowns",g,{knownMisses:w},b,v)):h.push(p.$_createError("array.includesRequiredUnknowns",g,{unknownMisses:E},b,v))},m.fillOrderedErrors=function(p,h,y,g,b,v){const w=[];for(const E of y)E._flags.presence==="required"&&w.push(E);w.length&&m.fillMissedErrors(p,h,w,g,b,v)},m.fillDefault=function(p,h,y,g){const b=[];let v=!0;for(let w=p.length-1;w>=0;--w){const E=p[w],C=[h,...y.ancestors],k=E.$_validate(void 0,y.localize(y.path,C,E),g).value;if(v){if(k===void 0)continue;v=!1}b.unshift(k)}b.length&&h.push(...b)},m.fastSplice=function(p,h){let y=h;for(;y{let S=m.compare(k,_,w,E);if(S!==null||(y.by&&(k=y.by.resolve(k,g,b),_=y.by.resolve(_,g,b)),S=m.compare(k,_,w,E),S!==null))return S;const A=typeof k;if(A!==typeof _)throw p.$_createError("array.sort.mismatching",h,null,g,b);if(A!=="number"&&A!=="string")throw p.$_createError("array.sort.unsupported",h,{type:A},g,b);return A==="number"?(k-_)*v:k<_?w:E};try{return{value:h.slice().sort(C)}}catch(k){return{errors:k}}},m.compare=function(p,h,y,g){return p===h?0:p===void 0?1:h===void 0?-1:p===null?g:h===null?y:null}},4937:(i,o,s)=>{const a=s(375),l=s(8068),u=s(8160),d=s(2036),c={isBool:function(f){return typeof f=="boolean"}};i.exports=l.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(f,m){let{schema:p}=m;if(typeof f!="boolean"){if(typeof f=="string"){const h=p._flags.sensitive?f:f.toLowerCase();f=h==="true"||h!=="false"&&f}return typeof f!="boolean"&&(f=p.$_terms.truthy&&p.$_terms.truthy.has(f,null,null,!p._flags.sensitive)||(!p.$_terms.falsy||!p.$_terms.falsy.has(f,null,null,!p._flags.sensitive))&&f),{value:f}}},validate(f,m){let{error:p}=m;if(typeof f!="boolean")return{value:f,errors:p("boolean.base")}},rules:{truthy:{method(){for(var f=arguments.length,m=new Array(f),p=0;p0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("sensitive",f)}}},cast:{number:{from:c.isBool,to:(f,m)=>f?1:0},string:{from:c.isBool,to:(f,m)=>f?"true":"false"}},manifest:{build:(f,m)=>(m.truthy&&(f=f.truthy(...m.truthy)),m.falsy&&(f=f.falsy(...m.falsy)),f)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(i,o,s)=>{const a=s(375),l=s(8068),u=s(8160),d=s(3328),c={isDate:function(f){return f instanceof Date}};i.exports=l.extend({type:"date",coerce:{from:["number","string"],method(f,m){let{schema:p}=m;return{value:c.parse(f,p._flags.format)||f}}},validate(f,m){let{schema:p,error:h,prefs:y}=m;if(f instanceof Date&&!isNaN(f.getTime()))return;const g=p._flags.format;return y.convert&&g&&typeof f=="string"?{value:f,errors:h("date.format",{format:g})}:{value:f,errors:h("date.base")}},rules:{compare:{method:!1,validate(f,m,p,h){let{date:y}=p,{name:g,operator:b,args:v}=h;const w=y==="now"?Date.now():y.getTime();return u.compare(f.getTime(),w,b)?f:m.error("date."+g,{limit:v.date,value:f})},args:[{name:"date",ref:!0,normalize:f=>f==="now"?f:c.parse(f),assert:f=>f!==null,message:"must have a valid date format"}]},format:{method(f){return a(["iso","javascript","unix"].includes(f),"Unknown date format",f),this.$_setFlag("format",f)}},greater:{method(f){return this.$_addRule({name:"greater",method:"compare",args:{date:f},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(f){return this.$_addRule({name:"less",method:"compare",args:{date:f},operator:"<"})}},max:{method(f){return this.$_addRule({name:"max",method:"compare",args:{date:f},operator:"<="})}},min:{method(f){return this.$_addRule({name:"min",method:"compare",args:{date:f},operator:">="})}},timestamp:{method(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"javascript";return a(["javascript","unix"].includes(f),'"type" must be one of "javascript, unix"'),this.format(f)}}},cast:{number:{from:c.isDate,to:(f,m)=>f.getTime()},string:{from:c.isDate,to(f,m){let{prefs:p}=m;return d.date(f,p)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),c.parse=function(f,m){if(f instanceof Date)return f;if(typeof f!="string"&&(isNaN(f)||!isFinite(f))||/^\s*$/.test(f))return null;if(m==="iso")return u.isIsoDate(f)?c.date(f.toString()):null;const p=f;if(typeof f=="string"&&/^[+-]?\d+(\.\d+)?$/.test(f)&&(f=parseFloat(f)),m){if(m==="javascript")return c.date(1*f);if(m==="unix")return c.date(1e3*f);if(typeof p=="string")return null}return c.date(f)},c.date=function(f){const m=new Date(f);return isNaN(m.getTime())?null:m}},390:(i,o,s)=>{const a=s(375),l=s(7824);i.exports=l.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(u){return a(Number.isSafeInteger(u)&&u>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:u}})},validate(u,d,c){let{n:f}=c;return u.length===f?u:d.error("function.arity",{n:f})}},class:{method(){return this.$_addRule("class")},validate:(u,d)=>/^\s*class\s/.test(u.toString())?u:d.error("function.class",{value:u})},minArity:{method(u){return a(Number.isSafeInteger(u)&&u>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:u}})},validate(u,d,c){let{n:f}=c;return u.length>=f?u:d.error("function.minArity",{n:f})}},maxArity:{method(u){return a(Number.isSafeInteger(u)&&u>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:u}})},validate(u,d,c){let{n:f}=c;return u.length<=f?u:d.error("function.maxArity",{n:f})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(i,o,s)=>{const a=s(978),l=s(375),u=s(8571),d=s(3652),c=s(8068),f=s(8160),m=s(3292),p=s(6354),h=s(6133),y=s(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};i.exports=c.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(b,v)=>b.keys(v),validate(b,v){let{schema:w,error:E,state:C,prefs:k}=v;if(!b||typeof b!==w.$_property("typeof")||Array.isArray(b))return{value:b,errors:E("object.base",{type:w.$_property("typeof")})};if(!(w.$_terms.renames||w.$_terms.dependencies||w.$_terms.keys||w.$_terms.patterns||w.$_terms.externals))return;b=g.clone(b,k);const _=[];if(w.$_terms.renames&&!g.rename(w,b,C,k,_))return{value:b,errors:_};if(!w.$_terms.keys&&!w.$_terms.patterns&&!w.$_terms.dependencies)return{value:b,errors:_};const S=new Set(Object.keys(b));if(w.$_terms.keys){const A=[b,...C.ancestors];for(const I of w.$_terms.keys){const L=I.key,F=b[L];S.delete(L);const N=C.localize([...C.path,L],A,I),R=I.schema.$_validate(F,N,k);if(R.errors){if(k.abortEarly)return{value:b,errors:R.errors};R.value!==void 0&&(b[L]=R.value),_.push(...R.errors)}else I.schema._flags.result==="strip"||R.value===void 0&&F!==void 0?delete b[L]:R.value!==void 0&&(b[L]=R.value)}}if(S.size||w._flags._hasPatternMatch){const A=g.unknown(w,b,S,_,C,k);if(A)return A}if(w.$_terms.dependencies)for(const A of w.$_terms.dependencies){if(A.key!==null&&g.isPresent(A.options)(A.key.resolve(b,C,k,null,{shadow:!1}))===!1)continue;const I=g.dependencies[A.rel](w,A,b,C,k);if(I){const L=w.$_createError(I.code,b,I.context,C,k);if(k.abortEarly)return{value:b,errors:L};_.push(L)}}return{value:b,errors:_}},rules:{and:{method(){for(var b=arguments.length,v=new Array(b),w=0;w!b.hasOwnProperty(w.key)):new g.Keys;for(const w in b)f.tryWithPath(()=>v.$_terms.keys.push({key:w,schema:this.$_compile(b[w])}),w)}else v.$_terms.keys=new g.Keys;else v.$_terms.keys=null;return v.$_mutateRebuild()}},length:{method(b){return this.$_addRule({name:"length",args:{limit:b},operator:"="})},validate(b,v,w,E){let{limit:C}=w,{name:k,operator:_,args:S}=E;return f.compare(Object.keys(b).length,C,_)?b:v.error("object."+k,{limit:S.limit,value:b})},args:[{name:"limit",ref:!0,assert:f.limit,message:"must be a positive integer"}]},max:{method(b){return this.$_addRule({name:"max",method:"length",args:{limit:b},operator:"<="})}},min:{method(b){return this.$_addRule({name:"min",method:"length",args:{limit:b},operator:">="})}},nand:{method(){for(var b=arguments.length,v=new Array(b),w=0;w2&&arguments[2]!==void 0?arguments[2]:{};const E=b instanceof RegExp;E||(b=this.$_compile(b,{appendPath:!0})),l(v!==void 0,"Invalid rule"),f.assertOptions(w,["fallthrough","matches"]),E&&l(!b.flags.includes("g")&&!b.flags.includes("y"),"pattern should not use global or sticky mode"),v=this.$_compile(v,{appendPath:!0});const C=this.clone();C.$_terms.patterns=C.$_terms.patterns||[];const k={[E?"regex":"schema"]:b,rule:v};return w.matches&&(k.matches=this.$_compile(w.matches),k.matches.type!=="array"&&(k.matches=k.matches.$_root.array().items(k.matches)),C.$_mutateRegister(k.matches),C.$_setFlag("_hasPatternMatch",!0,{clone:!1})),w.fallthrough&&(k.fallthrough=!0),C.$_terms.patterns.push(k),C.$_mutateRegister(v),C}},ref:{method(){return this.$_addRule("ref")},validate:(b,v)=>h.isRef(b)?b:v.error("object.refType",{value:b})},regex:{method(){return this.$_addRule("regex")},validate:(b,v)=>b instanceof RegExp?b:v.error("object.regex",{value:b})},rename:{method(b,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(typeof b=="string"||b instanceof RegExp,"Rename missing the from argument"),l(typeof v=="string"||v instanceof y,"Invalid rename to argument"),l(v!==b,"Cannot rename key to same name:",b),f.assertOptions(w,["alias","ignoreUndefined","override","multiple"]);const E=this.clone();E.$_terms.renames=E.$_terms.renames||[];for(const C of E.$_terms.renames)l(C.from!==b,"Cannot rename the same key multiple times");return v instanceof y&&E.$_mutateRegister(v),E.$_terms.renames.push({from:b,to:v,options:a(g.renameDefaults,w)}),E}},schema:{method(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:b}})},validate(b,v,w){let{type:E}=w;return!f.isSchema(b)||E!=="any"&&b.type!==E?v.error("object.schema",{type:E}):b}},unknown:{method(b){return this.$_setFlag("unknown",b!==!1)}},with:{method(b,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"with",b,v,w)}},without:{method(b,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"without",b,v,w)}},xor:{method(){for(var b=arguments.length,v=new Array(b),w=0;wv.add(w,{after:w.schema.$_rootReferences(),group:w.key}),w.key);b.$_terms.keys=new g.Keys(...v.nodes)}},manifest:{build(b,v){if(v.keys&&(b=b.keys(v.keys)),v.dependencies)for(const{rel:w,key:E=null,peers:C,options:k}of v.dependencies)b=g.dependency(b,w,E,C,k);if(v.patterns)for(const{regex:w,schema:E,rule:C,fallthrough:k,matches:_}of v.patterns)b=b.pattern(w||E,C,{fallthrough:k,matches:_});if(v.renames)for(const{from:w,to:E,options:C}of v.renames)b=b.rename(w,E,C);return b}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(b,v){if(typeof b=="object"){if(v.nonEnumerables)return u(b,{shallow:!0});const E=Object.create(Object.getPrototypeOf(b));return Object.assign(E,b),E}const w=function(){for(var E=arguments.length,C=new Array(E),k=0;k1&&typeof E[E.length-1]=="object"?E.pop():{}),f.assertOptions(C,["separator","isPresent"]),E=[].concat(E);const k=f.default(C.separator,"."),_=[];for(const A of E)l(typeof A=="string",v,"peers must be strings"),_.push(m.ref(A,{separator:k,ancestor:0,prefix:!1}));w!==null&&(w=m.ref(w,{separator:k,ancestor:0,prefix:!1}));const S=b.clone();return S.$_terms.dependencies=S.$_terms.dependencies||[],S.$_terms.dependencies.push(new g.Dependency(v,w,_,E,C)),S},g.dependencies={and(b,v,w,E,C){const k=[],_=[],S=v.peers.length,A=g.isPresent(v.options);for(const I of v.peers)A(I.resolve(w,E,C,null,{shadow:!1}))===!1?k.push(I.key):_.push(I.key);if(k.length!==S&&_.length!==S)return{code:"object.and",context:{present:_,presentWithLabels:g.keysToLabels(b,_),missing:k,missingWithLabels:g.keysToLabels(b,k)}}},nand(b,v,w,E,C){const k=[],_=g.isPresent(v.options);for(const I of v.peers)_(I.resolve(w,E,C,null,{shadow:!1}))&&k.push(I.key);if(k.length!==v.peers.length)return;const S=v.paths[0],A=v.paths.slice(1);return{code:"object.nand",context:{main:S,mainWithLabel:g.keysToLabels(b,S),peers:A,peersWithLabels:g.keysToLabels(b,A)}}},or(b,v,w,E,C){const k=g.isPresent(v.options);for(const _ of v.peers)if(k(_.resolve(w,E,C,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:v.paths,peersWithLabels:g.keysToLabels(b,v.paths)}}},oxor(b,v,w,E,C){const k=[],_=g.isPresent(v.options);for(const A of v.peers)_(A.resolve(w,E,C,null,{shadow:!1}))&&k.push(A.key);if(!k.length||k.length===1)return;const S={peers:v.paths,peersWithLabels:g.keysToLabels(b,v.paths)};return S.present=k,S.presentWithLabels=g.keysToLabels(b,k),{code:"object.oxor",context:S}},with(b,v,w,E,C){const k=g.isPresent(v.options);for(const _ of v.peers)if(k(_.resolve(w,E,C,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:v.key.key,mainWithLabel:g.keysToLabels(b,v.key.key),peer:_.key,peerWithLabel:g.keysToLabels(b,_.key)}}},without(b,v,w,E,C){const k=g.isPresent(v.options);for(const _ of v.peers)if(k(_.resolve(w,E,C,null,{shadow:!1})))return{code:"object.without",context:{main:v.key.key,mainWithLabel:g.keysToLabels(b,v.key.key),peer:_.key,peerWithLabel:g.keysToLabels(b,_.key)}}},xor(b,v,w,E,C){const k=[],_=g.isPresent(v.options);for(const A of v.peers)_(A.resolve(w,E,C,null,{shadow:!1}))&&k.push(A.key);if(k.length===1)return;const S={peers:v.paths,peersWithLabels:g.keysToLabels(b,v.paths)};return k.length===0?{code:"object.missing",context:S}:(S.present=k,S.presentWithLabels=g.keysToLabels(b,k),{code:"object.xor",context:S})}},g.keysToLabels=function(b,v){return Array.isArray(v)?v.map(w=>b.$_mapLabels(w)):b.$_mapLabels(v)},g.isPresent=function(b){return typeof b.isPresent=="function"?b.isPresent:v=>v!==void 0},g.rename=function(b,v,w,E,C){const k={};for(const _ of b.$_terms.renames){const S=[],A=typeof _.from!="string";if(A)for(const I in v){if(v[I]===void 0&&_.options.ignoreUndefined||I===_.to)continue;const L=_.from.exec(I);L&&S.push({from:I,to:_.to,match:L})}else!Object.prototype.hasOwnProperty.call(v,_.from)||v[_.from]===void 0&&_.options.ignoreUndefined||S.push(_);for(const I of S){const L=I.from;let F=I.to;if(F instanceof y&&(F=F.render(v,w,E,I.match)),L!==F){if(!_.options.multiple&&k[F]&&(C.push(b.$_createError("object.rename.multiple",v,{from:L,to:F,pattern:A},w,E)),E.abortEarly)||Object.prototype.hasOwnProperty.call(v,F)&&!_.options.override&&!k[F]&&(C.push(b.$_createError("object.rename.override",v,{from:L,to:F,pattern:A},w,E)),E.abortEarly))return!1;v[L]===void 0?delete v[F]:v[F]=v[L],k[F]=!0,_.options.alias||delete v[L]}}}return!0},g.unknown=function(b,v,w,E,C,k){if(b.$_terms.patterns){let _=!1;const S=b.$_terms.patterns.map(I=>{if(I.matches)return _=!0,[]}),A=[v,...C.ancestors];for(const I of w){const L=v[I],F=[...C.path,I];for(let N=0;N{const a=s(375),l=s(8068),u=s(8160),d=s(3292),c=s(6354),f={};i.exports=l.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(m,p)=>m.ref(p),validate(m,p){let{schema:h,state:y,prefs:g}=p;a(h.$_terms.link,"Uninitialized link schema");const b=f.generate(h,m,y,g),v=h.$_terms.link[0].ref;return b.$_validate(m,y.nest(b,`link:${v.display}:${b.type}`),g)},generate:(m,p,h,y)=>f.generate(m,p,h,y),rules:{ref:{method(m){a(!this.$_terms.link,"Cannot reinitialize schema"),m=d.ref(m),a(m.type==="value"||m.type==="local","Invalid reference type:",m.type),a(m.type==="local"||m.ancestor==="root"||m.ancestor>0,"Link cannot reference itself");const p=this.clone();return p.$_terms.link=[{ref:m}],p}},relative:{method(){let m=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("relative",m)}}},overrides:{concat(m){a(this.$_terms.link,"Uninitialized link schema"),a(u.isSchema(m),"Invalid schema object"),a(m.type!=="link","Cannot merge type link with another link");const p=this.clone();return p.$_terms.whens||(p.$_terms.whens=[]),p.$_terms.whens.push({concat:m}),p.$_mutateRebuild()}},manifest:{build:(m,p)=>(a(p.link,"Invalid link description missing link"),m.ref(p.link))}}),f.generate=function(m,p,h,y){let g=h.mainstay.links.get(m);if(g)return g._generate(p,h,y).schema;const b=m.$_terms.link[0].ref,{perspective:v,path:w}=f.perspective(b,h);f.assert(v,"which is outside of schema boundaries",b,m,h,y);try{g=w.length?v.$_reach(w):v}catch{f.assert(!1,"to non-existing schema",b,m,h,y)}return f.assert(g.type!=="link","which is another link",b,m,h,y),m._flags.relative||h.mainstay.links.set(m,g),g._generate(p,h,y).schema},f.perspective=function(m,p){if(m.type==="local"){for(const{schema:h,key:y}of p.schemas){if((h._flags.id||y)===m.path[0])return{perspective:h,path:m.path.slice(1)};if(h.$_terms.shared){for(const g of h.$_terms.shared)if(g._flags.id===m.path[0])return{perspective:g,path:m.path.slice(1)}}}return{perspective:null,path:null}}return m.ancestor==="root"?{perspective:p.schemas[p.schemas.length-1].schema,path:m.path}:{perspective:p.schemas[m.ancestor]&&p.schemas[m.ancestor].schema,path:m.path}},f.assert=function(m,p,h,y,g,b){m||a(!1,`"${c.label(y._flags,g,b)}" contains link reference "${h.display}" ${p}`)}},3832:(i,o,s)=>{const a=s(375),l=s(8068),u=s(8160),d={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};i.exports=l.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(c,f){let{schema:m,error:p}=f;if(!c.match(d.numberRx))return;c=c.trim();const h={value:parseFloat(c)};if(h.value===0&&(h.value=0),!m._flags.unsafe)if(c.match(/e/i)){if(d.extractSignificantDigits(c)!==d.extractSignificantDigits(String(h.value)))return h.errors=p("number.unsafe"),h}else{const y=h.value.toString();if(y.match(/e/i))return h;if(y!==d.normalizeDecimal(c))return h.errors=p("number.unsafe"),h}return h}},validate(c,f){let{schema:m,error:p,prefs:h}=f;if(c===1/0||c===-1/0)return{value:c,errors:p("number.infinity")};if(!u.isNumber(c))return{value:c,errors:p("number.base")};const y={value:c};if(h.convert){const g=m.$_getRule("precision");if(g){const b=Math.pow(10,g.args.limit);y.value=Math.round(y.value*b)/b}}return y.value===0&&(y.value=0),!m._flags.unsafe&&(c>Number.MAX_SAFE_INTEGER||c"})}},integer:{method(){return this.$_addRule("integer")},validate:(c,f)=>Math.trunc(c)-c==0?c:f.error("number.integer")},less:{method(c){return this.$_addRule({name:"less",method:"compare",args:{limit:c},operator:"<"})}},max:{method(c){return this.$_addRule({name:"max",method:"compare",args:{limit:c},operator:"<="})}},min:{method(c){return this.$_addRule({name:"min",method:"compare",args:{limit:c},operator:">="})}},multiple:{method(c){return this.$_addRule({name:"multiple",args:{base:c}})},validate(c,f,m,p){let{base:h}=m;return c*(1/h)%1==0?c:f.error("number.multiple",{multiple:p.args.base,value:c})},args:[{name:"base",ref:!0,assert:c=>typeof c=="number"&&isFinite(c)&&c>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(c,f)=>Number.isSafeInteger(c)&&c>=0&&c<=65535?c:f.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(c){return a(Number.isSafeInteger(c),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:c}})},validate(c,f,m){let{limit:p}=m;const h=c.toString().match(d.precisionRx);return Math.max((h[1]?h[1].length:0)-(h[2]?parseInt(h[2],10):0),0)<=p?c:f.error("number.precision",{limit:p,value:c})},convert:!0},sign:{method(c){return a(["negative","positive"].includes(c),"Invalid sign",c),this.$_addRule({name:"sign",args:{sign:c}})},validate(c,f,m){let{sign:p}=m;return p==="negative"&&c<0||p==="positive"&&c>0?c:f.error(`number.${p}`)}},unsafe:{method(){let c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof c=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",c)}}},cast:{string:{from:c=>typeof c=="number",to:(c,f)=>c.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),d.extractSignificantDigits=function(c){return c.replace(d.exponentialPartRegex,"").replace(d.dotRegex,"").replace(d.trailingZerosRegex,"").replace(d.leadingSignAndZerosRegex,"")},d.normalizeDecimal=function(c){return(c=c.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&c.endsWith("0")&&(c=c.replace(/0+$/,"")),c==="-0"?"0":c}},8966:(i,o,s)=>{const a=s(7824);i.exports=a.extend({type:"object",cast:{map:{from:l=>l&&typeof l=="object",to:(l,u)=>new Map(Object.entries(l))}}})},7417:(i,o,s)=>{const a=s(375),l=s(5380),u=s(1745),d=s(9959),c=s(6064),f=s(9926),m=s(5752),p=s(8068),h=s(8160),y={tlds:f instanceof Set&&{tlds:{allow:f,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:d.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};i.exports=p.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(g,b){let{schema:v,state:w,prefs:E}=b;const C=v.$_getRule("normalize");C&&(g=g.normalize(C.args.form));const k=v.$_getRule("case");k&&(g=k.args.direction==="upper"?g.toLocaleUpperCase():g.toLocaleLowerCase());const _=v.$_getRule("trim");if(_&&_.args.enabled&&(g=g.trim()),v.$_terms.replacements)for(const A of v.$_terms.replacements)g=g.replace(A.pattern,A.replacement);const S=v.$_getRule("hex");if(S&&S.args.options.byteAligned&&g.length%2!=0&&(g=`0${g}`),v.$_getRule("isoDate")){const A=y.isoDate(g);A&&(g=A)}if(v._flags.truncate){const A=v.$_getRule("max");if(A){let I=A.args.limit;if(h.isResolvable(I)&&(I=I.resolve(g,w,E),!h.limit(I)))return{value:g,errors:v.$_createError("any.ref",I,{ref:A.args.limit,arg:"limit",reason:"must be a positive integer"},w,E)};g=g.slice(0,I)}}return{value:g}}},validate(g,b){let{schema:v,error:w}=b;if(typeof g!="string")return{value:g,errors:w("string.base")};if(g===""){const E=v.$_getRule("min");return E&&E.args.limit===0?void 0:{value:g,errors:w("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(g,b)=>/^[a-zA-Z0-9]+$/.test(g)?g:b.error("string.alphanum")},base64:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return h.assertOptions(g,["paddingRequired","urlSafe"]),g={urlSafe:!1,paddingRequired:!0,...g},a(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),a(typeof g.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:g}})},validate(g,b,v){let{options:w}=v;return y.base64Regex[w.paddingRequired][w.urlSafe].test(g)?g:b.error("string.base64")}},case:{method(g){return a(["lower","upper"].includes(g),"Invalid case:",g),this.$_addRule({name:"case",args:{direction:g}})},validate(g,b,v){let{direction:w}=v;return w==="lower"&&g===g.toLocaleLowerCase()||w==="upper"&&g===g.toLocaleUpperCase()?g:b.error(`string.${w}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(g,b){let v=g.length,w=0,E=1;for(;v--;){const C=g.charAt(v)*E;w+=C-9*(C>9),E^=3}return w>0&&w%10==0?g:b.error("string.creditCard")}},dataUri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return h.assertOptions(g,["paddingRequired"]),g={paddingRequired:!0,...g},a(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:g}})},validate(g,b,v){let{options:w}=v;const E=g.match(y.dataUriRegex);return E&&(!E[2]||E[2]!=="base64"||y.base64Regex[w.paddingRequired].false.test(E[3]))?g:b.error("string.dataUri")}},domain:{method(g){g&&h.assertOptions(g,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const b=y.addressOptions(g);return this.$_addRule({name:"domain",args:{options:g},address:b})},validate(g,b,v,w){let{address:E}=w;return l.isValid(g,E)?g:b.error("string.domain")}},email:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),a(g.multiple===void 0||typeof g.multiple=="boolean","multiple option must be an boolean");const b=y.addressOptions(g),v=new RegExp(`\\s*[${g.separator?c(g.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:g},regex:v,address:b})},validate(g,b,v,w){let{options:E}=v,{regex:C,address:k}=w;const _=E.multiple?g.split(C):[g],S=[];for(const A of _)u.isValid(A,k)||S.push(A);return S.length?b.error("string.email",{value:g,invalids:S}):g}},guid:{alias:"uuid",method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["version","separator"]);let b="";if(g.version){const E=[].concat(g.version);a(E.length>=1,"version must have at least 1 valid version specified");const C=new Set;for(let k=0;k0&&arguments[0]!==void 0?arguments[0]:{};return h.assertOptions(g,["byteAligned"]),g={byteAligned:!1,...g},a(typeof g.byteAligned=="boolean","byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:g}})},validate(g,b,v){let{options:w}=v;return y.hexRegex.test(g)?w.byteAligned&&g.length%2!=0?b.error("string.hexAlign"):g:b.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(g,b)=>l.isValid(g,{minDomainSegments:1})||y.ipRegex.test(g)?g:b.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["cidr","version"]);const{cidr:b,versions:v,regex:w}=d.regex(g),E=g.version?v:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:b,version:E}},regex:w})},validate(g,b,v,w){let{options:E}=v,{regex:C}=w;return C.test(g)?g:E.version?b.error("string.ipVersion",{value:g,cidr:E.cidr,version:E.version}):b.error("string.ip",{value:g,cidr:E.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(g,b){let{error:v}=b;return y.isoDate(g)?g:v("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(g,b)=>y.isoDurationRegex.test(g)?g:b.error("string.isoDuration")},length:{method(g,b){return y.length(this,"length",g,"=",b)},validate(g,b,v,w){let{limit:E,encoding:C}=v,{name:k,operator:_,args:S}=w;const A=!C&&g.length;return h.compare(A,E,_)?g:b.error("string."+k,{limit:S.limit,value:g,encoding:C})},args:[{name:"limit",ref:!0,assert:h.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(g,b){return y.length(this,"max",g,"<=",b)},args:["limit","encoding"]},min:{method(g,b){return y.length(this,"min",g,">=",b)},args:["limit","encoding"]},normalize:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"NFC";return a(y.normalizationForms.includes(g),"normalization form must be one of "+y.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:g}})},validate(g,b,v){let{error:w}=b,{form:E}=v;return g===g.normalize(E)?g:w("string.normalize",{value:g,form:E})},convert:!0},pattern:{alias:"regex",method(g){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(g instanceof RegExp,"regex must be a RegExp"),a(!g.flags.includes("g")&&!g.flags.includes("y"),"regex should not use global or sticky mode"),typeof b=="string"&&(b={name:b}),h.assertOptions(b,["invert","name"]);const v=["string.pattern",b.invert?".invert":"",b.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:g,options:b},errorCode:v})},validate(g,b,v,w){let{regex:E,options:C}=v,{errorCode:k}=w;return E.test(g)^C.invert?g:b.error(k,{name:C.name,regex:E,value:g})},args:["regex","options"],multi:!0},replace:{method(g,b){typeof g=="string"&&(g=new RegExp(c(g),"g")),a(g instanceof RegExp,"pattern must be a RegExp"),a(typeof b=="string","replacement must be a String");const v=this.clone();return v.$_terms.replacements||(v.$_terms.replacements=[]),v.$_terms.replacements.push({pattern:g,replacement:b}),v}},token:{method(){return this.$_addRule("token")},validate:(g,b)=>/^\w+$/.test(g)?g:b.error("string.token")},trim:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof g=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:g}})},validate(g,b,v){let{enabled:w}=v;return w&&g!==g.trim()?b.error("string.trim"):g},convert:!0},truncate:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof g=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",g)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),g.domain&&h.assertOptions(g.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:b,scheme:v}=m.regex(g),w=g.domain?y.addressOptions(g.domain):null;return this.$_addRule({name:"uri",args:{options:g},regex:b,domain:w,scheme:v})},validate(g,b,v,w){let{options:E}=v,{regex:C,domain:k,scheme:_}=w;if(["http:/","https:/"].includes(g))return b.error("string.uri");const S=C.exec(g);if(S){const A=S[1]||S[2];return!k||E.allowRelative&&!A||l.isValid(A,k)?g:b.error("string.domain",{value:A})}return E.relativeOnly?b.error("string.uriRelativeOnly"):E.scheme?b.error("string.uriCustomScheme",{scheme:_,value:g}):b.error("string.uri")}}},manifest:{build(g,b){if(b.replacements)for(const{pattern:v,replacement:w}of b.replacements)g=g.replace(v,w);return g}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),y.addressOptions=function(g){if(!g||(a(g.minDomainSegments===void 0||Number.isSafeInteger(g.minDomainSegments)&&g.minDomainSegments>0,"minDomainSegments must be a positive integer"),a(g.maxDomainSegments===void 0||Number.isSafeInteger(g.maxDomainSegments)&&g.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),g.tlds===!1))return g;if(g.tlds===!0||g.tlds===void 0)return a(y.tlds,"Built-in TLD list disabled"),Object.assign({},g,y.tlds);a(typeof g.tlds=="object","tlds must be true, false, or an object");const b=g.tlds.deny;if(b)return Array.isArray(b)&&(g=Object.assign({},g,{tlds:{deny:new Set(b)}})),a(g.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),a(!g.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),y.validateTlds(g.tlds.deny,"tlds.deny"),g;const v=g.tlds.allow;return v?v===!0?(a(y.tlds,"Built-in TLD list disabled"),Object.assign({},g,y.tlds)):(Array.isArray(v)&&(g=Object.assign({},g,{tlds:{allow:new Set(v)}})),a(g.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),y.validateTlds(g.tlds.allow,"tlds.allow"),g):g},y.validateTlds=function(g,b){for(const v of g)a(l.isValid(v,{minDomainSegments:1,maxDomainSegments:1}),`${b} must contain valid top level domain names`)},y.isoDate=function(g){if(!h.isIsoDate(g))return null;/.*T.*[+-]\d\d$/.test(g)&&(g+="00");const b=new Date(g);return isNaN(b.getTime())?null:b.toISOString()},y.length=function(g,b,v,w,E){return a(!E||!1,"Invalid encoding:",E),g.$_addRule({name:b,method:"length",args:{limit:v,encoding:E},operator:w})}},8826:(i,o,s)=>{const a=s(375),l=s(8068),u={};u.Map=class extends Map{slice(){return new u.Map(this)}},i.exports=l.extend({type:"symbol",terms:{map:{init:new u.Map}},coerce:{method(d,c){let{schema:f,error:m}=c;const p=f.$_terms.map.get(d);return p&&(d=p),f._flags.only&&typeof d!="symbol"?{value:d,errors:m("symbol.map",{map:f.$_terms.map})}:{value:d}}},validate(d,c){let{error:f}=c;if(typeof d!="symbol")return{value:d,errors:f("symbol.base")}},rules:{map:{method(d){d&&!d[Symbol.iterator]&&typeof d=="object"&&(d=Object.entries(d)),a(d&&d[Symbol.iterator],"Iterable must be an iterable or object");const c=this.clone(),f=[];for(const m of d){a(m&&m[Symbol.iterator],"Entry must be an iterable");const[p,h]=m;a(typeof p!="object"&&typeof p!="function"&&typeof p!="symbol","Key must not be of type object, function, or Symbol"),a(typeof h=="symbol","Value must be a Symbol"),c.$_terms.map.set(p,h),f.push(h)}return c.valid(...f)}}},manifest:{build:(d,c)=>(c.map&&(d=d.map(c.map)),d)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(i,o,s)=>{const a=s(375),l=s(8571),u=s(738),d=s(9621),c=s(8160),f=s(6354),m=s(493),p={result:Symbol("result")};o.entry=function(h,y,g){let b=c.defaults;g&&(a(g.warnings===void 0,"Cannot override warnings preference in synchronous validation"),a(g.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),b=c.preferences(c.defaults,g));const v=p.entry(h,y,b);a(!v.mainstay.externals.length,"Schema with external rules must use validateAsync()");const w={value:v.value};return v.error&&(w.error=v.error),v.mainstay.warnings.length&&(w.warning=f.details(v.mainstay.warnings)),v.mainstay.debug&&(w.debug=v.mainstay.debug),v.mainstay.artifacts&&(w.artifacts=v.mainstay.artifacts),w},o.entryAsync=async function(h,y,g){let b=c.defaults;g&&(b=c.preferences(c.defaults,g));const v=p.entry(h,y,b),w=v.mainstay;if(v.error)throw w.debug&&(v.error.debug=w.debug),v.error;if(w.externals.length){let C=v.value;const k=[];for(const _ of w.externals){const S=_.state.path,A=_.schema.type==="link"?w.links.get(_.schema):null;let I,L,F=C;const N=S.length?[C]:[],R=S.length?d(h,S):h;if(S.length){I=S[S.length-1];let B=C;for(const V of S.slice(0,-1))B=B[V],N.unshift(B);L=N[0],F=L[I]}try{const B=(j,W)=>(A||_.schema).$_createError(j,F,W,_.state,b),V=await _.method(F,{schema:_.schema,linked:A,state:_.state,prefs:g,original:R,error:B,errorsArray:p.errorsArray,warn:(j,W)=>w.warnings.push((A||_.schema).$_createError(j,F,W,_.state,b)),message:(j,W)=>(A||_.schema).$_createError("external",F,W,_.state,b,{messages:j})});if(V===void 0||V===F)continue;if(V instanceof f.Report){if(w.tracer.log(_.schema,_.state,"rule","external","error"),k.push(V),b.abortEarly)break;continue}if(Array.isArray(V)&&V[c.symbols.errors]){if(w.tracer.log(_.schema,_.state,"rule","external","error"),k.push(...V),b.abortEarly)break;continue}L?(w.tracer.value(_.state,"rule",F,V,"external"),L[I]=V):(w.tracer.value(_.state,"rule",C,V,"external"),C=V)}catch(B){throw b.errors.label&&(B.message+=` (${_.label})`),B}}if(v.value=C,k.length)throw v.error=f.process(k,h,b),w.debug&&(v.error.debug=w.debug),v.error}if(!b.warnings&&!b.debug&&!b.artifacts)return v.value;const E={value:v.value};return w.warnings.length&&(E.warning=f.details(w.warnings)),w.debug&&(E.debug=w.debug),w.artifacts&&(E.artifacts=w.artifacts),E},p.Mainstay=class{constructor(h,y,g){this.externals=[],this.warnings=[],this.tracer=h,this.debug=y,this.links=g,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const h=this._snapshots.pop();this.externals=h.externals,this.warnings=h.warnings}},p.entry=function(h,y,g){const{tracer:b,cleanup:v}=p.tracer(y,g),w=g.debug?[]:null,E=y._ids._schemaChain?new Map:null,C=new p.Mainstay(b,w,E),k=y._ids._schemaChain?[{schema:y}]:null,_=new m([],[],{mainstay:C,schemas:k}),S=o.validate(h,y,_,g);v&&y.$_root.untrace();const A=f.process(S.errors,h,g);return{value:S.value,error:A,mainstay:C}},p.tracer=function(h,y){return h.$_root._tracer?{tracer:h.$_root._tracer._register(h)}:y.debug?(a(h.$_root.trace,"Debug mode not supported"),{tracer:h.$_root.trace()._register(h),cleanup:!0}):{tracer:p.ignore}},o.validate=function(h,y,g,b){let v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};if(y.$_terms.whens&&(y=y._generate(h,g,b).schema),y._preferences&&(b=p.prefs(y,b)),y._cache&&b.cache){const A=y._cache.get(h);if(g.mainstay.tracer.debug(g,"validate","cached",!!A),A)return A}const w=(A,I,L)=>y.$_createError(A,h,I,L||g,b),E={original:h,prefs:b,schema:y,state:g,error:w,errorsArray:p.errorsArray,warn:(A,I,L)=>g.mainstay.warnings.push(w(A,I,L)),message:(A,I)=>y.$_createError("custom",h,I,g,b,{messages:A})};g.mainstay.tracer.entry(y,g);const C=y._definition;if(C.prepare&&h!==void 0&&b.convert){const A=C.prepare(h,E);if(A){if(g.mainstay.tracer.value(g,"prepare",h,A.value),A.errors)return p.finalize(A.value,[].concat(A.errors),E);h=A.value}}if(C.coerce&&h!==void 0&&b.convert&&(!C.coerce.from||C.coerce.from.includes(typeof h))){const A=C.coerce.method(h,E);if(A){if(g.mainstay.tracer.value(g,"coerced",h,A.value),A.errors)return p.finalize(A.value,[].concat(A.errors),E);h=A.value}}const k=y._flags.empty;k&&k.$_match(p.trim(h,y),g.nest(k),c.defaults)&&(g.mainstay.tracer.value(g,"empty",h,void 0),h=void 0);const _=v.presence||y._flags.presence||(y._flags._endedSwitch?null:b.presence);if(h===void 0){if(_==="forbidden")return p.finalize(h,null,E);if(_==="required")return p.finalize(h,[y.$_createError("any.required",h,null,g,b)],E);if(_==="optional"){if(y._flags.default!==c.symbols.deepDefault)return p.finalize(h,null,E);g.mainstay.tracer.value(g,"default",h,{}),h={}}}else if(_==="forbidden")return p.finalize(h,[y.$_createError("any.unknown",h,null,g,b)],E);const S=[];if(y._valids){const A=y._valids.get(h,g,b,y._flags.insensitive);if(A)return b.convert&&(g.mainstay.tracer.value(g,"valids",h,A.value),h=A.value),g.mainstay.tracer.filter(y,g,"valid",A),p.finalize(h,null,E);if(y._flags.only){const I=y.$_createError("any.only",h,{valids:y._valids.values({display:!0})},g,b);if(b.abortEarly)return p.finalize(h,[I],E);S.push(I)}}if(y._invalids){const A=y._invalids.get(h,g,b,y._flags.insensitive);if(A){g.mainstay.tracer.filter(y,g,"invalid",A);const I=y.$_createError("any.invalid",h,{invalids:y._invalids.values({display:!0})},g,b);if(b.abortEarly)return p.finalize(h,[I],E);S.push(I)}}if(C.validate){const A=C.validate(h,E);if(A&&(g.mainstay.tracer.value(g,"base",h,A.value),h=A.value,A.errors)){if(!Array.isArray(A.errors))return S.push(A.errors),p.finalize(h,S,E);if(A.errors.length)return S.push(...A.errors),p.finalize(h,S,E)}}return y._rules.length?p.rules(h,S,E):p.finalize(h,S,E)},p.rules=function(h,y,g){const{schema:b,state:v,prefs:w}=g;for(const E of b._rules){const C=b._definition.rules[E.method];if(C.convert&&w.convert){v.mainstay.tracer.log(b,v,"rule",E.name,"full");continue}let k,_=E.args;if(E._resolve.length){_=Object.assign({},_);for(const A of E._resolve){const I=C.argsByName.get(A),L=_[A].resolve(h,v,w),F=I.normalize?I.normalize(L):L,N=c.validateArg(F,null,I);if(N){k=b.$_createError("any.ref",L,{arg:A,ref:_[A],reason:N},v,w);break}_[A]=F}}k=k||C.validate(h,g,_,E);const S=p.rule(k,E);if(S.errors){if(v.mainstay.tracer.log(b,v,"rule",E.name,"error"),E.warn){v.mainstay.warnings.push(...S.errors);continue}if(w.abortEarly)return p.finalize(h,S.errors,g);y.push(...S.errors)}else v.mainstay.tracer.log(b,v,"rule",E.name,"pass"),v.mainstay.tracer.value(v,"rule",h,S.value,E.name),h=S.value}return p.finalize(h,y,g)},p.rule=function(h,y){return h instanceof f.Report?(p.error(h,y),{errors:[h],value:null}):Array.isArray(h)&&h[c.symbols.errors]?(h.forEach(g=>p.error(g,y)),{errors:h,value:null}):{errors:null,value:h}},p.error=function(h,y){return y.message&&h._setTemplate(y.message),h},p.finalize=function(h,y,g){y=y||[];const{schema:b,state:v,prefs:w}=g;if(y.length){const C=p.default("failover",void 0,y,g);C!==void 0&&(v.mainstay.tracer.value(v,"failover",h,C),h=C,y=[])}if(y.length&&b._flags.error)if(typeof b._flags.error=="function"){y=b._flags.error(y),Array.isArray(y)||(y=[y]);for(const C of y)a(C instanceof Error||C instanceof f.Report,"error() must return an Error object")}else y=[b._flags.error];if(h===void 0){const C=p.default("default",h,y,g);v.mainstay.tracer.value(v,"default",h,C),h=C}if(b._flags.cast&&h!==void 0){const C=b._definition.cast[b._flags.cast];if(C.from(h)){const k=C.to(h,g);v.mainstay.tracer.value(v,"cast",h,k,b._flags.cast),h=k}}if(b.$_terms.externals&&w.externals&&w._externals!==!1)for(const{method:C}of b.$_terms.externals)v.mainstay.externals.push({method:C,schema:b,state:v,label:f.label(b._flags,v,w)});const E={value:h,errors:y.length?y:null};return b._flags.result&&(E.value=b._flags.result==="strip"?void 0:g.original,v.mainstay.tracer.value(v,b._flags.result,h,E.value),v.shadow(h,b._flags.result)),b._cache&&w.cache!==!1&&!b._refs.length&&b._cache.set(g.original,E),h===void 0||E.errors||b._flags.artifact===void 0||(v.mainstay.artifacts=v.mainstay.artifacts||new Map,v.mainstay.artifacts.has(b._flags.artifact)||v.mainstay.artifacts.set(b._flags.artifact,[]),v.mainstay.artifacts.get(b._flags.artifact).push(v.path)),E},p.prefs=function(h,y){const g=y===c.defaults;return g&&h._preferences[c.symbols.prefs]?h._preferences[c.symbols.prefs]:(y=c.preferences(y,h._preferences),g&&(h._preferences[c.symbols.prefs]=y),y)},p.default=function(h,y,g,b){const{schema:v,state:w,prefs:E}=b,C=v._flags[h];if(E.noDefaults||C===void 0)return y;if(w.mainstay.tracer.log(v,w,"rule",h,"full"),!C)return C;if(typeof C=="function"){const k=C.length?[l(w.ancestors[0]),b]:[];try{return C(...k)}catch(_){return void g.push(v.$_createError(`any.${h}`,null,{error:_},w,E))}}return typeof C!="object"?C:C[c.symbols.literal]?C.literal:c.isResolvable(C)?C.resolve(y,w,E):l(C)},p.trim=function(h,y){if(typeof h!="string")return h;const g=y.$_getRule("trim");return g&&g.args.enabled?h.trim():h},p.ignore={active:!1,debug:u,entry:u,filter:u,log:u,resolve:u,value:u},p.errorsArray=function(){const h=[];return h[c.symbols.errors]=!0,h}},2036:(i,o,s)=>{const a=s(375),l=s(9474),u=s(8160),d={};i.exports=d.Values=class{constructor(c,f){this._values=new Set(c),this._refs=new Set(f),this._lowercase=d.lowercases(c),this._override=!1}get length(){return this._values.size+this._refs.size}add(c,f){u.isResolvable(c)?this._refs.has(c)||(this._refs.add(c),f&&f.register(c)):this.has(c,null,null,!1)||(this._values.add(c),typeof c=="string"&&this._lowercase.set(c.toLowerCase(),c))}static merge(c,f,m){if(c=c||new d.Values,f){if(f._override)return f.clone();for(const p of[...f._values,...f._refs])c.add(p)}if(m)for(const p of[...m._values,...m._refs])c.remove(p);return c.length?c:null}remove(c){u.isResolvable(c)?this._refs.delete(c):(this._values.delete(c),typeof c=="string"&&this._lowercase.delete(c.toLowerCase()))}has(c,f,m,p){return!!this.get(c,f,m,p)}get(c,f,m,p){if(!this.length)return!1;if(this._values.has(c))return{value:c};if(typeof c=="string"&&c&&p){const h=this._lowercase.get(c.toLowerCase());if(h)return{value:h}}if(!this._refs.size&&typeof c!="object")return!1;if(typeof c=="object"){for(const h of this._values)if(l(h,c))return{value:h}}if(f)for(const h of this._refs){const y=h.resolve(c,f,m,null,{in:!0});if(y===void 0)continue;const g=h.in&&typeof y=="object"?Array.isArray(y)?y:Object.keys(y):[y];for(const b of g)if(typeof b==typeof c){if(p&&c&&typeof c=="string"){if(b.toLowerCase()===c.toLowerCase())return{value:b,ref:h}}else if(l(b,c))return{value:b,ref:h}}}return!1}override(){this._override=!0}values(c){if(c&&c.display){const f=[];for(const m of[...this._values,...this._refs])m!==void 0&&f.push(m);return f}return Array.from([...this._values,...this._refs])}clone(){const c=new d.Values(this._values,this._refs);return c._override=this._override,c}concat(c){a(!c._override,"Cannot concat override set of values");const f=new d.Values([...this._values,...c._values],[...this._refs,...c._refs]);return f._override=this._override,f}describe(){const c=[];this._override&&c.push({override:!0});for(const f of this._values.values())c.push(f&&typeof f=="object"?{value:f}:f);for(const f of this._refs.values())c.push(f.describe());return c}},d.Values.prototype[u.symbols.values]=!0,d.Values.prototype.slice=d.Values.prototype.clone,d.lowercases=function(c){const f=new Map;if(c)for(const m of c)typeof m=="string"&&f.set(m.toLowerCase(),m);return f}},978:(i,o,s)=>{const a=s(375),l=s(8571),u=s(1687),d=s(9621),c={};i.exports=function(f,m){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(a(f&&typeof f=="object","Invalid defaults value: must be an object"),a(!m||m===!0||typeof m=="object","Invalid source value: must be true, falsy or an object"),a(typeof p=="object","Invalid options: must be an object"),!m)return null;if(p.shallow)return c.applyToDefaultsWithShallow(f,m,p);const h=l(f);if(m===!0)return h;const y=p.nullOverride!==void 0&&p.nullOverride;return u(h,m,{nullOverride:y,mergeArrays:!1})},c.applyToDefaultsWithShallow=function(f,m,p){const h=p.shallow;a(Array.isArray(h),"Invalid keys");const y=new Map,g=m===!0?null:new Set;for(let w of h){w=Array.isArray(w)?w:w.split(".");const E=d(f,w);E&&typeof E=="object"?y.set(E,g&&d(m,w)||E):g&&g.add(w)}const b=l(f,{},y);if(!g)return b;for(const w of g)c.reachCopy(b,m,w);const v=p.nullOverride!==void 0&&p.nullOverride;return u(b,m,{nullOverride:v,mergeArrays:!1})},c.reachCopy=function(f,m,p){for(const g of p){if(!(g in m))return;const b=m[g];if(typeof b!="object"||b===null)return;m=b}const h=m;let y=f;for(let g=0;g{const a=s(7916);i.exports=function(l){if(!l){for(var u=arguments.length,d=new Array(u>1?u-1:0),c=1;c{const a=s(9621),l=s(4277),u=s(7043),d={needsProtoHack:new Set([l.set,l.map,l.weakSet,l.weakMap])};i.exports=d.clone=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof c!="object"||c===null)return c;let p=d.clone,h=m;if(f.shallow){if(f.shallow!==!0)return d.cloneWithShallow(c,f);p=v=>v}else if(h){const v=h.get(c);if(v)return v}else h=new Map;const y=l.getInternalProto(c);if(y===l.buffer)return!1;if(y===l.date)return new Date(c.getTime());if(y===l.regex)return new RegExp(c);const g=d.base(c,y,f);if(g===c)return c;if(h&&h.set(c,g),y===l.set)for(const v of c)g.add(p(v,f,h));else if(y===l.map)for(const[v,w]of c)g.set(v,p(w,f,h));const b=u.keys(c,f);for(const v of b){if(v==="__proto__")continue;if(y===l.array&&v==="length"){g.length=c.length;continue}const w=Object.getOwnPropertyDescriptor(c,v);w?w.get||w.set?Object.defineProperty(g,v,w):w.enumerable?g[v]=p(c[v],f,h):Object.defineProperty(g,v,{enumerable:!1,writable:!0,configurable:!0,value:p(c[v],f,h)}):Object.defineProperty(g,v,{enumerable:!0,writable:!0,configurable:!0,value:p(c[v],f,h)})}return g},d.cloneWithShallow=function(c,f){const m=f.shallow;(f=Object.assign({},f)).shallow=!1;const p=new Map;for(const h of m){const y=a(c,h);typeof y!="object"&&typeof y!="function"||p.set(y,y)}return d.clone(c,f,p)},d.base=function(c,f,m){if(m.prototype===!1)return d.needsProtoHack.has(f)?new f.constructor:f===l.array?[]:{};const p=Object.getPrototypeOf(c);if(p&&p.isImmutable)return c;if(f===l.array){const h=[];return p!==f&&Object.setPrototypeOf(h,p),h}if(d.needsProtoHack.has(f)){const h=new p.constructor;return p!==f&&Object.setPrototypeOf(h,p),h}return Object.create(p)}},9474:(i,o,s)=>{const a=s(4277),l={mismatched:null};i.exports=function(u,d,c){return c=Object.assign({prototype:!0},c),!!l.isDeepEqual(u,d,c,[])},l.isDeepEqual=function(u,d,c,f){if(u===d)return u!==0||1/u==1/d;const m=typeof u;if(m!==typeof d||u===null||d===null)return!1;if(m==="function"){if(!c.deepFunction||u.toString()!==d.toString())return!1}else if(m!=="object")return u!=u&&d!=d;const p=l.getSharedType(u,d,!!c.prototype);switch(p){case a.buffer:return!1;case a.promise:return u===d;case a.regex:return u.toString()===d.toString();case l.mismatched:return!1}for(let h=f.length-1;h>=0;--h)if(f[h].isSame(u,d))return!0;f.push(new l.SeenEntry(u,d));try{return!!l.isDeepEqualObj(p,u,d,c,f)}finally{f.pop()}},l.getSharedType=function(u,d,c){if(c)return Object.getPrototypeOf(u)!==Object.getPrototypeOf(d)?l.mismatched:a.getInternalProto(u);const f=a.getInternalProto(u);return f!==a.getInternalProto(d)?l.mismatched:f},l.valueOf=function(u){const d=u.valueOf;if(d===void 0)return u;try{return d.call(u)}catch(c){return c}},l.hasOwnEnumerableProperty=function(u,d){return Object.prototype.propertyIsEnumerable.call(u,d)},l.isSetSimpleEqual=function(u,d){for(const c of Set.prototype.values.call(u))if(!Set.prototype.has.call(d,c))return!1;return!0},l.isDeepEqualObj=function(u,d,c,f,m){const{isDeepEqual:p,valueOf:h,hasOwnEnumerableProperty:y}=l,{keys:g,getOwnPropertySymbols:b}=Object;if(u===a.array){if(!f.part){if(d.length!==c.length)return!1;for(let k=0;k{const a=s(8761);i.exports=class extends Error{constructor(l){super(l.filter(u=>u!=="").map(u=>typeof u=="string"?u:u instanceof Error?u.message:a(u)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,o.assert)}}},5277:i=>{const o={};i.exports=function(s){if(!s)return"";let a="";for(let l=0;l=256?"&#"+s+";":`&#x${s.toString(16).padStart(2,"0")};`)},o.isSafe=function(s){return o.safeCharCodes.has(s)},o.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),o.safeCharCodes=function(){const s=new Set;for(let a=32;a<123;++a)(a>=97||a>=65&&a<=90||a>=48&&a<=57||a===32||a===46||a===44||a===45||a===58||a===95)&&s.add(a);return s}()},6064:i=>{i.exports=function(o){return o.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:i=>{i.exports=function(){}},1687:(i,o,s)=>{const a=s(375),l=s(8571),u=s(7043),d={};i.exports=d.merge=function(c,f,m){if(a(c&&typeof c=="object","Invalid target value: must be an object"),a(f==null||typeof f=="object","Invalid source value: must be null, undefined, or an object"),!f)return c;if(m=Object.assign({nullOverride:!0,mergeArrays:!0},m),Array.isArray(f)){a(Array.isArray(c),"Cannot merge array onto an object"),m.mergeArrays||(c.length=0);for(let h=0;h{const a=s(375),l={};i.exports=function(u,d,c){if(d===!1||d==null)return u;typeof(c=c||{})=="string"&&(c={separator:c});const f=Array.isArray(d);a(!f||!c.separator,"Separator option is not valid for array-based chain");const m=f?d:d.split(c.separator||".");let p=u;for(let h=0;h{i.exports=function(){try{return JSON.stringify(...arguments)}catch(o){return"[Cannot display object: "+o.message+"]"}}},4277:(i,o)=>{const s={};o=i.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},s.typeMap=new Map([["[object Error]",o.error],["[object Map]",o.map],["[object Promise]",o.promise],["[object Set]",o.set],["[object WeakMap]",o.weakMap],["[object WeakSet]",o.weakSet]]),o.getInternalProto=function(a){if(Array.isArray(a))return o.array;if(a instanceof Date)return o.date;if(a instanceof RegExp)return o.regex;if(a instanceof Error)return o.error;const l=Object.prototype.toString.call(a);return s.typeMap.get(l)||o.generic}},7043:(i,o)=>{o.keys=function(s){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).symbols!==!1?Reflect.ownKeys(s):Object.getOwnPropertyNames(s)}},3652:(i,o,s)=>{const a=s(375),l={};o.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(u,d){const c=[].concat((d=d||{}).before||[]),f=[].concat(d.after||[]),m=d.group||"?",p=d.sort||0;a(!c.includes(m),`Item cannot come before itself: ${m}`),a(!c.includes("?"),"Item cannot come before unassociated items"),a(!f.includes(m),`Item cannot come after itself: ${m}`),a(!f.includes("?"),"Item cannot come after unassociated items"),Array.isArray(u)||(u=[u]);for(const h of u){const y={seq:this._items.length,sort:p,before:c,after:f,group:m,node:h};this._items.push(y)}if(!d.manual){const h=this._sort();a(h,"item",m!=="?"?`added into group ${m}`:"","created a dependencies error")}return this.nodes}merge(u){Array.isArray(u)||(u=[u]);for(const c of u)if(c)for(const f of c._items)this._items.push(Object.assign({},f));this._items.sort(l.mergeSort);for(let c=0;cu.sort===d.sort?0:u.sort{const a=s(443),l=s(2178),u={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:a.URL||URL};o.analyze=function(d){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!d)return l.code("DOMAIN_NON_EMPTY_STRING");if(typeof d!="string")throw new Error("Invalid input: domain must be a string");if(d.length>256)return l.code("DOMAIN_TOO_LONG");if(u.nonAsciiRx.test(d)){if(c.allowUnicode===!1)return l.code("DOMAIN_INVALID_UNICODE_CHARS");d=d.normalize("NFC")}if(u.domainControlRx.test(d))return l.code("DOMAIN_INVALID_CHARS");d=u.punycode(d),c.allowFullyQualified&&d[d.length-1]==="."&&(d=d.slice(0,-1));const f=c.minDomainSegments||u.minDomainSegments,m=d.split(".");if(m.lengthc.maxDomainSegments)return l.code("DOMAIN_SEGMENTS_COUNT_MAX");const p=c.tlds;if(p){const h=m[m.length-1].toLowerCase();if(p.deny&&p.deny.has(h)||p.allow&&!p.allow.has(h))return l.code("DOMAIN_FORBIDDEN_TLDS")}for(let h=0;h63)return l.code("DOMAIN_LONG_SEGMENT");if(h{const a=s(9848),l=s(5380),u=s(2178),d={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(a.TextEncoder||TextEncoder)};o.analyze=function(c,f){return d.email(c,f)},o.isValid=function(c,f){return!d.email(c,f)},d.email=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof c!="string")throw new Error("Invalid input: email must be a string");if(!c)return u.code("EMPTY_STRING");const m=!d.nonAsciiRx.test(c);if(!m){if(f.allowUnicode===!1)return u.code("FORBIDDEN_UNICODE");c=c.normalize("NFC")}const p=c.split("@");if(p.length!==2)return p.length>2?u.code("MULTIPLE_AT_CHAR"):u.code("MISSING_AT_CHAR");const[h,y]=p;if(!h)return u.code("EMPTY_LOCAL");if(!f.ignoreLength){if(c.length>254)return u.code("ADDRESS_TOO_LONG");if(d.encoder.encode(h).length>64)return u.code("LOCAL_TOO_LONG")}return d.local(h,m)||l.analyze(y,f)},d.local=function(c,f){const m=c.split(".");for(const p of m){if(!p.length)return u.code("EMPTY_LOCAL_SEGMENT");if(f){if(!d.atextRx.test(p))return u.code("INVALID_LOCAL_CHARS")}else for(const h of p){if(d.atextRx.test(h))continue;const y=d.binary(h);if(!d.atomRx.test(y))return u.code("INVALID_LOCAL_CHARS")}}},d.binary=function(c){return Array.from(d.encoder.encode(c)).map(f=>String.fromCharCode(f)).join("")},d.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,d.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(i,o)=>{o.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},o.code=function(s){return{code:s,error:o.codes[s]}}},9959:(i,o,s)=>{const a=s(375),l=s(5752);o.regex=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};a(u.cidr===void 0||typeof u.cidr=="string","options.cidr must be a string");const d=u.cidr?u.cidr.toLowerCase():"optional";a(["required","optional","forbidden"].includes(d),"options.cidr must be one of required, optional, forbidden"),a(u.version===void 0||typeof u.version=="string"||Array.isArray(u.version),"options.version must be a string or an array of string");let c=u.version||["ipv4","ipv6","ipvfuture"];Array.isArray(c)||(c=[c]),a(c.length>=1,"options.version must have at least 1 version specified");for(let p=0;p{if(d==="forbidden")return l.ip[p];const h=`\\/${p==="ipv4"?l.ip.v4Cidr:l.ip.v6Cidr}`;return d==="required"?`${l.ip[p]}${h}`:`${l.ip[p]}(?:${h})?`}).join("|")})`,m=new RegExp(`^${f}$`);return{cidr:d,versions:c,regex:m,raw:f}}},5752:(i,o,s)=>{const a=s(375),l=s(6064),u={generate:function(){const d={},c="\\dA-Fa-f",f="["+c+"]",m="\\w-\\.~",p="!\\$&'\\(\\)\\*\\+,;=",h="%"+c,y=m+h+p+":@",g="["+y+"]",b="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";d.ipv4address="(?:"+b+"\\.){3}"+b;const v=f+"{1,4}",w="(?:"+v+":"+v+"|"+d.ipv4address+")",E="(?:"+v+":){6}"+w,C="::(?:"+v+":){5}"+w,k="(?:"+v+")?::(?:"+v+":){4}"+w,_="(?:(?:"+v+":){0,1}"+v+")?::(?:"+v+":){3}"+w,S="(?:(?:"+v+":){0,2}"+v+")?::(?:"+v+":){2}"+w,A="(?:(?:"+v+":){0,3}"+v+")?::"+v+":"+w,I="(?:(?:"+v+":){0,4}"+v+")?::"+w,L="(?:(?:"+v+":){0,5}"+v+")?::"+v,F="(?:(?:"+v+":){0,6}"+v+")?::";d.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",d.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",d.ipv6address="(?:"+E+"|"+C+"|"+k+"|"+_+"|"+S+"|"+A+"|"+I+"|"+L+"|"+F+")",d.ipvFuture="v"+f+"+\\.["+m+p+":]+",d.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",d.schemeRegex=new RegExp(d.scheme);const N="["+m+h+p+":]*",R="["+m+h+p+"]{1,255}",B="(?:\\[(?:"+d.ipv6address+"|"+d.ipvFuture+")\\]|"+d.ipv4address+"|"+R+")",V="(?:"+N+"@)?"+B+"(?::\\d*)?",j="(?:"+N+"@)?("+B+")(?::\\d*)?",W=g+"*",Y=g+"+",te="(?:\\/"+W+")*",ae="\\/(?:"+Y+te+")?",Z=Y+te,pe="["+m+h+p+"@]+"+te,Ie="(?:\\/\\/\\/"+W+te+")";return d.hierPart="(?:(?:\\/\\/"+V+te+")|"+ae+"|"+Z+"|"+Ie+")",d.hierPartCapture="(?:(?:\\/\\/"+j+te+")|"+ae+"|"+Z+")",d.relativeRef="(?:(?:\\/\\/"+V+te+")|"+ae+"|"+pe+"|)",d.relativeRefCapture="(?:(?:\\/\\/"+j+te+")|"+ae+"|"+pe+"|)",d.query="["+y+"\\/\\?]*(?=#|$)",d.queryWithSquareBrackets="["+y+"\\[\\]\\/\\?]*(?=#|$)",d.fragment="["+y+"\\/\\?]*",d}};u.rfc3986=u.generate(),o.ip={v4Cidr:u.rfc3986.ipv4Cidr,v6Cidr:u.rfc3986.ipv6Cidr,ipv4:u.rfc3986.ipv4address,ipv6:u.rfc3986.ipv6address,ipvfuture:u.rfc3986.ipvFuture},u.createRegex=function(d){const c=u.rfc3986,f="(?:\\?"+(d.allowQuerySquareBrackets?c.queryWithSquareBrackets:c.query)+")?(?:#"+c.fragment+")?",m=d.domain?c.relativeRefCapture:c.relativeRef;if(d.relativeOnly)return u.wrap(m+f);let p="";if(d.scheme){a(d.scheme instanceof RegExp||typeof d.scheme=="string"||Array.isArray(d.scheme),"scheme must be a RegExp, String, or Array");const g=[].concat(d.scheme);a(g.length>=1,"scheme must have at least 1 scheme specified");const b=[];for(let v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return d.scheme||d.allowRelative||d.relativeOnly||d.allowQuerySquareBrackets||d.domain?u.createRegex(d):u.uriRegex}},1447:(i,o)=>{const s={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};o.Parser=class{constructor(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!l[s.settings]&&l.constants)for(const u in l.constants){const d=l.constants[u];if(d!==null&&!["boolean","number","string"].includes(typeof d))throw new Error(`Formula constant ${u} contains invalid ${typeof d} value type`)}this.settings=l[s.settings]?l:Object.assign({[s.settings]:!0,constants:{},functions:{}},l),this.single=null,this._parts=null,this._parse(a)}_parse(a){let l=[],u="",d=0,c=!1;const f=p=>{if(d)throw new Error("Formula missing closing parenthesis");const h=l.length?l[l.length-1]:null;if(c||u||p){if(h&&h.type==="reference"&&p===")")return h.type="function",h.value=this._subFormula(u,h.value),void(u="");if(p===")"){const y=new o.Parser(u,this.settings);l.push({type:"segment",value:y})}else if(c){if(c==="]")return l.push({type:"reference",value:u}),void(u="");l.push({type:"literal",value:u})}else if(s.operatorCharacters.includes(u))h&&h.type==="operator"&&s.operators.includes(h.value+u)?h.value+=u:l.push({type:"operator",value:u});else if(u.match(s.numberRx))l.push({type:"constant",value:parseFloat(u)});else if(this.settings.constants[u]!==void 0)l.push({type:"constant",value:this.settings.constants[u]});else{if(!u.match(s.tokenRx))throw new Error(`Formula contains invalid token: ${u}`);l.push({type:"reference",value:u})}u=""}};for(const p of a)c?p===c?(f(),c=!1):u+=p:d?p==="("?(u+=p,++d):p===")"?(--d,d?u+=p:f(p)):u+=p:p in s.literals?c=s.literals[p]:p==="("?(f(),++d):s.operatorCharacters.includes(p)?(f(),u=p,f()):p!==" "?u+=p:f();f(),l=l.map((p,h)=>p.type!=="operator"||p.value!=="-"||h&&l[h-1].type!=="operator"?p:{type:"operator",value:"n"});let m=!1;for(const p of l){if(p.type==="operator"){if(s.operatorsPrefix.includes(p.value))continue;if(!m)throw new Error("Formula contains an operator in invalid position");if(!s.operators.includes(p.value))throw new Error(`Formula contains an unknown operator ${p.value}`)}else if(m)throw new Error("Formula missing expected operator");m=!m}if(!m)throw new Error("Formula contains invalid trailing operator");l.length===1&&["reference","literal","constant"].includes(l[0].type)&&(this.single={type:l[0].type==="reference"?"reference":"value",value:l[0].value}),this._parts=l.map(p=>{if(p.type==="operator")return s.operatorsPrefix.includes(p.value)?p:p.value;if(p.type!=="reference")return p.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(p.value))throw new Error(`Formula contains invalid reference ${p.value}`);return this.settings.reference?this.settings.reference(p.value):s.reference(p.value)})}_subFormula(a,l){const u=this.settings.functions[l];if(typeof u!="function")throw new Error(`Formula contains unknown function ${l}`);let d=[];if(a){let c="",f=0,m=!1;const p=()=>{if(!c)throw new Error(`Formula contains function ${l} with invalid arguments ${a}`);d.push(c),c=""};for(let h=0;hnew o.Parser(c,this.settings)),function(c){const f=[];for(const m of d)f.push(m.evaluate(c));return u.call(c,...f)}}evaluate(a){const l=this._parts.slice();for(let u=l.length-2;u>=0;--u){const d=l[u];if(d&&d.type==="operator"){const c=l[u+1];l.splice(u+1,1);const f=s.evaluate(c,a);l[u]=s.single(d.value,f)}}return s.operatorsOrder.forEach(u=>{for(let d=1;d":return l>u;case">=":return l>=u;case"==":return l===u;case"!=":return l!==u;case"&&":return l&&u;case"||":return l||u}return null},s.exists=function(a){return a!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:i=>{i.exports={version:"17.9.1"}}},r={},function i(o){var s=r[o];if(s!==void 0)return s.exports;var a=r[o]={exports:{}};return n[o](a,a.exports,i),a.exports}(5107);var n,r})})(U7);var LF=U7.exports;const O=Sa(LF);class b_ extends Error{constructor(t){super(t.message),this.message=t.message,this.code=t.code,this.data=t.data}}const it=(e,t)=>{let n;e.request?n=e.request.bind(e):e.sendAsync&&(n=BF(e));const r=async({method:i,params:o})=>{const s=i;if(t&&t[s]===null)throw new b_({code:4200,message:`The Provider does not support the requested method: ${i}`});if(t&&t[s])return t[s]({baseRequest:n,params:o});if(n)return n({method:i,params:o});throw new b_({code:4200,message:`The Provider does not support the requested method: ${i}`})};return e.request=r,e},BF=e=>({method:t,params:n})=>new Promise((r,i)=>{e.sendAsync({id:0,jsonrpc:"2.0",method:t,params:n},(o,{result:s})=>{o?i(JSON.parse(o)):r(s??null)})});function H7(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function v_(e){return H7(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const NF="2.12.0",MF=()=>`viem@${NF}`;let gc=class ay extends Error{constructor(t,n={}){var o;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:MF()});const r=n.cause instanceof ay?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,i=n.cause instanceof ay&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(` -`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return z7(this,t)}};function z7(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?z7(e.cause,t):t?null:e}let RK=class extends gc{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}},W7=class extends gc{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}};function yc(e,{dir:t,size:n=32}={}){return typeof e=="string"?jF(e,{dir:t,size:n}):DF(e,{dir:t,size:n})}function jF(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new W7({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function DF(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new W7({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new HF({givenSize:v_(e),maxSize:t})}function ly(e,t){const n=typeof t=="string"?{to:t}:t,r=n.to;return r==="number"?WF(e,n):r==="bigint"?Lv(e,n):r==="string"?VF(e,n):r==="boolean"?zF(e,n):R0(e,n)}function Lv(e,t={}){const{signed:n}=t;t.size&&xs(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function jK(e,t={}){return typeof e=="number"||typeof e=="bigint"?Bv(e,t):typeof e=="string"?ZF(e,t):typeof e=="boolean"?GF(e,t):V7(e,t)}function GF(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(xs(n,{size:t.size}),yc(n,{size:t.size})):n}function V7(e,t={}){let n="";for(let i=0;io||i=Ui.zero&&e<=Ui.nine)return e-Ui.zero;if(e>=Ui.A&&e<=Ui.F)return e-(Ui.A-10);if(e>=Ui.a&&e<=Ui.f)return e-(Ui.a-10)}function R0(e,t={}){let n=e;t.size&&(xs(n,{size:t.size}),n=yc(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let s=0,a=0;st){const[o,s,a]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],l=Math.round(+`${s}.${a}`);l>9?r=`${BigInt(o)+BigInt(1)}0`.padStart(o.length+1,"0"):r=`${o}${l}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${r}`)}function nU(e,t="wei"){return tU(e,q7[t])}const K7=e=>K7(),rU=e=>{const t=Lv(e);return G7(t)},Z7=e=>{if(!e)return e;const t=ly(e,"bigint");return G7(t)},iU=e=>{if(typeof e!="string"&&typeof e!="number")throw new Error("eth must be a string or number value");const t=typeof e=="number"?e.toString():e;return nU(t)},__=e=>Bv(e),oU=async e=>{const t=await ue(()=>import("./index-CROOOhj5.js"),__vite__mapDeps([0,1])),{id:n,label:r,token:i,publicRpcUrl:o,blockExplorerUrl:s,rpcUrl:a}=e;switch(n){case"0x89":{const{polygon:l}=t;return l}case"0xa":{const{optimism:l}=t;return l}case"0xa4b1":{const{arbitrum:l}=t;return l}case"0x144":{const{zkSync:l}=t;return l}case"0x38":{const{bsc:l}=t;return l}case"0x1":{const{mainnet:l}=t;return l}case"0xaa36a7":{const{sepolia:l}=t;return l}case"0xfa":{const{fantom:l}=t;return l}case"0xa86a":{const{avalanche:l}=t;return l}case"0xa4ec":{const{celo:l}=t;return l}case"0x2105":{const{base:l}=t;return l}case"0x14a33":{const{baseGoerli:l}=t;return l}case"0x64":{const{gnosis:l}=t;return l}case"0x63564C40":{const{harmonyOne:l}=t;return l}case"0x27bc86aa":{const{degen:l}=t;return l}default:{const{extractChain:l,defineChain:u}=await ue(async()=>{const{extractChain:c,defineChain:f}=await import("./index-BY8dqRha.js");return{extractChain:c,defineChain:f}},__vite__mapDeps([2,1])),d=l({chains:Object.values(t),id:ly(n,"number")});return d||u({id:ly(n,"number"),name:r??"",nativeCurrency:{decimals:18,name:i??"",symbol:i??""},rpcUrls:{default:{http:[a??"",o??""]}},blockExplorers:{default:{name:"Explorer",url:s??""}}})}}};var is;(function(e){e[e.ACCOUNT_ACCESS_REJECTED=4001]="ACCOUNT_ACCESS_REJECTED",e[e.ACCOUNT_ACCESS_ALREADY_REQUESTED=-32002]="ACCOUNT_ACCESS_ALREADY_REQUESTED",e[e.UNAUTHORIZED=4100]="UNAUTHORIZED",e[e.INVALID_PARAMS=-32602]="INVALID_PARAMS",e[e.UNSUPPORTED_METHOD=4200]="UNSUPPORTED_METHOD",e[e.DISCONNECTED=4900]="DISCONNECTED",e[e.CHAIN_DISCONNECTED=4901]="CHAIN_DISCONNECTED",e[e.CHAIN_NOT_ADDED=4902]="CHAIN_NOT_ADDED",e[e.DOES_NOT_EXIST=-32601]="DOES_NOT_EXIST",e[e.UNRECOGNIZED_CHAIN_ID=-32603]="UNRECOGNIZED_CHAIN_ID"})(is||(is={}));function Ot(e,t){const n=e.validate(t);return n.error?n:null}const Nv=O.alternatives().try(O.string().pattern(/^0x[0-9a-fA-F]+$/),O.number().positive()),Mv=O.string().valid("evm"),sU=O.object({address:O.string().required(),icon:O.string().optional()}),aU=O.object({namespace:Mv,id:Nv.required(),rpcUrl:O.string(),label:O.string(),token:O.string(),secondaryTokens:O.array().max(5).items(sU).optional(),icon:O.string(),color:O.string(),publicRpcUrl:O.string(),protectedRpcUrl:O.string(),blockExplorerUrl:O.string()});var vp={exports:{}};vp.exports;(function(e,t){var n=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,a=1/0,l=9007199254740991,u="[object Arguments]",d="[object Array]",c="[object Boolean]",f="[object Date]",m="[object Error]",p="[object Function]",h="[object GeneratorFunction]",y="[object Map]",g="[object Number]",b="[object Object]",v="[object Promise]",w="[object RegExp]",E="[object Set]",C="[object String]",k="[object Symbol]",_="[object WeakMap]",S="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",L="[object Float64Array]",F="[object Int8Array]",N="[object Int16Array]",R="[object Int32Array]",B="[object Uint8Array]",V="[object Uint8ClampedArray]",j="[object Uint16Array]",W="[object Uint32Array]",Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ae=/^\./,Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pe=/[\\^$.*+?()[\]{}|]/g,Ie=/\\(\\)?/g,_e=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,le={};le[I]=le[L]=le[F]=le[N]=le[R]=le[B]=le[V]=le[j]=le[W]=!0,le[u]=le[d]=le[S]=le[c]=le[A]=le[f]=le[m]=le[p]=le[y]=le[g]=le[b]=le[w]=le[E]=le[C]=le[_]=!1;var $e=typeof br=="object"&&br&&br.Object===Object&&br,rt=typeof self=="object"&&self&&self.Object===Object&&self,je=$e||rt||Function("return this")(),nt=t&&!t.nodeType&&t,Le=nt&&!0&&e&&!e.nodeType&&e,_t=Le&&Le.exports===nt,Kn=_t&&$e.process,Zr=function(){try{return Kn&&Kn.binding("util")}catch{}}(),Ss=Zr&&Zr.isTypedArray;function wc(x,T,P,D){for(var ne=-1,G=x?x.length:0;++ne-1}function Tc(x,T){var P=this.__data__,D=yo(P,x);return D<0?P.push([x,T]):P[D][1]=T,this}Xn.prototype.clear=kc,Xn.prototype.delete=Cc,Xn.prototype.get=Ac,Xn.prototype.has=Yn,Xn.prototype.set=Tc;function xn(x){var T=-1,P=x?x.length:0;for(this.clear();++TPe))return!1;var Ke=G.get(x);if(Ke&&G.get(T))return Ke==T;var Ve=-1,Ze=!0,Qe=ne&o?new Ti:void 0;for(G.set(x,T),G.set(T,x);++Ve-1&&x%1==0&&x-1&&x%1==0&&x<=l}function En(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function dr(x){return!!x&&typeof x=="object"}function Ri(x){return typeof x=="symbol"||dr(x)&&Kt.call(x)==k}var Fa=Ss?co(Ss):Hc;function U0(x){return x==null?"":qc(x)}function H0(x,T,P){var D=x==null?void 0:ni(x,T);return D===void 0?P:D}function Kc(x,T){return x!=null&&ri(x,T,Dc)}function Ua(x){return We(x)?Bc(x):zc(x)}function z0(x){return x}function W0(x){return Oi(x)?lo($(x)):Ns(x)}e.exports=z})(vp,vp.exports);var lU=vp.exports;const cU=Sa(lU);function cy(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function x_(e){return cy(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const uU="2.12.0",UK=e=>e,HK=e=>e,fU=()=>`viem@${uU}`;class io extends Error{constructor(t,n={}){var o;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:fU()});const r=n.cause instanceof io?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,i=n.cause instanceof io&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(` -`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return X7(this,t)}}function X7(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?X7(e.cause,t):t?null:e}class zK extends io{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class Y7 extends io{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}class WK extends io{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesLengthError"})}}function jv(e,{dir:t,size:n=32}={}){return typeof e=="string"?dU(e,{dir:t,size:n}):hU(e,{dir:t,size:n})}function dU(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new Y7({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function hU(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Y7({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new mU({givenSize:x_(e),maxSize:t})}function gU(e,t={}){const{signed:n}=t;t.size&&Dv(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function E_(e,t={}){return typeof e=="number"||typeof e=="bigint"?vU(e,t):typeof e=="string"?_U(e,t):typeof e=="boolean"?bU(e,t):Q7(e,t)}function bU(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Dv(n,{size:t.size}),jv(n,{size:t.size})):n}function Q7(e,t={}){let n="";for(let i=0;io||i-1}function Os($,M){var z=this.__data__,ge=mo(z,$);return ge<0?(++this.size,z.push([$,M])):z[ge][1]=M,this}Zt.prototype.clear=Ps,Zt.prototype.delete=Ai,Zt.prototype.get=Sc,Zt.prototype.has=ho,Zt.prototype.set=Os;function Ir($){var M=-1,z=$==null?0:$.length;for(this.clear();++M1?z[Be-1]:void 0,Ge=Be>2?z[2]:void 0;for(Ue=$.length>3&&typeof Ue=="function"?(Be--,Ue):void 0,Ge&&Fc(z[0],z[1],Ge)&&(Ue=Be<3?void 0:Ue,Be=1),M=Object(M);++ge-1&&$%1==0&&$0){if(++M>=i)return arguments[0]}else M=0;return $.apply(void 0,arguments)}}function Ma($){if($!=null){try{return co.call($)}catch{}try{return $+""}catch{}}return""}function vo($,M){return $===M||$!==$&&M!==M}var wo=Ti(function(){return arguments}())?Ti:function($){return ri($)&&ur.call($,"callee")&&!Pa.call($,"callee")},_o=Array.isArray;function Ms($){return $!=null&&Xt($.length)&&!fr($)}function xo($){return ri($)&&Ms($)}var $i=As||Eo;function fr($){if(!Yt($))return!1;var M=go($);return M==m||M==p||M==u||M==v}function Xt($){return typeof $=="number"&&$>-1&&$%1==0&&$<=s}function Yt($){var M=typeof $;return $!=null&&(M=="object"||M=="function")}function ri($){return $!=null&&typeof $=="object"}function Pi($){if(!ri($)||go($)!=b)return!1;var M=Yr($);if(M===null)return!0;var z=ur.call(M,"constructor")&&M.constructor;return typeof z=="function"&&z instanceof z&&co.call(z)==xc}var Oi=nt?Kn(nt):Pc;function Gc($){return Mc($,ja($))}function ja($){return Ms($)?Tc($):Jn($)}var Da=jc(function($,M,z){ti($,M,z)});function js($){return function(){return $}}function Ds($){return $}function Eo(){return!1}e.exports=Da})(wp,wp.exports);var xU=wp.exports;const EU=Sa(xU);var J7={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,d){this.fn=l,this.context=u,this.once=d||!1}function o(l,u,d,c,f){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new i(d,c||l,f),p=n?n+u:u;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],m]:l._events[p].push(m):(l._events[p]=m,l._eventsCount++),l}function s(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],d,c;if(this._eventsCount===0)return u;for(c in d=this._events)t.call(d,c)&&u.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},a.prototype.listeners=function(u){var d=n?n+u:u,c=this._events[d];if(!c)return[];if(c.fn)return[c.fn];for(var f=0,m=c.length,p=new Array(m);f +Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const uF={fallbackLocale:null,loadingDelay:200,formats:lF,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Eu=uF;function ec(){return Eu}function fF(e){const t=e,{formats:n}=t,r=aF(t,["formats"]);let i=e.fallbackLocale;if(e.initialLocale)try{R7.resolveLocale(e.initialLocale)&&(i=e.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${e.initialLocale}" is not a valid locale.`)}return r.warnOnMissingMessages&&(delete r.warnOnMissingMessages,r.handleMissingMessage==null?r.handleMissingMessage=cF:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(Eu,r,{initialLocale:i}),n&&("number"in n&&Object.assign(Eu.formats.number,n.number),"date"in n&&Object.assign(Eu.formats.date,n.date),"time"in n&&Object.assign(Eu.formats.time,n.time)),Ia.set(i)}const og=$0(!1);var dF=Object.defineProperty,hF=Object.defineProperties,pF=Object.getOwnPropertyDescriptors,m_=Object.getOwnPropertySymbols,mF=Object.prototype.hasOwnProperty,gF=Object.prototype.propertyIsEnumerable,g_=(e,t,n)=>t in e?dF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yF=(e,t)=>{for(var n in t||(t={}))mF.call(t,n)&&g_(e,n,t[n]);if(m_)for(var n of m_(t))gF.call(t,n)&&g_(e,n,t[n]);return e},bF=(e,t)=>hF(e,pF(t));let sy;const yp=$0(null);function y_(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function yd(e,t=ec().fallbackLocale){const n=y_(e);return t?[...new Set([...n,...y_(t)])]:n}function _s(){return sy??void 0}yp.subscribe(e=>{sy=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const vF=e=>{if(e&&tF(e)&&gp(e)){const{loadingDelay:t}=ec();let n;return typeof window<"u"&&_s()!=null&&t?n=window.setTimeout(()=>og.set(!0),t):og.set(!0),M7(e).then(()=>{yp.set(e)}).finally(()=>{clearTimeout(n),og.set(!1)})}return yp.set(e)},Ia=bF(yF({},yp),{set:vF}),wF=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],O0=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var _F=Object.defineProperty,bp=Object.getOwnPropertySymbols,j7=Object.prototype.hasOwnProperty,D7=Object.prototype.propertyIsEnumerable,b_=(e,t,n)=>t in e?_F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lv=(e,t)=>{for(var n in t||(t={}))j7.call(t,n)&&b_(e,n,t[n]);if(bp)for(var n of bp(t))D7.call(t,n)&&b_(e,n,t[n]);return e},mc=(e,t)=>{var n={};for(var r in e)j7.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bp)for(var r of bp(e))t.indexOf(r)<0&&D7.call(e,r)&&(n[r]=e[r]);return n};const Mf=(e,t)=>{const{formats:n}=ec();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},xF=O0(e=>{var t=e,{locale:n,format:r}=t,i=mc(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=Mf("number",r)),new Intl.NumberFormat(n,i)}),EF=O0(e=>{var t=e,{locale:n,format:r}=t,i=mc(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=Mf("date",r):Object.keys(i).length===0&&(i=Mf("date","short")),new Intl.DateTimeFormat(n,i)}),SF=O0(e=>{var t=e,{locale:n,format:r}=t,i=mc(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=Mf("time",r):Object.keys(i).length===0&&(i=Mf("time","short")),new Intl.DateTimeFormat(n,i)}),kF=(e={})=>{var t=e,{locale:n=_s()}=t,r=mc(t,["locale"]);return xF(Lv({locale:n},r))},CF=(e={})=>{var t=e,{locale:n=_s()}=t,r=mc(t,["locale"]);return EF(Lv({locale:n},r))},AF=(e={})=>{var t=e,{locale:n=_s()}=t,r=mc(t,["locale"]);return SF(Lv({locale:n},r))},TF=O0((e,t=_s())=>new R7(e,t,ec().formats,{ignoreTag:ec().ignoreTag})),IF=(e,t={})=>{var n,r,i,o;let s=t;typeof e=="object"&&(s=e,e=s.id);const{values:a,locale:l=_s(),default:u}=s;if(l==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let d=L7(e,l);if(!d)d=(o=(i=(r=(n=ec()).handleMissingMessage)==null?void 0:r.call(n,{locale:l,id:e,defaultValue:u}))!=null?i:u)!=null?o:e;else if(typeof d!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof d}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),d;if(!a)return d;let c=d;try{c=TF(d,l).format(a)}catch(f){f instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,f.message)}return c},$F=(e,t)=>AF(t).format(e),PF=(e,t)=>CF(t).format(e),OF=(e,t)=>kF(t).format(e),RF=(e,t=_s())=>L7(e,t),xi=pc([Ia,gd],()=>IF);pc([Ia],()=>$F);pc([Ia],()=>PF);pc([Ia],()=>OF);pc([Ia,gd],()=>RF);let F7=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");var U7={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(self,()=>{return n={7629:(i,o,s)=>{const a=s(375),l=s(8571),u=s(9474),d=s(1687),c=s(8652),f=s(8160),m=s(3292),p=s(6354),h=s(8901),y=s(9708),g=s(6914),b=s(2294),v=s(6133),w=s(1152),E=s(8863),C=s(2036),k={Base:class{constructor(_){this.type=_,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new b.Ids,this._preferences=null,this._refs=new v.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return a(typeof y.describe=="function","Manifest functionality disabled"),y.describe(this)}allow(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];return f.verifyFlat(S,"allow"),this._values(S,"_valids")}alter(_){a(_&&typeof _=="object"&&!Array.isArray(_),"Invalid targets argument"),a(!this._inRuleset(),"Cannot set alterations inside a ruleset");const S=this.clone();S.$_terms.alterations=S.$_terms.alterations||[];for(const A in _){const I=_[A];a(typeof I=="function","Alteration adjuster for",A,"must be a function"),S.$_terms.alterations.push({target:A,adjuster:I})}return S.$_temp.ruleset=!1,S}artifact(_){return a(_!==void 0,"Artifact cannot be undefined"),a(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",_)}cast(_){return a(_===!1||typeof _=="string","Invalid to value"),a(_===!1||this._definition.cast[_],"Type",this.type,"does not support casting to",_),this.$_setFlag("cast",_===!1?void 0:_)}default(_,S){return this._default("default",_,S)}description(_){return a(_&&typeof _=="string","Description must be a non-empty string"),this.$_setFlag("description",_)}empty(_){const S=this.clone();return _!==void 0&&(_=S.$_compile(_,{override:!1})),S.$_setFlag("empty",_,{clone:!1})}error(_){return a(_,"Missing error"),a(_ instanceof Error||typeof _=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",_)}example(_){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a(_!==void 0,"Missing example"),f.assertOptions(S,["override"]),this._inner("examples",_,{single:!0,override:S.override})}external(_,S){return typeof _=="object"&&(a(!S,"Cannot combine options with description"),S=_.description,_=_.method),a(typeof _=="function","Method must be a function"),a(S===void 0||S&&typeof S=="string","Description must be a non-empty string"),this._inner("externals",{method:_,description:S},{single:!0})}failover(_,S){return this._default("failover",_,S)}forbidden(){return this.presence("forbidden")}id(_){return _?(a(typeof _=="string","id must be a non-empty string"),a(/^[^\.]+$/.test(_),"id cannot contain period character"),this.$_setFlag("id",_)):this.$_setFlag("id",void 0)}invalid(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];return this._values(S,"_invalids")}label(_){return a(_&&typeof _=="string","Label name must be a non-empty string"),this.$_setFlag("label",_)}meta(_){return a(_!==void 0,"Meta cannot be undefined"),this._inner("metas",_,{single:!0})}note(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];a(S.length,"Missing notes");for(const I of S)a(I&&typeof I=="string","Notes must be non-empty strings");return this._inner("notes",S)}only(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof _=="boolean","Invalid mode:",_),this.$_setFlag("only",_)}optional(){return this.presence("optional")}prefs(_){a(_,"Missing preferences"),a(_.context===void 0,"Cannot override context"),a(_.externals===void 0,"Cannot override externals"),a(_.warnings===void 0,"Cannot override warnings"),a(_.debug===void 0,"Cannot override debug"),f.checkPreferences(_);const S=this.clone();return S._preferences=f.preferences(S._preferences,_),S}presence(_){return a(["optional","required","forbidden"].includes(_),"Unknown presence mode",_),this.$_setFlag("presence",_)}raw(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",_?"raw":void 0)}result(_){return a(["raw","strip"].includes(_),"Unknown result mode",_),this.$_setFlag("result",_)}required(){return this.presence("required")}strict(_){const S=this.clone(),A=_!==void 0&&!_;return S._preferences=f.preferences(S._preferences,{convert:A}),S}strip(){let _=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",_?"strip":void 0)}tag(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];a(S.length,"Missing tags");for(const I of S)a(I&&typeof I=="string","Tags must be non-empty strings");return this._inner("tags",S)}unit(_){return a(_&&typeof _=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",_)}valid(){for(var _=arguments.length,S=new Array(_),A=0;A<_;A++)S[A]=arguments[A];f.verifyFlat(S,"valid");const I=this.allow(...S);return I.$_setFlag("only",!!I._valids,{clone:!1}),I}when(_,S){const A=this.clone();A.$_terms.whens||(A.$_terms.whens=[]);const I=m.when(A,_,S);if(!["any","link"].includes(A.type)){const L=I.is?[I]:I.switch;for(const F of L)a(!F.then||F.then.type==="any"||F.then.type===A.type,"Cannot combine",A.type,"with",F.then&&F.then.type),a(!F.otherwise||F.otherwise.type==="any"||F.otherwise.type===A.type,"Cannot combine",A.type,"with",F.otherwise&&F.otherwise.type)}return A.$_terms.whens.push(I),A.$_mutateRebuild()}cache(_){a(!this._inRuleset(),"Cannot set caching inside a ruleset"),a(!this._cache,"Cannot override schema cache"),a(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const S=this.clone();return S._cache=_||c.provider.provision(),S.$_temp.ruleset=!1,S}clone(){const _=Object.create(Object.getPrototypeOf(this));return this._assign(_)}concat(_){a(f.isSchema(_),"Invalid schema object"),a(this.type==="any"||_.type==="any"||_.type===this.type,"Cannot merge type",this.type,"with another type:",_.type),a(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),a(!_._inRuleset(),"Cannot concatenate a schema with open ruleset");let S=this.clone();if(this.type==="any"&&_.type!=="any"){const A=_.clone();for(const I of Object.keys(S))I!=="type"&&(A[I]=S[I]);S=A}S._ids.concat(_._ids),S._refs.register(_,v.toSibling),S._preferences=S._preferences?f.preferences(S._preferences,_._preferences):_._preferences,S._valids=C.merge(S._valids,_._valids,_._invalids),S._invalids=C.merge(S._invalids,_._invalids,_._valids);for(const A of _._singleRules.keys())S._singleRules.has(A)&&(S._rules=S._rules.filter(I=>I.keep||I.name!==A),S._singleRules.delete(A));for(const A of _._rules)_._definition.rules[A.method].multi||S._singleRules.set(A.name,A),S._rules.push(A);if(S._flags.empty&&_._flags.empty){S._flags.empty=S._flags.empty.concat(_._flags.empty);const A=Object.assign({},_._flags);delete A.empty,d(S._flags,A)}else if(_._flags.empty){S._flags.empty=_._flags.empty;const A=Object.assign({},_._flags);delete A.empty,d(S._flags,A)}else d(S._flags,_._flags);for(const A in _.$_terms){const I=_.$_terms[A];I?S.$_terms[A]?S.$_terms[A]=S.$_terms[A].concat(I):S.$_terms[A]=I.slice():S.$_terms[A]||(S.$_terms[A]=I)}return this.$_root._tracer&&this.$_root._tracer._combine(S,[this,_]),S.$_mutateRebuild()}extend(_){return a(!_.base,"Cannot extend type with another base"),h.type(this,_)}extract(_){return _=Array.isArray(_)?_:_.split("."),this._ids.reach(_)}fork(_,S){a(!this._inRuleset(),"Cannot fork inside a ruleset");let A=this;for(let I of[].concat(_))I=Array.isArray(I)?I:I.split("."),A=A._ids.fork(I,S,A);return A.$_temp.ruleset=!1,A}rule(_){const S=this._definition;f.assertOptions(_,Object.keys(S.modifiers)),a(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const A=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;a(A>=0&&AA.tailor(_),ref:!1}),S.$_temp.ruleset=!1,S.$_mutateRebuild()}tracer(){return w.location?w.location(this):this}validate(_,S){return E.entry(_,this,S)}validateAsync(_,S){return E.entryAsync(_,this,S)}$_addRule(_){typeof _=="string"&&(_={name:_}),a(_&&typeof _=="object","Invalid options"),a(_.name&&typeof _.name=="string","Invalid rule name");for(const F in _)a(F[0]!=="_","Cannot set private rule properties");const S=Object.assign({},_);S._resolve=[],S.method=S.method||S.name;const A=this._definition.rules[S.method],I=S.args;a(A,"Unknown rule",S.method);const L=this.clone();if(I){a(Object.keys(I).length===1||Object.keys(I).length===this._definition.rules[S.name].args.length,"Invalid rule definition for",this.type,S.name);for(const F in I){let N=I[F];if(A.argsByName){const R=A.argsByName.get(F);if(R.ref&&f.isResolvable(N))S._resolve.push(F),L.$_mutateRegister(N);else if(R.normalize&&(N=R.normalize(N),I[F]=N),R.assert){const B=f.validateArg(N,F,R);a(!B,B,"or reference")}}N!==void 0?I[F]=N:delete I[F]}}return A.multi||(L._ruleRemove(S.name,{clone:!1}),L._singleRules.set(S.name,S)),L.$_temp.ruleset===!1&&(L.$_temp.ruleset=null),A.priority?L._rules.unshift(S):L._rules.push(S),L}$_compile(_,S){return m.schema(this.$_root,_,S)}$_createError(_,S,A,I,L){let F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};const N=F.flags!==!1?this._flags:{},R=F.messages?g.merge(this._definition.messages,F.messages):this._definition.messages;return new p.Report(_,S,A,N,R,I,L)}$_getFlag(_){return this._flags[_]}$_getRule(_){return this._singleRules.get(_)}$_mapLabels(_){return _=Array.isArray(_)?_:_.split("."),this._ids.labels(_)}$_match(_,S,A,I){(A=Object.assign({},A)).abortEarly=!0,A._externals=!1,S.snapshot();const L=!E.validate(_,this,S,A,I).errors;return S.restore(),L}$_modify(_){return f.assertOptions(_,["each","once","ref","schema"]),b.schema(this,_)||this}$_mutateRebuild(){return a(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(_,S)=>{let{source:A,name:I,path:L,key:F}=S;const N=this._definition[A][I]&&this._definition[A][I].register;N!==!1&&this.$_mutateRegister(_,{family:N,key:F})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(_){let{family:S,key:A}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._refs.register(_,S),this._ids.register(_,{key:A})}$_property(_){return this._definition.properties[_]}$_reach(_){return this._ids.reach(_)}$_rootReferences(){return this._refs.roots()}$_setFlag(_,S){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(_[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const I=this._definition.flags[_]||{};if(u(S,I.default)&&(S=void 0),u(S,this._flags[_]))return this;const L=A.clone!==!1?this.clone():this;return S!==void 0?(L._flags[_]=S,L.$_mutateRegister(S)):delete L._flags[_],_[0]!=="_"&&(L.$_temp.ruleset=!1),L}$_parent(_){for(var S=arguments.length,A=new Array(S>1?S-1:0),I=1;I2&&arguments[2]!==void 0?arguments[2]:{};return f.assertOptions(A,"literal"),a(S!==void 0,"Missing",_,"value"),a(typeof S=="function"||!A.literal,"Only function value supports literal option"),typeof S=="function"&&A.literal&&(S={[f.symbols.literal]:!0,literal:S}),this.$_setFlag(_,S)}_generate(_,S,A){if(!this.$_terms.whens)return{schema:this};const I=[],L=[];for(let R=0;RW)break}const F=L.join(", ");if(S.mainstay.tracer.debug(S,"rule","when",F),!F)return{schema:this};if(!S.mainstay.tracer.active&&this.$_temp.whens[F])return{schema:this.$_temp.whens[F],id:F};let N=this;this._definition.generate&&(N=this._definition.generate(this,_,S,A));for(const R of I)N=N.concat(R);return this.$_root._tracer&&this.$_root._tracer._combine(N,[this,...I]),this.$_temp.whens[F]=N,{schema:N,id:F}}_inner(_,S){let A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(!this._inRuleset(),`Cannot set ${_} inside a ruleset`);const I=this.clone();return I.$_terms[_]&&!A.override||(I.$_terms[_]=[]),A.single?I.$_terms[_].push(S):I.$_terms[_].push(...S),I.$_temp.ruleset=!1,I}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(_){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this._singleRules.has(_))return this;const A=S.clone!==!1?this.clone():this;A._singleRules.delete(_);const I=[];for(let L=0;L{const a=s(375),l=s(8571),u=s(8160),d={max:1e3,supported:new Set(["undefined","boolean","number","string"])};o.provider={provision:c=>new d.Cache(c)},d.Cache=class{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};u.assertOptions(c,["max"]),a(c.max===void 0||c.max&&c.max>0&&isFinite(c.max),"Invalid max cache size"),this._max=c.max||d.max,this._map=new Map,this._list=new d.List}get length(){return this._map.size}set(c,f){if(c!==null&&!d.supported.has(typeof c))return;let m=this._map.get(c);if(m)return m.value=f,void this._list.first(m);m=this._list.unshift({key:c,value:f}),this._map.set(c,m),this._compact()}get(c){const f=this._map.get(c);if(f)return this._list.first(f),l(f.value)}_compact(){if(this._map.size>this._max){const c=this._list.pop();this._map.delete(c.key)}}},d.List=class{constructor(){this.tail=null,this.head=null}unshift(c){return c.next=null,c.prev=this.head,this.head&&(this.head.next=c),this.head=c,this.tail||(this.tail=c),c}first(c){c!==this.head&&(this._remove(c),this.unshift(c))}pop(){return this._remove(this.tail)}_remove(c){const{next:f,prev:m}=c;return f.prev=m,m&&(m.next=f),c===this.tail&&(this.tail=f),c.prev=null,c.next=null,c}}},8160:(i,o,s)=>{const a=s(375),l=s(7916),u=s(5934);let d,c;const f={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};o.version=u.version,o.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},o.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},o.assertOptions=function(m,p){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"Options";a(m&&typeof m=="object"&&!Array.isArray(m),"Options must be of type object");const y=Object.keys(m).filter(g=>!p.includes(g));a(y.length===0,`${h} contain unknown keys: ${y}`)},o.checkPreferences=function(m){c=c||s(3378);const p=c.preferences.validate(m);if(p.error)throw new l([p.error.details[0].message])},o.compare=function(m,p,h){switch(h){case"=":return m===p;case">":return m>p;case"<":return m=":return m>=p;case"<=":return m<=p}},o.default=function(m,p){return m===void 0?p:m},o.isIsoDate=function(m){return f.isoDate.test(m)},o.isNumber=function(m){return typeof m=="number"&&!isNaN(m)},o.isResolvable=function(m){return!!m&&(m[o.symbols.ref]||m[o.symbols.template])},o.isSchema=function(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const h=m&&m[o.symbols.any];return!!h&&(a(p.legacy||h.version===o.version,"Cannot mix different versions of joi schemas"),!0)},o.isValues=function(m){return m[o.symbols.values]},o.limit=function(m){return Number.isSafeInteger(m)&&m>=0},o.preferences=function(m,p){d=d||s(6914),m=m||{},p=p||{};const h=Object.assign({},m,p);return p.errors&&m.errors&&(h.errors=Object.assign({},m.errors,p.errors),h.errors.wrap=Object.assign({},m.errors.wrap,p.errors.wrap)),p.messages&&(h.messages=d.compile(p.messages,m.messages)),delete h[o.symbols.prefs],h},o.tryWithPath=function(m,p){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{return m()}catch(y){throw y.path!==void 0?y.path=p+"."+y.path:y.path=p,h.append&&(y.message=`${y.message} (${y.path})`),y}},o.validateArg=function(m,p,h){let{assert:y,message:g}=h;if(o.isSchema(y)){const b=y.validate(m);return b.error?b.error.message:void 0}if(!y(m))return p?`${p} ${g}`:g},o.verifyFlat=function(m,p){for(const h of m)a(!Array.isArray(h),"Method no longer accepts array arguments:",p)}},3292:(i,o,s)=>{const a=s(375),l=s(8160),u=s(6133),d={};o.schema=function(c,f){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l.assertOptions(m,["appendPath","override"]);try{return d.schema(c,f,m)}catch(p){throw m.appendPath&&p.path!==void 0&&(p.message=`${p.message} (${p.path})`),p}},d.schema=function(c,f,m){a(f!==void 0,"Invalid undefined schema"),Array.isArray(f)&&(a(f.length,"Invalid empty array schema"),f.length===1&&(f=f[0]));const p=function(h){for(var y=arguments.length,g=new Array(y>1?y-1:0),b=1;b2&&arguments[2]!==void 0?arguments[2]:{};l.assertOptions(m,["legacy"]);const p=f&&f[l.symbols.any];if(p)return a(m.legacy||p.version===l.version,"Cannot mix different versions of joi schemas:",p.version,l.version),f;if(typeof f!="object"||!m.legacy)return o.schema(c,f,{appendPath:!0});const h=d.walk(f);return h?h.compile(h.root,f):o.schema(c,f,{appendPath:!0})},d.walk=function(c){if(typeof c!="object")return null;if(Array.isArray(c)){for(const m of c){const p=d.walk(m);if(p)return p}return null}const f=c[l.symbols.any];if(f)return{root:c[f.root],compile:f.compile};a(Object.getPrototypeOf(c)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const m in c){const p=d.walk(c[m]);if(p)return p}return null},d.simple=function(c){return c===null||["boolean","string","number"].includes(typeof c)},o.when=function(c,f,m){if(m===void 0&&(a(f&&typeof f=="object","Missing options"),m=f,f=u.create(".")),Array.isArray(m)&&(m={switch:m}),l.assertOptions(m,["is","not","then","otherwise","switch","break"]),l.isSchema(f))return a(m.is===void 0,'"is" can not be used with a schema condition'),a(m.not===void 0,'"not" can not be used with a schema condition'),a(m.switch===void 0,'"switch" can not be used with a schema condition'),d.condition(c,{is:f,then:m.then,otherwise:m.otherwise,break:m.break});if(a(u.isRef(f)||typeof f=="string","Invalid condition:",f),a(m.not===void 0||m.is===void 0,'Cannot combine "is" with "not"'),m.switch===void 0){let h=m;m.not!==void 0&&(h={is:m.not,then:m.otherwise,otherwise:m.then,break:m.break});let y=h.is!==void 0?c.$_compile(h.is):c.$_root.invalid(null,!1,0,"").required();return a(h.then!==void 0||h.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),a(h.break===void 0||h.then===void 0||h.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),m.is===void 0||u.isRef(m.is)||l.isSchema(m.is)||(y=y.required()),d.condition(c,{ref:o.ref(f),is:y,then:h.then,otherwise:h.otherwise,break:h.break})}a(Array.isArray(m.switch),'"switch" must be an array'),a(m.is===void 0,'Cannot combine "switch" with "is"'),a(m.not===void 0,'Cannot combine "switch" with "not"'),a(m.then===void 0,'Cannot combine "switch" with "then"');const p={ref:o.ref(f),switch:[],break:m.break};for(let h=0;h{const a=s(5688),l=s(8160),u=s(3328);o.Report=class{constructor(d,c,f,m,p,h,y){if(this.code=d,this.flags=m,this.messages=p,this.path=h.path,this.prefs=y,this.state=h,this.value=c,this.message=null,this.template=null,this.local=f||{},this.local.label=o.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const g=this.path[this.path.length-1];typeof g!="object"&&(this.local.key=g)}}_setTemplate(d){if(this.template=d,!this.flags.label&&this.path.length===0){const c=this._template(this.template,"root");c&&(this.local.label=c)}}toString(){if(this.message)return this.message;const d=this.code;if(!this.prefs.errors.render)return this.code;const c=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return c===void 0?`Error code "${d}" is not defined, your custom type is missing the correct messages definition`:(this.message=c.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(d,c){return o.template(this.value,d,c||this.code,this.state,this.prefs)}},o.path=function(d){let c="";for(const f of d)typeof f!="object"&&(typeof f=="string"?(c&&(c+="."),c+=f):c+=`[${f}]`);return c},o.template=function(d,c,f,m,p){if(!c)return;if(u.isTemplate(c))return f!=="root"?c:null;let h=p.errors.language;if(l.isResolvable(h)&&(h=h.resolve(d,m,p)),h&&c[h]){if(c[h][f]!==void 0)return c[h][f];if(c[h]["*"]!==void 0)return c[h]["*"]}return c[f]?c[f]:c["*"]},o.label=function(d,c,f,m){if(d.label)return d.label;if(!f.errors.label)return"";let p=c.path;return f.errors.label==="key"&&c.path.length>1&&(p=c.path.slice(-1)),o.path(p)||o.template(null,f.messages,"root",c,f)||m&&o.template(null,m,"root",c,f)||"value"},o.process=function(d,c,f){if(!d)return null;const{override:m,message:p,details:h}=o.details(d);if(m)return m;if(f.errors.stack)return new o.ValidationError(p,h,c);const y=Error.stackTraceLimit;Error.stackTraceLimit=0;const g=new o.ValidationError(p,h,c);return Error.stackTraceLimit=y,g},o.details=function(d){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=[];const m=[];for(const p of d){if(p instanceof Error){if(c.override!==!1)return{override:p};const y=p.toString();f.push(y),m.push({message:y,type:"override",context:{error:p}});continue}const h=p.toString();f.push(h),m.push({message:h,path:p.path.filter(y=>typeof y!="object"),type:p.code,context:p.local})}return f.length>1&&(f=[...new Set(f)]),{message:f.join(". "),details:m}},o.ValidationError=class extends Error{constructor(d,c,f){super(d),this._original=f,this.details=c}static isError(d){return d instanceof o.ValidationError}},o.ValidationError.prototype.isJoi=!0,o.ValidationError.prototype.name="ValidationError",o.ValidationError.prototype.annotate=a.error},8901:(i,o,s)=>{const a=s(375),l=s(8571),u=s(8160),d=s(6914),c={};o.type=function(f,m){const p=Object.getPrototypeOf(f),h=l(p),y=f._assign(Object.create(h)),g=Object.assign({},m);delete g.base,h._definition=g;const b=p._definition||{};g.messages=d.merge(b.messages,g.messages),g.properties=Object.assign({},b.properties,g.properties),y.type=g.type,g.flags=Object.assign({},b.flags,g.flags);const v=Object.assign({},b.terms);if(g.terms)for(const k in g.terms){const _=g.terms[k];a(y.$_terms[k]===void 0,"Invalid term override for",g.type,k),y.$_terms[k]=_.init,v[k]=_}g.terms=v,g.args||(g.args=b.args),g.prepare=c.prepare(g.prepare,b.prepare),g.coerce&&(typeof g.coerce=="function"&&(g.coerce={method:g.coerce}),g.coerce.from&&!Array.isArray(g.coerce.from)&&(g.coerce={method:g.coerce.method,from:[].concat(g.coerce.from)})),g.coerce=c.coerce(g.coerce,b.coerce),g.validate=c.validate(g.validate,b.validate);const w=Object.assign({},b.rules);if(g.rules)for(const k in g.rules){const _=g.rules[k];a(typeof _=="object","Invalid rule definition for",g.type,k);let S=_.method;if(S===void 0&&(S=function(){return this.$_addRule(k)}),S&&(a(!h[k],"Rule conflict in",g.type,k),h[k]=S),a(!w[k],"Rule conflict in",g.type,k),w[k]=_,_.alias){const A=[].concat(_.alias);for(const I of A)h[I]=_.method}_.args&&(_.argsByName=new Map,_.args=_.args.map(A=>(typeof A=="string"&&(A={name:A}),a(!_.argsByName.has(A.name),"Duplicated argument name",A.name),u.isSchema(A.assert)&&(A.assert=A.assert.strict().label(A.name)),_.argsByName.set(A.name,A),A)))}g.rules=w;const E=Object.assign({},b.modifiers);if(g.modifiers)for(const k in g.modifiers){a(!h[k],"Rule conflict in",g.type,k);const _=g.modifiers[k];a(typeof _=="function","Invalid modifier definition for",g.type,k);const S=function(A){return this.rule({[k]:A})};h[k]=S,E[k]=_}if(g.modifiers=E,g.overrides){h._super=p,y.$_super={};for(const k in g.overrides)a(p[k],"Cannot override missing",k),g.overrides[k][u.symbols.parent]=p[k],y.$_super[k]=p[k].bind(y);Object.assign(h,g.overrides)}g.cast=Object.assign({},b.cast,g.cast);const C=Object.assign({},b.manifest,g.manifest);return C.build=c.build(g.manifest&&g.manifest.build,b.manifest&&b.manifest.build),g.manifest=C,g.rebuild=c.rebuild(g.rebuild,b.rebuild),y},c.build=function(f,m){return f&&m?function(p,h){return m(f(p,h),h)}:f||m},c.coerce=function(f,m){return f&&m?{from:f.from&&m.from?[...new Set([...f.from,...m.from])]:null,method(p,h){let y;if((!m.from||m.from.includes(typeof p))&&(y=m.method(p,h),y)){if(y.errors||y.value===void 0)return y;p=y.value}if(!f.from||f.from.includes(typeof p)){const g=f.method(p,h);if(g)return g}return y}}:f||m},c.prepare=function(f,m){return f&&m?function(p,h){const y=f(p,h);if(y){if(y.errors||y.value===void 0)return y;p=y.value}return m(p,h)||y}:f||m},c.rebuild=function(f,m){return f&&m?function(p){m(p),f(p)}:f||m},c.validate=function(f,m){return f&&m?function(p,h){const y=m(p,h);if(y){if(y.errors&&(!Array.isArray(y.errors)||y.errors.length))return y;p=y.value}return f(p,h)||y}:f||m}},5107:(i,o,s)=>{const a=s(375),l=s(8571),u=s(8652),d=s(8160),c=s(3292),f=s(6354),m=s(8901),p=s(9708),h=s(6133),y=s(3328),g=s(1152);let b;const v={types:{alternatives:s(4946),any:s(8068),array:s(546),boolean:s(4937),date:s(7500),function:s(390),link:s(8785),number:s(3832),object:s(8966),string:s(7417),symbol:s(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const w={_types:new Set(Object.keys(v.types))};for(const E of w._types)w[E]=function(){for(var C=arguments.length,k=new Array(C),_=0;_2?C-2:0),_=2;_2?C-2:0),_=2;_{const a=s(375),l=s(8571),u=s(3328);o.compile=function(d,c){if(typeof d=="string")return a(!c,"Cannot set single message string"),new u(d);if(u.isTemplate(d))return a(!c,"Cannot set single message template"),d;a(typeof d=="object"&&!Array.isArray(d),"Invalid message options"),c=c?l(c):{};for(let f in d){const m=d[f];if(f==="root"||u.isTemplate(m)){c[f]=m;continue}if(typeof m=="string"){c[f]=new u(m);continue}a(typeof m=="object"&&!Array.isArray(m),"Invalid message for",f);const p=f;for(f in c[p]=c[p]||{},m){const h=m[f];f==="root"||u.isTemplate(h)?c[p][f]=h:(a(typeof h=="string","Invalid message for",f,"in",p),c[p][f]=new u(h))}}return c},o.decompile=function(d){const c={};for(let f in d){const m=d[f];if(f==="root"){c.root=m;continue}if(u.isTemplate(m)){c[f]=m.describe({compact:!0});continue}const p=f;for(f in c[p]={},m){const h=m[f];f!=="root"?c[p][f]=h.describe({compact:!0}):c[p].root=h}}return c},o.merge=function(d,c){if(!d)return o.compile(c);if(!c)return d;if(typeof c=="string")return new u(c);if(u.isTemplate(c))return c;const f=l(d);for(let m in c){const p=c[m];if(m==="root"||u.isTemplate(p)){f[m]=p;continue}if(typeof p=="string"){f[m]=new u(p);continue}a(typeof p=="object"&&!Array.isArray(p),"Invalid message for",m);const h=m;for(m in f[h]=f[h]||{},p){const y=p[m];m==="root"||u.isTemplate(y)?f[h][m]=y:(a(typeof y=="string","Invalid message for",m,"in",h),f[h][m]=new u(y))}}return f}},2294:(i,o,s)=>{const a=s(375),l=s(8160),u=s(6133),d={};o.Ids=d.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const c=new d.Ids;return c._byId=new Map(this._byId),c._byKey=new Map(this._byKey),c._schemaChain=this._schemaChain,c}concat(c){c._schemaChain&&(this._schemaChain=!0);for(const[f,m]of c._byId.entries())a(!this._byKey.has(f),"Schema id conflicts with existing key:",f),this._byId.set(f,m);for(const[f,m]of c._byKey.entries())a(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,m)}fork(c,f,m){const p=this._collect(c);p.push({schema:m});const h=p.shift();let y={id:h.id,schema:f(h.schema)};a(l.isSchema(y.schema),"adjuster function failed to return a joi schema type");for(const g of p)y={id:g.id,schema:d.fork(g.schema,y.id,y.schema)};return y.schema}labels(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const m=c[0],p=this._get(m);if(!p)return[...f,...c].join(".");const h=c.slice(1);return f=[...f,p.schema._flags.label||m],h.length?p.schema._ids.labels(h,f):f.join(".")}reach(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const m=c[0],p=this._get(m);a(p,"Schema does not contain path",[...f,...c].join("."));const h=c.slice(1);return h.length?p.schema._ids.reach(h,[...f,m]):p.schema}register(c){let{key:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!c||!l.isSchema(c))return;(c.$_property("schemaChain")||c._ids._schemaChain)&&(this._schemaChain=!0);const m=c._flags.id;if(m){const p=this._byId.get(m);a(!p||p.schema===c,"Cannot add different schemas with the same id:",m),a(!this._byKey.has(m),"Schema id conflicts with existing key:",m),this._byId.set(m,{schema:c,id:m})}f&&(a(!this._byKey.has(f),"Schema already contains key:",f),a(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,{schema:c,id:f}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];const p=c[0],h=this._get(p);a(h,"Schema does not contain path",[...f,...c].join(".")),m=[h,...m];const y=c.slice(1);return y.length?h.schema._ids._collect(y,[...f,p],m):m}_get(c){return this._byId.get(c)||this._byKey.get(c)}},d.fork=function(c,f,m){const p=o.schema(c,{each:(h,y)=>{let{key:g}=y;if(f===(h._flags.id||g))return m},ref:!1});return p?p.$_mutateRebuild():c},o.schema=function(c,f){let m;for(const p in c._flags){if(p[0]==="_")continue;const h=d.scan(c._flags[p],{source:"flags",name:p},f);h!==void 0&&(m=m||c.clone(),m._flags[p]=h)}for(let p=0;p{const a=s(375),l=s(8571),u=s(9621),d=s(8160);let c;const f={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};o.create=function(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(typeof m=="string","Invalid reference key:",m),d.assertOptions(p,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),a(!p.prefix||typeof p.prefix=="object","options.prefix must be of type object");const h=Object.assign({},f.defaults,p);delete h.prefix;const y=h.separator,g=f.context(m,y,p.prefix);if(h.type=g.type,m=g.key,h.type==="value")if(g.root&&(a(!y||m[0]!==y,"Cannot specify relative path with root prefix"),h.ancestor="root",m||(m=null)),y&&y===m)m=null,h.ancestor=0;else if(h.ancestor!==void 0)a(!y||!m||m[0]!==y,"Cannot combine prefix with ancestor option");else{const[b,v]=f.ancestor(m,y);v&&(m=m.slice(v))===""&&(m=null),h.ancestor=b}return h.path=y?m===null?[]:m.split(y):[m],new f.Ref(h)},o.in=function(m){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o.create(m,{...p,in:!0})},o.isRef=function(m){return!!m&&!!m[d.symbols.ref]},f.Ref=class{constructor(m){a(typeof m=="object","Invalid reference construction"),d.assertOptions(m,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),a([!1,void 0].includes(m.separator)||typeof m.separator=="string"&&m.separator.length===1,"Invalid separator"),a(!m.adjust||typeof m.adjust=="function","options.adjust must be a function"),a(!m.map||Array.isArray(m.map),"options.map must be an array"),a(!m.map||!m.adjust,"Cannot set both map and adjust options"),Object.assign(this,f.defaults,m),a(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(m,p,h,y){let g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};return a(!this.in||g.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(h.context,p,g):this.type==="local"?this._resolve(y,p,g):this.ancestor?this.ancestor==="root"?this._resolve(p.ancestors[p.ancestors.length-1],p,g):(a(this.ancestor<=p.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(p.ancestors[this.ancestor-1],p,g)):this._resolve(m,p,g)}_resolve(m,p,h){let y;if(this.type==="value"&&p.mainstay.shadow&&h.shadow!==!1&&(y=p.mainstay.shadow.get(this.absolute(p))),y===void 0&&(y=u(m,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(y=this.adjust(y)),this.map){const g=this.map.get(y);g!==void 0&&(y=g)}return p.mainstay&&p.mainstay.tracer.resolve(p,this,y),y}toString(){return this.display}absolute(m){return[...m.path.slice(0,-this.ancestor),...this.path]}clone(){return new f.Ref(this)}describe(){const m={path:this.path};this.type!=="value"&&(m.type=this.type),this.separator!=="."&&(m.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(m.ancestor=this.ancestor),this.map&&(m.map=[...this.map]);for(const p of["adjust","iterables","render"])this[p]!==null&&this[p]!==void 0&&(m[p]=this[p]);return this.in!==!1&&(m.in=!0),{ref:m}}updateDisplay(){const m=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${m}`);if(!this.separator)return void(this.display=`ref:${m}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${m}`);if(this.ancestor==="root")return void(this.display=`ref:root:${m}`);if(this.ancestor===1)return void(this.display=`ref:${m||".."}`);const p=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${p}${m||""}`}},f.Ref.prototype[d.symbols.ref]=!0,o.build=function(m){return(m=Object.assign({},f.defaults,m)).type==="value"&&m.ancestor===void 0&&(m.ancestor=1),new f.Ref(m)},f.context=function(m,p){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(m=m.trim(),h){const y=h.global===void 0?"$":h.global;if(y!==p&&m.startsWith(y))return{key:m.slice(y.length),type:"global"};const g=h.local===void 0?"#":h.local;if(g!==p&&m.startsWith(g))return{key:m.slice(g.length),type:"local"};const b=h.root===void 0?"/":h.root;if(b!==p&&m.startsWith(b))return{key:m.slice(b.length),type:"value",root:!0}}return{key:m,type:"value"}},f.ancestor=function(m,p){if(!p)return[1,0];if(m[0]!==p)return[1,0];if(m[1]!==p)return[0,1];let h=2;for(;m[h]===p;)++h;return[h-1,h]},o.toSibling=0,o.toParent=1,o.Manager=class{constructor(){this.refs=[]}register(m,p){if(m)if(p=p===void 0?o.toParent:p,Array.isArray(m))for(const h of m)this.register(h,p);else if(d.isSchema(m))for(const h of m._refs.refs)h.ancestor-p>=0&&this.refs.push({ancestor:h.ancestor-p,root:h.root});else o.isRef(m)&&m.type==="value"&&m.ancestor-p>=0&&this.refs.push({ancestor:m.ancestor-p,root:m.root}),c=c||s(3328),c.isTemplate(m)&&this.register(m.refs(),p)}get length(){return this.refs.length}clone(){const m=new o.Manager;return m.refs=l(this.refs),m}reset(){this.refs=[]}roots(){return this.refs.filter(m=>!m.ancestor).map(m=>m.root)}}},3378:(i,o,s)=>{const a=s(5107),l={};l.wrap=a.string().min(1).max(2).allow(!1),o.preferences=a.object({allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),context:a.object(),convert:a.boolean(),dateFormat:a.valid("date","iso","string","time","utc"),debug:a.boolean(),errors:{escapeHtml:a.boolean(),label:a.valid("path","key",!1),language:[a.string(),a.object().ref()],render:a.boolean(),stack:a.boolean(),wrap:{label:l.wrap,array:l.wrap,string:l.wrap}},externals:a.boolean(),messages:a.object(),noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:a.valid("required","optional","forbidden"),skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()}).strict(),l.nameRx=/^[a-zA-Z0-9]\w*$/,l.rule=a.object({alias:a.array().items(a.string().pattern(l.nameRx)).single(),args:a.array().items(a.string(),a.object({name:a.string().pattern(l.nameRx).required(),ref:a.boolean(),assert:a.alternatives([a.function(),a.object().schema()]).conditional("ref",{is:!0,then:a.required()}),normalize:a.function(),message:a.string().when("assert",{is:a.function(),then:a.required()})})),convert:a.boolean(),manifest:a.boolean(),method:a.function().allow(!1),multi:a.boolean(),validate:a.function()}),o.extension=a.object({type:a.alternatives([a.string(),a.object().regex()]).required(),args:a.function(),cast:a.object().pattern(l.nameRx,a.object({from:a.function().maxArity(1).required(),to:a.function().minArity(1).maxArity(2).required()})),base:a.object().schema().when("type",{is:a.object().regex(),then:a.forbidden()}),coerce:[a.function().maxArity(3),a.object({method:a.function().maxArity(3).required(),from:a.array().items(a.string()).single()})],flags:a.object().pattern(l.nameRx,a.object({setter:a.string(),default:a.any()})),manifest:{build:a.function().arity(2)},messages:[a.object(),a.string()],modifiers:a.object().pattern(l.nameRx,a.function().minArity(1).maxArity(2)),overrides:a.object().pattern(l.nameRx,a.function()),prepare:a.function().maxArity(3),rebuild:a.function().arity(1),rules:a.object().pattern(l.nameRx,l.rule),terms:a.object().pattern(l.nameRx,a.object({init:a.array().allow(null).required(),manifest:a.object().pattern(/.+/,[a.valid("schema","single"),a.object({mapped:a.object({from:a.string().required(),to:a.string().required()}).required()})])})),validate:a.function().maxArity(3)}).strict(),o.extensions=a.array().items(a.object(),a.function().arity(1)).strict(),l.desc={buffer:a.object({buffer:a.string()}),func:a.object({function:a.function().required(),options:{literal:!0}}),override:a.object({override:!0}),ref:a.object({ref:a.object({type:a.valid("value","global","local"),path:a.array().required(),separator:a.string().length(1).allow(!1),ancestor:a.number().min(0).integer().allow("root"),map:a.array().items(a.array().length(2)).min(1),adjust:a.function(),iterables:a.boolean(),in:a.boolean(),render:a.boolean()}).required()}),regex:a.object({regex:a.string().min(3)}),special:a.object({special:a.valid("deep").required()}),template:a.object({template:a.string().required(),options:a.object()}),value:a.object({value:a.alternatives([a.object(),a.array()]).required()})},l.desc.entity=a.alternatives([a.array().items(a.link("...")),a.boolean(),a.function(),a.number(),a.string(),l.desc.buffer,l.desc.func,l.desc.ref,l.desc.regex,l.desc.special,l.desc.template,l.desc.value,a.link("/")]),l.desc.values=a.array().items(null,a.boolean(),a.function(),a.number().allow(1/0,-1/0),a.string().allow(""),a.symbol(),l.desc.buffer,l.desc.func,l.desc.override,l.desc.ref,l.desc.regex,l.desc.template,l.desc.value),l.desc.messages=a.object().pattern(/.+/,[a.string(),l.desc.template,a.object().pattern(/.+/,[a.string(),l.desc.template])]),o.description=a.object({type:a.string().required(),flags:a.object({cast:a.string(),default:a.any(),description:a.string(),empty:a.link("/"),failover:l.desc.entity,id:a.string(),label:a.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:a.boolean(),unit:a.string()}).unknown(),preferences:{allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),convert:a.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:a.boolean(),label:["path","key"],language:[a.string(),l.desc.ref],wrap:{label:l.wrap,array:l.wrap}},externals:a.boolean(),messages:l.desc.messages,noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:["required","optional","forbidden"],skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()},allow:l.desc.values,invalid:l.desc.values,rules:a.array().min(1).items({name:a.string().required(),args:a.object().min(1),keep:a.boolean(),message:[a.string(),l.desc.messages],warn:a.boolean()}),keys:a.object().pattern(/.*/,a.link("/")),link:l.desc.ref}).pattern(/^[a-z]\w*$/,a.any())},493:(i,o,s)=>{const a=s(8571),l=s(9621),u=s(8160),d={value:Symbol("value")};i.exports=d.State=class{constructor(c,f,m){this.path=c,this.ancestors=f,this.mainstay=m.mainstay,this.schemas=m.schemas,this.debug=null}localize(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const p=new d.State(c,f,this);return m&&p.schemas&&(p.schemas=[d.schemas(m),...p.schemas]),p}nest(c,f){const m=new d.State(this.path,this.ancestors,this);return m.schemas=m.schemas&&[d.schemas(c),...m.schemas],m.debug=f,m}shadow(c,f){this.mainstay.shadow=this.mainstay.shadow||new d.Shadow,this.mainstay.shadow.set(this.path,c,f)}snapshot(){this.mainstay.shadow&&(this._snapshot=a(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}},d.schemas=function(c){return u.isSchema(c)?{schema:c}:c},d.Shadow=class{constructor(){this._values=null}set(c,f,m){if(!c.length||m==="strip"&&typeof c[c.length-1]=="number")return;this._values=this._values||new Map;let p=this._values;for(let h=0;h{const a=s(375),l=s(8571),u=s(5277),d=s(1447),c=s(8160),f=s(6354),m=s(6133),p={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};i.exports=p.Template=class{constructor(h,y){a(typeof h=="string","Template source must be a string"),a(!h.includes("\0")&&!h.includes(""),"Template source cannot contain reserved control characters"),this.source=h,this.rendered=h,this._template=null,this._settings=l(y),this._parse()}_parse(){if(!this.source.includes("{"))return;const h=p.encode(this.source),y=p.split(h);let g=!1;const b=[],v=y.shift();v&&b.push(v);for(const w of y){const E=w[0]!=="{",C=E?"}":"}}",k=w.indexOf(C);if(k===-1||w[1]==="{"){b.push(`{${p.decode(w)}`);continue}let _=w.slice(E?0:1,k);const S=_[0]===":";S&&(_=_.slice(1));const A=this._ref(p.decode(_),{raw:E,wrapped:S});b.push(A),typeof A!="string"&&(g=!0);const I=w.slice(k+C.length);I&&b.push(p.decode(I))}g?this._template=b:this.rendered=b.join("")}static date(h,y){return p.dateFormat[y.dateFormat].call(h)}describe(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this._settings&&h.compact)return this.source;const y={template:this.source};return this._settings&&(y.options=this._settings),y}static build(h){return new p.Template(h.template,h.options)}isDynamic(){return!!this._template}static isTemplate(h){return!!h&&!!h[c.symbols.template]}refs(){if(!this._template)return;const h=[];for(const y of this._template)typeof y!="string"&&h.push(...y.refs);return h}resolve(h,y,g,b){return this._template&&this._template.length===1?this._part(this._template[0],h,y,g,b,{}):this.render(h,y,g,b)}_part(h){for(var y=arguments.length,g=new Array(y>1?y-1:0),b=1;b4&&arguments[4]!==void 0?arguments[4]:{};if(!this.isDynamic())return this.rendered;const w=[];for(const E of this._template)if(typeof E=="string")w.push(E);else{const C=this._part(E,h,y,g,b,v),k=p.stringify(C,h,y,g,b,v);if(k!==void 0){const _=E.raw||(v.errors&&v.errors.escapeHtml)===!1?k:u(k);w.push(p.wrap(_,E.wrapped&&g.errors.wrap.label))}}return w.join("")}_ref(h,y){let{raw:g,wrapped:b}=y;const v=[],w=C=>{const k=m.create(C,this._settings);return v.push(k),_=>k.resolve(..._)};try{var E=new d.Parser(h,{reference:w,functions:p.functions,constants:p.constants})}catch(C){throw C.message=`Invalid template variable "${h}" fails due to: ${C.message}`,C}if(E.single){if(E.single.type==="reference"){const C=v[0];return{ref:C,raw:g,refs:v,wrapped:b||C.type==="local"&&C.key==="label"}}return p.stringify(E.single.value)}return{formula:E,raw:g,refs:v}}toString(){return this.source}},p.Template.prototype[c.symbols.template]=!0,p.Template.prototype.isImmutable=!0,p.encode=function(h){return h.replace(/\\(\{+)/g,(y,g)=>p.opens.slice(0,g.length)).replace(/\\(\}+)/g,(y,g)=>p.closes.slice(0,g.length))},p.decode=function(h){return h.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},p.split=function(h){const y=[];let g="";for(let b=0;b5&&arguments[5]!==void 0?arguments[5]:{};const E=typeof h,C=b&&b.errors&&b.errors.wrap||{};let k=!1;if(m.isRef(h)&&h.render&&(k=h.in,h=h.resolve(y,g,b,v,{in:h.in,...w})),h===null)return"null";if(E==="string")return p.wrap(h,w.arrayItems&&C.string);if(E==="number"||E==="function"||E==="symbol")return h.toString();if(E!=="object")return JSON.stringify(h);if(h instanceof Date)return p.Template.date(h,b);if(h instanceof Map){const S=[];for(const[A,I]of h.entries())S.push(`${A.toString()} -> ${I.toString()}`);h=S}if(!Array.isArray(h))return h.toString();const _=[];for(const S of h)_.push(p.stringify(S,y,g,b,v,{arrayItems:!0,...w}));return p.wrap(_.join(", "),!k&&C.array)},p.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},p.functions={if:(h,y,g)=>h?y:g,length:h=>typeof h=="string"?h.length:h&&typeof h=="object"?Array.isArray(h)?h.length:Object.keys(h).length:null,msg(h){const[y,g,b,v,w]=this,E=w.messages;if(!E)return"";const C=f.template(y,E[0],h,g,b)||f.template(y,E[1],h,g,b);return C?C.render(y,g,b,v,w):""},number:h=>typeof h=="number"?h:typeof h=="string"?parseFloat(h):typeof h=="boolean"?h?1:0:h instanceof Date?h.getTime():null}},4946:(i,o,s)=>{const a=s(375),l=s(1687),u=s(8068),d=s(8160),c=s(3292),f=s(6354),m=s(6133),p={};i.exports=u.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:m.toSibling}},args(h){for(var y=arguments.length,g=new Array(y>1?y-1:0),b=1;bf.details(S,{override:!1}))})};if(g._flags.match==="one")return C.length===1?{value:C[0]}:{errors:b("alternatives.one")};if(C.length!==g.$_terms.matches.length)return{errors:b("alternatives.all",{details:k.map(S=>f.details(S,{override:!1}))})};const _=S=>S.$_terms.matches.some(A=>A.schema.type==="object"||A.schema.type==="alternatives"&&_(A.schema));return _(g)?{value:C.reduce((S,A)=>l(S,A,{mergeArrays:!1}))}:{value:C[C.length-1]}}const E=[];for(let C=0;Cg.path[0]!=="is"?y.label(h):void 0,ref:!1})}},rebuild(h){h.$_modify({each:y=>{d.isSchema(y)&&y.type==="array"&&h.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(h,y){if(y.matches)for(const g of y.matches){const{schema:b,ref:v,is:w,not:E,then:C,otherwise:k}=g;h=b?h.try(b):v?h.conditional(v,{is:w,then:C,not:E,otherwise:k,switch:g.switch}):h.conditional(w,{then:C,otherwise:k})}return h}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),p.errors=function(h,y){let{error:g,state:b}=y;if(!h.length)return{errors:g("alternatives.any")};if(h.length===1)return{errors:h[0].reports};const v=new Set,w=[];for(const{reports:E,schema:C}of h){if(E.length>1)return p.unmatched(h,g);const k=E[0];if(k instanceof f.Report==0)return p.unmatched(h,g);if(k.state.path.length!==b.path.length){w.push({type:C.type,report:k});continue}if(k.code==="any.only"){for(const A of k.local.valids)v.add(A);continue}const[_,S]=k.code.split(".");S==="base"?v.add(_):w.push({type:C.type,report:k})}return w.length?w.length===1?{errors:w[0].report}:p.unmatched(h,g):{errors:g("alternatives.types",{types:[...v]})}},p.unmatched=function(h,y){const g=[];for(const b of h)g.push(...b.reports);return{errors:y("alternatives.match",f.details(g,{override:!1}))}}},8068:(i,o,s)=>{const a=s(375),l=s(7629),u=s(8160),d=s(6914);i.exports=l.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(c,f){return a(typeof c=="function","Method must be a function"),a(f===void 0||f&&typeof f=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:c,description:f}})},validate(c,f,m){let{method:p}=m;try{return p(c,f)}catch(h){return f.error("any.custom",{error:h})}},args:["method","description"],multi:!0},messages:{method(c){return this.prefs({messages:c})}},shared:{method(c){a(u.isSchema(c)&&c._flags.id,"Schema must be a schema with an id");const f=this.clone();return f.$_terms.shared=f.$_terms.shared||[],f.$_terms.shared.push(c),f.$_mutateRegister(c),f}},warning:{method(c,f){return a(c&&typeof c=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:c,local:f},warn:!0})},validate(c,f,m){let{code:p,local:h}=m;return f.error(p,h)},args:["code","local"],multi:!0}},modifiers:{keep(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.keep=f},message(c,f){c.message=d.compile(f)},warn(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.warn=f}},manifest:{build(c,f){for(const m in f){const p=f[m];if(["examples","externals","metas","notes","tags"].includes(m))for(const h of p)c=c[m.slice(0,-1)](h);else if(m!=="alterations")if(m!=="whens"){if(m==="shared")for(const h of p)c=c.shared(h)}else for(const h of p){const{ref:y,is:g,not:b,then:v,otherwise:w,concat:E}=h;c=E?c.concat(E):y?c.when(y,{is:g,not:b,then:v,otherwise:w,switch:h.switch,break:h.break}):c.when(g,{then:v,otherwise:w,break:h.break})}else{const h={};for(const{target:y,adjuster:g}of p)h[y]=g;c=c.alter(h)}}return c}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(i,o,s)=>{const a=s(375),l=s(9474),u=s(9621),d=s(8068),c=s(8160),f=s(3292),m={};i.exports=d.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(p,h){let{schema:y,state:g,prefs:b}=h;if(!Array.isArray(p))return;const v=y.$_getRule("sort");return v?m.sort(y,p,v.args.options,g,b):void 0}},validate(p,h){let{schema:y,error:g}=h;if(!Array.isArray(p)){if(y._flags.single){const b=[p];return b[c.symbols.arraySingle]=!0,{value:b}}return{errors:g("array.base")}}if(y.$_getRule("items")||y.$_terms.externals)return{value:p.slice()}},rules:{has:{method(p){p=this.$_compile(p,{appendPath:!0});const h=this.$_addRule({name:"has",args:{schema:p}});return h.$_mutateRegister(p),h},validate(p,h,y){let{state:g,prefs:b,error:v}=h,{schema:w}=y;const E=[p,...g.ancestors];for(let k=0;kthis.$_compile(h[b]),b,{append:!0});g.$_terms.items.push(v)}return g.$_mutateRebuild()},validate(p,h){let{schema:y,error:g,state:b,prefs:v,errorsArray:w}=h;const E=y.$_terms._requireds.slice(),C=y.$_terms.ordered.slice(),k=[...y.$_terms._inclusions,...E],_=!p[c.symbols.arraySingle];delete p[c.symbols.arraySingle];const S=w();let A=p.length;for(let I=0;I="})}},ordered:{method(){for(var p=arguments.length,h=new Array(p),y=0;ythis.$_compile(h[b]),b,{append:!0});m.validateSingle(v,g),g.$_mutateRegister(v),g.$_terms.ordered.push(v)}return g.$_mutateRebuild()}},single:{method(p){const h=p===void 0||!!p;return a(!h||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",h)}},sort:{method(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c.assertOptions(p,["by","order"]);const h={order:p.order||"ascending"};return p.by&&(h.by=f.ref(p.by,{ancestor:0}),a(!h.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:h}})},validate(p,h,y){let{error:g,state:b,prefs:v,schema:w}=h,{options:E}=y;const{value:C,errors:k}=m.sort(w,p,E,b,v);if(k)return k;for(let _=0;_1&&arguments[1]!==void 0?arguments[1]:{};a(!p||typeof p=="function"||typeof p=="string","comparator must be a function or a string"),c.assertOptions(h,["ignoreUndefined","separator"]);const y={name:"unique",args:{options:h,comparator:p}};if(p)if(typeof p=="string"){const g=c.default(h.separator,".");y.path=g?p.split(g):[p]}else y.comparator=p;return this.$_addRule(y)},validate(p,h,y,g){let{state:b,error:v,schema:w}=h,{comparator:E,options:C}=y,{comparator:k,path:_}=g;const S={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},A=k||l,I=C.ignoreUndefined;for(let L=0;Lnew Set(p)}},rebuild(p){p.$_terms._inclusions=[],p.$_terms._exclusions=[],p.$_terms._requireds=[];for(const h of p.$_terms.items)m.validateSingle(h,p),h._flags.presence==="required"?p.$_terms._requireds.push(h):h._flags.presence==="forbidden"?p.$_terms._exclusions.push(h):p.$_terms._inclusions.push(h);for(const h of p.$_terms.ordered)m.validateSingle(h,p)},manifest:{build:(p,h)=>(h.items&&(p=p.items(...h.items)),h.ordered&&(p=p.ordered(...h.ordered)),p)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),m.fillMissedErrors=function(p,h,y,g,b,v){const w=[];let E=0;for(const C of y){const k=C._flags.label;k?w.push(k):++E}w.length?E?h.push(p.$_createError("array.includesRequiredBoth",g,{knownMisses:w,unknownMisses:E},b,v)):h.push(p.$_createError("array.includesRequiredKnowns",g,{knownMisses:w},b,v)):h.push(p.$_createError("array.includesRequiredUnknowns",g,{unknownMisses:E},b,v))},m.fillOrderedErrors=function(p,h,y,g,b,v){const w=[];for(const E of y)E._flags.presence==="required"&&w.push(E);w.length&&m.fillMissedErrors(p,h,w,g,b,v)},m.fillDefault=function(p,h,y,g){const b=[];let v=!0;for(let w=p.length-1;w>=0;--w){const E=p[w],C=[h,...y.ancestors],k=E.$_validate(void 0,y.localize(y.path,C,E),g).value;if(v){if(k===void 0)continue;v=!1}b.unshift(k)}b.length&&h.push(...b)},m.fastSplice=function(p,h){let y=h;for(;y{let S=m.compare(k,_,w,E);if(S!==null||(y.by&&(k=y.by.resolve(k,g,b),_=y.by.resolve(_,g,b)),S=m.compare(k,_,w,E),S!==null))return S;const A=typeof k;if(A!==typeof _)throw p.$_createError("array.sort.mismatching",h,null,g,b);if(A!=="number"&&A!=="string")throw p.$_createError("array.sort.unsupported",h,{type:A},g,b);return A==="number"?(k-_)*v:k<_?w:E};try{return{value:h.slice().sort(C)}}catch(k){return{errors:k}}},m.compare=function(p,h,y,g){return p===h?0:p===void 0?1:h===void 0?-1:p===null?g:h===null?y:null}},4937:(i,o,s)=>{const a=s(375),l=s(8068),u=s(8160),d=s(2036),c={isBool:function(f){return typeof f=="boolean"}};i.exports=l.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(f,m){let{schema:p}=m;if(typeof f!="boolean"){if(typeof f=="string"){const h=p._flags.sensitive?f:f.toLowerCase();f=h==="true"||h!=="false"&&f}return typeof f!="boolean"&&(f=p.$_terms.truthy&&p.$_terms.truthy.has(f,null,null,!p._flags.sensitive)||(!p.$_terms.falsy||!p.$_terms.falsy.has(f,null,null,!p._flags.sensitive))&&f),{value:f}}},validate(f,m){let{error:p}=m;if(typeof f!="boolean")return{value:f,errors:p("boolean.base")}},rules:{truthy:{method(){for(var f=arguments.length,m=new Array(f),p=0;p0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("sensitive",f)}}},cast:{number:{from:c.isBool,to:(f,m)=>f?1:0},string:{from:c.isBool,to:(f,m)=>f?"true":"false"}},manifest:{build:(f,m)=>(m.truthy&&(f=f.truthy(...m.truthy)),m.falsy&&(f=f.falsy(...m.falsy)),f)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(i,o,s)=>{const a=s(375),l=s(8068),u=s(8160),d=s(3328),c={isDate:function(f){return f instanceof Date}};i.exports=l.extend({type:"date",coerce:{from:["number","string"],method(f,m){let{schema:p}=m;return{value:c.parse(f,p._flags.format)||f}}},validate(f,m){let{schema:p,error:h,prefs:y}=m;if(f instanceof Date&&!isNaN(f.getTime()))return;const g=p._flags.format;return y.convert&&g&&typeof f=="string"?{value:f,errors:h("date.format",{format:g})}:{value:f,errors:h("date.base")}},rules:{compare:{method:!1,validate(f,m,p,h){let{date:y}=p,{name:g,operator:b,args:v}=h;const w=y==="now"?Date.now():y.getTime();return u.compare(f.getTime(),w,b)?f:m.error("date."+g,{limit:v.date,value:f})},args:[{name:"date",ref:!0,normalize:f=>f==="now"?f:c.parse(f),assert:f=>f!==null,message:"must have a valid date format"}]},format:{method(f){return a(["iso","javascript","unix"].includes(f),"Unknown date format",f),this.$_setFlag("format",f)}},greater:{method(f){return this.$_addRule({name:"greater",method:"compare",args:{date:f},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(f){return this.$_addRule({name:"less",method:"compare",args:{date:f},operator:"<"})}},max:{method(f){return this.$_addRule({name:"max",method:"compare",args:{date:f},operator:"<="})}},min:{method(f){return this.$_addRule({name:"min",method:"compare",args:{date:f},operator:">="})}},timestamp:{method(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"javascript";return a(["javascript","unix"].includes(f),'"type" must be one of "javascript, unix"'),this.format(f)}}},cast:{number:{from:c.isDate,to:(f,m)=>f.getTime()},string:{from:c.isDate,to(f,m){let{prefs:p}=m;return d.date(f,p)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),c.parse=function(f,m){if(f instanceof Date)return f;if(typeof f!="string"&&(isNaN(f)||!isFinite(f))||/^\s*$/.test(f))return null;if(m==="iso")return u.isIsoDate(f)?c.date(f.toString()):null;const p=f;if(typeof f=="string"&&/^[+-]?\d+(\.\d+)?$/.test(f)&&(f=parseFloat(f)),m){if(m==="javascript")return c.date(1*f);if(m==="unix")return c.date(1e3*f);if(typeof p=="string")return null}return c.date(f)},c.date=function(f){const m=new Date(f);return isNaN(m.getTime())?null:m}},390:(i,o,s)=>{const a=s(375),l=s(7824);i.exports=l.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(u){return a(Number.isSafeInteger(u)&&u>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:u}})},validate(u,d,c){let{n:f}=c;return u.length===f?u:d.error("function.arity",{n:f})}},class:{method(){return this.$_addRule("class")},validate:(u,d)=>/^\s*class\s/.test(u.toString())?u:d.error("function.class",{value:u})},minArity:{method(u){return a(Number.isSafeInteger(u)&&u>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:u}})},validate(u,d,c){let{n:f}=c;return u.length>=f?u:d.error("function.minArity",{n:f})}},maxArity:{method(u){return a(Number.isSafeInteger(u)&&u>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:u}})},validate(u,d,c){let{n:f}=c;return u.length<=f?u:d.error("function.maxArity",{n:f})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(i,o,s)=>{const a=s(978),l=s(375),u=s(8571),d=s(3652),c=s(8068),f=s(8160),m=s(3292),p=s(6354),h=s(6133),y=s(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};i.exports=c.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(b,v)=>b.keys(v),validate(b,v){let{schema:w,error:E,state:C,prefs:k}=v;if(!b||typeof b!==w.$_property("typeof")||Array.isArray(b))return{value:b,errors:E("object.base",{type:w.$_property("typeof")})};if(!(w.$_terms.renames||w.$_terms.dependencies||w.$_terms.keys||w.$_terms.patterns||w.$_terms.externals))return;b=g.clone(b,k);const _=[];if(w.$_terms.renames&&!g.rename(w,b,C,k,_))return{value:b,errors:_};if(!w.$_terms.keys&&!w.$_terms.patterns&&!w.$_terms.dependencies)return{value:b,errors:_};const S=new Set(Object.keys(b));if(w.$_terms.keys){const A=[b,...C.ancestors];for(const I of w.$_terms.keys){const L=I.key,F=b[L];S.delete(L);const N=C.localize([...C.path,L],A,I),R=I.schema.$_validate(F,N,k);if(R.errors){if(k.abortEarly)return{value:b,errors:R.errors};R.value!==void 0&&(b[L]=R.value),_.push(...R.errors)}else I.schema._flags.result==="strip"||R.value===void 0&&F!==void 0?delete b[L]:R.value!==void 0&&(b[L]=R.value)}}if(S.size||w._flags._hasPatternMatch){const A=g.unknown(w,b,S,_,C,k);if(A)return A}if(w.$_terms.dependencies)for(const A of w.$_terms.dependencies){if(A.key!==null&&g.isPresent(A.options)(A.key.resolve(b,C,k,null,{shadow:!1}))===!1)continue;const I=g.dependencies[A.rel](w,A,b,C,k);if(I){const L=w.$_createError(I.code,b,I.context,C,k);if(k.abortEarly)return{value:b,errors:L};_.push(L)}}return{value:b,errors:_}},rules:{and:{method(){for(var b=arguments.length,v=new Array(b),w=0;w!b.hasOwnProperty(w.key)):new g.Keys;for(const w in b)f.tryWithPath(()=>v.$_terms.keys.push({key:w,schema:this.$_compile(b[w])}),w)}else v.$_terms.keys=new g.Keys;else v.$_terms.keys=null;return v.$_mutateRebuild()}},length:{method(b){return this.$_addRule({name:"length",args:{limit:b},operator:"="})},validate(b,v,w,E){let{limit:C}=w,{name:k,operator:_,args:S}=E;return f.compare(Object.keys(b).length,C,_)?b:v.error("object."+k,{limit:S.limit,value:b})},args:[{name:"limit",ref:!0,assert:f.limit,message:"must be a positive integer"}]},max:{method(b){return this.$_addRule({name:"max",method:"length",args:{limit:b},operator:"<="})}},min:{method(b){return this.$_addRule({name:"min",method:"length",args:{limit:b},operator:">="})}},nand:{method(){for(var b=arguments.length,v=new Array(b),w=0;w2&&arguments[2]!==void 0?arguments[2]:{};const E=b instanceof RegExp;E||(b=this.$_compile(b,{appendPath:!0})),l(v!==void 0,"Invalid rule"),f.assertOptions(w,["fallthrough","matches"]),E&&l(!b.flags.includes("g")&&!b.flags.includes("y"),"pattern should not use global or sticky mode"),v=this.$_compile(v,{appendPath:!0});const C=this.clone();C.$_terms.patterns=C.$_terms.patterns||[];const k={[E?"regex":"schema"]:b,rule:v};return w.matches&&(k.matches=this.$_compile(w.matches),k.matches.type!=="array"&&(k.matches=k.matches.$_root.array().items(k.matches)),C.$_mutateRegister(k.matches),C.$_setFlag("_hasPatternMatch",!0,{clone:!1})),w.fallthrough&&(k.fallthrough=!0),C.$_terms.patterns.push(k),C.$_mutateRegister(v),C}},ref:{method(){return this.$_addRule("ref")},validate:(b,v)=>h.isRef(b)?b:v.error("object.refType",{value:b})},regex:{method(){return this.$_addRule("regex")},validate:(b,v)=>b instanceof RegExp?b:v.error("object.regex",{value:b})},rename:{method(b,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(typeof b=="string"||b instanceof RegExp,"Rename missing the from argument"),l(typeof v=="string"||v instanceof y,"Invalid rename to argument"),l(v!==b,"Cannot rename key to same name:",b),f.assertOptions(w,["alias","ignoreUndefined","override","multiple"]);const E=this.clone();E.$_terms.renames=E.$_terms.renames||[];for(const C of E.$_terms.renames)l(C.from!==b,"Cannot rename the same key multiple times");return v instanceof y&&E.$_mutateRegister(v),E.$_terms.renames.push({from:b,to:v,options:a(g.renameDefaults,w)}),E}},schema:{method(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:b}})},validate(b,v,w){let{type:E}=w;return!f.isSchema(b)||E!=="any"&&b.type!==E?v.error("object.schema",{type:E}):b}},unknown:{method(b){return this.$_setFlag("unknown",b!==!1)}},with:{method(b,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"with",b,v,w)}},without:{method(b,v){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"without",b,v,w)}},xor:{method(){for(var b=arguments.length,v=new Array(b),w=0;wv.add(w,{after:w.schema.$_rootReferences(),group:w.key}),w.key);b.$_terms.keys=new g.Keys(...v.nodes)}},manifest:{build(b,v){if(v.keys&&(b=b.keys(v.keys)),v.dependencies)for(const{rel:w,key:E=null,peers:C,options:k}of v.dependencies)b=g.dependency(b,w,E,C,k);if(v.patterns)for(const{regex:w,schema:E,rule:C,fallthrough:k,matches:_}of v.patterns)b=b.pattern(w||E,C,{fallthrough:k,matches:_});if(v.renames)for(const{from:w,to:E,options:C}of v.renames)b=b.rename(w,E,C);return b}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(b,v){if(typeof b=="object"){if(v.nonEnumerables)return u(b,{shallow:!0});const E=Object.create(Object.getPrototypeOf(b));return Object.assign(E,b),E}const w=function(){for(var E=arguments.length,C=new Array(E),k=0;k1&&typeof E[E.length-1]=="object"?E.pop():{}),f.assertOptions(C,["separator","isPresent"]),E=[].concat(E);const k=f.default(C.separator,"."),_=[];for(const A of E)l(typeof A=="string",v,"peers must be strings"),_.push(m.ref(A,{separator:k,ancestor:0,prefix:!1}));w!==null&&(w=m.ref(w,{separator:k,ancestor:0,prefix:!1}));const S=b.clone();return S.$_terms.dependencies=S.$_terms.dependencies||[],S.$_terms.dependencies.push(new g.Dependency(v,w,_,E,C)),S},g.dependencies={and(b,v,w,E,C){const k=[],_=[],S=v.peers.length,A=g.isPresent(v.options);for(const I of v.peers)A(I.resolve(w,E,C,null,{shadow:!1}))===!1?k.push(I.key):_.push(I.key);if(k.length!==S&&_.length!==S)return{code:"object.and",context:{present:_,presentWithLabels:g.keysToLabels(b,_),missing:k,missingWithLabels:g.keysToLabels(b,k)}}},nand(b,v,w,E,C){const k=[],_=g.isPresent(v.options);for(const I of v.peers)_(I.resolve(w,E,C,null,{shadow:!1}))&&k.push(I.key);if(k.length!==v.peers.length)return;const S=v.paths[0],A=v.paths.slice(1);return{code:"object.nand",context:{main:S,mainWithLabel:g.keysToLabels(b,S),peers:A,peersWithLabels:g.keysToLabels(b,A)}}},or(b,v,w,E,C){const k=g.isPresent(v.options);for(const _ of v.peers)if(k(_.resolve(w,E,C,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:v.paths,peersWithLabels:g.keysToLabels(b,v.paths)}}},oxor(b,v,w,E,C){const k=[],_=g.isPresent(v.options);for(const A of v.peers)_(A.resolve(w,E,C,null,{shadow:!1}))&&k.push(A.key);if(!k.length||k.length===1)return;const S={peers:v.paths,peersWithLabels:g.keysToLabels(b,v.paths)};return S.present=k,S.presentWithLabels=g.keysToLabels(b,k),{code:"object.oxor",context:S}},with(b,v,w,E,C){const k=g.isPresent(v.options);for(const _ of v.peers)if(k(_.resolve(w,E,C,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:v.key.key,mainWithLabel:g.keysToLabels(b,v.key.key),peer:_.key,peerWithLabel:g.keysToLabels(b,_.key)}}},without(b,v,w,E,C){const k=g.isPresent(v.options);for(const _ of v.peers)if(k(_.resolve(w,E,C,null,{shadow:!1})))return{code:"object.without",context:{main:v.key.key,mainWithLabel:g.keysToLabels(b,v.key.key),peer:_.key,peerWithLabel:g.keysToLabels(b,_.key)}}},xor(b,v,w,E,C){const k=[],_=g.isPresent(v.options);for(const A of v.peers)_(A.resolve(w,E,C,null,{shadow:!1}))&&k.push(A.key);if(k.length===1)return;const S={peers:v.paths,peersWithLabels:g.keysToLabels(b,v.paths)};return k.length===0?{code:"object.missing",context:S}:(S.present=k,S.presentWithLabels=g.keysToLabels(b,k),{code:"object.xor",context:S})}},g.keysToLabels=function(b,v){return Array.isArray(v)?v.map(w=>b.$_mapLabels(w)):b.$_mapLabels(v)},g.isPresent=function(b){return typeof b.isPresent=="function"?b.isPresent:v=>v!==void 0},g.rename=function(b,v,w,E,C){const k={};for(const _ of b.$_terms.renames){const S=[],A=typeof _.from!="string";if(A)for(const I in v){if(v[I]===void 0&&_.options.ignoreUndefined||I===_.to)continue;const L=_.from.exec(I);L&&S.push({from:I,to:_.to,match:L})}else!Object.prototype.hasOwnProperty.call(v,_.from)||v[_.from]===void 0&&_.options.ignoreUndefined||S.push(_);for(const I of S){const L=I.from;let F=I.to;if(F instanceof y&&(F=F.render(v,w,E,I.match)),L!==F){if(!_.options.multiple&&k[F]&&(C.push(b.$_createError("object.rename.multiple",v,{from:L,to:F,pattern:A},w,E)),E.abortEarly)||Object.prototype.hasOwnProperty.call(v,F)&&!_.options.override&&!k[F]&&(C.push(b.$_createError("object.rename.override",v,{from:L,to:F,pattern:A},w,E)),E.abortEarly))return!1;v[L]===void 0?delete v[F]:v[F]=v[L],k[F]=!0,_.options.alias||delete v[L]}}}return!0},g.unknown=function(b,v,w,E,C,k){if(b.$_terms.patterns){let _=!1;const S=b.$_terms.patterns.map(I=>{if(I.matches)return _=!0,[]}),A=[v,...C.ancestors];for(const I of w){const L=v[I],F=[...C.path,I];for(let N=0;N{const a=s(375),l=s(8068),u=s(8160),d=s(3292),c=s(6354),f={};i.exports=l.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(m,p)=>m.ref(p),validate(m,p){let{schema:h,state:y,prefs:g}=p;a(h.$_terms.link,"Uninitialized link schema");const b=f.generate(h,m,y,g),v=h.$_terms.link[0].ref;return b.$_validate(m,y.nest(b,`link:${v.display}:${b.type}`),g)},generate:(m,p,h,y)=>f.generate(m,p,h,y),rules:{ref:{method(m){a(!this.$_terms.link,"Cannot reinitialize schema"),m=d.ref(m),a(m.type==="value"||m.type==="local","Invalid reference type:",m.type),a(m.type==="local"||m.ancestor==="root"||m.ancestor>0,"Link cannot reference itself");const p=this.clone();return p.$_terms.link=[{ref:m}],p}},relative:{method(){let m=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("relative",m)}}},overrides:{concat(m){a(this.$_terms.link,"Uninitialized link schema"),a(u.isSchema(m),"Invalid schema object"),a(m.type!=="link","Cannot merge type link with another link");const p=this.clone();return p.$_terms.whens||(p.$_terms.whens=[]),p.$_terms.whens.push({concat:m}),p.$_mutateRebuild()}},manifest:{build:(m,p)=>(a(p.link,"Invalid link description missing link"),m.ref(p.link))}}),f.generate=function(m,p,h,y){let g=h.mainstay.links.get(m);if(g)return g._generate(p,h,y).schema;const b=m.$_terms.link[0].ref,{perspective:v,path:w}=f.perspective(b,h);f.assert(v,"which is outside of schema boundaries",b,m,h,y);try{g=w.length?v.$_reach(w):v}catch{f.assert(!1,"to non-existing schema",b,m,h,y)}return f.assert(g.type!=="link","which is another link",b,m,h,y),m._flags.relative||h.mainstay.links.set(m,g),g._generate(p,h,y).schema},f.perspective=function(m,p){if(m.type==="local"){for(const{schema:h,key:y}of p.schemas){if((h._flags.id||y)===m.path[0])return{perspective:h,path:m.path.slice(1)};if(h.$_terms.shared){for(const g of h.$_terms.shared)if(g._flags.id===m.path[0])return{perspective:g,path:m.path.slice(1)}}}return{perspective:null,path:null}}return m.ancestor==="root"?{perspective:p.schemas[p.schemas.length-1].schema,path:m.path}:{perspective:p.schemas[m.ancestor]&&p.schemas[m.ancestor].schema,path:m.path}},f.assert=function(m,p,h,y,g,b){m||a(!1,`"${c.label(y._flags,g,b)}" contains link reference "${h.display}" ${p}`)}},3832:(i,o,s)=>{const a=s(375),l=s(8068),u=s(8160),d={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};i.exports=l.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(c,f){let{schema:m,error:p}=f;if(!c.match(d.numberRx))return;c=c.trim();const h={value:parseFloat(c)};if(h.value===0&&(h.value=0),!m._flags.unsafe)if(c.match(/e/i)){if(d.extractSignificantDigits(c)!==d.extractSignificantDigits(String(h.value)))return h.errors=p("number.unsafe"),h}else{const y=h.value.toString();if(y.match(/e/i))return h;if(y!==d.normalizeDecimal(c))return h.errors=p("number.unsafe"),h}return h}},validate(c,f){let{schema:m,error:p,prefs:h}=f;if(c===1/0||c===-1/0)return{value:c,errors:p("number.infinity")};if(!u.isNumber(c))return{value:c,errors:p("number.base")};const y={value:c};if(h.convert){const g=m.$_getRule("precision");if(g){const b=Math.pow(10,g.args.limit);y.value=Math.round(y.value*b)/b}}return y.value===0&&(y.value=0),!m._flags.unsafe&&(c>Number.MAX_SAFE_INTEGER||c"})}},integer:{method(){return this.$_addRule("integer")},validate:(c,f)=>Math.trunc(c)-c==0?c:f.error("number.integer")},less:{method(c){return this.$_addRule({name:"less",method:"compare",args:{limit:c},operator:"<"})}},max:{method(c){return this.$_addRule({name:"max",method:"compare",args:{limit:c},operator:"<="})}},min:{method(c){return this.$_addRule({name:"min",method:"compare",args:{limit:c},operator:">="})}},multiple:{method(c){return this.$_addRule({name:"multiple",args:{base:c}})},validate(c,f,m,p){let{base:h}=m;return c*(1/h)%1==0?c:f.error("number.multiple",{multiple:p.args.base,value:c})},args:[{name:"base",ref:!0,assert:c=>typeof c=="number"&&isFinite(c)&&c>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(c,f)=>Number.isSafeInteger(c)&&c>=0&&c<=65535?c:f.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(c){return a(Number.isSafeInteger(c),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:c}})},validate(c,f,m){let{limit:p}=m;const h=c.toString().match(d.precisionRx);return Math.max((h[1]?h[1].length:0)-(h[2]?parseInt(h[2],10):0),0)<=p?c:f.error("number.precision",{limit:p,value:c})},convert:!0},sign:{method(c){return a(["negative","positive"].includes(c),"Invalid sign",c),this.$_addRule({name:"sign",args:{sign:c}})},validate(c,f,m){let{sign:p}=m;return p==="negative"&&c<0||p==="positive"&&c>0?c:f.error(`number.${p}`)}},unsafe:{method(){let c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof c=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",c)}}},cast:{string:{from:c=>typeof c=="number",to:(c,f)=>c.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),d.extractSignificantDigits=function(c){return c.replace(d.exponentialPartRegex,"").replace(d.dotRegex,"").replace(d.trailingZerosRegex,"").replace(d.leadingSignAndZerosRegex,"")},d.normalizeDecimal=function(c){return(c=c.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&c.endsWith("0")&&(c=c.replace(/0+$/,"")),c==="-0"?"0":c}},8966:(i,o,s)=>{const a=s(7824);i.exports=a.extend({type:"object",cast:{map:{from:l=>l&&typeof l=="object",to:(l,u)=>new Map(Object.entries(l))}}})},7417:(i,o,s)=>{const a=s(375),l=s(5380),u=s(1745),d=s(9959),c=s(6064),f=s(9926),m=s(5752),p=s(8068),h=s(8160),y={tlds:f instanceof Set&&{tlds:{allow:f,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:d.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};i.exports=p.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(g,b){let{schema:v,state:w,prefs:E}=b;const C=v.$_getRule("normalize");C&&(g=g.normalize(C.args.form));const k=v.$_getRule("case");k&&(g=k.args.direction==="upper"?g.toLocaleUpperCase():g.toLocaleLowerCase());const _=v.$_getRule("trim");if(_&&_.args.enabled&&(g=g.trim()),v.$_terms.replacements)for(const A of v.$_terms.replacements)g=g.replace(A.pattern,A.replacement);const S=v.$_getRule("hex");if(S&&S.args.options.byteAligned&&g.length%2!=0&&(g=`0${g}`),v.$_getRule("isoDate")){const A=y.isoDate(g);A&&(g=A)}if(v._flags.truncate){const A=v.$_getRule("max");if(A){let I=A.args.limit;if(h.isResolvable(I)&&(I=I.resolve(g,w,E),!h.limit(I)))return{value:g,errors:v.$_createError("any.ref",I,{ref:A.args.limit,arg:"limit",reason:"must be a positive integer"},w,E)};g=g.slice(0,I)}}return{value:g}}},validate(g,b){let{schema:v,error:w}=b;if(typeof g!="string")return{value:g,errors:w("string.base")};if(g===""){const E=v.$_getRule("min");return E&&E.args.limit===0?void 0:{value:g,errors:w("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(g,b)=>/^[a-zA-Z0-9]+$/.test(g)?g:b.error("string.alphanum")},base64:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return h.assertOptions(g,["paddingRequired","urlSafe"]),g={urlSafe:!1,paddingRequired:!0,...g},a(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),a(typeof g.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:g}})},validate(g,b,v){let{options:w}=v;return y.base64Regex[w.paddingRequired][w.urlSafe].test(g)?g:b.error("string.base64")}},case:{method(g){return a(["lower","upper"].includes(g),"Invalid case:",g),this.$_addRule({name:"case",args:{direction:g}})},validate(g,b,v){let{direction:w}=v;return w==="lower"&&g===g.toLocaleLowerCase()||w==="upper"&&g===g.toLocaleUpperCase()?g:b.error(`string.${w}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(g,b){let v=g.length,w=0,E=1;for(;v--;){const C=g.charAt(v)*E;w+=C-9*(C>9),E^=3}return w>0&&w%10==0?g:b.error("string.creditCard")}},dataUri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return h.assertOptions(g,["paddingRequired"]),g={paddingRequired:!0,...g},a(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:g}})},validate(g,b,v){let{options:w}=v;const E=g.match(y.dataUriRegex);return E&&(!E[2]||E[2]!=="base64"||y.base64Regex[w.paddingRequired].false.test(E[3]))?g:b.error("string.dataUri")}},domain:{method(g){g&&h.assertOptions(g,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const b=y.addressOptions(g);return this.$_addRule({name:"domain",args:{options:g},address:b})},validate(g,b,v,w){let{address:E}=w;return l.isValid(g,E)?g:b.error("string.domain")}},email:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),a(g.multiple===void 0||typeof g.multiple=="boolean","multiple option must be an boolean");const b=y.addressOptions(g),v=new RegExp(`\\s*[${g.separator?c(g.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:g},regex:v,address:b})},validate(g,b,v,w){let{options:E}=v,{regex:C,address:k}=w;const _=E.multiple?g.split(C):[g],S=[];for(const A of _)u.isValid(A,k)||S.push(A);return S.length?b.error("string.email",{value:g,invalids:S}):g}},guid:{alias:"uuid",method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["version","separator"]);let b="";if(g.version){const E=[].concat(g.version);a(E.length>=1,"version must have at least 1 valid version specified");const C=new Set;for(let k=0;k0&&arguments[0]!==void 0?arguments[0]:{};return h.assertOptions(g,["byteAligned"]),g={byteAligned:!1,...g},a(typeof g.byteAligned=="boolean","byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:g}})},validate(g,b,v){let{options:w}=v;return y.hexRegex.test(g)?w.byteAligned&&g.length%2!=0?b.error("string.hexAlign"):g:b.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(g,b)=>l.isValid(g,{minDomainSegments:1})||y.ipRegex.test(g)?g:b.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["cidr","version"]);const{cidr:b,versions:v,regex:w}=d.regex(g),E=g.version?v:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:b,version:E}},regex:w})},validate(g,b,v,w){let{options:E}=v,{regex:C}=w;return C.test(g)?g:E.version?b.error("string.ipVersion",{value:g,cidr:E.cidr,version:E.version}):b.error("string.ip",{value:g,cidr:E.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(g,b){let{error:v}=b;return y.isoDate(g)?g:v("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(g,b)=>y.isoDurationRegex.test(g)?g:b.error("string.isoDuration")},length:{method(g,b){return y.length(this,"length",g,"=",b)},validate(g,b,v,w){let{limit:E,encoding:C}=v,{name:k,operator:_,args:S}=w;const A=!C&&g.length;return h.compare(A,E,_)?g:b.error("string."+k,{limit:S.limit,value:g,encoding:C})},args:[{name:"limit",ref:!0,assert:h.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(g,b){return y.length(this,"max",g,"<=",b)},args:["limit","encoding"]},min:{method(g,b){return y.length(this,"min",g,">=",b)},args:["limit","encoding"]},normalize:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"NFC";return a(y.normalizationForms.includes(g),"normalization form must be one of "+y.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:g}})},validate(g,b,v){let{error:w}=b,{form:E}=v;return g===g.normalize(E)?g:w("string.normalize",{value:g,form:E})},convert:!0},pattern:{alias:"regex",method(g){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(g instanceof RegExp,"regex must be a RegExp"),a(!g.flags.includes("g")&&!g.flags.includes("y"),"regex should not use global or sticky mode"),typeof b=="string"&&(b={name:b}),h.assertOptions(b,["invert","name"]);const v=["string.pattern",b.invert?".invert":"",b.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:g,options:b},errorCode:v})},validate(g,b,v,w){let{regex:E,options:C}=v,{errorCode:k}=w;return E.test(g)^C.invert?g:b.error(k,{name:C.name,regex:E,value:g})},args:["regex","options"],multi:!0},replace:{method(g,b){typeof g=="string"&&(g=new RegExp(c(g),"g")),a(g instanceof RegExp,"pattern must be a RegExp"),a(typeof b=="string","replacement must be a String");const v=this.clone();return v.$_terms.replacements||(v.$_terms.replacements=[]),v.$_terms.replacements.push({pattern:g,replacement:b}),v}},token:{method(){return this.$_addRule("token")},validate:(g,b)=>/^\w+$/.test(g)?g:b.error("string.token")},trim:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof g=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:g}})},validate(g,b,v){let{enabled:w}=v;return w&&g!==g.trim()?b.error("string.trim"):g},convert:!0},truncate:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return a(typeof g=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",g)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.assertOptions(g,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),g.domain&&h.assertOptions(g.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:b,scheme:v}=m.regex(g),w=g.domain?y.addressOptions(g.domain):null;return this.$_addRule({name:"uri",args:{options:g},regex:b,domain:w,scheme:v})},validate(g,b,v,w){let{options:E}=v,{regex:C,domain:k,scheme:_}=w;if(["http:/","https:/"].includes(g))return b.error("string.uri");const S=C.exec(g);if(S){const A=S[1]||S[2];return!k||E.allowRelative&&!A||l.isValid(A,k)?g:b.error("string.domain",{value:A})}return E.relativeOnly?b.error("string.uriRelativeOnly"):E.scheme?b.error("string.uriCustomScheme",{scheme:_,value:g}):b.error("string.uri")}}},manifest:{build(g,b){if(b.replacements)for(const{pattern:v,replacement:w}of b.replacements)g=g.replace(v,w);return g}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),y.addressOptions=function(g){if(!g||(a(g.minDomainSegments===void 0||Number.isSafeInteger(g.minDomainSegments)&&g.minDomainSegments>0,"minDomainSegments must be a positive integer"),a(g.maxDomainSegments===void 0||Number.isSafeInteger(g.maxDomainSegments)&&g.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),g.tlds===!1))return g;if(g.tlds===!0||g.tlds===void 0)return a(y.tlds,"Built-in TLD list disabled"),Object.assign({},g,y.tlds);a(typeof g.tlds=="object","tlds must be true, false, or an object");const b=g.tlds.deny;if(b)return Array.isArray(b)&&(g=Object.assign({},g,{tlds:{deny:new Set(b)}})),a(g.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),a(!g.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),y.validateTlds(g.tlds.deny,"tlds.deny"),g;const v=g.tlds.allow;return v?v===!0?(a(y.tlds,"Built-in TLD list disabled"),Object.assign({},g,y.tlds)):(Array.isArray(v)&&(g=Object.assign({},g,{tlds:{allow:new Set(v)}})),a(g.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),y.validateTlds(g.tlds.allow,"tlds.allow"),g):g},y.validateTlds=function(g,b){for(const v of g)a(l.isValid(v,{minDomainSegments:1,maxDomainSegments:1}),`${b} must contain valid top level domain names`)},y.isoDate=function(g){if(!h.isIsoDate(g))return null;/.*T.*[+-]\d\d$/.test(g)&&(g+="00");const b=new Date(g);return isNaN(b.getTime())?null:b.toISOString()},y.length=function(g,b,v,w,E){return a(!E||!1,"Invalid encoding:",E),g.$_addRule({name:b,method:"length",args:{limit:v,encoding:E},operator:w})}},8826:(i,o,s)=>{const a=s(375),l=s(8068),u={};u.Map=class extends Map{slice(){return new u.Map(this)}},i.exports=l.extend({type:"symbol",terms:{map:{init:new u.Map}},coerce:{method(d,c){let{schema:f,error:m}=c;const p=f.$_terms.map.get(d);return p&&(d=p),f._flags.only&&typeof d!="symbol"?{value:d,errors:m("symbol.map",{map:f.$_terms.map})}:{value:d}}},validate(d,c){let{error:f}=c;if(typeof d!="symbol")return{value:d,errors:f("symbol.base")}},rules:{map:{method(d){d&&!d[Symbol.iterator]&&typeof d=="object"&&(d=Object.entries(d)),a(d&&d[Symbol.iterator],"Iterable must be an iterable or object");const c=this.clone(),f=[];for(const m of d){a(m&&m[Symbol.iterator],"Entry must be an iterable");const[p,h]=m;a(typeof p!="object"&&typeof p!="function"&&typeof p!="symbol","Key must not be of type object, function, or Symbol"),a(typeof h=="symbol","Value must be a Symbol"),c.$_terms.map.set(p,h),f.push(h)}return c.valid(...f)}}},manifest:{build:(d,c)=>(c.map&&(d=d.map(c.map)),d)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(i,o,s)=>{const a=s(375),l=s(8571),u=s(738),d=s(9621),c=s(8160),f=s(6354),m=s(493),p={result:Symbol("result")};o.entry=function(h,y,g){let b=c.defaults;g&&(a(g.warnings===void 0,"Cannot override warnings preference in synchronous validation"),a(g.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),b=c.preferences(c.defaults,g));const v=p.entry(h,y,b);a(!v.mainstay.externals.length,"Schema with external rules must use validateAsync()");const w={value:v.value};return v.error&&(w.error=v.error),v.mainstay.warnings.length&&(w.warning=f.details(v.mainstay.warnings)),v.mainstay.debug&&(w.debug=v.mainstay.debug),v.mainstay.artifacts&&(w.artifacts=v.mainstay.artifacts),w},o.entryAsync=async function(h,y,g){let b=c.defaults;g&&(b=c.preferences(c.defaults,g));const v=p.entry(h,y,b),w=v.mainstay;if(v.error)throw w.debug&&(v.error.debug=w.debug),v.error;if(w.externals.length){let C=v.value;const k=[];for(const _ of w.externals){const S=_.state.path,A=_.schema.type==="link"?w.links.get(_.schema):null;let I,L,F=C;const N=S.length?[C]:[],R=S.length?d(h,S):h;if(S.length){I=S[S.length-1];let B=C;for(const V of S.slice(0,-1))B=B[V],N.unshift(B);L=N[0],F=L[I]}try{const B=(j,W)=>(A||_.schema).$_createError(j,F,W,_.state,b),V=await _.method(F,{schema:_.schema,linked:A,state:_.state,prefs:g,original:R,error:B,errorsArray:p.errorsArray,warn:(j,W)=>w.warnings.push((A||_.schema).$_createError(j,F,W,_.state,b)),message:(j,W)=>(A||_.schema).$_createError("external",F,W,_.state,b,{messages:j})});if(V===void 0||V===F)continue;if(V instanceof f.Report){if(w.tracer.log(_.schema,_.state,"rule","external","error"),k.push(V),b.abortEarly)break;continue}if(Array.isArray(V)&&V[c.symbols.errors]){if(w.tracer.log(_.schema,_.state,"rule","external","error"),k.push(...V),b.abortEarly)break;continue}L?(w.tracer.value(_.state,"rule",F,V,"external"),L[I]=V):(w.tracer.value(_.state,"rule",C,V,"external"),C=V)}catch(B){throw b.errors.label&&(B.message+=` (${_.label})`),B}}if(v.value=C,k.length)throw v.error=f.process(k,h,b),w.debug&&(v.error.debug=w.debug),v.error}if(!b.warnings&&!b.debug&&!b.artifacts)return v.value;const E={value:v.value};return w.warnings.length&&(E.warning=f.details(w.warnings)),w.debug&&(E.debug=w.debug),w.artifacts&&(E.artifacts=w.artifacts),E},p.Mainstay=class{constructor(h,y,g){this.externals=[],this.warnings=[],this.tracer=h,this.debug=y,this.links=g,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const h=this._snapshots.pop();this.externals=h.externals,this.warnings=h.warnings}},p.entry=function(h,y,g){const{tracer:b,cleanup:v}=p.tracer(y,g),w=g.debug?[]:null,E=y._ids._schemaChain?new Map:null,C=new p.Mainstay(b,w,E),k=y._ids._schemaChain?[{schema:y}]:null,_=new m([],[],{mainstay:C,schemas:k}),S=o.validate(h,y,_,g);v&&y.$_root.untrace();const A=f.process(S.errors,h,g);return{value:S.value,error:A,mainstay:C}},p.tracer=function(h,y){return h.$_root._tracer?{tracer:h.$_root._tracer._register(h)}:y.debug?(a(h.$_root.trace,"Debug mode not supported"),{tracer:h.$_root.trace()._register(h),cleanup:!0}):{tracer:p.ignore}},o.validate=function(h,y,g,b){let v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};if(y.$_terms.whens&&(y=y._generate(h,g,b).schema),y._preferences&&(b=p.prefs(y,b)),y._cache&&b.cache){const A=y._cache.get(h);if(g.mainstay.tracer.debug(g,"validate","cached",!!A),A)return A}const w=(A,I,L)=>y.$_createError(A,h,I,L||g,b),E={original:h,prefs:b,schema:y,state:g,error:w,errorsArray:p.errorsArray,warn:(A,I,L)=>g.mainstay.warnings.push(w(A,I,L)),message:(A,I)=>y.$_createError("custom",h,I,g,b,{messages:A})};g.mainstay.tracer.entry(y,g);const C=y._definition;if(C.prepare&&h!==void 0&&b.convert){const A=C.prepare(h,E);if(A){if(g.mainstay.tracer.value(g,"prepare",h,A.value),A.errors)return p.finalize(A.value,[].concat(A.errors),E);h=A.value}}if(C.coerce&&h!==void 0&&b.convert&&(!C.coerce.from||C.coerce.from.includes(typeof h))){const A=C.coerce.method(h,E);if(A){if(g.mainstay.tracer.value(g,"coerced",h,A.value),A.errors)return p.finalize(A.value,[].concat(A.errors),E);h=A.value}}const k=y._flags.empty;k&&k.$_match(p.trim(h,y),g.nest(k),c.defaults)&&(g.mainstay.tracer.value(g,"empty",h,void 0),h=void 0);const _=v.presence||y._flags.presence||(y._flags._endedSwitch?null:b.presence);if(h===void 0){if(_==="forbidden")return p.finalize(h,null,E);if(_==="required")return p.finalize(h,[y.$_createError("any.required",h,null,g,b)],E);if(_==="optional"){if(y._flags.default!==c.symbols.deepDefault)return p.finalize(h,null,E);g.mainstay.tracer.value(g,"default",h,{}),h={}}}else if(_==="forbidden")return p.finalize(h,[y.$_createError("any.unknown",h,null,g,b)],E);const S=[];if(y._valids){const A=y._valids.get(h,g,b,y._flags.insensitive);if(A)return b.convert&&(g.mainstay.tracer.value(g,"valids",h,A.value),h=A.value),g.mainstay.tracer.filter(y,g,"valid",A),p.finalize(h,null,E);if(y._flags.only){const I=y.$_createError("any.only",h,{valids:y._valids.values({display:!0})},g,b);if(b.abortEarly)return p.finalize(h,[I],E);S.push(I)}}if(y._invalids){const A=y._invalids.get(h,g,b,y._flags.insensitive);if(A){g.mainstay.tracer.filter(y,g,"invalid",A);const I=y.$_createError("any.invalid",h,{invalids:y._invalids.values({display:!0})},g,b);if(b.abortEarly)return p.finalize(h,[I],E);S.push(I)}}if(C.validate){const A=C.validate(h,E);if(A&&(g.mainstay.tracer.value(g,"base",h,A.value),h=A.value,A.errors)){if(!Array.isArray(A.errors))return S.push(A.errors),p.finalize(h,S,E);if(A.errors.length)return S.push(...A.errors),p.finalize(h,S,E)}}return y._rules.length?p.rules(h,S,E):p.finalize(h,S,E)},p.rules=function(h,y,g){const{schema:b,state:v,prefs:w}=g;for(const E of b._rules){const C=b._definition.rules[E.method];if(C.convert&&w.convert){v.mainstay.tracer.log(b,v,"rule",E.name,"full");continue}let k,_=E.args;if(E._resolve.length){_=Object.assign({},_);for(const A of E._resolve){const I=C.argsByName.get(A),L=_[A].resolve(h,v,w),F=I.normalize?I.normalize(L):L,N=c.validateArg(F,null,I);if(N){k=b.$_createError("any.ref",L,{arg:A,ref:_[A],reason:N},v,w);break}_[A]=F}}k=k||C.validate(h,g,_,E);const S=p.rule(k,E);if(S.errors){if(v.mainstay.tracer.log(b,v,"rule",E.name,"error"),E.warn){v.mainstay.warnings.push(...S.errors);continue}if(w.abortEarly)return p.finalize(h,S.errors,g);y.push(...S.errors)}else v.mainstay.tracer.log(b,v,"rule",E.name,"pass"),v.mainstay.tracer.value(v,"rule",h,S.value,E.name),h=S.value}return p.finalize(h,y,g)},p.rule=function(h,y){return h instanceof f.Report?(p.error(h,y),{errors:[h],value:null}):Array.isArray(h)&&h[c.symbols.errors]?(h.forEach(g=>p.error(g,y)),{errors:h,value:null}):{errors:null,value:h}},p.error=function(h,y){return y.message&&h._setTemplate(y.message),h},p.finalize=function(h,y,g){y=y||[];const{schema:b,state:v,prefs:w}=g;if(y.length){const C=p.default("failover",void 0,y,g);C!==void 0&&(v.mainstay.tracer.value(v,"failover",h,C),h=C,y=[])}if(y.length&&b._flags.error)if(typeof b._flags.error=="function"){y=b._flags.error(y),Array.isArray(y)||(y=[y]);for(const C of y)a(C instanceof Error||C instanceof f.Report,"error() must return an Error object")}else y=[b._flags.error];if(h===void 0){const C=p.default("default",h,y,g);v.mainstay.tracer.value(v,"default",h,C),h=C}if(b._flags.cast&&h!==void 0){const C=b._definition.cast[b._flags.cast];if(C.from(h)){const k=C.to(h,g);v.mainstay.tracer.value(v,"cast",h,k,b._flags.cast),h=k}}if(b.$_terms.externals&&w.externals&&w._externals!==!1)for(const{method:C}of b.$_terms.externals)v.mainstay.externals.push({method:C,schema:b,state:v,label:f.label(b._flags,v,w)});const E={value:h,errors:y.length?y:null};return b._flags.result&&(E.value=b._flags.result==="strip"?void 0:g.original,v.mainstay.tracer.value(v,b._flags.result,h,E.value),v.shadow(h,b._flags.result)),b._cache&&w.cache!==!1&&!b._refs.length&&b._cache.set(g.original,E),h===void 0||E.errors||b._flags.artifact===void 0||(v.mainstay.artifacts=v.mainstay.artifacts||new Map,v.mainstay.artifacts.has(b._flags.artifact)||v.mainstay.artifacts.set(b._flags.artifact,[]),v.mainstay.artifacts.get(b._flags.artifact).push(v.path)),E},p.prefs=function(h,y){const g=y===c.defaults;return g&&h._preferences[c.symbols.prefs]?h._preferences[c.symbols.prefs]:(y=c.preferences(y,h._preferences),g&&(h._preferences[c.symbols.prefs]=y),y)},p.default=function(h,y,g,b){const{schema:v,state:w,prefs:E}=b,C=v._flags[h];if(E.noDefaults||C===void 0)return y;if(w.mainstay.tracer.log(v,w,"rule",h,"full"),!C)return C;if(typeof C=="function"){const k=C.length?[l(w.ancestors[0]),b]:[];try{return C(...k)}catch(_){return void g.push(v.$_createError(`any.${h}`,null,{error:_},w,E))}}return typeof C!="object"?C:C[c.symbols.literal]?C.literal:c.isResolvable(C)?C.resolve(y,w,E):l(C)},p.trim=function(h,y){if(typeof h!="string")return h;const g=y.$_getRule("trim");return g&&g.args.enabled?h.trim():h},p.ignore={active:!1,debug:u,entry:u,filter:u,log:u,resolve:u,value:u},p.errorsArray=function(){const h=[];return h[c.symbols.errors]=!0,h}},2036:(i,o,s)=>{const a=s(375),l=s(9474),u=s(8160),d={};i.exports=d.Values=class{constructor(c,f){this._values=new Set(c),this._refs=new Set(f),this._lowercase=d.lowercases(c),this._override=!1}get length(){return this._values.size+this._refs.size}add(c,f){u.isResolvable(c)?this._refs.has(c)||(this._refs.add(c),f&&f.register(c)):this.has(c,null,null,!1)||(this._values.add(c),typeof c=="string"&&this._lowercase.set(c.toLowerCase(),c))}static merge(c,f,m){if(c=c||new d.Values,f){if(f._override)return f.clone();for(const p of[...f._values,...f._refs])c.add(p)}if(m)for(const p of[...m._values,...m._refs])c.remove(p);return c.length?c:null}remove(c){u.isResolvable(c)?this._refs.delete(c):(this._values.delete(c),typeof c=="string"&&this._lowercase.delete(c.toLowerCase()))}has(c,f,m,p){return!!this.get(c,f,m,p)}get(c,f,m,p){if(!this.length)return!1;if(this._values.has(c))return{value:c};if(typeof c=="string"&&c&&p){const h=this._lowercase.get(c.toLowerCase());if(h)return{value:h}}if(!this._refs.size&&typeof c!="object")return!1;if(typeof c=="object"){for(const h of this._values)if(l(h,c))return{value:h}}if(f)for(const h of this._refs){const y=h.resolve(c,f,m,null,{in:!0});if(y===void 0)continue;const g=h.in&&typeof y=="object"?Array.isArray(y)?y:Object.keys(y):[y];for(const b of g)if(typeof b==typeof c){if(p&&c&&typeof c=="string"){if(b.toLowerCase()===c.toLowerCase())return{value:b,ref:h}}else if(l(b,c))return{value:b,ref:h}}}return!1}override(){this._override=!0}values(c){if(c&&c.display){const f=[];for(const m of[...this._values,...this._refs])m!==void 0&&f.push(m);return f}return Array.from([...this._values,...this._refs])}clone(){const c=new d.Values(this._values,this._refs);return c._override=this._override,c}concat(c){a(!c._override,"Cannot concat override set of values");const f=new d.Values([...this._values,...c._values],[...this._refs,...c._refs]);return f._override=this._override,f}describe(){const c=[];this._override&&c.push({override:!0});for(const f of this._values.values())c.push(f&&typeof f=="object"?{value:f}:f);for(const f of this._refs.values())c.push(f.describe());return c}},d.Values.prototype[u.symbols.values]=!0,d.Values.prototype.slice=d.Values.prototype.clone,d.lowercases=function(c){const f=new Map;if(c)for(const m of c)typeof m=="string"&&f.set(m.toLowerCase(),m);return f}},978:(i,o,s)=>{const a=s(375),l=s(8571),u=s(1687),d=s(9621),c={};i.exports=function(f,m){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(a(f&&typeof f=="object","Invalid defaults value: must be an object"),a(!m||m===!0||typeof m=="object","Invalid source value: must be true, falsy or an object"),a(typeof p=="object","Invalid options: must be an object"),!m)return null;if(p.shallow)return c.applyToDefaultsWithShallow(f,m,p);const h=l(f);if(m===!0)return h;const y=p.nullOverride!==void 0&&p.nullOverride;return u(h,m,{nullOverride:y,mergeArrays:!1})},c.applyToDefaultsWithShallow=function(f,m,p){const h=p.shallow;a(Array.isArray(h),"Invalid keys");const y=new Map,g=m===!0?null:new Set;for(let w of h){w=Array.isArray(w)?w:w.split(".");const E=d(f,w);E&&typeof E=="object"?y.set(E,g&&d(m,w)||E):g&&g.add(w)}const b=l(f,{},y);if(!g)return b;for(const w of g)c.reachCopy(b,m,w);const v=p.nullOverride!==void 0&&p.nullOverride;return u(b,m,{nullOverride:v,mergeArrays:!1})},c.reachCopy=function(f,m,p){for(const g of p){if(!(g in m))return;const b=m[g];if(typeof b!="object"||b===null)return;m=b}const h=m;let y=f;for(let g=0;g{const a=s(7916);i.exports=function(l){if(!l){for(var u=arguments.length,d=new Array(u>1?u-1:0),c=1;c{const a=s(9621),l=s(4277),u=s(7043),d={needsProtoHack:new Set([l.set,l.map,l.weakSet,l.weakMap])};i.exports=d.clone=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof c!="object"||c===null)return c;let p=d.clone,h=m;if(f.shallow){if(f.shallow!==!0)return d.cloneWithShallow(c,f);p=v=>v}else if(h){const v=h.get(c);if(v)return v}else h=new Map;const y=l.getInternalProto(c);if(y===l.buffer)return!1;if(y===l.date)return new Date(c.getTime());if(y===l.regex)return new RegExp(c);const g=d.base(c,y,f);if(g===c)return c;if(h&&h.set(c,g),y===l.set)for(const v of c)g.add(p(v,f,h));else if(y===l.map)for(const[v,w]of c)g.set(v,p(w,f,h));const b=u.keys(c,f);for(const v of b){if(v==="__proto__")continue;if(y===l.array&&v==="length"){g.length=c.length;continue}const w=Object.getOwnPropertyDescriptor(c,v);w?w.get||w.set?Object.defineProperty(g,v,w):w.enumerable?g[v]=p(c[v],f,h):Object.defineProperty(g,v,{enumerable:!1,writable:!0,configurable:!0,value:p(c[v],f,h)}):Object.defineProperty(g,v,{enumerable:!0,writable:!0,configurable:!0,value:p(c[v],f,h)})}return g},d.cloneWithShallow=function(c,f){const m=f.shallow;(f=Object.assign({},f)).shallow=!1;const p=new Map;for(const h of m){const y=a(c,h);typeof y!="object"&&typeof y!="function"||p.set(y,y)}return d.clone(c,f,p)},d.base=function(c,f,m){if(m.prototype===!1)return d.needsProtoHack.has(f)?new f.constructor:f===l.array?[]:{};const p=Object.getPrototypeOf(c);if(p&&p.isImmutable)return c;if(f===l.array){const h=[];return p!==f&&Object.setPrototypeOf(h,p),h}if(d.needsProtoHack.has(f)){const h=new p.constructor;return p!==f&&Object.setPrototypeOf(h,p),h}return Object.create(p)}},9474:(i,o,s)=>{const a=s(4277),l={mismatched:null};i.exports=function(u,d,c){return c=Object.assign({prototype:!0},c),!!l.isDeepEqual(u,d,c,[])},l.isDeepEqual=function(u,d,c,f){if(u===d)return u!==0||1/u==1/d;const m=typeof u;if(m!==typeof d||u===null||d===null)return!1;if(m==="function"){if(!c.deepFunction||u.toString()!==d.toString())return!1}else if(m!=="object")return u!=u&&d!=d;const p=l.getSharedType(u,d,!!c.prototype);switch(p){case a.buffer:return!1;case a.promise:return u===d;case a.regex:return u.toString()===d.toString();case l.mismatched:return!1}for(let h=f.length-1;h>=0;--h)if(f[h].isSame(u,d))return!0;f.push(new l.SeenEntry(u,d));try{return!!l.isDeepEqualObj(p,u,d,c,f)}finally{f.pop()}},l.getSharedType=function(u,d,c){if(c)return Object.getPrototypeOf(u)!==Object.getPrototypeOf(d)?l.mismatched:a.getInternalProto(u);const f=a.getInternalProto(u);return f!==a.getInternalProto(d)?l.mismatched:f},l.valueOf=function(u){const d=u.valueOf;if(d===void 0)return u;try{return d.call(u)}catch(c){return c}},l.hasOwnEnumerableProperty=function(u,d){return Object.prototype.propertyIsEnumerable.call(u,d)},l.isSetSimpleEqual=function(u,d){for(const c of Set.prototype.values.call(u))if(!Set.prototype.has.call(d,c))return!1;return!0},l.isDeepEqualObj=function(u,d,c,f,m){const{isDeepEqual:p,valueOf:h,hasOwnEnumerableProperty:y}=l,{keys:g,getOwnPropertySymbols:b}=Object;if(u===a.array){if(!f.part){if(d.length!==c.length)return!1;for(let k=0;k{const a=s(8761);i.exports=class extends Error{constructor(l){super(l.filter(u=>u!=="").map(u=>typeof u=="string"?u:u instanceof Error?u.message:a(u)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,o.assert)}}},5277:i=>{const o={};i.exports=function(s){if(!s)return"";let a="";for(let l=0;l=256?"&#"+s+";":`&#x${s.toString(16).padStart(2,"0")};`)},o.isSafe=function(s){return o.safeCharCodes.has(s)},o.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),o.safeCharCodes=function(){const s=new Set;for(let a=32;a<123;++a)(a>=97||a>=65&&a<=90||a>=48&&a<=57||a===32||a===46||a===44||a===45||a===58||a===95)&&s.add(a);return s}()},6064:i=>{i.exports=function(o){return o.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:i=>{i.exports=function(){}},1687:(i,o,s)=>{const a=s(375),l=s(8571),u=s(7043),d={};i.exports=d.merge=function(c,f,m){if(a(c&&typeof c=="object","Invalid target value: must be an object"),a(f==null||typeof f=="object","Invalid source value: must be null, undefined, or an object"),!f)return c;if(m=Object.assign({nullOverride:!0,mergeArrays:!0},m),Array.isArray(f)){a(Array.isArray(c),"Cannot merge array onto an object"),m.mergeArrays||(c.length=0);for(let h=0;h{const a=s(375),l={};i.exports=function(u,d,c){if(d===!1||d==null)return u;typeof(c=c||{})=="string"&&(c={separator:c});const f=Array.isArray(d);a(!f||!c.separator,"Separator option is not valid for array-based chain");const m=f?d:d.split(c.separator||".");let p=u;for(let h=0;h{i.exports=function(){try{return JSON.stringify(...arguments)}catch(o){return"[Cannot display object: "+o.message+"]"}}},4277:(i,o)=>{const s={};o=i.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},s.typeMap=new Map([["[object Error]",o.error],["[object Map]",o.map],["[object Promise]",o.promise],["[object Set]",o.set],["[object WeakMap]",o.weakMap],["[object WeakSet]",o.weakSet]]),o.getInternalProto=function(a){if(Array.isArray(a))return o.array;if(a instanceof Date)return o.date;if(a instanceof RegExp)return o.regex;if(a instanceof Error)return o.error;const l=Object.prototype.toString.call(a);return s.typeMap.get(l)||o.generic}},7043:(i,o)=>{o.keys=function(s){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).symbols!==!1?Reflect.ownKeys(s):Object.getOwnPropertyNames(s)}},3652:(i,o,s)=>{const a=s(375),l={};o.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(u,d){const c=[].concat((d=d||{}).before||[]),f=[].concat(d.after||[]),m=d.group||"?",p=d.sort||0;a(!c.includes(m),`Item cannot come before itself: ${m}`),a(!c.includes("?"),"Item cannot come before unassociated items"),a(!f.includes(m),`Item cannot come after itself: ${m}`),a(!f.includes("?"),"Item cannot come after unassociated items"),Array.isArray(u)||(u=[u]);for(const h of u){const y={seq:this._items.length,sort:p,before:c,after:f,group:m,node:h};this._items.push(y)}if(!d.manual){const h=this._sort();a(h,"item",m!=="?"?`added into group ${m}`:"","created a dependencies error")}return this.nodes}merge(u){Array.isArray(u)||(u=[u]);for(const c of u)if(c)for(const f of c._items)this._items.push(Object.assign({},f));this._items.sort(l.mergeSort);for(let c=0;cu.sort===d.sort?0:u.sort{const a=s(443),l=s(2178),u={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:a.URL||URL};o.analyze=function(d){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!d)return l.code("DOMAIN_NON_EMPTY_STRING");if(typeof d!="string")throw new Error("Invalid input: domain must be a string");if(d.length>256)return l.code("DOMAIN_TOO_LONG");if(u.nonAsciiRx.test(d)){if(c.allowUnicode===!1)return l.code("DOMAIN_INVALID_UNICODE_CHARS");d=d.normalize("NFC")}if(u.domainControlRx.test(d))return l.code("DOMAIN_INVALID_CHARS");d=u.punycode(d),c.allowFullyQualified&&d[d.length-1]==="."&&(d=d.slice(0,-1));const f=c.minDomainSegments||u.minDomainSegments,m=d.split(".");if(m.lengthc.maxDomainSegments)return l.code("DOMAIN_SEGMENTS_COUNT_MAX");const p=c.tlds;if(p){const h=m[m.length-1].toLowerCase();if(p.deny&&p.deny.has(h)||p.allow&&!p.allow.has(h))return l.code("DOMAIN_FORBIDDEN_TLDS")}for(let h=0;h63)return l.code("DOMAIN_LONG_SEGMENT");if(h{const a=s(9848),l=s(5380),u=s(2178),d={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(a.TextEncoder||TextEncoder)};o.analyze=function(c,f){return d.email(c,f)},o.isValid=function(c,f){return!d.email(c,f)},d.email=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof c!="string")throw new Error("Invalid input: email must be a string");if(!c)return u.code("EMPTY_STRING");const m=!d.nonAsciiRx.test(c);if(!m){if(f.allowUnicode===!1)return u.code("FORBIDDEN_UNICODE");c=c.normalize("NFC")}const p=c.split("@");if(p.length!==2)return p.length>2?u.code("MULTIPLE_AT_CHAR"):u.code("MISSING_AT_CHAR");const[h,y]=p;if(!h)return u.code("EMPTY_LOCAL");if(!f.ignoreLength){if(c.length>254)return u.code("ADDRESS_TOO_LONG");if(d.encoder.encode(h).length>64)return u.code("LOCAL_TOO_LONG")}return d.local(h,m)||l.analyze(y,f)},d.local=function(c,f){const m=c.split(".");for(const p of m){if(!p.length)return u.code("EMPTY_LOCAL_SEGMENT");if(f){if(!d.atextRx.test(p))return u.code("INVALID_LOCAL_CHARS")}else for(const h of p){if(d.atextRx.test(h))continue;const y=d.binary(h);if(!d.atomRx.test(y))return u.code("INVALID_LOCAL_CHARS")}}},d.binary=function(c){return Array.from(d.encoder.encode(c)).map(f=>String.fromCharCode(f)).join("")},d.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,d.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(i,o)=>{o.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},o.code=function(s){return{code:s,error:o.codes[s]}}},9959:(i,o,s)=>{const a=s(375),l=s(5752);o.regex=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};a(u.cidr===void 0||typeof u.cidr=="string","options.cidr must be a string");const d=u.cidr?u.cidr.toLowerCase():"optional";a(["required","optional","forbidden"].includes(d),"options.cidr must be one of required, optional, forbidden"),a(u.version===void 0||typeof u.version=="string"||Array.isArray(u.version),"options.version must be a string or an array of string");let c=u.version||["ipv4","ipv6","ipvfuture"];Array.isArray(c)||(c=[c]),a(c.length>=1,"options.version must have at least 1 version specified");for(let p=0;p{if(d==="forbidden")return l.ip[p];const h=`\\/${p==="ipv4"?l.ip.v4Cidr:l.ip.v6Cidr}`;return d==="required"?`${l.ip[p]}${h}`:`${l.ip[p]}(?:${h})?`}).join("|")})`,m=new RegExp(`^${f}$`);return{cidr:d,versions:c,regex:m,raw:f}}},5752:(i,o,s)=>{const a=s(375),l=s(6064),u={generate:function(){const d={},c="\\dA-Fa-f",f="["+c+"]",m="\\w-\\.~",p="!\\$&'\\(\\)\\*\\+,;=",h="%"+c,y=m+h+p+":@",g="["+y+"]",b="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";d.ipv4address="(?:"+b+"\\.){3}"+b;const v=f+"{1,4}",w="(?:"+v+":"+v+"|"+d.ipv4address+")",E="(?:"+v+":){6}"+w,C="::(?:"+v+":){5}"+w,k="(?:"+v+")?::(?:"+v+":){4}"+w,_="(?:(?:"+v+":){0,1}"+v+")?::(?:"+v+":){3}"+w,S="(?:(?:"+v+":){0,2}"+v+")?::(?:"+v+":){2}"+w,A="(?:(?:"+v+":){0,3}"+v+")?::"+v+":"+w,I="(?:(?:"+v+":){0,4}"+v+")?::"+w,L="(?:(?:"+v+":){0,5}"+v+")?::"+v,F="(?:(?:"+v+":){0,6}"+v+")?::";d.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",d.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",d.ipv6address="(?:"+E+"|"+C+"|"+k+"|"+_+"|"+S+"|"+A+"|"+I+"|"+L+"|"+F+")",d.ipvFuture="v"+f+"+\\.["+m+p+":]+",d.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",d.schemeRegex=new RegExp(d.scheme);const N="["+m+h+p+":]*",R="["+m+h+p+"]{1,255}",B="(?:\\[(?:"+d.ipv6address+"|"+d.ipvFuture+")\\]|"+d.ipv4address+"|"+R+")",V="(?:"+N+"@)?"+B+"(?::\\d*)?",j="(?:"+N+"@)?("+B+")(?::\\d*)?",W=g+"*",Y=g+"+",te="(?:\\/"+W+")*",ae="\\/(?:"+Y+te+")?",Z=Y+te,pe="["+m+h+p+"@]+"+te,Ie="(?:\\/\\/\\/"+W+te+")";return d.hierPart="(?:(?:\\/\\/"+V+te+")|"+ae+"|"+Z+"|"+Ie+")",d.hierPartCapture="(?:(?:\\/\\/"+j+te+")|"+ae+"|"+Z+")",d.relativeRef="(?:(?:\\/\\/"+V+te+")|"+ae+"|"+pe+"|)",d.relativeRefCapture="(?:(?:\\/\\/"+j+te+")|"+ae+"|"+pe+"|)",d.query="["+y+"\\/\\?]*(?=#|$)",d.queryWithSquareBrackets="["+y+"\\[\\]\\/\\?]*(?=#|$)",d.fragment="["+y+"\\/\\?]*",d}};u.rfc3986=u.generate(),o.ip={v4Cidr:u.rfc3986.ipv4Cidr,v6Cidr:u.rfc3986.ipv6Cidr,ipv4:u.rfc3986.ipv4address,ipv6:u.rfc3986.ipv6address,ipvfuture:u.rfc3986.ipvFuture},u.createRegex=function(d){const c=u.rfc3986,f="(?:\\?"+(d.allowQuerySquareBrackets?c.queryWithSquareBrackets:c.query)+")?(?:#"+c.fragment+")?",m=d.domain?c.relativeRefCapture:c.relativeRef;if(d.relativeOnly)return u.wrap(m+f);let p="";if(d.scheme){a(d.scheme instanceof RegExp||typeof d.scheme=="string"||Array.isArray(d.scheme),"scheme must be a RegExp, String, or Array");const g=[].concat(d.scheme);a(g.length>=1,"scheme must have at least 1 scheme specified");const b=[];for(let v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return d.scheme||d.allowRelative||d.relativeOnly||d.allowQuerySquareBrackets||d.domain?u.createRegex(d):u.uriRegex}},1447:(i,o)=>{const s={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};o.Parser=class{constructor(a){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!l[s.settings]&&l.constants)for(const u in l.constants){const d=l.constants[u];if(d!==null&&!["boolean","number","string"].includes(typeof d))throw new Error(`Formula constant ${u} contains invalid ${typeof d} value type`)}this.settings=l[s.settings]?l:Object.assign({[s.settings]:!0,constants:{},functions:{}},l),this.single=null,this._parts=null,this._parse(a)}_parse(a){let l=[],u="",d=0,c=!1;const f=p=>{if(d)throw new Error("Formula missing closing parenthesis");const h=l.length?l[l.length-1]:null;if(c||u||p){if(h&&h.type==="reference"&&p===")")return h.type="function",h.value=this._subFormula(u,h.value),void(u="");if(p===")"){const y=new o.Parser(u,this.settings);l.push({type:"segment",value:y})}else if(c){if(c==="]")return l.push({type:"reference",value:u}),void(u="");l.push({type:"literal",value:u})}else if(s.operatorCharacters.includes(u))h&&h.type==="operator"&&s.operators.includes(h.value+u)?h.value+=u:l.push({type:"operator",value:u});else if(u.match(s.numberRx))l.push({type:"constant",value:parseFloat(u)});else if(this.settings.constants[u]!==void 0)l.push({type:"constant",value:this.settings.constants[u]});else{if(!u.match(s.tokenRx))throw new Error(`Formula contains invalid token: ${u}`);l.push({type:"reference",value:u})}u=""}};for(const p of a)c?p===c?(f(),c=!1):u+=p:d?p==="("?(u+=p,++d):p===")"?(--d,d?u+=p:f(p)):u+=p:p in s.literals?c=s.literals[p]:p==="("?(f(),++d):s.operatorCharacters.includes(p)?(f(),u=p,f()):p!==" "?u+=p:f();f(),l=l.map((p,h)=>p.type!=="operator"||p.value!=="-"||h&&l[h-1].type!=="operator"?p:{type:"operator",value:"n"});let m=!1;for(const p of l){if(p.type==="operator"){if(s.operatorsPrefix.includes(p.value))continue;if(!m)throw new Error("Formula contains an operator in invalid position");if(!s.operators.includes(p.value))throw new Error(`Formula contains an unknown operator ${p.value}`)}else if(m)throw new Error("Formula missing expected operator");m=!m}if(!m)throw new Error("Formula contains invalid trailing operator");l.length===1&&["reference","literal","constant"].includes(l[0].type)&&(this.single={type:l[0].type==="reference"?"reference":"value",value:l[0].value}),this._parts=l.map(p=>{if(p.type==="operator")return s.operatorsPrefix.includes(p.value)?p:p.value;if(p.type!=="reference")return p.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(p.value))throw new Error(`Formula contains invalid reference ${p.value}`);return this.settings.reference?this.settings.reference(p.value):s.reference(p.value)})}_subFormula(a,l){const u=this.settings.functions[l];if(typeof u!="function")throw new Error(`Formula contains unknown function ${l}`);let d=[];if(a){let c="",f=0,m=!1;const p=()=>{if(!c)throw new Error(`Formula contains function ${l} with invalid arguments ${a}`);d.push(c),c=""};for(let h=0;hnew o.Parser(c,this.settings)),function(c){const f=[];for(const m of d)f.push(m.evaluate(c));return u.call(c,...f)}}evaluate(a){const l=this._parts.slice();for(let u=l.length-2;u>=0;--u){const d=l[u];if(d&&d.type==="operator"){const c=l[u+1];l.splice(u+1,1);const f=s.evaluate(c,a);l[u]=s.single(d.value,f)}}return s.operatorsOrder.forEach(u=>{for(let d=1;d":return l>u;case">=":return l>=u;case"==":return l===u;case"!=":return l!==u;case"&&":return l&&u;case"||":return l||u}return null},s.exists=function(a){return a!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:i=>{i.exports={version:"17.9.1"}}},r={},function i(o){var s=r[o];if(s!==void 0)return s.exports;var a=r[o]={exports:{}};return n[o](a,a.exports,i),a.exports}(5107);var n,r})})(U7);var LF=U7.exports;const O=Sa(LF);class v_ extends Error{constructor(t){super(t.message),this.message=t.message,this.code=t.code,this.data=t.data}}const it=(e,t)=>{let n;e.request?n=e.request.bind(e):e.sendAsync&&(n=BF(e));const r=async({method:i,params:o})=>{const s=i;if(t&&t[s]===null)throw new v_({code:4200,message:`The Provider does not support the requested method: ${i}`});if(t&&t[s])return t[s]({baseRequest:n,params:o});if(n)return n({method:i,params:o});throw new v_({code:4200,message:`The Provider does not support the requested method: ${i}`})};return e.request=r,e},BF=e=>({method:t,params:n})=>new Promise((r,i)=>{e.sendAsync({id:0,jsonrpc:"2.0",method:t,params:n},(o,{result:s})=>{o?i(JSON.parse(o)):r(s??null)})});function H7(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function w_(e){return H7(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const NF="2.12.0",MF=()=>`viem@${NF}`;let gc=class ay extends Error{constructor(t,n={}){var o;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:MF()});const r=n.cause instanceof ay?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,i=n.cause instanceof ay&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(` +`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return z7(this,t)}};function z7(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?z7(e.cause,t):t?null:e}let RK=class extends gc{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}},W7=class extends gc{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}};function yc(e,{dir:t,size:n=32}={}){return typeof e=="string"?jF(e,{dir:t,size:n}):DF(e,{dir:t,size:n})}function jF(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new W7({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function DF(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new W7({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new HF({givenSize:w_(e),maxSize:t})}function ly(e,t){const n=typeof t=="string"?{to:t}:t,r=n.to;return r==="number"?WF(e,n):r==="bigint"?Bv(e,n):r==="string"?VF(e,n):r==="boolean"?zF(e,n):R0(e,n)}function Bv(e,t={}){const{signed:n}=t;t.size&&xs(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function jK(e,t={}){return typeof e=="number"||typeof e=="bigint"?Nv(e,t):typeof e=="string"?ZF(e,t):typeof e=="boolean"?GF(e,t):V7(e,t)}function GF(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(xs(n,{size:t.size}),yc(n,{size:t.size})):n}function V7(e,t={}){let n="";for(let i=0;io||i=Ui.zero&&e<=Ui.nine)return e-Ui.zero;if(e>=Ui.A&&e<=Ui.F)return e-(Ui.A-10);if(e>=Ui.a&&e<=Ui.f)return e-(Ui.a-10)}function R0(e,t={}){let n=e;t.size&&(xs(n,{size:t.size}),n=yc(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let s=0,a=0;st){const[o,s,a]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],l=Math.round(+`${s}.${a}`);l>9?r=`${BigInt(o)+BigInt(1)}0`.padStart(o.length+1,"0"):r=`${o}${l}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${r}`)}function nU(e,t="wei"){return tU(e,q7[t])}const K7=e=>K7(),rU=e=>{const t=Bv(e);return G7(t)},Z7=e=>{if(!e)return e;const t=ly(e,"bigint");return G7(t)},iU=e=>{if(typeof e!="string"&&typeof e!="number")throw new Error("eth must be a string or number value");const t=typeof e=="number"?e.toString():e;return nU(t)},x_=e=>Nv(e),oU=async e=>{const t=await ue(()=>import("./index-BYP1Ti20.js"),__vite__mapDeps([0,1])),{id:n,label:r,token:i,publicRpcUrl:o,blockExplorerUrl:s,rpcUrl:a}=e;switch(n){case"0x89":{const{polygon:l}=t;return l}case"0xa":{const{optimism:l}=t;return l}case"0xa4b1":{const{arbitrum:l}=t;return l}case"0x144":{const{zkSync:l}=t;return l}case"0x38":{const{bsc:l}=t;return l}case"0x1":{const{mainnet:l}=t;return l}case"0xaa36a7":{const{sepolia:l}=t;return l}case"0xfa":{const{fantom:l}=t;return l}case"0xa86a":{const{avalanche:l}=t;return l}case"0xa4ec":{const{celo:l}=t;return l}case"0x2105":{const{base:l}=t;return l}case"0x14a33":{const{baseGoerli:l}=t;return l}case"0x64":{const{gnosis:l}=t;return l}case"0x63564C40":{const{harmonyOne:l}=t;return l}case"0x27bc86aa":{const{degen:l}=t;return l}default:{const{extractChain:l,defineChain:u}=await ue(async()=>{const{extractChain:c,defineChain:f}=await import("./index-CEX9b7PI.js");return{extractChain:c,defineChain:f}},__vite__mapDeps([2,1])),d=l({chains:Object.values(t),id:ly(n,"number")});return d||u({id:ly(n,"number"),name:r??"",nativeCurrency:{decimals:18,name:i??"",symbol:i??""},rpcUrls:{default:{http:[a??"",o??""]}},blockExplorers:{default:{name:"Explorer",url:s??""}}})}}};var is;(function(e){e[e.ACCOUNT_ACCESS_REJECTED=4001]="ACCOUNT_ACCESS_REJECTED",e[e.ACCOUNT_ACCESS_ALREADY_REQUESTED=-32002]="ACCOUNT_ACCESS_ALREADY_REQUESTED",e[e.UNAUTHORIZED=4100]="UNAUTHORIZED",e[e.INVALID_PARAMS=-32602]="INVALID_PARAMS",e[e.UNSUPPORTED_METHOD=4200]="UNSUPPORTED_METHOD",e[e.DISCONNECTED=4900]="DISCONNECTED",e[e.CHAIN_DISCONNECTED=4901]="CHAIN_DISCONNECTED",e[e.CHAIN_NOT_ADDED=4902]="CHAIN_NOT_ADDED",e[e.DOES_NOT_EXIST=-32601]="DOES_NOT_EXIST",e[e.UNRECOGNIZED_CHAIN_ID=-32603]="UNRECOGNIZED_CHAIN_ID"})(is||(is={}));function Ot(e,t){const n=e.validate(t);return n.error?n:null}const Mv=O.alternatives().try(O.string().pattern(/^0x[0-9a-fA-F]+$/),O.number().positive()),jv=O.string().valid("evm"),sU=O.object({address:O.string().required(),icon:O.string().optional()}),aU=O.object({namespace:jv,id:Mv.required(),rpcUrl:O.string(),label:O.string(),token:O.string(),secondaryTokens:O.array().max(5).items(sU).optional(),icon:O.string(),color:O.string(),publicRpcUrl:O.string(),protectedRpcUrl:O.string(),blockExplorerUrl:O.string()});var vp={exports:{}};vp.exports;(function(e,t){var n=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,a=1/0,l=9007199254740991,u="[object Arguments]",d="[object Array]",c="[object Boolean]",f="[object Date]",m="[object Error]",p="[object Function]",h="[object GeneratorFunction]",y="[object Map]",g="[object Number]",b="[object Object]",v="[object Promise]",w="[object RegExp]",E="[object Set]",C="[object String]",k="[object Symbol]",_="[object WeakMap]",S="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",L="[object Float64Array]",F="[object Int8Array]",N="[object Int16Array]",R="[object Int32Array]",B="[object Uint8Array]",V="[object Uint8ClampedArray]",j="[object Uint16Array]",W="[object Uint32Array]",Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ae=/^\./,Z=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pe=/[\\^$.*+?()[\]{}|]/g,Ie=/\\(\\)?/g,_e=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,le={};le[I]=le[L]=le[F]=le[N]=le[R]=le[B]=le[V]=le[j]=le[W]=!0,le[u]=le[d]=le[S]=le[c]=le[A]=le[f]=le[m]=le[p]=le[y]=le[g]=le[b]=le[w]=le[E]=le[C]=le[_]=!1;var $e=typeof br=="object"&&br&&br.Object===Object&&br,rt=typeof self=="object"&&self&&self.Object===Object&&self,je=$e||rt||Function("return this")(),nt=t&&!t.nodeType&&t,Le=nt&&!0&&e&&!e.nodeType&&e,_t=Le&&Le.exports===nt,Kn=_t&&$e.process,Zr=function(){try{return Kn&&Kn.binding("util")}catch{}}(),Ss=Zr&&Zr.isTypedArray;function wc(x,T,P,D){for(var ne=-1,G=x?x.length:0;++ne-1}function Tc(x,T){var P=this.__data__,D=yo(P,x);return D<0?P.push([x,T]):P[D][1]=T,this}Xn.prototype.clear=kc,Xn.prototype.delete=Cc,Xn.prototype.get=Ac,Xn.prototype.has=Yn,Xn.prototype.set=Tc;function xn(x){var T=-1,P=x?x.length:0;for(this.clear();++TPe))return!1;var Ke=G.get(x);if(Ke&&G.get(T))return Ke==T;var Ve=-1,Ze=!0,Qe=ne&o?new Ti:void 0;for(G.set(x,T),G.set(T,x);++Ve-1&&x%1==0&&x-1&&x%1==0&&x<=l}function En(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function dr(x){return!!x&&typeof x=="object"}function Ri(x){return typeof x=="symbol"||dr(x)&&Kt.call(x)==k}var Ua=Ss?co(Ss):Hc;function U0(x){return x==null?"":qc(x)}function H0(x,T,P){var D=x==null?void 0:ni(x,T);return D===void 0?P:D}function Kc(x,T){return x!=null&&ri(x,T,Dc)}function Ha(x){return We(x)?Bc(x):zc(x)}function z0(x){return x}function W0(x){return Oi(x)?lo($(x)):Ns(x)}e.exports=z})(vp,vp.exports);var lU=vp.exports;const cU=Sa(lU);function cy(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function E_(e){return cy(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const uU="2.12.0",UK=e=>e,HK=e=>e,fU=()=>`viem@${uU}`;class io extends Error{constructor(t,n={}){var o;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:fU()});const r=n.cause instanceof io?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,i=n.cause instanceof io&&n.cause.docsPath||n.docsPath;this.message=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(` +`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=t}walk(t){return X7(this,t)}}function X7(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e?X7(e.cause,t):t?null:e}class zK extends io{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class Y7 extends io{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}class WK extends io{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesLengthError"})}}function Dv(e,{dir:t,size:n=32}={}){return typeof e=="string"?dU(e,{dir:t,size:n}):hU(e,{dir:t,size:n})}function dU(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new Y7({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function hU(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Y7({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;it)throw new mU({givenSize:E_(e),maxSize:t})}function gU(e,t={}){const{signed:n}=t;t.size&&Fv(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2,o=(1n<t.toString(16).padStart(2,"0"));function S_(e,t={}){return typeof e=="number"||typeof e=="bigint"?vU(e,t):typeof e=="string"?_U(e,t):typeof e=="boolean"?bU(e,t):Q7(e,t)}function bU(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Fv(n,{size:t.size}),Dv(n,{size:t.size})):n}function Q7(e,t={}){let n="";for(let i=0;io||i-1}function Os($,M){var z=this.__data__,ge=mo(z,$);return ge<0?(++this.size,z.push([$,M])):z[ge][1]=M,this}Zt.prototype.clear=Ps,Zt.prototype.delete=Ai,Zt.prototype.get=Sc,Zt.prototype.has=ho,Zt.prototype.set=Os;function Ir($){var M=-1,z=$==null?0:$.length;for(this.clear();++M1?z[Be-1]:void 0,Ge=Be>2?z[2]:void 0;for(Ue=$.length>3&&typeof Ue=="function"?(Be--,Ue):void 0,Ge&&Fc(z[0],z[1],Ge)&&(Ue=Be<3?void 0:Ue,Be=1),M=Object(M);++ge-1&&$%1==0&&$0){if(++M>=i)return arguments[0]}else M=0;return $.apply(void 0,arguments)}}function ja($){if($!=null){try{return co.call($)}catch{}try{return $+""}catch{}}return""}function vo($,M){return $===M||$!==$&&M!==M}var wo=Ti(function(){return arguments}())?Ti:function($){return ri($)&&ur.call($,"callee")&&!Oa.call($,"callee")},_o=Array.isArray;function Ms($){return $!=null&&Xt($.length)&&!fr($)}function xo($){return ri($)&&Ms($)}var $i=As||Eo;function fr($){if(!Yt($))return!1;var M=go($);return M==m||M==p||M==u||M==v}function Xt($){return typeof $=="number"&&$>-1&&$%1==0&&$<=s}function Yt($){var M=typeof $;return $!=null&&(M=="object"||M=="function")}function ri($){return $!=null&&typeof $=="object"}function Pi($){if(!ri($)||go($)!=b)return!1;var M=Yr($);if(M===null)return!0;var z=ur.call(M,"constructor")&&M.constructor;return typeof z=="function"&&z instanceof z&&co.call(z)==xc}var Oi=nt?Kn(nt):Pc;function Gc($){return Mc($,Da($))}function Da($){return Ms($)?Tc($):Jn($)}var Fa=jc(function($,M,z){ti($,M,z)});function js($){return function(){return $}}function Ds($){return $}function Eo(){return!1}e.exports=Fa})(wp,wp.exports);var xU=wp.exports;const EU=Sa(xU);var J7={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,d){this.fn=l,this.context=u,this.once=d||!1}function o(l,u,d,c,f){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new i(d,c||l,f),p=n?n+u:u;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],m]:l._events[p].push(m):(l._events[p]=m,l._eventsCount++),l}function s(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],d,c;if(this._eventsCount===0)return u;for(c in d=this._events)t.call(d,c)&&u.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},a.prototype.listeners=function(u){var d=n?n+u:u,c=this._events[d];if(!c)return[];if(c.fn)return[c.fn];for(var f=0,m=c.length,p=new Array(m);f @@ -2230,7 +2230,7 @@ Note: there are at least one loader still registered to this locale that wasn't -`,S_=` +`,k_=` @@ -2239,7 +2239,7 @@ Note: there are at least one loader still registered to this locale that wasn't -`,k_=` +`,C_=` @@ -2251,7 +2251,7 @@ Note: there are at least one loader still registered to this locale that wasn't -`,C_=` +`,A_=` @@ -2289,7 +2289,7 @@ Note: there are at least one loader still registered to this locale that wasn't -`,A_=` +`,T_=` @@ -2298,7 +2298,7 @@ Note: there are at least one loader still registered to this locale that wasn't -`,T_=` +`,I_=` @@ -2358,20 +2358,20 @@ Note: there are at least one loader still registered to this locale that wasn't -`;function DU(){if(typeof window<"u"){const e=Fj.getParser(window.navigator.userAgent),t=e.getOS(),n=e.getBrowser(),{type:r}=e.getPlatform();return{type:r,os:t,browser:n}}else return{type:null,os:null,browser:null}}const FU=e=>e!=null;function Fv(e){return e.includes("11?`${e.slice(0,4)}…${e.slice(-6)}`:e}async function ZK(e){try{return await navigator.clipboard.writeText(e)}catch(t){console.error("Failed to copy: ",t)}}const n9=e=>typeof e=="number"?`0x${e.toString(16)}`:e;function UU(e){return e.map(t=>{var{id:n}=t,r=_p(t,["id"]);const i=n9(n);return Object.assign({id:i},r)})}function XK(e){return`0x${(e*1e9).toString(16)}`}const YK={"0x1":"Ethereum","0xaa36a7":"Sepolia","0x38":"Binance","0x89":"Polygon","0xfa":"Fantom","0xa":"OP Mainnet","0x45":"OP Kovan","0xa86a":"Avalanche","0xa4ec":"Celo","0x2105":"Base","0x14a33":"Base Goerli","0x64":"Gnosis","0x63564C40":"Harmony One","0xa4b1":"Arbitrum One","0xa4ba":"Arbitrum Nova","0x27bc86aa":"Degen","0x890":"SNAX"};function xp(e){switch(e){case"0x1":case"0x89":case"0xa":case"0xa4b1":case"0x144":return"0x1";case"0x5":return e;case"0xaa36a7":return e;default:return null}}const HU=async e=>{switch(e){case"0x89":case"0xa":case"0xa4b1":case"0x144":case"0x1":{const{mainnet:t}=await ue(async()=>{const{mainnet:n}=await import("./index-40a497ea-B-e4dja1.js");return{mainnet:n}},__vite__mapDeps([3,4]));return t}case"0xaa36a7":{const{sepolia:t}=await ue(async()=>{const{sepolia:n}=await import("./index-40a497ea-B-e4dja1.js");return{sepolia:n}},__vite__mapDeps([3,4]));return t}default:return null}},I_={main:"0x1",sepolia:"0xaa36a7",xdai:"0x64","bsc-main":"0x38","matic-main":"0x89","fantom-main":"0xfa","matic-mumbai":"0x80001",degen:"0x27bc86aa",SNAX:"0x890"},zU={"0x1":{icon:S_,color:"#627EEA"},"0xaa36a7":{icon:S_,color:"#627EEA"},"0x38":{icon:AU,color:"#F3BA2F"},"0x89":{icon:k_,color:"#8247E5"},"0xfa":{icon:TU,color:"#1969FF"},"0xa":{icon:C_,color:"#FF0420"},"0x45":{icon:C_,color:"#FF0420"},"0xa86a":{icon:IU,color:"#E84142"},"0xa4ec":{icon:$U,color:"#FBCC5C"},"0x64":{icon:PU,color:"#04795B"},"0x63564C40":{icon:OU,color:"#ffffff"},"0xa4b1":{icon:A_,color:"#33394B"},"0xa4ba":{icon:A_,color:"#33394B"},"0x2105":{icon:T_,color:"#0259F9"},"0x14a33":{icon:T_,color:"#0259F9"},"0x80001":{icon:k_,color:"#8247E5"},"0x27bc86aa":{icon:MU,color:"#a36dfe"},"0x890":{icon:jU,color:"#00D1FF"}},QK={icon:jf,color:"#33394B"};function JK(e){return e?zU[e.toLowerCase()]:void 0}function eZ(e,t){return!!t.find(({id:n,namespace:r})=>n===e.id&&r===e.namespace)}const tZ={pending:{backgroundColor:"var(--onboard-primary-700, var(--primary-700))",borderColor:"#6370E5",eventIcon:RU},success:{backgroundColor:"#052E17",borderColor:"var(--onboard-success-300, var(--success-300))",eventIcon:LU},error:{backgroundColor:"#FDB1B11A",borderColor:"var(--onboard-danger-300, var(--danger-300))",eventIcon:BU},hint:{backgroundColor:"var(--onboard-gray-500, var(--gray-500))",borderColor:"var(--onboard-gray-500, var(--gray-500))",iconColor:"var(--onboard-gray-100, var(--gray-100))",eventIcon:L0}},WU=e=>new Promise(t=>setTimeout(t,e));function B0(e){try{return localStorage.getItem(e)}catch{return null}}function N0(e,t){try{localStorage.setItem(e,t)}catch{return}}function r9(e){try{localStorage.removeItem(e)}catch{return}}let fn={svelteInstance:null,apiKey:void 0,device:DU(),initialWalletInit:[],gas:void 0,containerElements:{accountCenter:void 0,connectModal:void 0},unstoppableResolution:void 0,wagmi:void 0};function $_(e){fn=Object.assign(Object.assign({},fn),e)}const Do={wallets:[],walletModules:[],chains:[],accountCenter:{enabled:!0,position:"bottomRight",expanded:!1,minimal:!0},notify:{enabled:!0,transactionHandler:()=>{},position:"topRight",replacement:{gasPriceProbability:{speedup:80,cancel:95}}},notifications:[],locale:"",connect:{showSidebar:!0,disableClose:!1},appMetadata:null,wagmiConfig:null},gi={TERMS_AGREEMENT:"onboard.js:agreement",LAST_CONNECTED_WALLET:"onboard.js:last_connected_wallet"},Rt=768,nZ="https://rpc.blocknative.com/boost",rZ="https://docs.blocknative.com/blocknative-mev-protection/transaction-boost",i9="add_chains",o9="update_chains",s9="reset_store",a9="add_wallet",l9="update_wallet",c9="remove_wallet",u9="update_account",f9="update_account_center",d9="update_connect_modal",h9="set_wallet_modules",p9="set_locale",m9="update_notify",Uv="add_notification",g9="remove_notification",y9="update_balance",b9="update_app_metadata",v9="update_wagmi_config";function VU(e,t){const{type:n,payload:r}=t;switch(n){case i9:return Object.assign(Object.assign({},e),{chains:[...e.chains,...r]});case o9:{const i=r,o=e.chains,s=o.findIndex(a=>a.id===i.id);return o[s]=i,Object.assign(Object.assign({},e),{chains:o})}case a9:{const i=r,o=e.wallets.find(({label:s})=>s===i.label);return Object.assign(Object.assign({},e),{wallets:[o||r,...e.wallets.filter(({label:s})=>s!==i.label)]})}case l9:{const i=r,{id:o}=i,s=_p(i,["id"]),a=e.wallets.map(l=>l.label===o?Object.assign(Object.assign({},l),s):l);return Object.assign(Object.assign({},e),{wallets:a})}case c9:{const i=r;return Object.assign(Object.assign({},e),{wallets:e.wallets.filter(({label:o})=>o!==i.id)})}case u9:{const i=r,{id:o,address:s}=i,a=_p(i,["id","address"]),l=e.wallets.map(u=>(u.label===o&&(u.accounts=u.accounts.map(d=>d.address===s?Object.assign(Object.assign({},d),a):d)),u));return Object.assign(Object.assign({},e),{wallets:l})}case y9:{const i=r;return Object.assign(Object.assign({},e),{wallets:i})}case d9:{const i=r;return Object.assign(Object.assign({},e),{connect:Object.assign(Object.assign({},e.connect),i)})}case f9:{const i=r;return Object.assign(Object.assign({},e),{accountCenter:Object.assign(Object.assign({},e.accountCenter),i)})}case m9:{const i=r;return Object.assign(Object.assign({},e),{notify:Object.assign(Object.assign({},e.notify),i)})}case Uv:{const i=r,o=[...e.notifications],s=o.findIndex(({id:a})=>a===i.id);return s!==-1?o[s]=i:o.unshift(i),Object.assign(Object.assign({},e),{notifications:o})}case g9:{const i=r;return Object.assign(Object.assign({},e),{notifications:e.notifications.filter(o=>o.id!==i)})}case h9:return Object.assign(Object.assign({},e),{walletModules:r});case p9:return Ta.set(r),Object.assign(Object.assign({},e),{locale:r});case b9:{const i=r;return Object.assign(Object.assign({},e),{appMetadata:Object.assign(Object.assign(Object.assign({},e.appMetadata),i),{name:i.name||""})})}case v9:{const i=r;return Object.assign(Object.assign({},e),{wagmiConfig:i})}case s9:return Do;default:throw new Error(`Unknown type: ${n} in appStore reducer`)}}const M0=new pd(Do),Ep=new ao;Ep.subscribe(M0);function an(e){const t=M0.getValue();Ep.next(VU(t,e))}function qU(e){if(!e)return Ep.asObservable();if(!Object.keys(M0.getValue()).includes(String(e)))throw new Error(`key: ${e} does not exist on this store`);return Ep.asObservable().pipe(Lj(e),Iv(e),Zl(FU))}function GU(){return M0.getValue()}const xe={select:qU,get:GU};function ee(){}const bd=e=>e;function KU(e,t){for(const n in t)e[n]=t[n];return e}function ZU(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function w9(e){return e()}function P_(){return Object.create(null)}function Ei(e){e.forEach(w9)}function Es(e){return typeof e=="function"}function Wt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ih;function ec(e,t){return ih||(ih=document.createElement("a")),ih.href=t,e===ih.href}function XU(e){return Object.keys(e).length===0}function YU(e,...t){if(e==null)return ee;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function wt(e,t,n){e.$$.on_destroy.push(YU(t,n))}function Hv(e,t,n,r){if(e){const i=_9(e,t,n,r);return e[0](i)}}function _9(e,t,n,r){return e[1]&&r?KU(n.ctx.slice(),e[1](r(t))):n.ctx}function zv(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(t.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(t.dirty.length,i.length);for(let a=0;a32){const t=[],n=e.ctx.length/32;for(let r=0;rwindow.performance.now():()=>Date.now(),qv=x9?e=>requestAnimationFrame(e):ee;const Al=new Set;function E9(e){Al.forEach(t=>{t.c(e)||(Al.delete(t),t.f())}),Al.size!==0&&qv(E9)}function D0(e){let t;return Al.size===0&&qv(E9),{promise:new Promise(n=>{Al.add(t={c:e,f:n})}),abort(){Al.delete(t)}}}function H(e,t){e.appendChild(t)}function Vt(e,t,n){const r=Gv(e);if(!r.getElementById(t)){const i=K("style");i.id=t,i.textContent=n,S9(r,i)}}function Gv(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function QU(e){const t=K("style");return S9(Gv(e),t),t.sheet}function S9(e,t){return H(e.head||e,t),t.sheet}function oe(e,t,n){e.insertBefore(t,n||null)}function re(e){e.parentNode&&e.parentNode.removeChild(e)}function k9(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function eH(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function U(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function tH(e){return Array.from(e.childNodes)}function tt(e,t){t=""+t,e.data!==t&&(e.data=t)}function Ka(e,t,n,r){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function iZ(e,t,n){for(let r=0;r>>0}function iH(e,t){const n={stylesheet:QU(t),rules:{}};return Sp.set(e,n),n}function Df(e,t,n,r,i,o,s,a=0){const l=16.666/r;let u=`{ +`;function DU(){if(typeof window<"u"){const e=Fj.getParser(window.navigator.userAgent),t=e.getOS(),n=e.getBrowser(),{type:r}=e.getPlatform();return{type:r,os:t,browser:n}}else return{type:null,os:null,browser:null}}const FU=e=>e!=null;function Uv(e){return e.includes("11?`${e.slice(0,4)}…${e.slice(-6)}`:e}async function ZK(e){try{return await navigator.clipboard.writeText(e)}catch(t){console.error("Failed to copy: ",t)}}const n9=e=>typeof e=="number"?`0x${e.toString(16)}`:e;function UU(e){return e.map(t=>{var{id:n}=t,r=_p(t,["id"]);const i=n9(n);return Object.assign({id:i},r)})}function XK(e){return`0x${(e*1e9).toString(16)}`}const YK={"0x1":"Ethereum","0xaa36a7":"Sepolia","0x38":"Binance","0x89":"Polygon","0xfa":"Fantom","0xa":"OP Mainnet","0x45":"OP Kovan","0xa86a":"Avalanche","0xa4ec":"Celo","0x2105":"Base","0x14a33":"Base Goerli","0x64":"Gnosis","0x63564C40":"Harmony One","0xa4b1":"Arbitrum One","0xa4ba":"Arbitrum Nova","0x27bc86aa":"Degen","0x890":"SNAX"};function xp(e){switch(e){case"0x1":case"0x89":case"0xa":case"0xa4b1":case"0x144":return"0x1";case"0x5":return e;case"0xaa36a7":return e;default:return null}}const HU=async e=>{switch(e){case"0x89":case"0xa":case"0xa4b1":case"0x144":case"0x1":{const{mainnet:t}=await ue(async()=>{const{mainnet:n}=await import("./index-40a497ea-B-e4dja1.js");return{mainnet:n}},__vite__mapDeps([3,4]));return t}case"0xaa36a7":{const{sepolia:t}=await ue(async()=>{const{sepolia:n}=await import("./index-40a497ea-B-e4dja1.js");return{sepolia:n}},__vite__mapDeps([3,4]));return t}default:return null}},$_={main:"0x1",sepolia:"0xaa36a7",xdai:"0x64","bsc-main":"0x38","matic-main":"0x89","fantom-main":"0xfa","matic-mumbai":"0x80001",degen:"0x27bc86aa",SNAX:"0x890"},zU={"0x1":{icon:k_,color:"#627EEA"},"0xaa36a7":{icon:k_,color:"#627EEA"},"0x38":{icon:AU,color:"#F3BA2F"},"0x89":{icon:C_,color:"#8247E5"},"0xfa":{icon:TU,color:"#1969FF"},"0xa":{icon:A_,color:"#FF0420"},"0x45":{icon:A_,color:"#FF0420"},"0xa86a":{icon:IU,color:"#E84142"},"0xa4ec":{icon:$U,color:"#FBCC5C"},"0x64":{icon:PU,color:"#04795B"},"0x63564C40":{icon:OU,color:"#ffffff"},"0xa4b1":{icon:T_,color:"#33394B"},"0xa4ba":{icon:T_,color:"#33394B"},"0x2105":{icon:I_,color:"#0259F9"},"0x14a33":{icon:I_,color:"#0259F9"},"0x80001":{icon:C_,color:"#8247E5"},"0x27bc86aa":{icon:MU,color:"#a36dfe"},"0x890":{icon:jU,color:"#00D1FF"}},QK={icon:jf,color:"#33394B"};function JK(e){return e?zU[e.toLowerCase()]:void 0}function eZ(e,t){return!!t.find(({id:n,namespace:r})=>n===e.id&&r===e.namespace)}const tZ={pending:{backgroundColor:"var(--onboard-primary-700, var(--primary-700))",borderColor:"#6370E5",eventIcon:RU},success:{backgroundColor:"#052E17",borderColor:"var(--onboard-success-300, var(--success-300))",eventIcon:LU},error:{backgroundColor:"#FDB1B11A",borderColor:"var(--onboard-danger-300, var(--danger-300))",eventIcon:BU},hint:{backgroundColor:"var(--onboard-gray-500, var(--gray-500))",borderColor:"var(--onboard-gray-500, var(--gray-500))",iconColor:"var(--onboard-gray-100, var(--gray-100))",eventIcon:L0}},WU=e=>new Promise(t=>setTimeout(t,e));function B0(e){try{return localStorage.getItem(e)}catch{return null}}function N0(e,t){try{localStorage.setItem(e,t)}catch{return}}function r9(e){try{localStorage.removeItem(e)}catch{return}}let fn={svelteInstance:null,apiKey:void 0,device:DU(),initialWalletInit:[],gas:void 0,containerElements:{accountCenter:void 0,connectModal:void 0},unstoppableResolution:void 0,wagmi:void 0};function P_(e){fn=Object.assign(Object.assign({},fn),e)}const Do={wallets:[],walletModules:[],chains:[],accountCenter:{enabled:!0,position:"bottomRight",expanded:!1,minimal:!0},notify:{enabled:!0,transactionHandler:()=>{},position:"topRight",replacement:{gasPriceProbability:{speedup:80,cancel:95}}},notifications:[],locale:"",connect:{showSidebar:!0,disableClose:!1},appMetadata:null,wagmiConfig:null},gi={TERMS_AGREEMENT:"onboard.js:agreement",LAST_CONNECTED_WALLET:"onboard.js:last_connected_wallet"},Rt=768,nZ="https://rpc.blocknative.com/boost",rZ="https://docs.blocknative.com/blocknative-mev-protection/transaction-boost",i9="add_chains",o9="update_chains",s9="reset_store",a9="add_wallet",l9="update_wallet",c9="remove_wallet",u9="update_account",f9="update_account_center",d9="update_connect_modal",h9="set_wallet_modules",p9="set_locale",m9="update_notify",Hv="add_notification",g9="remove_notification",y9="update_balance",b9="update_app_metadata",v9="update_wagmi_config";function VU(e,t){const{type:n,payload:r}=t;switch(n){case i9:return Object.assign(Object.assign({},e),{chains:[...e.chains,...r]});case o9:{const i=r,o=e.chains,s=o.findIndex(a=>a.id===i.id);return o[s]=i,Object.assign(Object.assign({},e),{chains:o})}case a9:{const i=r,o=e.wallets.find(({label:s})=>s===i.label);return Object.assign(Object.assign({},e),{wallets:[o||r,...e.wallets.filter(({label:s})=>s!==i.label)]})}case l9:{const i=r,{id:o}=i,s=_p(i,["id"]),a=e.wallets.map(l=>l.label===o?Object.assign(Object.assign({},l),s):l);return Object.assign(Object.assign({},e),{wallets:a})}case c9:{const i=r;return Object.assign(Object.assign({},e),{wallets:e.wallets.filter(({label:o})=>o!==i.id)})}case u9:{const i=r,{id:o,address:s}=i,a=_p(i,["id","address"]),l=e.wallets.map(u=>(u.label===o&&(u.accounts=u.accounts.map(d=>d.address===s?Object.assign(Object.assign({},d),a):d)),u));return Object.assign(Object.assign({},e),{wallets:l})}case y9:{const i=r;return Object.assign(Object.assign({},e),{wallets:i})}case d9:{const i=r;return Object.assign(Object.assign({},e),{connect:Object.assign(Object.assign({},e.connect),i)})}case f9:{const i=r;return Object.assign(Object.assign({},e),{accountCenter:Object.assign(Object.assign({},e.accountCenter),i)})}case m9:{const i=r;return Object.assign(Object.assign({},e),{notify:Object.assign(Object.assign({},e.notify),i)})}case Hv:{const i=r,o=[...e.notifications],s=o.findIndex(({id:a})=>a===i.id);return s!==-1?o[s]=i:o.unshift(i),Object.assign(Object.assign({},e),{notifications:o})}case g9:{const i=r;return Object.assign(Object.assign({},e),{notifications:e.notifications.filter(o=>o.id!==i)})}case h9:return Object.assign(Object.assign({},e),{walletModules:r});case p9:return Ia.set(r),Object.assign(Object.assign({},e),{locale:r});case b9:{const i=r;return Object.assign(Object.assign({},e),{appMetadata:Object.assign(Object.assign(Object.assign({},e.appMetadata),i),{name:i.name||""})})}case v9:{const i=r;return Object.assign(Object.assign({},e),{wagmiConfig:i})}case s9:return Do;default:throw new Error(`Unknown type: ${n} in appStore reducer`)}}const M0=new pd(Do),Ep=new ao;Ep.subscribe(M0);function an(e){const t=M0.getValue();Ep.next(VU(t,e))}function qU(e){if(!e)return Ep.asObservable();if(!Object.keys(M0.getValue()).includes(String(e)))throw new Error(`key: ${e} does not exist on this store`);return Ep.asObservable().pipe(Lj(e),$v(e),Xl(FU))}function GU(){return M0.getValue()}const xe={select:qU,get:GU};function ee(){}const bd=e=>e;function KU(e,t){for(const n in t)e[n]=t[n];return e}function ZU(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function w9(e){return e()}function O_(){return Object.create(null)}function Ei(e){e.forEach(w9)}function Es(e){return typeof e=="function"}function Wt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ih;function tc(e,t){return ih||(ih=document.createElement("a")),ih.href=t,e===ih.href}function XU(e){return Object.keys(e).length===0}function YU(e,...t){if(e==null)return ee;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function wt(e,t,n){e.$$.on_destroy.push(YU(t,n))}function zv(e,t,n,r){if(e){const i=_9(e,t,n,r);return e[0](i)}}function _9(e,t,n,r){return e[1]&&r?KU(n.ctx.slice(),e[1](r(t))):n.ctx}function Wv(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(t.dirty===void 0)return i;if(typeof i=="object"){const o=[],s=Math.max(t.dirty.length,i.length);for(let a=0;a32){const t=[],n=e.ctx.length/32;for(let r=0;rwindow.performance.now():()=>Date.now(),Gv=x9?e=>requestAnimationFrame(e):ee;const Tl=new Set;function E9(e){Tl.forEach(t=>{t.c(e)||(Tl.delete(t),t.f())}),Tl.size!==0&&Gv(E9)}function D0(e){let t;return Tl.size===0&&Gv(E9),{promise:new Promise(n=>{Tl.add(t={c:e,f:n})}),abort(){Tl.delete(t)}}}function H(e,t){e.appendChild(t)}function Vt(e,t,n){const r=Kv(e);if(!r.getElementById(t)){const i=K("style");i.id=t,i.textContent=n,S9(r,i)}}function Kv(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function QU(e){const t=K("style");return S9(Kv(e),t),t.sheet}function S9(e,t){return H(e.head||e,t),t.sheet}function oe(e,t,n){e.insertBefore(t,n||null)}function re(e){e.parentNode&&e.parentNode.removeChild(e)}function k9(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function eH(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function U(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function tH(e){return Array.from(e.childNodes)}function tt(e,t){t=""+t,e.data!==t&&(e.data=t)}function Za(e,t,n,r){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function iZ(e,t,n){for(let r=0;r>>0}function iH(e,t){const n={stylesheet:QU(t),rules:{}};return Sp.set(e,n),n}function Df(e,t,n,r,i,o,s,a=0){const l=16.666/r;let u=`{ `;for(let y=0;y<=1;y+=l){const g=t+(n-t)*o(y);u+=y*100+`%{${s(g,1-g)}} `}const d=u+`100% {${s(n,1-n)}} -}`,c=`__svelte_${rH(d)}_${a}`,f=Gv(e),{stylesheet:m,rules:p}=Sp.get(f)||iH(f,e);p[c]||(p[c]=!0,m.insertRule(`@keyframes ${c} ${d}`,m.cssRules.length));const h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${c} ${r}ms linear ${i}ms 1 both`,kp+=1,c}function Ff(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?o=>o.indexOf(t)<0:o=>o.indexOf("__svelte")===-1),i=n.length-r.length;i&&(e.style.animation=r.join(", "),kp-=i,kp||oH())}function oH(){qv(()=>{kp||(Sp.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&re(t)}),Sp.clear())})}function oZ(e,t,n,r){if(!t)return ee;const i=e.getBoundingClientRect();if(t.left===i.left&&t.right===i.right&&t.top===i.top&&t.bottom===i.bottom)return ee;const{delay:o=0,duration:s=300,easing:a=bd,start:l=j0()+o,end:u=l+s,tick:d=ee,css:c}=n(e,{from:t,to:i},r);let f=!0,m=!1,p;function h(){c&&(p=Df(e,0,1,s,o,a,c)),o||(m=!0)}function y(){c&&Ff(e,p),f=!1}return D0(g=>{if(!m&&g>=l&&(m=!0),m&&g>=u&&(d(1,0),y()),!f)return!1;if(m){const b=g-l,v=0+1*a(b/s);d(v,1-v)}return!0}),h(),d(0,1),y}function sZ(e){const t=getComputedStyle(e);if(t.position!=="absolute"&&t.position!=="fixed"){const{width:n,height:r}=t,i=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,sH(e,i)}}function sH(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),i=r.transform==="none"?"":r.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}let Uf;function Zi(e){Uf=e}function Kv(){if(!Uf)throw new Error("Function called outside component initialization");return Uf}function aH(e){Kv().$$.on_mount.push(e)}function C9(e){Kv().$$.on_destroy.push(e)}function lH(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(r=>r.call(this,t))}const Za=[],Cp=[];let Tl=[];const uy=[],cH=Promise.resolve();let fy=!1;function uH(){fy||(fy=!0,cH.then(Zv))}function Rn(e){Tl.push(e)}function fH(e){uy.push(e)}const sg=new Set;let Va=0;function Zv(){if(Va!==0)return;const e=Uf;do{try{for(;Vae.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Tl=t}let uu;function Xv(){return uu||(uu=Promise.resolve(),uu.then(()=>{uu=null})),uu}function ua(e,t,n){e.dispatchEvent(nH(`${t?"intro":"outro"}${n}`))}const $h=new Set;let fi;function mt(){fi={r:0,c:[],p:fi}}function gt(){fi.r||Ei(fi.c),fi=fi.p}function X(e,t){e&&e.i&&($h.delete(e),e.i(t))}function ie(e,t,n,r){if(e&&e.o){if($h.has(e))return;$h.add(e),fi.c.push(()=>{$h.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}const Yv={duration:0};function Qv(e,t,n){const r={direction:"in"};let i=t(e,n,r),o=!1,s,a,l=0;function u(){s&&Ff(e,s)}function d(){const{delay:f=0,duration:m=300,easing:p=bd,tick:h=ee,css:y}=i||Yv;y&&(s=Df(e,0,1,m,f,p,y,l++)),h(0,1);const g=j0()+f,b=g+m;a&&a.abort(),o=!0,Rn(()=>ua(e,!0,"start")),a=D0(v=>{if(o){if(v>=b)return h(1,0),ua(e,!0,"end"),u(),o=!1;if(v>=g){const w=p((v-g)/m);h(w,1-w)}}return o})}let c=!1;return{start(){c||(c=!0,Ff(e),Es(i)?(i=i(r),Xv().then(d)):d())},invalidate(){c=!1},end(){o&&(u(),o=!1)}}}function aZ(e,t,n){const r={direction:"out"};let i=t(e,n,r),o=!0,s;const a=fi;a.r+=1;function l(){const{delay:u=0,duration:d=300,easing:c=bd,tick:f=ee,css:m}=i||Yv;m&&(s=Df(e,1,0,d,u,c,m));const p=j0()+u,h=p+d;Rn(()=>ua(e,!1,"start")),D0(y=>{if(o){if(y>=h)return f(0,1),ua(e,!1,"end"),--a.r||Ei(a.c),!1;if(y>=p){const g=c((y-p)/d);f(1-g,g)}}return o})}return Es(i)?Xv().then(()=>{i=i(r),l()}):l(),{end(u){u&&i.tick&&i.tick(1,0),o&&(s&&Ff(e,s),o=!1)}}}function L_(e,t,n,r){const i={direction:"both"};let o=t(e,n,i),s=r?0:1,a=null,l=null,u=null;function d(){u&&Ff(e,u)}function c(m,p){const h=m.b-s;return p*=Math.abs(h),{a:s,b:m.b,d:h,duration:p,start:m.start,end:m.start+p,group:m.group}}function f(m){const{delay:p=0,duration:h=300,easing:y=bd,tick:g=ee,css:b}=o||Yv,v={start:j0()+p,b:m};m||(v.group=fi,fi.r+=1),a||l?l=v:(b&&(d(),u=Df(e,s,m,h,p,y,b)),m&&g(0,1),a=c(v,h),Rn(()=>ua(e,m,"start")),D0(w=>{if(l&&w>l.start&&(a=c(l,h),l=null,ua(e,a.b,"start"),b&&(d(),u=Df(e,s,a.b,a.duration,0,y,o.css))),a){if(w>=a.end)g(s=a.b,1-s),ua(e,a.b,"end"),l||(a.b?d():--a.group.r||Ei(a.group.c)),a=null;else if(w>=a.start){const E=w-a.start;s=a.a+a.d*y(E/a.duration),g(s,1-s)}}return!!(a||l)}))}return{run(m){Es(o)?Xv().then(()=>{o=o(i),f(m)}):f(m)},end(){d(),a=l=null}}}function Ea(e,t){const n=t.token={};function r(i,o,s,a){if(t.token!==n)return;t.resolved=a;let l=t.ctx;s!==void 0&&(l=l.slice(),l[s]=a);const u=i&&(t.current=i)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((c,f)=>{f!==o&&c&&(mt(),ie(c,1,1,()=>{t.blocks[f]===c&&(t.blocks[f]=null)}),gt())}):t.block.d(1),u.c(),X(u,1),u.m(t.mount(),t.anchor),d=!0),t.block=u,t.blocks&&(t.blocks[o]=u),d&&Zv()}if(ZU(e)){const i=Kv();if(e.then(o=>{Zi(i),r(t.then,1,t.value,o),Zi(null)},o=>{if(Zi(i),r(t.catch,2,t.error,o),Zi(null),!t.hasCatch)throw o}),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}}function vc(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}function lZ(e,t){e.d(1),t.delete(e.key)}function pH(e,t){ie(e,1,1,()=>{t.delete(e.key)})}function cZ(e,t){e.f(),pH(e,t)}function uZ(e,t,n,r,i,o,s,a,l,u,d,c){let f=e.length,m=o.length,p=f;const h={};for(;p--;)h[e[p].key]=p;const y=[],g=new Map,b=new Map,v=[];for(p=m;p--;){const k=c(i,o,p),_=n(k);let S=s.get(_);S?v.push(()=>S.p(k,t)):(S=u(_,k),S.c()),g.set(_,y[p]=S),_ in h&&b.set(_,Math.abs(p-h[_]))}const w=new Set,E=new Set;function C(k){X(k,1),k.m(a,d),s.set(k.key,k),d=k.first,m--}for(;f&&m;){const k=y[m-1],_=e[f-1],S=k.key,A=_.key;k===_?(d=k.first,f--,m--):g.has(A)?!s.has(S)||w.has(S)?C(k):E.has(A)?f--:b.get(S)>b.get(A)?(E.add(S),C(k)):(w.add(A),f--):(l(_,s),f--)}for(;f--;){const k=e[f];g.has(k.key)||l(k,s)}for(;m;)C(y[m-1]);return Ei(v),y}function mH(e,t,n){const r=e.$$.props[t];r!==void 0&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function ze(e){e&&e.c()}function De(e,t,n,r){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),r||Rn(()=>{const s=e.$$.on_mount.map(w9).filter(Es);e.$$.on_destroy?e.$$.on_destroy.push(...s):Ei(s),e.$$.on_mount=[]}),o.forEach(Rn)}function Fe(e,t){const n=e.$$;n.fragment!==null&&(hH(n.after_update),Ei(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function gH(e,t){e.$$.dirty[0]===-1&&(Za.push(e),uH(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const p=m.length?m[0]:f;return u.ctx&&i(u.ctx[c],u.ctx[c]=p)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](p),d&&gH(e,c)),f}):[],u.update(),d=!0,Ei(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const c=tH(t.target);u.fragment&&u.fragment.l(c),c.forEach(re)}else u.fragment&&u.fragment.c();t.intro&&X(e.$$.fragment),De(e,t.target,t.anchor,t.customElement),Zv()}Zi(l)}class Gt{$destroy(){Fe(this,1),this.$destroy=ee}$on(t,n){if(!Es(n))return ee;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!XU(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Jv=new ao,ew=new ao,jr=new pd({inProgress:!1,actionRequired:""}),tc=new pd(null),tw=xe.select("wallets").pipe(vi(1));Jv.pipe(h7(tw),Iv("1")).subscribe(e=>{e.forEach(({label:t})=>{ew.next(t)}),dz()});const ju=new pd([]);function yH(e){const t=ju.getValue(),n=t.findIndex(({hash:r})=>r===e.hash);if(n!==-1){const r=t.map((i,o)=>o===n?e:i);ju.next(r)}else ju.next([...t,e])}function fZ(e){const t=ju.getValue();ju.next(t.filter(n=>n.hash!==e))}const B_=Cj(()=>{const e=new ao;return C9(()=>{e.next()}),e.asObservable().pipe(Tv(1))}),dl={default:{"--w3o-background-color":"unset","--w3o-foreground-color":"unset","--w3o-text-color":"unset","--w3o-border-color":"unset","--w3o-action-color":"unset","--w3o-border-radius":"unset","--w3o-font-family":"inherit"},light:{"--w3o-background-color":"#ffffff","--w3o-foreground-color":"#EFF1FC","--w3o-text-color":"#1a1d26","--w3o-border-color":"#d0d4f7","--w3o-action-color":"#6370E5","--w3o-border-radius":"16px","--w3o-font-family":"inherit"},dark:{"--w3o-background-color":"#1A1D26","--w3o-foreground-color":"#242835","--w3o-text-color":"#EFF1FC","--w3o-border-color":"#33394B","--w3o-action-color":"#929bed","--w3o-border-radius":"16px","--w3o-font-family":"inherit"}},bH=e=>typeof e=="string"&&e==="system"?wH():vH(e),vH=e=>{if(typeof e=="string"&&e in dl)return dl[e];if(typeof e=="object")return e},Su=e=>{Object.keys(e).forEach(t=>{document.documentElement.style.setProperty(t,e[t]||null)})},wH=()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");e.matches?Su(dl.dark):Su(dl.light),Q1(e,"change").pipe(Bf(Jv)).subscribe(t=>{t.matches?Su(dl.dark):Su(dl.light)})},ag=O.object().unknown(),_H=O.object({namespace:Mv.required(),id:Nv.required()}),xH=O.any().allow(O.object({name:O.string().required(),avatar:O.string(),contentHash:O.any().allow(O.string(),null),getText:O.function().arity(1).required()}),null),EH=O.any().allow(O.object({name:O.string().required()}),null),SH=O.any().allow(O.object({eth:O.number()}).unknown(),null),kH=O.any().allow(O.object({balance:O.string().required(),icon:O.string()}),null),CH=O.object({address:O.string().required(),ens:xH,uns:EH,balance:SH,secondaryTokens:kH}),AH=O.array().items(aU).unique((e,t)=>e.id===t.id).error(e=>e[0].code==="array.unique"?new Error(`There is a duplicate Chain ID in your Onboard Chains array: ${e}`):new Error(`${e}`)),TH=O.array().items(CH),A9=O.object({label:O.string(),icon:O.string(),provider:ag,instance:ag,accounts:TH,chains:O.array().items(_H),wagmiConnector:ag}).required().error(new Error("wallet must be defined")),IH=O.array().items(A9),T9=O.object({name:O.string().required(),url:O.string().uri().required()}),I9=O.object({version:O.string().required(),termsUrl:O.string().uri(),privacyUrl:O.string().uri()}),$H=O.object({name:O.string().required(),description:O.string().required(),icon:O.string(),logo:O.string(),gettingStartedGuide:O.string(),email:O.string(),appUrl:O.string(),explore:O.string(),recommendedInjectedWallets:O.array().items(T9),agreement:I9}),PH=O.object({name:O.string(),description:O.string(),icon:O.string(),logo:O.string(),gettingStartedGuide:O.string(),email:O.string(),appUrl:O.string(),explore:O.string(),recommendedInjectedWallets:O.array().items(T9),agreement:I9});O.object({label:O.string().required(),getInfo:O.function().arity(1).required(),getInterface:O.function().arity(1).required()});const $9=O.array().items(O.function()).required(),OH=O.string(),nw=O.string().valid("topRight","bottomRight","bottomLeft","topLeft"),N_=[70,80,90,95,99],Ap=O.object({transactionHandler:O.function(),enabled:O.boolean(),position:nw,replacement:O.object({gasPriceProbability:O.object({speedup:O.number().valid(...N_),cancel:O.number().valid(...N_)})})}),P9=O.object({desktop:Ap,mobile:Ap}),M_=O.object({enabled:O.boolean(),position:nw,minimal:O.boolean(),containerElement:O.string(),hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string()}),RH=O.object({enabled:O.boolean(),position:nw,expanded:O.boolean(),minimal:O.boolean(),hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string(),containerElement:O.string()}),O9=O.object({showSidebar:O.boolean(),disableClose:O.boolean(),autoConnectLastWallet:O.boolean(),autoConnectAllPreviousWallet:O.boolean(),iDontHaveAWalletLink:O.string(),wheresMyWalletLink:O.string(),removeWhereIsMyWalletWarning:O.boolean(),removeIDontHaveAWalletInfoLink:O.boolean(),disableUDResolution:O.boolean()}),LH=O.object({accountCenter:O.string(),connectModal:O.string()}),BH=O.object({"--w3o-background-color":O.string(),"--w3o-font-family":O.string(),"--w3o-foreground-color":O.string(),"--w3o-text-color":O.string(),"--w3o-border-color":O.string(),"--w3o-action-color":O.string(),"--w3o-border-radius":O.string()}),NH=O.string().valid("default","dark","light","system"),R9=O.alternatives().try(BH,NH),MH=O.object({wallets:$9,chains:AH.required(),appMetadata:$H,i18n:O.object().unknown(),apiKey:O.string(),accountCenter:O.object({desktop:M_,mobile:M_,hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string()}),notify:[P9,Ap],gas:O.object({get:O.function().required(),stream:O.function().required()}),wagmi:O.function(),connect:O9,containerElements:LH,transactionPreview:O.any(),theme:R9,disableFontDownload:O.boolean(),unstoppableResolution:O.function()}),jH=O.object({autoSelect:O.alternatives().try(O.object({label:O.string().required(),disableModals:O.boolean()}),O.string())}),DH=O.object({label:O.string().required()}).required(),FH=O.object({address:O.string().required(),icon:O.string().optional()}),UH=O.object({chainId:Nv.required(),chainNamespace:Mv,wallet:O.string(),rpcUrl:O.string(),label:O.string(),token:O.string(),protectedRpcUrl:O.string(),secondaryTokens:O.array().max(5).items(FH).optional()}),L9=O.object({key:O.string().required(),type:O.string().allow("pending","error","success","hint"),eventCode:O.string(),message:O.string().required(),id:O.string().required(),autoDismiss:O.number(),onClick:O.function(),link:O.string()}),HH=O.object({sendTransaction:O.function(),estimateGas:O.function(),gasPrice:O.function(),balance:O.alternatives(O.string(),O.number()),txDetails:O.object({value:O.alternatives(O.string(),O.number()),to:O.string(),from:O.string()}),txApproveReminderTimeout:O.number()}),zH=O.object({key:O.string(),type:O.string().allow("pending","error","success","hint"),eventCode:O.string(),message:O.string(),id:O.string(),autoDismiss:O.number(),onClick:O.function(),link:O.string()}),WH=O.object({id:O.string().required(),key:O.string().required(),type:O.string().allow("pending","error","success","hint").required(),eventCode:O.string().required(),message:O.string().required(),autoDismiss:O.number().required(),network:O.string().required(),startTime:O.number(),onClick:O.function(),link:O.string()}),VH=O.any().allow(L9,O.boolean().allow(!1));function rw(e){return Ot(A9,e)}function qH(e){return Ot(MH,e)}function GH(e){return Ot(jH,e)}function KH(e){return Ot(DH,e)}function B9(e,t){return Ot(O.string().required().label(t||"value"),e)}function N9(e){return Ot(UH,e)}function ZH(e){return Ot(RH,e)}function XH(e){return Ot(O9,e)}function YH(e){return Ot($9,e)}function QH(e){return Ot(OH,e)}function M9(e){return Ot(Ap,e)}function JH(e){return Ot(P9,e)}function ez(e){return Ot(VH,e)}function tz(e){return Ot(WH,e)}function nz(e){return Ot(HH,e)}function rz(e){return Ot(L9,e)}function j_(e){return Ot(zH,e)}function iz(e){return Ot(IH,e)}function oz(e){return Ot(R9,e)}function sz(e){return Ot(PH,e)}function az(e){const t={type:i9,payload:e.map(n=>{var{namespace:r="evm",id:i,rpcUrl:o}=n,s=_p(n,["namespace","id","rpcUrl"]);return Object.assign(Object.assign({},s),{namespace:r,id:i.toLowerCase(),rpcUrl:o?o.trim():null})})};an(t)}function j9(e){const{label:t,token:n,rpcUrl:r,id:i,namespace:o}=e,s=N9({label:t,token:n,rpcUrl:r,chainId:i,chainNamespace:o});if(s)throw s;an({type:o9,payload:e})}function dy(e){const t=rw(e);if(t)throw console.error(t),t;an({type:a9,payload:e})}function Du(e,t){const n=rw(t);if(n)throw console.error(n),n;const r={type:l9,payload:Object.assign({id:e},t)};an(r)}function lz(e){const t=B9(e,"wallet id");if(t)throw t;an({type:c9,payload:{id:e}})}function cz(e,t){const n=rw(e)||t&&B9(t,"address");if(n)throw n;if(t){const r=e.accounts.find(i=>i.address===t);r&&(e.accounts=[r,...e.accounts.filter(({address:i})=>i!==r.address)])}yz(e),dy(e)}function ku(e,t,n){const r={type:u9,payload:Object.assign({id:e,address:t},n)};an(r)}function D9(e){const t=ZH(e);if(t)throw t;an({type:f9,payload:e})}function uz(e){const t=XH(e);if(t)throw t;an({type:d9,payload:e})}function Ph(e){const t=M9(e);if(t)throw t;an({type:m9,payload:e})}function Xa(e){const t=tz(e);if(t)throw t;an({type:Uv,payload:e})}function lg(e){const t=rz(e);if(t)throw t;an({type:Uv,payload:e})}function fz(e){const t=j_(e);if(t)throw t;const n=`customNotification-${F7()}`,r=Object.assign(Object.assign({},e),{id:n,key:n});lg(r);const i=()=>{r.id&&F9(r.id)},o=s=>{const a=j_(e);if(a)throw a;const l=Object.assign(Object.assign({},s),{id:r.id,key:r.key});return lg(l),{dismiss:i,update:o}};return lg(r),{dismiss:i,update:o}}function F9(e){if(typeof e!="string")throw new Error("Notification id must be of type string");an({type:g9,payload:e})}function dz(){an({type:s9})}function U9(e){const t=YH(e);if(t)throw t;const n=mz(e),r=gz(n);an({type:h9,payload:r})}function hz(e){const t=QH(e);if(t)throw t;an({type:p9,payload:e})}function pz(e){const t=iz(e);if(t)throw t;an({type:y9,payload:e})}function mz(e){const{device:t}=fn;return t?e.reduce((n,r)=>{const i=r({device:t});return i&&n.push(...Array.isArray(i)?i:[i]),n},[]):[]}function gz(e){return e.filter((t,n)=>t&&e.findIndex(r=>r&&r.label===t.label)===n)}function H9(e){const t=oz(e);if(t)throw t;const n=bH(e);n&&Su(n)}function z9(e){const t=sz(e);if(t)throw t;an({type:b9,payload:e})}function W9(e){an({type:v9,payload:e})}function yz(e){const{wagmi:t}=fn;if(t)try{const{label:n}=e,{wagmiConnect:r,getWagmiConnector:i}=t,o=xe.get().wagmiConfig,s=i(n);r(o,{connector:s}).then(()=>{Du(n,{wagmiConnector:s})})}catch(n){console.error(`Error updating Wagmi connector on primary wallet switch ${n}`)}}async function bz(e){if(e){const i=GH(e);if(i)throw i}const{chains:t}=xe.get();if(!t.length)throw new Error("At least one chain must be set before attempting to connect a wallet");let{autoSelect:n}=e||{};n||(n={label:"",disableModals:!1}),n&&(typeof n=="string"||n.label)&&await WU(50),xe.get().walletModules.length||U9(fn.initialWalletInit),jr.next({autoSelect:typeof n=="string"?{label:n,disableModals:!1}:n,inProgress:!0});const r=jr.pipe(Zl(({inProgress:i,actionRequired:o})=>i===!1&&!o),h7(tw),Iv(1));return Lf(r)}var vz={selectingWallet:{header:"Available Wallets",sidebar:{heading:"",subheading:"Connect your wallet",paragraph:"Connecting your wallet is like “logging in” to Web3. Select your wallet from the options to get started.",IDontHaveAWallet:"I don't have a wallet"},recommendedWalletsPart1:"{app} only supports",recommendedWalletsPart2:"on this platform. Please use or install one of the supported wallets to continue",installWallet:"You do not have any wallets installed that {app} supports, please use a supported wallet",agreement:{agree:"I agree to the",terms:"Terms & Conditions",and:"and",privacy:"Privacy Policy"},whyDontISeeMyWallet:"Why don't I see my wallet?",learnMore:"Click here to learn more"},connectingWallet:{header:"{connectionRejected, select, false {Connecting to {wallet}...} other {Connection Rejected}}",sidebar:{subheading:"Approve Connection",paragraph:"Please approve the connection in your wallet and authorize access to continue."},mainText:"Connecting...",paragraph:"Make sure to select all accounts that you want to grant access to.",previousConnection:"{wallet} already has a pending connection request, please open the {wallet} app to login and connect.",rejectedText:"Connection Rejected!",rejectedCTA:"Click here to try again",primaryButton:"Back to wallets"},connectedWallet:{header:"Connection Successful",sidebar:{subheading:"Connection Successful!",paragraph:"Your wallet is now connected to {app}"},mainText:"Connected"}},wz={actionRequired:{heading:"Action required in {wallet}",paragraph:"Please switch the active account in your wallet.",linkText:"Learn more.",buttonText:"Okay"},switchChain:{heading:"Switch Chain",paragraph1:"{app} requires that you switch your wallet to the {nextNetworkName} network to continue.",paragraph2:"*Some wallets may not support changing networks. If you can not change networks in your wallet you may consider switching to a different wallet."},confirmDisconnectAll:{heading:"Disconnect all Wallets",description:"Are you sure that you would like to disconnect all your wallets?",confirm:"Confirm",cancel:"Cancel"},confirmTransactionProtection:{heading:"Enable Transaction Protection",description:"Protect RPC endpoints hide your transaction from front-running and sandwich bots.",link:"Learn more",enable:"Enable",dismiss:"Dismiss"}},_z={connectAnotherWallet:"Connect another Wallet",disconnectAllWallets:"Disconnect all Wallets",currentNetwork:"Current Network",enableTransactionProtection:"Enable Transaction Protection",appInfo:"App Info",learnMore:"Learn More",gettingStartedGuide:"Getting Started Guide",smartContracts:"Smart Contract(s)",explore:"Explore",poweredBy:"powered by",addAccount:"Add Account",setPrimaryAccount:"Set Primary Account",disconnectWallet:"Disconnect Wallet",copyAddress:"Copy Wallet address"},xz={transaction:{txRequest:"Your transaction is waiting for you to confirm",nsfFail:"You have insufficient funds for this transaction",txUnderpriced:"The gas price for your transaction is too low, try a higher gas price",txRepeat:"This could be a repeat transaction",txAwaitingApproval:"You have a previous transaction waiting for you to confirm",txConfirmReminder:"Please confirm your transaction to continue",txSendFail:"You rejected the transaction",txSent:"Your transaction has been sent to the network",txStallPending:"Your transaction has stalled before it was sent, please try again",txStuck:"Your transaction is stuck due to a nonce gap",txPool:"Your transaction has started",txStallConfirmed:"Your transaction has stalled and hasn't been confirmed",txSpeedUp:"Your transaction has been sped up",txCancel:"Your transaction is being canceled",txFailed:"Your transaction has failed",txConfirmed:"Your transaction has succeeded",txError:"Oops something went wrong, please try again",txReplaceError:"There was an error replacing your transaction, please try again"},watched:{txPool:"Your account is {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txSpeedUp:"Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been sped up",txCancel:"Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been canceled",txConfirmed:"Your account successfully {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txFailed:"Your account failed to {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txStuck:"Your transaction is stuck due to a nonce gap"},time:{minutes:"min",seconds:"sec"}},Re={connect:vz,modals:wz,accountCenter:_z,notify:xz};const cg={};async function Ez(e){if(!e)return null;if(!cg[e.rpcUrl]){const t=await HU(e.id);if(!t)return null;const{createPublicClient:n,http:r}=await ue(async()=>{const{createPublicClient:o,http:s}=await import("./index-pnCaYn__.js");return{createPublicClient:o,http:s}},[]),i=n({chain:t,transport:r()});cg[e.rpcUrl]=i}return cg[e.rpcUrl]}function V9(e){const t={method:"eth_requestAccounts"};return e.request(t)}function dZ(e){const t={method:"eth_selectAccounts"};return e.request(t)}function q9(e){return e.request({method:"eth_chainId"})}function G9(e){const{provider:t,disconnected$:n}=e;return f7(o=>{t.on("accountsChanged",o)},o=>{t.removeListener("accountsChanged",o)}).pipe(Bf(n))}function Sz(e){const{provider:t,disconnected$:n}=e;return f7(o=>{t.on("chainChanged",o)},o=>{t.removeListener("chainChanged",o)}).pipe(Bf(n))}function kz(e,t){const n=ew.pipe(Zl(o=>o===t),Tv(1)),r=G9({provider:e,disconnected$:n}).pipe(J1());r.subscribe(async([o])=>{var s;try{await Az(t)}catch(f){console.warn("Web3Onboard: Error whilst trying to sync connected accounts:",f)}if(!o){iw({label:t});return}const{wallets:a}=xe.get(),l=a.find(f=>f.label===t),u=l?l.accounts:[],[[d],c]=cU(u,f=>f.address===o);if(Du(t,{accounts:[d||{address:o,ens:null,uns:null,balance:null},...c]}),xe.get().notify.enabled&&!d){const f=await $p();if(f){const m=xe.get().wallets.find(p=>p.label===t);try{m&&f.subscribe({id:o,chainId:(s=m.chains[0])===null||s===void 0?void 0:s.id,type:"account"})}catch{}}}}),r.pipe(n_(async([o])=>{if(!o)return;const{wallets:s,chains:a}=xe.get(),l=s.find(v=>v.label===t);if(!l)return;const{chains:u,accounts:d}=l,[c]=u,f=a.find(({namespace:v,id:w})=>v==="evm"&&w===c.id);if(!f)return;const m=Tp(o,f),p=Ip(o,f),h=d.find(v=>v.address===o),y=a.find(({id:v})=>v===xp(c.id)),g=h&&h.ens?Promise.resolve(h.ens):y?hy(o,y):Promise.resolve(null),b=h&&h.uns?Promise.resolve(h.uns):y?py(o,y):Promise.resolve(null);return Promise.all([Promise.resolve(o),m,g,b,p])})).subscribe(o=>{if(!o)return;const[s,a,l,u,d]=o;ku(t,s,{balance:a,ens:l,uns:u,secondaryTokens:d})});const i=Sz({provider:e,disconnected$:n}).pipe(J1());i.subscribe(async o=>{const{wallets:s}=xe.get(),a=s.find(f=>f.label===t);if(!a)return;const{chains:l,accounts:u}=a,[d]=l;if(cy(o)||(o=E_(o)),o===d.id)return;if(xe.get().notify.enabled){const f=await $p();if(f){const m=xe.get().wallets.find(p=>p.label===t);if(!m)return;m.accounts.forEach(({address:p})=>{f.unsubscribe({id:p,chainId:m.chains[0].id,timeout:6e4})}),m.accounts.forEach(({address:p})=>{try{f.subscribe({id:p,chainId:o,type:"account"})}catch{}})}}const c=u.map(({address:f})=>({address:f,ens:null,uns:null,balance:null}));Du(t,{chains:[{namespace:"evm",id:o}],accounts:c})}),i.pipe(n_(async o=>{const{wallets:s,chains:a}=xe.get(),l=s.find(c=>c.label===t),u=(l==null?void 0:l.accounts)||[];cy(o)||(o=E_(o));const d=a.find(({namespace:c,id:f})=>c==="evm"&&f===o);return d?Promise.all(u.map(async({address:c})=>{const f=Tp(c,d),m=Ip(c,d),p=a.find(({id:E})=>E===xp(o)),h=p?hy(c,p):Promise.resolve(null),y=p?py(c,p):Promise.resolve(null),[g,b,v,w]=await Promise.all([f,h,y,m]);return{address:c,balance:g,ens:b,uns:v,secondaryTokens:w}})):Promise.resolve(null)})).subscribe(o=>{o&&Du(t,{accounts:o})}),n.subscribe(()=>{e.disconnect&&e.disconnect()})}async function hy(e,t){if(!t)return null;const n=await Ez(t);if(!n)return null;try{const r=await n.getEnsName({address:e});let i=null;if(r){const{labelhash:o,normalize:s}=await ue(async()=>{const{labelhash:f,normalize:m}=await import("./index-021f6a62-BcF70HI7.js").then(p=>p.y);return{labelhash:f,normalize:m}},[]).then(function(f){return f.i}),a=s(r),l=await n.getEnsResolver({name:a}),u=await n.getEnsAvatar({name:a}),d=o(a);i={name:r,avatar:u,contentHash:d,ensResolver:l,getText:async f=>await n.getEnsText({name:r,key:f})}}return i}catch(r){return console.error(r),null}}async function py(e,t){const{unstoppableResolution:n}=fn;if(!n||!K7()||!t)return null;try{return await n(e)}catch(r){return console.error(r),null}}async function Tp(e,t){if(!t)return null;const{wallets:n}=xe.get();try{const r=n.find(s=>!!s.provider);if(!r)return null;const o=await r.provider.request({method:"eth_getBalance",params:[e,"latest"]});return o?{[t.token||"eth"]:rU(o)}:null}catch(r){return console.error(r),null}}function F0(e,t){return e.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}function K9(e,t){return e.request({method:"wallet_addEthereumChain",params:[{chainId:t.id,chainName:t.label,nativeCurrency:{name:t.label,symbol:t.token,decimals:18},rpcUrls:[t.publicRpcUrl||t.rpcUrl],blockExplorerUrls:t.blockExplorerUrl?[t.blockExplorerUrl]:null}]})}function hZ(e,t,n){return e.request({method:"wallet_addEthereumChain",params:[{chainId:t.id,chainName:t.label,nativeCurrency:{name:t.label,symbol:t.token,decimals:18},rpcUrls:[n],blockExplorerUrls:t.blockExplorerUrl?[t.blockExplorerUrl]:void 0}]})}async function Cz(e){try{const t=await e.request({method:"wallet_getPermissions"});return Array.isArray(t)?t:[]}catch{return[]}}async function Az(e){const t=xe.get().wallets.find(i=>i.label===e);if(!t)return;const r=(await Cz(t.provider)).find(({parentCapability:i})=>i==="eth_accounts");if(r){const{value:i}=r.caveats.find(({type:o})=>o==="restrictReturnedAccounts")||{value:null};if(i){const o=t.accounts.filter(({address:s})=>i.includes(s));Du(t.label,Object.assign(Object.assign({},t),{accounts:o}))}}}const Tz=async(e,t)=>{try{const{id:n}=t;return await K9(e,t),await F0(e,n),n}catch{return}},Iz=()=>({addOrSwitchChain:Tz,getChainId:q9,requestAccounts:V9,switchChain:F0});async function Z9(e){const{wallets:t,chains:n}=xe.get(),r=await Promise.all(t.map(async i=>{const o=n.find(({id:a})=>a===i.chains[0].id);if(!o)return;const s=await Promise.all(i.accounts.map(async a=>{const l=await Ip(a.address,o);if(!e||e.some(u=>u.toLowerCase()===a.address.toLowerCase())){const u=await Tp(a.address,o);return Object.assign(Object.assign({},a),{balance:u,secondaryTokens:l})}return Object.assign(Object.assign({},a),{secondaryTokens:l})}));return Object.assign(Object.assign({},i),{accounts:s})}));pz(r)}const Ip=async(e,t)=>{if(!t)return[];const n=t.rpcUrl;return!t.secondaryTokens||!t.secondaryTokens.length||!n?[]:await Promise.all(t.secondaryTokens.map(async i=>{try{const{createPublicClient:o,http:s}=await ue(async()=>{const{createPublicClient:p,http:h}=await import("./index-pnCaYn__.js");return{createPublicClient:p,http:h}},[]),a=await oU(t),l=o({chain:a,transport:s(t.providerConnectionInfo&&t.providerConnectionInfo.url?t.providerConnectionInfo.url:n)}),u={abi:[{inputs:[{name:"owner",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],stateMutability:"view",type:"function"}],address:i.address},d=l.readContract(Object.assign(Object.assign({},u),{functionName:"balanceOf",args:[e]}))||"",c=l.readContract(Object.assign(Object.assign({},u),{functionName:"symbol",args:[]}))||"",[f,m]=await Promise.all([d,c]);return{name:m,balance:Z7(f.toString()),icon:i.icon}}catch(o){console.error(`There was an error fetching balance and/or symbol - for token contract: ${i.address} - ${o}`)}}))};function $z(e){const t=xe.get().notify.transactionHandler(e),n=ez(t);if(n)throw n;if(e.eventCode==="txConfirmed"){const i=[e.watchedAddress,e.counterparty].filter(Boolean);Z9(i)}const r=Pz(e,t);Xa(r),yH(e)}function Pz(e,t){const{id:n,hash:r,startTime:i,eventCode:o,direction:s,counterparty:a,value:l,asset:u,network:d}=e,c=X9(o),f=`${n||r}-${typeof t=="object"&&t.eventCode||o}`,m=a&&a.substring(0,4)+"..."+a.substring(a.length-4),p=Z7(l),h=a&&l?{messageId:`notify.watched['${o}']`,values:{verb:o==="txConfirmed"?s==="incoming"?"received":"sent":s==="incoming"?"receiving":"sending",formattedValue:p,preposition:s==="incoming"?"from":"to",counterpartyShortened:m,asset:u}}:{messageId:`notify.transaction['${o}']`,values:{formattedValue:p,asset:u}},y=Vj(xi),w=Re.notify[a?"watched":"transaction"][o],E=y(h.messageId,{values:h.values,default:w});let C={id:n||r,type:c,key:f,network:d,startTime:i||Date.now(),eventCode:o,message:E,autoDismiss:Oz(typeof t=="object"&&t.type||c)};return typeof t=="object"&&(C=Object.assign(Object.assign({},C),t)),C}function X9(e){switch(e){case"txSent":case"txPool":return"pending";case"txSpeedUp":case"txCancel":case"txRequest":case"txRepeat":case"txAwaitingApproval":case"txConfirmReminder":case"txStuck":return"hint";case"txError":case"txSendFail":case"txFailed":case"txDropped":case"nsfFail":case"txUnderpriced":return"error";case"txConfirmed":return"success";default:return"hint"}}function Oz(e){switch(e){case"success":case"hint":return 4e3;default:return 0}}let oh;async function $p(){var e;const{apiKey:t}=fn;if(!t)return null;if(!oh){const{default:n}=await ue(async()=>{const{default:r}=await import("./index-9rPnx63E.js");return{default:r}},[]);oh=n.multichain({apiKey:(e=fn.apiKey)!==null&&e!==void 0?e:""}),oh.transactions$.subscribe($z)}return oh}async function iw(e){const t=KH(e);if(t)throw t;const{label:n}=e;if(xe.get().notify.enabled){const o=await $p();if(o){const s=xe.get().wallets.find(a=>a.label===n);s&&s.accounts.forEach(({address:a})=>{o.unsubscribe({id:a,chainId:s.chains[0].id,timeout:6e4})})}}const{wagmi:r}=fn;if(r){const o=await r.wagmiDisconnectWallet(n);o&&W9(o)}ew.next(n),lz(n);const i=B0(gi.LAST_CONNECTED_WALLET);if(i)try{const o=JSON.parse(i);Array.isArray(o)&&o.indexOf(n)>=0&&N0(gi.LAST_CONNECTED_WALLET,JSON.stringify(o.filter(s=>s!==n))),typeof o=="string"&&o===n&&r9(gi.LAST_CONNECTED_WALLET)}catch(o){console.error(`There was an error disconnecting the last connected wallet from localStorage - Error: ${o}`)}return xe.get().wallets}async function Rz(e){const t=N9(e);if(t)throw t;const{wallets:n,chains:r}=xe.get(),{chainId:i,chainNamespace:o="evm",wallet:s,rpcUrl:a,label:l,token:u}=e,d=n9(i),c=r.find(({namespace:p,id:h})=>p===o&&h.toLowerCase()===d.toLowerCase());if(!c)throw new Error(`Chain with chainId: ${i} and chainNamespace: ${o} has not been set and must be added when Onboard is initialized.`);const f=s?n.find(({label:p})=>p===s):n[0];if(!f)throw new Error(s?`Wallet with label ${s} is not connected`:"A wallet must be connected before a chain can be set");const[m]=f.chains;if(m.namespace===o&&m.id===d)return!0;try{return await F0(f.provider,d),!0}catch(p){const{code:h}=p,y=tc.pipe(Zl(g=>g===null),md(()=>!1));if(h===is.CHAIN_NOT_ADDED||h===is.UNRECOGNIZED_CHAIN_ID)return(a||l||u)&&(a&&(c.rpcUrl=a),l&&(c.label=l),u&&(c.token=u),j9(c)),Lz(f,c,y,d);if(h===is.UNSUPPORTED_METHOD)return tc.next({chain:c}),Lf(y)}return!1}const Lz=async(e,t,n,r)=>{try{return await K9(e.provider,t),await F0(e.provider,r),!0}catch(i){const{code:o}=i;return o===is.ACCOUNT_ACCESS_REJECTED?!1:(tc.next({chain:t}),Lf(n))}};function Bz(e){if(e){const{en:t}=e,n=EU(Re,t||{});Ah("en",n),Object.keys(e).filter(i=>i!=="en").forEach(i=>{const o=e[i];o&&Ah(i,o)})}else Ah("en",Re);fF({fallbackLocale:"en",initialLocale:wF()})}var Nz=` +}`,c=`__svelte_${rH(d)}_${a}`,f=Kv(e),{stylesheet:m,rules:p}=Sp.get(f)||iH(f,e);p[c]||(p[c]=!0,m.insertRule(`@keyframes ${c} ${d}`,m.cssRules.length));const h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${c} ${r}ms linear ${i}ms 1 both`,kp+=1,c}function Ff(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?o=>o.indexOf(t)<0:o=>o.indexOf("__svelte")===-1),i=n.length-r.length;i&&(e.style.animation=r.join(", "),kp-=i,kp||oH())}function oH(){Gv(()=>{kp||(Sp.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&re(t)}),Sp.clear())})}function oZ(e,t,n,r){if(!t)return ee;const i=e.getBoundingClientRect();if(t.left===i.left&&t.right===i.right&&t.top===i.top&&t.bottom===i.bottom)return ee;const{delay:o=0,duration:s=300,easing:a=bd,start:l=j0()+o,end:u=l+s,tick:d=ee,css:c}=n(e,{from:t,to:i},r);let f=!0,m=!1,p;function h(){c&&(p=Df(e,0,1,s,o,a,c)),o||(m=!0)}function y(){c&&Ff(e,p),f=!1}return D0(g=>{if(!m&&g>=l&&(m=!0),m&&g>=u&&(d(1,0),y()),!f)return!1;if(m){const b=g-l,v=0+1*a(b/s);d(v,1-v)}return!0}),h(),d(0,1),y}function sZ(e){const t=getComputedStyle(e);if(t.position!=="absolute"&&t.position!=="fixed"){const{width:n,height:r}=t,i=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=r,sH(e,i)}}function sH(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),i=r.transform==="none"?"":r.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}let Uf;function Zi(e){Uf=e}function Zv(){if(!Uf)throw new Error("Function called outside component initialization");return Uf}function aH(e){Zv().$$.on_mount.push(e)}function C9(e){Zv().$$.on_destroy.push(e)}function lH(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(r=>r.call(this,t))}const Xa=[],Cp=[];let Il=[];const uy=[],cH=Promise.resolve();let fy=!1;function uH(){fy||(fy=!0,cH.then(Xv))}function Rn(e){Il.push(e)}function fH(e){uy.push(e)}const sg=new Set;let qa=0;function Xv(){if(qa!==0)return;const e=Uf;do{try{for(;qae.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Il=t}let uu;function Yv(){return uu||(uu=Promise.resolve(),uu.then(()=>{uu=null})),uu}function ua(e,t,n){e.dispatchEvent(nH(`${t?"intro":"outro"}${n}`))}const $h=new Set;let fi;function mt(){fi={r:0,c:[],p:fi}}function gt(){fi.r||Ei(fi.c),fi=fi.p}function X(e,t){e&&e.i&&($h.delete(e),e.i(t))}function ie(e,t,n,r){if(e&&e.o){if($h.has(e))return;$h.add(e),fi.c.push(()=>{$h.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}const Qv={duration:0};function Jv(e,t,n){const r={direction:"in"};let i=t(e,n,r),o=!1,s,a,l=0;function u(){s&&Ff(e,s)}function d(){const{delay:f=0,duration:m=300,easing:p=bd,tick:h=ee,css:y}=i||Qv;y&&(s=Df(e,0,1,m,f,p,y,l++)),h(0,1);const g=j0()+f,b=g+m;a&&a.abort(),o=!0,Rn(()=>ua(e,!0,"start")),a=D0(v=>{if(o){if(v>=b)return h(1,0),ua(e,!0,"end"),u(),o=!1;if(v>=g){const w=p((v-g)/m);h(w,1-w)}}return o})}let c=!1;return{start(){c||(c=!0,Ff(e),Es(i)?(i=i(r),Yv().then(d)):d())},invalidate(){c=!1},end(){o&&(u(),o=!1)}}}function aZ(e,t,n){const r={direction:"out"};let i=t(e,n,r),o=!0,s;const a=fi;a.r+=1;function l(){const{delay:u=0,duration:d=300,easing:c=bd,tick:f=ee,css:m}=i||Qv;m&&(s=Df(e,1,0,d,u,c,m));const p=j0()+u,h=p+d;Rn(()=>ua(e,!1,"start")),D0(y=>{if(o){if(y>=h)return f(0,1),ua(e,!1,"end"),--a.r||Ei(a.c),!1;if(y>=p){const g=c((y-p)/d);f(1-g,g)}}return o})}return Es(i)?Yv().then(()=>{i=i(r),l()}):l(),{end(u){u&&i.tick&&i.tick(1,0),o&&(s&&Ff(e,s),o=!1)}}}function B_(e,t,n,r){const i={direction:"both"};let o=t(e,n,i),s=r?0:1,a=null,l=null,u=null;function d(){u&&Ff(e,u)}function c(m,p){const h=m.b-s;return p*=Math.abs(h),{a:s,b:m.b,d:h,duration:p,start:m.start,end:m.start+p,group:m.group}}function f(m){const{delay:p=0,duration:h=300,easing:y=bd,tick:g=ee,css:b}=o||Qv,v={start:j0()+p,b:m};m||(v.group=fi,fi.r+=1),a||l?l=v:(b&&(d(),u=Df(e,s,m,h,p,y,b)),m&&g(0,1),a=c(v,h),Rn(()=>ua(e,m,"start")),D0(w=>{if(l&&w>l.start&&(a=c(l,h),l=null,ua(e,a.b,"start"),b&&(d(),u=Df(e,s,a.b,a.duration,0,y,o.css))),a){if(w>=a.end)g(s=a.b,1-s),ua(e,a.b,"end"),l||(a.b?d():--a.group.r||Ei(a.group.c)),a=null;else if(w>=a.start){const E=w-a.start;s=a.a+a.d*y(E/a.duration),g(s,1-s)}}return!!(a||l)}))}return{run(m){Es(o)?Yv().then(()=>{o=o(i),f(m)}):f(m)},end(){d(),a=l=null}}}function Ea(e,t){const n=t.token={};function r(i,o,s,a){if(t.token!==n)return;t.resolved=a;let l=t.ctx;s!==void 0&&(l=l.slice(),l[s]=a);const u=i&&(t.current=i)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((c,f)=>{f!==o&&c&&(mt(),ie(c,1,1,()=>{t.blocks[f]===c&&(t.blocks[f]=null)}),gt())}):t.block.d(1),u.c(),X(u,1),u.m(t.mount(),t.anchor),d=!0),t.block=u,t.blocks&&(t.blocks[o]=u),d&&Xv()}if(ZU(e)){const i=Zv();if(e.then(o=>{Zi(i),r(t.then,1,t.value,o),Zi(null)},o=>{if(Zi(i),r(t.catch,2,t.error,o),Zi(null),!t.hasCatch)throw o}),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}}function vc(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}function lZ(e,t){e.d(1),t.delete(e.key)}function pH(e,t){ie(e,1,1,()=>{t.delete(e.key)})}function cZ(e,t){e.f(),pH(e,t)}function uZ(e,t,n,r,i,o,s,a,l,u,d,c){let f=e.length,m=o.length,p=f;const h={};for(;p--;)h[e[p].key]=p;const y=[],g=new Map,b=new Map,v=[];for(p=m;p--;){const k=c(i,o,p),_=n(k);let S=s.get(_);S?v.push(()=>S.p(k,t)):(S=u(_,k),S.c()),g.set(_,y[p]=S),_ in h&&b.set(_,Math.abs(p-h[_]))}const w=new Set,E=new Set;function C(k){X(k,1),k.m(a,d),s.set(k.key,k),d=k.first,m--}for(;f&&m;){const k=y[m-1],_=e[f-1],S=k.key,A=_.key;k===_?(d=k.first,f--,m--):g.has(A)?!s.has(S)||w.has(S)?C(k):E.has(A)?f--:b.get(S)>b.get(A)?(E.add(S),C(k)):(w.add(A),f--):(l(_,s),f--)}for(;f--;){const k=e[f];g.has(k.key)||l(k,s)}for(;m;)C(y[m-1]);return Ei(v),y}function mH(e,t,n){const r=e.$$.props[t];r!==void 0&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function ze(e){e&&e.c()}function De(e,t,n,r){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),r||Rn(()=>{const s=e.$$.on_mount.map(w9).filter(Es);e.$$.on_destroy?e.$$.on_destroy.push(...s):Ei(s),e.$$.on_mount=[]}),o.forEach(Rn)}function Fe(e,t){const n=e.$$;n.fragment!==null&&(hH(n.after_update),Ei(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function gH(e,t){e.$$.dirty[0]===-1&&(Xa.push(e),uH(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const p=m.length?m[0]:f;return u.ctx&&i(u.ctx[c],u.ctx[c]=p)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](p),d&&gH(e,c)),f}):[],u.update(),d=!0,Ei(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const c=tH(t.target);u.fragment&&u.fragment.l(c),c.forEach(re)}else u.fragment&&u.fragment.c();t.intro&&X(e.$$.fragment),De(e,t.target,t.anchor,t.customElement),Xv()}Zi(l)}class Gt{$destroy(){Fe(this,1),this.$destroy=ee}$on(t,n){if(!Es(n))return ee;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!XU(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ew=new ao,tw=new ao,jr=new pd({inProgress:!1,actionRequired:""}),nc=new pd(null),nw=xe.select("wallets").pipe(vi(1));ew.pipe(h7(nw),$v("1")).subscribe(e=>{e.forEach(({label:t})=>{tw.next(t)}),dz()});const ju=new pd([]);function yH(e){const t=ju.getValue(),n=t.findIndex(({hash:r})=>r===e.hash);if(n!==-1){const r=t.map((i,o)=>o===n?e:i);ju.next(r)}else ju.next([...t,e])}function fZ(e){const t=ju.getValue();ju.next(t.filter(n=>n.hash!==e))}const N_=Cj(()=>{const e=new ao;return C9(()=>{e.next()}),e.asObservable().pipe(Iv(1))}),hl={default:{"--w3o-background-color":"unset","--w3o-foreground-color":"unset","--w3o-text-color":"unset","--w3o-border-color":"unset","--w3o-action-color":"unset","--w3o-border-radius":"unset","--w3o-font-family":"inherit"},light:{"--w3o-background-color":"#ffffff","--w3o-foreground-color":"#EFF1FC","--w3o-text-color":"#1a1d26","--w3o-border-color":"#d0d4f7","--w3o-action-color":"#6370E5","--w3o-border-radius":"16px","--w3o-font-family":"inherit"},dark:{"--w3o-background-color":"#1A1D26","--w3o-foreground-color":"#242835","--w3o-text-color":"#EFF1FC","--w3o-border-color":"#33394B","--w3o-action-color":"#929bed","--w3o-border-radius":"16px","--w3o-font-family":"inherit"}},bH=e=>typeof e=="string"&&e==="system"?wH():vH(e),vH=e=>{if(typeof e=="string"&&e in hl)return hl[e];if(typeof e=="object")return e},Su=e=>{Object.keys(e).forEach(t=>{document.documentElement.style.setProperty(t,e[t]||null)})},wH=()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");e.matches?Su(hl.dark):Su(hl.light),Q1(e,"change").pipe(Bf(ew)).subscribe(t=>{t.matches?Su(hl.dark):Su(hl.light)})},ag=O.object().unknown(),_H=O.object({namespace:jv.required(),id:Mv.required()}),xH=O.any().allow(O.object({name:O.string().required(),avatar:O.string(),contentHash:O.any().allow(O.string(),null),getText:O.function().arity(1).required()}),null),EH=O.any().allow(O.object({name:O.string().required()}),null),SH=O.any().allow(O.object({eth:O.number()}).unknown(),null),kH=O.any().allow(O.object({balance:O.string().required(),icon:O.string()}),null),CH=O.object({address:O.string().required(),ens:xH,uns:EH,balance:SH,secondaryTokens:kH}),AH=O.array().items(aU).unique((e,t)=>e.id===t.id).error(e=>e[0].code==="array.unique"?new Error(`There is a duplicate Chain ID in your Onboard Chains array: ${e}`):new Error(`${e}`)),TH=O.array().items(CH),A9=O.object({label:O.string(),icon:O.string(),provider:ag,instance:ag,accounts:TH,chains:O.array().items(_H),wagmiConnector:ag}).required().error(new Error("wallet must be defined")),IH=O.array().items(A9),T9=O.object({name:O.string().required(),url:O.string().uri().required()}),I9=O.object({version:O.string().required(),termsUrl:O.string().uri(),privacyUrl:O.string().uri()}),$H=O.object({name:O.string().required(),description:O.string().required(),icon:O.string(),logo:O.string(),gettingStartedGuide:O.string(),email:O.string(),appUrl:O.string(),explore:O.string(),recommendedInjectedWallets:O.array().items(T9),agreement:I9}),PH=O.object({name:O.string(),description:O.string(),icon:O.string(),logo:O.string(),gettingStartedGuide:O.string(),email:O.string(),appUrl:O.string(),explore:O.string(),recommendedInjectedWallets:O.array().items(T9),agreement:I9});O.object({label:O.string().required(),getInfo:O.function().arity(1).required(),getInterface:O.function().arity(1).required()});const $9=O.array().items(O.function()).required(),OH=O.string(),rw=O.string().valid("topRight","bottomRight","bottomLeft","topLeft"),M_=[70,80,90,95,99],Ap=O.object({transactionHandler:O.function(),enabled:O.boolean(),position:rw,replacement:O.object({gasPriceProbability:O.object({speedup:O.number().valid(...M_),cancel:O.number().valid(...M_)})})}),P9=O.object({desktop:Ap,mobile:Ap}),j_=O.object({enabled:O.boolean(),position:rw,minimal:O.boolean(),containerElement:O.string(),hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string()}),RH=O.object({enabled:O.boolean(),position:rw,expanded:O.boolean(),minimal:O.boolean(),hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string(),containerElement:O.string()}),O9=O.object({showSidebar:O.boolean(),disableClose:O.boolean(),autoConnectLastWallet:O.boolean(),autoConnectAllPreviousWallet:O.boolean(),iDontHaveAWalletLink:O.string(),wheresMyWalletLink:O.string(),removeWhereIsMyWalletWarning:O.boolean(),removeIDontHaveAWalletInfoLink:O.boolean(),disableUDResolution:O.boolean()}),LH=O.object({accountCenter:O.string(),connectModal:O.string()}),BH=O.object({"--w3o-background-color":O.string(),"--w3o-font-family":O.string(),"--w3o-foreground-color":O.string(),"--w3o-text-color":O.string(),"--w3o-border-color":O.string(),"--w3o-action-color":O.string(),"--w3o-border-radius":O.string()}),NH=O.string().valid("default","dark","light","system"),R9=O.alternatives().try(BH,NH),MH=O.object({wallets:$9,chains:AH.required(),appMetadata:$H,i18n:O.object().unknown(),apiKey:O.string(),accountCenter:O.object({desktop:j_,mobile:j_,hideTransactionProtectionBtn:O.boolean(),transactionProtectionInfoLink:O.string()}),notify:[P9,Ap],gas:O.object({get:O.function().required(),stream:O.function().required()}),wagmi:O.function(),connect:O9,containerElements:LH,transactionPreview:O.any(),theme:R9,disableFontDownload:O.boolean(),unstoppableResolution:O.function()}),jH=O.object({autoSelect:O.alternatives().try(O.object({label:O.string().required(),disableModals:O.boolean()}),O.string())}),DH=O.object({label:O.string().required()}).required(),FH=O.object({address:O.string().required(),icon:O.string().optional()}),UH=O.object({chainId:Mv.required(),chainNamespace:jv,wallet:O.string(),rpcUrl:O.string(),label:O.string(),token:O.string(),protectedRpcUrl:O.string(),secondaryTokens:O.array().max(5).items(FH).optional()}),L9=O.object({key:O.string().required(),type:O.string().allow("pending","error","success","hint"),eventCode:O.string(),message:O.string().required(),id:O.string().required(),autoDismiss:O.number(),onClick:O.function(),link:O.string()}),HH=O.object({sendTransaction:O.function(),estimateGas:O.function(),gasPrice:O.function(),balance:O.alternatives(O.string(),O.number()),txDetails:O.object({value:O.alternatives(O.string(),O.number()),to:O.string(),from:O.string()}),txApproveReminderTimeout:O.number()}),zH=O.object({key:O.string(),type:O.string().allow("pending","error","success","hint"),eventCode:O.string(),message:O.string(),id:O.string(),autoDismiss:O.number(),onClick:O.function(),link:O.string()}),WH=O.object({id:O.string().required(),key:O.string().required(),type:O.string().allow("pending","error","success","hint").required(),eventCode:O.string().required(),message:O.string().required(),autoDismiss:O.number().required(),network:O.string().required(),startTime:O.number(),onClick:O.function(),link:O.string()}),VH=O.any().allow(L9,O.boolean().allow(!1));function iw(e){return Ot(A9,e)}function qH(e){return Ot(MH,e)}function GH(e){return Ot(jH,e)}function KH(e){return Ot(DH,e)}function B9(e,t){return Ot(O.string().required().label(t||"value"),e)}function N9(e){return Ot(UH,e)}function ZH(e){return Ot(RH,e)}function XH(e){return Ot(O9,e)}function YH(e){return Ot($9,e)}function QH(e){return Ot(OH,e)}function M9(e){return Ot(Ap,e)}function JH(e){return Ot(P9,e)}function ez(e){return Ot(VH,e)}function tz(e){return Ot(WH,e)}function nz(e){return Ot(HH,e)}function rz(e){return Ot(L9,e)}function D_(e){return Ot(zH,e)}function iz(e){return Ot(IH,e)}function oz(e){return Ot(R9,e)}function sz(e){return Ot(PH,e)}function az(e){const t={type:i9,payload:e.map(n=>{var{namespace:r="evm",id:i,rpcUrl:o}=n,s=_p(n,["namespace","id","rpcUrl"]);return Object.assign(Object.assign({},s),{namespace:r,id:i.toLowerCase(),rpcUrl:o?o.trim():null})})};an(t)}function j9(e){const{label:t,token:n,rpcUrl:r,id:i,namespace:o}=e,s=N9({label:t,token:n,rpcUrl:r,chainId:i,chainNamespace:o});if(s)throw s;an({type:o9,payload:e})}function dy(e){const t=iw(e);if(t)throw console.error(t),t;an({type:a9,payload:e})}function Du(e,t){const n=iw(t);if(n)throw console.error(n),n;const r={type:l9,payload:Object.assign({id:e},t)};an(r)}function lz(e){const t=B9(e,"wallet id");if(t)throw t;an({type:c9,payload:{id:e}})}function cz(e,t){const n=iw(e)||t&&B9(t,"address");if(n)throw n;if(t){const r=e.accounts.find(i=>i.address===t);r&&(e.accounts=[r,...e.accounts.filter(({address:i})=>i!==r.address)])}yz(e),dy(e)}function ku(e,t,n){const r={type:u9,payload:Object.assign({id:e,address:t},n)};an(r)}function D9(e){const t=ZH(e);if(t)throw t;an({type:f9,payload:e})}function uz(e){const t=XH(e);if(t)throw t;an({type:d9,payload:e})}function Ph(e){const t=M9(e);if(t)throw t;an({type:m9,payload:e})}function Ya(e){const t=tz(e);if(t)throw t;an({type:Hv,payload:e})}function lg(e){const t=rz(e);if(t)throw t;an({type:Hv,payload:e})}function fz(e){const t=D_(e);if(t)throw t;const n=`customNotification-${F7()}`,r=Object.assign(Object.assign({},e),{id:n,key:n});lg(r);const i=()=>{r.id&&F9(r.id)},o=s=>{const a=D_(e);if(a)throw a;const l=Object.assign(Object.assign({},s),{id:r.id,key:r.key});return lg(l),{dismiss:i,update:o}};return lg(r),{dismiss:i,update:o}}function F9(e){if(typeof e!="string")throw new Error("Notification id must be of type string");an({type:g9,payload:e})}function dz(){an({type:s9})}function U9(e){const t=YH(e);if(t)throw t;const n=mz(e),r=gz(n);an({type:h9,payload:r})}function hz(e){const t=QH(e);if(t)throw t;an({type:p9,payload:e})}function pz(e){const t=iz(e);if(t)throw t;an({type:y9,payload:e})}function mz(e){const{device:t}=fn;return t?e.reduce((n,r)=>{const i=r({device:t});return i&&n.push(...Array.isArray(i)?i:[i]),n},[]):[]}function gz(e){return e.filter((t,n)=>t&&e.findIndex(r=>r&&r.label===t.label)===n)}function H9(e){const t=oz(e);if(t)throw t;const n=bH(e);n&&Su(n)}function z9(e){const t=sz(e);if(t)throw t;an({type:b9,payload:e})}function W9(e){an({type:v9,payload:e})}function yz(e){const{wagmi:t}=fn;if(t)try{const{label:n}=e,{wagmiConnect:r,getWagmiConnector:i}=t,o=xe.get().wagmiConfig,s=i(n);r(o,{connector:s}).then(()=>{Du(n,{wagmiConnector:s})})}catch(n){console.error(`Error updating Wagmi connector on primary wallet switch ${n}`)}}async function bz(e){if(e){const i=GH(e);if(i)throw i}const{chains:t}=xe.get();if(!t.length)throw new Error("At least one chain must be set before attempting to connect a wallet");let{autoSelect:n}=e||{};n||(n={label:"",disableModals:!1}),n&&(typeof n=="string"||n.label)&&await WU(50),xe.get().walletModules.length||U9(fn.initialWalletInit),jr.next({autoSelect:typeof n=="string"?{label:n,disableModals:!1}:n,inProgress:!0});const r=jr.pipe(Xl(({inProgress:i,actionRequired:o})=>i===!1&&!o),h7(nw),$v(1));return Lf(r)}var vz={selectingWallet:{header:"Available Wallets",sidebar:{heading:"",subheading:"Connect your wallet",paragraph:"Connecting your wallet is like “logging in” to Web3. Select your wallet from the options to get started.",IDontHaveAWallet:"I don't have a wallet"},recommendedWalletsPart1:"{app} only supports",recommendedWalletsPart2:"on this platform. Please use or install one of the supported wallets to continue",installWallet:"You do not have any wallets installed that {app} supports, please use a supported wallet",agreement:{agree:"I agree to the",terms:"Terms & Conditions",and:"and",privacy:"Privacy Policy"},whyDontISeeMyWallet:"Why don't I see my wallet?",learnMore:"Click here to learn more"},connectingWallet:{header:"{connectionRejected, select, false {Connecting to {wallet}...} other {Connection Rejected}}",sidebar:{subheading:"Approve Connection",paragraph:"Please approve the connection in your wallet and authorize access to continue."},mainText:"Connecting...",paragraph:"Make sure to select all accounts that you want to grant access to.",previousConnection:"{wallet} already has a pending connection request, please open the {wallet} app to login and connect.",rejectedText:"Connection Rejected!",rejectedCTA:"Click here to try again",primaryButton:"Back to wallets"},connectedWallet:{header:"Connection Successful",sidebar:{subheading:"Connection Successful!",paragraph:"Your wallet is now connected to {app}"},mainText:"Connected"}},wz={actionRequired:{heading:"Action required in {wallet}",paragraph:"Please switch the active account in your wallet.",linkText:"Learn more.",buttonText:"Okay"},switchChain:{heading:"Switch Chain",paragraph1:"{app} requires that you switch your wallet to the {nextNetworkName} network to continue.",paragraph2:"*Some wallets may not support changing networks. If you can not change networks in your wallet you may consider switching to a different wallet."},confirmDisconnectAll:{heading:"Disconnect all Wallets",description:"Are you sure that you would like to disconnect all your wallets?",confirm:"Confirm",cancel:"Cancel"},confirmTransactionProtection:{heading:"Enable Transaction Protection",description:"Protect RPC endpoints hide your transaction from front-running and sandwich bots.",link:"Learn more",enable:"Enable",dismiss:"Dismiss"}},_z={connectAnotherWallet:"Connect another Wallet",disconnectAllWallets:"Disconnect all Wallets",currentNetwork:"Current Network",enableTransactionProtection:"Enable Transaction Protection",appInfo:"App Info",learnMore:"Learn More",gettingStartedGuide:"Getting Started Guide",smartContracts:"Smart Contract(s)",explore:"Explore",poweredBy:"powered by",addAccount:"Add Account",setPrimaryAccount:"Set Primary Account",disconnectWallet:"Disconnect Wallet",copyAddress:"Copy Wallet address"},xz={transaction:{txRequest:"Your transaction is waiting for you to confirm",nsfFail:"You have insufficient funds for this transaction",txUnderpriced:"The gas price for your transaction is too low, try a higher gas price",txRepeat:"This could be a repeat transaction",txAwaitingApproval:"You have a previous transaction waiting for you to confirm",txConfirmReminder:"Please confirm your transaction to continue",txSendFail:"You rejected the transaction",txSent:"Your transaction has been sent to the network",txStallPending:"Your transaction has stalled before it was sent, please try again",txStuck:"Your transaction is stuck due to a nonce gap",txPool:"Your transaction has started",txStallConfirmed:"Your transaction has stalled and hasn't been confirmed",txSpeedUp:"Your transaction has been sped up",txCancel:"Your transaction is being canceled",txFailed:"Your transaction has failed",txConfirmed:"Your transaction has succeeded",txError:"Oops something went wrong, please try again",txReplaceError:"There was an error replacing your transaction, please try again"},watched:{txPool:"Your account is {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txSpeedUp:"Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been sped up",txCancel:"Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been canceled",txConfirmed:"Your account successfully {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txFailed:"Your account failed to {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",txStuck:"Your transaction is stuck due to a nonce gap"},time:{minutes:"min",seconds:"sec"}},Re={connect:vz,modals:wz,accountCenter:_z,notify:xz};const cg={};async function Ez(e){if(!e)return null;if(!cg[e.rpcUrl]){const t=await HU(e.id);if(!t)return null;const{createPublicClient:n,http:r}=await ue(async()=>{const{createPublicClient:o,http:s}=await import("./index-CV4p6XM9.js");return{createPublicClient:o,http:s}},[]),i=n({chain:t,transport:r()});cg[e.rpcUrl]=i}return cg[e.rpcUrl]}function V9(e){const t={method:"eth_requestAccounts"};return e.request(t)}function dZ(e){const t={method:"eth_selectAccounts"};return e.request(t)}function q9(e){return e.request({method:"eth_chainId"})}function G9(e){const{provider:t,disconnected$:n}=e;return f7(o=>{t.on("accountsChanged",o)},o=>{t.removeListener("accountsChanged",o)}).pipe(Bf(n))}function Sz(e){const{provider:t,disconnected$:n}=e;return f7(o=>{t.on("chainChanged",o)},o=>{t.removeListener("chainChanged",o)}).pipe(Bf(n))}function kz(e,t){const n=tw.pipe(Xl(o=>o===t),Iv(1)),r=G9({provider:e,disconnected$:n}).pipe(J1());r.subscribe(async([o])=>{var s;try{await Az(t)}catch(f){console.warn("Web3Onboard: Error whilst trying to sync connected accounts:",f)}if(!o){ow({label:t});return}const{wallets:a}=xe.get(),l=a.find(f=>f.label===t),u=l?l.accounts:[],[[d],c]=cU(u,f=>f.address===o);if(Du(t,{accounts:[d||{address:o,ens:null,uns:null,balance:null},...c]}),xe.get().notify.enabled&&!d){const f=await $p();if(f){const m=xe.get().wallets.find(p=>p.label===t);try{m&&f.subscribe({id:o,chainId:(s=m.chains[0])===null||s===void 0?void 0:s.id,type:"account"})}catch{}}}}),r.pipe(r_(async([o])=>{if(!o)return;const{wallets:s,chains:a}=xe.get(),l=s.find(v=>v.label===t);if(!l)return;const{chains:u,accounts:d}=l,[c]=u,f=a.find(({namespace:v,id:w})=>v==="evm"&&w===c.id);if(!f)return;const m=Tp(o,f),p=Ip(o,f),h=d.find(v=>v.address===o),y=a.find(({id:v})=>v===xp(c.id)),g=h&&h.ens?Promise.resolve(h.ens):y?hy(o,y):Promise.resolve(null),b=h&&h.uns?Promise.resolve(h.uns):y?py(o,y):Promise.resolve(null);return Promise.all([Promise.resolve(o),m,g,b,p])})).subscribe(o=>{if(!o)return;const[s,a,l,u,d]=o;ku(t,s,{balance:a,ens:l,uns:u,secondaryTokens:d})});const i=Sz({provider:e,disconnected$:n}).pipe(J1());i.subscribe(async o=>{const{wallets:s}=xe.get(),a=s.find(f=>f.label===t);if(!a)return;const{chains:l,accounts:u}=a,[d]=l;if(cy(o)||(o=S_(o)),o===d.id)return;if(xe.get().notify.enabled){const f=await $p();if(f){const m=xe.get().wallets.find(p=>p.label===t);if(!m)return;m.accounts.forEach(({address:p})=>{f.unsubscribe({id:p,chainId:m.chains[0].id,timeout:6e4})}),m.accounts.forEach(({address:p})=>{try{f.subscribe({id:p,chainId:o,type:"account"})}catch{}})}}const c=u.map(({address:f})=>({address:f,ens:null,uns:null,balance:null}));Du(t,{chains:[{namespace:"evm",id:o}],accounts:c})}),i.pipe(r_(async o=>{const{wallets:s,chains:a}=xe.get(),l=s.find(c=>c.label===t),u=(l==null?void 0:l.accounts)||[];cy(o)||(o=S_(o));const d=a.find(({namespace:c,id:f})=>c==="evm"&&f===o);return d?Promise.all(u.map(async({address:c})=>{const f=Tp(c,d),m=Ip(c,d),p=a.find(({id:E})=>E===xp(o)),h=p?hy(c,p):Promise.resolve(null),y=p?py(c,p):Promise.resolve(null),[g,b,v,w]=await Promise.all([f,h,y,m]);return{address:c,balance:g,ens:b,uns:v,secondaryTokens:w}})):Promise.resolve(null)})).subscribe(o=>{o&&Du(t,{accounts:o})}),n.subscribe(()=>{e.disconnect&&e.disconnect()})}async function hy(e,t){if(!t)return null;const n=await Ez(t);if(!n)return null;try{const r=await n.getEnsName({address:e});let i=null;if(r){const{labelhash:o,normalize:s}=await ue(async()=>{const{labelhash:f,normalize:m}=await import("./index-021f6a62-BcF70HI7.js").then(p=>p.y);return{labelhash:f,normalize:m}},[]).then(function(f){return f.i}),a=s(r),l=await n.getEnsResolver({name:a}),u=await n.getEnsAvatar({name:a}),d=o(a);i={name:r,avatar:u,contentHash:d,ensResolver:l,getText:async f=>await n.getEnsText({name:r,key:f})}}return i}catch(r){return console.error(r),null}}async function py(e,t){const{unstoppableResolution:n}=fn;if(!n||!K7()||!t)return null;try{return await n(e)}catch(r){return console.error(r),null}}async function Tp(e,t){if(!t)return null;const{wallets:n}=xe.get();try{const r=n.find(s=>!!s.provider);if(!r)return null;const o=await r.provider.request({method:"eth_getBalance",params:[e,"latest"]});return o?{[t.token||"eth"]:rU(o)}:null}catch(r){return console.error(r),null}}function F0(e,t){return e.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}function K9(e,t){return e.request({method:"wallet_addEthereumChain",params:[{chainId:t.id,chainName:t.label,nativeCurrency:{name:t.label,symbol:t.token,decimals:18},rpcUrls:[t.publicRpcUrl||t.rpcUrl],blockExplorerUrls:t.blockExplorerUrl?[t.blockExplorerUrl]:null}]})}function hZ(e,t,n){return e.request({method:"wallet_addEthereumChain",params:[{chainId:t.id,chainName:t.label,nativeCurrency:{name:t.label,symbol:t.token,decimals:18},rpcUrls:[n],blockExplorerUrls:t.blockExplorerUrl?[t.blockExplorerUrl]:void 0}]})}async function Cz(e){try{const t=await e.request({method:"wallet_getPermissions"});return Array.isArray(t)?t:[]}catch{return[]}}async function Az(e){const t=xe.get().wallets.find(i=>i.label===e);if(!t)return;const r=(await Cz(t.provider)).find(({parentCapability:i})=>i==="eth_accounts");if(r){const{value:i}=r.caveats.find(({type:o})=>o==="restrictReturnedAccounts")||{value:null};if(i){const o=t.accounts.filter(({address:s})=>i.includes(s));Du(t.label,Object.assign(Object.assign({},t),{accounts:o}))}}}const Tz=async(e,t)=>{try{const{id:n}=t;return await K9(e,t),await F0(e,n),n}catch{return}},Iz=()=>({addOrSwitchChain:Tz,getChainId:q9,requestAccounts:V9,switchChain:F0});async function Z9(e){const{wallets:t,chains:n}=xe.get(),r=await Promise.all(t.map(async i=>{const o=n.find(({id:a})=>a===i.chains[0].id);if(!o)return;const s=await Promise.all(i.accounts.map(async a=>{const l=await Ip(a.address,o);if(!e||e.some(u=>u.toLowerCase()===a.address.toLowerCase())){const u=await Tp(a.address,o);return Object.assign(Object.assign({},a),{balance:u,secondaryTokens:l})}return Object.assign(Object.assign({},a),{secondaryTokens:l})}));return Object.assign(Object.assign({},i),{accounts:s})}));pz(r)}const Ip=async(e,t)=>{if(!t)return[];const n=t.rpcUrl;return!t.secondaryTokens||!t.secondaryTokens.length||!n?[]:await Promise.all(t.secondaryTokens.map(async i=>{try{const{createPublicClient:o,http:s}=await ue(async()=>{const{createPublicClient:p,http:h}=await import("./index-CV4p6XM9.js");return{createPublicClient:p,http:h}},[]),a=await oU(t),l=o({chain:a,transport:s(t.providerConnectionInfo&&t.providerConnectionInfo.url?t.providerConnectionInfo.url:n)}),u={abi:[{inputs:[{name:"owner",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],stateMutability:"view",type:"function"}],address:i.address},d=l.readContract(Object.assign(Object.assign({},u),{functionName:"balanceOf",args:[e]}))||"",c=l.readContract(Object.assign(Object.assign({},u),{functionName:"symbol",args:[]}))||"",[f,m]=await Promise.all([d,c]);return{name:m,balance:Z7(f.toString()),icon:i.icon}}catch(o){console.error(`There was an error fetching balance and/or symbol + for token contract: ${i.address} - ${o}`)}}))};function $z(e){const t=xe.get().notify.transactionHandler(e),n=ez(t);if(n)throw n;if(e.eventCode==="txConfirmed"){const i=[e.watchedAddress,e.counterparty].filter(Boolean);Z9(i)}const r=Pz(e,t);Ya(r),yH(e)}function Pz(e,t){const{id:n,hash:r,startTime:i,eventCode:o,direction:s,counterparty:a,value:l,asset:u,network:d}=e,c=X9(o),f=`${n||r}-${typeof t=="object"&&t.eventCode||o}`,m=a&&a.substring(0,4)+"..."+a.substring(a.length-4),p=Z7(l),h=a&&l?{messageId:`notify.watched['${o}']`,values:{verb:o==="txConfirmed"?s==="incoming"?"received":"sent":s==="incoming"?"receiving":"sending",formattedValue:p,preposition:s==="incoming"?"from":"to",counterpartyShortened:m,asset:u}}:{messageId:`notify.transaction['${o}']`,values:{formattedValue:p,asset:u}},y=Vj(xi),w=Re.notify[a?"watched":"transaction"][o],E=y(h.messageId,{values:h.values,default:w});let C={id:n||r,type:c,key:f,network:d,startTime:i||Date.now(),eventCode:o,message:E,autoDismiss:Oz(typeof t=="object"&&t.type||c)};return typeof t=="object"&&(C=Object.assign(Object.assign({},C),t)),C}function X9(e){switch(e){case"txSent":case"txPool":return"pending";case"txSpeedUp":case"txCancel":case"txRequest":case"txRepeat":case"txAwaitingApproval":case"txConfirmReminder":case"txStuck":return"hint";case"txError":case"txSendFail":case"txFailed":case"txDropped":case"nsfFail":case"txUnderpriced":return"error";case"txConfirmed":return"success";default:return"hint"}}function Oz(e){switch(e){case"success":case"hint":return 4e3;default:return 0}}let oh;async function $p(){var e;const{apiKey:t}=fn;if(!t)return null;if(!oh){const{default:n}=await ue(async()=>{const{default:r}=await import("./index-9rPnx63E.js");return{default:r}},[]);oh=n.multichain({apiKey:(e=fn.apiKey)!==null&&e!==void 0?e:""}),oh.transactions$.subscribe($z)}return oh}async function ow(e){const t=KH(e);if(t)throw t;const{label:n}=e;if(xe.get().notify.enabled){const o=await $p();if(o){const s=xe.get().wallets.find(a=>a.label===n);s&&s.accounts.forEach(({address:a})=>{o.unsubscribe({id:a,chainId:s.chains[0].id,timeout:6e4})})}}const{wagmi:r}=fn;if(r){const o=await r.wagmiDisconnectWallet(n);o&&W9(o)}tw.next(n),lz(n);const i=B0(gi.LAST_CONNECTED_WALLET);if(i)try{const o=JSON.parse(i);Array.isArray(o)&&o.indexOf(n)>=0&&N0(gi.LAST_CONNECTED_WALLET,JSON.stringify(o.filter(s=>s!==n))),typeof o=="string"&&o===n&&r9(gi.LAST_CONNECTED_WALLET)}catch(o){console.error(`There was an error disconnecting the last connected wallet from localStorage - Error: ${o}`)}return xe.get().wallets}async function Rz(e){const t=N9(e);if(t)throw t;const{wallets:n,chains:r}=xe.get(),{chainId:i,chainNamespace:o="evm",wallet:s,rpcUrl:a,label:l,token:u}=e,d=n9(i),c=r.find(({namespace:p,id:h})=>p===o&&h.toLowerCase()===d.toLowerCase());if(!c)throw new Error(`Chain with chainId: ${i} and chainNamespace: ${o} has not been set and must be added when Onboard is initialized.`);const f=s?n.find(({label:p})=>p===s):n[0];if(!f)throw new Error(s?`Wallet with label ${s} is not connected`:"A wallet must be connected before a chain can be set");const[m]=f.chains;if(m.namespace===o&&m.id===d)return!0;try{return await F0(f.provider,d),!0}catch(p){const{code:h}=p,y=nc.pipe(Xl(g=>g===null),md(()=>!1));if(h===is.CHAIN_NOT_ADDED||h===is.UNRECOGNIZED_CHAIN_ID)return(a||l||u)&&(a&&(c.rpcUrl=a),l&&(c.label=l),u&&(c.token=u),j9(c)),Lz(f,c,y,d);if(h===is.UNSUPPORTED_METHOD)return nc.next({chain:c}),Lf(y)}return!1}const Lz=async(e,t,n,r)=>{try{return await K9(e.provider,t),await F0(e.provider,r),!0}catch(i){const{code:o}=i;return o===is.ACCOUNT_ACCESS_REJECTED?!1:(nc.next({chain:t}),Lf(n))}};function Bz(e){if(e){const{en:t}=e,n=EU(Re,t||{});Ah("en",n),Object.keys(e).filter(i=>i!=="en").forEach(i=>{const o=e[i];o&&Ah(i,o)})}else Ah("en",Re);fF({fallbackLocale:"en",initialLocale:wF()})}var Nz=` -`;function Mz(e){Vt(e,"svelte-1ubf722",".close-button.svelte-1ubf722.svelte-1ubf722{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;height:2rem;width:2rem;border-radius:2rem;cursor:pointer;color:var(--onboard-close-button-color, inherit)}.close-button.svelte-1ubf722.svelte-1ubf722:hover::before{opacity:0.2}.close-button.svelte-1ubf722:hover .svg-box.svelte-1ubf722{opacity:1}.close-button.svelte-1ubf722.svelte-1ubf722::before{content:'';position:absolute;height:inherit;width:inherit;opacity:0.1;background:currentColor;transition:300ms ease-in-out opacity}.svg-box.svelte-1ubf722.svelte-1ubf722{position:absolute;height:1.5rem;width:1.5rem;opacity:0.6;transition:300ms ease-in-out opacity}")}function jz(e){let t,n;return{c(){t=K("div"),n=K("div"),U(n,"class","svg-box svelte-1ubf722"),U(t,"class","close-button svelte-1ubf722")},m(r,i){oe(r,t,i),H(t,n),n.innerHTML=Nz},p:ee,i:ee,o:ee,d(r){r&&re(t)}}}class Y9 extends Gt{constructor(t){super(),qt(this,t,null,jz,Wt,{},Mz)}}function Q9(e){const t=e-1;return t*t*t+1}function pZ(e){return Math.pow(e-1,3)*(1-e)+1}function Pp(e,{delay:t=0,duration:n=400,easing:r=bd}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:o=>`opacity: ${o*i}`}}function mZ(e,{delay:t=0,duration:n=400,easing:r=Q9,x:i=0,y:o=0,opacity:s=0}={}){const a=getComputedStyle(e),l=+a.opacity,u=a.transform==="none"?"":a.transform,d=l*(1-s),[c,f]=R_(i),[m,p]=R_(o);return{delay:t,duration:n,easing:r,css:(h,y)=>` +`;function Mz(e){Vt(e,"svelte-1ubf722",".close-button.svelte-1ubf722.svelte-1ubf722{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;height:2rem;width:2rem;border-radius:2rem;cursor:pointer;color:var(--onboard-close-button-color, inherit)}.close-button.svelte-1ubf722.svelte-1ubf722:hover::before{opacity:0.2}.close-button.svelte-1ubf722:hover .svg-box.svelte-1ubf722{opacity:1}.close-button.svelte-1ubf722.svelte-1ubf722::before{content:'';position:absolute;height:inherit;width:inherit;opacity:0.1;background:currentColor;transition:300ms ease-in-out opacity}.svg-box.svelte-1ubf722.svelte-1ubf722{position:absolute;height:1.5rem;width:1.5rem;opacity:0.6;transition:300ms ease-in-out opacity}")}function jz(e){let t,n;return{c(){t=K("div"),n=K("div"),U(n,"class","svg-box svelte-1ubf722"),U(t,"class","close-button svelte-1ubf722")},m(r,i){oe(r,t,i),H(t,n),n.innerHTML=Nz},p:ee,i:ee,o:ee,d(r){r&&re(t)}}}class Y9 extends Gt{constructor(t){super(),qt(this,t,null,jz,Wt,{},Mz)}}function Q9(e){const t=e-1;return t*t*t+1}function pZ(e){return Math.pow(e-1,3)*(1-e)+1}function Pp(e,{delay:t=0,duration:n=400,easing:r=bd}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:o=>`opacity: ${o*i}`}}function mZ(e,{delay:t=0,duration:n=400,easing:r=Q9,x:i=0,y:o=0,opacity:s=0}={}){const a=getComputedStyle(e),l=+a.opacity,u=a.transform==="none"?"":a.transform,d=l*(1-s),[c,f]=L_(i),[m,p]=L_(o);return{delay:t,duration:n,easing:r,css:(h,y)=>` transform: ${u} translate(${(1-h)*c}${f}, ${(1-h)*m}${p}); opacity: ${l-d*y}`}}function Dz(e,{delay:t=0,duration:n=400,easing:r=Q9,axis:i="y"}={}){const o=getComputedStyle(e),s=+o.opacity,a=i==="y"?"height":"width",l=parseFloat(o[a]),u=i==="y"?["top","bottom"]:["left","right"],d=u.map(g=>`${g[0].toUpperCase()}${g.slice(1)}`),c=parseFloat(o[`padding${d[0]}`]),f=parseFloat(o[`padding${d[1]}`]),m=parseFloat(o[`margin${d[0]}`]),p=parseFloat(o[`margin${d[1]}`]),h=parseFloat(o[`border${d[0]}Width`]),y=parseFloat(o[`border${d[1]}Width`]);return{delay:t,duration:n,easing:r,css:g=>`overflow: hidden;opacity: ${Math.min(g*20,1)*s};${a}: ${g*l}px;padding-${u[0]}: ${g*c}px;padding-${u[1]}: ${g*f}px;margin-${u[0]}: ${g*m}px;margin-${u[1]}: ${g*p}px;border-${u[0]}-width: ${g*h}px;border-${u[1]}-width: ${g*y}px;`}}function Fz(e){Vt(e,"svelte-7ee2g7",`section.svelte-7ee2g7{top:0;left:0;pointer-events:none;z-index:var(--onboard-modal-z-index, var(--modal-z-index))}.background.svelte-7ee2g7{background:var(--onboard-modal-backdrop, var(--modal-backdrop));pointer-events:all}.full-screen-background.svelte-7ee2g7{width:100vw;height:100vh;height:100dvh}.max-height.svelte-7ee2g7{max-height:calc(100vh - 2rem)}.modal-position.svelte-7ee2g7{top:var(--onboard-modal-top, var(--modal-top));bottom:var(--onboard-modal-bottom, var(--modal-bottom));left:var(--onboard-modal-left, var(--modal-left));right:var(--onboard-modal-right, var(--modal-right))}.modal-overflow.svelte-7ee2g7{overflow:hidden}.modal-styling.svelte-7ee2g7{--border-radius:var( --onboard-modal-border-radius, var(--w3o-border-radius, 1rem) - );border-radius:var(--border-radius) var(--border-radius) 0 0;box-shadow:var(--onboard-modal-box-shadow, var(--box-shadow-0));max-width:100vw}.modal.svelte-7ee2g7{overflow-y:auto;background:var(--onboard-modal-background, white);color:var(--onboard-modal-color, initial)}.width-100.svelte-7ee2g7{width:100%}.modal-container-mobile.svelte-7ee2g7{bottom:0}@media all and (min-width: 768px){.modal-styling.svelte-7ee2g7{border-radius:var(--border-radius)}.modal-container-mobile.svelte-7ee2g7{bottom:unset;margin:1rem}.width-100.svelte-7ee2g7{width:unset}}`)}function Uz(e){let t,n,r,i,o,s,a,l,u,d;const c=e[3].default,f=Hv(c,e,e[2],null);return{c(){t=K("section"),n=K("div"),r=K("div"),i=K("div"),o=K("div"),s=K("div"),f&&f.c(),U(s,"class","modal relative svelte-7ee2g7"),U(o,"class","modal-overflow modal-styling relative flex justify-center svelte-7ee2g7"),U(o,"style",`${e[1]?"max-width: 100%;":""}`),U(i,"class","flex relative max-height svelte-7ee2g7"),ye(i,"width-100",e[1]),U(r,"class","modal-container-mobile modal-position flex svelte-7ee2g7"),ye(r,"absolute",!e[1]),ye(r,"width-100",e[1]),U(n,"class","background flex items-center justify-center relative svelte-7ee2g7"),ye(n,"full-screen-background",!e[1]),U(t,"class","svelte-7ee2g7"),ye(t,"fixed",!e[1])},m(m,p){oe(m,t,p),H(t,n),H(n,r),H(r,i),H(i,o),H(o,s),f&&f.m(s,null),l=!0,u||(d=[qn(i,"click",eH(e[4])),qn(n,"click",function(){Es(e[0])&&e[0].apply(this,arguments)})],u=!0)},p(m,[p]){e=m,f&&f.p&&(!l||p&4)&&Wv(f,c,e,e[2],l?zv(c,e[2],p,null):Vv(e[2]),null)},i(m){l||(X(f,m),Rn(()=>{l&&(a||(a=L_(t,Pp,{},!0)),a.run(1))}),l=!0)},o(m){ie(f,m),a||(a=L_(t,Pp,{},!1)),a.run(0),l=!1},d(m){m&&re(t),f&&f.d(m),m&&a&&a.end(),u=!1,Ei(d)}}}function Hz(e,t,n){let{$$slots:r={},$$scope:i}=t;const o=!!fn.containerElements.connectModal,s=document.documentElement;aH(()=>{o||(s.style.position="sticky",s.style.overflow="hidden")}),C9(()=>{o||(s.style.position="",s.style.removeProperty("overflow"))});let{close:a}=t;function l(u){lH.call(this,e,u)}return e.$$set=u=>{"close"in u&&n(0,a=u.close),"$$scope"in u&&n(2,i=u.$$scope)},[a,o,i,r,l]}class ow extends Gt{constructor(t){super(),qt(this,t,Hz,Uz,Wt,{close:0},Fz)}}function zz(e){Vt(e,"svelte-tz7ru1",".container.svelte-tz7ru1{padding:var(--onboard-spacing-4, var(--spacing-4));font-size:var(--onboard-font-size-6, var(--font-size-6));line-height:24px}input.svelte-tz7ru1{height:1rem;width:1rem;margin-right:0.5rem}")}function Wz(e){let t,n,r,i,o,s=e[1]("connect.selectingWallet.agreement.agree")+"",a,l,u=" ",d,c,f,m,p,h=e[3]&&Vz(e),y=e[4]&&qz(e);return{c(){t=K("div"),n=K("label"),r=K("input"),i=ve(),o=K("span"),a=He(s),l=ve(),d=He(u),c=ve(),h&&h.c(),f=ve(),y&&y.c(),U(r,"class"," svelte-tz7ru1"),U(r,"type","checkbox"),U(n,"class","flex"),U(t,"class","container flex items-center svelte-tz7ru1")},m(g,b){oe(g,t,b),H(t,n),H(n,r),r.checked=e[0],H(n,i),H(n,o),H(o,a),H(o,l),H(o,d),H(o,c),h&&h.m(o,null),H(o,f),y&&y.m(o,null),m||(p=qn(r,"change",e[6]),m=!0)},p(g,b){b&1&&(r.checked=g[0]),b&2&&s!==(s=g[1]("connect.selectingWallet.agreement.agree")+"")&&tt(a,s),g[3]&&h.p(g,b),g[4]&&y.p(g,b)},d(g){g&&re(t),h&&h.d(),y&&y.d(),m=!1,p()}}}function Vz(e){let t,n=e[1]("connect.selectingWallet.agreement.terms")+"",r,i=e[4]?" "+e[1]("connect.selectingWallet.agreement.and")+" ":".",o;return{c(){t=K("a"),r=He(n),o=He(i),U(t,"href",e[3]),U(t,"target","_blank")},m(s,a){oe(s,t,a),H(t,r),oe(s,o,a)},p(s,a){a&2&&n!==(n=s[1]("connect.selectingWallet.agreement.terms")+"")&&tt(r,n),a&2&&i!==(i=s[4]?" "+s[1]("connect.selectingWallet.agreement.and")+" ":".")&&tt(o,i)},d(s){s&&re(t),s&&re(o)}}}function qz(e){let t,n=e[1]("connect.selectingWallet.agreement.privacy")+"",r,i;return{c(){t=K("a"),r=He(n),i=He("."),U(t,"href",e[4]),U(t,"target","_blank")},m(o,s){oe(o,t,s),H(t,r),oe(o,i,s)},p(o,s){s&2&&n!==(n=o[1]("connect.selectingWallet.agreement.privacy")+"")&&tt(r,n)},d(o){o&&re(t),o&&re(i)}}}function Gz(e){let t,n=e[5]&&Wz(e);return{c(){n&&n.c(),t=ct()},m(r,i){n&&n.m(r,i),oe(r,t,i)},p(r,[i]){r[5]&&n.p(r,i)},i:ee,o:ee,d(r){n&&n.d(r),r&&re(t)}}}function Kz(e,t,n){let r,i;wt(e,xi,y=>n(1,i=y));let{agreed:o}=t;const{terms:s,privacy:a,version:l}=JSON.parse(B0(gi.TERMS_AGREEMENT)||"{}"),u={termsUrl:"",privacyUrl:"",version:""},d=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));wt(e,d,y=>n(7,r=y));const{termsUrl:c,privacyUrl:f,version:m}=r&&r.agreement||u,p=!!(c&&!s||f&&!a||m&&m!==l);o=!p;function h(){o=this.checked,n(0,o)}return e.$$set=y=>{"agreed"in y&&n(0,o=y.agreed)},e.$$.update=()=>{e.$$.dirty&1&&(o?N0(gi.TERMS_AGREEMENT,JSON.stringify({version:m,terms:!!c,privacy:!!f})):o===!1&&r9(gi.TERMS_AGREEMENT))},[o,i,d,c,f,p,h]}class Zz extends Gt{constructor(t){super(),qt(this,t,Kz,Gz,Wt,{agreed:0},zz)}}function Xz(e){Vt(e,"svelte-2btye1",".icon.svelte-2btye1{color:var(--onboard-white, var(--white));border-radius:50px;bottom:-0.25rem;right:-0.25rem}.yellow.svelte-2btye1{background:var(--onboard-warning-500, var(--warning-500))}")}function Yz(e){let t,n,r;return{c(){t=K("div"),U(t,"class",n=O_(`${e[2]} icon flex absolute`)+" svelte-2btye1"),U(t,"style",r=`width: ${e[0]}px; height: ${e[0]}px; padding: ${e[0]/6}px;`),ye(t,"yellow",e[1]==="yellow")},m(i,o){oe(i,t,o),t.innerHTML=NU},p(i,[o]){o&4&&n!==(n=O_(`${i[2]} icon flex absolute`)+" svelte-2btye1")&&U(t,"class",n),o&1&&r!==(r=`width: ${i[0]}px; height: ${i[0]}px; padding: ${i[0]/6}px;`)&&U(t,"style",r),o&6&&ye(t,"yellow",i[1]==="yellow")},i:ee,o:ee,d(i){i&&re(t)}}}function Qz(e,t,n){let{size:r}=t,{color:i="yellow"}=t,{class:o="test"}=t;return e.$$set=s=>{"size"in s&&n(0,r=s.size),"color"in s&&n(1,i=s.color),"class"in s&&n(2,o=s.class)},[r,i,o]}class Jz extends Gt{constructor(t){super(),qt(this,t,Qz,Yz,Wt,{size:0,color:1,class:2},Xz)}}function eW(e){Vt(e,"svelte-1bikw7k",".icon.svelte-1bikw7k{color:var(--onboard-white, var(--white));border-radius:50px}.green.svelte-1bikw7k{background:var(--onboard-success-600, var(--success-600))}.blue.svelte-1bikw7k{background:var(--onboard-primary-1, var(--primary-1))}")}function tW(e){let t,n;return{c(){t=K("div"),U(t,"class","icon flex svelte-1bikw7k"),U(t,"style",n=`width: ${e[0]}px; height: ${e[0]}px; padding: ${e[0]/5}px;`),ye(t,"green",e[1]==="green"),ye(t,"blue",e[1]==="blue")},m(r,i){oe(r,t,i),t.innerHTML=t9},p(r,[i]){i&1&&n!==(n=`width: ${r[0]}px; height: ${r[0]}px; padding: ${r[0]/5}px;`)&&U(t,"style",n),i&2&&ye(t,"green",r[1]==="green"),i&2&&ye(t,"blue",r[1]==="blue")},i:ee,o:ee,d(r){r&&re(t)}}}function nW(e,t,n){let{size:r}=t,{color:i="green"}=t;return e.$$set=o=>{"size"in o&&n(0,r=o.size),"color"in o&&n(1,i=o.color)},[r,i]}class J9 extends Gt{constructor(t){super(),qt(this,t,nW,tW,Wt,{size:0,color:1},eW)}}function rW(e){Vt(e,"svelte-1le5672",".loading-container.svelte-1le5672.svelte-1le5672{font-family:inherit;font-size:inherit;color:inherit}span.svelte-1le5672.svelte-1le5672{font-family:inherit;font-size:0.889em;margin-top:1rem}.loading.svelte-1le5672.svelte-1le5672{display:inline-block}.loading.svelte-1le5672 div.svelte-1le5672{font-size:inherit;display:block;position:absolute;border:3px solid;border-radius:50%;animation:svelte-1le5672-bn-loading 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;border-color:currentColor transparent transparent transparent}.loading.svelte-1le5672 .loading-first.svelte-1le5672{animation-delay:-0.45s}.loading.svelte-1le5672 .loading-second.svelte-1le5672{animation-delay:-0.3s}.loading.svelte-1le5672 .loading-third.svelte-1le5672{animation-delay:-0.15s}@keyframes svelte-1le5672-bn-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}")}function D_(e){let t,n;return{c(){t=K("span"),n=He(e[0]),U(t,"class","svelte-1le5672")},m(r,i){oe(r,t,i),H(t,n)},p(r,i){i&1&&tt(n,r[0])},d(r){r&&re(t)}}}function iW(e){let t,n,r,i,o,s,a,l,u,d,c,f,m=e[0]&&D_(e);return{c(){t=K("div"),n=K("div"),r=K("div"),o=ve(),s=K("div"),l=ve(),u=K("div"),f=ve(),m&&m.c(),U(r,"class","loading-first svelte-1le5672"),U(r,"style",i=`height: ${e[1]}; width: ${e[1]};`),U(s,"class","loading-second svelte-1le5672"),U(s,"style",a=`height: ${e[1]}; width: ${e[1]};`),U(u,"class","loading-third svelte-1le5672"),U(u,"style",d=`height: ${e[1]}; width: ${e[1]};`),U(n,"class","loading relative svelte-1le5672"),U(n,"style",c=`height: ${e[1]}; width: ${e[1]};`),U(t,"class","loading-container flex flex-column justify-center items-center absolute svelte-1le5672")},m(p,h){oe(p,t,h),H(t,n),H(n,r),H(n,o),H(n,s),H(n,l),H(n,u),H(t,f),m&&m.m(t,null)},p(p,[h]){h&2&&i!==(i=`height: ${p[1]}; width: ${p[1]};`)&&U(r,"style",i),h&2&&a!==(a=`height: ${p[1]}; width: ${p[1]};`)&&U(s,"style",a),h&2&&d!==(d=`height: ${p[1]}; width: ${p[1]};`)&&U(u,"style",d),h&2&&c!==(c=`height: ${p[1]}; width: ${p[1]};`)&&U(n,"style",c),p[0]?m?m.p(p,h):(m=D_(p),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},i:ee,o:ee,d(p){p&&re(t),m&&m.d()}}}function oW(e,t,n){let{description:r=""}=t,{size:i="2rem"}=t;return e.$$set=o=>{"description"in o&&n(0,r=o.description),"size"in o&&n(1,i=o.size)},[r,i]}class sW extends Gt{constructor(t){super(),qt(this,t,oW,iW,Wt,{description:0,size:1},rW)}}function aW(e){Vt(e,"svelte-i129jl",`.icon.svelte-i129jl{height:100%}.border-custom.svelte-i129jl{border:1px solid var(--border-color)}.border-yellow.svelte-i129jl{border:1px solid var(--onboard-warning-500, var(--warning-500))}.border-gray.svelte-i129jl{border:1px solid var(--onboard-gray-400, var(--gray-400))}.border-green.svelte-i129jl{border:1px solid var(--onboard-success-500, var(--success-500))}.border-dark-green.svelte-i129jl{border:1px solid var(--onboard-success-700, var(--success-700))}.border-blue.svelte-i129jl{border:1px solid + );border-radius:var(--border-radius) var(--border-radius) 0 0;box-shadow:var(--onboard-modal-box-shadow, var(--box-shadow-0));max-width:100vw}.modal.svelte-7ee2g7{overflow-y:auto;background:var(--onboard-modal-background, white);color:var(--onboard-modal-color, initial)}.width-100.svelte-7ee2g7{width:100%}.modal-container-mobile.svelte-7ee2g7{bottom:0}@media all and (min-width: 768px){.modal-styling.svelte-7ee2g7{border-radius:var(--border-radius)}.modal-container-mobile.svelte-7ee2g7{bottom:unset;margin:1rem}.width-100.svelte-7ee2g7{width:unset}}`)}function Uz(e){let t,n,r,i,o,s,a,l,u,d;const c=e[3].default,f=zv(c,e,e[2],null);return{c(){t=K("section"),n=K("div"),r=K("div"),i=K("div"),o=K("div"),s=K("div"),f&&f.c(),U(s,"class","modal relative svelte-7ee2g7"),U(o,"class","modal-overflow modal-styling relative flex justify-center svelte-7ee2g7"),U(o,"style",`${e[1]?"max-width: 100%;":""}`),U(i,"class","flex relative max-height svelte-7ee2g7"),ye(i,"width-100",e[1]),U(r,"class","modal-container-mobile modal-position flex svelte-7ee2g7"),ye(r,"absolute",!e[1]),ye(r,"width-100",e[1]),U(n,"class","background flex items-center justify-center relative svelte-7ee2g7"),ye(n,"full-screen-background",!e[1]),U(t,"class","svelte-7ee2g7"),ye(t,"fixed",!e[1])},m(m,p){oe(m,t,p),H(t,n),H(n,r),H(r,i),H(i,o),H(o,s),f&&f.m(s,null),l=!0,u||(d=[qn(i,"click",eH(e[4])),qn(n,"click",function(){Es(e[0])&&e[0].apply(this,arguments)})],u=!0)},p(m,[p]){e=m,f&&f.p&&(!l||p&4)&&Vv(f,c,e,e[2],l?Wv(c,e[2],p,null):qv(e[2]),null)},i(m){l||(X(f,m),Rn(()=>{l&&(a||(a=B_(t,Pp,{},!0)),a.run(1))}),l=!0)},o(m){ie(f,m),a||(a=B_(t,Pp,{},!1)),a.run(0),l=!1},d(m){m&&re(t),f&&f.d(m),m&&a&&a.end(),u=!1,Ei(d)}}}function Hz(e,t,n){let{$$slots:r={},$$scope:i}=t;const o=!!fn.containerElements.connectModal,s=document.documentElement;aH(()=>{o||(s.style.position="sticky",s.style.overflow="hidden")}),C9(()=>{o||(s.style.position="",s.style.removeProperty("overflow"))});let{close:a}=t;function l(u){lH.call(this,e,u)}return e.$$set=u=>{"close"in u&&n(0,a=u.close),"$$scope"in u&&n(2,i=u.$$scope)},[a,o,i,r,l]}class sw extends Gt{constructor(t){super(),qt(this,t,Hz,Uz,Wt,{close:0},Fz)}}function zz(e){Vt(e,"svelte-tz7ru1",".container.svelte-tz7ru1{padding:var(--onboard-spacing-4, var(--spacing-4));font-size:var(--onboard-font-size-6, var(--font-size-6));line-height:24px}input.svelte-tz7ru1{height:1rem;width:1rem;margin-right:0.5rem}")}function Wz(e){let t,n,r,i,o,s=e[1]("connect.selectingWallet.agreement.agree")+"",a,l,u=" ",d,c,f,m,p,h=e[3]&&Vz(e),y=e[4]&&qz(e);return{c(){t=K("div"),n=K("label"),r=K("input"),i=ve(),o=K("span"),a=He(s),l=ve(),d=He(u),c=ve(),h&&h.c(),f=ve(),y&&y.c(),U(r,"class"," svelte-tz7ru1"),U(r,"type","checkbox"),U(n,"class","flex"),U(t,"class","container flex items-center svelte-tz7ru1")},m(g,b){oe(g,t,b),H(t,n),H(n,r),r.checked=e[0],H(n,i),H(n,o),H(o,a),H(o,l),H(o,d),H(o,c),h&&h.m(o,null),H(o,f),y&&y.m(o,null),m||(p=qn(r,"change",e[6]),m=!0)},p(g,b){b&1&&(r.checked=g[0]),b&2&&s!==(s=g[1]("connect.selectingWallet.agreement.agree")+"")&&tt(a,s),g[3]&&h.p(g,b),g[4]&&y.p(g,b)},d(g){g&&re(t),h&&h.d(),y&&y.d(),m=!1,p()}}}function Vz(e){let t,n=e[1]("connect.selectingWallet.agreement.terms")+"",r,i=e[4]?" "+e[1]("connect.selectingWallet.agreement.and")+" ":".",o;return{c(){t=K("a"),r=He(n),o=He(i),U(t,"href",e[3]),U(t,"target","_blank")},m(s,a){oe(s,t,a),H(t,r),oe(s,o,a)},p(s,a){a&2&&n!==(n=s[1]("connect.selectingWallet.agreement.terms")+"")&&tt(r,n),a&2&&i!==(i=s[4]?" "+s[1]("connect.selectingWallet.agreement.and")+" ":".")&&tt(o,i)},d(s){s&&re(t),s&&re(o)}}}function qz(e){let t,n=e[1]("connect.selectingWallet.agreement.privacy")+"",r,i;return{c(){t=K("a"),r=He(n),i=He("."),U(t,"href",e[4]),U(t,"target","_blank")},m(o,s){oe(o,t,s),H(t,r),oe(o,i,s)},p(o,s){s&2&&n!==(n=o[1]("connect.selectingWallet.agreement.privacy")+"")&&tt(r,n)},d(o){o&&re(t),o&&re(i)}}}function Gz(e){let t,n=e[5]&&Wz(e);return{c(){n&&n.c(),t=ct()},m(r,i){n&&n.m(r,i),oe(r,t,i)},p(r,[i]){r[5]&&n.p(r,i)},i:ee,o:ee,d(r){n&&n.d(r),r&&re(t)}}}function Kz(e,t,n){let r,i;wt(e,xi,y=>n(1,i=y));let{agreed:o}=t;const{terms:s,privacy:a,version:l}=JSON.parse(B0(gi.TERMS_AGREEMENT)||"{}"),u={termsUrl:"",privacyUrl:"",version:""},d=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));wt(e,d,y=>n(7,r=y));const{termsUrl:c,privacyUrl:f,version:m}=r&&r.agreement||u,p=!!(c&&!s||f&&!a||m&&m!==l);o=!p;function h(){o=this.checked,n(0,o)}return e.$$set=y=>{"agreed"in y&&n(0,o=y.agreed)},e.$$.update=()=>{e.$$.dirty&1&&(o?N0(gi.TERMS_AGREEMENT,JSON.stringify({version:m,terms:!!c,privacy:!!f})):o===!1&&r9(gi.TERMS_AGREEMENT))},[o,i,d,c,f,p,h]}class Zz extends Gt{constructor(t){super(),qt(this,t,Kz,Gz,Wt,{agreed:0},zz)}}function Xz(e){Vt(e,"svelte-2btye1",".icon.svelte-2btye1{color:var(--onboard-white, var(--white));border-radius:50px;bottom:-0.25rem;right:-0.25rem}.yellow.svelte-2btye1{background:var(--onboard-warning-500, var(--warning-500))}")}function Yz(e){let t,n,r;return{c(){t=K("div"),U(t,"class",n=R_(`${e[2]} icon flex absolute`)+" svelte-2btye1"),U(t,"style",r=`width: ${e[0]}px; height: ${e[0]}px; padding: ${e[0]/6}px;`),ye(t,"yellow",e[1]==="yellow")},m(i,o){oe(i,t,o),t.innerHTML=NU},p(i,[o]){o&4&&n!==(n=R_(`${i[2]} icon flex absolute`)+" svelte-2btye1")&&U(t,"class",n),o&1&&r!==(r=`width: ${i[0]}px; height: ${i[0]}px; padding: ${i[0]/6}px;`)&&U(t,"style",r),o&6&&ye(t,"yellow",i[1]==="yellow")},i:ee,o:ee,d(i){i&&re(t)}}}function Qz(e,t,n){let{size:r}=t,{color:i="yellow"}=t,{class:o="test"}=t;return e.$$set=s=>{"size"in s&&n(0,r=s.size),"color"in s&&n(1,i=s.color),"class"in s&&n(2,o=s.class)},[r,i,o]}class Jz extends Gt{constructor(t){super(),qt(this,t,Qz,Yz,Wt,{size:0,color:1,class:2},Xz)}}function eW(e){Vt(e,"svelte-1bikw7k",".icon.svelte-1bikw7k{color:var(--onboard-white, var(--white));border-radius:50px}.green.svelte-1bikw7k{background:var(--onboard-success-600, var(--success-600))}.blue.svelte-1bikw7k{background:var(--onboard-primary-1, var(--primary-1))}")}function tW(e){let t,n;return{c(){t=K("div"),U(t,"class","icon flex svelte-1bikw7k"),U(t,"style",n=`width: ${e[0]}px; height: ${e[0]}px; padding: ${e[0]/5}px;`),ye(t,"green",e[1]==="green"),ye(t,"blue",e[1]==="blue")},m(r,i){oe(r,t,i),t.innerHTML=t9},p(r,[i]){i&1&&n!==(n=`width: ${r[0]}px; height: ${r[0]}px; padding: ${r[0]/5}px;`)&&U(t,"style",n),i&2&&ye(t,"green",r[1]==="green"),i&2&&ye(t,"blue",r[1]==="blue")},i:ee,o:ee,d(r){r&&re(t)}}}function nW(e,t,n){let{size:r}=t,{color:i="green"}=t;return e.$$set=o=>{"size"in o&&n(0,r=o.size),"color"in o&&n(1,i=o.color)},[r,i]}class J9 extends Gt{constructor(t){super(),qt(this,t,nW,tW,Wt,{size:0,color:1},eW)}}function rW(e){Vt(e,"svelte-1le5672",".loading-container.svelte-1le5672.svelte-1le5672{font-family:inherit;font-size:inherit;color:inherit}span.svelte-1le5672.svelte-1le5672{font-family:inherit;font-size:0.889em;margin-top:1rem}.loading.svelte-1le5672.svelte-1le5672{display:inline-block}.loading.svelte-1le5672 div.svelte-1le5672{font-size:inherit;display:block;position:absolute;border:3px solid;border-radius:50%;animation:svelte-1le5672-bn-loading 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;border-color:currentColor transparent transparent transparent}.loading.svelte-1le5672 .loading-first.svelte-1le5672{animation-delay:-0.45s}.loading.svelte-1le5672 .loading-second.svelte-1le5672{animation-delay:-0.3s}.loading.svelte-1le5672 .loading-third.svelte-1le5672{animation-delay:-0.15s}@keyframes svelte-1le5672-bn-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}")}function F_(e){let t,n;return{c(){t=K("span"),n=He(e[0]),U(t,"class","svelte-1le5672")},m(r,i){oe(r,t,i),H(t,n)},p(r,i){i&1&&tt(n,r[0])},d(r){r&&re(t)}}}function iW(e){let t,n,r,i,o,s,a,l,u,d,c,f,m=e[0]&&F_(e);return{c(){t=K("div"),n=K("div"),r=K("div"),o=ve(),s=K("div"),l=ve(),u=K("div"),f=ve(),m&&m.c(),U(r,"class","loading-first svelte-1le5672"),U(r,"style",i=`height: ${e[1]}; width: ${e[1]};`),U(s,"class","loading-second svelte-1le5672"),U(s,"style",a=`height: ${e[1]}; width: ${e[1]};`),U(u,"class","loading-third svelte-1le5672"),U(u,"style",d=`height: ${e[1]}; width: ${e[1]};`),U(n,"class","loading relative svelte-1le5672"),U(n,"style",c=`height: ${e[1]}; width: ${e[1]};`),U(t,"class","loading-container flex flex-column justify-center items-center absolute svelte-1le5672")},m(p,h){oe(p,t,h),H(t,n),H(n,r),H(n,o),H(n,s),H(n,l),H(n,u),H(t,f),m&&m.m(t,null)},p(p,[h]){h&2&&i!==(i=`height: ${p[1]}; width: ${p[1]};`)&&U(r,"style",i),h&2&&a!==(a=`height: ${p[1]}; width: ${p[1]};`)&&U(s,"style",a),h&2&&d!==(d=`height: ${p[1]}; width: ${p[1]};`)&&U(u,"style",d),h&2&&c!==(c=`height: ${p[1]}; width: ${p[1]};`)&&U(n,"style",c),p[0]?m?m.p(p,h):(m=F_(p),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},i:ee,o:ee,d(p){p&&re(t),m&&m.d()}}}function oW(e,t,n){let{description:r=""}=t,{size:i="2rem"}=t;return e.$$set=o=>{"description"in o&&n(0,r=o.description),"size"in o&&n(1,i=o.size)},[r,i]}class sW extends Gt{constructor(t){super(),qt(this,t,oW,iW,Wt,{description:0,size:1},rW)}}function aW(e){Vt(e,"svelte-i129jl",`.icon.svelte-i129jl{height:100%}.border-custom.svelte-i129jl{border:1px solid var(--border-color)}.border-yellow.svelte-i129jl{border:1px solid var(--onboard-warning-500, var(--warning-500))}.border-gray.svelte-i129jl{border:1px solid var(--onboard-gray-400, var(--gray-400))}.border-green.svelte-i129jl{border:1px solid var(--onboard-success-500, var(--success-500))}.border-dark-green.svelte-i129jl{border:1px solid var(--onboard-success-700, var(--success-700))}.border-blue.svelte-i129jl{border:1px solid var( --onboard-wallet-app-icon-border-color, var(--onboard-primary-300, var(--primary-300)) @@ -2397,11 +2397,11 @@ Note: there are at least one loader still registered to this locale that wasn't )}.background-transparent.svelte-i129jl{background:var( --onboard-wallet-app-icon-background-transparent, transparent - )}@keyframes svelte-i129jl-pulse{from{opacity:0}to{opacity:1}}.placeholder-icon.svelte-i129jl{width:100%;height:100%;background:var(--onboard-gray-100, var(--gray-100));border-radius:32px;animation:svelte-i129jl-pulse infinite 750ms alternate ease-in-out}.spinner-container.svelte-i129jl{color:var(--onboard-primary-300, var(--primary-300))}img.svelte-i129jl{max-width:100%;height:auto}.pending-status-icon{z-index:1;fill:white;box-shadow:0px 2px 12px 0px rgba(0, 0, 0, 0.1)}.status-icon-container.svelte-i129jl{right:-0.25rem;bottom:-0.25rem;position:absolute}`)}const lW=e=>({}),F_=e=>({});function cW(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:mW,then:dW,catch:fW,value:13,blocks:[,,,]};return Ea(n=e[1],i),{c(){t=ct(),i.block.c()},m(o,s){oe(o,t,s),i.block.m(o,i.anchor=s),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(o,s){e=o,i.ctx=e,s&2&&n!==(n=e[1])&&Ea(n,i)||vc(i,e,s)},i(o){r||(X(i.block),r=!0)},o(o){for(let s=0;s<3;s+=1){const a=i.blocks[s];ie(a)}r=!1},d(o){o&&re(t),i.block.d(o),i.token=null,i=null}}}function uW(e){let t,n,r;return n=new sW({props:{size:"2rem"}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","spinner-container svelte-i129jl")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},p:ee,i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function fW(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function dW(e){let t,n,r,i,o,s;function a(c,f){return f&2&&(n=null),n==null&&(n=!!Fv(c[13])),n?pW:hW}let l=a(e,-1),u=l(e),d=e[2]&&e[9]<=Rt&&U_();return{c(){t=K("div"),u.c(),i=ve(),d&&d.c(),o=ct(),U(t,"class","icon flex justify-center items-center svelte-i129jl")},m(c,f){oe(c,t,f),u.m(t,null),oe(c,i,f),d&&d.m(c,f),oe(c,o,f),s=!0},p(c,f){l===(l=a(c,f))&&u?u.p(c,f):(u.d(1),u=l(c),u&&(u.c(),u.m(t,null))),c[2]&&c[9]<=Rt?d?f&516&&X(d,1):(d=U_(),d.c(),X(d,1),d.m(o.parentNode,o)):d&&(mt(),ie(d,1,1,()=>{d=null}),gt())},i(c){s||(c&&(r||Rn(()=>{r=Qv(t,Pp,{}),r.start()})),X(d),s=!0)},o(c){ie(d),s=!1},d(c){c&&re(t),u.d(),c&&re(i),d&&d.d(c),c&&re(o)}}}function hW(e){let t,n;return{c(){t=K("img"),ec(t.src,n=e[13])||U(t,"src",n),U(t,"alt","logo"),U(t,"class","svelte-i129jl")},m(r,i){oe(r,t,i)},p(r,i){i&2&&!ec(t.src,n=r[13])&&U(t,"src",n)},d(r){r&&re(t)}}}function pW(e){let t,n=e[13]+"",r;return{c(){t=new bc(!1),r=ct(),t.a=r},m(i,o){t.m(n,i,o),oe(i,r,o)},p(i,o){o&2&&n!==(n=i[13]+"")&&t.p(n)},d(i){i&&re(r),i&&t.d()}}}function U_(e){let t,n,r;return n=new Jz({props:{class:"pending-status-icon",size:20}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","status-icon-container svelte-i129jl")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function mW(e){let t;return{c(){t=K("div"),U(t,"class","placeholder-icon svelte-i129jl")},m(n,r){oe(n,t,r)},p:ee,i:ee,o:ee,d(n){n&&re(t)}}}function gW(e){let t,n,r,i,o,s,a,l;Rn(e[12]);const u=[uW,cW],d=[];function c(p,h){return p[2]&&p[9]>=Rt?0:1}n=c(e),r=d[n]=u[n](e);const f=e[11].status,m=Hv(f,e,e[10],F_);return{c(){t=K("div"),r.c(),i=ve(),m&&m.c(),U(t,"class","relative svelte-i129jl"),U(t,"style",o=`${e[6]==="custom"?`background-color: ${e[7]}`:""}; padding: ${e[3]-1}px; width: ${e[0]}px; height: ${e[0]}px; border-radius: ${e[8]}px; color: ${e[4]};`),ye(t,"border-custom",e[5]==="custom"),ye(t,"border-yellow",e[5]==="yellow"),ye(t,"border-gray",e[5]==="gray"),ye(t,"border-green",e[5]==="green"),ye(t,"border-dark-green",e[5]==="darkGreen"),ye(t,"border-blue",e[5]==="blue"),ye(t,"border-dark-blue",e[5]==="darkBlue"),ye(t,"border-transparent",e[5]==="transparent"),ye(t,"border-black",e[5]==="black"),ye(t,"background-gray",e[6]==="gray"),ye(t,"background-light-gray",e[6]==="lightGray"),ye(t,"background-light-blue",e[6]==="lightBlue"),ye(t,"background-green",e[6]==="green"),ye(t,"background-white",e[6]==="white"),ye(t,"background-transparent",e[6]==="transparent")},m(p,h){oe(p,t,h),d[n].m(t,null),H(t,i),m&&m.m(t,null),s=!0,a||(l=qn(window,"resize",e[12]),a=!0)},p(p,[h]){let y=n;n=c(p),n===y?d[n].p(p,h):(mt(),ie(d[y],1,1,()=>{d[y]=null}),gt(),r=d[n],r?r.p(p,h):(r=d[n]=u[n](p),r.c()),X(r,1),r.m(t,i)),m&&m.p&&(!s||h&1024)&&Wv(m,f,p,p[10],s?zv(f,p[10],h,lW):Vv(p[10]),F_),(!s||h&473&&o!==(o=`${p[6]==="custom"?`background-color: ${p[7]}`:""}; padding: ${p[3]-1}px; width: ${p[0]}px; height: ${p[0]}px; border-radius: ${p[8]}px; color: ${p[4]};`))&&U(t,"style",o),(!s||h&32)&&ye(t,"border-custom",p[5]==="custom"),(!s||h&32)&&ye(t,"border-yellow",p[5]==="yellow"),(!s||h&32)&&ye(t,"border-gray",p[5]==="gray"),(!s||h&32)&&ye(t,"border-green",p[5]==="green"),(!s||h&32)&&ye(t,"border-dark-green",p[5]==="darkGreen"),(!s||h&32)&&ye(t,"border-blue",p[5]==="blue"),(!s||h&32)&&ye(t,"border-dark-blue",p[5]==="darkBlue"),(!s||h&32)&&ye(t,"border-transparent",p[5]==="transparent"),(!s||h&32)&&ye(t,"border-black",p[5]==="black"),(!s||h&64)&&ye(t,"background-gray",p[6]==="gray"),(!s||h&64)&&ye(t,"background-light-gray",p[6]==="lightGray"),(!s||h&64)&&ye(t,"background-light-blue",p[6]==="lightBlue"),(!s||h&64)&&ye(t,"background-green",p[6]==="green"),(!s||h&64)&&ye(t,"background-white",p[6]==="white"),(!s||h&64)&&ye(t,"background-transparent",p[6]==="transparent")},i(p){s||(X(r),X(m,p),s=!0)},o(p){ie(r),ie(m,p),s=!1},d(p){p&&re(t),d[n].d(),m&&m.d(p),a=!1,l()}}}function yW(e,t,n){let{$$slots:r={},$$scope:i}=t,{size:o}=t,{icon:s}=t,{loading:a=!1}=t,{padding:l=o/6}=t,{color:u="black"}=t,{border:d="transparent"}=t,{background:c="transparent"}=t,{customBackgroundColor:f=""}=t,{radius:m=12}=t,p;function h(){n(9,p=window.innerWidth)}return e.$$set=y=>{"size"in y&&n(0,o=y.size),"icon"in y&&n(1,s=y.icon),"loading"in y&&n(2,a=y.loading),"padding"in y&&n(3,l=y.padding),"color"in y&&n(4,u=y.color),"border"in y&&n(5,d=y.border),"background"in y&&n(6,c=y.background),"customBackgroundColor"in y&&n(7,f=y.customBackgroundColor),"radius"in y&&n(8,m=y.radius),"$$scope"in y&&n(10,i=y.$$scope)},[o,s,a,l,u,d,c,f,m,p,i,r,h]}class Hf extends Gt{constructor(t){super(),qt(this,t,yW,gW,Wt,{size:0,icon:1,loading:2,padding:3,color:4,border:5,background:6,customBackgroundColor:7,radius:8},aW)}}function bW(e){Vt(e,"svelte-q2gson",".container.svelte-q2gson{gap:1rem;padding:0.75rem;color:var(--onboard-warning-700, var(--warning-700));font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:16px;border:1px solid var(--onboard-warning-400, var(--warning-400));background:var(--onboard-warning-100, var(--warning-100));border-radius:12px}.icon.svelte-q2gson{color:var(--onboard-warning-700, var(--warning-700));width:1rem;height:1rem;flex:0 0 auto}")}function vW(e){let t,n,r,i,o,s;const a=e[1].default,l=Hv(a,e,e[0],null);return{c(){t=K("div"),n=K("div"),l&&l.c(),r=ve(),i=K("div"),U(i,"class","icon svelte-q2gson"),U(t,"class","container flex justify-between svelte-q2gson")},m(u,d){oe(u,t,d),H(t,n),l&&l.m(n,null),H(t,r),H(t,i),i.innerHTML=L0,s=!0},p(u,[d]){l&&l.p&&(!s||d&1)&&Wv(l,a,u,u[0],s?zv(a,u[0],d,null):Vv(u[0]),null)},i(u){s||(X(l,u),u&&(o||Rn(()=>{o=Qv(t,Dz,{delay:50,duration:500}),o.start()})),s=!0)},o(u){ie(l,u),s=!1},d(u){u&&re(t),l&&l.d(u)}}}function wW(e,t,n){let{$$slots:r={},$$scope:i}=t;return e.$$set=o=>{"$$scope"in o&&n(0,i=o.$$scope)},[i,r]}class sw extends Gt{constructor(t){super(),qt(this,t,wW,vW,Wt,{},bW)}}function _W(e){Vt(e,"svelte-1kfgpsl",`.container.svelte-1kfgpsl{padding:var(--onboard-spacing-4, var(--spacing-4));color:var( + )}@keyframes svelte-i129jl-pulse{from{opacity:0}to{opacity:1}}.placeholder-icon.svelte-i129jl{width:100%;height:100%;background:var(--onboard-gray-100, var(--gray-100));border-radius:32px;animation:svelte-i129jl-pulse infinite 750ms alternate ease-in-out}.spinner-container.svelte-i129jl{color:var(--onboard-primary-300, var(--primary-300))}img.svelte-i129jl{max-width:100%;height:auto}.pending-status-icon{z-index:1;fill:white;box-shadow:0px 2px 12px 0px rgba(0, 0, 0, 0.1)}.status-icon-container.svelte-i129jl{right:-0.25rem;bottom:-0.25rem;position:absolute}`)}const lW=e=>({}),U_=e=>({});function cW(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:mW,then:dW,catch:fW,value:13,blocks:[,,,]};return Ea(n=e[1],i),{c(){t=ct(),i.block.c()},m(o,s){oe(o,t,s),i.block.m(o,i.anchor=s),i.mount=()=>t.parentNode,i.anchor=t,r=!0},p(o,s){e=o,i.ctx=e,s&2&&n!==(n=e[1])&&Ea(n,i)||vc(i,e,s)},i(o){r||(X(i.block),r=!0)},o(o){for(let s=0;s<3;s+=1){const a=i.blocks[s];ie(a)}r=!1},d(o){o&&re(t),i.block.d(o),i.token=null,i=null}}}function uW(e){let t,n,r;return n=new sW({props:{size:"2rem"}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","spinner-container svelte-i129jl")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},p:ee,i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function fW(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function dW(e){let t,n,r,i,o,s;function a(c,f){return f&2&&(n=null),n==null&&(n=!!Uv(c[13])),n?pW:hW}let l=a(e,-1),u=l(e),d=e[2]&&e[9]<=Rt&&H_();return{c(){t=K("div"),u.c(),i=ve(),d&&d.c(),o=ct(),U(t,"class","icon flex justify-center items-center svelte-i129jl")},m(c,f){oe(c,t,f),u.m(t,null),oe(c,i,f),d&&d.m(c,f),oe(c,o,f),s=!0},p(c,f){l===(l=a(c,f))&&u?u.p(c,f):(u.d(1),u=l(c),u&&(u.c(),u.m(t,null))),c[2]&&c[9]<=Rt?d?f&516&&X(d,1):(d=H_(),d.c(),X(d,1),d.m(o.parentNode,o)):d&&(mt(),ie(d,1,1,()=>{d=null}),gt())},i(c){s||(c&&(r||Rn(()=>{r=Jv(t,Pp,{}),r.start()})),X(d),s=!0)},o(c){ie(d),s=!1},d(c){c&&re(t),u.d(),c&&re(i),d&&d.d(c),c&&re(o)}}}function hW(e){let t,n;return{c(){t=K("img"),tc(t.src,n=e[13])||U(t,"src",n),U(t,"alt","logo"),U(t,"class","svelte-i129jl")},m(r,i){oe(r,t,i)},p(r,i){i&2&&!tc(t.src,n=r[13])&&U(t,"src",n)},d(r){r&&re(t)}}}function pW(e){let t,n=e[13]+"",r;return{c(){t=new bc(!1),r=ct(),t.a=r},m(i,o){t.m(n,i,o),oe(i,r,o)},p(i,o){o&2&&n!==(n=i[13]+"")&&t.p(n)},d(i){i&&re(r),i&&t.d()}}}function H_(e){let t,n,r;return n=new Jz({props:{class:"pending-status-icon",size:20}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","status-icon-container svelte-i129jl")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function mW(e){let t;return{c(){t=K("div"),U(t,"class","placeholder-icon svelte-i129jl")},m(n,r){oe(n,t,r)},p:ee,i:ee,o:ee,d(n){n&&re(t)}}}function gW(e){let t,n,r,i,o,s,a,l;Rn(e[12]);const u=[uW,cW],d=[];function c(p,h){return p[2]&&p[9]>=Rt?0:1}n=c(e),r=d[n]=u[n](e);const f=e[11].status,m=zv(f,e,e[10],U_);return{c(){t=K("div"),r.c(),i=ve(),m&&m.c(),U(t,"class","relative svelte-i129jl"),U(t,"style",o=`${e[6]==="custom"?`background-color: ${e[7]}`:""}; padding: ${e[3]-1}px; width: ${e[0]}px; height: ${e[0]}px; border-radius: ${e[8]}px; color: ${e[4]};`),ye(t,"border-custom",e[5]==="custom"),ye(t,"border-yellow",e[5]==="yellow"),ye(t,"border-gray",e[5]==="gray"),ye(t,"border-green",e[5]==="green"),ye(t,"border-dark-green",e[5]==="darkGreen"),ye(t,"border-blue",e[5]==="blue"),ye(t,"border-dark-blue",e[5]==="darkBlue"),ye(t,"border-transparent",e[5]==="transparent"),ye(t,"border-black",e[5]==="black"),ye(t,"background-gray",e[6]==="gray"),ye(t,"background-light-gray",e[6]==="lightGray"),ye(t,"background-light-blue",e[6]==="lightBlue"),ye(t,"background-green",e[6]==="green"),ye(t,"background-white",e[6]==="white"),ye(t,"background-transparent",e[6]==="transparent")},m(p,h){oe(p,t,h),d[n].m(t,null),H(t,i),m&&m.m(t,null),s=!0,a||(l=qn(window,"resize",e[12]),a=!0)},p(p,[h]){let y=n;n=c(p),n===y?d[n].p(p,h):(mt(),ie(d[y],1,1,()=>{d[y]=null}),gt(),r=d[n],r?r.p(p,h):(r=d[n]=u[n](p),r.c()),X(r,1),r.m(t,i)),m&&m.p&&(!s||h&1024)&&Vv(m,f,p,p[10],s?Wv(f,p[10],h,lW):qv(p[10]),U_),(!s||h&473&&o!==(o=`${p[6]==="custom"?`background-color: ${p[7]}`:""}; padding: ${p[3]-1}px; width: ${p[0]}px; height: ${p[0]}px; border-radius: ${p[8]}px; color: ${p[4]};`))&&U(t,"style",o),(!s||h&32)&&ye(t,"border-custom",p[5]==="custom"),(!s||h&32)&&ye(t,"border-yellow",p[5]==="yellow"),(!s||h&32)&&ye(t,"border-gray",p[5]==="gray"),(!s||h&32)&&ye(t,"border-green",p[5]==="green"),(!s||h&32)&&ye(t,"border-dark-green",p[5]==="darkGreen"),(!s||h&32)&&ye(t,"border-blue",p[5]==="blue"),(!s||h&32)&&ye(t,"border-dark-blue",p[5]==="darkBlue"),(!s||h&32)&&ye(t,"border-transparent",p[5]==="transparent"),(!s||h&32)&&ye(t,"border-black",p[5]==="black"),(!s||h&64)&&ye(t,"background-gray",p[6]==="gray"),(!s||h&64)&&ye(t,"background-light-gray",p[6]==="lightGray"),(!s||h&64)&&ye(t,"background-light-blue",p[6]==="lightBlue"),(!s||h&64)&&ye(t,"background-green",p[6]==="green"),(!s||h&64)&&ye(t,"background-white",p[6]==="white"),(!s||h&64)&&ye(t,"background-transparent",p[6]==="transparent")},i(p){s||(X(r),X(m,p),s=!0)},o(p){ie(r),ie(m,p),s=!1},d(p){p&&re(t),d[n].d(),m&&m.d(p),a=!1,l()}}}function yW(e,t,n){let{$$slots:r={},$$scope:i}=t,{size:o}=t,{icon:s}=t,{loading:a=!1}=t,{padding:l=o/6}=t,{color:u="black"}=t,{border:d="transparent"}=t,{background:c="transparent"}=t,{customBackgroundColor:f=""}=t,{radius:m=12}=t,p;function h(){n(9,p=window.innerWidth)}return e.$$set=y=>{"size"in y&&n(0,o=y.size),"icon"in y&&n(1,s=y.icon),"loading"in y&&n(2,a=y.loading),"padding"in y&&n(3,l=y.padding),"color"in y&&n(4,u=y.color),"border"in y&&n(5,d=y.border),"background"in y&&n(6,c=y.background),"customBackgroundColor"in y&&n(7,f=y.customBackgroundColor),"radius"in y&&n(8,m=y.radius),"$$scope"in y&&n(10,i=y.$$scope)},[o,s,a,l,u,d,c,f,m,p,i,r,h]}class Hf extends Gt{constructor(t){super(),qt(this,t,yW,gW,Wt,{size:0,icon:1,loading:2,padding:3,color:4,border:5,background:6,customBackgroundColor:7,radius:8},aW)}}function bW(e){Vt(e,"svelte-q2gson",".container.svelte-q2gson{gap:1rem;padding:0.75rem;color:var(--onboard-warning-700, var(--warning-700));font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:16px;border:1px solid var(--onboard-warning-400, var(--warning-400));background:var(--onboard-warning-100, var(--warning-100));border-radius:12px}.icon.svelte-q2gson{color:var(--onboard-warning-700, var(--warning-700));width:1rem;height:1rem;flex:0 0 auto}")}function vW(e){let t,n,r,i,o,s;const a=e[1].default,l=zv(a,e,e[0],null);return{c(){t=K("div"),n=K("div"),l&&l.c(),r=ve(),i=K("div"),U(i,"class","icon svelte-q2gson"),U(t,"class","container flex justify-between svelte-q2gson")},m(u,d){oe(u,t,d),H(t,n),l&&l.m(n,null),H(t,r),H(t,i),i.innerHTML=L0,s=!0},p(u,[d]){l&&l.p&&(!s||d&1)&&Vv(l,a,u,u[0],s?Wv(a,u[0],d,null):qv(u[0]),null)},i(u){s||(X(l,u),u&&(o||Rn(()=>{o=Jv(t,Dz,{delay:50,duration:500}),o.start()})),s=!0)},o(u){ie(l,u),s=!1},d(u){u&&re(t),l&&l.d(u)}}}function wW(e,t,n){let{$$slots:r={},$$scope:i}=t;return e.$$set=o=>{"$$scope"in o&&n(0,i=o.$$scope)},[i,r]}class aw extends Gt{constructor(t){super(),qt(this,t,wW,vW,Wt,{},bW)}}function _W(e){Vt(e,"svelte-1kfgpsl",`.container.svelte-1kfgpsl{padding:var(--onboard-spacing-4, var(--spacing-4));color:var( --onboard-connect-accent-text-color, var(--onboard-gray-700, var(--gray-700)) - )}.connecting-container.svelte-1kfgpsl{padding:var(--onboard-spacing-4, var(--spacing-4));border-radius:var(--onboard-border-radius-1, var(--border-radius-1));background:var(--onboard-success-100, var(--success-100));border:1px solid var(--onboard-success-600, var(--success-600));width:100%}.text.svelte-1kfgpsl{right:var(--onboard-spacing-5, var(--spacing-5))}.tick.svelte-1kfgpsl{color:var(--onboard-success-700, var(--success-700))}`)}function xW(e){let t,n,r,i,o,s,a,l,u,d,c,f,m,p=e[2]("connect.connectedWallet.mainText",{default:Re.connect.connectedWallet.mainText,values:{wallet:e[0].label}})+"",h,y,g,b;return o=new Hf({props:{size:40,padding:8,background:e[1]&&e[1].icon?"lightBlue":"lightGray",border:"darkGreen",icon:e[1]&&e[1].icon||jf}}),l=new J9({props:{size:17}}),c=new Hf({props:{size:40,padding:8,border:"darkGreen",background:"white",icon:e[0].icon}}),{c(){t=K("div"),n=K("div"),r=K("div"),i=K("div"),ze(o.$$.fragment),s=ve(),a=K("div"),ze(l.$$.fragment),u=ve(),d=K("div"),ze(c.$$.fragment),f=ve(),m=K("div"),h=He(p),y=ve(),g=K("div"),U(a,"class","relative"),Ka(a,"right","1rem"),Ka(a,"top","4px"),Ka(a,"z-index","1"),U(d,"class","relative"),Ka(d,"right","1.75rem"),U(i,"class","flex justify-center items-end relative"),U(m,"class","text relative svelte-1kfgpsl"),U(r,"class","flex items-center"),U(g,"class","tick flex items-center svelte-1kfgpsl"),Ka(g,"width","24px"),U(n,"class","connecting-container flex justify-between items-center svelte-1kfgpsl"),U(t,"class","container svelte-1kfgpsl")},m(v,w){oe(v,t,w),H(t,n),H(n,r),H(r,i),De(o,i,null),H(i,s),H(i,a),De(l,a,null),H(i,u),H(i,d),De(c,d,null),H(r,f),H(r,m),H(m,h),H(n,y),H(n,g),g.innerHTML=t9,b=!0},p(v,[w]){const E={};w&2&&(E.background=v[1]&&v[1].icon?"lightBlue":"lightGray"),w&2&&(E.icon=v[1]&&v[1].icon||jf),o.$set(E);const C={};w&1&&(C.icon=v[0].icon),c.$set(C),(!b||w&5)&&p!==(p=v[2]("connect.connectedWallet.mainText",{default:Re.connect.connectedWallet.mainText,values:{wallet:v[0].label}})+"")&&tt(h,p)},i(v){b||(X(o.$$.fragment,v),X(l.$$.fragment,v),X(c.$$.fragment,v),b=!0)},o(v){ie(o.$$.fragment,v),ie(l.$$.fragment,v),ie(c.$$.fragment,v),b=!1},d(v){v&&re(t),Fe(o),Fe(l),Fe(c)}}}function EW(e,t,n){let r,i;wt(e,xi,a=>n(2,i=a));let{selectedWallet:o}=t;const s=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));return wt(e,s,a=>n(1,r=a)),e.$$set=a=>{"selectedWallet"in a&&n(0,o=a.selectedWallet)},[o,r,i,s]}class SW extends Gt{constructor(t){super(),qt(this,t,EW,xW,Wt,{selectedWallet:0},_W)}}function kW(e){Vt(e,"svelte-j1ywa3",`.container.svelte-j1ywa3{padding:var(--onboard-spacing-4, var(--spacing-4))}.connecting-container.svelte-j1ywa3{width:100%;padding:var(--onboard-spacing-4, var(--spacing-4));transition:background-color 100ms ease-in-out, - border-color 100ms ease-in-out;border-radius:24px;background:var(--onboard-primary-100, var(--primary-100));border:1px solid;border-color:var(--onboard-primary-300, var(--primary-300));color:var(--onboard-gray-600, var(--gray-600))}.connecting-container.warning.svelte-j1ywa3{background:var(--onboard-warning-100, var(--warning-100));border-color:var(--onboard-warning-400, var(--warning-400))}.text.svelte-j1ywa3{line-height:16px;margin-bottom:var(--onboard-spacing-5, var(--spacing-5))}.text.text-rejected.svelte-j1ywa3{line-height:24px;margin-bottom:0}.subtext.svelte-j1ywa3{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:16px}.rejected-cta.svelte-j1ywa3{color:var(--onboard-primary-500, var(--primary-500))}.onboard-button-primary.svelte-j1ywa3{bottom:var(--onboard-spacing-3, var(--spacing-3))}.ml.svelte-j1ywa3{margin-left:var(--onboard-spacing-4, var(--spacing-4))}@media all and (max-width: 520px){.connecting-container.svelte-j1ywa3{border-radius:var(--onboard-border-radius-4, var(--border-radius-4))}.container.svelte-j1ywa3{padding-bottom:0}.wallet-badges.svelte-j1ywa3{display:none}.connecting-wallet-info.svelte-j1ywa3{margin:0}.onboard-button-primary.svelte-j1ywa3{display:none}}`)}function CW(e){let t,n=e[7](`connect.connectingWallet.${e[5]?"previousConnection":"paragraph"}`,{default:Re.connect.connectingWallet.paragraph,values:{wallet:e[1].label}})+"",r;return{c(){t=K("div"),r=He(n),U(t,"class","subtext svelte-j1ywa3")},m(i,o){oe(i,t,o),H(t,r)},p(i,o){o&162&&n!==(n=i[7](`connect.connectingWallet.${i[5]?"previousConnection":"paragraph"}`,{default:Re.connect.connectingWallet.paragraph,values:{wallet:i[1].label}})+"")&&tt(r,n)},d(i){i&&re(t)}}}function AW(e){let t,n=e[7]("connect.connectingWallet.rejectedCTA",{default:Re.connect.connectingWallet.rejectedCTA,values:{wallet:e[1].label}})+"",r,i,o;return{c(){t=K("div"),r=He(n),U(t,"class","rejected-cta pointer subtext svelte-j1ywa3")},m(s,a){oe(s,t,a),H(t,r),i||(o=qn(t,"click",function(){Es(e[0])&&e[0].apply(this,arguments)}),i=!0)},p(s,a){e=s,a&130&&n!==(n=e[7]("connect.connectingWallet.rejectedCTA",{default:Re.connect.connectingWallet.rejectedCTA,values:{wallet:e[1].label}})+"")&&tt(r,n)},d(s){s&&re(t),i=!1,o()}}}function TW(e){let t,n,r,i,o,s,a,l,u,d,c,f=e[7](`connect.connectingWallet.${e[4]?"rejectedText":"mainText"}`,{default:e[4]?Re.connect.connectingWallet.rejectedText:Re.connect.connectingWallet.mainText,values:{wallet:e[1].label}})+"",m,p,h,y,g=e[7]("connect.connectingWallet.primaryButton",{default:Re.connect.connectingWallet.primaryButton})+"",b,v,w,E;o=new Hf({props:{size:40,padding:8,icon:e[6]&&e[6].icon||jf,border:e[4]||e[5]?"yellow":"blue",background:"lightGray"}}),l=new Hf({props:{size:40,padding:8,border:e[4]||e[5]?"yellow":"blue",background:"white",icon:e[1].icon}});function C(S,A){return S[4]?AW:CW}let k=C(e),_=k(e);return{c(){t=K("div"),n=K("div"),r=K("div"),i=K("div"),ze(o.$$.fragment),s=ve(),a=K("div"),ze(l.$$.fragment),u=ve(),d=K("div"),c=K("div"),m=He(f),p=ve(),_.c(),h=ve(),y=K("button"),b=He(g),U(a,"class","relative"),Ka(a,"right","0.5rem"),U(i,"class","flex justify-center relative wallet-badges svelte-j1ywa3"),U(c,"class","text svelte-j1ywa3"),ye(c,"text-rejected",e[4]),U(d,"class","flex flex-column justify-center ml connecting-wallet-info svelte-j1ywa3"),U(r,"class","flex"),U(n,"class","connecting-container flex justify-between items-center svelte-j1ywa3"),ye(n,"warning",e[4]||e[5]),U(y,"class","onboard-button-primary absolute svelte-j1ywa3"),U(t,"class","container flex flex-column items-center svelte-j1ywa3")},m(S,A){oe(S,t,A),H(t,n),H(n,r),H(r,i),De(o,i,null),H(i,s),H(i,a),De(l,a,null),H(r,u),H(r,d),H(d,c),H(c,m),H(d,p),_.m(d,null),H(t,h),H(t,y),H(y,b),v=!0,w||(E=qn(y,"click",e[9]),w=!0)},p(S,[A]){const I={};A&64&&(I.icon=S[6]&&S[6].icon||jf),A&48&&(I.border=S[4]||S[5]?"yellow":"blue"),o.$set(I);const L={};A&48&&(L.border=S[4]||S[5]?"yellow":"blue"),A&2&&(L.icon=S[1].icon),l.$set(L),(!v||A&146)&&f!==(f=S[7](`connect.connectingWallet.${S[4]?"rejectedText":"mainText"}`,{default:S[4]?Re.connect.connectingWallet.rejectedText:Re.connect.connectingWallet.mainText,values:{wallet:S[1].label}})+"")&&tt(m,f),(!v||A&16)&&ye(c,"text-rejected",S[4]),k===(k=C(S))&&_?_.p(S,A):(_.d(1),_=k(S),_&&(_.c(),_.m(d,null))),(!v||A&48)&&ye(n,"warning",S[4]||S[5]),(!v||A&128)&&g!==(g=S[7]("connect.connectingWallet.primaryButton",{default:Re.connect.connectingWallet.primaryButton})+"")&&tt(b,g)},i(S){v||(X(o.$$.fragment,S),X(l.$$.fragment,S),v=!0)},o(S){ie(o.$$.fragment,S),ie(l.$$.fragment,S),v=!1},d(S){S&&re(t),Fe(o),Fe(l),_.d(),w=!1,E()}}}function IW(e,t,n){let r,i;wt(e,xi,m=>n(7,i=m));let{connectWallet:o}=t,{selectedWallet:s}=t,{deselectWallet:a}=t,{setStep:l}=t,{connectionRejected:u}=t,{previousConnectionRequest:d}=t;const c=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));wt(e,c,m=>n(6,r=m));const f=()=>{a(s.label),l("selectingWallet")};return e.$$set=m=>{"connectWallet"in m&&n(0,o=m.connectWallet),"selectedWallet"in m&&n(1,s=m.selectedWallet),"deselectWallet"in m&&n(2,a=m.deselectWallet),"setStep"in m&&n(3,l=m.setStep),"connectionRejected"in m&&n(4,u=m.connectionRejected),"previousConnectionRequest"in m&&n(5,d=m.previousConnectionRequest)},[o,s,a,l,u,d,r,i,c,f]}class $W extends Gt{constructor(t){super(),qt(this,t,IW,TW,Wt,{connectWallet:0,selectedWallet:1,deselectWallet:2,setStep:3,connectionRejected:4,previousConnectionRequest:5},kW)}}function PW(e){Vt(e,"svelte-1uy2ffh",".outer-container.svelte-1uy2ffh{padding:var(--onboard-spacing-4, var(--spacing-4))}.link.svelte-1uy2ffh{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:16px;color:var(--onboard-primary-500, var(--primary-500));text-decoration:none}")}function H_(e,t,n){const r=e.slice();return r[3]=t[n].name,r[4]=t[n].url,r[6]=n,r}function OW(e){let t=e[1]("connect.selectingWallet.installWallet",{default:Re.connect.selectingWallet.installWallet,values:{app:e[0].name||"this app"}})+"",n;return{c(){n=He(t)},m(r,i){oe(r,n,i)},p(r,i){i&3&&t!==(t=r[1]("connect.selectingWallet.installWallet",{default:Re.connect.selectingWallet.installWallet,values:{app:r[0].name||"this app"}})+"")&&tt(n,t)},d(r){r&&re(n)}}}function RW(e){let t=e[1]("connect.selectingWallet.recommendedWalletsPart1",{default:Re.connect.selectingWallet.recommendedWalletsPart1,values:{app:e[0].name||"This app"}})+"",n,r,i,o=e[1]("connect.selectingWallet.recommendedWalletsPart2",{default:Re.connect.selectingWallet.recommendedWalletsPart2})+"",s,a=e[0].recommendedInjectedWallets,l=[];for(let u=0;un(1,i=s));const o=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));return wt(e,o,s=>n(0,r=s)),[r,i,o]}class MW extends Gt{constructor(t){super(),qt(this,t,NW,BW,Wt,{},PW)}}function jW(e){Vt(e,"svelte-1ct6vh0","button.svelte-1ct6vh0:disabled{opacity:0.5}button.wallet-button-styling.svelte-1ct6vh0{position:relative;align-items:flex-start;flex:1;padding:0;background:none;color:var(--onboard-wallet-button-color, inherit)}.wallet-button-container.svelte-1ct6vh0{display:flex}.wallet-button-container-inner.svelte-1ct6vh0{position:relative;display:flex;flex-flow:column;align-items:center;gap:0.5rem;padding:0.75rem;width:5rem}.name.svelte-1ct6vh0{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:1rem;text-overflow:ellipsis;max-width:5rem;max-height:2rem;overflow:hidden}.status-icon.svelte-1ct6vh0{position:absolute;top:3.5rem;left:3.5rem}@media screen and (min-width: 768px){button.wallet-button-styling.svelte-1ct6vh0{transition:background-color 250ms ease-in-out;background:var(--onboard-wallet-button-background, none);border:1px solid transparent;border-color:var(--onboard-wallet-button-border-color, var(--border-color));border-radius:var(--onboard-wallet-button-border-radius, var(--border-radius-1))}button.wallet-button-styling.svelte-1ct6vh0:hover{background:var(--onboard-wallet-button-background-hover, var(--foreground-color));color:var(--onboard-wallet-button-color-hover)}.wallet-button-container-inner.svelte-1ct6vh0{flex:1;flex-flow:row nowrap;gap:1rem;padding:1rem}button.connected.svelte-1ct6vh0{border-color:var(--onboard-success-500, var(--success-500))}.name.svelte-1ct6vh0{font-size:var(--onboard-font-size-5, var(--font-size-5));line-height:1.25rem;text-align:initial;max-width:inherit;max-height:3rem}.status-icon.svelte-1ct6vh0{top:0;bottom:0;left:auto;right:1rem;margin:auto;height:20px}}")}function W_(e){let t,n,r;return n=new J9({props:{size:20}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","status-icon svelte-1ct6vh0")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function DW(e){let t,n,r,i,o,s,a,l,u,d,c,f;Rn(e[7]),i=new Hf({props:{size:e[6]>=Rt?48:56,icon:e[0],loading:e[4],border:e[3]?"green":"custom",background:"transparent"}});let m=e[3]&&W_();return{c(){t=K("div"),n=K("button"),r=K("div"),ze(i.$$.fragment),o=ve(),s=K("div"),a=He(e[1]),l=ve(),m&&m.c(),U(s,"class","name svelte-1ct6vh0"),U(r,"class","wallet-button-container-inner svelte-1ct6vh0"),U(n,"class","wallet-button-styling svelte-1ct6vh0"),n.disabled=e[5],ye(n,"connected",e[3]),U(t,"class","wallet-button-container svelte-1ct6vh0")},m(p,h){oe(p,t,h),H(t,n),H(n,r),De(i,r,null),H(r,o),H(r,s),H(s,a),H(r,l),m&&m.m(r,null),d=!0,c||(f=[qn(window,"resize",e[7]),qn(n,"click",function(){Es(e[2])&&e[2].apply(this,arguments)})],c=!0)},p(p,[h]){e=p;const y={};h&64&&(y.size=e[6]>=Rt?48:56),h&1&&(y.icon=e[0]),h&16&&(y.loading=e[4]),h&8&&(y.border=e[3]?"green":"custom"),i.$set(y),(!d||h&2)&&tt(a,e[1]),e[3]?m?h&8&&X(m,1):(m=W_(),m.c(),X(m,1),m.m(r,null)):m&&(mt(),ie(m,1,1,()=>{m=null}),gt()),(!d||h&32)&&(n.disabled=e[5]),(!d||h&8)&&ye(n,"connected",e[3])},i(p){d||(X(i.$$.fragment,p),X(m),p&&(u||Rn(()=>{u=Qv(n,Pp,{}),u.start()})),d=!0)},o(p){ie(i.$$.fragment,p),ie(m),d=!1},d(p){p&&re(t),Fe(i),m&&m.d(),c=!1,Ei(f)}}}function FW(e,t,n){let{icon:r}=t,{label:i}=t,{onClick:o}=t,{connected:s}=t,{connecting:a}=t,{disabled:l}=t,u;function d(){n(6,u=window.innerWidth)}return e.$$set=c=>{"icon"in c&&n(0,r=c.icon),"label"in c&&n(1,i=c.label),"onClick"in c&&n(2,o=c.onClick),"connected"in c&&n(3,s=c.connected),"connecting"in c&&n(4,a=c.connecting),"disabled"in c&&n(5,l=c.disabled)},[r,i,o,s,a,l,u,d]}class UW extends Gt{constructor(t){super(),qt(this,t,FW,DW,Wt,{icon:0,label:1,onClick:2,connected:3,connecting:4,disabled:5},jW)}}function HW(e){Vt(e,"svelte-kpc6js",".wallets-container.svelte-kpc6js{display:flex;gap:0.5rem;overflow-x:scroll;overflow-y:hidden;padding:0.75rem 0.5rem;border-bottom:1px solid var(--border-color);-ms-overflow-style:none;scrollbar-width:none}.wallets-container.svelte-kpc6js::-webkit-scrollbar{display:none}.warning-container.svelte-kpc6js{margin:1rem 1rem 0}.notice-container.svelte-kpc6js{flex:0 0 100%;margin-top:0.75rem}@media all and (min-width: 768px){.wallets-container.svelte-kpc6js{display:grid;grid-template-columns:repeat(var(--onboard-wallet-columns, 2), 1fr);padding:1rem;border:none}.notice-container.svelte-kpc6js{grid-column:span 2;margin:0}}")}function V_(e,t,n){const r=e.slice();return r[10]=t[n],r}function q_(e){let t,n,r;return n=new sw({props:{$$slots:{default:[zW]},$$scope:{ctx:e}}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","warning-container svelte-kpc6js")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},p(i,o){const s={};o&8200&&(s.$$scope={dirty:o,ctx:i}),n.$set(s)},i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function zW(e){let t,n;return{c(){t=new bc(!1),n=ct(),t.a=n},m(r,i){t.m(e[3],r,i),oe(r,n,i)},p(r,i){i&8&&t.p(r[3])},d(r){r&&re(n),r&&t.d()}}}function G_(e){let t,n;function r(){return e[9](e[10])}return t=new UW({props:{connected:e[7](e[10].label),connecting:e[2]===e[10].label,label:e[10].label,icon:e[10].icon,onClick:r,disabled:e[4]<=Rt&&e[2]&&e[2]!==e[10].label}}),{c(){ze(t.$$.fragment)},m(i,o){De(t,i,o),n=!0},p(i,o){e=i;const s={};o&1&&(s.connected=e[7](e[10].label)),o&5&&(s.connecting=e[2]===e[10].label),o&1&&(s.label=e[10].label),o&1&&(s.icon=e[10].icon),o&3&&(s.onClick=r),o&21&&(s.disabled=e[4]<=Rt&&e[2]&&e[2]!==e[10].label),t.$set(s)},i(i){n||(X(t.$$.fragment,i),n=!0)},o(i){ie(t.$$.fragment,i),n=!1},d(i){Fe(t,i)}}}function WW(e){let t,n,r;return n=new sw({props:{$$slots:{default:[VW]},$$scope:{ctx:e}}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","notice-container svelte-kpc6js")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},p(i,o){const s={};o&8224&&(s.$$scope={dirty:o,ctx:i}),n.$set(s)},i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function VW(e){let t,n=e[5]("connect.selectingWallet.whyDontISeeMyWallet",{default:Re.connect.selectingWallet.whyDontISeeMyWallet})+"",r,i,o,s=e[5]("connect.selectingWallet.learnMore",{default:Re.connect.selectingWallet.learnMore})+"",a;return{c(){t=K("div"),r=He(n),i=ve(),o=K("a"),a=He(s),U(o,"class","link pointer"),U(o,"href",e[6].wheresMyWalletLink||GW),U(o,"target","_blank"),U(o,"rel","noreferrer noopener")},m(l,u){oe(l,t,u),H(t,r),oe(l,i,u),oe(l,o,u),H(o,a)},p(l,u){u&32&&n!==(n=l[5]("connect.selectingWallet.whyDontISeeMyWallet",{default:Re.connect.selectingWallet.whyDontISeeMyWallet})+"")&&tt(r,n),u&32&&s!==(s=l[5]("connect.selectingWallet.learnMore",{default:Re.connect.selectingWallet.learnMore})+"")&&tt(a,s)},d(l){l&&re(t),l&&re(i),l&&re(o)}}}function qW(e){let t,n,r,i,o,s,a;Rn(e[8]);let l=e[3]&&q_(e),u=e[0],d=[];for(let m=0;mie(d[m],1,1,()=>{d[m]=null});let f=!e[6].removeWhereIsMyWalletWarning&&WW(e);return{c(){t=K("div"),l&&l.c(),n=ve(),r=K("div");for(let m=0;m{l=null}),gt()),p&151){u=m[0];let h;for(h=0;hn(5,r=m));let{wallets:i}=t,{selectWallet:o}=t,{connectingWalletLabel:s}=t,{connectingErrorMessage:a}=t,l;const{connect:u}=xe.get();function d(m){const{wallets:p}=xe.get();return!!p.find(h=>h.label===m)}function c(){n(4,l=window.innerWidth)}const f=m=>o(m);return e.$$set=m=>{"wallets"in m&&n(0,i=m.wallets),"selectWallet"in m&&n(1,o=m.selectWallet),"connectingWalletLabel"in m&&n(2,s=m.connectingWalletLabel),"connectingErrorMessage"in m&&n(3,a=m.connectingErrorMessage)},[i,o,s,a,l,r,u,d,c,f]}class ZW extends Gt{constructor(t){super(),qt(this,t,KW,qW,Wt,{wallets:0,selectWallet:1,connectingWalletLabel:2,connectingErrorMessage:3},HW)}}function XW(e){Vt(e,"svelte-obaru3",`.sidebar.svelte-obaru3{--background-color:var( + )}.connecting-container.svelte-1kfgpsl{padding:var(--onboard-spacing-4, var(--spacing-4));border-radius:var(--onboard-border-radius-1, var(--border-radius-1));background:var(--onboard-success-100, var(--success-100));border:1px solid var(--onboard-success-600, var(--success-600));width:100%}.text.svelte-1kfgpsl{right:var(--onboard-spacing-5, var(--spacing-5))}.tick.svelte-1kfgpsl{color:var(--onboard-success-700, var(--success-700))}`)}function xW(e){let t,n,r,i,o,s,a,l,u,d,c,f,m,p=e[2]("connect.connectedWallet.mainText",{default:Re.connect.connectedWallet.mainText,values:{wallet:e[0].label}})+"",h,y,g,b;return o=new Hf({props:{size:40,padding:8,background:e[1]&&e[1].icon?"lightBlue":"lightGray",border:"darkGreen",icon:e[1]&&e[1].icon||jf}}),l=new J9({props:{size:17}}),c=new Hf({props:{size:40,padding:8,border:"darkGreen",background:"white",icon:e[0].icon}}),{c(){t=K("div"),n=K("div"),r=K("div"),i=K("div"),ze(o.$$.fragment),s=ve(),a=K("div"),ze(l.$$.fragment),u=ve(),d=K("div"),ze(c.$$.fragment),f=ve(),m=K("div"),h=He(p),y=ve(),g=K("div"),U(a,"class","relative"),Za(a,"right","1rem"),Za(a,"top","4px"),Za(a,"z-index","1"),U(d,"class","relative"),Za(d,"right","1.75rem"),U(i,"class","flex justify-center items-end relative"),U(m,"class","text relative svelte-1kfgpsl"),U(r,"class","flex items-center"),U(g,"class","tick flex items-center svelte-1kfgpsl"),Za(g,"width","24px"),U(n,"class","connecting-container flex justify-between items-center svelte-1kfgpsl"),U(t,"class","container svelte-1kfgpsl")},m(v,w){oe(v,t,w),H(t,n),H(n,r),H(r,i),De(o,i,null),H(i,s),H(i,a),De(l,a,null),H(i,u),H(i,d),De(c,d,null),H(r,f),H(r,m),H(m,h),H(n,y),H(n,g),g.innerHTML=t9,b=!0},p(v,[w]){const E={};w&2&&(E.background=v[1]&&v[1].icon?"lightBlue":"lightGray"),w&2&&(E.icon=v[1]&&v[1].icon||jf),o.$set(E);const C={};w&1&&(C.icon=v[0].icon),c.$set(C),(!b||w&5)&&p!==(p=v[2]("connect.connectedWallet.mainText",{default:Re.connect.connectedWallet.mainText,values:{wallet:v[0].label}})+"")&&tt(h,p)},i(v){b||(X(o.$$.fragment,v),X(l.$$.fragment,v),X(c.$$.fragment,v),b=!0)},o(v){ie(o.$$.fragment,v),ie(l.$$.fragment,v),ie(c.$$.fragment,v),b=!1},d(v){v&&re(t),Fe(o),Fe(l),Fe(c)}}}function EW(e,t,n){let r,i;wt(e,xi,a=>n(2,i=a));let{selectedWallet:o}=t;const s=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));return wt(e,s,a=>n(1,r=a)),e.$$set=a=>{"selectedWallet"in a&&n(0,o=a.selectedWallet)},[o,r,i,s]}class SW extends Gt{constructor(t){super(),qt(this,t,EW,xW,Wt,{selectedWallet:0},_W)}}function kW(e){Vt(e,"svelte-j1ywa3",`.container.svelte-j1ywa3{padding:var(--onboard-spacing-4, var(--spacing-4))}.connecting-container.svelte-j1ywa3{width:100%;padding:var(--onboard-spacing-4, var(--spacing-4));transition:background-color 100ms ease-in-out, + border-color 100ms ease-in-out;border-radius:24px;background:var(--onboard-primary-100, var(--primary-100));border:1px solid;border-color:var(--onboard-primary-300, var(--primary-300));color:var(--onboard-gray-600, var(--gray-600))}.connecting-container.warning.svelte-j1ywa3{background:var(--onboard-warning-100, var(--warning-100));border-color:var(--onboard-warning-400, var(--warning-400))}.text.svelte-j1ywa3{line-height:16px;margin-bottom:var(--onboard-spacing-5, var(--spacing-5))}.text.text-rejected.svelte-j1ywa3{line-height:24px;margin-bottom:0}.subtext.svelte-j1ywa3{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:16px}.rejected-cta.svelte-j1ywa3{color:var(--onboard-primary-500, var(--primary-500))}.onboard-button-primary.svelte-j1ywa3{bottom:var(--onboard-spacing-3, var(--spacing-3))}.ml.svelte-j1ywa3{margin-left:var(--onboard-spacing-4, var(--spacing-4))}@media all and (max-width: 520px){.connecting-container.svelte-j1ywa3{border-radius:var(--onboard-border-radius-4, var(--border-radius-4))}.container.svelte-j1ywa3{padding-bottom:0}.wallet-badges.svelte-j1ywa3{display:none}.connecting-wallet-info.svelte-j1ywa3{margin:0}.onboard-button-primary.svelte-j1ywa3{display:none}}`)}function CW(e){let t,n=e[7](`connect.connectingWallet.${e[5]?"previousConnection":"paragraph"}`,{default:Re.connect.connectingWallet.paragraph,values:{wallet:e[1].label}})+"",r;return{c(){t=K("div"),r=He(n),U(t,"class","subtext svelte-j1ywa3")},m(i,o){oe(i,t,o),H(t,r)},p(i,o){o&162&&n!==(n=i[7](`connect.connectingWallet.${i[5]?"previousConnection":"paragraph"}`,{default:Re.connect.connectingWallet.paragraph,values:{wallet:i[1].label}})+"")&&tt(r,n)},d(i){i&&re(t)}}}function AW(e){let t,n=e[7]("connect.connectingWallet.rejectedCTA",{default:Re.connect.connectingWallet.rejectedCTA,values:{wallet:e[1].label}})+"",r,i,o;return{c(){t=K("div"),r=He(n),U(t,"class","rejected-cta pointer subtext svelte-j1ywa3")},m(s,a){oe(s,t,a),H(t,r),i||(o=qn(t,"click",function(){Es(e[0])&&e[0].apply(this,arguments)}),i=!0)},p(s,a){e=s,a&130&&n!==(n=e[7]("connect.connectingWallet.rejectedCTA",{default:Re.connect.connectingWallet.rejectedCTA,values:{wallet:e[1].label}})+"")&&tt(r,n)},d(s){s&&re(t),i=!1,o()}}}function TW(e){let t,n,r,i,o,s,a,l,u,d,c,f=e[7](`connect.connectingWallet.${e[4]?"rejectedText":"mainText"}`,{default:e[4]?Re.connect.connectingWallet.rejectedText:Re.connect.connectingWallet.mainText,values:{wallet:e[1].label}})+"",m,p,h,y,g=e[7]("connect.connectingWallet.primaryButton",{default:Re.connect.connectingWallet.primaryButton})+"",b,v,w,E;o=new Hf({props:{size:40,padding:8,icon:e[6]&&e[6].icon||jf,border:e[4]||e[5]?"yellow":"blue",background:"lightGray"}}),l=new Hf({props:{size:40,padding:8,border:e[4]||e[5]?"yellow":"blue",background:"white",icon:e[1].icon}});function C(S,A){return S[4]?AW:CW}let k=C(e),_=k(e);return{c(){t=K("div"),n=K("div"),r=K("div"),i=K("div"),ze(o.$$.fragment),s=ve(),a=K("div"),ze(l.$$.fragment),u=ve(),d=K("div"),c=K("div"),m=He(f),p=ve(),_.c(),h=ve(),y=K("button"),b=He(g),U(a,"class","relative"),Za(a,"right","0.5rem"),U(i,"class","flex justify-center relative wallet-badges svelte-j1ywa3"),U(c,"class","text svelte-j1ywa3"),ye(c,"text-rejected",e[4]),U(d,"class","flex flex-column justify-center ml connecting-wallet-info svelte-j1ywa3"),U(r,"class","flex"),U(n,"class","connecting-container flex justify-between items-center svelte-j1ywa3"),ye(n,"warning",e[4]||e[5]),U(y,"class","onboard-button-primary absolute svelte-j1ywa3"),U(t,"class","container flex flex-column items-center svelte-j1ywa3")},m(S,A){oe(S,t,A),H(t,n),H(n,r),H(r,i),De(o,i,null),H(i,s),H(i,a),De(l,a,null),H(r,u),H(r,d),H(d,c),H(c,m),H(d,p),_.m(d,null),H(t,h),H(t,y),H(y,b),v=!0,w||(E=qn(y,"click",e[9]),w=!0)},p(S,[A]){const I={};A&64&&(I.icon=S[6]&&S[6].icon||jf),A&48&&(I.border=S[4]||S[5]?"yellow":"blue"),o.$set(I);const L={};A&48&&(L.border=S[4]||S[5]?"yellow":"blue"),A&2&&(L.icon=S[1].icon),l.$set(L),(!v||A&146)&&f!==(f=S[7](`connect.connectingWallet.${S[4]?"rejectedText":"mainText"}`,{default:S[4]?Re.connect.connectingWallet.rejectedText:Re.connect.connectingWallet.mainText,values:{wallet:S[1].label}})+"")&&tt(m,f),(!v||A&16)&&ye(c,"text-rejected",S[4]),k===(k=C(S))&&_?_.p(S,A):(_.d(1),_=k(S),_&&(_.c(),_.m(d,null))),(!v||A&48)&&ye(n,"warning",S[4]||S[5]),(!v||A&128)&&g!==(g=S[7]("connect.connectingWallet.primaryButton",{default:Re.connect.connectingWallet.primaryButton})+"")&&tt(b,g)},i(S){v||(X(o.$$.fragment,S),X(l.$$.fragment,S),v=!0)},o(S){ie(o.$$.fragment,S),ie(l.$$.fragment,S),v=!1},d(S){S&&re(t),Fe(o),Fe(l),_.d(),w=!1,E()}}}function IW(e,t,n){let r,i;wt(e,xi,m=>n(7,i=m));let{connectWallet:o}=t,{selectedWallet:s}=t,{deselectWallet:a}=t,{setStep:l}=t,{connectionRejected:u}=t,{previousConnectionRequest:d}=t;const c=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));wt(e,c,m=>n(6,r=m));const f=()=>{a(s.label),l("selectingWallet")};return e.$$set=m=>{"connectWallet"in m&&n(0,o=m.connectWallet),"selectedWallet"in m&&n(1,s=m.selectedWallet),"deselectWallet"in m&&n(2,a=m.deselectWallet),"setStep"in m&&n(3,l=m.setStep),"connectionRejected"in m&&n(4,u=m.connectionRejected),"previousConnectionRequest"in m&&n(5,d=m.previousConnectionRequest)},[o,s,a,l,u,d,r,i,c,f]}class $W extends Gt{constructor(t){super(),qt(this,t,IW,TW,Wt,{connectWallet:0,selectedWallet:1,deselectWallet:2,setStep:3,connectionRejected:4,previousConnectionRequest:5},kW)}}function PW(e){Vt(e,"svelte-1uy2ffh",".outer-container.svelte-1uy2ffh{padding:var(--onboard-spacing-4, var(--spacing-4))}.link.svelte-1uy2ffh{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:16px;color:var(--onboard-primary-500, var(--primary-500));text-decoration:none}")}function z_(e,t,n){const r=e.slice();return r[3]=t[n].name,r[4]=t[n].url,r[6]=n,r}function OW(e){let t=e[1]("connect.selectingWallet.installWallet",{default:Re.connect.selectingWallet.installWallet,values:{app:e[0].name||"this app"}})+"",n;return{c(){n=He(t)},m(r,i){oe(r,n,i)},p(r,i){i&3&&t!==(t=r[1]("connect.selectingWallet.installWallet",{default:Re.connect.selectingWallet.installWallet,values:{app:r[0].name||"this app"}})+"")&&tt(n,t)},d(r){r&&re(n)}}}function RW(e){let t=e[1]("connect.selectingWallet.recommendedWalletsPart1",{default:Re.connect.selectingWallet.recommendedWalletsPart1,values:{app:e[0].name||"This app"}})+"",n,r,i,o=e[1]("connect.selectingWallet.recommendedWalletsPart2",{default:Re.connect.selectingWallet.recommendedWalletsPart2})+"",s,a=e[0].recommendedInjectedWallets,l=[];for(let u=0;un(1,i=s));const o=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));return wt(e,o,s=>n(0,r=s)),[r,i,o]}class MW extends Gt{constructor(t){super(),qt(this,t,NW,BW,Wt,{},PW)}}function jW(e){Vt(e,"svelte-1ct6vh0","button.svelte-1ct6vh0:disabled{opacity:0.5}button.wallet-button-styling.svelte-1ct6vh0{position:relative;align-items:flex-start;flex:1;padding:0;background:none;color:var(--onboard-wallet-button-color, inherit)}.wallet-button-container.svelte-1ct6vh0{display:flex}.wallet-button-container-inner.svelte-1ct6vh0{position:relative;display:flex;flex-flow:column;align-items:center;gap:0.5rem;padding:0.75rem;width:5rem}.name.svelte-1ct6vh0{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:1rem;text-overflow:ellipsis;max-width:5rem;max-height:2rem;overflow:hidden}.status-icon.svelte-1ct6vh0{position:absolute;top:3.5rem;left:3.5rem}@media screen and (min-width: 768px){button.wallet-button-styling.svelte-1ct6vh0{transition:background-color 250ms ease-in-out;background:var(--onboard-wallet-button-background, none);border:1px solid transparent;border-color:var(--onboard-wallet-button-border-color, var(--border-color));border-radius:var(--onboard-wallet-button-border-radius, var(--border-radius-1))}button.wallet-button-styling.svelte-1ct6vh0:hover{background:var(--onboard-wallet-button-background-hover, var(--foreground-color));color:var(--onboard-wallet-button-color-hover)}.wallet-button-container-inner.svelte-1ct6vh0{flex:1;flex-flow:row nowrap;gap:1rem;padding:1rem}button.connected.svelte-1ct6vh0{border-color:var(--onboard-success-500, var(--success-500))}.name.svelte-1ct6vh0{font-size:var(--onboard-font-size-5, var(--font-size-5));line-height:1.25rem;text-align:initial;max-width:inherit;max-height:3rem}.status-icon.svelte-1ct6vh0{top:0;bottom:0;left:auto;right:1rem;margin:auto;height:20px}}")}function V_(e){let t,n,r;return n=new J9({props:{size:20}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","status-icon svelte-1ct6vh0")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function DW(e){let t,n,r,i,o,s,a,l,u,d,c,f;Rn(e[7]),i=new Hf({props:{size:e[6]>=Rt?48:56,icon:e[0],loading:e[4],border:e[3]?"green":"custom",background:"transparent"}});let m=e[3]&&V_();return{c(){t=K("div"),n=K("button"),r=K("div"),ze(i.$$.fragment),o=ve(),s=K("div"),a=He(e[1]),l=ve(),m&&m.c(),U(s,"class","name svelte-1ct6vh0"),U(r,"class","wallet-button-container-inner svelte-1ct6vh0"),U(n,"class","wallet-button-styling svelte-1ct6vh0"),n.disabled=e[5],ye(n,"connected",e[3]),U(t,"class","wallet-button-container svelte-1ct6vh0")},m(p,h){oe(p,t,h),H(t,n),H(n,r),De(i,r,null),H(r,o),H(r,s),H(s,a),H(r,l),m&&m.m(r,null),d=!0,c||(f=[qn(window,"resize",e[7]),qn(n,"click",function(){Es(e[2])&&e[2].apply(this,arguments)})],c=!0)},p(p,[h]){e=p;const y={};h&64&&(y.size=e[6]>=Rt?48:56),h&1&&(y.icon=e[0]),h&16&&(y.loading=e[4]),h&8&&(y.border=e[3]?"green":"custom"),i.$set(y),(!d||h&2)&&tt(a,e[1]),e[3]?m?h&8&&X(m,1):(m=V_(),m.c(),X(m,1),m.m(r,null)):m&&(mt(),ie(m,1,1,()=>{m=null}),gt()),(!d||h&32)&&(n.disabled=e[5]),(!d||h&8)&&ye(n,"connected",e[3])},i(p){d||(X(i.$$.fragment,p),X(m),p&&(u||Rn(()=>{u=Jv(n,Pp,{}),u.start()})),d=!0)},o(p){ie(i.$$.fragment,p),ie(m),d=!1},d(p){p&&re(t),Fe(i),m&&m.d(),c=!1,Ei(f)}}}function FW(e,t,n){let{icon:r}=t,{label:i}=t,{onClick:o}=t,{connected:s}=t,{connecting:a}=t,{disabled:l}=t,u;function d(){n(6,u=window.innerWidth)}return e.$$set=c=>{"icon"in c&&n(0,r=c.icon),"label"in c&&n(1,i=c.label),"onClick"in c&&n(2,o=c.onClick),"connected"in c&&n(3,s=c.connected),"connecting"in c&&n(4,a=c.connecting),"disabled"in c&&n(5,l=c.disabled)},[r,i,o,s,a,l,u,d]}class UW extends Gt{constructor(t){super(),qt(this,t,FW,DW,Wt,{icon:0,label:1,onClick:2,connected:3,connecting:4,disabled:5},jW)}}function HW(e){Vt(e,"svelte-kpc6js",".wallets-container.svelte-kpc6js{display:flex;gap:0.5rem;overflow-x:scroll;overflow-y:hidden;padding:0.75rem 0.5rem;border-bottom:1px solid var(--border-color);-ms-overflow-style:none;scrollbar-width:none}.wallets-container.svelte-kpc6js::-webkit-scrollbar{display:none}.warning-container.svelte-kpc6js{margin:1rem 1rem 0}.notice-container.svelte-kpc6js{flex:0 0 100%;margin-top:0.75rem}@media all and (min-width: 768px){.wallets-container.svelte-kpc6js{display:grid;grid-template-columns:repeat(var(--onboard-wallet-columns, 2), 1fr);padding:1rem;border:none}.notice-container.svelte-kpc6js{grid-column:span 2;margin:0}}")}function q_(e,t,n){const r=e.slice();return r[10]=t[n],r}function G_(e){let t,n,r;return n=new aw({props:{$$slots:{default:[zW]},$$scope:{ctx:e}}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","warning-container svelte-kpc6js")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},p(i,o){const s={};o&8200&&(s.$$scope={dirty:o,ctx:i}),n.$set(s)},i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function zW(e){let t,n;return{c(){t=new bc(!1),n=ct(),t.a=n},m(r,i){t.m(e[3],r,i),oe(r,n,i)},p(r,i){i&8&&t.p(r[3])},d(r){r&&re(n),r&&t.d()}}}function K_(e){let t,n;function r(){return e[9](e[10])}return t=new UW({props:{connected:e[7](e[10].label),connecting:e[2]===e[10].label,label:e[10].label,icon:e[10].icon,onClick:r,disabled:e[4]<=Rt&&e[2]&&e[2]!==e[10].label}}),{c(){ze(t.$$.fragment)},m(i,o){De(t,i,o),n=!0},p(i,o){e=i;const s={};o&1&&(s.connected=e[7](e[10].label)),o&5&&(s.connecting=e[2]===e[10].label),o&1&&(s.label=e[10].label),o&1&&(s.icon=e[10].icon),o&3&&(s.onClick=r),o&21&&(s.disabled=e[4]<=Rt&&e[2]&&e[2]!==e[10].label),t.$set(s)},i(i){n||(X(t.$$.fragment,i),n=!0)},o(i){ie(t.$$.fragment,i),n=!1},d(i){Fe(t,i)}}}function WW(e){let t,n,r;return n=new aw({props:{$$slots:{default:[VW]},$$scope:{ctx:e}}}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","notice-container svelte-kpc6js")},m(i,o){oe(i,t,o),De(n,t,null),r=!0},p(i,o){const s={};o&8224&&(s.$$scope={dirty:o,ctx:i}),n.$set(s)},i(i){r||(X(n.$$.fragment,i),r=!0)},o(i){ie(n.$$.fragment,i),r=!1},d(i){i&&re(t),Fe(n)}}}function VW(e){let t,n=e[5]("connect.selectingWallet.whyDontISeeMyWallet",{default:Re.connect.selectingWallet.whyDontISeeMyWallet})+"",r,i,o,s=e[5]("connect.selectingWallet.learnMore",{default:Re.connect.selectingWallet.learnMore})+"",a;return{c(){t=K("div"),r=He(n),i=ve(),o=K("a"),a=He(s),U(o,"class","link pointer"),U(o,"href",e[6].wheresMyWalletLink||GW),U(o,"target","_blank"),U(o,"rel","noreferrer noopener")},m(l,u){oe(l,t,u),H(t,r),oe(l,i,u),oe(l,o,u),H(o,a)},p(l,u){u&32&&n!==(n=l[5]("connect.selectingWallet.whyDontISeeMyWallet",{default:Re.connect.selectingWallet.whyDontISeeMyWallet})+"")&&tt(r,n),u&32&&s!==(s=l[5]("connect.selectingWallet.learnMore",{default:Re.connect.selectingWallet.learnMore})+"")&&tt(a,s)},d(l){l&&re(t),l&&re(i),l&&re(o)}}}function qW(e){let t,n,r,i,o,s,a;Rn(e[8]);let l=e[3]&&G_(e),u=e[0],d=[];for(let m=0;mie(d[m],1,1,()=>{d[m]=null});let f=!e[6].removeWhereIsMyWalletWarning&&WW(e);return{c(){t=K("div"),l&&l.c(),n=ve(),r=K("div");for(let m=0;m{l=null}),gt()),p&151){u=m[0];let h;for(h=0;hn(5,r=m));let{wallets:i}=t,{selectWallet:o}=t,{connectingWalletLabel:s}=t,{connectingErrorMessage:a}=t,l;const{connect:u}=xe.get();function d(m){const{wallets:p}=xe.get();return!!p.find(h=>h.label===m)}function c(){n(4,l=window.innerWidth)}const f=m=>o(m);return e.$$set=m=>{"wallets"in m&&n(0,i=m.wallets),"selectWallet"in m&&n(1,o=m.selectWallet),"connectingWalletLabel"in m&&n(2,s=m.connectingWalletLabel),"connectingErrorMessage"in m&&n(3,a=m.connectingErrorMessage)},[i,o,s,a,l,r,u,d,c,f]}class ZW extends Gt{constructor(t){super(),qt(this,t,KW,qW,Wt,{wallets:0,selectWallet:1,connectingWalletLabel:2,connectingErrorMessage:3},HW)}}function XW(e){Vt(e,"svelte-obaru3",`.sidebar.svelte-obaru3{--background-color:var( --onboard-connect-sidebar-background, var(--w3o-foreground-color, none) );--text-color:var(--onboard-connect-sidebar-color, inherit);--border-color:var(--onboard-connect-sidebar-border-color, inherit);display:flex;flex-flow:column;gap:1rem;padding:1rem;align-items:center}.inner-container.svelte-obaru3{display:flex;flex-flow:column;align-items:center;align-self:stretch;gap:0.5rem;padding:1.5rem;text-align:center;border:1px solid transparent;border-radius:12px;border-color:var(--border-color);background:var(--background-color);color:var(--text-color)}.icon-container.svelte-obaru3{display:flex;height:3.5rem;width:auto;min-width:3.5rem;max-width:100%}.heading.svelte-obaru3{font-size:var(--onboard-font-size-3, var(--font-size-3));margin:0 0 var(--onboard-spacing-5, var(--spacing-5)) 0}.subheading.svelte-obaru3{line-height:1rem}.description.svelte-obaru3{line-height:1.25rem;font-size:var(--onboard-font-size-6, var(--font-size-6))}img.svelte-obaru3{max-width:100%;height:auto}.indicators.svelte-obaru3{margin-top:auto}.indicator.svelte-obaru3{box-sizing:content-box;width:8px;height:8px;border-radius:8px;background:var( @@ -2420,10 +2420,10 @@ Note: there are at least one loader still registered to this locale that wasn't );transition:background 250ms ease-in-out}.join.active.svelte-obaru3{background:var( --onboard-connect-sidebar-progress-color, var(--action-color) - )}.no-link.svelte-obaru3{display:flex;flex-direction:row;align-items:center;padding:0.25rem 0.5rem 0.25rem 0.75rem;gap:0.25rem;font-size:var(--onboard-font-size-6, var(--font-size-6))}.info-icon.svelte-obaru3{width:1.25rem;display:flex;align-items:center}@media all and (min-width: 768px){.sidebar.svelte-obaru3{max-width:280px;border-right:1px solid;border-color:var(--border-color);background:var(--background-color)}.inner-container.svelte-obaru3{border:none;text-align:initial;flex:1;align-items:flex-start;gap:1rem}.indicators.svelte-obaru3{margin-bottom:0.25rem}}`)}function K_(e){let t,n,r=e[3](`connect.${e[0]}.sidebar.header`,{default:""}),i;function o(u,d){return u[2]&&(u[2].logo||u[2].icon)?QW:YW}let s=o(e),a=s(e),l=r&&Z_(e);return{c(){t=K("div"),a.c(),n=ve(),l&&l.c(),i=ct(),U(t,"class","icon-container svelte-obaru3")},m(u,d){oe(u,t,d),a.m(t,null),oe(u,n,d),l&&l.m(u,d),oe(u,i,d)},p(u,d){s===(s=o(u))&&a?a.p(u,d):(a.d(1),a=s(u),a&&(a.c(),a.m(t,null))),d&9&&(r=u[3](`connect.${u[0]}.sidebar.header`,{default:""})),r?l?l.p(u,d):(l=Z_(u),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null)},d(u){u&&re(t),a.d(),u&&re(n),l&&l.d(u),u&&re(i)}}}function YW(e){let t,n;return{c(){t=new bc(!1),n=ct(),t.a=n},m(r,i){t.m(e9,r,i),oe(r,n,i)},p:ee,d(r){r&&re(n),r&&t.d()}}}function QW(e){let t,n;function r(s,a){return a&4&&(t=null),t==null&&(t=!!Fv(s[2].logo||s[2].icon)),t?eV:JW}let i=r(e,-1),o=i(e);return{c(){o.c(),n=ct()},m(s,a){o.m(s,a),oe(s,n,a)},p(s,a){i===(i=r(s,a))&&o?o.p(s,a):(o.d(1),o=i(s),o&&(o.c(),o.m(n.parentNode,n)))},d(s){o.d(s),s&&re(n)}}}function JW(e){let t,n;return{c(){t=K("img"),ec(t.src,n=e[2].logo||e[2].icon)||U(t,"src",n),U(t,"alt","logo"),U(t,"class","svelte-obaru3")},m(r,i){oe(r,t,i)},p(r,i){i&4&&!ec(t.src,n=r[2].logo||r[2].icon)&&U(t,"src",n)},d(r){r&&re(t)}}}function eV(e){let t,n=(e[2].logo||e[2].icon)+"",r;return{c(){t=new bc(!1),r=He("​"),t.a=r},m(i,o){t.m(n,i,o),oe(i,r,o)},p(i,o){o&4&&n!==(n=(i[2].logo||i[2].icon)+"")&&t.p(n)},d(i){i&&t.d(),i&&re(r)}}}function Z_(e){let t,n=e[3](`connect.${e[0]}.sidebar.header`,{default:e[7]})+"",r;return{c(){t=K("div"),r=He(n),U(t,"class","heading svelte-obaru3")},m(i,o){oe(i,t,o),H(t,r)},p(i,o){o&9&&n!==(n=i[3](`connect.${i[0]}.sidebar.header`,{default:i[7]})+"")&&tt(r,n)},d(i){i&&re(t)}}}function tV(e){let t,n=e[3]("connect.selectingWallet.sidebar.IDontHaveAWallet",{default:Re.connect.selectingWallet.sidebar.IDontHaveAWallet})+"",r,i,o;return{c(){t=K("a"),r=He(n),i=ve(),o=K("div"),U(o,"class","info-icon svelte-obaru3"),U(t,"href",e[4].iDontHaveAWalletLink||"https://ethereum.org/en/wallets/find-wallet/#main-content"),U(t,"target","_blank"),U(t,"rel","noreferrer noopener"),U(t,"class","no-link svelte-obaru3")},m(s,a){oe(s,t,a),H(t,r),H(t,i),H(t,o),o.innerHTML=L0},p(s,a){a&8&&n!==(n=s[3]("connect.selectingWallet.sidebar.IDontHaveAWallet",{default:Re.connect.selectingWallet.sidebar.IDontHaveAWallet})+"")&&tt(r,n)},d(s){s&&re(t)}}}function X_(e){let t,n,r,i,o,s,a,l,u,d,c,f;return{c(){t=K("div"),n=K("div"),r=ve(),i=K("div"),s=ve(),a=K("div"),l=ve(),u=K("div"),c=ve(),f=K("div"),U(n,"class","indicator relative svelte-obaru3"),ye(n,"on",!0),U(i,"class","join relative svelte-obaru3"),U(i,"style",o=`${e[0]!=="selectingWallet"?"right: 4px; width: 52px;":"right: 2px; width: 54px;"}`),ye(i,"active",e[0]!=="selectingWallet"),U(a,"class","indicator relative svelte-obaru3"),U(a,"style","right: 8px;"),ye(a,"on",e[0]!=="selectingWallet"),U(u,"class","join relative svelte-obaru3"),U(u,"style",d=`${e[0]==="connectedWallet"?"right: 12px; width: 52px;":"right: 10px; width: 54px;"}`),ye(u,"active",e[0]==="connectedWallet"),U(f,"style","right: 16px;"),U(f,"class","indicator relative svelte-obaru3"),ye(f,"on",e[0]==="connectedWallet"),U(t,"class","indicators flex items-center svelte-obaru3")},m(m,p){oe(m,t,p),H(t,n),H(t,r),H(t,i),H(t,s),H(t,a),H(t,l),H(t,u),H(t,c),H(t,f)},p(m,p){p&1&&o!==(o=`${m[0]!=="selectingWallet"?"right: 4px; width: 52px;":"right: 2px; width: 54px;"}`)&&U(i,"style",o),p&1&&ye(i,"active",m[0]!=="selectingWallet"),p&1&&ye(a,"on",m[0]!=="selectingWallet"),p&1&&d!==(d=`${m[0]==="connectedWallet"?"right: 12px; width: 52px;":"right: 10px; width: 54px;"}`)&&U(u,"style",d),p&1&&ye(u,"active",m[0]==="connectedWallet"),p&1&&ye(f,"on",m[0]==="connectedWallet")},d(m){m&&re(t)}}}function Y_(e){let t,n,r,i,o,s,a,l,u,d,c,f;return{c(){t=K("div"),n=K("div"),r=ve(),i=K("div"),s=ve(),a=K("div"),l=ve(),u=K("div"),c=ve(),f=K("div"),U(n,"class","indicator relative svelte-obaru3"),ye(n,"on",!0),U(i,"class","join relative svelte-obaru3"),U(i,"style",o=`right: 2px; ${e[0]!=="selectingWallet"?"width: 78px;":"width: 82px;"}`),ye(i,"active",e[0]!=="selectingWallet"),U(a,"class","indicator relative svelte-obaru3"),U(a,"style","right: 4px;"),ye(a,"on",e[0]!=="selectingWallet"),U(u,"class","join relative svelte-obaru3"),U(u,"style",d=`right: 6px; ${e[0]==="connectedWallet"?"width: 74px;":"width: 81px;"}`),ye(u,"active",e[0]==="connectedWallet"),U(f,"style","right: 8px;"),U(f,"class","indicator relative svelte-obaru3"),ye(f,"on",e[0]==="connectedWallet"),U(t,"class","indicators flex items-center svelte-obaru3")},m(m,p){oe(m,t,p),H(t,n),H(t,r),H(t,i),H(t,s),H(t,a),H(t,l),H(t,u),H(t,c),H(t,f)},p(m,p){p&1&&o!==(o=`right: 2px; ${m[0]!=="selectingWallet"?"width: 78px;":"width: 82px;"}`)&&U(i,"style",o),p&1&&ye(i,"active",m[0]!=="selectingWallet"),p&1&&ye(a,"on",m[0]!=="selectingWallet"),p&1&&d!==(d=`right: 6px; ${m[0]==="connectedWallet"?"width: 74px;":"width: 81px;"}`)&&U(u,"style",d),p&1&&ye(u,"active",m[0]==="connectedWallet"),p&1&&ye(f,"on",m[0]==="connectedWallet")},d(m){m&&re(t)}}}function nV(e){let t,n,r,i,o=e[3](`connect.${e[0]}.sidebar.subheading`,{default:e[5]})+"",s,a,l,u=e[3](`connect.${e[0]}.sidebar.paragraph`,{values:{app:e[2]&&e[2].name||"This App"},default:e[6]})+"",d,c,f,m,p,h,y,g;Rn(e[9]);let b=e[1]>=Rt&&K_(e),v=!e[4].removeIDontHaveAWalletInfoLink&&tV(e),w=e[1]=Rt&&Y_(e);return{c(){t=K("div"),n=K("div"),b&&b.c(),r=ve(),i=K("div"),s=He(o),a=ve(),l=K("div"),d=He(u),c=ve(),v&&v.c(),f=ve(),w&&w.c(),m=ve(),E&&E.c(),p=ve(),h=K("div"),U(i,"class","subheading svelte-obaru3"),U(l,"class","description svelte-obaru3"),U(n,"class","inner-container svelte-obaru3"),U(t,"class","sidebar svelte-obaru3")},m(C,k){oe(C,t,k),H(t,n),b&&b.m(n,null),H(n,r),H(n,i),H(i,s),H(n,a),H(n,l),H(l,d),H(n,c),v&&v.m(n,null),H(n,f),w&&w.m(n,null),H(t,m),E&&E.m(t,null),H(t,p),H(t,h),h.innerHTML=CU,y||(g=qn(window,"resize",e[9]),y=!0)},p(C,[k]){C[1]>=Rt?b?b.p(C,k):(b=K_(C),b.c(),b.m(n,r)):b&&(b.d(1),b=null),k&9&&o!==(o=C[3](`connect.${C[0]}.sidebar.subheading`,{default:C[5]})+"")&&tt(s,o),k&13&&u!==(u=C[3](`connect.${C[0]}.sidebar.paragraph`,{values:{app:C[2]&&C[2].name||"This App"},default:C[6]})+"")&&tt(d,u),C[4].removeIDontHaveAWalletInfoLink||v.p(C,k),C[1]=Rt?E?E.p(C,k):(E=Y_(C),E.c(),E.m(t,p)):E&&(E.d(1),E=null)},i:ee,o:ee,d(C){C&&re(t),b&&b.d(),v&&v.d(),w&&w.d(),E&&E.d(),y=!1,g()}}}function rV(e,t,n){let r,i;wt(e,xi,p=>n(3,i=p));let{step:o}=t;const{connect:s}=xe.get(),a=Re.connect[o].sidebar,{subheading:l,paragraph:u}=a,{heading:d}=a;let c;const f=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));wt(e,f,p=>n(2,r=p));function m(){n(1,c=window.innerWidth)}return e.$$set=p=>{"step"in p&&n(0,o=p.step)},[o,c,r,i,s,l,u,d,f,m]}class iV extends Gt{constructor(t){super(),qt(this,t,rV,nV,Wt,{step:0},XW)}}function oV(e){Vt(e,"svelte-1qwmck3",`.container.svelte-1qwmck3{--background-color:var( + )}.no-link.svelte-obaru3{display:flex;flex-direction:row;align-items:center;padding:0.25rem 0.5rem 0.25rem 0.75rem;gap:0.25rem;font-size:var(--onboard-font-size-6, var(--font-size-6))}.info-icon.svelte-obaru3{width:1.25rem;display:flex;align-items:center}@media all and (min-width: 768px){.sidebar.svelte-obaru3{max-width:280px;border-right:1px solid;border-color:var(--border-color);background:var(--background-color)}.inner-container.svelte-obaru3{border:none;text-align:initial;flex:1;align-items:flex-start;gap:1rem}.indicators.svelte-obaru3{margin-bottom:0.25rem}}`)}function Z_(e){let t,n,r=e[3](`connect.${e[0]}.sidebar.header`,{default:""}),i;function o(u,d){return u[2]&&(u[2].logo||u[2].icon)?QW:YW}let s=o(e),a=s(e),l=r&&X_(e);return{c(){t=K("div"),a.c(),n=ve(),l&&l.c(),i=ct(),U(t,"class","icon-container svelte-obaru3")},m(u,d){oe(u,t,d),a.m(t,null),oe(u,n,d),l&&l.m(u,d),oe(u,i,d)},p(u,d){s===(s=o(u))&&a?a.p(u,d):(a.d(1),a=s(u),a&&(a.c(),a.m(t,null))),d&9&&(r=u[3](`connect.${u[0]}.sidebar.header`,{default:""})),r?l?l.p(u,d):(l=X_(u),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null)},d(u){u&&re(t),a.d(),u&&re(n),l&&l.d(u),u&&re(i)}}}function YW(e){let t,n;return{c(){t=new bc(!1),n=ct(),t.a=n},m(r,i){t.m(e9,r,i),oe(r,n,i)},p:ee,d(r){r&&re(n),r&&t.d()}}}function QW(e){let t,n;function r(s,a){return a&4&&(t=null),t==null&&(t=!!Uv(s[2].logo||s[2].icon)),t?eV:JW}let i=r(e,-1),o=i(e);return{c(){o.c(),n=ct()},m(s,a){o.m(s,a),oe(s,n,a)},p(s,a){i===(i=r(s,a))&&o?o.p(s,a):(o.d(1),o=i(s),o&&(o.c(),o.m(n.parentNode,n)))},d(s){o.d(s),s&&re(n)}}}function JW(e){let t,n;return{c(){t=K("img"),tc(t.src,n=e[2].logo||e[2].icon)||U(t,"src",n),U(t,"alt","logo"),U(t,"class","svelte-obaru3")},m(r,i){oe(r,t,i)},p(r,i){i&4&&!tc(t.src,n=r[2].logo||r[2].icon)&&U(t,"src",n)},d(r){r&&re(t)}}}function eV(e){let t,n=(e[2].logo||e[2].icon)+"",r;return{c(){t=new bc(!1),r=He("​"),t.a=r},m(i,o){t.m(n,i,o),oe(i,r,o)},p(i,o){o&4&&n!==(n=(i[2].logo||i[2].icon)+"")&&t.p(n)},d(i){i&&t.d(),i&&re(r)}}}function X_(e){let t,n=e[3](`connect.${e[0]}.sidebar.header`,{default:e[7]})+"",r;return{c(){t=K("div"),r=He(n),U(t,"class","heading svelte-obaru3")},m(i,o){oe(i,t,o),H(t,r)},p(i,o){o&9&&n!==(n=i[3](`connect.${i[0]}.sidebar.header`,{default:i[7]})+"")&&tt(r,n)},d(i){i&&re(t)}}}function tV(e){let t,n=e[3]("connect.selectingWallet.sidebar.IDontHaveAWallet",{default:Re.connect.selectingWallet.sidebar.IDontHaveAWallet})+"",r,i,o;return{c(){t=K("a"),r=He(n),i=ve(),o=K("div"),U(o,"class","info-icon svelte-obaru3"),U(t,"href",e[4].iDontHaveAWalletLink||"https://ethereum.org/en/wallets/find-wallet/#main-content"),U(t,"target","_blank"),U(t,"rel","noreferrer noopener"),U(t,"class","no-link svelte-obaru3")},m(s,a){oe(s,t,a),H(t,r),H(t,i),H(t,o),o.innerHTML=L0},p(s,a){a&8&&n!==(n=s[3]("connect.selectingWallet.sidebar.IDontHaveAWallet",{default:Re.connect.selectingWallet.sidebar.IDontHaveAWallet})+"")&&tt(r,n)},d(s){s&&re(t)}}}function Y_(e){let t,n,r,i,o,s,a,l,u,d,c,f;return{c(){t=K("div"),n=K("div"),r=ve(),i=K("div"),s=ve(),a=K("div"),l=ve(),u=K("div"),c=ve(),f=K("div"),U(n,"class","indicator relative svelte-obaru3"),ye(n,"on",!0),U(i,"class","join relative svelte-obaru3"),U(i,"style",o=`${e[0]!=="selectingWallet"?"right: 4px; width: 52px;":"right: 2px; width: 54px;"}`),ye(i,"active",e[0]!=="selectingWallet"),U(a,"class","indicator relative svelte-obaru3"),U(a,"style","right: 8px;"),ye(a,"on",e[0]!=="selectingWallet"),U(u,"class","join relative svelte-obaru3"),U(u,"style",d=`${e[0]==="connectedWallet"?"right: 12px; width: 52px;":"right: 10px; width: 54px;"}`),ye(u,"active",e[0]==="connectedWallet"),U(f,"style","right: 16px;"),U(f,"class","indicator relative svelte-obaru3"),ye(f,"on",e[0]==="connectedWallet"),U(t,"class","indicators flex items-center svelte-obaru3")},m(m,p){oe(m,t,p),H(t,n),H(t,r),H(t,i),H(t,s),H(t,a),H(t,l),H(t,u),H(t,c),H(t,f)},p(m,p){p&1&&o!==(o=`${m[0]!=="selectingWallet"?"right: 4px; width: 52px;":"right: 2px; width: 54px;"}`)&&U(i,"style",o),p&1&&ye(i,"active",m[0]!=="selectingWallet"),p&1&&ye(a,"on",m[0]!=="selectingWallet"),p&1&&d!==(d=`${m[0]==="connectedWallet"?"right: 12px; width: 52px;":"right: 10px; width: 54px;"}`)&&U(u,"style",d),p&1&&ye(u,"active",m[0]==="connectedWallet"),p&1&&ye(f,"on",m[0]==="connectedWallet")},d(m){m&&re(t)}}}function Q_(e){let t,n,r,i,o,s,a,l,u,d,c,f;return{c(){t=K("div"),n=K("div"),r=ve(),i=K("div"),s=ve(),a=K("div"),l=ve(),u=K("div"),c=ve(),f=K("div"),U(n,"class","indicator relative svelte-obaru3"),ye(n,"on",!0),U(i,"class","join relative svelte-obaru3"),U(i,"style",o=`right: 2px; ${e[0]!=="selectingWallet"?"width: 78px;":"width: 82px;"}`),ye(i,"active",e[0]!=="selectingWallet"),U(a,"class","indicator relative svelte-obaru3"),U(a,"style","right: 4px;"),ye(a,"on",e[0]!=="selectingWallet"),U(u,"class","join relative svelte-obaru3"),U(u,"style",d=`right: 6px; ${e[0]==="connectedWallet"?"width: 74px;":"width: 81px;"}`),ye(u,"active",e[0]==="connectedWallet"),U(f,"style","right: 8px;"),U(f,"class","indicator relative svelte-obaru3"),ye(f,"on",e[0]==="connectedWallet"),U(t,"class","indicators flex items-center svelte-obaru3")},m(m,p){oe(m,t,p),H(t,n),H(t,r),H(t,i),H(t,s),H(t,a),H(t,l),H(t,u),H(t,c),H(t,f)},p(m,p){p&1&&o!==(o=`right: 2px; ${m[0]!=="selectingWallet"?"width: 78px;":"width: 82px;"}`)&&U(i,"style",o),p&1&&ye(i,"active",m[0]!=="selectingWallet"),p&1&&ye(a,"on",m[0]!=="selectingWallet"),p&1&&d!==(d=`right: 6px; ${m[0]==="connectedWallet"?"width: 74px;":"width: 81px;"}`)&&U(u,"style",d),p&1&&ye(u,"active",m[0]==="connectedWallet"),p&1&&ye(f,"on",m[0]==="connectedWallet")},d(m){m&&re(t)}}}function nV(e){let t,n,r,i,o=e[3](`connect.${e[0]}.sidebar.subheading`,{default:e[5]})+"",s,a,l,u=e[3](`connect.${e[0]}.sidebar.paragraph`,{values:{app:e[2]&&e[2].name||"This App"},default:e[6]})+"",d,c,f,m,p,h,y,g;Rn(e[9]);let b=e[1]>=Rt&&Z_(e),v=!e[4].removeIDontHaveAWalletInfoLink&&tV(e),w=e[1]=Rt&&Q_(e);return{c(){t=K("div"),n=K("div"),b&&b.c(),r=ve(),i=K("div"),s=He(o),a=ve(),l=K("div"),d=He(u),c=ve(),v&&v.c(),f=ve(),w&&w.c(),m=ve(),E&&E.c(),p=ve(),h=K("div"),U(i,"class","subheading svelte-obaru3"),U(l,"class","description svelte-obaru3"),U(n,"class","inner-container svelte-obaru3"),U(t,"class","sidebar svelte-obaru3")},m(C,k){oe(C,t,k),H(t,n),b&&b.m(n,null),H(n,r),H(n,i),H(i,s),H(n,a),H(n,l),H(l,d),H(n,c),v&&v.m(n,null),H(n,f),w&&w.m(n,null),H(t,m),E&&E.m(t,null),H(t,p),H(t,h),h.innerHTML=CU,y||(g=qn(window,"resize",e[9]),y=!0)},p(C,[k]){C[1]>=Rt?b?b.p(C,k):(b=Z_(C),b.c(),b.m(n,r)):b&&(b.d(1),b=null),k&9&&o!==(o=C[3](`connect.${C[0]}.sidebar.subheading`,{default:C[5]})+"")&&tt(s,o),k&13&&u!==(u=C[3](`connect.${C[0]}.sidebar.paragraph`,{values:{app:C[2]&&C[2].name||"This App"},default:C[6]})+"")&&tt(d,u),C[4].removeIDontHaveAWalletInfoLink||v.p(C,k),C[1]=Rt?E?E.p(C,k):(E=Q_(C),E.c(),E.m(t,p)):E&&(E.d(1),E=null)},i:ee,o:ee,d(C){C&&re(t),b&&b.d(),v&&v.d(),w&&w.d(),E&&E.d(),y=!1,g()}}}function rV(e,t,n){let r,i;wt(e,xi,p=>n(3,i=p));let{step:o}=t;const{connect:s}=xe.get(),a=Re.connect[o].sidebar,{subheading:l,paragraph:u}=a,{heading:d}=a;let c;const f=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));wt(e,f,p=>n(2,r=p));function m(){n(1,c=window.innerWidth)}return e.$$set=p=>{"step"in p&&n(0,o=p.step)},[o,c,r,i,s,l,u,d,f,m]}class iV extends Gt{constructor(t){super(),qt(this,t,rV,nV,Wt,{step:0},XW)}}function oV(e){Vt(e,"svelte-1qwmck3",`.container.svelte-1qwmck3{--background-color:var( --onboard-main-scroll-container-background, var(--w3o-background-color) - );--foreground-color:var(--w3o-foreground-color);--text-color:var(--onboard-connect-text-color, var(--w3o-text-color));--border-color:var(--w3o-border-color, var(--gray-200));--action-color:var(--w3o-action-color, var(--primary-500));font-family:var(--onboard-font-family-normal, var(--font-family-normal));font-size:var(--onboard-font-size-5, 1rem);background:var(--background-color);color:var(--text-color);border-color:var(--border-color);line-height:24px;overflow:hidden;position:relative;display:flex;height:min-content;flex-flow:column-reverse}.content.svelte-1qwmck3{width:var(--onboard-connect-content-width, 100%)}.header.svelte-1qwmck3{display:flex;padding:1rem;border-bottom:1px solid transparent;background:var(--onboard-connect-header-background);color:var(--onboard-connect-header-color);border-color:var(--border-color)}.header-heading.svelte-1qwmck3{line-height:1rem}.button-container.svelte-1qwmck3{right:0.5rem;top:0.5rem}.mobile-header.svelte-1qwmck3{display:flex;gap:0.5rem;height:4.5rem;padding:1rem;border-bottom:1px solid;border-color:var(--border-color)}.mobile-subheader.svelte-1qwmck3{opacity:0.6;font-size:0.875rem;font-weight:400;line-height:1rem;margin-top:0.25rem}.icon-container.svelte-1qwmck3{display:flex;flex:0 0 auto;height:2.5rem;width:2.5rem;min-width:2.5rem;justify-content:center;align-items:center}.disabled.svelte-1qwmck3{opacity:0.2;pointer-events:none;overflow:hidden}.icon-container svg{display:block;height:100%;width:auto}.w-full.svelte-1qwmck3{width:100%}.scroll-container.svelte-1qwmck3{overflow-y:auto;transition:opacity 250ms ease-in-out;scrollbar-width:none}.scroll-container.svelte-1qwmck3::-webkit-scrollbar{display:none}@media all and (min-width: 768px){.container.svelte-1qwmck3{margin:0;flex-flow:row;height:var(--onboard-connect-content-height, 440px)}.content.svelte-1qwmck3{width:var(--onboard-connect-content-width, 488px)}.mobile-subheader.svelte-1qwmck3{display:none}.icon-container.svelte-1qwmck3{display:none}}`)}function Q_(e){let t,n;return t=new ow({props:{close:!e[16].disableClose&&e[20],$$slots:{default:[gV]},$$scope:{ctx:e}}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i[0]&32766|i[1]&32&&(o.$$scope={dirty:i,ctx:r}),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function sV(e){let t,n;return t=new iV({props:{step:e[5]}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i[0]&32&&(o.step=r[5]),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function aV(e){let t,n,r=e[14](`connect.${e[5]}.header`,{default:Re.connect[e[5]].header,values:{connectionRejected:e[1],wallet:e[3]&&e[3].label}})+"",i,o,s=e[5]==="selectingWallet"?`(${e[12]})`:"",a;return{c(){t=K("div"),n=K("div"),i=He(r),o=ve(),a=He(s),U(n,"class","header-heading svelte-1qwmck3"),U(t,"class","header relative flex items-center svelte-1qwmck3")},m(l,u){oe(l,t,u),H(t,n),H(n,i),H(n,o),H(n,a)},p(l,u){u[0]&16426&&r!==(r=l[14](`connect.${l[5]}.header`,{default:Re.connect[l[5]].header,values:{connectionRejected:l[1],wallet:l[3]&&l[3].label}})+"")&&tt(i,r),u[0]&4128&&s!==(s=l[5]==="selectingWallet"?`(${l[12]})`:"")&&tt(a,s)},d(l){l&&re(t)}}}function lV(e){let t,n,r,i,o,s=e[14](e[5]==="connectingWallet"&&e[3]?`connect.${e[5]}.header`:`connect.${e[5]}.sidebar.subheading`,{default:e[5]==="connectingWallet"&&e[3]?Re.connect[e[5]].header:Re.connect[e[5]].sidebar.subheading,values:{connectionRejected:e[1],wallet:e[3]&&e[3].label}})+"",a,l,u,d=e[5]==="selectingWallet"?`${e[12]} available wallets`:"1 account selected",c;function f(h,y){return h[13]&&h[13].icon?uV:cV}let m=f(e),p=m(e);return{c(){t=K("div"),n=K("div"),p.c(),r=ve(),i=K("div"),o=K("div"),a=He(s),l=ve(),u=K("div"),c=He(d),U(n,"class","icon-container svelte-1qwmck3"),U(o,"class","header-heading svelte-1qwmck3"),U(u,"class","mobile-subheader svelte-1qwmck3"),U(i,"class","flex flex-column justify-center w-full svelte-1qwmck3"),U(t,"class","mobile-header svelte-1qwmck3")},m(h,y){oe(h,t,y),H(t,n),p.m(n,null),H(t,r),H(t,i),H(i,o),H(o,a),H(i,l),H(i,u),H(u,c)},p(h,y){m===(m=f(h))&&p?p.p(h,y):(p.d(1),p=m(h),p&&(p.c(),p.m(n,null))),y[0]&16426&&s!==(s=h[14](h[5]==="connectingWallet"&&h[3]?`connect.${h[5]}.header`:`connect.${h[5]}.sidebar.subheading`,{default:h[5]==="connectingWallet"&&h[3]?Re.connect[h[5]].header:Re.connect[h[5]].sidebar.subheading,values:{connectionRejected:h[1],wallet:h[3]&&h[3].label}})+"")&&tt(a,s),y[0]&4128&&d!==(d=h[5]==="selectingWallet"?`${h[12]} available wallets`:"1 account selected")&&tt(c,d)},d(h){h&&re(t),p.d()}}}function cV(e){let t,n;return{c(){t=new bc(!1),n=ct(),t.a=n},m(r,i){t.m(e9,r,i),oe(r,n,i)},p:ee,d(r){r&&re(n),r&&t.d()}}}function uV(e){let t,n;function r(s,a){return a[0]&8192&&(t=null),t==null&&(t=!!Fv(s[13].icon)),t?dV:fV}let i=r(e,[-1,-1]),o=i(e);return{c(){o.c(),n=ct()},m(s,a){o.m(s,a),oe(s,n,a)},p(s,a){i===(i=r(s,a))&&o?o.p(s,a):(o.d(1),o=i(s),o&&(o.c(),o.m(n.parentNode,n)))},d(s){o.d(s),s&&re(n)}}}function fV(e){let t,n;return{c(){t=K("img"),ec(t.src,n=e[13].icon)||U(t,"src",n),U(t,"alt","logo")},m(r,i){oe(r,t,i)},p(r,i){i[0]&8192&&!ec(t.src,n=r[13].icon)&&U(t,"src",n)},d(r){r&&re(t)}}}function dV(e){let t,n=e[13].icon+"",r;return{c(){t=new bc(!1),r=ct(),t.a=r},m(i,o){t.m(n,i,o),oe(i,r,o)},p(i,o){o[0]&8192&&n!==(n=i[13].icon+"")&&t.p(n)},d(i){i&&re(r),i&&t.d()}}}function hV(e){let t,n,r,i,o;return n=new Y9({}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","button-container absolute svelte-1qwmck3")},m(s,a){oe(s,t,a),De(n,t,null),r=!0,i||(o=qn(t,"click",e[20]),i=!0)},p:ee,i(s){r||(X(n.$$.fragment,s),r=!0)},o(s){ie(n.$$.fragment,s),r=!1},d(s){s&&re(t),Fe(n),i=!1,o()}}}function J_(e){let t,n,r,i;const o=[mV,pV],s=[];function a(l,u){return l[2].length?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=ct()},m(l,u){s[t].m(l,u),oe(l,r,u),i=!0},p(l,u){let d=t;t=a(l),t===d?s[t].p(l,u):(mt(),ie(s[d],1,1,()=>{s[d]=null}),gt(),n=s[t],n?n.p(l,u):(n=s[t]=o[t](l),n.c()),X(n,1),n.m(r.parentNode,r))},i(l){i||(X(n),i=!0)},o(l){ie(n),i=!1},d(l){s[t].d(l),l&&re(r)}}}function pV(e){let t,n;return t=new MW({}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p:ee,i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function mV(e){let t,n,r,i,o,s;function a(u){e[24](u)}let l={};return e[7]!==void 0&&(l.agreed=e[7]),t=new Zz({props:l}),Cp.push(()=>mH(t,"agreed",a)),o=new ZW({props:{selectWallet:e[18],wallets:e[2],connectingWalletLabel:e[8],connectingErrorMessage:e[9]}}),{c(){ze(t.$$.fragment),r=ve(),i=K("div"),ze(o.$$.fragment),U(i,"class","svelte-1qwmck3"),ye(i,"disabled",!e[7])},m(u,d){De(t,u,d),oe(u,r,d),oe(u,i,d),De(o,i,null),s=!0},p(u,d){const c={};!n&&d[0]&128&&(n=!0,c.agreed=u[7],fH(()=>n=!1)),t.$set(c);const f={};d[0]&4&&(f.wallets=u[2]),d[0]&256&&(f.connectingWalletLabel=u[8]),d[0]&512&&(f.connectingErrorMessage=u[9]),o.$set(f),(!s||d[0]&128)&&ye(i,"disabled",!u[7])},i(u){s||(X(t.$$.fragment,u),X(o.$$.fragment,u),s=!0)},o(u){ie(t.$$.fragment,u),ie(o.$$.fragment,u),s=!1},d(u){Fe(t,u),u&&re(r),u&&re(i),Fe(o)}}}function e3(e){let t,n;return t=new $W({props:{connectWallet:e[21],connectionRejected:e[1],previousConnectionRequest:e[6],setStep:e[22],deselectWallet:e[19],selectedWallet:e[3]}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i[0]&2&&(o.connectionRejected=r[1]),i[0]&64&&(o.previousConnectionRequest=r[6]),i[0]&8&&(o.selectedWallet=r[3]),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function t3(e){let t,n;return t=new SW({props:{selectedWallet:e[3]}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i[0]&8&&(o.selectedWallet=r[3]),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function gV(e){let t,n,r,i,o,s,a,l,u,d=e[16].showSidebar&&sV(e);function c(b,v){return b[4]<=Rt?lV:aV}let f=c(e),m=f(e),p=!e[16].disableClose&&hV(e),h=(e[5]==="selectingWallet"||e[4]<=Rt)&&J_(e),y=e[11]&&e3(e),g=e[5]==="connectedWallet"&&e[3]&&e[4]>=Rt&&t3(e);return{c(){t=K("div"),d&&d.c(),n=ve(),r=K("div"),m.c(),i=ve(),p&&p.c(),o=ve(),s=K("div"),h&&h.c(),a=ve(),y&&y.c(),l=ve(),g&&g.c(),U(s,"class","scroll-container svelte-1qwmck3"),U(r,"class","content flex flex-column svelte-1qwmck3"),U(t,"class","container svelte-1qwmck3")},m(b,v){oe(b,t,v),d&&d.m(t,null),H(t,n),H(t,r),m.m(r,null),H(r,i),p&&p.m(r,null),H(r,o),H(r,s),h&&h.m(s,null),H(s,a),y&&y.m(s,null),H(s,l),g&&g.m(s,null),e[25](s),u=!0},p(b,v){b[16].showSidebar&&d.p(b,v),f===(f=c(b))&&m?m.p(b,v):(m.d(1),m=f(b),m&&(m.c(),m.m(r,i))),b[16].disableClose||p.p(b,v),b[5]==="selectingWallet"||b[4]<=Rt?h?(h.p(b,v),v[0]&48&&X(h,1)):(h=J_(b),h.c(),X(h,1),h.m(s,a)):h&&(mt(),ie(h,1,1,()=>{h=null}),gt()),b[11]?y?(y.p(b,v),v[0]&2048&&X(y,1)):(y=e3(b),y.c(),X(y,1),y.m(s,l)):y&&(mt(),ie(y,1,1,()=>{y=null}),gt()),b[5]==="connectedWallet"&&b[3]&&b[4]>=Rt?g?(g.p(b,v),v[0]&56&&X(g,1)):(g=t3(b),g.c(),X(g,1),g.m(s,null)):g&&(mt(),ie(g,1,1,()=>{g=null}),gt())},i(b){u||(X(d),X(p),X(h),X(y),X(g),u=!0)},o(b){ie(d),ie(p),ie(h),ie(y),ie(g),u=!1},d(b){b&&re(t),d&&d.d(),m.d(),p&&p.d(),h&&h.d(),y&&y.d(),g&&g.d(),e[25](null)}}}function yV(e){let t,n,r,i;Rn(e[23]);let o=!e[0].disableModals&&Q_(e);return{c(){o&&o.c(),t=ct()},m(s,a){o&&o.m(s,a),oe(s,t,a),n=!0,r||(i=qn(window,"resize",e[23]),r=!0)},p(s,a){s[0].disableModals?o&&(mt(),ie(o,1,1,()=>{o=null}),gt()):o?(o.p(s,a),a[0]&1&&X(o,1)):(o=Q_(s),o.c(),X(o,1),o.m(t.parentNode,t))},i(s){n||(X(o),n=!0)},o(s){ie(o),n=!1},d(s){o&&o.d(s),s&&re(t),r=!1,i()}}}function bV(e,t,n){let r,i,o,s,a;wt(e,xi,Z=>n(14,a=Z));let{autoSelect:l}=t;const u=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));wt(e,u,Z=>n(13,o=Z));const{walletModules:d,connect:c,chains:f}=xe.get(),m=new ao,{unstoppableResolution:p,wagmi:h}=fn;let y=!1,g=!1,b=[],v,w,E,C,k,_;const S=new pd("selectingWallet");wt(e,S,Z=>n(5,s=Z)),jr.pipe(d7((Z,pe)=>Z.autoSelect&&pe.autoSelect&&Z.autoSelect.disableModals===pe.autoSelect.disableModals),Zl(({autoSelect:Z})=>Z&&Z.disableModals===!1),Bf(B_)).subscribe(()=>{v&&B()});async function A({label:Z,icon:pe,getInterface:Ie}){n(8,E=Z);try{const _e=xe.get().wallets.find(je=>je.label===Z);if(_e){dy(_e),setTimeout(()=>j("connectedWallet"),1),n(3,v=_e);return}const{chains:Ce}=xe.get(),{provider:le,instance:$e}=await Ie({chains:Ce,EventEmitter:kU,appMetadata:o}),rt=await pe;n(3,v={label:Z,icon:rt,provider:le,instance:$e,accounts:[],chains:[{namespace:"evm",id:"0x1"}]}),n(9,C=""),W(),setTimeout(()=>j("connectingWallet"),1)}catch(_e){const{message:Ce}=_e;n(9,C=Ce),n(8,E=""),W()}}function I(){n(3,v=null)}function L(Z){n(3,v=Object.assign(Object.assign({},v),Z))}async function F(Z){const{getIcon:pe,getInterface:Ie,label:_e}=Z,Ce=pe();A({label:_e,icon:Ce,getInterface:Ie})}async function N(){n(2,b=d.map(({getIcon:Z,getInterface:pe,label:Ie})=>({label:Ie,icon:Z(),getInterface:pe})))}function R(){jr.next({inProgress:!1})}async function B(){n(1,y=!1);const{provider:Z,label:pe}=v;m.next();try{let Ie,_e;if(h){const{buildWagmiConfig:$e,wagmiConnect:rt,getWagmiConnector:je}=h,nt=await $e(f,{label:pe,provider:Z});W9(nt),_e=je(pe);const Le=await Promise.race([rt(nt,{connector:_e}),Lf(m.pipe(Jm([])))]);if(!Le||!("accounts"in Le))return;const[_t]=Le.accounts;Ie=_t}else{const[$e]=await Promise.race([V9(Z),Lf(m.pipe(Jm([])))]);if(!$e)return;Ie=$e}if(xe.get().connect.autoConnectLastWallet||xe.get().connect.autoConnectAllPreviousWallet){let $e=B0(gi.LAST_CONNECTED_WALLET);try{let rt=JSON.parse($e);if(rt&&Array.isArray(rt)){const je=rt;$e=[...new Set([pe,...je])]}}catch(rt){if(rt instanceof SyntaxError&&$e&&typeof $e=="string")$e=[$e];else throw new Error(rt)}$e||($e=[pe]),N0(gi.LAST_CONNECTED_WALLET,JSON.stringify($e))}const Ce=await q9(Z);if(xe.get().notify.enabled){const $e=await $p();if($e)try{$e.subscribe({id:Ie,chainId:Ce,type:"account"})}catch{}}const le={accounts:[{address:Ie,ens:null,uns:null,balance:null}],chains:[{namespace:"evm",id:Ce}],wagmiConnector:_e};dy(Object.assign(Object.assign({},v),le)),kz(Z,pe),L(le),j("connectedWallet"),W()}catch(Ie){const{code:_e}=Ie;if(W(),_e===is.ACCOUNT_ACCESS_REJECTED){n(1,y=!0),l.disableModals?jr.next({inProgress:!1}):l.label&&n(0,l.label="",l);return}if(_e===is.ACCOUNT_ACCESS_ALREADY_REQUESTED){if(n(6,g=!0),l.disableModals){jr.next({inProgress:!1});return}G9({provider:v.provider,disconnected$:jr.pipe(Zl(({inProgress:Ce})=>!Ce),Jm(""))}).pipe(Tv(1)).subscribe(([Ce])=>{Ce&&B()});return}}}async function V(){const{accounts:Z,chains:pe}=v,Ie=xe.get().chains,[_e]=pe,Ce=Ie.find(({namespace:Le,id:_t})=>Le===_e.namespace&&_t===_e.id),{address:le}=Z[0];let{balance:$e,ens:rt,uns:je,secondaryTokens:nt}=Z[0];if($e===null&&Tp(le,Ce).then(Le=>{ku(v.label,le,{balance:Le})}),Ce&&!nt&&Array.isArray(Ce.secondaryTokens)&&Ce.secondaryTokens.length&&Ip(le,Ce).then(Le=>{ku(v.label,le,{secondaryTokens:Le})}),rt===null&&xp(_e.id)){const Le=f.find(({id:_t})=>_t===xp(_e.id));hy(le,Le).then(_t=>{ku(v.label,le,{ens:_t})})}je===null&&p&&py(le,Ce).then(Le=>{ku(v.label,le,{uns:Le})}),setTimeout(()=>jr.next({inProgress:!1}),1500)}S.pipe(Bf(B_)).subscribe(Z=>{switch(Z){case"selectingWallet":{if(l.label){const pe=d.find(({label:Ie})=>Ie.toLowerCase()===l.label.toLowerCase());pe?F(pe):l.disableModals&&jr.next({inProgress:!1})}else n(8,E=""),N();break}case"connectingWallet":{B();break}case"connectedWallet":{n(8,E=""),V();break}}});function j(Z){m.next(),S.next(Z)}function W(){_&&_.scrollTo(0,0)}function Y(){n(4,k=window.innerWidth)}function te(Z){w=Z,n(7,w)}function ae(Z){Cp[Z?"unshift":"push"](()=>{_=Z,n(10,_)})}return e.$$set=Z=>{"autoSelect"in Z&&n(0,l=Z.autoSelect)},e.$$.update=()=>{e.$$.dirty[0]&4&&n(12,r=b.length-xe.get().wallets.length),e.$$.dirty[0]&58&&n(11,i=s==="connectingWallet"&&v&&k>=Rt||k<=Rt&&y&&s==="connectingWallet"&&v)},[l,y,b,v,k,s,g,w,E,C,_,i,r,o,a,u,c,S,A,I,R,B,j,Y,te,ae]}class vV extends Gt{constructor(t){super(),qt(this,t,bV,yV,Wt,{autoSelect:0},oV,[-1,-1])}}function wV(e){Vt(e,"svelte-12yam41",".container.svelte-12yam41{padding:var(--onboard-spacing-4, var(--spacing-4));font-family:var(--onboard-font-family-normal, var(--font-family-normal));line-height:16px;font-size:var(--onboard-font-size-5, var(--font-size-5))}.close.svelte-12yam41{top:var(--onboard-spacing-5, var(--spacing-5));right:var(--onboard-spacing-5, var(--spacing-5));padding:0.5rem}h4.svelte-12yam41{font-size:var(--onboard-font-size-3, var(--font-size-3));margin:var(--onboard-spacing-4, var(--spacing-4)) 0}p.svelte-12yam41{margin:0 0 var(--onboard-spacing-4, var(--spacing-4)) 0;max-width:488px}")}function _V(e){let t,n,r=e[0]("modals.switchChain.heading",{default:Re.modals.switchChain.heading})+"",i,o,s,a=e[0]("modals.switchChain.paragraph1",{default:Re.modals.switchChain.paragraph1,values:{app:e[1]&&e[1].name||"This app",nextNetworkName:e[2]}})+"",l,u,d,c=e[0]("modals.switchChain.paragraph2",{default:Re.modals.switchChain.paragraph2})+"",f,m,p,h,y,g,b;return h=new Y9({}),{c(){t=K("div"),n=K("h4"),i=He(r),o=ve(),s=K("p"),l=He(a),u=ve(),d=K("p"),f=He(c),m=ve(),p=K("div"),ze(h.$$.fragment),U(n,"class","svelte-12yam41"),U(s,"class","svelte-12yam41"),U(d,"class","svelte-12yam41"),U(p,"class","close absolute svelte-12yam41"),U(t,"class","container relative svelte-12yam41")},m(v,w){oe(v,t,w),H(t,n),H(n,i),H(t,o),H(t,s),H(s,l),H(t,u),H(t,d),H(d,f),H(t,m),H(t,p),De(h,p,null),y=!0,g||(b=qn(p,"click",e[3]),g=!0)},p(v,w){(!y||w&1)&&r!==(r=v[0]("modals.switchChain.heading",{default:Re.modals.switchChain.heading})+"")&&tt(i,r),(!y||w&3)&&a!==(a=v[0]("modals.switchChain.paragraph1",{default:Re.modals.switchChain.paragraph1,values:{app:v[1]&&v[1].name||"This app",nextNetworkName:v[2]}})+"")&&tt(l,a),(!y||w&1)&&c!==(c=v[0]("modals.switchChain.paragraph2",{default:Re.modals.switchChain.paragraph2})+"")&&tt(f,c)},i(v){y||(X(h.$$.fragment,v),y=!0)},o(v){ie(h.$$.fragment,v),y=!1},d(v){v&&re(t),Fe(h),g=!1,b()}}}function xV(e){let t,n;return t=new ow({props:{close:e[3],$$slots:{default:[_V]},$$scope:{ctx:e}}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,[i]){const o={};i&67&&(o.$$scope={dirty:i,ctx:r}),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function EV(e,t,n){let r,i,o;wt(e,tc,u=>n(5,r=u)),wt(e,xi,u=>n(0,i=u));const s=r.chain.label;function a(){tc.next(null)}const l=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));return wt(e,l,u=>n(1,o=u)),[i,o,s,a,l]}class SV extends Gt{constructor(t){super(),qt(this,t,EV,xV,Wt,{},wV)}}function kV(e){Vt(e,"svelte-z54y2j",".icon.svelte-z54y2j{border-radius:50px;color:var(--onboard-primary-500, var(--primary-500))}")}function CV(e){let t,n;return{c(){t=K("div"),U(t,"class","icon flex svelte-z54y2j"),U(t,"style",n=`width: ${e[0]}px; height: ${e[0]}px;`)},m(r,i){oe(r,t,i),t.innerHTML=L0},p(r,[i]){i&1&&n!==(n=`width: ${r[0]}px; height: ${r[0]}px;`)&&U(t,"style",n)},i:ee,o:ee,d(r){r&&re(t)}}}function AV(e,t,n){let{size:r=20}=t;return e.$$set=i=>{"size"in i&&n(0,r=i.size)},[r]}class TV extends Gt{constructor(t){super(),qt(this,t,AV,CV,Wt,{size:0},kV)}}function IV(e){Vt(e,"svelte-20hjq1",`.content.svelte-20hjq1{padding:1rem;width:300px;font-family:var(--onboard-font-family-normal, var(--font-family-normal));font-size:var(--onboard-font-size-5, var(--font-size-5));line-height:24px;background:var( + );--foreground-color:var(--w3o-foreground-color);--text-color:var(--onboard-connect-text-color, var(--w3o-text-color));--border-color:var(--w3o-border-color, var(--gray-200));--action-color:var(--w3o-action-color, var(--primary-500));font-family:var(--onboard-font-family-normal, var(--font-family-normal));font-size:var(--onboard-font-size-5, 1rem);background:var(--background-color);color:var(--text-color);border-color:var(--border-color);line-height:24px;overflow:hidden;position:relative;display:flex;height:min-content;flex-flow:column-reverse}.content.svelte-1qwmck3{width:var(--onboard-connect-content-width, 100%)}.header.svelte-1qwmck3{display:flex;padding:1rem;border-bottom:1px solid transparent;background:var(--onboard-connect-header-background);color:var(--onboard-connect-header-color);border-color:var(--border-color)}.header-heading.svelte-1qwmck3{line-height:1rem}.button-container.svelte-1qwmck3{right:0.5rem;top:0.5rem}.mobile-header.svelte-1qwmck3{display:flex;gap:0.5rem;height:4.5rem;padding:1rem;border-bottom:1px solid;border-color:var(--border-color)}.mobile-subheader.svelte-1qwmck3{opacity:0.6;font-size:0.875rem;font-weight:400;line-height:1rem;margin-top:0.25rem}.icon-container.svelte-1qwmck3{display:flex;flex:0 0 auto;height:2.5rem;width:2.5rem;min-width:2.5rem;justify-content:center;align-items:center}.disabled.svelte-1qwmck3{opacity:0.2;pointer-events:none;overflow:hidden}.icon-container svg{display:block;height:100%;width:auto}.w-full.svelte-1qwmck3{width:100%}.scroll-container.svelte-1qwmck3{overflow-y:auto;transition:opacity 250ms ease-in-out;scrollbar-width:none}.scroll-container.svelte-1qwmck3::-webkit-scrollbar{display:none}@media all and (min-width: 768px){.container.svelte-1qwmck3{margin:0;flex-flow:row;height:var(--onboard-connect-content-height, 440px)}.content.svelte-1qwmck3{width:var(--onboard-connect-content-width, 488px)}.mobile-subheader.svelte-1qwmck3{display:none}.icon-container.svelte-1qwmck3{display:none}}`)}function J_(e){let t,n;return t=new sw({props:{close:!e[16].disableClose&&e[20],$$slots:{default:[gV]},$$scope:{ctx:e}}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i[0]&32766|i[1]&32&&(o.$$scope={dirty:i,ctx:r}),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function sV(e){let t,n;return t=new iV({props:{step:e[5]}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i[0]&32&&(o.step=r[5]),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function aV(e){let t,n,r=e[14](`connect.${e[5]}.header`,{default:Re.connect[e[5]].header,values:{connectionRejected:e[1],wallet:e[3]&&e[3].label}})+"",i,o,s=e[5]==="selectingWallet"?`(${e[12]})`:"",a;return{c(){t=K("div"),n=K("div"),i=He(r),o=ve(),a=He(s),U(n,"class","header-heading svelte-1qwmck3"),U(t,"class","header relative flex items-center svelte-1qwmck3")},m(l,u){oe(l,t,u),H(t,n),H(n,i),H(n,o),H(n,a)},p(l,u){u[0]&16426&&r!==(r=l[14](`connect.${l[5]}.header`,{default:Re.connect[l[5]].header,values:{connectionRejected:l[1],wallet:l[3]&&l[3].label}})+"")&&tt(i,r),u[0]&4128&&s!==(s=l[5]==="selectingWallet"?`(${l[12]})`:"")&&tt(a,s)},d(l){l&&re(t)}}}function lV(e){let t,n,r,i,o,s=e[14](e[5]==="connectingWallet"&&e[3]?`connect.${e[5]}.header`:`connect.${e[5]}.sidebar.subheading`,{default:e[5]==="connectingWallet"&&e[3]?Re.connect[e[5]].header:Re.connect[e[5]].sidebar.subheading,values:{connectionRejected:e[1],wallet:e[3]&&e[3].label}})+"",a,l,u,d=e[5]==="selectingWallet"?`${e[12]} available wallets`:"1 account selected",c;function f(h,y){return h[13]&&h[13].icon?uV:cV}let m=f(e),p=m(e);return{c(){t=K("div"),n=K("div"),p.c(),r=ve(),i=K("div"),o=K("div"),a=He(s),l=ve(),u=K("div"),c=He(d),U(n,"class","icon-container svelte-1qwmck3"),U(o,"class","header-heading svelte-1qwmck3"),U(u,"class","mobile-subheader svelte-1qwmck3"),U(i,"class","flex flex-column justify-center w-full svelte-1qwmck3"),U(t,"class","mobile-header svelte-1qwmck3")},m(h,y){oe(h,t,y),H(t,n),p.m(n,null),H(t,r),H(t,i),H(i,o),H(o,a),H(i,l),H(i,u),H(u,c)},p(h,y){m===(m=f(h))&&p?p.p(h,y):(p.d(1),p=m(h),p&&(p.c(),p.m(n,null))),y[0]&16426&&s!==(s=h[14](h[5]==="connectingWallet"&&h[3]?`connect.${h[5]}.header`:`connect.${h[5]}.sidebar.subheading`,{default:h[5]==="connectingWallet"&&h[3]?Re.connect[h[5]].header:Re.connect[h[5]].sidebar.subheading,values:{connectionRejected:h[1],wallet:h[3]&&h[3].label}})+"")&&tt(a,s),y[0]&4128&&d!==(d=h[5]==="selectingWallet"?`${h[12]} available wallets`:"1 account selected")&&tt(c,d)},d(h){h&&re(t),p.d()}}}function cV(e){let t,n;return{c(){t=new bc(!1),n=ct(),t.a=n},m(r,i){t.m(e9,r,i),oe(r,n,i)},p:ee,d(r){r&&re(n),r&&t.d()}}}function uV(e){let t,n;function r(s,a){return a[0]&8192&&(t=null),t==null&&(t=!!Uv(s[13].icon)),t?dV:fV}let i=r(e,[-1,-1]),o=i(e);return{c(){o.c(),n=ct()},m(s,a){o.m(s,a),oe(s,n,a)},p(s,a){i===(i=r(s,a))&&o?o.p(s,a):(o.d(1),o=i(s),o&&(o.c(),o.m(n.parentNode,n)))},d(s){o.d(s),s&&re(n)}}}function fV(e){let t,n;return{c(){t=K("img"),tc(t.src,n=e[13].icon)||U(t,"src",n),U(t,"alt","logo")},m(r,i){oe(r,t,i)},p(r,i){i[0]&8192&&!tc(t.src,n=r[13].icon)&&U(t,"src",n)},d(r){r&&re(t)}}}function dV(e){let t,n=e[13].icon+"",r;return{c(){t=new bc(!1),r=ct(),t.a=r},m(i,o){t.m(n,i,o),oe(i,r,o)},p(i,o){o[0]&8192&&n!==(n=i[13].icon+"")&&t.p(n)},d(i){i&&re(r),i&&t.d()}}}function hV(e){let t,n,r,i,o;return n=new Y9({}),{c(){t=K("div"),ze(n.$$.fragment),U(t,"class","button-container absolute svelte-1qwmck3")},m(s,a){oe(s,t,a),De(n,t,null),r=!0,i||(o=qn(t,"click",e[20]),i=!0)},p:ee,i(s){r||(X(n.$$.fragment,s),r=!0)},o(s){ie(n.$$.fragment,s),r=!1},d(s){s&&re(t),Fe(n),i=!1,o()}}}function e3(e){let t,n,r,i;const o=[mV,pV],s=[];function a(l,u){return l[2].length?0:1}return t=a(e),n=s[t]=o[t](e),{c(){n.c(),r=ct()},m(l,u){s[t].m(l,u),oe(l,r,u),i=!0},p(l,u){let d=t;t=a(l),t===d?s[t].p(l,u):(mt(),ie(s[d],1,1,()=>{s[d]=null}),gt(),n=s[t],n?n.p(l,u):(n=s[t]=o[t](l),n.c()),X(n,1),n.m(r.parentNode,r))},i(l){i||(X(n),i=!0)},o(l){ie(n),i=!1},d(l){s[t].d(l),l&&re(r)}}}function pV(e){let t,n;return t=new MW({}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p:ee,i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function mV(e){let t,n,r,i,o,s;function a(u){e[24](u)}let l={};return e[7]!==void 0&&(l.agreed=e[7]),t=new Zz({props:l}),Cp.push(()=>mH(t,"agreed",a)),o=new ZW({props:{selectWallet:e[18],wallets:e[2],connectingWalletLabel:e[8],connectingErrorMessage:e[9]}}),{c(){ze(t.$$.fragment),r=ve(),i=K("div"),ze(o.$$.fragment),U(i,"class","svelte-1qwmck3"),ye(i,"disabled",!e[7])},m(u,d){De(t,u,d),oe(u,r,d),oe(u,i,d),De(o,i,null),s=!0},p(u,d){const c={};!n&&d[0]&128&&(n=!0,c.agreed=u[7],fH(()=>n=!1)),t.$set(c);const f={};d[0]&4&&(f.wallets=u[2]),d[0]&256&&(f.connectingWalletLabel=u[8]),d[0]&512&&(f.connectingErrorMessage=u[9]),o.$set(f),(!s||d[0]&128)&&ye(i,"disabled",!u[7])},i(u){s||(X(t.$$.fragment,u),X(o.$$.fragment,u),s=!0)},o(u){ie(t.$$.fragment,u),ie(o.$$.fragment,u),s=!1},d(u){Fe(t,u),u&&re(r),u&&re(i),Fe(o)}}}function t3(e){let t,n;return t=new $W({props:{connectWallet:e[21],connectionRejected:e[1],previousConnectionRequest:e[6],setStep:e[22],deselectWallet:e[19],selectedWallet:e[3]}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i[0]&2&&(o.connectionRejected=r[1]),i[0]&64&&(o.previousConnectionRequest=r[6]),i[0]&8&&(o.selectedWallet=r[3]),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function n3(e){let t,n;return t=new SW({props:{selectedWallet:e[3]}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i[0]&8&&(o.selectedWallet=r[3]),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function gV(e){let t,n,r,i,o,s,a,l,u,d=e[16].showSidebar&&sV(e);function c(b,v){return b[4]<=Rt?lV:aV}let f=c(e),m=f(e),p=!e[16].disableClose&&hV(e),h=(e[5]==="selectingWallet"||e[4]<=Rt)&&e3(e),y=e[11]&&t3(e),g=e[5]==="connectedWallet"&&e[3]&&e[4]>=Rt&&n3(e);return{c(){t=K("div"),d&&d.c(),n=ve(),r=K("div"),m.c(),i=ve(),p&&p.c(),o=ve(),s=K("div"),h&&h.c(),a=ve(),y&&y.c(),l=ve(),g&&g.c(),U(s,"class","scroll-container svelte-1qwmck3"),U(r,"class","content flex flex-column svelte-1qwmck3"),U(t,"class","container svelte-1qwmck3")},m(b,v){oe(b,t,v),d&&d.m(t,null),H(t,n),H(t,r),m.m(r,null),H(r,i),p&&p.m(r,null),H(r,o),H(r,s),h&&h.m(s,null),H(s,a),y&&y.m(s,null),H(s,l),g&&g.m(s,null),e[25](s),u=!0},p(b,v){b[16].showSidebar&&d.p(b,v),f===(f=c(b))&&m?m.p(b,v):(m.d(1),m=f(b),m&&(m.c(),m.m(r,i))),b[16].disableClose||p.p(b,v),b[5]==="selectingWallet"||b[4]<=Rt?h?(h.p(b,v),v[0]&48&&X(h,1)):(h=e3(b),h.c(),X(h,1),h.m(s,a)):h&&(mt(),ie(h,1,1,()=>{h=null}),gt()),b[11]?y?(y.p(b,v),v[0]&2048&&X(y,1)):(y=t3(b),y.c(),X(y,1),y.m(s,l)):y&&(mt(),ie(y,1,1,()=>{y=null}),gt()),b[5]==="connectedWallet"&&b[3]&&b[4]>=Rt?g?(g.p(b,v),v[0]&56&&X(g,1)):(g=n3(b),g.c(),X(g,1),g.m(s,null)):g&&(mt(),ie(g,1,1,()=>{g=null}),gt())},i(b){u||(X(d),X(p),X(h),X(y),X(g),u=!0)},o(b){ie(d),ie(p),ie(h),ie(y),ie(g),u=!1},d(b){b&&re(t),d&&d.d(),m.d(),p&&p.d(),h&&h.d(),y&&y.d(),g&&g.d(),e[25](null)}}}function yV(e){let t,n,r,i;Rn(e[23]);let o=!e[0].disableModals&&J_(e);return{c(){o&&o.c(),t=ct()},m(s,a){o&&o.m(s,a),oe(s,t,a),n=!0,r||(i=qn(window,"resize",e[23]),r=!0)},p(s,a){s[0].disableModals?o&&(mt(),ie(o,1,1,()=>{o=null}),gt()):o?(o.p(s,a),a[0]&1&&X(o,1)):(o=J_(s),o.c(),X(o,1),o.m(t.parentNode,t))},i(s){n||(X(o),n=!0)},o(s){ie(o),n=!1},d(s){o&&o.d(s),s&&re(t),r=!1,i()}}}function bV(e,t,n){let r,i,o,s,a;wt(e,xi,Z=>n(14,a=Z));let{autoSelect:l}=t;const u=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));wt(e,u,Z=>n(13,o=Z));const{walletModules:d,connect:c,chains:f}=xe.get(),m=new ao,{unstoppableResolution:p,wagmi:h}=fn;let y=!1,g=!1,b=[],v,w,E,C,k,_;const S=new pd("selectingWallet");wt(e,S,Z=>n(5,s=Z)),jr.pipe(d7((Z,pe)=>Z.autoSelect&&pe.autoSelect&&Z.autoSelect.disableModals===pe.autoSelect.disableModals),Xl(({autoSelect:Z})=>Z&&Z.disableModals===!1),Bf(N_)).subscribe(()=>{v&&B()});async function A({label:Z,icon:pe,getInterface:Ie}){n(8,E=Z);try{const _e=xe.get().wallets.find(je=>je.label===Z);if(_e){dy(_e),setTimeout(()=>j("connectedWallet"),1),n(3,v=_e);return}const{chains:Ce}=xe.get(),{provider:le,instance:$e}=await Ie({chains:Ce,EventEmitter:kU,appMetadata:o}),rt=await pe;n(3,v={label:Z,icon:rt,provider:le,instance:$e,accounts:[],chains:[{namespace:"evm",id:"0x1"}]}),n(9,C=""),W(),setTimeout(()=>j("connectingWallet"),1)}catch(_e){const{message:Ce}=_e;n(9,C=Ce),n(8,E=""),W()}}function I(){n(3,v=null)}function L(Z){n(3,v=Object.assign(Object.assign({},v),Z))}async function F(Z){const{getIcon:pe,getInterface:Ie,label:_e}=Z,Ce=pe();A({label:_e,icon:Ce,getInterface:Ie})}async function N(){n(2,b=d.map(({getIcon:Z,getInterface:pe,label:Ie})=>({label:Ie,icon:Z(),getInterface:pe})))}function R(){jr.next({inProgress:!1})}async function B(){n(1,y=!1);const{provider:Z,label:pe}=v;m.next();try{let Ie,_e;if(h){const{buildWagmiConfig:$e,wagmiConnect:rt,getWagmiConnector:je}=h,nt=await $e(f,{label:pe,provider:Z});W9(nt),_e=je(pe);const Le=await Promise.race([rt(nt,{connector:_e}),Lf(m.pipe(Jm([])))]);if(!Le||!("accounts"in Le))return;const[_t]=Le.accounts;Ie=_t}else{const[$e]=await Promise.race([V9(Z),Lf(m.pipe(Jm([])))]);if(!$e)return;Ie=$e}if(xe.get().connect.autoConnectLastWallet||xe.get().connect.autoConnectAllPreviousWallet){let $e=B0(gi.LAST_CONNECTED_WALLET);try{let rt=JSON.parse($e);if(rt&&Array.isArray(rt)){const je=rt;$e=[...new Set([pe,...je])]}}catch(rt){if(rt instanceof SyntaxError&&$e&&typeof $e=="string")$e=[$e];else throw new Error(rt)}$e||($e=[pe]),N0(gi.LAST_CONNECTED_WALLET,JSON.stringify($e))}const Ce=await q9(Z);if(xe.get().notify.enabled){const $e=await $p();if($e)try{$e.subscribe({id:Ie,chainId:Ce,type:"account"})}catch{}}const le={accounts:[{address:Ie,ens:null,uns:null,balance:null}],chains:[{namespace:"evm",id:Ce}],wagmiConnector:_e};dy(Object.assign(Object.assign({},v),le)),kz(Z,pe),L(le),j("connectedWallet"),W()}catch(Ie){const{code:_e}=Ie;if(W(),_e===is.ACCOUNT_ACCESS_REJECTED){n(1,y=!0),l.disableModals?jr.next({inProgress:!1}):l.label&&n(0,l.label="",l);return}if(_e===is.ACCOUNT_ACCESS_ALREADY_REQUESTED){if(n(6,g=!0),l.disableModals){jr.next({inProgress:!1});return}G9({provider:v.provider,disconnected$:jr.pipe(Xl(({inProgress:Ce})=>!Ce),Jm(""))}).pipe(Iv(1)).subscribe(([Ce])=>{Ce&&B()});return}}}async function V(){const{accounts:Z,chains:pe}=v,Ie=xe.get().chains,[_e]=pe,Ce=Ie.find(({namespace:Le,id:_t})=>Le===_e.namespace&&_t===_e.id),{address:le}=Z[0];let{balance:$e,ens:rt,uns:je,secondaryTokens:nt}=Z[0];if($e===null&&Tp(le,Ce).then(Le=>{ku(v.label,le,{balance:Le})}),Ce&&!nt&&Array.isArray(Ce.secondaryTokens)&&Ce.secondaryTokens.length&&Ip(le,Ce).then(Le=>{ku(v.label,le,{secondaryTokens:Le})}),rt===null&&xp(_e.id)){const Le=f.find(({id:_t})=>_t===xp(_e.id));hy(le,Le).then(_t=>{ku(v.label,le,{ens:_t})})}je===null&&p&&py(le,Ce).then(Le=>{ku(v.label,le,{uns:Le})}),setTimeout(()=>jr.next({inProgress:!1}),1500)}S.pipe(Bf(N_)).subscribe(Z=>{switch(Z){case"selectingWallet":{if(l.label){const pe=d.find(({label:Ie})=>Ie.toLowerCase()===l.label.toLowerCase());pe?F(pe):l.disableModals&&jr.next({inProgress:!1})}else n(8,E=""),N();break}case"connectingWallet":{B();break}case"connectedWallet":{n(8,E=""),V();break}}});function j(Z){m.next(),S.next(Z)}function W(){_&&_.scrollTo(0,0)}function Y(){n(4,k=window.innerWidth)}function te(Z){w=Z,n(7,w)}function ae(Z){Cp[Z?"unshift":"push"](()=>{_=Z,n(10,_)})}return e.$$set=Z=>{"autoSelect"in Z&&n(0,l=Z.autoSelect)},e.$$.update=()=>{e.$$.dirty[0]&4&&n(12,r=b.length-xe.get().wallets.length),e.$$.dirty[0]&58&&n(11,i=s==="connectingWallet"&&v&&k>=Rt||k<=Rt&&y&&s==="connectingWallet"&&v)},[l,y,b,v,k,s,g,w,E,C,_,i,r,o,a,u,c,S,A,I,R,B,j,Y,te,ae]}class vV extends Gt{constructor(t){super(),qt(this,t,bV,yV,Wt,{autoSelect:0},oV,[-1,-1])}}function wV(e){Vt(e,"svelte-12yam41",".container.svelte-12yam41{padding:var(--onboard-spacing-4, var(--spacing-4));font-family:var(--onboard-font-family-normal, var(--font-family-normal));line-height:16px;font-size:var(--onboard-font-size-5, var(--font-size-5))}.close.svelte-12yam41{top:var(--onboard-spacing-5, var(--spacing-5));right:var(--onboard-spacing-5, var(--spacing-5));padding:0.5rem}h4.svelte-12yam41{font-size:var(--onboard-font-size-3, var(--font-size-3));margin:var(--onboard-spacing-4, var(--spacing-4)) 0}p.svelte-12yam41{margin:0 0 var(--onboard-spacing-4, var(--spacing-4)) 0;max-width:488px}")}function _V(e){let t,n,r=e[0]("modals.switchChain.heading",{default:Re.modals.switchChain.heading})+"",i,o,s,a=e[0]("modals.switchChain.paragraph1",{default:Re.modals.switchChain.paragraph1,values:{app:e[1]&&e[1].name||"This app",nextNetworkName:e[2]}})+"",l,u,d,c=e[0]("modals.switchChain.paragraph2",{default:Re.modals.switchChain.paragraph2})+"",f,m,p,h,y,g,b;return h=new Y9({}),{c(){t=K("div"),n=K("h4"),i=He(r),o=ve(),s=K("p"),l=He(a),u=ve(),d=K("p"),f=He(c),m=ve(),p=K("div"),ze(h.$$.fragment),U(n,"class","svelte-12yam41"),U(s,"class","svelte-12yam41"),U(d,"class","svelte-12yam41"),U(p,"class","close absolute svelte-12yam41"),U(t,"class","container relative svelte-12yam41")},m(v,w){oe(v,t,w),H(t,n),H(n,i),H(t,o),H(t,s),H(s,l),H(t,u),H(t,d),H(d,f),H(t,m),H(t,p),De(h,p,null),y=!0,g||(b=qn(p,"click",e[3]),g=!0)},p(v,w){(!y||w&1)&&r!==(r=v[0]("modals.switchChain.heading",{default:Re.modals.switchChain.heading})+"")&&tt(i,r),(!y||w&3)&&a!==(a=v[0]("modals.switchChain.paragraph1",{default:Re.modals.switchChain.paragraph1,values:{app:v[1]&&v[1].name||"This app",nextNetworkName:v[2]}})+"")&&tt(l,a),(!y||w&1)&&c!==(c=v[0]("modals.switchChain.paragraph2",{default:Re.modals.switchChain.paragraph2})+"")&&tt(f,c)},i(v){y||(X(h.$$.fragment,v),y=!0)},o(v){ie(h.$$.fragment,v),y=!1},d(v){v&&re(t),Fe(h),g=!1,b()}}}function xV(e){let t,n;return t=new sw({props:{close:e[3],$$slots:{default:[_V]},$$scope:{ctx:e}}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,[i]){const o={};i&67&&(o.$$scope={dirty:i,ctx:r}),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function EV(e,t,n){let r,i,o;wt(e,nc,u=>n(5,r=u)),wt(e,xi,u=>n(0,i=u));const s=r.chain.label;function a(){nc.next(null)}const l=xe.select("appMetadata").pipe(mi(xe.get().appMetadata),vi(1));return wt(e,l,u=>n(1,o=u)),[i,o,s,a,l]}class SV extends Gt{constructor(t){super(),qt(this,t,EV,xV,Wt,{},wV)}}function kV(e){Vt(e,"svelte-z54y2j",".icon.svelte-z54y2j{border-radius:50px;color:var(--onboard-primary-500, var(--primary-500))}")}function CV(e){let t,n;return{c(){t=K("div"),U(t,"class","icon flex svelte-z54y2j"),U(t,"style",n=`width: ${e[0]}px; height: ${e[0]}px;`)},m(r,i){oe(r,t,i),t.innerHTML=L0},p(r,[i]){i&1&&n!==(n=`width: ${r[0]}px; height: ${r[0]}px;`)&&U(t,"style",n)},i:ee,o:ee,d(r){r&&re(t)}}}function AV(e,t,n){let{size:r=20}=t;return e.$$set=i=>{"size"in i&&n(0,r=i.size)},[r]}class TV extends Gt{constructor(t){super(),qt(this,t,AV,CV,Wt,{size:0},kV)}}function IV(e){Vt(e,"svelte-20hjq1",`.content.svelte-20hjq1{padding:1rem;width:300px;font-family:var(--onboard-font-family-normal, var(--font-family-normal));font-size:var(--onboard-font-size-5, var(--font-size-5));line-height:24px;background:var( --onboard-action-required-modal-background, var(--onboard-white, var(--white)) )}.icon-container.svelte-20hjq1{width:3rem;height:3rem;background:var(--onboard-primary-100, var(--primary-100));border-radius:24px}h4.svelte-20hjq1{margin:1.5rem 0 0.5rem 0;font-weight:600}.action-required-heading.svelte-20hjq1,.action-required-info.svelte-20hjq1{color:var( @@ -2432,7 +2432,7 @@ Note: there are at least one loader still registered to this locale that wasn't )}.action-required-btn.svelte-20hjq1{color:var( --onboard-action-required-btn-text-color, var(--onboard-black, inherit) - )}p.svelte-20hjq1{margin:0;font-weight:400}a.svelte-20hjq1{font-weight:600}button.svelte-20hjq1{margin-top:1.5rem;font-weight:600}`)}function n3(e){let t,n=e[1]("modals.actionRequired.linkText",{values:{wallet:e[0]}})+"",r;return{c(){t=K("a"),r=He(n),U(t,"href","https://metamask.zendesk.com/hc/en-us/articles/360061346311-Switching-accounts-in-MetaMask"),U(t,"target","_blank"),U(t,"rel","noreferrer noopener"),U(t,"class","svelte-20hjq1")},m(i,o){oe(i,t,o),H(t,r)},p(i,o){o&3&&n!==(n=i[1]("modals.actionRequired.linkText",{values:{wallet:i[0]}})+"")&&tt(r,n)},d(i){i&&re(t)}}}function $V(e){let t,n,r,i,o,s=e[1]("modals.actionRequired.heading",{values:{wallet:e[0]}})+"",a,l,u,d=e[1]("modals.actionRequired.paragraph",{values:{wallet:e[0]}})+"",c,f,m,p,h=e[1]("modals.actionRequired.buttonText")+"",y,g,b,v;r=new TV({});let w=e[0]==="MetaMask"&&n3(e);return{c(){t=K("div"),n=K("div"),ze(r.$$.fragment),i=ve(),o=K("h4"),a=He(s),l=ve(),u=K("p"),c=He(d),f=ve(),w&&w.c(),m=ve(),p=K("button"),y=He(h),U(n,"class","icon-container flex justify-center items-center svelte-20hjq1"),U(o,"class","action-required-heading svelte-20hjq1"),U(u,"class","action-required-info svelte-20hjq1"),U(p,"class","button-neutral-solid rounded action-required-btn svelte-20hjq1"),U(t,"class","content svelte-20hjq1")},m(E,C){oe(E,t,C),H(t,n),De(r,n,null),H(t,i),H(t,o),H(o,a),H(t,l),H(t,u),H(u,c),H(u,f),w&&w.m(u,null),H(t,m),H(t,p),H(p,y),g=!0,b||(v=qn(p,"click",e[2]),b=!0)},p(E,C){(!g||C&3)&&s!==(s=E[1]("modals.actionRequired.heading",{values:{wallet:E[0]}})+"")&&tt(a,s),(!g||C&3)&&d!==(d=E[1]("modals.actionRequired.paragraph",{values:{wallet:E[0]}})+"")&&tt(c,d),E[0]==="MetaMask"?w?w.p(E,C):(w=n3(E),w.c(),w.m(u,null)):w&&(w.d(1),w=null),(!g||C&2)&&h!==(h=E[1]("modals.actionRequired.buttonText")+"")&&tt(y,h)},i(E){g||(X(r.$$.fragment,E),g=!0)},o(E){ie(r.$$.fragment,E),g=!1},d(E){E&&re(t),Fe(r),w&&w.d(),b=!1,v()}}}function PV(e){let t,n;return t=new ow({props:{close:e[2],$$slots:{default:[$V]},$$scope:{ctx:e}}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,[i]){const o={};i&11&&(o.$$scope={dirty:i,ctx:r}),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function OV(e,t,n){let r;wt(e,xi,s=>n(1,r=s));let{wallet:i}=t;function o(){jr.next({inProgress:!1,actionRequired:""})}return e.$$set=s=>{"wallet"in s&&n(0,i=s.wallet)},[i,r,o]}class RV extends Gt{constructor(t){super(),qt(this,t,OV,PV,Wt,{wallet:0},IV)}}function LV(e){Vt(e,"svelte-w5zexe",`.flex{display:flex}.inline-flex{display:inline-flex}.flex-column{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.justify-end{justify-content:flex-end}.justify-around{justify-content:space-around}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.pointer{cursor:pointer}.shadow-1{box-shadow:var(--onboard-shadow-1, var(--shadow-1))}.w-100{width:100%}*{box-sizing:border-box}input{background:var(--onboard-white, var(--white))}input{width:100%;padding:0.5rem 1rem;outline:2px solid var(--onboard-gray-200, var(--gray-200));border:none;border-radius:8px;font-size:1rem;line-height:1.5;color:var(--onboard-gray-600, var(--gray-600));transition:all 200ms ease-in-out}input[type='checkbox']{-webkit-appearance:none;appearance:none;width:auto;background:var(--onboard-white, var(--white));outline:1px solid var(--onboard-gray-300, var(--gray-300));border:none;padding:0.5em;border-radius:3px;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer}input[type='checkbox']:hover{border-color:var( + )}p.svelte-20hjq1{margin:0;font-weight:400}a.svelte-20hjq1{font-weight:600}button.svelte-20hjq1{margin-top:1.5rem;font-weight:600}`)}function r3(e){let t,n=e[1]("modals.actionRequired.linkText",{values:{wallet:e[0]}})+"",r;return{c(){t=K("a"),r=He(n),U(t,"href","https://metamask.zendesk.com/hc/en-us/articles/360061346311-Switching-accounts-in-MetaMask"),U(t,"target","_blank"),U(t,"rel","noreferrer noopener"),U(t,"class","svelte-20hjq1")},m(i,o){oe(i,t,o),H(t,r)},p(i,o){o&3&&n!==(n=i[1]("modals.actionRequired.linkText",{values:{wallet:i[0]}})+"")&&tt(r,n)},d(i){i&&re(t)}}}function $V(e){let t,n,r,i,o,s=e[1]("modals.actionRequired.heading",{values:{wallet:e[0]}})+"",a,l,u,d=e[1]("modals.actionRequired.paragraph",{values:{wallet:e[0]}})+"",c,f,m,p,h=e[1]("modals.actionRequired.buttonText")+"",y,g,b,v;r=new TV({});let w=e[0]==="MetaMask"&&r3(e);return{c(){t=K("div"),n=K("div"),ze(r.$$.fragment),i=ve(),o=K("h4"),a=He(s),l=ve(),u=K("p"),c=He(d),f=ve(),w&&w.c(),m=ve(),p=K("button"),y=He(h),U(n,"class","icon-container flex justify-center items-center svelte-20hjq1"),U(o,"class","action-required-heading svelte-20hjq1"),U(u,"class","action-required-info svelte-20hjq1"),U(p,"class","button-neutral-solid rounded action-required-btn svelte-20hjq1"),U(t,"class","content svelte-20hjq1")},m(E,C){oe(E,t,C),H(t,n),De(r,n,null),H(t,i),H(t,o),H(o,a),H(t,l),H(t,u),H(u,c),H(u,f),w&&w.m(u,null),H(t,m),H(t,p),H(p,y),g=!0,b||(v=qn(p,"click",e[2]),b=!0)},p(E,C){(!g||C&3)&&s!==(s=E[1]("modals.actionRequired.heading",{values:{wallet:E[0]}})+"")&&tt(a,s),(!g||C&3)&&d!==(d=E[1]("modals.actionRequired.paragraph",{values:{wallet:E[0]}})+"")&&tt(c,d),E[0]==="MetaMask"?w?w.p(E,C):(w=r3(E),w.c(),w.m(u,null)):w&&(w.d(1),w=null),(!g||C&2)&&h!==(h=E[1]("modals.actionRequired.buttonText")+"")&&tt(y,h)},i(E){g||(X(r.$$.fragment,E),g=!0)},o(E){ie(r.$$.fragment,E),g=!1},d(E){E&&re(t),Fe(r),w&&w.d(),b=!1,v()}}}function PV(e){let t,n;return t=new sw({props:{close:e[2],$$slots:{default:[$V]},$$scope:{ctx:e}}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,[i]){const o={};i&11&&(o.$$scope={dirty:i,ctx:r}),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function OV(e,t,n){let r;wt(e,xi,s=>n(1,r=s));let{wallet:i}=t;function o(){jr.next({inProgress:!1,actionRequired:""})}return e.$$set=s=>{"wallet"in s&&n(0,i=s.wallet)},[i,r,o]}class RV extends Gt{constructor(t){super(),qt(this,t,OV,PV,Wt,{wallet:0},IV)}}function LV(e){Vt(e,"svelte-w5zexe",`.flex{display:flex}.inline-flex{display:inline-flex}.flex-column{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.justify-end{justify-content:flex-end}.justify-around{justify-content:space-around}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.pointer{cursor:pointer}.shadow-1{box-shadow:var(--onboard-shadow-1, var(--shadow-1))}.w-100{width:100%}*{box-sizing:border-box}input{background:var(--onboard-white, var(--white))}input{width:100%;padding:0.5rem 1rem;outline:2px solid var(--onboard-gray-200, var(--gray-200));border:none;border-radius:8px;font-size:1rem;line-height:1.5;color:var(--onboard-gray-600, var(--gray-600));transition:all 200ms ease-in-out}input[type='checkbox']{-webkit-appearance:none;appearance:none;width:auto;background:var(--onboard-white, var(--white));outline:1px solid var(--onboard-gray-300, var(--gray-300));border:none;padding:0.5em;border-radius:3px;display:flex;justify-content:center;align-items:center;position:relative;cursor:pointer}input[type='checkbox']:hover{border-color:var( --onboard-checkbox-background, var(--onboard-primary-500, var(--primary-500)) )}input[type='checkbox']:checked{background:var( @@ -2452,7 +2452,7 @@ Note: there are at least one loader still registered to this locale that wasn't --onboard-link-color, var(--onboard-primary-500, var(--primary-500)) );text-decoration:none}a:hover{text-decoration:underline}button{display:flex;align-items:center;justify-content:center;padding:calc(var(--onboard-spacing-4, var(--spacing-4)) - 1px);border-radius:24px;cursor:pointer;font:inherit;border:none;transition:background-color 150ms ease-in-out, color 150ms ease-in-out}.onboard-button-primary{background:var(--onboard-white, var(--white));padding:calc(var(--onboard-spacing-5, var(--spacing-5)) - 1px) - calc(var(--onboard-spacing-4, var(--spacing-4)) - 1px);color:var(--onboard-gray-500, var(--gray-500));font-size:var(--onboard-font-size-6, var(--font-size-6));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));border:1px solid var(--onboard-gray-500, var(--gray-500));font-weight:600}.button-neutral-solid{width:100%;border-radius:8px;background:var(--onboard-gray-500, var(--gray-500));color:var(--onboard-white, var(--white));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3))}.button-neutral-solid-b{width:100%;background:var(--onboard-gray-100, var(--gray-100));color:var(--onboard-gray-500, var(--gray-500));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3))}button.rounded{border-radius:24px}.button-neutral-solid:hover{background:var(--onboard-gray-700, var(--gray-700))}.button-neutral-solid-b:hover{background:var(--onboard-gray-200, var(--gray-200))}.button-neutral-solid:active{color:var(--onboard-gray-300, var(--gray-300))}.button-neutral-solid-b:active{color:var(--onboard-gray-600, var(--gray-600));background:var(--onboard-gray-300, var(--gray-300))}.container.svelte-w5zexe{padding:16px;font-family:var(--onboard-font-family-normal, var(--font-family-normal));pointer-events:none;touch-action:none;width:100%}.z-indexed.svelte-w5zexe{z-index:var(--account-center-z-index)}@media all and (min-width: 428px){.container.svelte-w5zexe{max-width:348px}}`)}function r3(e){let t,n;return t=new vV({props:{autoSelect:e[8].autoSelect}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i&256&&(o.autoSelect=r[8].autoSelect),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function i3(e){let t,n;return t=new RV({props:{wallet:e[8].actionRequired}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i&256&&(o.wallet=r[8].actionRequired),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function o3(e){let t,n;return t=new SV({}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function s3(e){let t,n=e[3].position.includes("bottom")&&e[1].position.includes("bottom")&&e[7],r,i,o,s=e[3].position.includes("top")&&e[1].position.includes("top")&&e[7],a,l,u=n&&a3(e),d={ctx:e,current:null,token:null,hasCatch:!1,pending:HV,then:FV,catch:DV,value:23,blocks:[,,,]};Ea(e[16],d);let c=s&&l3(e);return{c(){t=K("div"),u&&u.c(),r=ve(),i=K("div"),d.block.c(),o=ve(),c&&c.c(),U(i,"id","account-center-with-notify"),U(t,"class","container flex flex-column fixed z-indexed svelte-w5zexe"),U(t,"style",a=e[15](Op)[e[1].position]+"; "+(e[11].type==="mobile"&&e[1].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[1].position.includes("bottom")?"padding-top:0;":""))},m(f,m){oe(f,t,m),u&&u.m(t,null),H(t,r),H(t,i),d.block.m(i,d.anchor=null),d.mount=()=>i,d.anchor=null,H(t,o),c&&c.m(t,null),l=!0},p(f,m){e=f,m&138&&(n=e[3].position.includes("bottom")&&e[1].position.includes("bottom")&&e[7]),n?u?(u.p(e,m),m&138&&X(u,1)):(u=a3(e),u.c(),X(u,1),u.m(t,r)):u&&(mt(),ie(u,1,1,()=>{u=null}),gt()),vc(d,e,m),m&138&&(s=e[3].position.includes("top")&&e[1].position.includes("top")&&e[7]),s?c?(c.p(e,m),m&138&&X(c,1)):(c=l3(e),c.c(),X(c,1),c.m(t,null)):c&&(mt(),ie(c,1,1,()=>{c=null}),gt()),(!l||m&2&&a!==(a=e[15](Op)[e[1].position]+"; "+(e[11].type==="mobile"&&e[1].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[1].position.includes("bottom")?"padding-top:0;":"")))&&U(t,"style",a)},i(f){l||(X(u),X(d.block),X(c),l=!0)},o(f){ie(u);for(let m=0;m<3;m+=1){const p=d.blocks[m];ie(p)}ie(c),l=!1},d(f){f&&re(t),u&&u.d(),d.block.d(),d.token=null,d=null,c&&c.d()}}}function a3(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:jV,then:NV,catch:BV,value:22,blocks:[,,,]};return Ea(e[17],r),{c(){t=ct(),r.block.c()},m(i,o){oe(i,t,o),r.block.m(i,r.anchor=o),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(i,o){e=i,vc(r,e,o)},i(i){n||(X(r.block),n=!0)},o(i){for(let o=0;o<3;o+=1){const s=r.blocks[o];ie(s)}n=!1},d(i){i&&re(t),r.block.d(i),r.token=null,r=null}}}function BV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function NV(e){let t,n,r=e[22]&&MV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[22]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function MV(e){let t,n,r;var i=e[22];function o(s){return{props:{notifications:s[10],position:s[3].position,sharedContainer:s[0]}}}return i&&(t=wi(i,o(e))),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){const l={};if(a&1024&&(l.notifications=s[10]),a&8&&(l.position=s[3].position),a&1&&(l.sharedContainer=s[0]),i!==(i=s[22])){if(t){mt();const u=t;ie(u.$$.fragment,1,0,()=>{Fe(u,1)}),gt()}i?(t=wi(i,o(s)),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}else i&&t.$set(l)},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function jV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function DV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function FV(e){let t,n,r=e[23]&&UV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[23]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function UV(e){let t,n,r;var i=e[23];function o(s){return{}}return i&&(t=wi(i,o())),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){if(i!==(i=s[23])){if(t){mt();const l=t;ie(l.$$.fragment,1,0,()=>{Fe(l,1)}),gt()}i?(t=wi(i,o()),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function HV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function l3(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:qV,then:WV,catch:zV,value:22,blocks:[,,,]};return Ea(e[17],r),{c(){t=ct(),r.block.c()},m(i,o){oe(i,t,o),r.block.m(i,r.anchor=o),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(i,o){e=i,vc(r,e,o)},i(i){n||(X(r.block),n=!0)},o(i){for(let o=0;o<3;o+=1){const s=r.blocks[o];ie(s)}n=!1},d(i){i&&re(t),r.block.d(i),r.token=null,r=null}}}function zV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function WV(e){let t,n,r=e[22]&&VV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[22]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function VV(e){let t,n,r;var i=e[22];function o(s){return{props:{notifications:s[10],position:s[3].position,sharedContainer:s[0]}}}return i&&(t=wi(i,o(e))),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){const l={};if(a&1024&&(l.notifications=s[10]),a&8&&(l.position=s[3].position),a&1&&(l.sharedContainer=s[0]),i!==(i=s[22])){if(t){mt();const u=t;ie(u.$$.fragment,1,0,()=>{Fe(u,1)}),gt()}i?(t=wi(i,o(s)),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}else i&&t.$set(l)},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function qV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function c3(e){let t,n,r,i,o=e[1].enabled&&e[2].length&&u3(e);return{c(){t=K("div"),n=K("div"),o&&o.c(),U(t,"class","container flex flex-column fixed z-indexed svelte-w5zexe"),U(t,"style",r=e[15](Op)[e[1].position]+"; "+(e[11].type==="mobile"&&e[1].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[1].position.includes("bottom")?"padding-top:0;":""))},m(s,a){oe(s,t,a),H(t,n),o&&o.m(n,null),i=!0},p(s,a){s[1].enabled&&s[2].length?o?(o.p(s,a),a&6&&X(o,1)):(o=u3(s),o.c(),X(o,1),o.m(n,null)):o&&(mt(),ie(o,1,1,()=>{o=null}),gt()),(!i||a&2&&r!==(r=s[15](Op)[s[1].position]+"; "+(s[11].type==="mobile"&&s[1].position.includes("top")?"padding-bottom: 0;":s[11].type==="mobile"&&s[1].position.includes("bottom")?"padding-top:0;":"")))&&U(t,"style",r)},i(s){i||(X(o),i=!0)},o(s){ie(o),i=!1},d(s){s&&re(t),o&&o.d()}}}function u3(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:XV,then:KV,catch:GV,value:23,blocks:[,,,]};return Ea(e[16],r),{c(){t=ct(),r.block.c()},m(i,o){oe(i,t,o),r.block.m(i,r.anchor=o),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(i,o){e=i,vc(r,e,o)},i(i){n||(X(r.block),n=!0)},o(i){for(let o=0;o<3;o+=1){const s=r.blocks[o];ie(s)}n=!1},d(i){i&&re(t),r.block.d(i),r.token=null,r=null}}}function GV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function KV(e){let t,n,r=e[23]&&ZV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[23]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function ZV(e){let t,n,r;var i=e[23];function o(s){return{}}return i&&(t=wi(i,o())),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){if(i!==(i=s[23])){if(t){mt();const l=t;ie(l.$$.fragment,1,0,()=>{Fe(l,1)}),gt()}i?(t=wi(i,o()),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function XV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function f3(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:eq,then:QV,catch:YV,value:22,blocks:[,,,]};return Ea(e[17],i),{c(){t=K("div"),i.block.c(),U(t,"class","container flex flex-column fixed z-indexed svelte-w5zexe"),U(t,"style",n=e[15](d3)[e[3].position]+"; "+(e[11].type==="mobile"&&e[3].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[3].position.includes("bottom")?"padding-top:0;":""))},m(o,s){oe(o,t,s),i.block.m(t,i.anchor=null),i.mount=()=>t,i.anchor=null,r=!0},p(o,s){e=o,vc(i,e,s),(!r||s&8&&n!==(n=e[15](d3)[e[3].position]+"; "+(e[11].type==="mobile"&&e[3].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[3].position.includes("bottom")?"padding-top:0;":"")))&&U(t,"style",n)},i(o){r||(X(i.block),r=!0)},o(o){for(let s=0;s<3;s+=1){const a=i.blocks[s];ie(a)}r=!1},d(o){o&&re(t),i.block.d(),i.token=null,i=null}}}function YV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function QV(e){let t,n,r=e[22]&&JV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[22]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function JV(e){let t,n,r;var i=e[22];function o(s){return{props:{notifications:s[10],position:s[3].position,sharedContainer:s[0]}}}return i&&(t=wi(i,o(e))),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){const l={};if(a&1024&&(l.notifications=s[10]),a&8&&(l.position=s[3].position),a&1&&(l.sharedContainer=s[0]),i!==(i=s[22])){if(t){mt();const u=t;ie(u.$$.fragment,1,0,()=>{Fe(u,1)}),gt()}i?(t=wi(i,o(s)),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}else i&&t.$set(l)},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function eq(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function tq(e){let t,n,r,i,o,s,a,l=e[8].inProgress&&r3(e),u=e[8].actionRequired&&i3(e),d=e[9]&&o3(),c=e[4]&&s3(e),f=e[5]&&c3(e),m=e[6]&&f3(e);return{c(){l&&l.c(),t=ve(),u&&u.c(),n=ve(),d&&d.c(),r=ve(),c&&c.c(),i=ve(),f&&f.c(),o=ve(),m&&m.c(),s=ct()},m(p,h){l&&l.m(p,h),oe(p,t,h),u&&u.m(p,h),oe(p,n,h),d&&d.m(p,h),oe(p,r,h),c&&c.m(p,h),oe(p,i,h),f&&f.m(p,h),oe(p,o,h),m&&m.m(p,h),oe(p,s,h),a=!0},p(p,[h]){p[8].inProgress?l?(l.p(p,h),h&256&&X(l,1)):(l=r3(p),l.c(),X(l,1),l.m(t.parentNode,t)):l&&(mt(),ie(l,1,1,()=>{l=null}),gt()),p[8].actionRequired?u?(u.p(p,h),h&256&&X(u,1)):(u=i3(p),u.c(),X(u,1),u.m(n.parentNode,n)):u&&(mt(),ie(u,1,1,()=>{u=null}),gt()),p[9]?d?h&512&&X(d,1):(d=o3(),d.c(),X(d,1),d.m(r.parentNode,r)):d&&(mt(),ie(d,1,1,()=>{d=null}),gt()),p[4]?c?(c.p(p,h),h&16&&X(c,1)):(c=s3(p),c.c(),X(c,1),c.m(i.parentNode,i)):c&&(mt(),ie(c,1,1,()=>{c=null}),gt()),p[5]?f?(f.p(p,h),h&32&&X(f,1)):(f=c3(p),f.c(),X(f,1),f.m(o.parentNode,o)):f&&(mt(),ie(f,1,1,()=>{f=null}),gt()),p[6]?m?(m.p(p,h),h&64&&X(m,1)):(m=f3(p),m.c(),X(m,1),m.m(s.parentNode,s)):m&&(mt(),ie(m,1,1,()=>{m=null}),gt())},i(p){a||(X(l),X(u),X(d),X(c),X(f),X(m),a=!0)},o(p){ie(l),ie(u),ie(d),ie(c),ie(f),ie(m),a=!1},d(p){l&&l.d(p),p&&re(t),u&&u.d(p),p&&re(n),d&&d.d(p),p&&re(r),c&&c.d(p),p&&re(i),f&&f.d(p),p&&re(o),m&&m.d(p),p&&re(s)}}}const Op="account-center",d3="notify-onboard-container";function nq(e,t,n){let r,i,o,s,a,l,u,d,c,f,m,p;wt(e,tw,S=>n(2,d=S)),wt(e,jr,S=>n(8,f=S)),wt(e,tc,S=>n(9,m=S));const{device:h,containerElements:y}=fn,g=xe.select("accountCenter").pipe(mi(xe.get().accountCenter),vi(1));wt(e,g,S=>n(1,u=S));const b=xe.select("notify").pipe(mi(xe.get().notify),vi(1));wt(e,b,S=>n(3,c=S));const v=xe.select("notifications").pipe(mi(xe.get().notifications));wt(e,v,S=>n(10,p=S));const w=S=>({topLeft:` + calc(var(--onboard-spacing-4, var(--spacing-4)) - 1px);color:var(--onboard-gray-500, var(--gray-500));font-size:var(--onboard-font-size-6, var(--font-size-6));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));border:1px solid var(--onboard-gray-500, var(--gray-500));font-weight:600}.button-neutral-solid{width:100%;border-radius:8px;background:var(--onboard-gray-500, var(--gray-500));color:var(--onboard-white, var(--white));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3))}.button-neutral-solid-b{width:100%;background:var(--onboard-gray-100, var(--gray-100));color:var(--onboard-gray-500, var(--gray-500));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3))}button.rounded{border-radius:24px}.button-neutral-solid:hover{background:var(--onboard-gray-700, var(--gray-700))}.button-neutral-solid-b:hover{background:var(--onboard-gray-200, var(--gray-200))}.button-neutral-solid:active{color:var(--onboard-gray-300, var(--gray-300))}.button-neutral-solid-b:active{color:var(--onboard-gray-600, var(--gray-600));background:var(--onboard-gray-300, var(--gray-300))}.container.svelte-w5zexe{padding:16px;font-family:var(--onboard-font-family-normal, var(--font-family-normal));pointer-events:none;touch-action:none;width:100%}.z-indexed.svelte-w5zexe{z-index:var(--account-center-z-index)}@media all and (min-width: 428px){.container.svelte-w5zexe{max-width:348px}}`)}function i3(e){let t,n;return t=new vV({props:{autoSelect:e[8].autoSelect}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i&256&&(o.autoSelect=r[8].autoSelect),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function o3(e){let t,n;return t=new RV({props:{wallet:e[8].actionRequired}}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},p(r,i){const o={};i&256&&(o.wallet=r[8].actionRequired),t.$set(o)},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function s3(e){let t,n;return t=new SV({}),{c(){ze(t.$$.fragment)},m(r,i){De(t,r,i),n=!0},i(r){n||(X(t.$$.fragment,r),n=!0)},o(r){ie(t.$$.fragment,r),n=!1},d(r){Fe(t,r)}}}function a3(e){let t,n=e[3].position.includes("bottom")&&e[1].position.includes("bottom")&&e[7],r,i,o,s=e[3].position.includes("top")&&e[1].position.includes("top")&&e[7],a,l,u=n&&l3(e),d={ctx:e,current:null,token:null,hasCatch:!1,pending:HV,then:FV,catch:DV,value:23,blocks:[,,,]};Ea(e[16],d);let c=s&&c3(e);return{c(){t=K("div"),u&&u.c(),r=ve(),i=K("div"),d.block.c(),o=ve(),c&&c.c(),U(i,"id","account-center-with-notify"),U(t,"class","container flex flex-column fixed z-indexed svelte-w5zexe"),U(t,"style",a=e[15](Op)[e[1].position]+"; "+(e[11].type==="mobile"&&e[1].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[1].position.includes("bottom")?"padding-top:0;":""))},m(f,m){oe(f,t,m),u&&u.m(t,null),H(t,r),H(t,i),d.block.m(i,d.anchor=null),d.mount=()=>i,d.anchor=null,H(t,o),c&&c.m(t,null),l=!0},p(f,m){e=f,m&138&&(n=e[3].position.includes("bottom")&&e[1].position.includes("bottom")&&e[7]),n?u?(u.p(e,m),m&138&&X(u,1)):(u=l3(e),u.c(),X(u,1),u.m(t,r)):u&&(mt(),ie(u,1,1,()=>{u=null}),gt()),vc(d,e,m),m&138&&(s=e[3].position.includes("top")&&e[1].position.includes("top")&&e[7]),s?c?(c.p(e,m),m&138&&X(c,1)):(c=c3(e),c.c(),X(c,1),c.m(t,null)):c&&(mt(),ie(c,1,1,()=>{c=null}),gt()),(!l||m&2&&a!==(a=e[15](Op)[e[1].position]+"; "+(e[11].type==="mobile"&&e[1].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[1].position.includes("bottom")?"padding-top:0;":"")))&&U(t,"style",a)},i(f){l||(X(u),X(d.block),X(c),l=!0)},o(f){ie(u);for(let m=0;m<3;m+=1){const p=d.blocks[m];ie(p)}ie(c),l=!1},d(f){f&&re(t),u&&u.d(),d.block.d(),d.token=null,d=null,c&&c.d()}}}function l3(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:jV,then:NV,catch:BV,value:22,blocks:[,,,]};return Ea(e[17],r),{c(){t=ct(),r.block.c()},m(i,o){oe(i,t,o),r.block.m(i,r.anchor=o),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(i,o){e=i,vc(r,e,o)},i(i){n||(X(r.block),n=!0)},o(i){for(let o=0;o<3;o+=1){const s=r.blocks[o];ie(s)}n=!1},d(i){i&&re(t),r.block.d(i),r.token=null,r=null}}}function BV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function NV(e){let t,n,r=e[22]&&MV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[22]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function MV(e){let t,n,r;var i=e[22];function o(s){return{props:{notifications:s[10],position:s[3].position,sharedContainer:s[0]}}}return i&&(t=wi(i,o(e))),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){const l={};if(a&1024&&(l.notifications=s[10]),a&8&&(l.position=s[3].position),a&1&&(l.sharedContainer=s[0]),i!==(i=s[22])){if(t){mt();const u=t;ie(u.$$.fragment,1,0,()=>{Fe(u,1)}),gt()}i?(t=wi(i,o(s)),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}else i&&t.$set(l)},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function jV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function DV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function FV(e){let t,n,r=e[23]&&UV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[23]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function UV(e){let t,n,r;var i=e[23];function o(s){return{}}return i&&(t=wi(i,o())),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){if(i!==(i=s[23])){if(t){mt();const l=t;ie(l.$$.fragment,1,0,()=>{Fe(l,1)}),gt()}i?(t=wi(i,o()),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function HV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function c3(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:qV,then:WV,catch:zV,value:22,blocks:[,,,]};return Ea(e[17],r),{c(){t=ct(),r.block.c()},m(i,o){oe(i,t,o),r.block.m(i,r.anchor=o),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(i,o){e=i,vc(r,e,o)},i(i){n||(X(r.block),n=!0)},o(i){for(let o=0;o<3;o+=1){const s=r.blocks[o];ie(s)}n=!1},d(i){i&&re(t),r.block.d(i),r.token=null,r=null}}}function zV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function WV(e){let t,n,r=e[22]&&VV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[22]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function VV(e){let t,n,r;var i=e[22];function o(s){return{props:{notifications:s[10],position:s[3].position,sharedContainer:s[0]}}}return i&&(t=wi(i,o(e))),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){const l={};if(a&1024&&(l.notifications=s[10]),a&8&&(l.position=s[3].position),a&1&&(l.sharedContainer=s[0]),i!==(i=s[22])){if(t){mt();const u=t;ie(u.$$.fragment,1,0,()=>{Fe(u,1)}),gt()}i?(t=wi(i,o(s)),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}else i&&t.$set(l)},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function qV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function u3(e){let t,n,r,i,o=e[1].enabled&&e[2].length&&f3(e);return{c(){t=K("div"),n=K("div"),o&&o.c(),U(t,"class","container flex flex-column fixed z-indexed svelte-w5zexe"),U(t,"style",r=e[15](Op)[e[1].position]+"; "+(e[11].type==="mobile"&&e[1].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[1].position.includes("bottom")?"padding-top:0;":""))},m(s,a){oe(s,t,a),H(t,n),o&&o.m(n,null),i=!0},p(s,a){s[1].enabled&&s[2].length?o?(o.p(s,a),a&6&&X(o,1)):(o=f3(s),o.c(),X(o,1),o.m(n,null)):o&&(mt(),ie(o,1,1,()=>{o=null}),gt()),(!i||a&2&&r!==(r=s[15](Op)[s[1].position]+"; "+(s[11].type==="mobile"&&s[1].position.includes("top")?"padding-bottom: 0;":s[11].type==="mobile"&&s[1].position.includes("bottom")?"padding-top:0;":"")))&&U(t,"style",r)},i(s){i||(X(o),i=!0)},o(s){ie(o),i=!1},d(s){s&&re(t),o&&o.d()}}}function f3(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:XV,then:KV,catch:GV,value:23,blocks:[,,,]};return Ea(e[16],r),{c(){t=ct(),r.block.c()},m(i,o){oe(i,t,o),r.block.m(i,r.anchor=o),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(i,o){e=i,vc(r,e,o)},i(i){n||(X(r.block),n=!0)},o(i){for(let o=0;o<3;o+=1){const s=r.blocks[o];ie(s)}n=!1},d(i){i&&re(t),r.block.d(i),r.token=null,r=null}}}function GV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function KV(e){let t,n,r=e[23]&&ZV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[23]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function ZV(e){let t,n,r;var i=e[23];function o(s){return{}}return i&&(t=wi(i,o())),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){if(i!==(i=s[23])){if(t){mt();const l=t;ie(l.$$.fragment,1,0,()=>{Fe(l,1)}),gt()}i?(t=wi(i,o()),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function XV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function d3(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:eq,then:QV,catch:YV,value:22,blocks:[,,,]};return Ea(e[17],i),{c(){t=K("div"),i.block.c(),U(t,"class","container flex flex-column fixed z-indexed svelte-w5zexe"),U(t,"style",n=e[15](h3)[e[3].position]+"; "+(e[11].type==="mobile"&&e[3].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[3].position.includes("bottom")?"padding-top:0;":""))},m(o,s){oe(o,t,s),i.block.m(t,i.anchor=null),i.mount=()=>t,i.anchor=null,r=!0},p(o,s){e=o,vc(i,e,s),(!r||s&8&&n!==(n=e[15](h3)[e[3].position]+"; "+(e[11].type==="mobile"&&e[3].position.includes("top")?"padding-bottom: 0;":e[11].type==="mobile"&&e[3].position.includes("bottom")?"padding-top:0;":"")))&&U(t,"style",n)},i(o){r||(X(i.block),r=!0)},o(o){for(let s=0;s<3;s+=1){const a=i.blocks[s];ie(a)}r=!1},d(o){o&&re(t),i.block.d(),i.token=null,i=null}}}function YV(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function QV(e){let t,n,r=e[22]&&JV(e);return{c(){r&&r.c(),t=ct()},m(i,o){r&&r.m(i,o),oe(i,t,o),n=!0},p(i,o){i[22]&&r.p(i,o)},i(i){n||(X(r),n=!0)},o(i){ie(r),n=!1},d(i){r&&r.d(i),i&&re(t)}}}function JV(e){let t,n,r;var i=e[22];function o(s){return{props:{notifications:s[10],position:s[3].position,sharedContainer:s[0]}}}return i&&(t=wi(i,o(e))),{c(){t&&ze(t.$$.fragment),n=ct()},m(s,a){t&&De(t,s,a),oe(s,n,a),r=!0},p(s,a){const l={};if(a&1024&&(l.notifications=s[10]),a&8&&(l.position=s[3].position),a&1&&(l.sharedContainer=s[0]),i!==(i=s[22])){if(t){mt();const u=t;ie(u.$$.fragment,1,0,()=>{Fe(u,1)}),gt()}i?(t=wi(i,o(s)),ze(t.$$.fragment),X(t.$$.fragment,1),De(t,n.parentNode,n)):t=null}else i&&t.$set(l)},i(s){r||(t&&X(t.$$.fragment,s),r=!0)},o(s){t&&ie(t.$$.fragment,s),r=!1},d(s){s&&re(n),t&&Fe(t,s)}}}function eq(e){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function tq(e){let t,n,r,i,o,s,a,l=e[8].inProgress&&i3(e),u=e[8].actionRequired&&o3(e),d=e[9]&&s3(),c=e[4]&&a3(e),f=e[5]&&u3(e),m=e[6]&&d3(e);return{c(){l&&l.c(),t=ve(),u&&u.c(),n=ve(),d&&d.c(),r=ve(),c&&c.c(),i=ve(),f&&f.c(),o=ve(),m&&m.c(),s=ct()},m(p,h){l&&l.m(p,h),oe(p,t,h),u&&u.m(p,h),oe(p,n,h),d&&d.m(p,h),oe(p,r,h),c&&c.m(p,h),oe(p,i,h),f&&f.m(p,h),oe(p,o,h),m&&m.m(p,h),oe(p,s,h),a=!0},p(p,[h]){p[8].inProgress?l?(l.p(p,h),h&256&&X(l,1)):(l=i3(p),l.c(),X(l,1),l.m(t.parentNode,t)):l&&(mt(),ie(l,1,1,()=>{l=null}),gt()),p[8].actionRequired?u?(u.p(p,h),h&256&&X(u,1)):(u=o3(p),u.c(),X(u,1),u.m(n.parentNode,n)):u&&(mt(),ie(u,1,1,()=>{u=null}),gt()),p[9]?d?h&512&&X(d,1):(d=s3(),d.c(),X(d,1),d.m(r.parentNode,r)):d&&(mt(),ie(d,1,1,()=>{d=null}),gt()),p[4]?c?(c.p(p,h),h&16&&X(c,1)):(c=a3(p),c.c(),X(c,1),c.m(i.parentNode,i)):c&&(mt(),ie(c,1,1,()=>{c=null}),gt()),p[5]?f?(f.p(p,h),h&32&&X(f,1)):(f=u3(p),f.c(),X(f,1),f.m(o.parentNode,o)):f&&(mt(),ie(f,1,1,()=>{f=null}),gt()),p[6]?m?(m.p(p,h),h&64&&X(m,1)):(m=d3(p),m.c(),X(m,1),m.m(s.parentNode,s)):m&&(mt(),ie(m,1,1,()=>{m=null}),gt())},i(p){a||(X(l),X(u),X(d),X(c),X(f),X(m),a=!0)},o(p){ie(l),ie(u),ie(d),ie(c),ie(f),ie(m),a=!1},d(p){l&&l.d(p),p&&re(t),u&&u.d(p),p&&re(n),d&&d.d(p),p&&re(r),c&&c.d(p),p&&re(i),f&&f.d(p),p&&re(o),m&&m.d(p),p&&re(s)}}}const Op="account-center",h3="notify-onboard-container";function nq(e,t,n){let r,i,o,s,a,l,u,d,c,f,m,p;wt(e,nw,S=>n(2,d=S)),wt(e,jr,S=>n(8,f=S)),wt(e,nc,S=>n(9,m=S));const{device:h,containerElements:y}=fn,g=xe.select("accountCenter").pipe(mi(xe.get().accountCenter),vi(1));wt(e,g,S=>n(1,u=S));const b=xe.select("notify").pipe(mi(xe.get().notify),vi(1));wt(e,b,S=>n(3,c=S));const v=xe.select("notifications").pipe(mi(xe.get().notifications));wt(e,v,S=>n(10,p=S));const w=S=>({topLeft:` top: var(--${S}-position-top, 0); left: var(--${S}-position-left, 0);`,topRight:` top: var(--${S}-position-top, 0); @@ -2460,9 +2460,9 @@ Note: there are at least one loader still registered to this locale that wasn't bottom: var(--${S}-position-bottom, 0); right: var(--${S}-position-right, 0);`,bottomLeft:` bottom: var(--${S}-position-bottom, 0); - left: var(--${S}-position-left, 0);`}),E=u.enabled?ue(()=>import("./Index-a4a1058e-DBreb4CD.js"),__vite__mapDeps([5,6,7])).then(S=>S.default):Promise.resolve(null),C=c.enabled?ue(()=>import("./Index-8adb4124-D896XomO.js"),[]).then(S=>S.default):Promise.resolve(null),k=u.enabled&&y&&y.accountCenter,_=(S,A,I,L)=>{const F=S.attachShadow({mode:"open"});let R=document.querySelector("onboard-v2").shadowRoot.styleSheets;const B=new CSSStyleSheet;Object.values(R).forEach(W=>{Object.values(W.cssRules).forEach(te=>B.insertRule(te.cssText))}),F.adoptedStyleSheets=[B];const V=document.querySelector(A);if(V.appendChild(S),!V)throw new Error(`Element with query ${A} does not exist.`);(async()=>{let W=await I;W&&new W({target:F,props:{settings:L,mountInContainer:!0}})})()};if(k){const S=document.createElement("onboard-account-center");_(S,k,E,u)}return e.$$.update=()=>{e.$$.dirty&10&&n(0,r=!k&&u.enabled&&c.enabled&&c.position===u.position),e.$$.dirty&10&&n(7,i=h.type==="mobile"||u.position===c.position),e.$$.dirty&10&&n(18,o=c.position.includes("bottom")&&u.position.includes("bottom")||c.position.includes("top")&&u.position.includes("top")),e.$$.dirty&262158&&n(6,s=c.enabled&&(!u.enabled||k||c.position!==u.position&&h.type!=="mobile"||h.type==="mobile"&&!o||!d.length)),e.$$.dirty&262158&&n(5,a=u.enabled&&(!c.enabled||c.position!==u.position&&h.type!=="mobile"||h.type==="mobile"&&!o)&&d.length),e.$$.dirty&262159&&n(4,l=c.enabled&&u.enabled&&(r||h.type==="mobile"&&o)&&d.length)},[r,u,d,c,l,a,s,i,f,m,p,h,g,b,v,w,E,C,o]}class rq extends Gt{constructor(t){super(),qt(this,t,nq,tq,Wt,{},LV)}}let my;xe.select("notifications").subscribe(e=>{my=e});async function iq(e){const t=nz(e);if(t)throw t;const{sendTransaction:n,estimateGas:r,gasPrice:i,balance:o,txDetails:s,txApproveReminderTimeout:a}=e,l=a&&a>3e3?a:15e3,[u,d]=await cq(r||(()=>Promise.resolve("")),i||(()=>Promise.resolve(""))),c=sq(F7()),f=BigInt(s&&s.value||0);if(o&&u&&d){const y=BigInt(u)*BigInt(d)+f;__(y)>__(iU(o))&&Xa(fu("nsfFail",c))}const m=my.find(y=>y.eventCode==="txRequest");if(m){const g=fu("txAwaitingApproval",m.id);Xa(g)}if(setTimeout(()=>{const y=my.find(g=>g.id===c&&g.eventCode==="txRequest");if(y){const b=fu("txConfirmReminder",y.id);Xa(b)}},l),Xa(fu("txRequest",c)),!n)return c;let h;try{h=await n()}catch(y){const{eventCode:g,errorMsg:b}=lq(y);Xa(fu(g,c)),console.error(b);return}if(F9(c),h)return h}const fu=(e,t)=>({eventCode:e,type:X9(e),id:t,key:oq(t,e),message:aq(e),startTime:Date.now(),network:Object.keys(I_).find(n=>I_[n]===xe.get().chains[0].id),autoDismiss:0}),oq=(e,t)=>`${e}-${t}`,sq=e=>`${e}-preflight`,aq=e=>{const t=Re.notify;return t.transaction,t.transaction[e]};function lq(e){if(!e.stack||!e.message)return{eventCode:"txError",errorMsg:"An unknown error occurred"};const t=e.stack||e.message;return t.includes("User denied transaction signature")?{eventCode:"txSendFail",errorMsg:"User denied transaction signature"}:t.includes("transaction underpriced")?{eventCode:"txUnderpriced",errorMsg:"Transaction is under priced"}:{eventCode:"txError",errorMsg:t}}const cq=async(e,t)=>{if(!e||!t)return Promise.resolve([]);const n=e();if(!n.then)throw new Error("The `estimateGas` function must return a Promise");const r=t();if(!r.then)throw new Error("The `gasPrice` function must return a Promise");return Promise.all([n,r]).then(([i,o])=>{if(typeof i!="string")throw new Error(`The Promise returned from calling 'estimateGas' must resolve with a value of type 'string'. Received a value of: ${i} with a type: ${typeof i}`);if(typeof o!="string")throw new Error(`The Promise returned from calling 'gasPrice' must resolve with a value of type 'string'. Received a value of: ${o} with a type: ${typeof o}`);return[BigInt(i),BigInt(o)]}).catch(i=>{throw new Error(`There was an error getting gas estimates: ${i}`)})},Fu={connectWallet:bz,disconnectWallet:iw,setChain:Rz,state:{get:xe.get,select:xe.select,actions:{setWalletModules:U9,setLocale:hz,updateNotify:Ph,customNotification:fz,preflightNotifications:iq,updateBalances:Z9,updateAccountCenter:D9,setPrimaryWallet:cz,updateTheme:H9,updateAppMetadata:z9}}};function uq(e){if(typeof window>"u")return Fu;if(e){const w=qH(e);if(w)throw w}const{wallets:t,chains:n,appMetadata:r,i18n:i,accountCenter:o,apiKey:s,notify:a,gas:l,connect:u,containerElements:d,transactionPreview:c,theme:f,disableFontDownload:m,unstoppableResolution:p,wagmi:h}=e;d&&$_({containerElements:d});const{device:y,svelteInstance:g}=fn;if(g&&(console.warn("Re-initializing Onboard and resetting back to initial state"),Jv.next()),Bz(i),az(UU(n)),typeof u<"u"&&uz(u),typeof o<"u"){let w;const{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}=o;y.type==="mobile"?w=Object.assign(Object.assign(Object.assign({},Do.accountCenter),{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}),o.mobile?o.mobile:{}):o.desktop&&(w=Object.assign(Object.assign(Object.assign({},Do.accountCenter),{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}),o.desktop)),typeof w<"u"&&D9(w)}let b;if(typeof h<"u"&&(b=h(Object.assign({disconnect:iw,updateChain:j9},Iz()))),typeof a<"u")if("desktop"in a||"mobile"in a){const w=JH(a);if(w)throw w;a&&a.desktop&&a.desktop.position&&o&&o.desktop&&o.desktop.position&&(a.desktop.position=o.desktop.position),a&&a.mobile&&a.mobile.position&&o&&o.mobile&&o.mobile.position&&(a.mobile.position=o.mobile.position);let E={};y.type==="mobile"&&a.mobile?E=Object.assign(Object.assign({},Do.notify),a.mobile):a.desktop&&(E=Object.assign(Object.assign({},Do.notify),a.desktop)),Ph(E)}else{const w=M9(a);if(w)throw w;const E=Object.assign(Object.assign({},Do.notify),a);Ph(E)}else{const w=Do.notify;Ph(w)}const v=g||hq(f||{},m||!1);if($_({svelteInstance:v,apiKey:s,initialWalletInit:t,gas:l,unstoppableResolution:p,wagmi:b}),r&&z9(r),s&&c&&console.error("Transaction Preview support has been removed and is no longer supported within Web3-Onboard"),f&&H9(f),u&&(u.autoConnectLastWallet||u.autoConnectAllPreviousWallet)){const w=B0(gi.LAST_CONNECTED_WALLET);try{const E=JSON.parse(w);E&&Array.isArray(E)&&E.length&&h3(E,u),E&&typeof E=="string"&&h3([E],u)}catch(E){E instanceof SyntaxError&&w&&Fu.connectWallet({autoSelect:{label:w,disableModals:!0}})}}return Fu}const fq=(e,t)=>t||document.body&&(getComputedStyle(document.body).getPropertyValue("--onboard-font-family-normal")||getComputedStyle(document.body).getPropertyValue("--w3o-font-family"))?!0:e?!!(typeof e=="object"&&e["--w3o-font-family"]):!1,dq=async()=>{const{InterVar:e}=await ue(async()=>{const{InterVar:n}=await import("./index-OBL8cfjx.js");return{InterVar:n}},[]),t=document.createElement("style");t.innerHTML=` + left: var(--${S}-position-left, 0);`}),E=u.enabled?ue(()=>import("./Index-a4a1058e-D0a-yFFT.js"),__vite__mapDeps([5,6,7])).then(S=>S.default):Promise.resolve(null),C=c.enabled?ue(()=>import("./Index-8adb4124-D4rUf_RB.js"),[]).then(S=>S.default):Promise.resolve(null),k=u.enabled&&y&&y.accountCenter,_=(S,A,I,L)=>{const F=S.attachShadow({mode:"open"});let R=document.querySelector("onboard-v2").shadowRoot.styleSheets;const B=new CSSStyleSheet;Object.values(R).forEach(W=>{Object.values(W.cssRules).forEach(te=>B.insertRule(te.cssText))}),F.adoptedStyleSheets=[B];const V=document.querySelector(A);if(V.appendChild(S),!V)throw new Error(`Element with query ${A} does not exist.`);(async()=>{let W=await I;W&&new W({target:F,props:{settings:L,mountInContainer:!0}})})()};if(k){const S=document.createElement("onboard-account-center");_(S,k,E,u)}return e.$$.update=()=>{e.$$.dirty&10&&n(0,r=!k&&u.enabled&&c.enabled&&c.position===u.position),e.$$.dirty&10&&n(7,i=h.type==="mobile"||u.position===c.position),e.$$.dirty&10&&n(18,o=c.position.includes("bottom")&&u.position.includes("bottom")||c.position.includes("top")&&u.position.includes("top")),e.$$.dirty&262158&&n(6,s=c.enabled&&(!u.enabled||k||c.position!==u.position&&h.type!=="mobile"||h.type==="mobile"&&!o||!d.length)),e.$$.dirty&262158&&n(5,a=u.enabled&&(!c.enabled||c.position!==u.position&&h.type!=="mobile"||h.type==="mobile"&&!o)&&d.length),e.$$.dirty&262159&&n(4,l=c.enabled&&u.enabled&&(r||h.type==="mobile"&&o)&&d.length)},[r,u,d,c,l,a,s,i,f,m,p,h,g,b,v,w,E,C,o]}class rq extends Gt{constructor(t){super(),qt(this,t,nq,tq,Wt,{},LV)}}let my;xe.select("notifications").subscribe(e=>{my=e});async function iq(e){const t=nz(e);if(t)throw t;const{sendTransaction:n,estimateGas:r,gasPrice:i,balance:o,txDetails:s,txApproveReminderTimeout:a}=e,l=a&&a>3e3?a:15e3,[u,d]=await cq(r||(()=>Promise.resolve("")),i||(()=>Promise.resolve(""))),c=sq(F7()),f=BigInt(s&&s.value||0);if(o&&u&&d){const y=BigInt(u)*BigInt(d)+f;x_(y)>x_(iU(o))&&Ya(fu("nsfFail",c))}const m=my.find(y=>y.eventCode==="txRequest");if(m){const g=fu("txAwaitingApproval",m.id);Ya(g)}if(setTimeout(()=>{const y=my.find(g=>g.id===c&&g.eventCode==="txRequest");if(y){const b=fu("txConfirmReminder",y.id);Ya(b)}},l),Ya(fu("txRequest",c)),!n)return c;let h;try{h=await n()}catch(y){const{eventCode:g,errorMsg:b}=lq(y);Ya(fu(g,c)),console.error(b);return}if(F9(c),h)return h}const fu=(e,t)=>({eventCode:e,type:X9(e),id:t,key:oq(t,e),message:aq(e),startTime:Date.now(),network:Object.keys($_).find(n=>$_[n]===xe.get().chains[0].id),autoDismiss:0}),oq=(e,t)=>`${e}-${t}`,sq=e=>`${e}-preflight`,aq=e=>{const t=Re.notify;return t.transaction,t.transaction[e]};function lq(e){if(!e.stack||!e.message)return{eventCode:"txError",errorMsg:"An unknown error occurred"};const t=e.stack||e.message;return t.includes("User denied transaction signature")?{eventCode:"txSendFail",errorMsg:"User denied transaction signature"}:t.includes("transaction underpriced")?{eventCode:"txUnderpriced",errorMsg:"Transaction is under priced"}:{eventCode:"txError",errorMsg:t}}const cq=async(e,t)=>{if(!e||!t)return Promise.resolve([]);const n=e();if(!n.then)throw new Error("The `estimateGas` function must return a Promise");const r=t();if(!r.then)throw new Error("The `gasPrice` function must return a Promise");return Promise.all([n,r]).then(([i,o])=>{if(typeof i!="string")throw new Error(`The Promise returned from calling 'estimateGas' must resolve with a value of type 'string'. Received a value of: ${i} with a type: ${typeof i}`);if(typeof o!="string")throw new Error(`The Promise returned from calling 'gasPrice' must resolve with a value of type 'string'. Received a value of: ${o} with a type: ${typeof o}`);return[BigInt(i),BigInt(o)]}).catch(i=>{throw new Error(`There was an error getting gas estimates: ${i}`)})},Fu={connectWallet:bz,disconnectWallet:ow,setChain:Rz,state:{get:xe.get,select:xe.select,actions:{setWalletModules:U9,setLocale:hz,updateNotify:Ph,customNotification:fz,preflightNotifications:iq,updateBalances:Z9,updateAccountCenter:D9,setPrimaryWallet:cz,updateTheme:H9,updateAppMetadata:z9}}};function uq(e){if(typeof window>"u")return Fu;if(e){const w=qH(e);if(w)throw w}const{wallets:t,chains:n,appMetadata:r,i18n:i,accountCenter:o,apiKey:s,notify:a,gas:l,connect:u,containerElements:d,transactionPreview:c,theme:f,disableFontDownload:m,unstoppableResolution:p,wagmi:h}=e;d&&P_({containerElements:d});const{device:y,svelteInstance:g}=fn;if(g&&(console.warn("Re-initializing Onboard and resetting back to initial state"),ew.next()),Bz(i),az(UU(n)),typeof u<"u"&&uz(u),typeof o<"u"){let w;const{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}=o;y.type==="mobile"?w=Object.assign(Object.assign(Object.assign({},Do.accountCenter),{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}),o.mobile?o.mobile:{}):o.desktop&&(w=Object.assign(Object.assign(Object.assign({},Do.accountCenter),{hideTransactionProtectionBtn:E,transactionProtectionInfoLink:C}),o.desktop)),typeof w<"u"&&D9(w)}let b;if(typeof h<"u"&&(b=h(Object.assign({disconnect:ow,updateChain:j9},Iz()))),typeof a<"u")if("desktop"in a||"mobile"in a){const w=JH(a);if(w)throw w;a&&a.desktop&&a.desktop.position&&o&&o.desktop&&o.desktop.position&&(a.desktop.position=o.desktop.position),a&&a.mobile&&a.mobile.position&&o&&o.mobile&&o.mobile.position&&(a.mobile.position=o.mobile.position);let E={};y.type==="mobile"&&a.mobile?E=Object.assign(Object.assign({},Do.notify),a.mobile):a.desktop&&(E=Object.assign(Object.assign({},Do.notify),a.desktop)),Ph(E)}else{const w=M9(a);if(w)throw w;const E=Object.assign(Object.assign({},Do.notify),a);Ph(E)}else{const w=Do.notify;Ph(w)}const v=g||hq(f||{},m||!1);if(P_({svelteInstance:v,apiKey:s,initialWalletInit:t,gas:l,unstoppableResolution:p,wagmi:b}),r&&z9(r),s&&c&&console.error("Transaction Preview support has been removed and is no longer supported within Web3-Onboard"),f&&H9(f),u&&(u.autoConnectLastWallet||u.autoConnectAllPreviousWallet)){const w=B0(gi.LAST_CONNECTED_WALLET);try{const E=JSON.parse(w);E&&Array.isArray(E)&&E.length&&p3(E,u),E&&typeof E=="string"&&p3([E],u)}catch(E){E instanceof SyntaxError&&w&&Fu.connectWallet({autoSelect:{label:w,disableModals:!0}})}}return Fu}const fq=(e,t)=>t||document.body&&(getComputedStyle(document.body).getPropertyValue("--onboard-font-family-normal")||getComputedStyle(document.body).getPropertyValue("--w3o-font-family"))?!0:e?!!(typeof e=="object"&&e["--w3o-font-family"]):!1,dq=async()=>{const{InterVar:e}=await ue(async()=>{const{InterVar:n}=await import("./index-DAnovpM3.js");return{InterVar:n}},[]),t=document.createElement("style");t.innerHTML=` ${e} - `,document.body.appendChild(t)},h3=async(e,t)=>{const n=[],r=e;if(!t.autoConnectAllPreviousWallet)Fu.connectWallet({autoSelect:{label:r[0],disableModals:!0}}),n.push(r[0]);else for(let i=r.length;i--;)(await Fu.connectWallet({autoSelect:{label:r[i],disableModals:!0}})).some(s=>s.label===r[i])&&n.unshift(r[i]);N0(gi.LAST_CONNECTED_WALLET,JSON.stringify(n))};function hq(e,t){class n extends HTMLElement{constructor(){super()}}customElements.get("onboard-v2")||customElements.define("onboard-v2",n),fq(e,t)||dq();const r=document.createElement("onboard-v2"),i=r.attachShadow({mode:"open"});r.style.all="initial",i.innerHTML=` + `,document.body.appendChild(t)},p3=async(e,t)=>{const n=[],r=e;if(!t.autoConnectAllPreviousWallet)Fu.connectWallet({autoSelect:{label:r[0],disableModals:!0}}),n.push(r[0]);else for(let i=r.length;i--;)(await Fu.connectWallet({autoSelect:{label:r[i],disableModals:!0}})).some(s=>s.label===r[i])&&n.unshift(r[i]);N0(gi.LAST_CONNECTED_WALLET,JSON.stringify(n))};function hq(e,t){class n extends HTMLElement{constructor(){super()}}customElements.get("onboard-v2")||customElements.define("onboard-v2",n),fq(e,t)||dq();const r=document.createElement("onboard-v2"),i=r.attachShadow({mode:"open"});r.style.all="initial",i.innerHTML=`