@orbs-network/spot-react 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/{ccip-bPFWIGtu.js → ccip-BktNSwP8.js} +1 -1
  2. package/dist/{index-Jq763Rdi.js → index-Ij0jPMOb.js} +10745 -18599
  3. package/dist/spot-react/package.json.d.ts +2 -8
  4. package/dist/spot-react/src/consts.d.ts +1 -2
  5. package/dist/spot-react/src/consts.d.ts.map +1 -1
  6. package/dist/spot-react/src/hooks/helper-hooks.d.ts +41 -1
  7. package/dist/spot-react/src/hooks/helper-hooks.d.ts.map +1 -1
  8. package/dist/spot-react/src/hooks/order-hooks.d.ts +4 -28
  9. package/dist/spot-react/src/hooks/order-hooks.d.ts.map +1 -1
  10. package/dist/spot-react/src/hooks/use-build-order-info.d.ts +37 -65
  11. package/dist/spot-react/src/hooks/use-build-order-info.d.ts.map +1 -1
  12. package/dist/spot-react/src/hooks/use-cancel-order.d.ts +2 -2
  13. package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -1
  14. package/dist/spot-react/src/hooks/use-disclaimer-panel.d.ts.map +1 -1
  15. package/dist/spot-react/src/hooks/use-duration.d.ts +6 -2
  16. package/dist/spot-react/src/hooks/use-duration.d.ts.map +1 -1
  17. package/dist/spot-react/src/hooks/use-fill-delay.d.ts +17 -5
  18. package/dist/spot-react/src/hooks/use-fill-delay.d.ts.map +1 -1
  19. package/dist/spot-react/src/hooks/use-history-order.d.ts +48 -2
  20. package/dist/spot-react/src/hooks/use-history-order.d.ts.map +1 -1
  21. package/dist/spot-react/src/hooks/use-input-errors.d.ts.map +1 -1
  22. package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts +0 -2
  23. package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts.map +1 -1
  24. package/dist/spot-react/src/hooks/use-limit-price.d.ts.map +1 -1
  25. package/dist/spot-react/src/hooks/use-order.d.ts +28 -78
  26. package/dist/spot-react/src/hooks/use-order.d.ts.map +1 -1
  27. package/dist/spot-react/src/hooks/use-src-amount.d.ts.map +1 -1
  28. package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts +10 -10
  29. package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts.map +1 -1
  30. package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -1
  31. package/dist/spot-react/src/hooks/use-swap-execution.d.ts +21 -0
  32. package/dist/spot-react/src/hooks/use-swap-execution.d.ts.map +1 -0
  33. package/dist/spot-react/src/hooks/use-trades.d.ts +5 -15
  34. package/dist/spot-react/src/hooks/use-trades.d.ts.map +1 -1
  35. package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts +0 -2
  36. package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts.map +1 -1
  37. package/dist/spot-react/src/hooks/use-trigger-price.d.ts.map +1 -1
  38. package/dist/spot-react/src/index.d.ts +9 -21
  39. package/dist/spot-react/src/index.d.ts.map +1 -1
  40. package/dist/spot-react/src/spot-context.d.ts +2 -2
  41. package/dist/spot-react/src/spot-context.d.ts.map +1 -1
  42. package/dist/spot-react/src/store.d.ts +2 -3
  43. package/dist/spot-react/src/store.d.ts.map +1 -1
  44. package/dist/spot-react/src/types.d.ts +16 -300
  45. package/dist/spot-react/src/types.d.ts.map +1 -1
  46. package/dist/spot-react/src/utils.d.ts +1 -7
  47. package/dist/spot-react/src/utils.d.ts.map +1 -1
  48. package/dist/spot-react.js +74 -131
  49. package/dist/spot-react.umd.cjs +50 -67
  50. package/dist/spot-ui/src/lib/analytics.d.ts.map +1 -1
  51. package/dist/spot-ui/src/lib/lib.d.ts +1 -1
  52. package/dist/spot-ui/src/lib/lib.d.ts.map +1 -1
  53. package/dist/spot-ui/src/lib/networks.d.ts +42 -0
  54. package/dist/spot-ui/src/lib/networks.d.ts.map +1 -1
  55. package/dist/spot-ui/src/lib/orders/v2-orders.d.ts.map +1 -1
  56. package/dist/spot-ui/src/lib/types.d.ts +1 -0
  57. package/dist/spot-ui/src/lib/types.d.ts.map +1 -1
  58. package/dist/spot-ui/src/lib/utils.d.ts +41 -1
  59. package/dist/spot-ui/src/lib/utils.d.ts.map +1 -1
  60. package/package.json +3 -9
  61. package/dist/spot-react/src/components/TokenLogo.d.ts +0 -9
  62. package/dist/spot-react/src/components/TokenLogo.d.ts.map +0 -1
  63. package/dist/spot-react/src/components/format-number.d.ts +0 -10
  64. package/dist/spot-react/src/components/format-number.d.ts.map +0 -1
  65. package/dist/spot-react/src/components/order-details.d.ts +0 -75
  66. package/dist/spot-react/src/components/order-details.d.ts.map +0 -1
  67. package/dist/spot-react/src/components/orders/order-fills.d.ts +0 -8
  68. package/dist/spot-react/src/components/orders/order-fills.d.ts.map +0 -1
  69. package/dist/spot-react/src/components/orders/order-preview.d.ts +0 -3
  70. package/dist/spot-react/src/components/orders/order-preview.d.ts.map +0 -1
  71. package/dist/spot-react/src/components/orders/orders-list.d.ts +0 -2
  72. package/dist/spot-react/src/components/orders/orders-list.d.ts.map +0 -1
  73. package/dist/spot-react/src/components/orders/orders.d.ts +0 -2
  74. package/dist/spot-react/src/components/orders/orders.d.ts.map +0 -1
  75. package/dist/spot-react/src/components/portal.d.ts +0 -6
  76. package/dist/spot-react/src/components/portal.d.ts.map +0 -1
  77. package/dist/spot-react/src/components/submit-order-panel.d.ts +0 -10
  78. package/dist/spot-react/src/components/submit-order-panel.d.ts.map +0 -1
  79. package/dist/spot-react/src/hooks/use-toggle-price.d.ts +0 -5
  80. package/dist/spot-react/src/hooks/use-toggle-price.d.ts.map +0 -1
  81. package/dist/spot-react/src/hooks/use-translations.d.ts +0 -3
  82. package/dist/spot-react/src/hooks/use-translations.d.ts.map +0 -1
  83. package/dist/spot-react/src/i18n/en.json.d.ts +0 -99
@@ -1,4 +1,4 @@
1
- (function(R,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],C):(R=typeof globalThis<"u"?globalThis:R||self,C(R.SpotReact={},R.jsxRuntime,R.React,R.ReactDOM))})(this,(function(R,C,M,Os){"use strict";var rq=Object.defineProperty;var V5=R=>{throw TypeError(R)};var nq=(R,C,M)=>C in R?rq(R,C,{enumerable:!0,configurable:!0,writable:!0,value:M}):R[C]=M;var rd=(R,C,M)=>nq(R,typeof C!="symbol"?C+"":C,M),Sm=(R,C,M)=>C.has(R)||V5("Cannot "+M);var N=(R,C,M)=>(Sm(R,C,"read from private field"),M?M.call(R):C.get(R)),le=(R,C,M)=>C.has(R)?V5("Cannot add the same private member more than once"):C instanceof WeakSet?C.add(R):C.set(R,M),J=(R,C,M,Os)=>(Sm(R,C,"write to private field"),Os?Os.call(R,M):C.set(R,M),M),Se=(R,C,M)=>(Sm(R,C,"access private method"),M);var nd=(R,C,M,Os)=>({set _(ad){J(R,C,ad,M)},get _(){return N(R,C,Os)}});var bn,ya,P5,ga,ks,So,I5,Po,Cs,Io,B5,xa,F5,wa,Bo,Fr,va,Bt,Ac,Ea,Xr,Zn,O5,nr,_e,Sc,Wt,ka,Fo,Vn,Ts,Pc,Oo,Uo,Ca,Ta,As,Do,We,Fc,Pm,Im,Bm,Fm,Om,Um,Dm,W5,U5,Ic,yn,qt,Aa,gn,Fs,D5,Wn,Qr,Bc,_5,qn,Ss,sr,Kn,Yn,sd,_m,M5,xn,N5,mt,Ps,Is,_o,Mo,Bs,No,Lo,L5;function ad(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Et=ad(M),Pe={SpookySwap:{chainName:"ftm",chainId:250,twapVersion:4,twapAddress:"0xd3B290FEB04E353d1821bc0a12397FdEa9a846C0",lensAddress:"0x0221EfDF1Fd3212AF87F23cceB7693a65fAF1d7f",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SpookySwap",partner:"Orbs:TWAP:SpookySwap",exchangeAddress:"0xdF7CCd5fc7077E9de5f27a7b7bfDC837c82f8496",exchangeType:"ExchangeV2",pathfinderKey:""},SpookySwapSonic:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SpookySwapSonic",partner:"Orbs:TWAP:SpookySwap",exchangeAddress:"0x6699bE3aF75e5c1B807b1031dBde6dA9A67739F3",exchangeType:"ExchangeV2",pathfinderKey:""},QuickSwap:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"QuickSwap",partner:"Orbs:TWAP:QuickSwap",exchangeAddress:"0x8FCc245209bE85C49D738D0CE5613F74E5d91E86",exchangeType:"ParaswapExchange",pathfinderKey:"QuickSwap,QuickSwapV3"},QuickSwapBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"QuickSwap",partner:"Orbs:TWAP:QuickSwap",exchangeAddress:"0xb7a3d74895bfd3aff6780525e36d79fcf26a895f",exchangeType:"ExchangeV2",pathfinderKey:""},Chronos:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Chronos",partner:"Orbs:TWAP:Chronos",exchangeAddress:"0x0178e50adAF3b925F27aC518FCd952CE7F9A3B36",exchangeType:"ExchangeV2",pathfinderKey:"Chronos Stable,Chronos Volatile,Chronos V3"},BaseSwap:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"BaseSwap",partner:"Orbs:TWAP:BaseSwap",exchangeAddress:"0xAca3155c17530C4aA96746F226fcC049658490d2",exchangeType:"ExchangeV2",pathfinderKey:"BaseSwap,BaseSwapX"},Arbidex:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Arbidex",partner:"Orbs:TWAP:Arbidex",exchangeAddress:"0x49d21052f4695d16C7cce6eF561301Aa4d840420",exchangeType:"ExchangeV2",pathfinderKey:"Arbidex Classic,Arbidex Quantum"},Thena:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Thena",partner:"Orbs:TWAP:Thena",exchangeAddress:"0x2B2fABDbfa4a15da0d351F947C14F4520db0bDc1",exchangeType:"ExchangeV2",pathfinderKey:"43,47"},PancakeSwap:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0x1A2bb6B75D58b740d88413ef4840D6fa3F637940",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapArbitrum:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapLinea:{chainName:"linea",chainId:59144,twapVersion:4,twapAddress:"0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78",lensAddress:"0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},Lynex:{chainName:"linea",chainId:59144,twapVersion:4,twapAddress:"0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78",lensAddress:"0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"Lynex",partner:"Orbs:TWAP:Lynex",exchangeAddress:"0x04C06C96d7D19977156016DD408B5992af0570a2",exchangeType:"ExchangeV2",pathfinderKey:"19,18"},SyncSwap:{chainName:"zkSync",chainId:324,twapVersion:4,twapAddress:"0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68",lensAddress:"0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9",takers:["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC","0xBE452F03Be354CAC397C3F0c8397672067D44531"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"SyncSwap",partner:"Orbs:TWAP:SyncSwap",exchangeAddress:"0x422623a40c42f026Ed33A9910078Aa843FD66e27",exchangeType:"ExchangeV2",pathfinderKey:"2,3"},Retro:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"Retro",partner:"Orbs:TWAP:Retro",exchangeAddress:"0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F",exchangeType:"ExchangeV2",pathfinderKey:"retro,retro-v3"},SushiArb:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiArb",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiBase",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiEth:{chainName:"eth",chainId:1,twapVersion:4,twapAddress:"0xb1ed8BCAD1EaC8a1DF0764700472391800D12946",lensAddress:"0x0967f448c4d4dbd14c355E635AE9CbF68cc44A60",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:200,name:"SushiEth",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiKatana:{chainName:"katana",chainId:747474,twapVersion:4,twapAddress:"0xf2d96E7BE676153d202e1453804E2749923C7c5b",lensAddress:"0x1579EED0527781B1A748043AA1f59a3858Ace4a7",takers:["0xF74437A3Fc45a518640828E5D6A3E8c9A9BbDC3a","0x07A6C715063e94c0D95e809efefFCbF4EBEdfD55"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiKatana",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x92209481507e6B2d14C9b5b70Ed287024177220E",exchangeType:"ExchangeV2",pathfinderKey:""},DragonSwap:{chainName:"sei",chainId:1329,twapVersion:4,twapAddress:"0xde737dB24548F8d41A4a3Ca2Bac8aaaDc4DBA099",lensAddress:"0xa1376f2Bb80D3cF6c2D8ebEf34b3d122e9af4020",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"DragonSwap",partner:"Orbs:TWAP:DragonSwap",exchangeAddress:"0xf2F933FafbDB97062CfA3c447ff373e76A90Efd6",exchangeType:"ExchangeV2",pathfinderKey:""},TeaFi:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"TeaFi",partner:"Orbs:TWAP:TeaFi",exchangeAddress:"0xE9D3b4Cf5B0CC392e78C1a4DD9885D449EEF9793",exchangeType:"ParaswapExchange",pathfinderKey:"AaveV2,AaveV3,AaveV3Stata,AngleStakedStableEUR,AngleStakedStableUSD,ApeSwap,AugustusRFQ,BalancerV2,ComethSwap,CurveV1,CurveV1Factory,CurveV1StableNg,CurveV2,Dfyn,DODOV2,Dystopia,Hashflow,IronV2,JarvisV6,KyberDmm,QuickSwap,QuickSwapV3,Retro,SushiSwap,SushiSwapV3,SwaapV2,Synapse,UniswapV2,UniswapV3,WaultFinance,Wmatic,WooFiV2,wUSDM"},SparkDEX:{chainName:"flare",chainId:14,twapVersion:4,twapAddress:"0x9D70B0b90915Bb8b9bdAC7e6a7e6435bBF1feC4D",lensAddress:"0xf2d96E7BE676153d202e1453804E2749923C7c5b",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SparkDEX",partner:"Orbs:TWAP:SparkDEX",exchangeAddress:"0xe59c53C76bB7EEc01401A18fA8215B94bC65Bf56",exchangeType:"P2Exchange"},Ramses:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Ramses",partner:"Orbs:TWAP:Ramses",exchangeAddress:"0x8FCc245209bE85C49D738D0CE5613F74E5d91E86",exchangeType:"ParaswapExchange",pathfinderKey:""},SwapX:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SwapX",partner:"Orbs:TWAP:SwapX",exchangeAddress:"0xDA902994b7F7a1ecDd8De02E4a17dbFF2E6F67b7",exchangeType:"ExchangeV2",pathfinderKey:""},H2Finance:{chainName:"cronos-zkevm",chainId:388,twapVersion:4,twapAddress:"0xc32cAA0F7AD9ED88e22Fc214fc24cCb5C0595D68",lensAddress:"0x7daE5af3011c3bE9A5283F0368a3fdD757fc74F9",takers:["0xB924C20c400575D2B73Baa16CF0Fa0EAA720aFBC","0xBE452F03Be354CAC397C3F0c8397672067D44531"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"H2Finance",partner:"Orbs:TWAP:H2Finance",exchangeAddress:"0x2f1f10dc311722Be609e6B427bF3FBac6e44093B",exchangeType:"ExchangeV2"},Shadow:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"Shadow",partner:"Orbs:TWAP:Shadow",exchangeAddress:"0x69e3c891450161b7BF27f181eE85E7bAE69E5b07",exchangeType:"ExchangeV2"},Kodiak:{chainName:"berachain",chainId:80094,twapVersion:4,twapAddress:"0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E",lensAddress:"0xA0b07F9a11dFb01388149abBdbc5B4f2196600AB",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"Kodiak",partner:"Orbs:TWAP:Kodiak",exchangeAddress:"0x69B7aE1250B8d1309954CaD65b6607ae478Ec6eE",exchangeType:"ExchangeV2"},OmniBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"OmniBase",partner:"Orbs:TWAP:OmniBase",exchangeAddress:"0x54435FcFDF3A08150Ed799b6EF472A20a432303F",exchangeType:"ParaswapExchange"},OmniArb:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"OmniArb",partner:"Orbs:TWAP:OmniArb",exchangeAddress:"0xF0607785424d342Cceb33E708f4579CA97a3b392",exchangeType:"ParaswapExchange"},BlackholeAvax:{chainName:"avax",chainId:43114,twapVersion:4,twapAddress:"0xf77Ad005aBF7e31f669ce89a6568B2f39Ca92cDe",lensAddress:"0x48466B82Ce1575c5c9eCa168ac1090048dD47fA3",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"BlackholeAvax",partner:"Orbs:TWAP:BlackholeAvax",exchangeAddress:"0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F",exchangeType:"ExchangeV2"},NewEraBnb:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"NewEraBnb",partner:"Orbs:TWAP:NewEraBnb",exchangeAddress:"0xA22D7Df24d9Ea4D4EF6dC96b2204bd550430eC42",exchangeType:"ExchangeV2"}},q5=[{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}],K5=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Y5=JSON.parse('[{"inputs":[{"internalType":"address","name":"_iweth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"name":"OrderBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"OrderCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"}],"name":"OrderCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcAmountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstAmountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"srcFilledAmount","type":"uint256"}],"name":"OrderFilled","type":"event"},{"inputs":[],"name":"MIN_BID_DELAY_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_OUTBID_PERCENT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENT_BASE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STALE_BID_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CANCELED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_COMPLETED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"_ask","type":"tuple"}],"name":"ask","outputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"bid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"book","outputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"fill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"iweth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"makerOrders","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"order","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maker","type":"address"}],"name":"orderIdsByMaker","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"prune","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"status","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]'),Z5=[{type:"constructor",inputs:[],stateMutability:"nonpayable"},{type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"cancel",inputs:[{name:"digests",type:"bytes32[]",internalType:"bytes32[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"eip712Domain",inputs:[],outputs:[{name:"fields",type:"bytes1",internalType:"bytes1"},{name:"name",type:"string",internalType:"string"},{name:"version",type:"string",internalType:"string"},{name:"chainId",type:"uint256",internalType:"uint256"},{name:"verifyingContract",type:"address",internalType:"address"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"extensions",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"hashTypedData",inputs:[{name:"structHash",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"digest",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"repermitWitnessTransferFrom",inputs:[{name:"permit",type:"tuple",internalType:"struct RePermitLib.RePermitTransferFrom",components:[{name:"permitted",type:"tuple",internalType:"struct RePermitLib.TokenPermissions",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"nonce",type:"uint256",internalType:"uint256"},{name:"deadline",type:"uint256",internalType:"uint256"}]},{name:"request",type:"tuple",internalType:"struct RePermitLib.TransferRequest",components:[{name:"to",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"signer",type:"address",internalType:"address"},{name:"witness",type:"bytes32",internalType:"bytes32"},{name:"witnessTypeString",type:"string",internalType:"string"},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"spent",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"event",name:"Cancel",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"digest",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"EIP712DomainChanged",inputs:[],anonymous:!1},{type:"event",name:"Spend",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"permitHash",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"token",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!1,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalSpent",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"Canceled",inputs:[]},{type:"error",name:"Expired",inputs:[]},{type:"error",name:"InsufficientAllowance",inputs:[]},{type:"error",name:"InvalidShortString",inputs:[]},{type:"error",name:"InvalidSignature",inputs:[]},{type:"error",name:"SafeERC20FailedOperation",inputs:[{name:"token",type:"address",internalType:"address"}]},{type:"error",name:"StringTooLong",inputs:[{name:"str",type:"string",internalType:"string"}]}],Lm=q5,X5=K5,zm=Z5,Rm=Y5;var ge=(e=>(e.TWAP="TWAP",e.LIMIT="LIMIT",e.STOP_LOSS="STOP_LOSS",e.TAKE_PROFIT="TAKE_PROFIT",e))(ge||{}),ut=(e=>(e.Open="OPEN",e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e))(ut||{}),ar=(e=>(e.All="ALL",e.Open="OPEN",e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e))(ar||{}),$t=(e=>(e[e.Minutes=6e4]="Minutes",e[e.Hours=36e5]="Hours",e[e.Weeks=6048e5]="Weeks",e[e.Days=864e5]="Days",e[e.Months=2592e6]="Months",e[e.Years=31536e6]="Years",e))($t||{}),Re=(e=>(e.LIMIT="limit",e.TWAP_LIMIT="twap-limit",e.TWAP_MARKET="twap-market",e.TAKE_PROFIT="take-profit",e.STOP_LOSS_LIMIT="stop-loss-limit",e.STOP_LOSS_MARKET="stop-loss-market",e))(Re||{}),Jr=(e=>(e.Arbidex="arbidex",e.Blackhole="blackhole",e.Chronos="chronos",e.Dragon="dragon",e.Kodiak="kodiak",e.Lynex="lynex",e.Nami="nami",e.Newera="newera",e.Omni="omni",e.Pancake="pancake",e.Quick="quick",e.Ramses="ramses",e.Shadow="shadow",e.Spark="spark",e.Spooky="spooky",e.Swapx="swapx",e.Teafi="teafi",e.Thena="thena",e.Yowie="yowie",e.Pangolin="pangolin",e.Sushiswap="sushiswap",e.Agent="agent",e))(Jr||{}),Dt=(e=>(e[e.EMPTY_LIMIT_PRICE=0]="EMPTY_LIMIT_PRICE",e[e.MAX_CHUNKS=1]="MAX_CHUNKS",e[e.MIN_CHUNKS=2]="MIN_CHUNKS",e[e.MIN_TRADE_SIZE=3]="MIN_TRADE_SIZE",e[e.MAX_FILL_DELAY=4]="MAX_FILL_DELAY",e[e.MIN_FILL_DELAY=5]="MIN_FILL_DELAY",e[e.MAX_ORDER_DURATION=6]="MAX_ORDER_DURATION",e[e.MIN_ORDER_DURATION=7]="MIN_ORDER_DURATION",e[e.MISSING_LIMIT_PRICE=8]="MISSING_LIMIT_PRICE",e[e.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE=9]="STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE",e[e.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE=10]="TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE",e[e.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE=11]="TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE",e[e.EMPTY_TRIGGER_PRICE=12]="EMPTY_TRIGGER_PRICE",e[e.INSUFFICIENT_BALANCE=13]="INSUFFICIENT_BALANCE",e[e.MAX_ORDER_SIZE=14]="MAX_ORDER_SIZE",e[e.MIN_TRADE_SIZE_ERROR=15]="MIN_TRADE_SIZE_ERROR",e))(Dt||{});const xt="0x0000000000000000000000000000000000000000",Ft={eth:{id:1,name:"Ethereum",shortname:"eth",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://eth.llamarpc.com",logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg",explorer:"https://etherscan.io",eip1559:!0},bsc:{id:56,name:"BinanceSmartChain",shortname:"bsc",native:{address:xt,symbol:"BNB",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"},wToken:{symbol:"WBNB",address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"},publicRpcUrl:"https://bsc-dataseed.binance.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/bsc_2.svg",explorer:"https://bscscan.com",eip1559:!1},poly:{id:137,name:"Polygon",shortname:"poly",native:{address:xt,symbol:"POL",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png"},wToken:{symbol:"WPOL",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270.png"},publicRpcUrl:"https://polygon-rpc.com",logoUrl:"https://app.1inch.io/assets/images/network-logos/polygon.svg",explorer:"https://polygonscan.com",eip1559:!0},arb:{id:42161,name:"Arbitrum",shortname:"arb",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://arb1.arbitrum.io/rpc",logoUrl:"https://app.1inch.io/assets/images/network-logos/arbitrum.svg",explorer:"https://arbiscan.io",eip1559:!0},sei:{id:1329,name:"Sei",shortname:"sei",native:{address:xt,symbol:"SEI",decimals:18,logoUrl:"https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png"},wToken:{symbol:"WSEI",address:"0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://evm-rpc.sei-apis.com",logoUrl:"https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png",explorer:"https://seitrace.com",eip1559:!1},avax:{id:43114,name:"Avalanche",shortname:"avax",native:{address:xt,symbol:"AVAX",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/avalanche.svg"},wToken:{symbol:"WAVAX",address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7.png"},publicRpcUrl:"https://api.avax.network/ext/bc/C/rpc",logoUrl:"https://app.1inch.io/assets/images/network-logos/avalanche.svg",explorer:"https://snowtrace.io",eip1559:!0},ftm:{id:250,name:"Fantom",shortname:"ftm",native:{address:xt,symbol:"FTM",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/fantom.svg"},wToken:{symbol:"WFTM",address:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0x4e15361fd6b4bb609fa63c81a2be19d873717870.png"},publicRpcUrl:"https://rpc.ftm.tools",logoUrl:"https://app.1inch.io/assets/images/network-logos/fantom.svg",explorer:"https://ftmscan.com",eip1559:!0},base:{id:8453,name:"Base",shortname:"base",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://mainnet.base.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/base.svg",explorer:"https://basescan.org",eip1559:!1},linea:{id:59144,name:"Linea",shortname:"linea",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://rpc.linea.build",logoUrl:"https://lineascan.build/images/logo.svg",explorer:"https://lineascan.build",eip1559:!1},zksync:{id:324,name:"zksync",shortname:"zksync",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://mainnet.era.zksync.io",logoUrl:"https://raw.githubusercontent.com/matter-labs/zksync/0a4ca2145a0c95b5bafa84c2f095c644907a8825/zkSyncLogo.svg",explorer:"https://explorer.zksync.io/",eip1559:!0},zkevm:{id:1101,name:"zkevm",shortname:"zkevm",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://zkevm-rpc.com",logoUrl:"https://user-images.githubusercontent.com/18598517/235932702-bc47eae5-d672-4dd9-9da2-8ea8f51a93f3.png",explorer:"https://zkevm.polygonscan.com/",eip1559:!0},manta:{id:169,name:"manta",shortname:"manta",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_manta.jpg"},wToken:{symbol:"WETH",address:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://pacific-rpc.manta.network/http",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_manta.jpg",explorer:"https://manta.socialscan.io/",eip1559:!0},blast:{id:81457,name:"blast",shortname:"blast",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_blast"},wToken:{symbol:"WETH",address:"0x4300000000000000000000000000000000000004",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://rpc.ankr.com/blast",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_blast",explorer:"https://blastscan.io/",eip1559:!0},sonic:{id:146,name:"sonic",shortname:"sonic",native:{address:xt,symbol:"S",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic"},wToken:{symbol:"WS",address:"0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic"},publicRpcUrl:"https://rpc.soniclabs.com",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic",explorer:"https://www.sonicscan.org/",eip1559:!0},scroll:{id:534352,name:"scroll",shortname:"scroll",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_scroll"},wToken:{symbol:"WETH",address:"0x5300000000000000000000000000000000000004",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://scroll-rpc.publicnode.com",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_scroll",explorer:"https://scrollscan.com/",eip1559:!0},zircuit:{id:48900,name:"Zircuit",shortname:"zircuit",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"hhttps://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://zircuit-mainnet.drpc.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg",explorer:"https://explorer.zircuit.com/",eip1559:!0},flare:{id:14,name:"flare",shortname:"flare",native:{address:xt,symbol:"FLR",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48"},wToken:{symbol:"WFLR",address:"0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d",decimals:18,logoUrl:"https://res.cloudinary.com/sparkdex/image/upload/q_100/v1/website-assets/coins/wflr?_a=DATAg1AAZAA0"},publicRpcUrl:"https://flare.network",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48",explorer:"https://flarescan.com",eip1559:!0},cronosZkEvm:{id:388,name:"Cronos zkEVM",shortname:"cronosZkEvm",native:{address:"0x000000000000000000000000000000000000800a",symbol:"zkCRO",decimals:18,logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png"},wToken:{symbol:"wzkCRO",address:"0xC1bF55EE54E16229d9b369a5502Bfe5fC9F20b6d",decimals:18,logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png"},publicRpcUrl:"https://rpc.zkevm.cronos.org",logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png",explorer:"https://explorer.zkevm.cronos.org",eip1559:!0},katana:{id:747474,name:"Katana",shortname:"katana",native:{address:xt,symbol:"ETH",decimals:18,logoUrl:"https://katana.network/assets/katana-logo.svg"},wToken:{symbol:"WETH",address:"0xee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62",decimals:18,logoUrl:"https://katana.network/assets/weth-logo.svg"},publicRpcUrl:"https://rpc.katanarpc.com",logoUrl:"https://katana.network/assets/katana-logo.svg",explorer:"https://explorer.katana.garden",eip1559:!0},bera:{id:80094,name:"Bera",shortname:"bera",native:{address:xt,symbol:"BERA",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/24647.png"},wToken:{symbol:"WBERA",address:"0x6969696969696969696969696969696969696969",decimals:18,logoUrl:"https://berascan.com/token/images/wrappedbera_ofc_64.png"},publicRpcUrl:"wss://rpc.berachain-apis.com",logoUrl:"https://katana.network/assets/katana-logo.svg",explorer:"https://berascan.com",eip1559:!0},monad:{id:143,name:"Monad",shortname:"monad",native:{address:xt,symbol:"MONAD",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png"},wToken:{symbol:"WMON",address:"0x3bd359c1119da7da1d913d1c4d2b7c461115433a",decimals:18,logoUrl:"https://assets.coingecko.com/coins/images/70784/standard/wmon.png?1766028904"},publicRpcUrl:"https://monad-mainnet.drpc.org",logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png",explorer:"https://monad.network",eip1559:!0}},Q5={version:"2.0.1"},J5="https://order-sink-dev.orbs.network",ew="https://order-sink.orbs.network",tw="https://order-sink-v2.orbs.network",Us=Q5.version.split(".")[0],Oc=e=>{const t=Number(Us)>=2;return e?J5:t?tw:ew},rw=100,nw=1,Uc=300*1e3,Pa=365*24*60*60*1e3,od=300*1e3,Hm=new Date(Uc).getMinutes(),id=e=>`https://hub.orbs.network/api/private/project_cm7nb67z86nyr01z12gs0fxpf/subgraphs/orbs-twap-${e}/prod/gn`,Ur="https://hub.orbs.network/api/apikey/subgraphs/id",$m={[Ft.eth.id]:`${Ur}/Bf7bvMYcJbDAvYWJmhMpHZ4cpFjqzkhK6GXXEpnPRq6`,[Ft.bsc.id]:`${Ur}/4NfXEi8rreQsnAr4aJ45RLCKgnjcWX46Lbt9SadiCcz6`,[Ft.poly.id]:`${Ur}/3PyRPWSvDnMowGbeBy7aNsvUkD5ZuxdXQw2RdJq4NdXi`,[Ft.arb.id]:`${Ur}/83bpQexEaqBjHaQbKoFTbtvCXuo5RudRkfLgtRUYqo2c`,[Ft.base.id]:`${Ur}/DFhaPQb3HATXkpsWNZw3gydYHehLBVEDiSk4iBdZJyps`,[Ft.sei.id]:`${Ur}/5zjzRnURzoddyFSZBw5E5NAM3oBgPq3NasTYbtMk6EL6`,[Ft.linea.id]:`${Ur}/6VsNPEYfFLPZCqdMMDadoXQjLHWJdjEwiD768GAtb7j6`,[Ft.sonic.id]:`${Ur}/DtBr6a5vsoDd2oAXdPszcn4gLgrr1XC68Q3AJQKXnNLV`,[Ft.ftm.id]:`${Ur}/DdRo1pmJkrJC9fjsjEBWnNE1uqrbh7Diz4tVKd7rfupp`,[Ft.katana.id]:`${Ur}/CGi9sDFMQcnBwF3C3NoCFqnaE34sssbgwPLTwiskSXmW`,[Ft.avax.id]:`${Ur}/FxZ1vMwE5Xy1qvKvZENUMz4vhW8Sh4vXJf9Vp7o17pTx`,[Ft.bera.id]:id("berachain"),[Ft.flare.id]:id("flare"),[Ft.cronosZkEvm.id]:id("cronos-zkevm")},Gm="0x0000000000000000000000000000000000000000",jm=[Gm,"0x0000000000000000000000000000000000001010","0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","0x000000000000000000000000000000000000dEaD","0x000000000000000000000000000000000000800A","0x000000000000000000000000000000000000800a"],Dc="115792089237316195423570985008687907853269984665640564039457584007913129639935",_t=e=>`${e.name}_${e.chainId}`,Vm={[_t(Pe.SushiArb)]:["0x846F2B29ef314bF3D667981b4ffdADc5B858312a","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[_t(Pe.SushiBase)]:["0x846F2B29ef314bF3D667981b4ffdADc5B858312a","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[_t(Pe.SushiEth)]:["0xc55943Fa6509004B2903ED8F8ab7347BfC47D0bA","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[_t(Pe.PancakeSwap)]:["0xb2BAFe188faD927240038cC4FfF2d771d8A58905","0xE2a0c3b9aD19A18c4bBa7fffBe5bC1b0E58Db1CE"],[_t(Pe.PancakeSwapArbitrum)]:["0xE20167871dB616DdfFD0Fd870d9bC068C350DD1F","0x807488ADAD033e95C438F998277bE654152594dc"],[_t(Pe.PancakeSwapBase)]:["0x10ed1F36e4eBE76E161c9AADDa20BE841bc0082c","0x3A9df3eE209b802D0337383f5abCe3204d623588"],[_t(Pe.PancakeSwapLinea)]:["0x3A9df3eE209b802D0337383f5abCe3204d623588"],[_t(Pe.QuickSwap)]:["0x26D0ec4Be402BCE03AAa8aAf0CF67e9428ba54eF"],[_t(Pe.Thena)]:["0xc2aBC02acd77Bb2407efA22348dA9afC8B375290"],[_t(Pe.Lynex)]:["0x72e3e1fD5D2Ee2F1C2Eb695206D490a1D45C3835"],[_t(Pe.DragonSwap)]:["0x101e1B65Bb516FB5f4547C80BAe0b51f1b8D7a22"],[_t(Pe.SpookySwapSonic)]:["0xAd97B770ad64aE47fc7d64B3bD820dCDbF9ff7DA"],[_t(Pe.SpookySwap)]:["0x3924d62219483015f982b160d48c0fa5Fd436Cba"],[_t(Pe.SwapX)]:["0xE5012eBDe5e26EE3Ea41992154731a03023CF274"]},_c={unit:$t.Minutes,value:Hm},sw=.25,aw="100",cd="RePermitWitnessTransferFrom",Wm={RePermitWitnessTransferFrom:[{name:"permitted",type:"TokenPermissions"},{name:"spender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"witness",type:"Order"}],Exchange:[{name:"adapter",type:"address"},{name:"ref",type:"address"},{name:"share",type:"uint32"},{name:"data",type:"bytes"}],Input:[{name:"token",type:"address"},{name:"amount",type:"uint256"},{name:"maxAmount",type:"uint256"}],Order:[{name:"reactor",type:"address"},{name:"executor",type:"address"},{name:"exchange",type:"Exchange"},{name:"swapper",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"chainid",type:"uint256"},{name:"exclusivity",type:"uint32"},{name:"epoch",type:"uint32"},{name:"slippage",type:"uint32"},{name:"freshness",type:"uint32"},{name:"input",type:"Input"},{name:"output",type:"Output"}],Output:[{name:"token",type:"address"},{name:"limit",type:"uint256"},{name:"stop",type:"uint256"},{name:"recipient",type:"address"}],TokenPermissions:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]},qm={RePermitWitnessTransferFrom:[{name:"permitted",type:"TokenPermissions"},{name:"spender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"witness",type:"Order"}],Exchange:[{name:"adapter",type:"address"},{name:"ref",type:"address"},{name:"share",type:"uint32"},{name:"data",type:"bytes"}],Input:[{name:"token",type:"address"},{name:"amount",type:"uint256"},{name:"maxAmount",type:"uint256"}],Order:[{name:"reactor",type:"address"},{name:"executor",type:"address"},{name:"exchange",type:"Exchange"},{name:"swapper",type:"address"},{name:"nonce",type:"uint256"},{name:"start",type:"uint256"},{name:"deadline",type:"uint256"},{name:"chainid",type:"uint256"},{name:"exclusivity",type:"uint32"},{name:"epoch",type:"uint32"},{name:"slippage",type:"uint32"},{name:"freshness",type:"uint32"},{name:"input",type:"Input"},{name:"output",type:"Output"}],Output:[{name:"token",type:"address"},{name:"limit",type:"uint256"},{name:"triggerLower",type:"uint256"},{name:"triggerUpper",type:"uint256"},{name:"recipient",type:"address"}],TokenPermissions:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]},ld="https://www.orbs.com/dtwap-and-dlimit-faq/",ow="https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP",iw="https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg",cw="https://www.orbs.com/assets/img/common/logo.svg",lw="https://www.orbs.com/",uw="https://www.orbs.com/dtwap-dlimit-disclaimer";var Ia=(e=>(e.FRESHNESS="freshness",e.MIN_CHUNK_SIZE_USD="minChunkSizeUsd",e.ENV="env",e.DURATION="duration",e.IGNORE_ERRORS="ignore-errors",e))(Ia||{});const Km="-5",Ym="10",Zm="-10",Xm="5",dw="Something went wrong";var pw=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ud=Math.ceil,yr=Math.floor,Kt="[BigNumber Error] ",Qm=Kt+"Number primitive has more than 15 significant digits: ",Dr=1e14,we=14,dd=9007199254740991,pd=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Xn=1e7,St=1e9;function Jm(e){var t,r,n,s=w.prototype={constructor:w,toString:null,valueOf:null},a=new w(1),o=20,i=4,c=-7,l=21,u=-1e7,d=1e7,f=!1,m=1,b=0,g={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function w(h,y){var x,A,B,F,_,k,P,D,U=this;if(!(U instanceof w))return new w(h,y);if(y==null){if(h&&h._isBigNumber===!0){U.s=h.s,!h.c||h.e>d?U.c=U.e=null:h.e<u?U.c=[U.e=0]:(U.e=h.e,U.c=h.c.slice());return}if((k=typeof h=="number")&&h*0==0){if(U.s=1/h<0?(h=-h,-1):1,h===~~h){for(F=0,_=h;_>=10;_/=10,F++);F>d?U.c=U.e=null:(U.e=F,U.c=[h]);return}D=String(h)}else{if(!pw.test(D=String(h)))return n(U,D,k);U.s=D.charCodeAt(0)==45?(D=D.slice(1),-1):1}(F=D.indexOf("."))>-1&&(D=D.replace(".","")),(_=D.search(/e/i))>0?(F<0&&(F=_),F+=+D.slice(_+1),D=D.substring(0,_)):F<0&&(F=D.length)}else{if(ct(y,2,E.length,"Base"),y==10&&v)return U=new w(h),L(U,o+U.e+1,i);if(D=String(h),k=typeof h=="number"){if(h*0!=0)return n(U,D,k,y);if(U.s=1/h<0?(D=D.slice(1),-1):1,w.DEBUG&&D.replace(/^0\.0*|\./,"").length>15)throw Error(Qm+h)}else U.s=D.charCodeAt(0)===45?(D=D.slice(1),-1):1;for(x=E.slice(0,y),F=_=0,P=D.length;_<P;_++)if(x.indexOf(A=D.charAt(_))<0){if(A=="."){if(_>F){F=P;continue}}else if(!B&&(D==D.toUpperCase()&&(D=D.toLowerCase())||D==D.toLowerCase()&&(D=D.toUpperCase()))){B=!0,_=-1,F=0;continue}return n(U,String(h),k,y)}k=!1,D=r(D,y,10,U.s),(F=D.indexOf("."))>-1?D=D.replace(".",""):F=D.length}for(_=0;D.charCodeAt(_)===48;_++);for(P=D.length;D.charCodeAt(--P)===48;);if(D=D.slice(_,++P)){if(P-=_,k&&w.DEBUG&&P>15&&(h>dd||h!==yr(h)))throw Error(Qm+U.s*h);if((F=F-_-1)>d)U.c=U.e=null;else if(F<u)U.c=[U.e=0];else{if(U.e=F,U.c=[],_=(F+1)%we,F<0&&(_+=we),_<P){for(_&&U.c.push(+D.slice(0,_)),P-=we;_<P;)U.c.push(+D.slice(_,_+=we));_=we-(D=D.slice(_)).length}else _-=P;for(;_--;D+="0");U.c.push(+D)}}else U.c=[U.e=0]}w.clone=Jm,w.ROUND_UP=0,w.ROUND_DOWN=1,w.ROUND_CEIL=2,w.ROUND_FLOOR=3,w.ROUND_HALF_UP=4,w.ROUND_HALF_DOWN=5,w.ROUND_HALF_EVEN=6,w.ROUND_HALF_CEIL=7,w.ROUND_HALF_FLOOR=8,w.EUCLID=9,w.config=w.set=function(h){var y,x;if(h!=null)if(typeof h=="object"){if(h.hasOwnProperty(y="DECIMAL_PLACES")&&(x=h[y],ct(x,0,St,y),o=x),h.hasOwnProperty(y="ROUNDING_MODE")&&(x=h[y],ct(x,0,8,y),i=x),h.hasOwnProperty(y="EXPONENTIAL_AT")&&(x=h[y],x&&x.pop?(ct(x[0],-St,0,y),ct(x[1],0,St,y),c=x[0],l=x[1]):(ct(x,-St,St,y),c=-(l=x<0?-x:x))),h.hasOwnProperty(y="RANGE"))if(x=h[y],x&&x.pop)ct(x[0],-St,-1,y),ct(x[1],1,St,y),u=x[0],d=x[1];else if(ct(x,-St,St,y),x)u=-(d=x<0?-x:x);else throw Error(Kt+y+" cannot be zero: "+x);if(h.hasOwnProperty(y="CRYPTO"))if(x=h[y],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=x;else throw f=!x,Error(Kt+"crypto unavailable");else f=x;else throw Error(Kt+y+" not true or false: "+x);if(h.hasOwnProperty(y="MODULO_MODE")&&(x=h[y],ct(x,0,9,y),m=x),h.hasOwnProperty(y="POW_PRECISION")&&(x=h[y],ct(x,0,St,y),b=x),h.hasOwnProperty(y="FORMAT"))if(x=h[y],typeof x=="object")g=x;else throw Error(Kt+y+" not an object: "+x);if(h.hasOwnProperty(y="ALPHABET"))if(x=h[y],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))v=x.slice(0,10)=="0123456789",E=x;else throw Error(Kt+y+" invalid: "+x)}else throw Error(Kt+"Object expected: "+h);return{DECIMAL_PLACES:o,ROUNDING_MODE:i,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:m,POW_PRECISION:b,FORMAT:g,ALPHABET:E}},w.isBigNumber=function(h){if(!h||h._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var y,x,A=h.c,B=h.e,F=h.s;e:if({}.toString.call(A)=="[object Array]"){if((F===1||F===-1)&&B>=-St&&B<=St&&B===yr(B)){if(A[0]===0){if(B===0&&A.length===1)return!0;break e}if(y=(B+1)%we,y<1&&(y+=we),String(A[0]).length==y){for(y=0;y<A.length;y++)if(x=A[y],x<0||x>=Dr||x!==yr(x))break e;if(x!==0)return!0}}}else if(A===null&&B===null&&(F===null||F===1||F===-1))return!0;throw Error(Kt+"Invalid BigNumber: "+h)},w.maximum=w.max=function(){return T(arguments,-1)},w.minimum=w.min=function(){return T(arguments,1)},w.random=(function(){var h=9007199254740992,y=Math.random()*h&2097151?function(){return yr(Math.random()*h)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var A,B,F,_,k,P=0,D=[],U=new w(a);if(x==null?x=o:ct(x,0,St),_=ud(x/we),f)if(crypto.getRandomValues){for(A=crypto.getRandomValues(new Uint32Array(_*=2));P<_;)k=A[P]*131072+(A[P+1]>>>11),k>=9e15?(B=crypto.getRandomValues(new Uint32Array(2)),A[P]=B[0],A[P+1]=B[1]):(D.push(k%1e14),P+=2);P=_/2}else if(crypto.randomBytes){for(A=crypto.randomBytes(_*=7);P<_;)k=(A[P]&31)*281474976710656+A[P+1]*1099511627776+A[P+2]*4294967296+A[P+3]*16777216+(A[P+4]<<16)+(A[P+5]<<8)+A[P+6],k>=9e15?crypto.randomBytes(7).copy(A,P):(D.push(k%1e14),P+=7);P=_/7}else throw f=!1,Error(Kt+"crypto unavailable");if(!f)for(;P<_;)k=y(),k<9e15&&(D[P++]=k%1e14);for(_=D[--P],x%=we,_&&x&&(k=pd[we-x],D[P]=yr(_/k)*k);D[P]===0;D.pop(),P--);if(P<0)D=[F=0];else{for(F=-1;D[0]===0;D.splice(0,1),F-=we);for(P=1,k=D[0];k>=10;k/=10,P++);P<we&&(F-=we-P)}return U.e=F,U.c=D,U}})(),w.sum=function(){for(var h=1,y=arguments,x=new w(y[0]);h<y.length;)x=x.plus(y[h++]);return x},r=(function(){var h="0123456789";function y(x,A,B,F){for(var _,k=[0],P,D=0,U=x.length;D<U;){for(P=k.length;P--;k[P]*=A);for(k[0]+=F.indexOf(x.charAt(D++)),_=0;_<k.length;_++)k[_]>B-1&&(k[_+1]==null&&(k[_+1]=0),k[_+1]+=k[_]/B|0,k[_]%=B)}return k.reverse()}return function(x,A,B,F,_){var k,P,D,U,z,H,j,Q,pe=x.indexOf("."),be=o,ie=i;for(pe>=0&&(U=b,b=0,x=x.replace(".",""),Q=new w(A),H=Q.pow(x.length-pe),b=U,Q.c=y(wn(xr(H.c),H.e,"0"),10,B,h),Q.e=Q.c.length),j=y(x,A,B,_?(k=E,h):(k=h,E)),D=U=j.length;j[--U]==0;j.pop());if(!j[0])return k.charAt(0);if(pe<0?--D:(H.c=j,H.e=D,H.s=F,H=t(H,Q,be,ie,B),j=H.c,z=H.r,D=H.e),P=D+be+1,pe=j[P],U=B/2,z=z||P<0||j[P+1]!=null,z=ie<4?(pe!=null||z)&&(ie==0||ie==(H.s<0?3:2)):pe>U||pe==U&&(ie==4||z||ie==6&&j[P-1]&1||ie==(H.s<0?8:7)),P<1||!j[0])x=z?wn(k.charAt(1),-be,k.charAt(0)):k.charAt(0);else{if(j.length=P,z)for(--B;++j[--P]>B;)j[P]=0,P||(++D,j=[1].concat(j));for(U=j.length;!j[--U];);for(pe=0,x="";pe<=U;x+=k.charAt(j[pe++]));x=wn(x,D,k.charAt(0))}return x}})(),t=(function(){function h(A,B,F){var _,k,P,D,U=0,z=A.length,H=B%Xn,j=B/Xn|0;for(A=A.slice();z--;)P=A[z]%Xn,D=A[z]/Xn|0,_=j*P+D*H,k=H*P+_%Xn*Xn+U,U=(k/F|0)+(_/Xn|0)+j*D,A[z]=k%F;return U&&(A=[U].concat(A)),A}function y(A,B,F,_){var k,P;if(F!=_)P=F>_?1:-1;else for(k=P=0;k<F;k++)if(A[k]!=B[k]){P=A[k]>B[k]?1:-1;break}return P}function x(A,B,F,_){for(var k=0;F--;)A[F]-=k,k=A[F]<B[F]?1:0,A[F]=k*_+A[F]-B[F];for(;!A[0]&&A.length>1;A.splice(0,1));}return function(A,B,F,_,k){var P,D,U,z,H,j,Q,pe,be,ie,de,Oe,X,ve,Me,je,it,Ae=A.s==B.s?1:-1,Ee=A.c,ye=B.c;if(!Ee||!Ee[0]||!ye||!ye[0])return new w(!A.s||!B.s||(Ee?ye&&Ee[0]==ye[0]:!ye)?NaN:Ee&&Ee[0]==0||!ye?Ae*0:Ae/0);for(pe=new w(Ae),be=pe.c=[],D=A.e-B.e,Ae=F+D+1,k||(k=Dr,D=gr(A.e/we)-gr(B.e/we),Ae=Ae/we|0),U=0;ye[U]==(Ee[U]||0);U++);if(ye[U]>(Ee[U]||0)&&D--,Ae<0)be.push(1),z=!0;else{for(ve=Ee.length,je=ye.length,U=0,Ae+=2,H=yr(k/(ye[0]+1)),H>1&&(ye=h(ye,H,k),Ee=h(Ee,H,k),je=ye.length,ve=Ee.length),X=je,ie=Ee.slice(0,je),de=ie.length;de<je;ie[de++]=0);it=ye.slice(),it=[0].concat(it),Me=ye[0],ye[1]>=k/2&&Me++;do{if(H=0,P=y(ye,ie,je,de),P<0){if(Oe=ie[0],je!=de&&(Oe=Oe*k+(ie[1]||0)),H=yr(Oe/Me),H>1)for(H>=k&&(H=k-1),j=h(ye,H,k),Q=j.length,de=ie.length;y(j,ie,Q,de)==1;)H--,x(j,je<Q?it:ye,Q,k),Q=j.length,P=1;else H==0&&(P=H=1),j=ye.slice(),Q=j.length;if(Q<de&&(j=[0].concat(j)),x(ie,j,de,k),de=ie.length,P==-1)for(;y(ye,ie,je,de)<1;)H++,x(ie,je<de?it:ye,de,k),de=ie.length}else P===0&&(H++,ie=[0]);be[U++]=H,ie[0]?ie[de++]=Ee[X]||0:(ie=[Ee[X]],de=1)}while((X++<ve||ie[0]!=null)&&Ae--);z=ie[0]!=null,be[0]||be.splice(0,1)}if(k==Dr){for(U=1,Ae=be[0];Ae>=10;Ae/=10,U++);L(pe,F+(pe.e=U+D*we-1)+1,_,z)}else pe.e=D,pe.r=+z;return pe}})();function S(h,y,x,A){var B,F,_,k,P;if(x==null?x=i:ct(x,0,8),!h.c)return h.toString();if(B=h.c[0],_=h.e,y==null)P=xr(h.c),P=A==1||A==2&&(_<=c||_>=l)?Nc(P,_):wn(P,_,"0");else if(h=L(new w(h),y,x),F=h.e,P=xr(h.c),k=P.length,A==1||A==2&&(y<=F||F<=c)){for(;k<y;P+="0",k++);P=Nc(P,F)}else if(y-=_+(A===2&&F>_),P=wn(P,F,"0"),F+1>k){if(--y>0)for(P+=".";y--;P+="0");}else if(y+=F-k,y>0)for(F+1==k&&(P+=".");y--;P+="0");return h.s<0&&B?"-"+P:P}function T(h,y){for(var x,A,B=1,F=new w(h[0]);B<h.length;B++)A=new w(h[B]),(!A.s||(x=Ds(F,A))===y||x===0&&F.s===y)&&(F=A);return F}function O(h,y,x){for(var A=1,B=y.length;!y[--B];y.pop());for(B=y[0];B>=10;B/=10,A++);return(x=A+x*we-1)>d?h.c=h.e=null:x<u?h.c=[h.e=0]:(h.e=x,h.c=y),h}n=(function(){var h=/^(-?)0([xbo])(?=\w[\w.]*$)/i,y=/^([^.]+)\.$/,x=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,B=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(F,_,k,P){var D,U=k?_:_.replace(B,"");if(A.test(U))F.s=isNaN(U)?null:U<0?-1:1;else{if(!k&&(U=U.replace(h,function(z,H,j){return D=(j=j.toLowerCase())=="x"?16:j=="b"?2:8,!P||P==D?H:z}),P&&(D=P,U=U.replace(y,"$1").replace(x,"0.$1")),_!=U))return new w(U,D);if(w.DEBUG)throw Error(Kt+"Not a"+(P?" base "+P:"")+" number: "+_);F.s=null}F.c=F.e=null}})();function L(h,y,x,A){var B,F,_,k,P,D,U,z=h.c,H=pd;if(z){e:{for(B=1,k=z[0];k>=10;k/=10,B++);if(F=y-B,F<0)F+=we,_=y,P=z[D=0],U=yr(P/H[B-_-1]%10);else if(D=ud((F+1)/we),D>=z.length)if(A){for(;z.length<=D;z.push(0));P=U=0,B=1,F%=we,_=F-we+1}else break e;else{for(P=k=z[D],B=1;k>=10;k/=10,B++);F%=we,_=F-we+B,U=_<0?0:yr(P/H[B-_-1]%10)}if(A=A||y<0||z[D+1]!=null||(_<0?P:P%H[B-_-1]),A=x<4?(U||A)&&(x==0||x==(h.s<0?3:2)):U>5||U==5&&(x==4||A||x==6&&(F>0?_>0?P/H[B-_]:0:z[D-1])%10&1||x==(h.s<0?8:7)),y<1||!z[0])return z.length=0,A?(y-=h.e+1,z[0]=H[(we-y%we)%we],h.e=-y||0):z[0]=h.e=0,h;if(F==0?(z.length=D,k=1,D--):(z.length=D+1,k=H[we-F],z[D]=_>0?yr(P/H[B-_]%H[_])*k:0),A)for(;;)if(D==0){for(F=1,_=z[0];_>=10;_/=10,F++);for(_=z[0]+=k,k=1;_>=10;_/=10,k++);F!=k&&(h.e++,z[0]==Dr&&(z[0]=1));break}else{if(z[D]+=k,z[D]!=Dr)break;z[D--]=0,k=1}for(F=z.length;z[--F]===0;z.pop());}h.e>d?h.c=h.e=null:h.e<u&&(h.c=[h.e=0])}return h}function I(h){var y,x=h.e;return x===null?h.toString():(y=xr(h.c),y=x<=c||x>=l?Nc(y,x):wn(y,x,"0"),h.s<0?"-"+y:y)}return s.absoluteValue=s.abs=function(){var h=new w(this);return h.s<0&&(h.s=1),h},s.comparedTo=function(h,y){return Ds(this,new w(h,y))},s.decimalPlaces=s.dp=function(h,y){var x,A,B,F=this;if(h!=null)return ct(h,0,St),y==null?y=i:ct(y,0,8),L(new w(F),h+F.e+1,y);if(!(x=F.c))return null;if(A=((B=x.length-1)-gr(this.e/we))*we,B=x[B])for(;B%10==0;B/=10,A--);return A<0&&(A=0),A},s.dividedBy=s.div=function(h,y){return t(this,new w(h,y),o,i)},s.dividedToIntegerBy=s.idiv=function(h,y){return t(this,new w(h,y),0,1)},s.exponentiatedBy=s.pow=function(h,y){var x,A,B,F,_,k,P,D,U,z=this;if(h=new w(h),h.c&&!h.isInteger())throw Error(Kt+"Exponent not an integer: "+I(h));if(y!=null&&(y=new w(y)),k=h.e>14,!z.c||!z.c[0]||z.c[0]==1&&!z.e&&z.c.length==1||!h.c||!h.c[0])return U=new w(Math.pow(+I(z),k?h.s*(2-Mc(h)):+I(h))),y?U.mod(y):U;if(P=h.s<0,y){if(y.c?!y.c[0]:!y.s)return new w(NaN);A=!P&&z.isInteger()&&y.isInteger(),A&&(z=z.mod(y))}else{if(h.e>9&&(z.e>0||z.e<-1||(z.e==0?z.c[0]>1||k&&z.c[1]>=24e7:z.c[0]<8e13||k&&z.c[0]<=9999975e7)))return F=z.s<0&&Mc(h)?-0:0,z.e>-1&&(F=1/F),new w(P?1/F:F);b&&(F=ud(b/we+2))}for(k?(x=new w(.5),P&&(h.s=1),D=Mc(h)):(B=Math.abs(+I(h)),D=B%2),U=new w(a);;){if(D){if(U=U.times(z),!U.c)break;F?U.c.length>F&&(U.c.length=F):A&&(U=U.mod(y))}if(B){if(B=yr(B/2),B===0)break;D=B%2}else if(h=h.times(x),L(h,h.e+1,1),h.e>14)D=Mc(h);else{if(B=+I(h),B===0)break;D=B%2}z=z.times(z),F?z.c&&z.c.length>F&&(z.c.length=F):A&&(z=z.mod(y))}return A?U:(P&&(U=a.div(U)),y?U.mod(y):F?L(U,b,i,_):U)},s.integerValue=function(h){var y=new w(this);return h==null?h=i:ct(h,0,8),L(y,y.e+1,h)},s.isEqualTo=s.eq=function(h,y){return Ds(this,new w(h,y))===0},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(h,y){return Ds(this,new w(h,y))>0},s.isGreaterThanOrEqualTo=s.gte=function(h,y){return(y=Ds(this,new w(h,y)))===1||y===0},s.isInteger=function(){return!!this.c&&gr(this.e/we)>this.c.length-2},s.isLessThan=s.lt=function(h,y){return Ds(this,new w(h,y))<0},s.isLessThanOrEqualTo=s.lte=function(h,y){return(y=Ds(this,new w(h,y)))===-1||y===0},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&this.c[0]==0},s.minus=function(h,y){var x,A,B,F,_=this,k=_.s;if(h=new w(h,y),y=h.s,!k||!y)return new w(NaN);if(k!=y)return h.s=-y,_.plus(h);var P=_.e/we,D=h.e/we,U=_.c,z=h.c;if(!P||!D){if(!U||!z)return U?(h.s=-y,h):new w(z?_:NaN);if(!U[0]||!z[0])return z[0]?(h.s=-y,h):new w(U[0]?_:i==3?-0:0)}if(P=gr(P),D=gr(D),U=U.slice(),k=P-D){for((F=k<0)?(k=-k,B=U):(D=P,B=z),B.reverse(),y=k;y--;B.push(0));B.reverse()}else for(A=(F=(k=U.length)<(y=z.length))?k:y,k=y=0;y<A;y++)if(U[y]!=z[y]){F=U[y]<z[y];break}if(F&&(B=U,U=z,z=B,h.s=-h.s),y=(A=z.length)-(x=U.length),y>0)for(;y--;U[x++]=0);for(y=Dr-1;A>k;){if(U[--A]<z[A]){for(x=A;x&&!U[--x];U[x]=y);--U[x],U[A]+=Dr}U[A]-=z[A]}for(;U[0]==0;U.splice(0,1),--D);return U[0]?O(h,U,D):(h.s=i==3?-1:1,h.c=[h.e=0],h)},s.modulo=s.mod=function(h,y){var x,A,B=this;return h=new w(h,y),!B.c||!h.s||h.c&&!h.c[0]?new w(NaN):!h.c||B.c&&!B.c[0]?new w(B):(m==9?(A=h.s,h.s=1,x=t(B,h,0,3),h.s=A,x.s*=A):x=t(B,h,0,m),h=B.minus(x.times(h)),!h.c[0]&&m==1&&(h.s=B.s),h)},s.multipliedBy=s.times=function(h,y){var x,A,B,F,_,k,P,D,U,z,H,j,Q,pe,be,ie=this,de=ie.c,Oe=(h=new w(h,y)).c;if(!de||!Oe||!de[0]||!Oe[0])return!ie.s||!h.s||de&&!de[0]&&!Oe||Oe&&!Oe[0]&&!de?h.c=h.e=h.s=null:(h.s*=ie.s,!de||!Oe?h.c=h.e=null:(h.c=[0],h.e=0)),h;for(A=gr(ie.e/we)+gr(h.e/we),h.s*=ie.s,P=de.length,z=Oe.length,P<z&&(Q=de,de=Oe,Oe=Q,B=P,P=z,z=B),B=P+z,Q=[];B--;Q.push(0));for(pe=Dr,be=Xn,B=z;--B>=0;){for(x=0,H=Oe[B]%be,j=Oe[B]/be|0,_=P,F=B+_;F>B;)D=de[--_]%be,U=de[_]/be|0,k=j*D+U*H,D=H*D+k%be*be+Q[F]+x,x=(D/pe|0)+(k/be|0)+j*U,Q[F--]=D%pe;Q[F]=x}return x?++A:Q.splice(0,1),O(h,Q,A)},s.negated=function(){var h=new w(this);return h.s=-h.s||null,h},s.plus=function(h,y){var x,A=this,B=A.s;if(h=new w(h,y),y=h.s,!B||!y)return new w(NaN);if(B!=y)return h.s=-y,A.minus(h);var F=A.e/we,_=h.e/we,k=A.c,P=h.c;if(!F||!_){if(!k||!P)return new w(B/0);if(!k[0]||!P[0])return P[0]?h:new w(k[0]?A:B*0)}if(F=gr(F),_=gr(_),k=k.slice(),B=F-_){for(B>0?(_=F,x=P):(B=-B,x=k),x.reverse();B--;x.push(0));x.reverse()}for(B=k.length,y=P.length,B-y<0&&(x=P,P=k,k=x,y=B),B=0;y;)B=(k[--y]=k[y]+P[y]+B)/Dr|0,k[y]=Dr===k[y]?0:k[y]%Dr;return B&&(k=[B].concat(k),++_),O(h,k,_)},s.precision=s.sd=function(h,y){var x,A,B,F=this;if(h!=null&&h!==!!h)return ct(h,1,St),y==null?y=i:ct(y,0,8),L(new w(F),h,y);if(!(x=F.c))return null;if(B=x.length-1,A=B*we+1,B=x[B]){for(;B%10==0;B/=10,A--);for(B=x[0];B>=10;B/=10,A++);}return h&&F.e+1>A&&(A=F.e+1),A},s.shiftedBy=function(h){return ct(h,-dd,dd),this.times("1e"+h)},s.squareRoot=s.sqrt=function(){var h,y,x,A,B,F=this,_=F.c,k=F.s,P=F.e,D=o+4,U=new w("0.5");if(k!==1||!_||!_[0])return new w(!k||k<0&&(!_||_[0])?NaN:_?F:1/0);if(k=Math.sqrt(+I(F)),k==0||k==1/0?(y=xr(_),(y.length+P)%2==0&&(y+="0"),k=Math.sqrt(+y),P=gr((P+1)/2)-(P<0||P%2),k==1/0?y="5e"+P:(y=k.toExponential(),y=y.slice(0,y.indexOf("e")+1)+P),x=new w(y)):x=new w(k+""),x.c[0]){for(P=x.e,k=P+D,k<3&&(k=0);;)if(B=x,x=U.times(B.plus(t(F,B,D,1))),xr(B.c).slice(0,k)===(y=xr(x.c)).slice(0,k))if(x.e<P&&--k,y=y.slice(k-3,k+1),y=="9999"||!A&&y=="4999"){if(!A&&(L(B,B.e+o+2,0),B.times(B).eq(F))){x=B;break}D+=4,k+=4,A=1}else{(!+y||!+y.slice(1)&&y.charAt(0)=="5")&&(L(x,x.e+o+2,1),h=!x.times(x).eq(F));break}}return L(x,x.e+o+1,i,h)},s.toExponential=function(h,y){return h!=null&&(ct(h,0,St),h++),S(this,h,y,1)},s.toFixed=function(h,y){return h!=null&&(ct(h,0,St),h=h+this.e+1),S(this,h,y)},s.toFormat=function(h,y,x){var A,B=this;if(x==null)h!=null&&y&&typeof y=="object"?(x=y,y=null):h&&typeof h=="object"?(x=h,h=y=null):x=g;else if(typeof x!="object")throw Error(Kt+"Argument not an object: "+x);if(A=B.toFixed(h,y),B.c){var F,_=A.split("."),k=+x.groupSize,P=+x.secondaryGroupSize,D=x.groupSeparator||"",U=_[0],z=_[1],H=B.s<0,j=H?U.slice(1):U,Q=j.length;if(P&&(F=k,k=P,P=F,Q-=F),k>0&&Q>0){for(F=Q%k||k,U=j.substr(0,F);F<Q;F+=k)U+=D+j.substr(F,k);P>0&&(U+=D+j.slice(F)),H&&(U="-"+U)}A=z?U+(x.decimalSeparator||"")+((P=+x.fractionGroupSize)?z.replace(new RegExp("\\d{"+P+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):z):U}return(x.prefix||"")+A+(x.suffix||"")},s.toFraction=function(h){var y,x,A,B,F,_,k,P,D,U,z,H,j=this,Q=j.c;if(h!=null&&(k=new w(h),!k.isInteger()&&(k.c||k.s!==1)||k.lt(a)))throw Error(Kt+"Argument "+(k.isInteger()?"out of range: ":"not an integer: ")+I(k));if(!Q)return new w(j);for(y=new w(a),D=x=new w(a),A=P=new w(a),H=xr(Q),F=y.e=H.length-j.e-1,y.c[0]=pd[(_=F%we)<0?we+_:_],h=!h||k.comparedTo(y)>0?F>0?y:D:k,_=d,d=1/0,k=new w(H),P.c[0]=0;U=t(k,y,0,1),B=x.plus(U.times(A)),B.comparedTo(h)!=1;)x=A,A=B,D=P.plus(U.times(B=D)),P=B,y=k.minus(U.times(B=y)),k=B;return B=t(h.minus(x),A,0,1),P=P.plus(B.times(D)),x=x.plus(B.times(A)),P.s=D.s=j.s,F=F*2,z=t(D,A,F,i).minus(j).abs().comparedTo(t(P,x,F,i).minus(j).abs())<1?[D,A]:[P,x],d=_,z},s.toNumber=function(){return+I(this)},s.toPrecision=function(h,y){return h!=null&&ct(h,1,St),S(this,h,y,2)},s.toString=function(h){var y,x=this,A=x.s,B=x.e;return B===null?A?(y="Infinity",A<0&&(y="-"+y)):y="NaN":(h==null?y=B<=c||B>=l?Nc(xr(x.c),B):wn(xr(x.c),B,"0"):h===10&&v?(x=L(new w(x),o+B+1,i),y=wn(xr(x.c),x.e,"0")):(ct(h,2,E.length,"Base"),y=r(wn(xr(x.c),B,"0"),10,h,A,!0)),A<0&&x.c[0]&&(y="-"+y)),y},s.valueOf=s.toJSON=function(){return I(this)},s._isBigNumber=!0,s[Symbol.toStringTag]="BigNumber",s[Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,e!=null&&w.set(e),w}function gr(e){var t=e|0;return e>0||e===t?t:t-1}function xr(e){for(var t,r,n=1,s=e.length,a=e[0]+"";n<s;){for(t=e[n++]+"",r=we-t.length;r--;t="0"+t);a+=t}for(s=a.length;a.charCodeAt(--s)===48;);return a.slice(0,s+1||1)}function Ds(e,t){var r,n,s=e.c,a=t.c,o=e.s,i=t.s,c=e.e,l=t.e;if(!o||!i)return null;if(r=s&&!s[0],n=a&&!a[0],r||n)return r?n?0:-i:o;if(o!=i)return o;if(r=o<0,n=c==l,!s||!a)return n?0:!s^r?1:-1;if(!n)return c>l^r?1:-1;for(i=(c=s.length)<(l=a.length)?c:l,o=0;o<i;o++)if(s[o]!=a[o])return s[o]>a[o]^r?1:-1;return c==l?0:c>l^r?1:-1}function ct(e,t,r,n){if(e<t||e>r||e!==yr(e))throw Error(Kt+(n||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Mc(e){var t=e.c.length-1;return gr(e.e/we)==t&&e.c[t]%2!=0}function Nc(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function wn(e,t,r){var n,s;if(t<0){for(s=r+".";++t;s+=r);e=s+e}else if(n=e.length,++t>n){for(s=r,t-=n;--t;s+=r);e+=s}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var G=Jm();function fw(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}function mw(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const hw={1:{dex:{agent:{type:"default:odos-v2",router:"0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559",adapter:"0xC1bB4d5071Fe7109ae2D67AE05826A3fe9116cfc",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},sushiswap:{type:"default:sushi",router:"0xAC4c6e212A361c968F1725b4d055b47E63F80b75",adapter:"0x3Ee50D79e6D0205f325928AAFb041b63E1767Bc5",fee:"0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc"}}},14:{dex:{spark:{type:"default:spark",adapter:"0xB18c633B6584A33E45a8840a759f56dF17117b1D",fee:"0xaeA8C3e1a129A77686E115b1a46D9aD8405F7D2b"}}},56:{dex:{agent:{type:"default:odos-v2",router:"0x89b8AA89FDd0507a99d334CBe3C808fAFC7d850E",adapter:"0x67Feba015c968c76cCB2EEabf197b4578640BE2C",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},thena:{type:"default:odos-v2",adapter:"0xB75218ba5A99bF57Fd02556B70F05A4A0f1Dbe67",fee:"0x15eBc8b5b3877512FFF23650188694A9a8891FAc"},pancake:{type:"p2:pancakeswap-v2",adapter:"0x654272F7e6e6E912D38650f783eFd44452fD6ee5",fee:"0x37A957f10F458e0d7fDECBE2917971b57F15c927"},newera:{type:"default:odos-v2",adapter:"0x845f459271D800f6Ab32D78400b8Aa18414E80b0",fee:"0x4E7454909eB6D539111D56b50d68897E933D2d11"}}},137:{dex:{agent:{type:"default:odos-v2",router:"0x4E3288c9ca110bCC82bf38F09A7b425c095d92Bf",adapter:"0x75A3d70Fa6d054d31C896b9Cf8AB06b1c1B829B8",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},quick:{type:"paraswap:paraswap-v5",adapter:"0x023fD6848234f2655818705237F77F02215FEfe5",fee:"0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f"},teafi:{type:"paraswap:paraswap-v5",adapter:"0xe95db7a60164B112C64cE67bA8587b1d4a0E0D29",fee:"0x04Ff96e2c4D62b5771795d307AD679a25b3D2D50"}}},143:{dex:{yowie:{type:"default:openocean-v2",adapter:"0x18bc9533c3539073B9A9acF12b0AbF7cB73e0F1f",fee:"0x6AF3eE77A3A3257777F5649aFa611b4C7Fd975Ef"},pangolin:{type:"default:kyber-v2",adapter:"0xd7D9CAA2910f49F37AC3447f5cAd27153944354A",fee:"0xde92da99D188Ceb54A11ec711EF52D808A6260B5"}}},146:{dex:{agent:{type:"default:odos-v2",router:"0xaC041Df48dF9791B0654f1Dbbf2CC8450C5f2e9D",adapter:"0x58fD209C81D84739BaD9c72C082350d67E713EEa",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},spooky:{type:"default:magpie-v3",adapter:"0xdCee7FDdB932104329d528144Cd17A408722B7e2",fee:"0x840Df4684B35BC68BcdA3F6707A3c82A0D662f8b"},swapx:{type:"default:openocean-v2",adapter:"0xecc733D6F6f2DEa341832D650E30822118884FEb",fee:"0x6E03f7BC0f141894612AA017796096399623895F"},shadow:{type:"default:magpie-v3",adapter:"0x5f3E5F6ACCfc65243A01Da3E93b5A700285592C3",fee:"0xb9e3751fAF3187E1bC468E56a707a8A91754460e"}}},1329:{dex:{dragon:{type:"default:dragon",adapter:"0x02d9d5882129241b67ec21Ebc2C86e1BE9BC9890",fee:"0x0dc1E0525202b32e89bA78ed55b1e5cEdB751334"},nami:{type:"default:openocean-v2",adapter:"0x2D4A1237A98f8cb03C3C85960e859aA44036a306",fee:"0xeB58450e23632003f013568703F54446070E2E80"}}},8453:{dex:{agent:{type:"default:odos-v2",router:"0x19cEeAd7105607Cd444F5ad10dd51356436095a1",adapter:"0x5906C4dD71D5afFe1a8f0215409E912eB5d593AD",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},quick:{type:"default:kyber-v2",adapter:"0xc73F03c929A123Ee2f3A98EC18BB240f03980AE5",fee:"0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f"},sushiswap:{type:"default:sushi",router:"0xAC4c6e212A361c968F1725b4d055b47E63F80b75",adapter:"0x3Ee50D79e6D0205f325928AAFb041b63E1767Bc5",fee:"0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc"}}},42161:{dex:{agent:{type:"default:odos-v2",router:"0xa669e7A0d4b3e4Fa48af2dE86BD4CD7126Be4e13",adapter:"0x026B8977319F67078e932a08feAcB59182B5380f",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},arbidex:{type:"default:odos-v2",adapter:"0xa734b32151108139e48dCA06eE721538d90A9Ef6",fee:"0xa0c11852f8A44e32F9EC10AD25986A53842f72Ca"},ramses:{type:"paraswap:paraswap-v5",adapter:"0x023fD6848234f2655818705237F77F02215FEfe5",fee:"0xB5BaCB60ECDa0bEF809B2A26eC9B4B926835D7af"},omni:{type:"paraswap:paraswap-v5",adapter:"0xa1baE146161223cd9dCa7137F68eb385934130BE",fee:"0xba5291526c30B097E9F1Fd1Be301E2ab6E0782aa"},chronos:{type:"default:odos-v2",adapter:"0x4Ff90F32aceD08b3e3257B018EA495Fd1Bfe4455",fee:"0x5729af83240EFecAa18eafaAE82961c2DD045Dbe"},sushiswap:{type:"default:sushi",router:"0xAC4c6e212A361c968F1725b4d055b47E63F80b75",adapter:"0x3Ee50D79e6D0205f325928AAFb041b63E1767Bc5",fee:"0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc"}}},43114:{dex:{agent:{type:"default:odos-v2",router:"0x88de50B233052e4Fb783d4F6db78Cc34fEa3e9FC",adapter:"0x4F48041842827823D3750399eCa2832fC2E29201",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},blackhole:{type:"default:kyber-v2",adapter:"0x426ec4bc0d58B80959CDE77576a1942dd40592Fa",fee:"0x7f8B62520D9B5DA0ED517cc36e8dcb2a356f1928"},pangolin:{type:"default:kyber-v2",adapter:"0xd7D9CAA2910f49F37AC3447f5cAd27153944354A",fee:"0xde92da99D188Ceb54A11ec711EF52D808A6260B5"}}},59144:{dex:{agent:{type:"default:odos-v2",router:"0x2d8879046f1559E53eb052E949e9544bCB72f414",adapter:"0x55E4da2cd634729064bEb294EC682Dc94f5c3f24",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},lynex:{type:"default:openocean",adapter:"0x4FF6A97A67fe395212f168f011D71fE79E4396f2",fee:"0xcb36ed1B1BfAD8F7FC9651f52d21f04A68677423"}}},80094:{dex:{kodiak:{type:"default:kodiak",adapter:"0xBbaa527Aac00b1Ee9A3909D4D8c4447630E29B1F",fee:"0xBA47Ec15aFbCF6e7e9F52900632049530bB6bAe4"}}},747474:{dex:{sushiswap:{type:"default:sushi",router:"0xAC4c6e212A361c968F1725b4d055b47E63F80b75",adapter:"0x3Ee50D79e6D0205f325928AAFb041b63E1767Bc5",fee:"0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc"}}},"*":{wm:"0x0005d5cE0dB57e5BE3b2b8b6FeB75f0ccd015000",repermit:"0x00002a9C4D9497df5Bd31768eC5d30eEf5405000",cosigner:"0x000ECFa392ecDEfEE6e2a5C095d39B7A32f1E000",reactor:"0x000000b33fE4fB9d999Dd684F79b110731c3d000",executor:"0x000642A0966d9bd49870D9519f76b5cf823f3000",refinery:"0x000E474c0D7084EAA35A501035E73269f4b009A5",salt:{wm:"0xc9b46eae42dfeba3222a0315bf682f33cd5cc9d60c9625642e88406f8415f152",repermit:"0x4871dc9008e605821ea9677b65ea2a60ffb774afb31e0dcaea2e192880096be7",cosigner:"0x1117fe6f4e25c9380d10b2b3314a1e9b33e5f65ba0e55e0c63d0640db0dd60a2",reactor:"0xec73677f3a465a9755d4c9eab9509b59a24613fdb8b78719682930373e9876f5",executor:"0x9abc67d936f79e493f1f14050c2f6adb87ec208ff7aaae2e7ae788a7cb4796d7",refinery:"0x9746de29f1dd31b2c8460d71e92a7aefa34911130e61f274f37776e598c48bec"}}};var fd,eh;function bw(){if(eh)return fd;eh=1;const e=hw,t=s=>mw(`./out/${s}.sol/${s}.json`).abi,r=()=>({wm:t("WM"),repermit:t("RePermit"),reactor:t("OrderReactor"),executor:t("Executor"),refinery:t("Refinery"),settler:t("Settler"),adapter:t("DefaultDexAdapter")});function n(s,a){if(!s)return;const{dex:o,...i}=e["*"]??{},c=e[s];if(!c)return;const{dex:l,...u}=c;if(!(a!=null&&a.trim()))return{...i,...u};const d=l==null?void 0:l[a];if(d)return{...i,...u,...d}}return fd={config:n,abis:r,raw:e},fd}var th=bw();const Ba=(e,t)=>{if(!e||!t)return"";const r=G(10).pow(e||0);return G(t).times(r).idiv(r).div(r).toFixed()};G(0),G(1),G(10),G(1e18);function _s(e,t){return e==t||e.toLowerCase()==t.toLowerCase()}const Ms=e=>!!jm.find(t=>_s(t,e||""));function yw(e){return[$t.Years,$t.Months,$t.Weeks,$t.Days,$t.Hours,$t.Minutes].find(r=>r<=e)||$t.Minutes}const Qn=e=>e?e.value*e.unit:0,gw=e=>!e||e==="NaN"?"0":G(e).decimalPlaces(0).toFixed(),Ns=e=>Object.values(Ft).find(t=>t.id===e),xw=e=>{if(!e)return;const t=e.map(a=>_t(a)),r=Object.entries(Vm).filter(([a])=>t.includes(a)).flatMap(([,a])=>a),n=e.map(a=>a.exchangeAddress),s=new Set([...n,...r].map(a=>a.toLowerCase()));return Array.from(s)},md=(e,t)=>e.version===1?(e.fillDelay||0)*1e3+ph(t):(e.fillDelay||0)*1e3,Lc=e=>typeof window>"u"?null:new URLSearchParams(window.location.search).get(e),rh=e=>kh().filter(t=>t.name===e).map(t=>t.chainId),hd=(e="",t="",r=18,n=18)=>{if(!G(e||0).gt(0)||!G(t||0).gt(0))return"";const s=Ba(r,e),a=Ba(n,t);return G(a).div(s).toFixed()},nh=(e,t,r)=>{if(e.type===Re.TWAP_MARKET)return"";const n=Ba(t,e.srcAmountPerTrade),s=Ba(r,e.dstMinAmountPerTrade);return G(s).div(n).toFixed()},sh=(e,t,r)=>{if(e.type===Re.TWAP_MARKET)return"";const n=Ba(t,e.srcAmountPerTrade),s=Ba(r,e.triggerPricePerTrade);return G(s).div(n).toFixed()},ah=(e,t,r)=>{if(!e||!t||!r)return;const n=G(e).times(t),s=G(10).pow(r);return n.div(s).toFixed(0)},oh=(e,t,r,n)=>{if(r||!n||!e||!t)return G(0).toString();const s=G(e).times(G(t)),a=G(10).pow(n),o=s.div(a);return G.max(1,o).integerValue(G.ROUND_FLOOR).toFixed(0)},ih=(e,t,r,n)=>{if(e===ge.TWAP||e===ge.LIMIT)return"0";if(!n||!t||!r)return;const s=G(t).times(G(r)),a=G(10).pow(n),o=s.div(a);return G.max(1,o).integerValue(G.ROUND_FLOOR).toFixed(0)||"0"},ch=(e,t,r,n)=>{const s=Qn(r)*2*t,a=Lc(Ia.DURATION),o=yw(a?Number(a):s);return a?{unit:o,value:Number(G(Number(a)/o).toFixed(2))}:n||(e===ge.LIMIT?{unit:$t.Days,value:7}:e===ge.STOP_LOSS||e===ge.TAKE_PROFIT?{unit:$t.Days,value:1}:{unit:o,value:Number(G(s/o).toFixed(2))})},lh=(e,t,r)=>t!==ge.TWAP?1:r!==void 0?r:e,uh=(e,t,r,n)=>{if(!t||!r||!n)return 1;const a=G(r).times(t).div(n).integerValue(G.ROUND_FLOOR).toNumber(),o=Math.floor(Pa/2/Qn(e));return Math.max(1,Math.min(a,o))},dh=(e,t)=>e+Qn(t)+6e4,ph=e=>e.bidDelaySeconds*1e3*2,fh=(e="",t=0)=>!e||!t?"0":G(e).div(t).integerValue(G.ROUND_FLOOR).toFixed(0),ww=(e,t)=>({isError:!(e.unit===_c.unit&&e.value===_c.value)&&Qn(e)*t>Pa,value:Math.floor(Pa/t)}),mh=(e="",t="",r)=>{if(r===ge.STOP_LOSS)return{isError:G(t||0).gte(G(e||0)),value:e}},hh=(e="",t="",r)=>{if(r===ge.TAKE_PROFIT)return{isError:G(t||0).lte(G(e||0)),value:e}},bh=(e="",t="",r=!1,n)=>{if(!r&&n===ge.STOP_LOSS)return{isError:G(t||0).gte(G(e||0)),value:e}},yh=(e="",t="",r=!1,n)=>{if(!r&&n===ge.TAKE_PROFIT)return{isError:G(t||0).gte(G(e||0)),value:e}},gh=(e,t)=>e===ge.STOP_LOSS||e===ge.TAKE_PROFIT?{isError:Qn(t)>5184e6,value:5184e6}:{isError:Qn(t)>Pa,value:Pa},xh=e=>({isError:Qn(e)<od,value:od}),wh=e=>({isError:Qn(e)<Uc,value:Uc}),vh=(e,t,r)=>({isError:G(t||0).multipliedBy(e||0).isLessThan(r),value:r}),Eh=(e,t,r)=>({isError:r===ge.TWAP&&G(e).isGreaterThan(t),value:t}),vw=(e,t)=>{if(e===Jr.Pancake)switch(t){case 56:return Pe.PancakeSwap;case 42161:return Pe.PancakeSwapArbitrum;case 8453:return Pe.PancakeSwapBase;case 59144:return Pe.PancakeSwapLinea;default:return Pe.PancakeSwap}if(e===Jr.Sushiswap)switch(t){case 1:return Pe.SushiEth;case 42161:return Pe.SushiArb;case 137:return Pe.SushiBase;case 747474:return Pe.SushiKatana;default:return Pe.SushiEth}if(e===Jr.Quick)switch(t){case 137:return Pe.QuickSwap;case 8453:return Pe.QuickSwapBase;default:return Pe.QuickSwap}if(e===Jr.Thena)switch(t){case 56:return Pe.Thena;default:return Pe.Thena}if(e===Jr.Spooky)switch(t){case 250:return Pe.SpookySwap;case 146:return Pe.SpookySwapSonic;default:return Pe.SpookySwap}if(e===Jr.Lynex)switch(t){case 59144:return Pe.Lynex;default:return Pe.Lynex}if(e===Jr.Swapx)switch(t){case 146:return Pe.SwapX;default:return Pe.SwapX}if(e===Jr.Blackhole)switch(t){case 43114:return Pe.BlackholeAvax;default:return Pe.BlackholeAvax}},bd=(e,t=0)=>{const{abi:r,...n}=th.config(t,e);return{...n,partner:e,twapConfig:vw(e,t)}},kh=()=>{const e=th.raw;return Object.entries(e).filter(([t])=>t!=="*").flatMap(([t,r])=>{const n=r==null?void 0:r.dex;return!n||typeof n!="object"?[]:Object.entries(n).map(([s])=>({chainId:Number(t),name:s,config:bd(s,Number(t))}))}).sort((t,r)=>t.name.localeCompare(r.name))},Ch=e=>{const t=Lc(Ia.MIN_CHUNK_SIZE_USD);return t?parseInt(t):e},Th=({marketPrice:e,typedInputAmount:t,srcUsd1Token:r,marketPriceLoading:n,triggerPriceError:s,limitPriceError:a,tradesError:o,fillDelayError:i,durationError:c,balanceError:l,minTradeSizeError:u})=>{if(!Lc(Ia.IGNORE_ERRORS)&&!(G(e||0).isZero()||G(t||0).isZero()||G(r||"0").isZero()||n))return u||s||a||o||i||c||l},Ah=(e,t)=>{const r=Date.now().toString(),n=parseInt((e/1e3).toFixed(0)),s=gw(t/1e3),a=Lc(Ia.FRESHNESS),o=a?parseInt(a):60;return{nonce:r,epoch:n,deadline:s,freshness:o}},Ew=({chainId:e,srcToken:t,dstToken:r,srcAmount:n,deadlineMillis:s,fillDelayMillis:a,slippage:o,account:i,srcAmountPerTrade:c,dstMinAmountPerTrade:l="0",triggerAmountPerTrade:u="0",config:d,module:f})=>{const{nonce:m,epoch:b,deadline:g,freshness:E}=Ah(a,s),v=f===ge.TAKE_PROFIT?Dc:u,w=f===ge.TAKE_PROFIT?u:l,S={permitted:{token:t,amount:n},spender:d.reactor,nonce:m,deadline:g,witness:{reactor:d.reactor,executor:d.executor,exchange:{adapter:d.adapter,ref:d.fee,share:0,data:"0x"},swapper:i,nonce:m,deadline:g,chainid:e,exclusivity:0,epoch:b,slippage:o,freshness:E,input:{token:t,amount:c,maxAmount:n},output:{token:r,limit:G(w||0).toFixed(),stop:G(v||0).toFixed(),recipient:i}}};return{domain:{name:"RePermit",version:"1",chainId:e,verifyingContract:d.repermit},order:S,types:Wm,primaryType:cd}},kw=({chainId:e,srcToken:t,dstToken:r,srcAmount:n,deadlineMillis:s,fillDelayMillis:a,slippage:o,account:i,srcAmountPerTrade:c,dstMinAmountPerTrade:l="0",triggerAmountPerTrade:u="0",config:d,module:f})=>{const{nonce:m,epoch:b,deadline:g,freshness:E}=Ah(a,s),v=Math.floor(Date.now()/1e3).toString(),w=l,S=f===ge.STOP_LOSS?u:"0",T=f===ge.TAKE_PROFIT?u:"0",O={permitted:{token:t,amount:n},spender:d.reactor,nonce:m,deadline:g,witness:{reactor:d.reactor,executor:d.executor,exchange:{adapter:d.adapter,ref:d.fee,share:0,data:"0x"},swapper:i,nonce:m,start:v,deadline:g,chainid:e,exclusivity:0,epoch:b,slippage:o,freshness:E,input:{token:t,amount:c,maxAmount:n},output:{token:r,limit:G(w||0).toFixed(),triggerLower:G(S||0).toFixed(),triggerUpper:G(T||0).toFixed(),recipient:i}}};return{domain:{name:"RePermit",version:"1",chainId:e,verifyingContract:d.repermit},order:O,types:qm,primaryType:cd}},Sh=e=>Number(Us)>=2?kw(e):Ew(e),Cw=`https://bi.orbs.network/putes/twap-ui-${.7}`;let yd="unknown";function Ph(e){yd=e}function gd(){const e=Math.random().toString(36).substring(2,16),t=Math.random().toString(36).substring(2,16),r=Date.now().toString(36);return`id_${e+t+r}`}const Tw=(e,t,r)=>{var n,s,a,o,i,c,l,u,d;return{spotVersion:Us,partner:e.partner,adapter:e.adapter,cosigner:e.cosigner,executor:e.executor,fee:e.fee,reactor:e.reactor,refinery:e.refinery,repermit:e.repermit,router:e.router,type:e.type,wm:e.wm,chainName:((n=e.twapConfig)==null?void 0:n.chainName)||"",chainId:r||0,twapVersion:((s=e.twapConfig)==null?void 0:s.twapVersion)||0,twapAddress:((a=e.twapConfig)==null?void 0:a.twapAddress)||"",lensAddress:((o=e.twapConfig)==null?void 0:o.lensAddress)||"",bidDelaySeconds:((i=e.twapConfig)==null?void 0:i.bidDelaySeconds)||0,minChunkSizeUsd:t,name:((c=e.twapConfig)==null?void 0:c.name)||"",exchangeAddress:((l=e.twapConfig)==null?void 0:l.exchangeAddress)||"",exchangeType:((u=e.twapConfig)==null?void 0:u.exchangeType)||"",pathfinderKey:((d=e.twapConfig)==null?void 0:d.pathfinderKey)||""}},Ih=async e=>{try{await fetch(Cw,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)}).then()}catch(t){console.error("Failed to send BI",t)}};class Aw{constructor(){rd(this,"timeout");rd(this,"config");rd(this,"data",{_id:gd()})}async updateAndSend(t={},r=!1,n){try{this.data={...this.data,...t},r?(await Ih(this.data),n==null||n()):(clearTimeout(this.timeout),this.timeout=setTimeout(()=>{Ih(this.data),n==null||n()},1e3))}catch(s){console.error("Failed to update and send BI",s)}}onCancelOrderRequest(t,r){this.updateAndSend({cancelOrderIdsV1:r===1?t:void 0,cancelOrderIdsV2:r===2?t:void 0,action:"cancel order",cancelOrderSuccess:!1,cancelOrderTxHash:void 0,actionError:void 0})}onCancelOrderSuccess(t){this.updateAndSend({cancelOrderTxHash:t,cancelOrderSuccess:!0})}onCancelOrderError(t){this.onTxError(t)}onWrapSuccess(t){this.updateAndSend({wrapTxHash:t})}onWrapRequest(){this.updateAndSend({action:"wrap"})}onWrapError(t){this.onTxError(t)}onApproveRequest(){this.updateAndSend({action:"approve"})}onApproveSuccess(t){this.updateAndSend({approvalTxHash:t})}onApproveError(t){this.onTxError(t)}onCrash(t){var r;this.updateAndSend({action:"crash",actionError:((r=t==null?void 0:t.message)==null?void 0:r.toLowerCase())||(t==null?void 0:t.toLowerCase())})}onTxError(t){var n;const r=((n=t==null?void 0:t.message)==null?void 0:n.toLowerCase())||(t==null?void 0:t.toLowerCase());this.updateAndSend({actionError:r})}onRequestOrder({account:t,chainId:r,module:n,srcToken:s,dstToken:a,fromTokenAmount:o,srcChunkAmount:i,minDstAmountOutPerTrade:c="",triggerPricePerTrade:l="",deadline:u,fillDelay:d,slippage:f,isMarketOrder:m,chunksAmount:b}){this.updateAndSend({toTokenAddress:a.address,toTokenSymbol:a.symbol,fromTokenAddress:s.address,fromTokenSymbol:s.symbol,fromTokenAmount:o,chunksAmount:b,srcChunkAmount:i,minDstAmountOutPerTrade:c,triggerPricePerTrade:l,deadline:u,fillDelay:d,slippage:f,chainId:r,walletAddress:t,module:n,orderType:m?"market":"limit",actionError:void 0})}onSignOrderRequest(t){this.updateAndSend({action:"sign order",order:t})}onSignOrderError(t){this.onTxError(t)}onSignOrderSuccess(t){this.updateAndSend({action:"sign order",signature:t})}init(t,r,n){var s;this.config=t,n!==((s=this.data)==null?void 0:s.chainId)&&(this.data={_id:gd(),action:"module-import",uiVersion:yd,...Tw(t,r,n),origin:window.location.origin},this.updateAndSend(this.data))}onCreateOrderError(t){this.onTxError(t)}onCreateOrderRequest(){this.updateAndSend({action:"create order"})}async onCreateOrderSuccess(t){this.updateAndSend({orderHash:t,orderSuccess:!0},void 0,()=>{this.data={_id:gd(),action:"reset",uiVersion:yd,origin:this.data.origin,spotVersion:Us,partner:this.data.partner,adapter:this.data.adapter,cosigner:this.data.cosigner,executor:this.data.executor,fee:this.data.fee,reactor:this.data.reactor,refinery:this.data.refinery,repermit:this.data.repermit,router:this.data.router,type:this.data.type,wm:this.data.wm,chainName:this.data.chainName||"",chainId:this.data.chainId||0,twapVersion:this.data.twapVersion||0,twapAddress:this.data.twapAddress||"",lensAddress:this.data.lensAddress||"",bidDelaySeconds:this.data.bidDelaySeconds||0,minChunkSizeUsd:this.data.minChunkSizeUsd||0,name:this.data.name||"",exchangeAddress:this.data.exchangeAddress||"",exchangeType:this.data.exchangeType||"",pathfinderKey:this.data.pathfinderKey||""}})}onLoad(){this.updateAndSend({action:"module-import",origin:window.location.origin})}}const dt=new Aw,Sw=e=>{var i;const t=G(e.order.witness.output.limit||0).gt(1),r=e.order.witness.output.stop,n=e.order.witness.output.triggerUpper,s=G(r||0).eq(Dc)||G(n||0).gt(0),a=G(r||0).gt(0),o=((i=e.metadata.chunks)==null?void 0:i.length)||G(e.order.witness.input.maxAmount).div(G(e.order.witness.input.amount)).toNumber();return s?Re.TAKE_PROFIT:a?t?Re.STOP_LOSS_LIMIT:Re.STOP_LOSS_MARKET:t?o>1&&t?Re.TWAP_LIMIT:t?Re.LIMIT:Re.TWAP_MARKET:Re.TWAP_MARKET},Pw=e=>{var s;const t=((s=e.metadata.chunks)==null?void 0:s.filter(a=>a.status==="success").length)||0,r=e.metadata.expectedChunks||0,n=G(t).dividedBy(r).toNumber();return n>=.99?100:n<=0?0:Number((n*100).toFixed(2))},Iw=(e,t)=>e.metadata.status==="completed"||t>=99?ut.Completed:["pending","eligible"].includes(e.metadata.status)?ut.Open:e.metadata.description.toLowerCase()==="cancelled by contract"?ut.Cancelled:ut.Expired,Bw=e=>{var r;return(((r=e.metadata.chunks)==null?void 0:r.filter(n=>n.status==="success"))||[]).map(n=>({inAmount:n.inAmount,outAmount:n.outAmount,timestamp:new Date(n.timestamp).getTime(),txHash:n.txHash}))},Fw=(e,t)=>{var n;const r=e.length;return r>=t&&((n=e[r-1])==null?void 0:n.timestamp)||0},Ow=e=>G(e.metadata.displayOnlyInputTokenPriceUSD).dividedBy(1e18).toFixed(),xd=e=>Number(e.order.witness.output.limit)===1?"":e.order.witness.output.limit,Uw=e=>{const{triggerLower:t="0",triggerUpper:r="0"}=e.order.witness.output,n=xd(e),s=e.metadata.expectedChunks||1,a=G(r||0).gt(0);return{dstMinAmountPerTrade:n,triggerPricePerTrade:a?r:t,dstMinAmountTotal:G(n).multipliedBy(s).toFixed()}},Dw=e=>{const t=xd(e),r=G(e.order.witness.output.stop||0).eq(Dc),n=e.metadata.expectedChunks||1;return{dstMinAmountPerTrade:r?"":t,triggerPricePerTrade:r?t:G(e.order.witness.output.stop||"").toFixed(),dstMinAmountTotal:r?"":G(t).multipliedBy(n).toFixed()}},_w=e=>Number(Us)>=2?Uw(e):Dw(e),wd=e=>{const t=Pw(e),r=xd(e),n=e.metadata.expectedChunks||1,s=Bw(e);return{id:e.hash,hash:e.hash,version:2,type:Sw(e),maker:e.order.witness.swapper,progress:t,srcAmountFilled:s.reduce((a,o)=>a.plus(o.inAmount),new G(0)).toFixed()||"",dstAmountFilled:s.reduce((a,o)=>a.plus(o.outAmount),new G(0)).toFixed()||"",fills:s,srcTokenAddress:e.order.witness.input.token,dstTokenAddress:e.order.witness.output.token,orderDollarValueIn:Ow(e),fillDelay:e.order.witness.epoch*1e3,deadline:Number(e.order.deadline)*1e3,createdAt:new Date(e.timestamp).getTime(),srcAmount:e.order.witness.input.maxAmount,srcAmountPerTrade:e.order.witness.input.amount,totalTradesAmount:n,isMarketPrice:G(r||0).lte(1),chainId:e.order.witness.chainid,filledOrderTimestamp:Fw(s,n),status:Iw(e,t),rawOrder:e,..._w(e)}},Mw=async({chainId:e,signal:t,account:r,exchange:n,isDev:s=!1})=>{try{if(!r)return[];const a=n?`&exchange=${n}`:"";return(await(await fetch(`${Oc(s)}/orders?swapper=${r}&chainId=${e}${a}`,{signal:t})).json()).orders.map(wd)}catch{return[]}},Bh=async(e,t,r=!1)=>{try{const n={signature:t,order:e,status:"pending"};dt.onCreateOrderRequest(),console.log(`${Oc(r)}/orders/new`);const s=await fetch(`${Oc(r)}/orders/new`,{method:"POST",body:JSON.stringify(n)}),a=await s.json().catch(()=>({}));if(!s.ok||!(a!=null&&a.success)){const i=(a==null?void 0:a.message)??s.statusText??"Request failed",c=(a==null?void 0:a.code)??s.status;throw new Error(`error:${i}, code:${c}`)}const o=wd(a.signedOrder);return dt.onCreateOrderSuccess(o.id),o}catch(n){throw dt.onCreateOrderError(n),console.error(n),n}},vn=(e,t)=>e&&e.length?e.map(t||(r=>`${r}`)):void 0,Nw=e=>{if(e)return $m[e]},vd=async({chainId:e,buildQuery:t,extractResults:r,signal:n,retries:s=1,limit:a=1e3,page:o})=>{const i=Nw(e);if(!i)throw new Gw;const c=async d=>{let f=0;for(;f<=s;)try{const m=await fetch(i,{method:"POST",body:JSON.stringify({query:d}),signal:n,headers:{"Content-Type":"application/json"}});if(!m.ok)throw new Error(`HTTP error: ${m.status}`);const b=await m.json();if(b.errors)throw new Error(b.errors[0].message);return r(b)}catch(m){if(f===s)throw m;await new Promise(b=>setTimeout(b,500*2**f)),f++}return[]};let l=0;const u=[];if(o!==void 0){const d=t(o,a);try{return await c(d)}catch{console.warn(`Page ${o} failed, retrying one final time...`);try{return await c(d)}catch{return[]}}}for(;;){const d=t(l,a);let f;try{f=await c(d)}catch{console.warn(`Page ${l} failed, retrying one final time...`);try{f=await c(d)}catch{return u}}if(u.push(...f),f.length<a)break;l++}return u},Fh=e=>e.map(t=>({inAmount:t.srcAmountIn,outAmount:t.dstAmountOut,timestamp:t.timestamp,txHash:t.transactionHash})),Oh=(e,t)=>{const r=G(e||0).gt(1);return!r&&t===1?Re.TWAP_MARKET:t>1&&r?Re.TWAP_LIMIT:r?Re.LIMIT:Re.TWAP_MARKET},Lw=(e,t,r,n)=>{var f;const s=Fh(r||[]),a=new G(e.ask_srcAmount||0).div(e.ask_srcBidAmount).integerValue(G.ROUND_FLOOR).toNumber(),i=(r==null?void 0:r.length)===a?(f=r==null?void 0:r[(r==null?void 0:r.length)-1])==null?void 0:f.timestamp:void 0,c=s.reduce((m,b)=>m.plus(b.inAmount),new G(0)).toFixed(),l=s.reduce((m,b)=>m.plus(b.outAmount),new G(0)).toFixed(),u=Uh(e.ask_srcAmount,c),d=Oh(e.ask_dstMinAmount,a);return{version:1,id:e.Contract_id.toString(),hash:"",type:Oh(e.ask_dstMinAmount,a),srcTokenAddress:e.ask_srcToken,dstTokenAddress:e.ask_dstToken,exchangeAddress:e.exchange,twapAddress:e.twapAddress,maker:e.maker,progress:u,dstAmountFilled:l,srcAmountFilled:c,orderDollarValueIn:G(e.dollarValueIn||0).toFixed(6),srcAmount:e.ask_srcAmount,dstMinAmountTotal:G(e.ask_dstMinAmount).multipliedBy(a).toString(),fills:s,fillDelay:e.ask_fillDelay,deadline:e.ask_deadline*1e3,createdAt:new Date(e.timestamp).getTime(),dstMinAmountPerTrade:G(e.ask_dstMinAmount).eq(1)?"":e.ask_dstMinAmount,triggerPricePerTrade:"",srcAmountPerTrade:e.ask_srcBidAmount,txHash:e.transactionHash,totalTradesAmount:a,isMarketPrice:[Re.TWAP_MARKET].includes(d),chainId:t,filledOrderTimestamp:i||0,status:n,rawOrder:e}},zw=e=>{var d;if(!e)return"";const t=vn(e.accounts,f=>`"${f.toLowerCase()}"`),r=vn(xw(e.configs),f=>`"${f.toLowerCase()}"`),n=vn(e.inTokenSymbols,f=>`"${f.toUpperCase()}"`),s=vn(e.outTokenSymbols,f=>`"${f.toUpperCase()}"`),a=vn(e.inTokenAddresses,f=>`"${f.toLowerCase()}"`),o=vn(e.outTokenAddresses,f=>`"${f.toLowerCase()}"`),i=vn(e.transactionHashes,f=>`"${f.toLowerCase()}"`),c=vn(e.orderIds,f=>`"${f}"`),l=r!=null&&r.length?"":vn((d=e.configs)==null?void 0:d.map(f=>f.twapAddress),f=>`"${f.toLowerCase()}"`),u=e.minDollarValueIn;return[r?`exchange_in: [${r.join(", ")}]`:"",l?`twapAddress_in: [${l.join(", ")}]`:"",t?`maker_in: [${t.join(", ")}]`:"",i?`transactionHash_in: [${i.join(", ")}]`:"",c?`Contract_id_in: [${c.join(", ")}]`:"",u?`dollarValueIn_gte: ${u}`:"",n?`srcTokenSymbol_in: [${n.join(", ")}]`:"",s?`dstTokenSymbol_in: [${s.join(", ")}]`:"",a?`srcTokenAddress_in: [${a.join(", ")}]`:"",o?`dstTokenAddress_in: [${o.join(", ")}]`:"",e!=null&&e.startDate?`blockTimestamp_gte: ${e.startDate}`:"",e!=null&&e.endDate?`blockTimestamp_lte: ${e.endDate}`:"",(e==null?void 0:e.orderType)==="limit"?"ask_dstMinAmount_gt: 1":"",(e==null?void 0:e.orderType)==="market"?"ask_dstMinAmount_lte: 1":""].filter(Boolean).join(", ")};async function Rw({chainId:e,signal:t,page:r,limit:n,filters:s}){const a=n||1e3,o=zw(s);return await vd({chainId:e,signal:t,limit:a,page:r,buildQuery:(c,l)=>`
1
+ (function(H,re){typeof exports=="object"&&typeof module<"u"?re(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],re):(H=typeof globalThis<"u"?globalThis:H||self,re(H.SpotReact={},H.jsxRuntime,H.React))})(this,(function(H,re,L){"use strict";var mF=Object.defineProperty;var qh=H=>{throw TypeError(H)};var hF=(H,re,L)=>re in H?mF(H,re,{enumerable:!0,configurable:!0,writable:!0,value:L}):H[re]=L;var Ii=(H,re,L)=>hF(H,typeof re!="symbol"?re+"":re,L),ju=(H,re,L)=>re.has(H)||qh("Cannot "+L);var I=(H,re,L)=>(ju(H,re,"read from private field"),L?L.call(H):re.get(H)),Z=(H,re,L)=>re.has(H)?qh("Cannot add the same private member more than once"):re instanceof WeakSet?re.add(H):re.set(H,L),K=(H,re,L,Pr)=>(ju(H,re,"write to private field"),Pr?Pr.call(H,L):re.set(H,L),L),ae=(H,re,L)=>(ju(H,re,"access private method"),L);var Fi=(H,re,L,Pr)=>({set _(Ie){K(H,re,Ie,L)},get _(){return I(H,re,Pr)}});var jt,xr,Dh,gr,On,ps,Mh,fs,Dn,ms,_h,wr,Nh,Er,hs,Et,kr,Ne,Ha,Cr,Dt,xn,Rh,nt,de,Ga,Ke,vr,bs,fn,Mn,ja,ys,xs,Ar,Tr,_n,gs,fe,Ka,qu,Vu,Ku,Wu,Xu,Zu,Qu,Vh,zh,qa,qt,We,Sr,Vt,Hn,Lh,mn,Mt,Va,$h,hn,Nn,rt,bn,yn,Oi,Ju,Hh,Kt,Gh,Ce,Rn,zn,ws,Es,Ln,ks,Cs,jh;function Pr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ie=Pr(L),oe={SpookySwap:{chainName:"ftm",chainId:250,twapVersion:4,twapAddress:"0xd3B290FEB04E353d1821bc0a12397FdEa9a846C0",lensAddress:"0x0221EfDF1Fd3212AF87F23cceB7693a65fAF1d7f",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SpookySwap",partner:"Orbs:TWAP:SpookySwap",exchangeAddress:"0xdF7CCd5fc7077E9de5f27a7b7bfDC837c82f8496",exchangeType:"ExchangeV2",pathfinderKey:""},SpookySwapSonic:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SpookySwapSonic",partner:"Orbs:TWAP:SpookySwap",exchangeAddress:"0x6699bE3aF75e5c1B807b1031dBde6dA9A67739F3",exchangeType:"ExchangeV2",pathfinderKey:""},QuickSwap:{chainName:"poly",chainId:137,twapVersion:4,twapAddress:"0x688C027B0f7FaCeFcBa73e472900d28c12C5bDF4",lensAddress:"0xe0D4E736fc76af7C256ae7652c8c1e850bfb7849",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"QuickSwap",partner:"Orbs:TWAP:QuickSwap",exchangeAddress:"0x8FCc245209bE85C49D738D0CE5613F74E5d91E86",exchangeType:"ParaswapExchange",pathfinderKey:"QuickSwap,QuickSwapV3"},QuickSwapBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"QuickSwap",partner:"Orbs:TWAP:QuickSwap",exchangeAddress:"0xb7a3d74895bfd3aff6780525e36d79fcf26a895f",exchangeType:"ExchangeV2",pathfinderKey:""},Thena:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"Thena",partner:"Orbs:TWAP:Thena",exchangeAddress:"0x2B2fABDbfa4a15da0d351F947C14F4520db0bDc1",exchangeType:"ExchangeV2",pathfinderKey:"43,47"},PancakeSwap:{chainName:"bsc",chainId:56,twapVersion:4,twapAddress:"0xa6F7444D2b92Aa9F94a2165c77aAF2B671e63994",lensAddress:"0xEdB0c077fa87Fb21d050c619FF426798f8Fc1264",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0x1A2bb6B75D58b740d88413ef4840D6fa3F637940",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapArbitrum:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},PancakeSwapLinea:{chainName:"linea",chainId:59144,twapVersion:4,twapAddress:"0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78",lensAddress:"0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"PancakeSwap",partner:"Orbs:TWAP:PancakeSwap",exchangeAddress:"0xb37cB9A058c03081Ae6EF934313588cD53d408e7",exchangeType:"P2Exchange",pathfinderKey:""},Lynex:{chainName:"linea",chainId:59144,twapVersion:4,twapAddress:"0x48423e62acbfEF7779b5b4a5E7d6Fbd39E623d78",lensAddress:"0xe84CaEc86eCF3f0AB4267dC6130D9a5510e73DFb",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:100,name:"Lynex",partner:"Orbs:TWAP:Lynex",exchangeAddress:"0x04C06C96d7D19977156016DD408B5992af0570a2",exchangeType:"ExchangeV2",pathfinderKey:"19,18"},SushiArb:{chainName:"arb",chainId:42161,twapVersion:4,twapAddress:"0x0B94dcC0EA2d1ee33Ab064DaC252de980a941eF3",lensAddress:"0x549e1fc9a47FCc0C5C2EbdfF31254cc49fF7164e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiArb",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiBase:{chainName:"base",chainId:8453,twapVersion:4,twapAddress:"0xc918bdC47264687796Cd54FE362FaC4f8b99Eb55",lensAddress:"0x6313188c1909b161074D62E43105faC9B756A23e",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiBase",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiEth:{chainName:"eth",chainId:1,twapVersion:4,twapAddress:"0xb1ed8BCAD1EaC8a1DF0764700472391800D12946",lensAddress:"0x0967f448c4d4dbd14c355E635AE9CbF68cc44A60",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:200,name:"SushiEth",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x04eB53119079FA779492720D1EfeAEBF0aF2e5ad",exchangeType:"ExchangeV2",pathfinderKey:""},SushiKatana:{chainName:"katana",chainId:747474,twapVersion:4,twapAddress:"0xf2d96E7BE676153d202e1453804E2749923C7c5b",lensAddress:"0x1579EED0527781B1A748043AA1f59a3858Ace4a7",takers:["0xF74437A3Fc45a518640828E5D6A3E8c9A9BbDC3a","0x07A6C715063e94c0D95e809efefFCbF4EBEdfD55"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"SushiKatana",partner:"Orbs:TWAP:Sushi",exchangeAddress:"0x92209481507e6B2d14C9b5b70Ed287024177220E",exchangeType:"ExchangeV2",pathfinderKey:""},DragonSwap:{chainId:1329,name:"DragonSwap"},SwapX:{chainName:"sonic",chainId:146,twapVersion:4,twapAddress:"0x8963992816b4EafE5a22b7DB2A99513c18be9afA",lensAddress:"0x67e631F71232D63AcA98a2D5E9B2Bce5FCc39d5D",takers:["0xDF406A27C58a8Cd6Fd43e143339bCE131216a913","0x504f6E10173249dD22491829D98862Cf81DeF79E"],bidDelaySeconds:60,minChunkSizeUsd:10,name:"SwapX",partner:"Orbs:TWAP:SwapX",exchangeAddress:"0xDA902994b7F7a1ecDd8De02E4a17dbFF2E6F67b7",exchangeType:"ExchangeV2",pathfinderKey:""},BlackholeAvax:{chainName:"avax",chainId:43114,twapVersion:4,twapAddress:"0xf77Ad005aBF7e31f669ce89a6568B2f39Ca92cDe",lensAddress:"0x48466B82Ce1575c5c9eCa168ac1090048dD47fA3",takers:["0xA05405b6340A7F43dC5835351BFC4f5b1F028359","0xE3Efef1563a5960ACc731F9e4d6f4cBf5bd87dcA"],bidDelaySeconds:60,minChunkSizeUsd:50,name:"BlackholeAvax",partner:"Orbs:TWAP:BlackholeAvax",exchangeAddress:"0xb7A3d74895bFD3Aff6780525e36D79FCf26a895F",exchangeType:"ExchangeV2"}},Kh=[{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}],Wh=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],Xh=JSON.parse('[{"inputs":[{"internalType":"address","name":"_iweth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"name":"OrderBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"OrderCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"}],"name":"OrderCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"indexed":false,"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"id","type":"uint64"},{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"exchange","type":"address"},{"indexed":false,"internalType":"address","name":"taker","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcAmountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstAmountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"srcFilledAmount","type":"uint256"}],"name":"OrderFilled","type":"event"},{"inputs":[],"name":"MIN_BID_DELAY_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_OUTBID_PERCENT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERCENT_BASE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STALE_BID_SECONDS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CANCELED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_COMPLETED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"_ask","type":"tuple"}],"name":"ask","outputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"uint32","name":"slippagePercent","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"bid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"book","outputs":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"fill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"iweth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"makerOrders","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"order","outputs":[{"components":[{"internalType":"uint64","name":"id","type":"uint64"},{"internalType":"uint32","name":"status","type":"uint32"},{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"uint32","name":"filledTime","type":"uint32"},{"internalType":"uint256","name":"srcFilledAmount","type":"uint256"},{"internalType":"address","name":"maker","type":"address"},{"components":[{"internalType":"address","name":"exchange","type":"address"},{"internalType":"address","name":"srcToken","type":"address"},{"internalType":"address","name":"dstToken","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"srcBidAmount","type":"uint256"},{"internalType":"uint256","name":"dstMinAmount","type":"uint256"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"uint32","name":"bidDelay","type":"uint32"},{"internalType":"uint32","name":"fillDelay","type":"uint32"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Ask","name":"ask","type":"tuple"},{"components":[{"internalType":"uint32","name":"time","type":"uint32"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"exchange","type":"address"},{"internalType":"uint256","name":"dstAmount","type":"uint256"},{"internalType":"uint256","name":"dstFee","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct OrderLib.Bid","name":"bid","type":"tuple"}],"internalType":"struct OrderLib.Order","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"maker","type":"address"}],"name":"orderIdsByMaker","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"id","type":"uint64"}],"name":"prune","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"status","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]'),Zh=[{type:"constructor",inputs:[],stateMutability:"nonpayable"},{type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"cancel",inputs:[{name:"digests",type:"bytes32[]",internalType:"bytes32[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"eip712Domain",inputs:[],outputs:[{name:"fields",type:"bytes1",internalType:"bytes1"},{name:"name",type:"string",internalType:"string"},{name:"version",type:"string",internalType:"string"},{name:"chainId",type:"uint256",internalType:"uint256"},{name:"verifyingContract",type:"address",internalType:"address"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"extensions",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"hashTypedData",inputs:[{name:"structHash",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"digest",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"repermitWitnessTransferFrom",inputs:[{name:"permit",type:"tuple",internalType:"struct RePermitLib.RePermitTransferFrom",components:[{name:"permitted",type:"tuple",internalType:"struct RePermitLib.TokenPermissions",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"nonce",type:"uint256",internalType:"uint256"},{name:"deadline",type:"uint256",internalType:"uint256"}]},{name:"request",type:"tuple",internalType:"struct RePermitLib.TransferRequest",components:[{name:"to",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"signer",type:"address",internalType:"address"},{name:"witness",type:"bytes32",internalType:"bytes32"},{name:"witnessTypeString",type:"string",internalType:"string"},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"spent",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"event",name:"Cancel",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"digest",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"EIP712DomainChanged",inputs:[],anonymous:!1},{type:"event",name:"Spend",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"permitHash",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"token",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!1,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"},{name:"totalSpent",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"Canceled",inputs:[]},{type:"error",name:"Expired",inputs:[]},{type:"error",name:"InsufficientAllowance",inputs:[]},{type:"error",name:"InvalidShortString",inputs:[]},{type:"error",name:"InvalidSignature",inputs:[]},{type:"error",name:"SafeERC20FailedOperation",inputs:[{name:"token",type:"address",internalType:"address"}]},{type:"error",name:"StringTooLong",inputs:[{name:"str",type:"string",internalType:"string"}]}],td=Kh,Qh=Wh,nd=Zh,rd=Xh;var te=(e=>(e.TWAP="TWAP",e.LIMIT="LIMIT",e.STOP_LOSS="STOP_LOSS",e.TAKE_PROFIT="TAKE_PROFIT",e))(te||{}),at=(e=>(e.Open="OPEN",e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e))(at||{}),sd=(e=>(e.All="ALL",e.Open="OPEN",e.Cancelled="CANCELLED",e.Completed="COMPLETED",e.Expired="EXPIRED",e))(sd||{}),Ge=(e=>(e[e.Minutes=6e4]="Minutes",e[e.Hours=36e5]="Hours",e[e.Weeks=6048e5]="Weeks",e[e.Days=864e5]="Days",e[e.Months=2592e6]="Months",e[e.Years=31536e6]="Years",e))(Ge||{}),be=(e=>(e.LIMIT="limit",e.TWAP_LIMIT="twap-limit",e.TWAP_MARKET="twap-market",e.TAKE_PROFIT="take-profit",e.STOP_LOSS_LIMIT="stop-loss-limit",e.STOP_LOSS_MARKET="stop-loss-market",e))(be||{}),Rt=(e=>(e.Arbidex="arbidex",e.Blackhole="blackhole",e.Chronos="chronos",e.Dragon="dragon",e.Kodiak="kodiak",e.Lynex="lynex",e.Nami="nami",e.Newera="newera",e.Omni="omni",e.Pancake="pancake",e.Quick="quick",e.Ramses="ramses",e.Shadow="shadow",e.Spark="spark",e.Spooky="spooky",e.Swapx="swapx",e.Teafi="teafi",e.Thena="thena",e.Yowie="yowie",e.Pangolin="pangolin",e.Sushiswap="sushiswap",e.Agent="agent",e))(Rt||{}),ze=(e=>(e[e.EMPTY_LIMIT_PRICE=0]="EMPTY_LIMIT_PRICE",e[e.MAX_CHUNKS=1]="MAX_CHUNKS",e[e.MIN_CHUNKS=2]="MIN_CHUNKS",e[e.MIN_TRADE_SIZE=3]="MIN_TRADE_SIZE",e[e.MAX_FILL_DELAY=4]="MAX_FILL_DELAY",e[e.MIN_FILL_DELAY=5]="MIN_FILL_DELAY",e[e.MAX_ORDER_DURATION=6]="MAX_ORDER_DURATION",e[e.MIN_ORDER_DURATION=7]="MIN_ORDER_DURATION",e[e.MISSING_LIMIT_PRICE=8]="MISSING_LIMIT_PRICE",e[e.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE=9]="STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE",e[e.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE=10]="TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE",e[e.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE=11]="TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE",e[e.EMPTY_TRIGGER_PRICE=12]="EMPTY_TRIGGER_PRICE",e[e.INSUFFICIENT_BALANCE=13]="INSUFFICIENT_BALANCE",e[e.MAX_ORDER_SIZE=14]="MAX_ORDER_SIZE",e[e.MIN_TRADE_SIZE_ERROR=15]="MIN_TRADE_SIZE_ERROR",e))(ze||{});const Ee="0x0000000000000000000000000000000000000000",Le={eth:{id:1,name:"Ethereum",shortname:"eth",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://eth.llamarpc.com",logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg",explorer:"https://etherscan.io",eip1559:!0},bsc:{id:56,name:"BinanceSmartChain",shortname:"bsc",native:{address:Ee,symbol:"BNB",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"},wToken:{symbol:"WBNB",address:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/1839.png"},publicRpcUrl:"https://bsc-dataseed.binance.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/bsc_2.svg",explorer:"https://bscscan.com",eip1559:!1},poly:{id:137,name:"Polygon",shortname:"poly",native:{address:Ee,symbol:"POL",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png"},wToken:{symbol:"WPOL",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270.png"},publicRpcUrl:"https://polygon-rpc.com",logoUrl:"https://app.1inch.io/assets/images/network-logos/polygon.svg",explorer:"https://polygonscan.com",eip1559:!0},arb:{id:42161,name:"Arbitrum",shortname:"arb",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://arb1.arbitrum.io/rpc",logoUrl:"https://app.1inch.io/assets/images/network-logos/arbitrum.svg",explorer:"https://arbiscan.io",eip1559:!0},sei:{id:1329,name:"Sei",shortname:"sei",native:{address:Ee,symbol:"SEI",decimals:18,logoUrl:"https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png"},wToken:{symbol:"WSEI",address:"0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://evm-rpc.sei-apis.com",logoUrl:"https://assets.coingecko.com/coins/images/28205/standard/Sei_Logo_-_Transparent.png",explorer:"https://seitrace.com",eip1559:!1},avax:{id:43114,name:"Avalanche",shortname:"avax",native:{address:Ee,symbol:"AVAX",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/avalanche.svg"},wToken:{symbol:"WAVAX",address:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7.png"},publicRpcUrl:"https://api.avax.network/ext/bc/C/rpc",logoUrl:"https://app.1inch.io/assets/images/network-logos/avalanche.svg",explorer:"https://snowtrace.io",eip1559:!0},ftm:{id:250,name:"Fantom",shortname:"ftm",native:{address:Ee,symbol:"FTM",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/fantom.svg"},wToken:{symbol:"WFTM",address:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0x4e15361fd6b4bb609fa63c81a2be19d873717870.png"},publicRpcUrl:"https://rpc.ftm.tools",logoUrl:"https://app.1inch.io/assets/images/network-logos/fantom.svg",explorer:"https://ftmscan.com",eip1559:!0},base:{id:8453,name:"Base",shortname:"base",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/1027.png"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://mainnet.base.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/base.svg",explorer:"https://basescan.org",eip1559:!1},linea:{id:59144,name:"Linea",shortname:"linea",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://rpc.linea.build",logoUrl:"https://lineascan.build/images/logo.svg",explorer:"https://lineascan.build",eip1559:!1},zksync:{id:324,name:"zksync",shortname:"zksync",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://mainnet.era.zksync.io",logoUrl:"https://raw.githubusercontent.com/matter-labs/zksync/0a4ca2145a0c95b5bafa84c2f095c644907a8825/zkSyncLogo.svg",explorer:"https://explorer.zksync.io/",eip1559:!0},zkevm:{id:1101,name:"zkevm",shortname:"zkevm",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://zkevm-rpc.com",logoUrl:"https://user-images.githubusercontent.com/18598517/235932702-bc47eae5-d672-4dd9-9da2-8ea8f51a93f3.png",explorer:"https://zkevm.polygonscan.com/",eip1559:!0},manta:{id:169,name:"manta",shortname:"manta",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_manta.jpg"},wToken:{symbol:"WETH",address:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://pacific-rpc.manta.network/http",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_manta.jpg",explorer:"https://manta.socialscan.io/",eip1559:!0},blast:{id:81457,name:"blast",shortname:"blast",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_blast"},wToken:{symbol:"WETH",address:"0x4300000000000000000000000000000000000004",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://rpc.ankr.com/blast",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_blast",explorer:"https://blastscan.io/",eip1559:!0},sonic:{id:146,name:"sonic",shortname:"sonic",native:{address:Ee,symbol:"S",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic"},wToken:{symbol:"WS",address:"0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic"},publicRpcUrl:"https://rpc.soniclabs.com",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_sonic",explorer:"https://www.sonicscan.org/",eip1559:!0},scroll:{id:534352,name:"scroll",shortname:"scroll",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_scroll"},wToken:{symbol:"WETH",address:"0x5300000000000000000000000000000000000004",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://scroll-rpc.publicnode.com",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_scroll",explorer:"https://scrollscan.com/",eip1559:!0},zircuit:{id:48900,name:"Zircuit",shortname:"zircuit",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"https://tokens-data.1inch.io/images/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png"},publicRpcUrl:"https://zircuit-mainnet.drpc.org",logoUrl:"https://app.1inch.io/assets/images/network-logos/ethereum.svg",explorer:"https://explorer.zircuit.com/",eip1559:!0},flare:{id:14,name:"flare",shortname:"flare",native:{address:Ee,symbol:"FLR",decimals:18,logoUrl:"https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48"},wToken:{symbol:"WFLR",address:"0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d",decimals:18,logoUrl:"https://res.cloudinary.com/sparkdex/image/upload/q_100/v1/website-assets/coins/wflr?_a=DATAg1AAZAA0"},publicRpcUrl:"https://flare.network",logoUrl:"https://icons.llamao.fi/icons/chains/rsz_flare?w=48&h=48",explorer:"https://flarescan.com",eip1559:!0},cronosZkEvm:{id:388,name:"Cronos zkEVM",shortname:"cronosZkEvm",native:{address:"0x000000000000000000000000000000000000800a",symbol:"zkCRO",decimals:18,logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png"},wToken:{symbol:"wzkCRO",address:"0xC1bF55EE54E16229d9b369a5502Bfe5fC9F20b6d",decimals:18,logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png"},publicRpcUrl:"https://rpc.zkevm.cronos.org",logoUrl:"https://cryptologos.cc/logos/cronos-cro-logo.png",explorer:"https://explorer.zkevm.cronos.org",eip1559:!0},katana:{id:747474,name:"Katana",shortname:"katana",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://katana.network/assets/katana-logo.svg"},wToken:{symbol:"WETH",address:"0xee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62",decimals:18,logoUrl:"https://katana.network/assets/weth-logo.svg"},publicRpcUrl:"https://rpc.katanarpc.com",logoUrl:"https://katana.network/assets/katana-logo.svg",explorer:"https://explorer.katana.garden",eip1559:!0},bera:{id:80094,name:"Bera",shortname:"bera",native:{address:Ee,symbol:"BERA",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/24647.png"},wToken:{symbol:"WBERA",address:"0x6969696969696969696969696969696969696969",decimals:18,logoUrl:"https://berascan.com/token/images/wrappedbera_ofc_64.png"},publicRpcUrl:"wss://rpc.berachain-apis.com",logoUrl:"https://katana.network/assets/katana-logo.svg",explorer:"https://berascan.com",eip1559:!0},monad:{id:143,name:"Monad",shortname:"monad",native:{address:Ee,symbol:"MONAD",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png"},wToken:{symbol:"WMON",address:"0x3bd359c1119da7da1d913d1c4d2b7c461115433a",decimals:18,logoUrl:"https://assets.coingecko.com/coins/images/70784/standard/wmon.png?1766028904"},publicRpcUrl:"https://monad-mainnet.drpc.org",logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/30495.png",explorer:"https://monad.network",eip1559:!0},optimism:{id:10,name:"Optimism",shortname:"optimism",native:{address:Ee,symbol:"ETH",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/11840.png"},wToken:{symbol:"WETH",address:"0x4200000000000000000000000000000000000006",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/2396.png"},publicRpcUrl:"https://optimism.blockscout.com",logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/11840.png",explorer:"https://optimistic.etherscan.io",eip1559:!0},mantle:{id:5e3,name:"Mantle",shortname:"mantle",native:{address:Ee,symbol:"MNT",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/27075.png"},wToken:{symbol:"WMNT",address:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",decimals:18,logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/27614.png"},publicRpcUrl:"https://rpc.mantle.xyz",logoUrl:"https://s2.coinmarketcap.com/static/img/coins/128x128/27075.png",explorer:"https://mantlescan.xyz",eip1559:!0}},Di={version:"2.3.3"},Jh="https://order-sink-dev.orbs.network",Yh="https://order-sink.orbs.network",e1="https://order-sink-v2.orbs.network",As=Di.version.split(".")[0],ad=e=>{const t=Number(As)>=2;return e?Jh:t?e1:Yh},Mi=300*1e3,_i=365*24*60*60*1e3,od=300*1e3,t1=new Date(Mi).getMinutes(),Ni=e=>`https://hub.orbs.network/api/private/project_cm7nb67z86nyr01z12gs0fxpf/subgraphs/orbs-twap-${e}/prod/gn`,kt="https://hub.orbs.network/api/apikey/subgraphs/id",n1={[Le.eth.id]:`${kt}/Bf7bvMYcJbDAvYWJmhMpHZ4cpFjqzkhK6GXXEpnPRq6`,[Le.bsc.id]:`${kt}/4NfXEi8rreQsnAr4aJ45RLCKgnjcWX46Lbt9SadiCcz6`,[Le.poly.id]:`${kt}/3PyRPWSvDnMowGbeBy7aNsvUkD5ZuxdXQw2RdJq4NdXi`,[Le.arb.id]:`${kt}/83bpQexEaqBjHaQbKoFTbtvCXuo5RudRkfLgtRUYqo2c`,[Le.base.id]:`${kt}/DFhaPQb3HATXkpsWNZw3gydYHehLBVEDiSk4iBdZJyps`,[Le.sei.id]:`${kt}/5zjzRnURzoddyFSZBw5E5NAM3oBgPq3NasTYbtMk6EL6`,[Le.linea.id]:`${kt}/6VsNPEYfFLPZCqdMMDadoXQjLHWJdjEwiD768GAtb7j6`,[Le.sonic.id]:`${kt}/DtBr6a5vsoDd2oAXdPszcn4gLgrr1XC68Q3AJQKXnNLV`,[Le.ftm.id]:`${kt}/DdRo1pmJkrJC9fjsjEBWnNE1uqrbh7Diz4tVKd7rfupp`,[Le.katana.id]:`${kt}/CGi9sDFMQcnBwF3C3NoCFqnaE34sssbgwPLTwiskSXmW`,[Le.avax.id]:`${kt}/FxZ1vMwE5Xy1qvKvZENUMz4vhW8Sh4vXJf9Vp7o17pTx`,[Le.bera.id]:Ni("berachain"),[Le.flare.id]:Ni("flare"),[Le.cronosZkEvm.id]:Ni("cronos-zkevm")},r1=["0x0000000000000000000000000000000000000000","0x0000000000000000000000000000000000001010","0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","0x000000000000000000000000000000000000dEaD","0x000000000000000000000000000000000000800A","0x000000000000000000000000000000000000800a"],Ri="115792089237316195423570985008687907853269984665640564039457584007913129639935",je=e=>`${e.name}_${e.chainId}`,s1={[je(oe.SushiArb)]:["0x846F2B29ef314bF3D667981b4ffdADc5B858312a","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[je(oe.SushiBase)]:["0x846F2B29ef314bF3D667981b4ffdADc5B858312a","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[je(oe.SushiEth)]:["0xc55943Fa6509004B2903ED8F8ab7347BfC47D0bA","0x08c41f5D1C844061f6D952E25827eeAA576c6536"],[je(oe.PancakeSwap)]:["0xb2BAFe188faD927240038cC4FfF2d771d8A58905","0xE2a0c3b9aD19A18c4bBa7fffBe5bC1b0E58Db1CE"],[je(oe.PancakeSwapArbitrum)]:["0xE20167871dB616DdfFD0Fd870d9bC068C350DD1F","0x807488ADAD033e95C438F998277bE654152594dc"],[je(oe.PancakeSwapBase)]:["0x10ed1F36e4eBE76E161c9AADDa20BE841bc0082c","0x3A9df3eE209b802D0337383f5abCe3204d623588"],[je(oe.PancakeSwapLinea)]:["0x3A9df3eE209b802D0337383f5abCe3204d623588"],[je(oe.QuickSwap)]:["0x26D0ec4Be402BCE03AAa8aAf0CF67e9428ba54eF"],[je(oe.Thena)]:["0xc2aBC02acd77Bb2407efA22348dA9afC8B375290"],[je(oe.Lynex)]:["0x72e3e1fD5D2Ee2F1C2Eb695206D490a1D45C3835"],[je(oe.DragonSwap)]:["0x101e1B65Bb516FB5f4547C80BAe0b51f1b8D7a22"],[je(oe.SpookySwapSonic)]:["0xAd97B770ad64aE47fc7d64B3bD820dCDbF9ff7DA"],[je(oe.SpookySwap)]:["0x3924d62219483015f982b160d48c0fa5Fd436Cba"],[je(oe.SwapX)]:["0xE5012eBDe5e26EE3Ea41992154731a03023CF274"]},a1={unit:Ge.Minutes,value:t1},id="RePermitWitnessTransferFrom",o1={RePermitWitnessTransferFrom:[{name:"permitted",type:"TokenPermissions"},{name:"spender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"witness",type:"Order"}],Exchange:[{name:"adapter",type:"address"},{name:"ref",type:"address"},{name:"share",type:"uint32"},{name:"data",type:"bytes"}],Input:[{name:"token",type:"address"},{name:"amount",type:"uint256"},{name:"maxAmount",type:"uint256"}],Order:[{name:"reactor",type:"address"},{name:"executor",type:"address"},{name:"exchange",type:"Exchange"},{name:"swapper",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"chainid",type:"uint256"},{name:"exclusivity",type:"uint32"},{name:"epoch",type:"uint32"},{name:"slippage",type:"uint32"},{name:"freshness",type:"uint32"},{name:"input",type:"Input"},{name:"output",type:"Output"}],Output:[{name:"token",type:"address"},{name:"limit",type:"uint256"},{name:"stop",type:"uint256"},{name:"recipient",type:"address"}],TokenPermissions:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]},i1={RePermitWitnessTransferFrom:[{name:"permitted",type:"TokenPermissions"},{name:"spender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"},{name:"witness",type:"Order"}],Exchange:[{name:"adapter",type:"address"},{name:"ref",type:"address"},{name:"share",type:"uint32"},{name:"data",type:"bytes"}],Input:[{name:"token",type:"address"},{name:"amount",type:"uint256"},{name:"maxAmount",type:"uint256"}],Order:[{name:"reactor",type:"address"},{name:"executor",type:"address"},{name:"exchange",type:"Exchange"},{name:"swapper",type:"address"},{name:"nonce",type:"uint256"},{name:"start",type:"uint256"},{name:"deadline",type:"uint256"},{name:"chainid",type:"uint256"},{name:"exclusivity",type:"uint32"},{name:"epoch",type:"uint32"},{name:"slippage",type:"uint32"},{name:"freshness",type:"uint32"},{name:"input",type:"Input"},{name:"output",type:"Output"}],Output:[{name:"token",type:"address"},{name:"limit",type:"uint256"},{name:"triggerLower",type:"uint256"},{name:"triggerUpper",type:"uint256"},{name:"recipient",type:"address"}],TokenPermissions:[{name:"token",type:"address"},{name:"amount",type:"uint256"}]},cd="https://www.orbs.com/dtwap-and-dlimit-faq/",c1="https://www.orbs.com/dtwap-and-dlimit-faq/#dSLTP",l1="https://raw.githubusercontent.com/orbs-network/twap-ui/master/logo/orbslogo.svg",u1="https://www.orbs.com/",d1="https://www.orbs.com/dtwap-dlimit-disclaimer";var Ts=(e=>(e.FRESHNESS="freshness",e.MIN_CHUNK_SIZE_USD="minChunkSizeUsd",e.ENV="env",e.DURATION="duration",e.IGNORE_ERRORS="ignore-errors",e))(Ts||{});const p1="-5",f1="10",m1="-10",h1="5";var b1=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,zi=Math.ceil,ht=Math.floor,Xe="[BigNumber Error] ",ld=Xe+"Number primitive has more than 15 significant digits: ",Ct=1e14,ne=14,Li=9007199254740991,$i=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],gn=1e7,De=1e9;function ud(e){var t,n,r,s=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,i=4,c=-7,l=21,d=-1e7,p=1e7,f=!1,m=1,y=0,g={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},P="0123456789abcdefghijklmnopqrstuvwxyz",B=!0;function v(h,b){var x,C,E,T,O,w,A,F,S=this;if(!(S instanceof v))return new v(h,b);if(b==null){if(h&&h._isBigNumber===!0){S.s=h.s,!h.c||h.e>p?S.c=S.e=null:h.e<d?S.c=[S.e=0]:(S.e=h.e,S.c=h.c.slice());return}if((w=typeof h=="number")&&h*0==0){if(S.s=1/h<0?(h=-h,-1):1,h===~~h){for(T=0,O=h;O>=10;O/=10,T++);T>p?S.c=S.e=null:(S.e=T,S.c=[h]);return}F=String(h)}else{if(!b1.test(F=String(h)))return r(S,F,w);S.s=F.charCodeAt(0)==45?(F=F.slice(1),-1):1}(T=F.indexOf("."))>-1&&(F=F.replace(".","")),(O=F.search(/e/i))>0?(T<0&&(T=O),T+=+F.slice(O+1),F=F.substring(0,O)):T<0&&(T=F.length)}else{if(ge(b,2,P.length,"Base"),b==10&&B)return S=new v(h),N(S,o+S.e+1,i);if(F=String(h),w=typeof h=="number"){if(h*0!=0)return r(S,F,w,b);if(S.s=1/h<0?(F=F.slice(1),-1):1,v.DEBUG&&F.replace(/^0\.0*|\./,"").length>15)throw Error(ld+h)}else S.s=F.charCodeAt(0)===45?(F=F.slice(1),-1):1;for(x=P.slice(0,b),T=O=0,A=F.length;O<A;O++)if(x.indexOf(C=F.charAt(O))<0){if(C=="."){if(O>T){T=A;continue}}else if(!E&&(F==F.toUpperCase()&&(F=F.toLowerCase())||F==F.toLowerCase()&&(F=F.toUpperCase()))){E=!0,O=-1,T=0;continue}return r(S,String(h),w,b)}w=!1,F=n(F,b,10,S.s),(T=F.indexOf("."))>-1?F=F.replace(".",""):T=F.length}for(O=0;F.charCodeAt(O)===48;O++);for(A=F.length;F.charCodeAt(--A)===48;);if(F=F.slice(O,++A)){if(A-=O,w&&v.DEBUG&&A>15&&(h>Li||h!==ht(h)))throw Error(ld+S.s*h);if((T=T-O-1)>p)S.c=S.e=null;else if(T<d)S.c=[S.e=0];else{if(S.e=T,S.c=[],O=(T+1)%ne,T<0&&(O+=ne),O<A){for(O&&S.c.push(+F.slice(0,O)),A-=ne;O<A;)S.c.push(+F.slice(O,O+=ne));O=ne-(F=F.slice(O)).length}else O-=A;for(;O--;F+="0");S.c.push(+F)}}else S.c=[S.e=0]}v.clone=ud,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(h){var b,x;if(h!=null)if(typeof h=="object"){if(h.hasOwnProperty(b="DECIMAL_PLACES")&&(x=h[b],ge(x,0,De,b),o=x),h.hasOwnProperty(b="ROUNDING_MODE")&&(x=h[b],ge(x,0,8,b),i=x),h.hasOwnProperty(b="EXPONENTIAL_AT")&&(x=h[b],x&&x.pop?(ge(x[0],-De,0,b),ge(x[1],0,De,b),c=x[0],l=x[1]):(ge(x,-De,De,b),c=-(l=x<0?-x:x))),h.hasOwnProperty(b="RANGE"))if(x=h[b],x&&x.pop)ge(x[0],-De,-1,b),ge(x[1],1,De,b),d=x[0],p=x[1];else if(ge(x,-De,De,b),x)d=-(p=x<0?-x:x);else throw Error(Xe+b+" cannot be zero: "+x);if(h.hasOwnProperty(b="CRYPTO"))if(x=h[b],x===!!x)if(x)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=x;else throw f=!x,Error(Xe+"crypto unavailable");else f=x;else throw Error(Xe+b+" not true or false: "+x);if(h.hasOwnProperty(b="MODULO_MODE")&&(x=h[b],ge(x,0,9,b),m=x),h.hasOwnProperty(b="POW_PRECISION")&&(x=h[b],ge(x,0,De,b),y=x),h.hasOwnProperty(b="FORMAT"))if(x=h[b],typeof x=="object")g=x;else throw Error(Xe+b+" not an object: "+x);if(h.hasOwnProperty(b="ALPHABET"))if(x=h[b],typeof x=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(x))B=x.slice(0,10)=="0123456789",P=x;else throw Error(Xe+b+" invalid: "+x)}else throw Error(Xe+"Object expected: "+h);return{DECIMAL_PLACES:o,ROUNDING_MODE:i,EXPONENTIAL_AT:[c,l],RANGE:[d,p],CRYPTO:f,MODULO_MODE:m,POW_PRECISION:y,FORMAT:g,ALPHABET:P}},v.isBigNumber=function(h){if(!h||h._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var b,x,C=h.c,E=h.e,T=h.s;e:if({}.toString.call(C)=="[object Array]"){if((T===1||T===-1)&&E>=-De&&E<=De&&E===ht(E)){if(C[0]===0){if(E===0&&C.length===1)return!0;break e}if(b=(E+1)%ne,b<1&&(b+=ne),String(C[0]).length==b){for(b=0;b<C.length;b++)if(x=C[b],x<0||x>=Ct||x!==ht(x))break e;if(x!==0)return!0}}}else if(C===null&&E===null&&(T===null||T===1||T===-1))return!0;throw Error(Xe+"Invalid BigNumber: "+h)},v.maximum=v.max=function(){return k(arguments,-1)},v.minimum=v.min=function(){return k(arguments,1)},v.random=(function(){var h=9007199254740992,b=Math.random()*h&2097151?function(){return ht(Math.random()*h)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(x){var C,E,T,O,w,A=0,F=[],S=new v(a);if(x==null?x=o:ge(x,0,De),O=zi(x/ne),f)if(crypto.getRandomValues){for(C=crypto.getRandomValues(new Uint32Array(O*=2));A<O;)w=C[A]*131072+(C[A+1]>>>11),w>=9e15?(E=crypto.getRandomValues(new Uint32Array(2)),C[A]=E[0],C[A+1]=E[1]):(F.push(w%1e14),A+=2);A=O/2}else if(crypto.randomBytes){for(C=crypto.randomBytes(O*=7);A<O;)w=(C[A]&31)*281474976710656+C[A+1]*1099511627776+C[A+2]*4294967296+C[A+3]*16777216+(C[A+4]<<16)+(C[A+5]<<8)+C[A+6],w>=9e15?crypto.randomBytes(7).copy(C,A):(F.push(w%1e14),A+=7);A=O/7}else throw f=!1,Error(Xe+"crypto unavailable");if(!f)for(;A<O;)w=b(),w<9e15&&(F[A++]=w%1e14);for(O=F[--A],x%=ne,O&&x&&(w=$i[ne-x],F[A]=ht(O/w)*w);F[A]===0;F.pop(),A--);if(A<0)F=[T=0];else{for(T=-1;F[0]===0;F.splice(0,1),T-=ne);for(A=1,w=F[0];w>=10;w/=10,A++);A<ne&&(T-=ne-A)}return S.e=T,S.c=F,S}})(),v.sum=function(){for(var h=1,b=arguments,x=new v(b[0]);h<b.length;)x=x.plus(b[h++]);return x},n=(function(){var h="0123456789";function b(x,C,E,T){for(var O,w=[0],A,F=0,S=x.length;F<S;){for(A=w.length;A--;w[A]*=C);for(w[0]+=T.indexOf(x.charAt(F++)),O=0;O<w.length;O++)w[O]>E-1&&(w[O+1]==null&&(w[O+1]=0),w[O+1]+=w[O]/E|0,w[O]%=E)}return w.reverse()}return function(x,C,E,T,O){var w,A,F,S,M,$,q,J,ie=x.indexOf("."),le=o,Y=i;for(ie>=0&&(S=y,y=0,x=x.replace(".",""),J=new v(C),$=J.pow(x.length-ie),y=S,J.c=b(Xt(yt($.c),$.e,"0"),10,E,h),J.e=J.c.length),q=b(x,C,E,O?(w=P,h):(w=h,P)),F=S=q.length;q[--S]==0;q.pop());if(!q[0])return w.charAt(0);if(ie<0?--F:($.c=q,$.e=F,$.s=T,$=t($,J,le,Y,E),q=$.c,M=$.r,F=$.e),A=F+le+1,ie=q[A],S=E/2,M=M||A<0||q[A+1]!=null,M=Y<4?(ie!=null||M)&&(Y==0||Y==($.s<0?3:2)):ie>S||ie==S&&(Y==4||M||Y==6&&q[A-1]&1||Y==($.s<0?8:7)),A<1||!q[0])x=M?Xt(w.charAt(1),-le,w.charAt(0)):w.charAt(0);else{if(q.length=A,M)for(--E;++q[--A]>E;)q[A]=0,A||(++F,q=[1].concat(q));for(S=q.length;!q[--S];);for(ie=0,x="";ie<=S;x+=w.charAt(q[ie++]));x=Xt(x,F,w.charAt(0))}return x}})(),t=(function(){function h(C,E,T){var O,w,A,F,S=0,M=C.length,$=E%gn,q=E/gn|0;for(C=C.slice();M--;)A=C[M]%gn,F=C[M]/gn|0,O=q*A+F*$,w=$*A+O%gn*gn+S,S=(w/T|0)+(O/gn|0)+q*F,C[M]=w%T;return S&&(C=[S].concat(C)),C}function b(C,E,T,O){var w,A;if(T!=O)A=T>O?1:-1;else for(w=A=0;w<T;w++)if(C[w]!=E[w]){A=C[w]>E[w]?1:-1;break}return A}function x(C,E,T,O){for(var w=0;T--;)C[T]-=w,w=C[T]<E[T]?1:0,C[T]=w*O+C[T]-E[T];for(;!C[0]&&C.length>1;C.splice(0,1));}return function(C,E,T,O,w){var A,F,S,M,$,q,J,ie,le,Y,ee,ye,$n,_t,Wt,st,Nt,Ue=C.s==E.s?1:-1,Pe=C.c,me=E.c;if(!Pe||!Pe[0]||!me||!me[0])return new v(!C.s||!E.s||(Pe?me&&Pe[0]==me[0]:!me)?NaN:Pe&&Pe[0]==0||!me?Ue*0:Ue/0);for(ie=new v(Ue),le=ie.c=[],F=C.e-E.e,Ue=T+F+1,w||(w=Ct,F=bt(C.e/ne)-bt(E.e/ne),Ue=Ue/ne|0),S=0;me[S]==(Pe[S]||0);S++);if(me[S]>(Pe[S]||0)&&F--,Ue<0)le.push(1),M=!0;else{for(_t=Pe.length,st=me.length,S=0,Ue+=2,$=ht(w/(me[0]+1)),$>1&&(me=h(me,$,w),Pe=h(Pe,$,w),st=me.length,_t=Pe.length),$n=st,Y=Pe.slice(0,st),ee=Y.length;ee<st;Y[ee++]=0);Nt=me.slice(),Nt=[0].concat(Nt),Wt=me[0],me[1]>=w/2&&Wt++;do{if($=0,A=b(me,Y,st,ee),A<0){if(ye=Y[0],st!=ee&&(ye=ye*w+(Y[1]||0)),$=ht(ye/Wt),$>1)for($>=w&&($=w-1),q=h(me,$,w),J=q.length,ee=Y.length;b(q,Y,J,ee)==1;)$--,x(q,st<J?Nt:me,J,w),J=q.length,A=1;else $==0&&(A=$=1),q=me.slice(),J=q.length;if(J<ee&&(q=[0].concat(q)),x(Y,q,ee,w),ee=Y.length,A==-1)for(;b(me,Y,st,ee)<1;)$++,x(Y,st<ee?Nt:me,ee,w),ee=Y.length}else A===0&&($++,Y=[0]);le[S++]=$,Y[0]?Y[ee++]=Pe[$n]||0:(Y=[Pe[$n]],ee=1)}while(($n++<_t||Y[0]!=null)&&Ue--);M=Y[0]!=null,le[0]||le.splice(0,1)}if(w==Ct){for(S=1,Ue=le[0];Ue>=10;Ue/=10,S++);N(ie,T+(ie.e=S+F*ne-1)+1,O,M)}else ie.e=F,ie.r=+M;return ie}})();function U(h,b,x,C){var E,T,O,w,A;if(x==null?x=i:ge(x,0,8),!h.c)return h.toString();if(E=h.c[0],O=h.e,b==null)A=yt(h.c),A=C==1||C==2&&(O<=c||O>=l)?Xa(A,O):Xt(A,O,"0");else if(h=N(new v(h),b,x),T=h.e,A=yt(h.c),w=A.length,C==1||C==2&&(b<=T||T<=c)){for(;w<b;A+="0",w++);A=Xa(A,T)}else if(b-=O+(C===2&&T>O),A=Xt(A,T,"0"),T+1>w){if(--b>0)for(A+=".";b--;A+="0");}else if(b+=T-w,b>0)for(T+1==w&&(A+=".");b--;A+="0");return h.s<0&&E?"-"+A:A}function k(h,b){for(var x,C,E=1,T=new v(h[0]);E<h.length;E++)C=new v(h[E]),(!C.s||(x=Gn(T,C))===b||x===0&&T.s===b)&&(T=C);return T}function D(h,b,x){for(var C=1,E=b.length;!b[--E];b.pop());for(E=b[0];E>=10;E/=10,C++);return(x=C+x*ne-1)>p?h.c=h.e=null:x<d?h.c=[h.e=0]:(h.e=x,h.c=b),h}r=(function(){var h=/^(-?)0([xbo])(?=\w[\w.]*$)/i,b=/^([^.]+)\.$/,x=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,E=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(T,O,w,A){var F,S=w?O:O.replace(E,"");if(C.test(S))T.s=isNaN(S)?null:S<0?-1:1;else{if(!w&&(S=S.replace(h,function(M,$,q){return F=(q=q.toLowerCase())=="x"?16:q=="b"?2:8,!A||A==F?$:M}),A&&(F=A,S=S.replace(b,"$1").replace(x,"0.$1")),O!=S))return new v(S,F);if(v.DEBUG)throw Error(Xe+"Not a"+(A?" base "+A:"")+" number: "+O);T.s=null}T.c=T.e=null}})();function N(h,b,x,C){var E,T,O,w,A,F,S,M=h.c,$=$i;if(M){e:{for(E=1,w=M[0];w>=10;w/=10,E++);if(T=b-E,T<0)T+=ne,O=b,A=M[F=0],S=ht(A/$[E-O-1]%10);else if(F=zi((T+1)/ne),F>=M.length)if(C){for(;M.length<=F;M.push(0));A=S=0,E=1,T%=ne,O=T-ne+1}else break e;else{for(A=w=M[F],E=1;w>=10;w/=10,E++);T%=ne,O=T-ne+E,S=O<0?0:ht(A/$[E-O-1]%10)}if(C=C||b<0||M[F+1]!=null||(O<0?A:A%$[E-O-1]),C=x<4?(S||C)&&(x==0||x==(h.s<0?3:2)):S>5||S==5&&(x==4||C||x==6&&(T>0?O>0?A/$[E-O]:0:M[F-1])%10&1||x==(h.s<0?8:7)),b<1||!M[0])return M.length=0,C?(b-=h.e+1,M[0]=$[(ne-b%ne)%ne],h.e=-b||0):M[0]=h.e=0,h;if(T==0?(M.length=F,w=1,F--):(M.length=F+1,w=$[ne-T],M[F]=O>0?ht(A/$[E-O]%$[O])*w:0),C)for(;;)if(F==0){for(T=1,O=M[0];O>=10;O/=10,T++);for(O=M[0]+=w,w=1;O>=10;O/=10,w++);T!=w&&(h.e++,M[0]==Ct&&(M[0]=1));break}else{if(M[F]+=w,M[F]!=Ct)break;M[F--]=0,w=1}for(T=M.length;M[--T]===0;M.pop());}h.e>p?h.c=h.e=null:h.e<d&&(h.c=[h.e=0])}return h}function _(h){var b,x=h.e;return x===null?h.toString():(b=yt(h.c),b=x<=c||x>=l?Xa(b,x):Xt(b,x,"0"),h.s<0?"-"+b:b)}return s.absoluteValue=s.abs=function(){var h=new v(this);return h.s<0&&(h.s=1),h},s.comparedTo=function(h,b){return Gn(this,new v(h,b))},s.decimalPlaces=s.dp=function(h,b){var x,C,E,T=this;if(h!=null)return ge(h,0,De),b==null?b=i:ge(b,0,8),N(new v(T),h+T.e+1,b);if(!(x=T.c))return null;if(C=((E=x.length-1)-bt(this.e/ne))*ne,E=x[E])for(;E%10==0;E/=10,C--);return C<0&&(C=0),C},s.dividedBy=s.div=function(h,b){return t(this,new v(h,b),o,i)},s.dividedToIntegerBy=s.idiv=function(h,b){return t(this,new v(h,b),0,1)},s.exponentiatedBy=s.pow=function(h,b){var x,C,E,T,O,w,A,F,S,M=this;if(h=new v(h),h.c&&!h.isInteger())throw Error(Xe+"Exponent not an integer: "+_(h));if(b!=null&&(b=new v(b)),w=h.e>14,!M.c||!M.c[0]||M.c[0]==1&&!M.e&&M.c.length==1||!h.c||!h.c[0])return S=new v(Math.pow(+_(M),w?h.s*(2-Wa(h)):+_(h))),b?S.mod(b):S;if(A=h.s<0,b){if(b.c?!b.c[0]:!b.s)return new v(NaN);C=!A&&M.isInteger()&&b.isInteger(),C&&(M=M.mod(b))}else{if(h.e>9&&(M.e>0||M.e<-1||(M.e==0?M.c[0]>1||w&&M.c[1]>=24e7:M.c[0]<8e13||w&&M.c[0]<=9999975e7)))return T=M.s<0&&Wa(h)?-0:0,M.e>-1&&(T=1/T),new v(A?1/T:T);y&&(T=zi(y/ne+2))}for(w?(x=new v(.5),A&&(h.s=1),F=Wa(h)):(E=Math.abs(+_(h)),F=E%2),S=new v(a);;){if(F){if(S=S.times(M),!S.c)break;T?S.c.length>T&&(S.c.length=T):C&&(S=S.mod(b))}if(E){if(E=ht(E/2),E===0)break;F=E%2}else if(h=h.times(x),N(h,h.e+1,1),h.e>14)F=Wa(h);else{if(E=+_(h),E===0)break;F=E%2}M=M.times(M),T?M.c&&M.c.length>T&&(M.c.length=T):C&&(M=M.mod(b))}return C?S:(A&&(S=a.div(S)),b?S.mod(b):T?N(S,y,i,O):S)},s.integerValue=function(h){var b=new v(this);return h==null?h=i:ge(h,0,8),N(b,b.e+1,h)},s.isEqualTo=s.eq=function(h,b){return Gn(this,new v(h,b))===0},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(h,b){return Gn(this,new v(h,b))>0},s.isGreaterThanOrEqualTo=s.gte=function(h,b){return(b=Gn(this,new v(h,b)))===1||b===0},s.isInteger=function(){return!!this.c&&bt(this.e/ne)>this.c.length-2},s.isLessThan=s.lt=function(h,b){return Gn(this,new v(h,b))<0},s.isLessThanOrEqualTo=s.lte=function(h,b){return(b=Gn(this,new v(h,b)))===-1||b===0},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&this.c[0]==0},s.minus=function(h,b){var x,C,E,T,O=this,w=O.s;if(h=new v(h,b),b=h.s,!w||!b)return new v(NaN);if(w!=b)return h.s=-b,O.plus(h);var A=O.e/ne,F=h.e/ne,S=O.c,M=h.c;if(!A||!F){if(!S||!M)return S?(h.s=-b,h):new v(M?O:NaN);if(!S[0]||!M[0])return M[0]?(h.s=-b,h):new v(S[0]?O:i==3?-0:0)}if(A=bt(A),F=bt(F),S=S.slice(),w=A-F){for((T=w<0)?(w=-w,E=S):(F=A,E=M),E.reverse(),b=w;b--;E.push(0));E.reverse()}else for(C=(T=(w=S.length)<(b=M.length))?w:b,w=b=0;b<C;b++)if(S[b]!=M[b]){T=S[b]<M[b];break}if(T&&(E=S,S=M,M=E,h.s=-h.s),b=(C=M.length)-(x=S.length),b>0)for(;b--;S[x++]=0);for(b=Ct-1;C>w;){if(S[--C]<M[C]){for(x=C;x&&!S[--x];S[x]=b);--S[x],S[C]+=Ct}S[C]-=M[C]}for(;S[0]==0;S.splice(0,1),--F);return S[0]?D(h,S,F):(h.s=i==3?-1:1,h.c=[h.e=0],h)},s.modulo=s.mod=function(h,b){var x,C,E=this;return h=new v(h,b),!E.c||!h.s||h.c&&!h.c[0]?new v(NaN):!h.c||E.c&&!E.c[0]?new v(E):(m==9?(C=h.s,h.s=1,x=t(E,h,0,3),h.s=C,x.s*=C):x=t(E,h,0,m),h=E.minus(x.times(h)),!h.c[0]&&m==1&&(h.s=E.s),h)},s.multipliedBy=s.times=function(h,b){var x,C,E,T,O,w,A,F,S,M,$,q,J,ie,le,Y=this,ee=Y.c,ye=(h=new v(h,b)).c;if(!ee||!ye||!ee[0]||!ye[0])return!Y.s||!h.s||ee&&!ee[0]&&!ye||ye&&!ye[0]&&!ee?h.c=h.e=h.s=null:(h.s*=Y.s,!ee||!ye?h.c=h.e=null:(h.c=[0],h.e=0)),h;for(C=bt(Y.e/ne)+bt(h.e/ne),h.s*=Y.s,A=ee.length,M=ye.length,A<M&&(J=ee,ee=ye,ye=J,E=A,A=M,M=E),E=A+M,J=[];E--;J.push(0));for(ie=Ct,le=gn,E=M;--E>=0;){for(x=0,$=ye[E]%le,q=ye[E]/le|0,O=A,T=E+O;T>E;)F=ee[--O]%le,S=ee[O]/le|0,w=q*F+S*$,F=$*F+w%le*le+J[T]+x,x=(F/ie|0)+(w/le|0)+q*S,J[T--]=F%ie;J[T]=x}return x?++C:J.splice(0,1),D(h,J,C)},s.negated=function(){var h=new v(this);return h.s=-h.s||null,h},s.plus=function(h,b){var x,C=this,E=C.s;if(h=new v(h,b),b=h.s,!E||!b)return new v(NaN);if(E!=b)return h.s=-b,C.minus(h);var T=C.e/ne,O=h.e/ne,w=C.c,A=h.c;if(!T||!O){if(!w||!A)return new v(E/0);if(!w[0]||!A[0])return A[0]?h:new v(w[0]?C:E*0)}if(T=bt(T),O=bt(O),w=w.slice(),E=T-O){for(E>0?(O=T,x=A):(E=-E,x=w),x.reverse();E--;x.push(0));x.reverse()}for(E=w.length,b=A.length,E-b<0&&(x=A,A=w,w=x,b=E),E=0;b;)E=(w[--b]=w[b]+A[b]+E)/Ct|0,w[b]=Ct===w[b]?0:w[b]%Ct;return E&&(w=[E].concat(w),++O),D(h,w,O)},s.precision=s.sd=function(h,b){var x,C,E,T=this;if(h!=null&&h!==!!h)return ge(h,1,De),b==null?b=i:ge(b,0,8),N(new v(T),h,b);if(!(x=T.c))return null;if(E=x.length-1,C=E*ne+1,E=x[E]){for(;E%10==0;E/=10,C--);for(E=x[0];E>=10;E/=10,C++);}return h&&T.e+1>C&&(C=T.e+1),C},s.shiftedBy=function(h){return ge(h,-Li,Li),this.times("1e"+h)},s.squareRoot=s.sqrt=function(){var h,b,x,C,E,T=this,O=T.c,w=T.s,A=T.e,F=o+4,S=new v("0.5");if(w!==1||!O||!O[0])return new v(!w||w<0&&(!O||O[0])?NaN:O?T:1/0);if(w=Math.sqrt(+_(T)),w==0||w==1/0?(b=yt(O),(b.length+A)%2==0&&(b+="0"),w=Math.sqrt(+b),A=bt((A+1)/2)-(A<0||A%2),w==1/0?b="5e"+A:(b=w.toExponential(),b=b.slice(0,b.indexOf("e")+1)+A),x=new v(b)):x=new v(w+""),x.c[0]){for(A=x.e,w=A+F,w<3&&(w=0);;)if(E=x,x=S.times(E.plus(t(T,E,F,1))),yt(E.c).slice(0,w)===(b=yt(x.c)).slice(0,w))if(x.e<A&&--w,b=b.slice(w-3,w+1),b=="9999"||!C&&b=="4999"){if(!C&&(N(E,E.e+o+2,0),E.times(E).eq(T))){x=E;break}F+=4,w+=4,C=1}else{(!+b||!+b.slice(1)&&b.charAt(0)=="5")&&(N(x,x.e+o+2,1),h=!x.times(x).eq(T));break}}return N(x,x.e+o+1,i,h)},s.toExponential=function(h,b){return h!=null&&(ge(h,0,De),h++),U(this,h,b,1)},s.toFixed=function(h,b){return h!=null&&(ge(h,0,De),h=h+this.e+1),U(this,h,b)},s.toFormat=function(h,b,x){var C,E=this;if(x==null)h!=null&&b&&typeof b=="object"?(x=b,b=null):h&&typeof h=="object"?(x=h,h=b=null):x=g;else if(typeof x!="object")throw Error(Xe+"Argument not an object: "+x);if(C=E.toFixed(h,b),E.c){var T,O=C.split("."),w=+x.groupSize,A=+x.secondaryGroupSize,F=x.groupSeparator||"",S=O[0],M=O[1],$=E.s<0,q=$?S.slice(1):S,J=q.length;if(A&&(T=w,w=A,A=T,J-=T),w>0&&J>0){for(T=J%w||w,S=q.substr(0,T);T<J;T+=w)S+=F+q.substr(T,w);A>0&&(S+=F+q.slice(T)),$&&(S="-"+S)}C=M?S+(x.decimalSeparator||"")+((A=+x.fractionGroupSize)?M.replace(new RegExp("\\d{"+A+"}\\B","g"),"$&"+(x.fractionGroupSeparator||"")):M):S}return(x.prefix||"")+C+(x.suffix||"")},s.toFraction=function(h){var b,x,C,E,T,O,w,A,F,S,M,$,q=this,J=q.c;if(h!=null&&(w=new v(h),!w.isInteger()&&(w.c||w.s!==1)||w.lt(a)))throw Error(Xe+"Argument "+(w.isInteger()?"out of range: ":"not an integer: ")+_(w));if(!J)return new v(q);for(b=new v(a),F=x=new v(a),C=A=new v(a),$=yt(J),T=b.e=$.length-q.e-1,b.c[0]=$i[(O=T%ne)<0?ne+O:O],h=!h||w.comparedTo(b)>0?T>0?b:F:w,O=p,p=1/0,w=new v($),A.c[0]=0;S=t(w,b,0,1),E=x.plus(S.times(C)),E.comparedTo(h)!=1;)x=C,C=E,F=A.plus(S.times(E=F)),A=E,b=w.minus(S.times(E=b)),w=E;return E=t(h.minus(x),C,0,1),A=A.plus(E.times(F)),x=x.plus(E.times(C)),A.s=F.s=q.s,T=T*2,M=t(F,C,T,i).minus(q).abs().comparedTo(t(A,x,T,i).minus(q).abs())<1?[F,C]:[A,x],p=O,M},s.toNumber=function(){return+_(this)},s.toPrecision=function(h,b){return h!=null&&ge(h,1,De),U(this,h,b,2)},s.toString=function(h){var b,x=this,C=x.s,E=x.e;return E===null?C?(b="Infinity",C<0&&(b="-"+b)):b="NaN":(h==null?b=E<=c||E>=l?Xa(yt(x.c),E):Xt(yt(x.c),E,"0"):h===10&&B?(x=N(new v(x),o+E+1,i),b=Xt(yt(x.c),x.e,"0")):(ge(h,2,P.length,"Base"),b=n(Xt(yt(x.c),E,"0"),10,h,C,!0)),C<0&&x.c[0]&&(b="-"+b)),b},s.valueOf=s.toJSON=function(){return _(this)},s._isBigNumber=!0,s[Symbol.toStringTag]="BigNumber",s[Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,e!=null&&v.set(e),v}function bt(e){var t=e|0;return e>0||e===t?t:t-1}function yt(e){for(var t,n,r=1,s=e.length,a=e[0]+"";r<s;){for(t=e[r++]+"",n=ne-t.length;n--;t="0"+t);a+=t}for(s=a.length;a.charCodeAt(--s)===48;);return a.slice(0,s+1||1)}function Gn(e,t){var n,r,s=e.c,a=t.c,o=e.s,i=t.s,c=e.e,l=t.e;if(!o||!i)return null;if(n=s&&!s[0],r=a&&!a[0],n||r)return n?r?0:-i:o;if(o!=i)return o;if(n=o<0,r=c==l,!s||!a)return r?0:!s^n?1:-1;if(!r)return c>l^n?1:-1;for(i=(c=s.length)<(l=a.length)?c:l,o=0;o<i;o++)if(s[o]!=a[o])return s[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function ge(e,t,n,r){if(e<t||e>n||e!==ht(e))throw Error(Xe+(r||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Wa(e){var t=e.c.length-1;return bt(e.e/ne)==t&&e.c[t]%2!=0}function Xa(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Xt(e,t,n){var r,s;if(t<0){for(s=n+".";++t;s+=n);e=s+e}else if(r=e.length,++t>r){for(s=n,t-=r;--t;s+=n);e+=s}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var z=ud();function y1(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const x1={1:{dex:{agent:{type:"default:odos-v2",router:"0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559",adapter:"0xC1bB4d5071Fe7109ae2D67AE05826A3fe9116cfc",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},sushiswap:{type:"default:sushi",router:"0xAC4c6e212A361c968F1725b4d055b47E63F80b75",adapter:"0x2e43A28FAf083717CcD9B246d97C61E1Bc9914Df",fee:"0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc"}}},10:{dex:{agent:{type:"default:odos-v2",router:"0xCa423977156BB05b13A2BA3b76Bc5419E2fE9680",adapter:"0xC5Aea83Fdd94A19fB2ce0B7207939C52825D3D3B",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"}}},14:{dex:{spark:{type:"default:spark",router:"0x0f3D8a38D4c74afBebc2c42695642f0e3acb15D3",adapter:"0x00c7617C471Ef69124464CEc318a3b8CC90aE9A7",fee:"0xaeA8C3e1a129A77686E115b1a46D9aD8405F7D2b"}}},56:{dex:{agent:{type:"default:odos-v2",router:"0x89b8AA89FDd0507a99d334CBe3C808fAFC7d850E",adapter:"0x67Feba015c968c76cCB2EEabf197b4578640BE2C",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},thena:{type:"default:odos-v2",router:"0x89b8AA89FDd0507a99d334CBe3C808fAFC7d850E",adapter:"0x9E61dEabe996236814c28eC69ab2A7405cB6f03E",fee:"0x15eBc8b5b3877512FFF23650188694A9a8891FAc"},pancake:{type:"p2:pancakeswap-v2",router:"0xd9C500DfF816a1Da21A48A732d3498Bf09dc9AEB",permit2:"0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768",adapter:"0x52Ed96B1AEd25818B6A284b063b055488E012b73",fee:"0x37A957f10F458e0d7fDECBE2917971b57F15c927"},newera:{type:"default:odos-v2",router:"0x89b8AA89FDd0507a99d334CBe3C808fAFC7d850E",adapter:"0x6236a466CE5c368DC6686d69cAcf5561196B76ef",fee:"0x4E7454909eB6D539111D56b50d68897E933D2d11"}}},137:{dex:{agent:{type:"default:odos-v2",router:"0x4E3288c9ca110bCC82bf38F09A7b425c095d92Bf",adapter:"0x75A3d70Fa6d054d31C896b9Cf8AB06b1c1B829B8",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},quick:{type:"paraswap:paraswap-v5",router:"0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57",adapter:"0x727e1CbA41Ff1ff11C32fa43DAb499b4317A1b65",fee:"0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f"},teafi:{type:"paraswap:paraswap-v5",router:"0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57",adapter:"0xF710D67C783D2C14671EC1c61B0683DCb996F5c3",fee:"0x04Ff96e2c4D62b5771795d307AD679a25b3D2D50"}}},143:{dex:{yowie:{type:"default:openocean-v2",router:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",adapter:"0xCA84Ab5a5A5bf2cff6AC0C835eF049365D13c6cB",fee:"0x6AF3eE77A3A3257777F5649aFa611b4C7Fd975Ef"},pangolin:{type:"default:kyber-v2",router:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",adapter:"0xf42106eBf985bF49b39eba0114F57FA05e7B52eD",fee:"0xde92da99D188Ceb54A11ec711EF52D808A6260B5"}}},146:{dex:{agent:{type:"default:odos-v2",router:"0xaC041Df48dF9791B0654f1Dbbf2CC8450C5f2e9D",adapter:"0x58fD209C81D84739BaD9c72C082350d67E713EEa",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},spooky:{type:"default:magpie-v3",router:"0xc325856e5585823aaC0D1Fd46c35c608D95E65A9",adapter:"0x56083Eb47d4d7d520F4d2b4a0DC98BE56bb98068",fee:"0x840Df4684B35BC68BcdA3F6707A3c82A0D662f8b"},swapx:{type:"default:openocean-v2",router:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",adapter:"0xa7AE3ABf86C81cCEFEd6bE77045F2a32660c1B1c",fee:"0x6E03f7BC0f141894612AA017796096399623895F"},shadow:{type:"default:magpie-v3",router:"0xc325856e5585823aaC0D1Fd46c35c608D95E65A9",adapter:"0x1adEE94aBa11F19981130F77a1B2620b67e4409A",fee:"0xb9e3751fAF3187E1bC468E56a707a8A91754460e"}}},1329:{dex:{dragon:{type:"default:dragon",router:"0x11DA6463D6Cb5a03411Dbf5ab6f6bc3997Ac7428",adapter:"0x1e84A9f30607959d2d8b1a04171ef7D9522Ef502",fee:"0x0dc1E0525202b32e89bA78ed55b1e5cEdB751334"},nami:{type:"default:openocean-v2",router:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",adapter:"0xba56F9A7865d430c8293851D576b5728Ca711ff5",fee:"0xeB58450e23632003f013568703F54446070E2E80"}}},5e3:{dex:{agent:{type:"default:odos-v2",router:"0xD9F4e85489aDCD0bAF0Cd63b4231c6af58c26745",adapter:"0x9571D46B5A5AAb749E5aCd698D8F20814C7B23D3",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"}}},8453:{dex:{agent:{type:"default:odos-v2",router:"0x19cEeAd7105607Cd444F5ad10dd51356436095a1",adapter:"0x5906C4dD71D5afFe1a8f0215409E912eB5d593AD",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},pancake:{type:"p2:pancakeswap-v2",router:"0xd9C500DfF816a1Da21A48A732d3498Bf09dc9AEB",permit2:"0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768",adapter:"0x52Ed96B1AEd25818B6A284b063b055488E012b73",fee:"0x37A957f10F458e0d7fDECBE2917971b57F15c927"},quick:{type:"default:kyber-v2",router:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",adapter:"0x0438644898F69bfF1018Cb01a81877D14d3e6493",fee:"0xd207DC6a6dA88f27c8DB78201F974161b1d84b1f"},trebleswap:{type:"default:trebleswap",router:"0x347539D82A14C0A3a89769f1024774A545a151ac",adapter:"0x6f4938535879c668A797F2a6e9B912c54f9D43Cf",fee:"0x15fc883d7DF4e681Ddb9E43e7B1D8c61d4fC162C"},sushiswap:{type:"default:sushi",router:"0xAC4c6e212A361c968F1725b4d055b47E63F80b75",adapter:"0x2e43A28FAf083717CcD9B246d97C61E1Bc9914Df",fee:"0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc"}}},42161:{dex:{agent:{type:"default:odos-v2",router:"0xa669e7A0d4b3e4Fa48af2dE86BD4CD7126Be4e13",adapter:"0x026B8977319F67078e932a08feAcB59182B5380f",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},arbidex:{type:"default:odos-v2",router:"0xa669e7A0d4b3e4Fa48af2dE86BD4CD7126Be4e13",adapter:"0xaA66173674F4331e7e672899B3E6aB1190450898",fee:"0xa0c11852f8A44e32F9EC10AD25986A53842f72Ca"},ramses:{type:"paraswap:paraswap-v5",router:"0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57",adapter:"0xf075352f43cd15bA51B0957A4465223EDf6b4Cd8",fee:"0xB5BaCB60ECDa0bEF809B2A26eC9B4B926835D7af"},omni:{type:"paraswap:paraswap-v5",router:"0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57",adapter:"0x41c925E8E4fC65136BDf5322824E0D8c20c4824e",fee:"0xba5291526c30B097E9F1Fd1Be301E2ab6E0782aa"},chronos:{type:"default:odos-v2",router:"0x19cEeAd7105607Cd444F5ad10dd51356436095a1",adapter:"0x6a6b8975d1b131EFd0a9b536766EE7E5d4a16CF2",fee:"0x5729af83240EFecAa18eafaAE82961c2DD045Dbe"},pancake:{type:"p2:pancakeswap-v2",router:"0xFE6508f0015C778Bdcc1fB5465bA5ebE224C9912",permit2:"0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768",adapter:"0xA7CcB11F1D20D1F915FC220F5Cb1646E4523bB75",fee:"0x37A957f10F458e0d7fDECBE2917971b57F15c927"},sushiswap:{type:"default:sushi",router:"0xAC4c6e212A361c968F1725b4d055b47E63F80b75",adapter:"0x2e43A28FAf083717CcD9B246d97C61E1Bc9914Df",fee:"0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc"}}},43114:{dex:{agent:{type:"default:odos-v2",router:"0x88de50B233052e4Fb783d4F6db78Cc34fEa3e9FC",adapter:"0x4F48041842827823D3750399eCa2832fC2E29201",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},blackhole:{type:"default:kyber-v2",router:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",adapter:"0xccdF1D6ce95FeC0F842197470CE8969A678B0A04",fee:"0x7f8B62520D9B5DA0ED517cc36e8dcb2a356f1928"},pangolin:{type:"default:kyber-v2",router:"0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",adapter:"0xf42106eBf985bF49b39eba0114F57FA05e7B52eD",fee:"0xde92da99D188Ceb54A11ec711EF52D808A6260B5"}}},59144:{dex:{agent:{type:"default:odos-v2",router:"0x2d8879046f1559E53eb052E949e9544bCB72f414",adapter:"0x55E4da2cd634729064bEb294EC682Dc94f5c3f24",fee:"0x03A70aC8126340d3cd6b5828816172693C398661"},pancake:{type:"p2:pancakeswap-v2",router:"0xFE6508f0015C778Bdcc1fB5465bA5ebE224C9912",permit2:"0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768",adapter:"0xA7CcB11F1D20D1F915FC220F5Cb1646E4523bB75",fee:"0x37A957f10F458e0d7fDECBE2917971b57F15c927"},lynex:{type:"default:openocean",router:"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",adapter:"0xd8bC1FF79a642e8D7Fbd0711374F287202fBb3AA",fee:"0xcb36ed1B1BfAD8F7FC9651f52d21f04A68677423"}}},80094:{dex:{kodiak:{type:"default:kodiak",router:"0x43Dac637c4383f91B4368041E7A8687da3806Cae",adapter:"0xcB16237c88A859d46Ae850B97d7D1bdECF482C06",fee:"0xBA47Ec15aFbCF6e7e9F52900632049530bB6bAe4"}}},747474:{dex:{sushiswap:{type:"default:sushi",router:"0xAC4c6e212A361c968F1725b4d055b47E63F80b75",adapter:"0x2e43A28FAf083717CcD9B246d97C61E1Bc9914Df",fee:"0x28F6C9dBE21fFc146Af8d5D15c49Cf48F61140Dc"}}},"*":{wm:"0x0005d5cE0dB57e5BE3b2b8b6FeB75f0ccd015000",repermit:"0x00002a9C4D9497df5Bd31768eC5d30eEf5405000",cosigner:"0x000ECFa392ecDEfEE6e2a5C095d39B7A32f1E000",reactor:"0x000000b33fE4fB9d999Dd684F79b110731c3d000",executor:"0x000642A0966d9bd49870D9519f76b5cf823f3000",refinery:"0x000E474c0D7084EAA35A501035E73269f4b009A5",salt:{wm:"0xc9b46eae42dfeba3222a0315bf682f33cd5cc9d60c9625642e88406f8415f152",repermit:"0x4871dc9008e605821ea9677b65ea2a60ffb774afb31e0dcaea2e192880096be7",cosigner:"0x1117fe6f4e25c9380d10b2b3314a1e9b33e5f65ba0e55e0c63d0640db0dd60a2",reactor:"0xec73677f3a465a9755d4c9eab9509b59a24613fdb8b78719682930373e9876f5",executor:"0x9abc67d936f79e493f1f14050c2f6adb87ec208ff7aaae2e7ae788a7cb4796d7",refinery:"0x9746de29f1dd31b2c8460d71e92a7aefa34911130e61f274f37776e598c48bec"}}};var Hi,dd;function g1(){if(dd)return Hi;dd=1;const e=x1,t=s=>y1(`./out/${s}.sol/${s}.json`).abi,n=()=>({wm:t("WM"),repermit:t("RePermit"),reactor:t("OrderReactor"),executor:t("Executor"),refinery:t("Refinery"),settler:t("Settler"),adapter:t("DefaultDexAdapter")});function r(s,a){if(!s)return;const{dex:o,...i}=e["*"]??{},c=e[s];if(!c)return;const{dex:l,...d}=c;if(!(a!=null&&a.trim()))return{...i,...d};const p=l==null?void 0:l[a];if(p)return{...i,...d,...p}}return Hi={config:r,abis:n,raw:e},Hi}var pd=g1();const Br=(e,t)=>{if(!e||!t)return"";const n=z(10).pow(e||0);return z(t).times(n).idiv(n).div(n).toFixed()};z(0),z(1),z(10),z(1e18);function jn(e,t){return e==t||e.toLowerCase()==t.toLowerCase()}const Ur=e=>!!r1.find(t=>jn(t,e||""));function w1(e){return[Ge.Years,Ge.Months,Ge.Weeks,Ge.Days,Ge.Hours,Ge.Minutes].find(n=>n<=e)||Ge.Minutes}const qn=e=>e?e.value*e.unit:0,E1=e=>!e||e==="NaN"?"0":z(e).decimalPlaces(0).toFixed(),Vn=e=>Object.values(Le).find(t=>t.id===e),k1=e=>{if(!e)return;const t=e.map(a=>je(a)),n=Object.entries(s1).filter(([a])=>t.includes(a)).flatMap(([,a])=>a),r=e.map(a=>a.exchangeAddress),s=new Set([...r,...n].map(a=>a.toLowerCase()));return Array.from(s)},Gi=(e,t)=>e.version===1?(e.fillDelay||0)*1e3+U1(t):(e.fillDelay||0)*1e3,Za=e=>typeof window>"u"?null:new URLSearchParams(window.location.search).get(e),fd=e=>bd().filter(t=>t.name===e).map(t=>t.chainId),ji=(e="",t="",n=18,r=18)=>{if(!z(e||0).gt(0)||!z(t||0).gt(0))return"";const s=Br(n,e),a=Br(r,t);return z(a).div(s).toFixed()},md=(e,t,n)=>{if(e.type===be.TWAP_MARKET)return"";const r=Br(t,e.srcAmountPerTrade),s=Br(n,e.dstMinAmountPerTrade);return z(s).div(r).toFixed()},hd=(e,t,n)=>{if(e.type===be.TWAP_MARKET)return"";const r=Br(t,e.srcAmountPerTrade),s=Br(n,e.triggerPricePerTrade);return z(s).div(r).toFixed()},C1=(e,t,n)=>{if(!e||!t||!n)return;const r=z(e).times(t),s=z(10).pow(n);return r.div(s).toFixed(0)},v1=(e,t,n,r)=>{if(n||!r||!e||!t)return z(0).toString();const s=z(e).times(z(t)),a=z(10).pow(r),o=s.div(a);return z.max(1,o).integerValue(z.ROUND_FLOOR).toFixed(0)},A1=(e,t,n,r)=>{if(e===te.TWAP||e===te.LIMIT)return"0";if(!r||!t||!n)return;const s=z(t).times(z(n)),a=z(10).pow(r),o=s.div(a);return z.max(1,o).integerValue(z.ROUND_FLOOR).toFixed(0)||"0"},T1=(e,t,n,r)=>{const s=qn(n)*2*t,a=Za(Ts.DURATION),o=w1(a?Number(a):s);return a?{unit:o,value:Number(z(Number(a)/o).toFixed(2))}:r||(e===te.LIMIT?{unit:Ge.Days,value:7}:e===te.STOP_LOSS||e===te.TAKE_PROFIT?{unit:Ge.Days,value:1}:{unit:o,value:Number(z(s/o).toFixed(2))})},S1=(e,t,n)=>t!==te.TWAP?1:n!==void 0?n:e,P1=(e,t,n,r)=>{if(!t||!n||!r)return 1;const a=z(n).times(t).div(r).integerValue(z.ROUND_FLOOR).toNumber(),o=Math.floor(_i/2/qn(e));return Math.max(1,Math.min(a,o))},B1=(e,t)=>e+qn(t)+6e4,U1=e=>e.bidDelaySeconds*1e3*2,I1=(e="",t=0)=>!e||!t?"0":z(e).div(t).integerValue(z.ROUND_FLOOR).toFixed(0),F1=(e="",t="",n)=>{if(n===te.STOP_LOSS)return{isError:z(t||0).gte(z(e||0)),value:e}},O1=(e="",t="",n)=>{if(n===te.TAKE_PROFIT)return{isError:z(t||0).lte(z(e||0)),value:e}},D1=(e="",t="",n=!1,r)=>{if(!n&&r===te.STOP_LOSS)return{isError:z(t||0).gte(z(e||0)),value:e}},M1=(e="",t="",n=!1,r)=>{if(!n&&r===te.TAKE_PROFIT)return{isError:z(t||0).gte(z(e||0)),value:e}},_1=(e,t)=>e===te.STOP_LOSS||e===te.TAKE_PROFIT?{isError:qn(t)>5184e6,value:5184e6}:{isError:qn(t)>_i,value:_i},N1=e=>({isError:qn(e)<od,value:od}),R1=e=>({isError:qn(e)<Mi,value:Mi}),z1=(e,t,n)=>({isError:z(t||0).multipliedBy(e||0).isLessThan(n),value:n}),L1=(e,t,n)=>({isError:n===te.TWAP&&z(e).isGreaterThan(t),value:t}),$1=(e,t)=>{if(e===Rt.Pancake)switch(t){case 56:return oe.PancakeSwap;case 42161:return oe.PancakeSwapArbitrum;case 8453:return oe.PancakeSwapBase;case 59144:return oe.PancakeSwapLinea;default:return oe.PancakeSwap}if(e===Rt.Sushiswap)switch(t){case 1:return oe.SushiEth;case 42161:return oe.SushiArb;case 8453:return oe.SushiBase;case 747474:return oe.SushiKatana;default:return oe.SushiEth}if(e===Rt.Quick)switch(t){case 137:return oe.QuickSwap;case 8453:return oe.QuickSwapBase;default:return oe.QuickSwap}if(e===Rt.Thena)switch(t){case 56:return oe.Thena;default:return oe.Thena}if(e===Rt.Spooky)switch(t){case 250:return oe.SpookySwap;case 146:return oe.SpookySwapSonic;default:return oe.SpookySwap}if(e===Rt.Lynex)switch(t){case 59144:return oe.Lynex;default:return oe.Lynex}if(e===Rt.Swapx)switch(t){case 146:return oe.SwapX;default:return oe.SwapX}if(e===Rt.Blackhole)switch(t){case 43114:return oe.BlackholeAvax;default:return oe.BlackholeAvax}},qi=(e,t=0)=>{const{abi:n,...r}=pd.config(t,e);if(!r.reactor)throw new Error(`Missing config for partner "${e}" on chain ${t}: reactor address not found`);return{...r,partner:e,twapConfig:$1(e,t)}},bd=()=>{const e=pd.raw;return Object.entries(e).filter(([t])=>t!=="*").flatMap(([t,n])=>{const r=n==null?void 0:n.dex;return!r||typeof r!="object"?[]:Object.entries(r).map(([s])=>({chainId:Number(t),name:s,config:qi(s,Number(t))}))}).sort((t,n)=>t.name.localeCompare(n.name))},yd=e=>{const t=Za(Ts.MIN_CHUNK_SIZE_USD);return t?parseInt(t):e},H1=({marketPrice:e,typedInputAmount:t,srcUsd1Token:n,marketPriceLoading:r,triggerPriceError:s,limitPriceError:a,tradesError:o,fillDelayError:i,durationError:c,balanceError:l,minTradeSizeError:d})=>{if(!Za(Ts.IGNORE_ERRORS)&&!(z(e||0).isZero()||z(t||0).isZero()||z(n||"0").isZero()||r))return d||s||a||o||i||c||l},xd=(e,t)=>{const n=Date.now().toString(),r=parseInt((e/1e3).toFixed(0)),s=E1(t/1e3),a=Za(Ts.FRESHNESS),o=a?parseInt(a):60;return{nonce:n,epoch:r,deadline:s,freshness:o}},G1=({chainId:e,srcToken:t,dstToken:n,srcAmount:r,deadlineMillis:s,fillDelayMillis:a,slippage:o,account:i,srcAmountPerTrade:c,dstMinAmountPerTrade:l="0",triggerAmountPerTrade:d="0",config:p,module:f})=>{const{nonce:m,epoch:y,deadline:g,freshness:P}=xd(a,s),B=f===te.TAKE_PROFIT?Ri:d,v=f===te.TAKE_PROFIT?d:l,U={permitted:{token:t,amount:r},spender:p.reactor,nonce:m,deadline:g,witness:{reactor:p.reactor,executor:p.executor,exchange:{adapter:p.adapter,ref:p.fee,share:0,data:"0x"},swapper:i,nonce:m,deadline:g,chainid:e,exclusivity:0,epoch:y,slippage:o,freshness:P,input:{token:t,amount:c,maxAmount:r},output:{token:n,limit:z(v||0).toFixed(),stop:z(B||0).toFixed(),recipient:i}}};return{domain:{name:"RePermit",version:"1",chainId:e,verifyingContract:p.repermit},order:U,types:o1,primaryType:id}},j1=({chainId:e,srcToken:t,dstToken:n,srcAmount:r,deadlineMillis:s,fillDelayMillis:a,slippage:o,account:i,srcAmountPerTrade:c,dstMinAmountPerTrade:l="0",triggerAmountPerTrade:d="0",config:p,module:f})=>{const{nonce:m,epoch:y,deadline:g,freshness:P}=xd(a,s),B=Math.floor(Date.now()/1e3).toString(),v=l,U=f===te.STOP_LOSS?d:"0",k=f===te.TAKE_PROFIT?d:"0",D={permitted:{token:t,amount:r},spender:p.reactor,nonce:m,deadline:g,witness:{reactor:p.reactor,executor:p.executor,exchange:{adapter:p.adapter,ref:p.fee,share:0,data:"0x"},swapper:i,nonce:m,start:B,deadline:g,chainid:e,exclusivity:0,epoch:y,slippage:o,freshness:P,input:{token:t,amount:c,maxAmount:r},output:{token:n,limit:z(v||0).toFixed(),triggerLower:z(U||0).toFixed(),triggerUpper:z(k||0).toFixed(),recipient:i}}};return{domain:{name:"RePermit",version:"1",chainId:e,verifyingContract:p.repermit},order:D,types:i1,primaryType:id}},gd=e=>Number(As)>=2?j1(e):G1(e),q1=`https://bi.orbs.network/putes/twap-ui-${.7}`;let Vi="unknown";function V1(e){Vi=e}function Ki(){const e=Math.random().toString(36).substring(2,16),t=Math.random().toString(36).substring(2,16),n=Date.now().toString(36);return`id_${e+t+n}`}const K1=(e,t,n)=>{var r,s,a,o,i,c,l,d,p;return{spotVersion:Di.version,partner:e.partner,adapter:e.adapter,cosigner:e.cosigner,executor:e.executor,fee:e.fee,reactor:e.reactor,refinery:e.refinery,repermit:e.repermit,router:e.router,type:e.type,wm:e.wm,chainName:((r=e.twapConfig)==null?void 0:r.chainName)||"",chainId:n||0,twapVersion:((s=e.twapConfig)==null?void 0:s.twapVersion)||0,twapAddress:((a=e.twapConfig)==null?void 0:a.twapAddress)||"",lensAddress:((o=e.twapConfig)==null?void 0:o.lensAddress)||"",bidDelaySeconds:((i=e.twapConfig)==null?void 0:i.bidDelaySeconds)||0,minChunkSizeUsd:t,name:((c=e.twapConfig)==null?void 0:c.name)||"",exchangeAddress:((l=e.twapConfig)==null?void 0:l.exchangeAddress)||"",exchangeType:((d=e.twapConfig)==null?void 0:d.exchangeType)||"",pathfinderKey:((p=e.twapConfig)==null?void 0:p.pathfinderKey)||""}},wd=async e=>{try{await fetch(q1,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)}).then()}catch(t){console.error("Failed to send BI",t)}};class W1{constructor(){Ii(this,"timeout");Ii(this,"config");Ii(this,"data",{_id:Ki()})}async updateAndSend(t={},n=!1,r){try{this.data={...this.data,...t},n?(await wd(this.data),r==null||r()):(clearTimeout(this.timeout),this.timeout=setTimeout(()=>{wd(this.data),r==null||r()},1e3))}catch(s){console.error("Failed to update and send BI",s)}}onCancelOrderRequest(t,n){this.updateAndSend({cancelOrderIdsV1:n===1?t:void 0,cancelOrderIdsV2:n===2?t:void 0,action:"cancel order",cancelOrderSuccess:!1,cancelOrderTxHash:void 0,actionError:void 0})}onCancelOrderSuccess(t){this.updateAndSend({cancelOrderTxHash:t,cancelOrderSuccess:!0})}onCancelOrderError(t){this.onTxError(t)}onWrapSuccess(t){this.updateAndSend({wrapTxHash:t})}onWrapRequest(){this.updateAndSend({action:"wrap"})}onWrapError(t){this.onTxError(t)}onApproveRequest(){this.updateAndSend({action:"approve"})}onApproveSuccess(t){this.updateAndSend({approvalTxHash:t})}onApproveError(t){this.onTxError(t)}onCrash(t){var n;this.updateAndSend({action:"crash",actionError:((n=t==null?void 0:t.message)==null?void 0:n.toLowerCase())||(t==null?void 0:t.toLowerCase())})}onTxError(t){var r;const n=((r=t==null?void 0:t.message)==null?void 0:r.toLowerCase())||(t==null?void 0:t.toLowerCase());this.updateAndSend({actionError:n})}onRequestOrder({account:t,chainId:n,module:r,srcToken:s,dstToken:a,fromTokenAmount:o,srcChunkAmount:i,minDstAmountOutPerTrade:c="",triggerPricePerTrade:l="",deadline:d,fillDelay:p,slippage:f,isMarketOrder:m,chunksAmount:y}){this.updateAndSend({toTokenAddress:a.address,toTokenSymbol:a.symbol,fromTokenAddress:s.address,fromTokenSymbol:s.symbol,fromTokenAmount:o,chunksAmount:y,srcChunkAmount:i,minDstAmountOutPerTrade:c,triggerPricePerTrade:l,deadline:d,fillDelay:p,slippage:f,chainId:n,walletAddress:t,module:r,orderType:m?"market":"limit",actionError:void 0})}onSignOrderRequest(t){this.updateAndSend({action:"sign order",order:t})}onSignOrderError(t){this.onTxError(t)}onSignOrderSuccess(t){this.updateAndSend({action:"sign order",signature:t})}init(t,n,r){var s;this.config=t,r!==((s=this.data)==null?void 0:s.chainId)&&(this.data={_id:Ki(),action:"module-import",uiVersion:Vi,...K1(t,n,r),origin:window.location.origin},this.updateAndSend(this.data))}onCreateOrderError(t){this.onTxError(t)}onCreateOrderRequest(){this.updateAndSend({action:"create order"})}async onCreateOrderSuccess(t){this.updateAndSend({orderHash:t,orderSuccess:!0},void 0,()=>{this.data={_id:Ki(),action:"reset",uiVersion:Vi,origin:this.data.origin,spotVersion:Di.version,partner:this.data.partner,adapter:this.data.adapter,cosigner:this.data.cosigner,executor:this.data.executor,fee:this.data.fee,reactor:this.data.reactor,refinery:this.data.refinery,repermit:this.data.repermit,router:this.data.router,type:this.data.type,wm:this.data.wm,chainName:this.data.chainName||"",chainId:this.data.chainId||0,twapVersion:this.data.twapVersion||0,twapAddress:this.data.twapAddress||"",lensAddress:this.data.lensAddress||"",bidDelaySeconds:this.data.bidDelaySeconds||0,minChunkSizeUsd:this.data.minChunkSizeUsd||0,name:this.data.name||"",exchangeAddress:this.data.exchangeAddress||"",exchangeType:this.data.exchangeType||"",pathfinderKey:this.data.pathfinderKey||""}})}onLoad(){this.updateAndSend({action:"module-import",origin:window.location.origin})}}const ve=new W1,X1=e=>{var i;const t=z(e.order.witness.output.limit||0).gt(1),n=e.order.witness.output.stop,r=e.order.witness.output.triggerUpper,s=z(n||0).eq(Ri)||z(r||0).gt(0),a=z(n||0).gt(0),o=((i=e.metadata.chunks)==null?void 0:i.length)||z(e.order.witness.input.maxAmount).div(z(e.order.witness.input.amount)).toNumber();return s?be.TAKE_PROFIT:a?t?be.STOP_LOSS_LIMIT:be.STOP_LOSS_MARKET:t?o>1&&t?be.TWAP_LIMIT:t?be.LIMIT:be.TWAP_MARKET:be.TWAP_MARKET},Z1=e=>{var s;const t=((s=e.metadata.chunks)==null?void 0:s.filter(a=>a.status==="success").length)||0,n=e.metadata.expectedChunks||0,r=z(t).dividedBy(n).toNumber();return r>=.99?100:r<=0?0:Number((r*100).toFixed(2))},Q1=(e,t)=>e.metadata.status==="completed"||t>=99?at.Completed:["pending","eligible"].includes(e.metadata.status)?at.Open:e.metadata.description.toLowerCase()==="cancelled by contract"?at.Cancelled:at.Expired,J1=e=>{var n;return(((n=e.metadata.chunks)==null?void 0:n.filter(r=>r.status==="success"))||[]).map(r=>({inAmount:r.inAmount,outAmount:r.outAmount,timestamp:new Date(r.timestamp).getTime(),txHash:r.txHash}))},Y1=(e,t)=>{var r;const n=e.length;return n>=t&&((r=e[n-1])==null?void 0:r.timestamp)||0},eb=e=>z(e.metadata.displayOnlyInputTokenPriceUSD).dividedBy(1e18).toFixed(),Wi=e=>Number(e.order.witness.output.limit)===1?"":e.order.witness.output.limit,tb=e=>{const{triggerLower:t="0",triggerUpper:n="0"}=e.order.witness.output,r=Wi(e),s=e.metadata.expectedChunks||1,a=z(n||0).gt(0);return{dstMinAmountPerTrade:r,triggerPricePerTrade:a?n:t,dstMinAmountTotal:z(r).multipliedBy(s).toFixed()}},nb=e=>{const t=Wi(e),n=z(e.order.witness.output.stop||0).eq(Ri),r=e.metadata.expectedChunks||1;return{dstMinAmountPerTrade:n?"":t,triggerPricePerTrade:n?t:z(e.order.witness.output.stop||"").toFixed(),dstMinAmountTotal:n?"":z(t).multipliedBy(r).toFixed()}},rb=e=>Number(As)>=2?tb(e):nb(e),Ed=e=>{const t=Z1(e),n=Wi(e),r=e.metadata.expectedChunks||1,s=J1(e);return{id:e.hash,hash:e.hash,version:2,type:X1(e),maker:e.order.witness.swapper,progress:t,srcAmountFilled:s.reduce((a,o)=>a.plus(o.inAmount),new z(0)).toFixed()||"",dstAmountFilled:s.reduce((a,o)=>a.plus(o.outAmount),new z(0)).toFixed()||"",fills:s,srcTokenAddress:e.order.witness.input.token,dstTokenAddress:e.order.witness.output.token,orderDollarValueIn:eb(e),fillDelay:e.order.witness.epoch*1e3,deadline:Number(e.order.deadline)*1e3,createdAt:new Date(e.timestamp).getTime(),srcAmount:e.order.witness.input.maxAmount,srcAmountPerTrade:e.order.witness.input.amount,totalTradesAmount:r,isMarketPrice:z(n||0).lte(1),chainId:e.order.witness.chainid,filledOrderTimestamp:Y1(s,r),status:Q1(e,t),rawOrder:e,...rb(e)}},sb=async({chainId:e,signal:t,account:n,exchange:r,isDev:s=!1})=>{try{if(!n)return[];const a=r?`&exchange=${r}`:"",i=await(await fetch(`${ad(s)}/orders?swapper=${n}&chainId=${e}${a}`,{signal:t})).json();return!i||!Array.isArray(i.orders)?[]:i.orders.map(Ed)}catch{return[]}},kd=async(e,t,n=!1)=>{try{const r={signature:t,order:e,status:"pending"};ve.onCreateOrderRequest();const s=await fetch(`${ad(n)}/orders/new`,{method:"POST",body:JSON.stringify(r)}),a=await s.json().catch(()=>({}));if(!s.ok||!(a!=null&&a.success)){const i=(a==null?void 0:a.message)??s.statusText??"Request failed",c=(a==null?void 0:a.code)??s.status;throw new Error(`error:${i}, code:${c}`)}if(!a.signedOrder||typeof a.signedOrder!="object")throw new Error("Invalid API response: missing signedOrder");const o=Ed(a.signedOrder);return ve.onCreateOrderSuccess(o.id),o}catch(r){throw ve.onCreateOrderError(r),console.error(r),r}},Zt=(e,t)=>e&&e.length?e.map(t||(n=>`${n}`)):void 0,ab=e=>{if(e)return n1[e]},Xi=async({chainId:e,buildQuery:t,extractResults:n,signal:r,retries:s=1,limit:a=1e3,page:o})=>{const i=ab(e);if(!i)throw new db;const c=async p=>{let f=0;for(;f<=s;)try{const m=await fetch(i,{method:"POST",body:JSON.stringify({query:p}),signal:r,headers:{"Content-Type":"application/json"}});if(!m.ok)throw new Error(`HTTP error: ${m.status}`);const y=await m.json();if(y.errors)throw new Error(y.errors[0].message);return n(y)}catch(m){if(f===s)throw m;await new Promise(y=>setTimeout(y,500*2**f)),f++}return[]};let l=0;const d=[];if(o!==void 0){const p=t(o,a);try{return await c(p)}catch{console.warn(`Page ${o} failed, retrying one final time...`);try{return await c(p)}catch{return[]}}}for(;;){const p=t(l,a);let f;try{f=await c(p)}catch{console.warn(`Page ${l} failed, retrying one final time...`);try{f=await c(p)}catch{return d}}if(d.push(...f),f.length<a)break;l++}return d},Cd=e=>e.map(t=>({inAmount:t.srcAmountIn,outAmount:t.dstAmountOut,timestamp:t.timestamp,txHash:t.transactionHash})),vd=(e,t)=>{const n=z(e||0).gt(1);return!n&&t===1?be.TWAP_MARKET:t>1&&n?be.TWAP_LIMIT:n?be.LIMIT:be.TWAP_MARKET},ob=(e,t,n,r)=>{var f;const s=Cd(n||[]),a=new z(e.ask_srcAmount||0).div(e.ask_srcBidAmount).integerValue(z.ROUND_FLOOR).toNumber(),i=(n==null?void 0:n.length)===a?(f=n==null?void 0:n[(n==null?void 0:n.length)-1])==null?void 0:f.timestamp:void 0,c=s.reduce((m,y)=>m.plus(y.inAmount),new z(0)).toFixed(),l=s.reduce((m,y)=>m.plus(y.outAmount),new z(0)).toFixed(),d=Ad(e.ask_srcAmount,c),p=vd(e.ask_dstMinAmount,a);return{version:1,id:e.Contract_id.toString(),hash:"",type:vd(e.ask_dstMinAmount,a),srcTokenAddress:e.ask_srcToken,dstTokenAddress:e.ask_dstToken,exchangeAddress:e.exchange,twapAddress:e.twapAddress,maker:e.maker,progress:d,dstAmountFilled:l,srcAmountFilled:c,orderDollarValueIn:z(e.dollarValueIn||0).toFixed(6),srcAmount:e.ask_srcAmount,dstMinAmountTotal:z(e.ask_dstMinAmount).multipliedBy(a).toString(),fills:s,fillDelay:e.ask_fillDelay,deadline:e.ask_deadline*1e3,createdAt:new Date(e.timestamp).getTime(),dstMinAmountPerTrade:z(e.ask_dstMinAmount).eq(1)?"":e.ask_dstMinAmount,triggerPricePerTrade:"",srcAmountPerTrade:e.ask_srcBidAmount,txHash:e.transactionHash,totalTradesAmount:a,isMarketPrice:[be.TWAP_MARKET].includes(p),chainId:t,filledOrderTimestamp:i||0,status:r,rawOrder:e}},ib=e=>{var p;if(!e)return"";const t=Zt(e.accounts,f=>`"${f.toLowerCase()}"`),n=Zt(k1(e.configs),f=>`"${f.toLowerCase()}"`),r=Zt(e.inTokenSymbols,f=>`"${f.toUpperCase()}"`),s=Zt(e.outTokenSymbols,f=>`"${f.toUpperCase()}"`),a=Zt(e.inTokenAddresses,f=>`"${f.toLowerCase()}"`),o=Zt(e.outTokenAddresses,f=>`"${f.toLowerCase()}"`),i=Zt(e.transactionHashes,f=>`"${f.toLowerCase()}"`),c=Zt(e.orderIds,f=>`"${f}"`),l=n!=null&&n.length?"":Zt((p=e.configs)==null?void 0:p.map(f=>f.twapAddress),f=>`"${f.toLowerCase()}"`),d=e.minDollarValueIn;return[n?`exchange_in: [${n.join(", ")}]`:"",l?`twapAddress_in: [${l.join(", ")}]`:"",t?`maker_in: [${t.join(", ")}]`:"",i?`transactionHash_in: [${i.join(", ")}]`:"",c?`Contract_id_in: [${c.join(", ")}]`:"",d?`dollarValueIn_gte: ${d}`:"",r?`srcTokenSymbol_in: [${r.join(", ")}]`:"",s?`dstTokenSymbol_in: [${s.join(", ")}]`:"",a?`srcTokenAddress_in: [${a.join(", ")}]`:"",o?`dstTokenAddress_in: [${o.join(", ")}]`:"",e!=null&&e.startDate?`blockTimestamp_gte: ${e.startDate}`:"",e!=null&&e.endDate?`blockTimestamp_lte: ${e.endDate}`:"",(e==null?void 0:e.orderType)==="limit"?"ask_dstMinAmount_gt: 1":"",(e==null?void 0:e.orderType)==="market"?"ask_dstMinAmount_lte: 1":""].filter(Boolean).join(", ")};async function cb({chainId:e,signal:t,page:n,limit:r,filters:s}){const a=r||1e3,o=ib(s);return await Xi({chainId:e,signal:t,limit:a,page:n,buildQuery:(c,l)=>`
2
2
  {
3
3
  orderCreateds(
4
4
  ${o?`where: { ${o} }`:""},
@@ -32,7 +32,7 @@
32
32
  transactionHash
33
33
  }
34
34
  }
35
- `,extractResults:c=>{var l;return((l=c.data)==null?void 0:l.orderCreateds)||[]}})}const Hw=async({chainId:e,orders:t,signal:r})=>{if(t.length===0)return[];const n=Ed(t.map(i=>i.Contract_id.toString()));if(!n.length)return[];const a=`where: { twapId_in: [${n.map(i=>`"${i}"`).join(", ")}]}`;return await vd({chainId:e,signal:r,limit:1e3,buildQuery:(i,c)=>`
35
+ `,extractResults:c=>{var l;return((l=c.data)==null?void 0:l.orderCreateds)||[]}})}const lb=async({chainId:e,orders:t,signal:n})=>{if(t.length===0)return[];const r=Zi(t.map(i=>i.Contract_id.toString()));if(!r.length)return[];const a=`where: { twapId_in: [${r.map(i=>`"${i}"`).join(", ")}]}`;return await Xi({chainId:e,signal:n,limit:1e3,buildQuery:(i,c)=>`
36
36
  {
37
37
  statusNews(
38
38
  first: ${c},
@@ -44,9 +44,9 @@
44
44
  status
45
45
  }
46
46
  }
47
- `,extractResults:i=>{var c;return((c=i.data)==null?void 0:c.statusNews)||[]}})};function Ed(e){return Array.from(new Set(e))}const $w=async({chainId:e,orders:t,signal:r})=>{const n=Ed(t.map(d=>d.Contract_id)),s=Ed(t.map(d=>d.twapAddress)).filter(Boolean);if(n.length===0)return[];const a=n.join(", "),o=s.map(d=>`"${d}"`).join(", "),i=s.length?`twapAddress_in: [${o}]`:"",l=`where: { ${[`TWAP_id_in: [${a}]`,i].filter(Boolean).join(", ")} }`;return await vd({chainId:e,signal:r,limit:1e3,buildQuery:(d,f)=>`
47
+ `,extractResults:i=>{var c;return((c=i.data)==null?void 0:c.statusNews)||[]}})};function Zi(e){return Array.from(new Set(e))}const ub=async({chainId:e,orders:t,signal:n})=>{const r=Zi(t.map(p=>p.Contract_id)),s=Zi(t.map(p=>p.twapAddress)).filter(Boolean);if(r.length===0)return[];const a=r.join(", "),o=s.map(p=>`"${p}"`).join(", "),i=s.length?`twapAddress_in: [${o}]`:"",l=`where: { ${[`TWAP_id_in: [${a}]`,i].filter(Boolean).join(", ")} }`;return await Xi({chainId:e,signal:n,limit:1e3,buildQuery:(p,f)=>`
48
48
  {
49
- orderFilleds(first: ${f}, orderBy: timestamp, skip: ${d*f}, ${l}) {
49
+ orderFilleds(first: ${f}, orderBy: timestamp, skip: ${p*f}, ${l}) {
50
50
  id
51
51
  dstAmountOut
52
52
  dstFee
@@ -61,66 +61,49 @@
61
61
  dollarValueOut
62
62
  }
63
63
  }
64
- `,extractResults:d=>{var f;return(((f=d.data)==null?void 0:f.orderFilleds)||[]).map(m=>({...m,timestamp:new Date(m.timestamp).getTime()}))}})};class Gw extends Error{constructor(){super("No graph endpoint found"),this.name="NoGraphEndpointError"}}const jw=async({chainId:e,signal:t,page:r,limit:n,filters:s})=>{try{const a=await Rw({chainId:e,signal:t,page:r,limit:n,filters:s}),[o,i]=await Promise.all([$w({chainId:e,orders:a,signal:t}),Hw({chainId:e,orders:a,signal:t})]),c=a.map(u=>{const d=o==null?void 0:o.filter(f=>f.TWAP_id===Number(u.Contract_id)&&_s(f.exchange,u.exchange)&&_s(f.twapAddress,u.twapAddress));return Lw(u,e,d,Vw(u,d||[],i))}).sort((u,d)=>d.createdAt-u.createdAt),l=new Set;return c.filter(u=>l.has(u.id)?!1:(l.add(u.id),!0))}catch{return[]}},Vw=(e,t,r)=>{var i;const n=(i=r==null?void 0:r.find(c=>c.twapId===e.Contract_id.toString()&&_s(c.twapAddress,e.twapAddress)))==null?void 0:i.status,a=Fh(t).reduce((c,l)=>c.plus(l.inAmount),new G(0)).toFixed(),o=Uh(e.ask_srcAmount,a);return Ww(o,e.ask_deadline*1e3,n)},Uh=(e,t)=>{if(!t||!e)return 0;const r=G(t).dividedBy(e).toNumber();return r>=.99?100:r<=0?0:Number((r*100).toFixed(2))},Ww=(e,t,r)=>e===100?ut.Completed:r==="CANCELLED"?ut.Cancelled:r==="COMPLETED"?ut.Completed:t>Date.now()?ut.Open:ut.Expired,Dh=async({signal:e,page:t,chainId:r,limit:n,config:s,account:a,isDev:o=!1})=>(await Promise.all([s?jw({chainId:r,signal:e,page:t,limit:n,filters:{accounts:[a],configs:s.twapConfig?[s.twapConfig]:[]}}):Promise.resolve([]),Mw({chainId:r,signal:e,account:a,exchange:s==null?void 0:s.adapter,isDev:o})]).then(([l,u])=>[...l,...u])).sort((l,u)=>u.createdAt-l.createdAt),qw={version:"1.0.0"};var Fa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Kw={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Yw=(P5=class{constructor(){le(this,bn,Kw);le(this,ya,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&N(this,ya)&&e!==N(this,bn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:N(this,bn),provider:e}),J(this,bn,e),process.env.NODE_ENV!=="production"&&J(this,ya,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&J(this,ya,!0),N(this,bn).setTimeout(e,t)}clearTimeout(e){N(this,bn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&J(this,ya,!0),N(this,bn).setInterval(e,t)}clearInterval(e){N(this,bn).clearInterval(e)}},bn=new WeakMap,ya=new WeakMap,P5),Ls=new Yw;function Zw(e){setTimeout(e,0)}var zs=typeof window>"u"||"Deno"in globalThis;function Gt(){}function Xw(e,t){return typeof e=="function"?e(t):e}function kd(e){return typeof e=="number"&&e>=0&&e!==1/0}function _h(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Jn(e,t){return typeof e=="function"?e(t):e}function wr(e,t){return typeof e=="function"?e(t):e}function Mh(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:i}=e;if(o){if(n){if(t.queryHash!==Cd(o,t.options))return!1}else if(!Ro(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||s&&s!==t.state.fetchStatus||a&&!a(t))}function Nh(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Rs(t.options.mutationKey)!==Rs(a))return!1}else if(!Ro(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Cd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Rs)(e)}function Rs(e){return JSON.stringify(e,(t,r)=>Ad(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Ro(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ro(e[r],t[r])):!1}var Qw=Object.prototype.hasOwnProperty;function Td(e,t){if(e===t)return e;const r=Lh(e)&&Lh(t);if(!r&&!(Ad(e)&&Ad(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,i=r?new Array(o):{};let c=0;for(let l=0;l<o;l++){const u=r?l:a[l],d=e[u],f=t[u];if(d===f){i[u]=d,(r?l<s:Qw.call(e,u))&&c++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){i[u]=f;continue}const m=Td(d,f);i[u]=m,m===d&&c++}return s===o&&c===s?e:i}function zc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Lh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ad(e){if(!zh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!zh(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function zh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Jw(e){return new Promise(t=>{Ls.setTimeout(t,e)})}function Sd(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Td(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return Td(e,t)}return t}function e3(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function t3(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Rc=Symbol();function Rh(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Rc&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Rc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Hh(e,t){return typeof e=="function"?e(...t):!!e}var r3=(I5=class extends Fa{constructor(){super();le(this,ga);le(this,ks);le(this,So);J(this,So,t=>{if(!zs&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,ks)||this.setEventListener(N(this,So))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,ks))==null||t.call(this),J(this,ks,void 0))}setEventListener(t){var r;J(this,So,t),(r=N(this,ks))==null||r.call(this),J(this,ks,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,ga)!==t&&(J(this,ga,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof N(this,ga)=="boolean"?N(this,ga):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ga=new WeakMap,ks=new WeakMap,So=new WeakMap,I5),Pd=new r3;function Id(){let e,t;const r=new Promise((s,a)=>{e=s,t=a});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var n3=Zw;function s3(){let e=[],t=0,r=i=>{i()},n=i=>{i()},s=n3;const a=i=>{t?e.push(i):s(()=>{r(i)})},o=()=>{const i=e;e=[],i.length&&s(()=>{n(()=>{i.forEach(c=>{r(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||o()}return c},batchCalls:i=>(...c)=>{a(()=>{i(...c)})},schedule:a,setNotifyFunction:i=>{r=i},setBatchNotifyFunction:i=>{n=i},setScheduler:i=>{s=i}}}var kt=s3(),a3=(B5=class extends Fa{constructor(){super();le(this,Po,!0);le(this,Cs);le(this,Io);J(this,Io,t=>{if(!zs&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){N(this,Cs)||this.setEventListener(N(this,Io))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Cs))==null||t.call(this),J(this,Cs,void 0))}setEventListener(t){var r;J(this,Io,t),(r=N(this,Cs))==null||r.call(this),J(this,Cs,t(this.setOnline.bind(this)))}setOnline(t){N(this,Po)!==t&&(J(this,Po,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,Po)}},Po=new WeakMap,Cs=new WeakMap,Io=new WeakMap,B5),Hc=new a3;function o3(e){return Math.min(1e3*2**e,3e4)}function $h(e){return(e??"online")==="online"?Hc.isOnline():!0}var Bd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Gh(e){let t=!1,r=0,n;const s=Id(),a=()=>s.status!=="pending",o=g=>{var E;if(!a()){const v=new Bd(g);f(v),(E=e.onCancel)==null||E.call(e,v)}},i=()=>{t=!0},c=()=>{t=!1},l=()=>Pd.isFocused()&&(e.networkMode==="always"||Hc.isOnline())&&e.canRun(),u=()=>$h(e.networkMode)&&e.canRun(),d=g=>{a()||(n==null||n(),s.resolve(g))},f=g=>{a()||(n==null||n(),s.reject(g))},m=()=>new Promise(g=>{var E;n=v=>{(a()||l())&&g(v)},(E=e.onPause)==null||E.call(e)}).then(()=>{var g;n=void 0,a()||(g=e.onContinue)==null||g.call(e)}),b=()=>{if(a())return;let g;const E=r===0?e.initialPromise:void 0;try{g=E??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(d).catch(v=>{var L;if(a())return;const w=e.retry??(zs?0:3),S=e.retryDelay??o3,T=typeof S=="function"?S(r,v):S,O=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,v);if(t||!O){f(v);return}r++,(L=e.onFail)==null||L.call(e,r,v),Jw(T).then(()=>l()?void 0:m()).then(()=>{t?f(v):b()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:i,continueRetry:c,canStart:u,start:()=>(u()?b():m().then(b),s)}}var jh=(F5=class{constructor(){le(this,xa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kd(this.gcTime)&&J(this,xa,Ls.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zs?1/0:300*1e3))}clearGcTimeout(){N(this,xa)&&(Ls.clearTimeout(N(this,xa)),J(this,xa,void 0))}},xa=new WeakMap,F5),i3=(O5=class extends jh{constructor(t){super();le(this,Xr);le(this,wa);le(this,Bo);le(this,Fr);le(this,va);le(this,Bt);le(this,Ac);le(this,Ea);J(this,Ea,!1),J(this,Ac,t.defaultOptions),this.setOptions(t.options),this.observers=[],J(this,va,t.client),J(this,Fr,N(this,va).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,J(this,wa,qh(this.options)),this.state=t.state??N(this,wa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=N(this,Bt))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,Ac),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=qh(this.options);r.data!==void 0&&(this.setState(Wh(r.data,r.dataUpdatedAt)),J(this,wa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Fr).remove(this)}setData(t,r){const n=Sd(this.state.data,t,this.options);return Se(this,Xr,Zn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Se(this,Xr,Zn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=N(this,Bt))==null?void 0:n.promise;return(s=N(this,Bt))==null||s.cancel(t),r?r.then(Gt).catch(Gt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,wa))}isActive(){return this.observers.some(t=>wr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Jn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!_h(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Bt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Bt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,Fr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(N(this,Bt)&&(N(this,Ea)?N(this,Bt).cancel({revert:!0}):N(this,Bt).cancelRetry()),this.scheduleGc()),N(this,Fr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,Xr,Zn).call(this,{type:"invalidate"})}async fetch(t,r){var c,l,u,d,f,m,b,g,E,v,w,S;if(this.state.fetchStatus!=="idle"&&((c=N(this,Bt))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,Bt))return N(this,Bt).continueRetry(),N(this,Bt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(O=>O.options.queryFn);T&&this.setOptions(T.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,s=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(J(this,Ea,!0),n.signal)})},a=()=>{const T=Rh(this.options,r),L=(()=>{const I={client:N(this,va),queryKey:this.queryKey,meta:this.meta};return s(I),I})();return J(this,Ea,!1),this.options.persister?this.options.persister(T,L,this):T(L)},i=(()=>{const T={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:N(this,va),state:this.state,fetchFn:a};return s(T),T})();(l=this.options.behavior)==null||l.onFetch(i,this),J(this,Bo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&Se(this,Xr,Zn).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta}),J(this,Bt,Gh({initialPromise:r==null?void 0:r.initialPromise,fn:i.fetchFn,onCancel:T=>{T instanceof Bd&&T.revert&&this.setState({...N(this,Bo),fetchStatus:"idle"}),n.abort()},onFail:(T,O)=>{Se(this,Xr,Zn).call(this,{type:"failed",failureCount:T,error:O})},onPause:()=>{Se(this,Xr,Zn).call(this,{type:"pause"})},onContinue:()=>{Se(this,Xr,Zn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const T=await N(this,Bt).start();if(T===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(T),(m=(f=N(this,Fr).config).onSuccess)==null||m.call(f,T,this),(g=(b=N(this,Fr).config).onSettled)==null||g.call(b,T,this.state.error,this),T}catch(T){if(T instanceof Bd){if(T.silent)return N(this,Bt).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw Se(this,Xr,Zn).call(this,{type:"error",error:T}),(v=(E=N(this,Fr).config).onError)==null||v.call(E,T,this),(S=(w=N(this,Fr).config).onSettled)==null||S.call(w,this.state.data,T,this),T}finally{this.scheduleGc()}}},wa=new WeakMap,Bo=new WeakMap,Fr=new WeakMap,va=new WeakMap,Bt=new WeakMap,Ac=new WeakMap,Ea=new WeakMap,Xr=new WeakSet,Zn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Vh(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...Wh(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return J(this,Bo,t.manual?s:void 0),s;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),N(this,Fr).notify({query:this,type:"updated",action:t})})},O5);function Vh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$h(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Wh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qh(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var c3=(U5=class extends Fa{constructor(t,r){super();le(this,We);le(this,nr);le(this,_e);le(this,Sc);le(this,Wt);le(this,ka);le(this,Fo);le(this,Vn);le(this,Ts);le(this,Pc);le(this,Oo);le(this,Uo);le(this,Ca);le(this,Ta);le(this,As);le(this,Do,new Set);this.options=r,J(this,nr,t),J(this,Ts,null),J(this,Vn,Id()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,_e).addObserver(this),Kh(N(this,_e),this.options)?Se(this,We,Fc).call(this):this.updateResult(),Se(this,We,Fm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fd(N(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fd(N(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,We,Om).call(this),Se(this,We,Um).call(this),N(this,_e).removeObserver(this)}setOptions(t){const r=this.options,n=N(this,_e);if(this.options=N(this,nr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wr(this.options.enabled,N(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,We,Dm).call(this),N(this,_e).setOptions(this.options),r._defaulted&&!zc(this.options,r)&&N(this,nr).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,_e),observer:this});const s=this.hasListeners();s&&Yh(N(this,_e),n,this.options,r)&&Se(this,We,Fc).call(this),this.updateResult(),s&&(N(this,_e)!==n||wr(this.options.enabled,N(this,_e))!==wr(r.enabled,N(this,_e))||Jn(this.options.staleTime,N(this,_e))!==Jn(r.staleTime,N(this,_e)))&&Se(this,We,Pm).call(this);const a=Se(this,We,Im).call(this);s&&(N(this,_e)!==n||wr(this.options.enabled,N(this,_e))!==wr(r.enabled,N(this,_e))||a!==N(this,As))&&Se(this,We,Bm).call(this,a)}getOptimisticResult(t){const r=N(this,nr).getQueryCache().build(N(this,nr),t),n=this.createResult(r,t);return u3(this,n)&&(J(this,Wt,n),J(this,Fo,this.options),J(this,ka,N(this,_e).state)),n}getCurrentResult(){return N(this,Wt)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,Vn).status==="pending"&&N(this,Vn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){N(this,Do).add(t)}getCurrentQuery(){return N(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=N(this,nr).defaultQueryOptions(t),n=N(this,nr).getQueryCache().build(N(this,nr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Se(this,We,Fc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,Wt)))}createResult(t,r){var y;const n=N(this,_e),s=this.options,a=N(this,Wt),o=N(this,ka),i=N(this,Fo),l=t!==n?t.state:N(this,Sc),{state:u}=t;let d={...u},f=!1,m;if(r._optimisticResults){const x=this.hasListeners(),A=!x&&Kh(t,r),B=x&&Yh(t,n,r,s);(A||B)&&(d={...d,...Vh(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:E}=d;m=d.data;let v=!1;if(r.placeholderData!==void 0&&m===void 0&&E==="pending"){let x;a!=null&&a.isPlaceholderData&&r.placeholderData===(i==null?void 0:i.placeholderData)?(x=a.data,v=!0):x=typeof r.placeholderData=="function"?r.placeholderData((y=N(this,Uo))==null?void 0:y.state.data,N(this,Uo)):r.placeholderData,x!==void 0&&(E="success",m=Sd(a==null?void 0:a.data,x,r),f=!0)}if(r.select&&m!==void 0&&!v)if(a&&m===(o==null?void 0:o.data)&&r.select===N(this,Pc))m=N(this,Oo);else try{J(this,Pc,r.select),m=r.select(m),m=Sd(a==null?void 0:a.data,m,r),J(this,Oo,m),J(this,Ts,null)}catch(x){J(this,Ts,x)}N(this,Ts)&&(b=N(this,Ts),m=N(this,Oo),g=Date.now(),E="error");const w=d.fetchStatus==="fetching",S=E==="pending",T=E==="error",O=S&&w,L=m!==void 0,h={status:E,fetchStatus:d.fetchStatus,isPending:S,isSuccess:E==="success",isError:T,isInitialLoading:O,isLoading:O,data:m,dataUpdatedAt:d.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:w,isRefetching:w&&!S,isLoadingError:T&&!L,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:T&&L,isStale:Od(t,r),refetch:this.refetch,promise:N(this,Vn),isEnabled:wr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const x=F=>{h.status==="error"?F.reject(h.error):h.data!==void 0&&F.resolve(h.data)},A=()=>{const F=J(this,Vn,h.promise=Id());x(F)},B=N(this,Vn);switch(B.status){case"pending":t.queryHash===n.queryHash&&x(B);break;case"fulfilled":(h.status==="error"||h.data!==B.value)&&A();break;case"rejected":(h.status!=="error"||h.error!==B.reason)&&A();break}}return h}updateResult(){const t=N(this,Wt),r=this.createResult(N(this,_e),this.options);if(J(this,ka,N(this,_e).state),J(this,Fo,this.options),N(this,ka).data!==void 0&&J(this,Uo,N(this,_e)),zc(r,t))return;J(this,Wt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!N(this,Do).size)return!0;const o=new Set(a??N(this,Do));return this.options.throwOnError&&o.add("error"),Object.keys(N(this,Wt)).some(i=>{const c=i;return N(this,Wt)[c]!==t[c]&&o.has(c)})};Se(this,We,W5).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,We,Fm).call(this)}},nr=new WeakMap,_e=new WeakMap,Sc=new WeakMap,Wt=new WeakMap,ka=new WeakMap,Fo=new WeakMap,Vn=new WeakMap,Ts=new WeakMap,Pc=new WeakMap,Oo=new WeakMap,Uo=new WeakMap,Ca=new WeakMap,Ta=new WeakMap,As=new WeakMap,Do=new WeakMap,We=new WeakSet,Fc=function(t){Se(this,We,Dm).call(this);let r=N(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Gt)),r},Pm=function(){Se(this,We,Om).call(this);const t=Jn(this.options.staleTime,N(this,_e));if(zs||N(this,Wt).isStale||!kd(t))return;const n=_h(N(this,Wt).dataUpdatedAt,t)+1;J(this,Ca,Ls.setTimeout(()=>{N(this,Wt).isStale||this.updateResult()},n))},Im=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,_e)):this.options.refetchInterval)??!1},Bm=function(t){Se(this,We,Um).call(this),J(this,As,t),!(zs||wr(this.options.enabled,N(this,_e))===!1||!kd(N(this,As))||N(this,As)===0)&&J(this,Ta,Ls.setInterval(()=>{(this.options.refetchIntervalInBackground||Pd.isFocused())&&Se(this,We,Fc).call(this)},N(this,As)))},Fm=function(){Se(this,We,Pm).call(this),Se(this,We,Bm).call(this,Se(this,We,Im).call(this))},Om=function(){N(this,Ca)&&(Ls.clearTimeout(N(this,Ca)),J(this,Ca,void 0))},Um=function(){N(this,Ta)&&(Ls.clearInterval(N(this,Ta)),J(this,Ta,void 0))},Dm=function(){const t=N(this,nr).getQueryCache().build(N(this,nr),this.options);if(t===N(this,_e))return;const r=N(this,_e);J(this,_e,t),J(this,Sc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},W5=function(t){kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(N(this,Wt))}),N(this,nr).getQueryCache().notify({query:N(this,_e),type:"observerResultsUpdated"})})},U5);function l3(e,t){return wr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Kh(e,t){return l3(e,t)||e.state.data!==void 0&&Fd(e,t,t.refetchOnMount)}function Fd(e,t,r){if(wr(t.enabled,e)!==!1&&Jn(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Od(e,t)}return!1}function Yh(e,t,r,n){return(e!==t||wr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Od(e,r)}function Od(e,t){return wr(t.enabled,e)!==!1&&e.isStaleByTime(Jn(t.staleTime,e))}function u3(e,t){return!zc(e.getCurrentResult(),t)}function Zh(e){return{onFetch:(t,r)=>{var u,d,f,m,b;const n=t.options,s=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const E=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},v=Rh(t.options,t.fetchOptions),w=async(S,T,O)=>{if(g)return Promise.reject();if(T==null&&S.pages.length)return Promise.resolve(S);const I=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:T,direction:O?"backward":"forward",meta:t.options.meta};return E(A),A})(),h=await v(I),{maxPages:y}=t.options,x=O?t3:e3;return{pages:x(S.pages,h,y),pageParams:x(S.pageParams,T,y)}};if(s&&a.length){const S=s==="backward",T=S?d3:Xh,O={pages:a,pageParams:o},L=T(n,O);i=await w(O,L,S)}else{const S=e??a.length;do{const T=c===0?o[0]??n.initialPageParam:Xh(n,i);if(c>0&&T==null)break;i=await w(i,T),c++}while(c<S)}return i};t.options.persister?t.fetchFn=()=>{var g,E;return(E=(g=t.options).persister)==null?void 0:E.call(g,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function Xh(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function d3(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var p3=(D5=class extends jh{constructor(t){super();le(this,gn);le(this,Ic);le(this,yn);le(this,qt);le(this,Aa);J(this,Ic,t.client),this.mutationId=t.mutationId,J(this,qt,t.mutationCache),J(this,yn,[]),this.state=t.state||Qh(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,yn).includes(t)||(N(this,yn).push(t),this.clearGcTimeout(),N(this,qt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){J(this,yn,N(this,yn).filter(r=>r!==t)),this.scheduleGc(),N(this,qt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,yn).length||(this.state.status==="pending"?this.scheduleGc():N(this,qt).remove(this))}continue(){var t;return((t=N(this,Aa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,c,l,u,d,f,m,b,g,E,v,w,S,T,O,L,I,h,y;const r=()=>{Se(this,gn,Fs).call(this,{type:"continue"})},n={client:N(this,Ic),meta:this.options.meta,mutationKey:this.options.mutationKey};J(this,Aa,Gh({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(x,A)=>{Se(this,gn,Fs).call(this,{type:"failed",failureCount:x,error:A})},onPause:()=>{Se(this,gn,Fs).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,qt).canRun(this)}));const s=this.state.status==="pending",a=!N(this,Aa).canStart();try{if(s)r();else{Se(this,gn,Fs).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=N(this,qt).config).onMutate)==null?void 0:i.call(o,t,this,n));const A=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,n));A!==this.state.context&&Se(this,gn,Fs).call(this,{type:"pending",context:A,variables:t,isPaused:a})}const x=await N(this,Aa).start();return await((d=(u=N(this,qt).config).onSuccess)==null?void 0:d.call(u,x,t,this.state.context,this,n)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,x,t,this.state.context,n)),await((g=(b=N(this,qt).config).onSettled)==null?void 0:g.call(b,x,null,this.state.variables,this.state.context,this,n)),await((v=(E=this.options).onSettled)==null?void 0:v.call(E,x,null,t,this.state.context,n)),Se(this,gn,Fs).call(this,{type:"success",data:x}),x}catch(x){try{throw await((S=(w=N(this,qt).config).onError)==null?void 0:S.call(w,x,t,this.state.context,this,n)),await((O=(T=this.options).onError)==null?void 0:O.call(T,x,t,this.state.context,n)),await((I=(L=N(this,qt).config).onSettled)==null?void 0:I.call(L,void 0,x,this.state.variables,this.state.context,this,n)),await((y=(h=this.options).onSettled)==null?void 0:y.call(h,void 0,x,t,this.state.context,n)),x}finally{Se(this,gn,Fs).call(this,{type:"error",error:x})}}finally{N(this,qt).runNext(this)}}},Ic=new WeakMap,yn=new WeakMap,qt=new WeakMap,Aa=new WeakMap,gn=new WeakSet,Fs=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),kt.batch(()=>{N(this,yn).forEach(n=>{n.onMutationUpdate(t)}),N(this,qt).notify({mutation:this,type:"updated",action:t})})},D5);function Qh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var f3=(_5=class extends Fa{constructor(t={}){super();le(this,Wn);le(this,Qr);le(this,Bc);this.config=t,J(this,Wn,new Set),J(this,Qr,new Map),J(this,Bc,0)}build(t,r,n){const s=new p3({client:t,mutationCache:this,mutationId:++nd(this,Bc)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){N(this,Wn).add(t);const r=$c(t);if(typeof r=="string"){const n=N(this,Qr).get(r);n?n.push(t):N(this,Qr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,Wn).delete(t)){const r=$c(t);if(typeof r=="string"){const n=N(this,Qr).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&N(this,Qr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=$c(t);if(typeof r=="string"){const n=N(this,Qr).get(r),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=$c(t);if(typeof r=="string"){const s=(n=N(this,Qr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){kt.batch(()=>{N(this,Wn).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,Wn).clear(),N(this,Qr).clear()})}getAll(){return Array.from(N(this,Wn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Nh(r,n))}findAll(t={}){return this.getAll().filter(r=>Nh(t,r))}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Gt))))}},Wn=new WeakMap,Qr=new WeakMap,Bc=new WeakMap,_5);function $c(e){var t;return(t=e.options.scope)==null?void 0:t.id}var m3=(M5=class extends Fa{constructor(t,r){super();le(this,Yn);le(this,qn);le(this,Ss);le(this,sr);le(this,Kn);J(this,qn,t),this.setOptions(r),this.bindMethods(),Se(this,Yn,sd).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=N(this,qn).defaultMutationOptions(t),zc(this.options,r)||N(this,qn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,sr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Rs(r.mutationKey)!==Rs(this.options.mutationKey)?this.reset():((n=N(this,sr))==null?void 0:n.state.status)==="pending"&&N(this,sr).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,sr))==null||t.removeObserver(this)}onMutationUpdate(t){Se(this,Yn,sd).call(this),Se(this,Yn,_m).call(this,t)}getCurrentResult(){return N(this,Ss)}reset(){var t;(t=N(this,sr))==null||t.removeObserver(this),J(this,sr,void 0),Se(this,Yn,sd).call(this),Se(this,Yn,_m).call(this)}mutate(t,r){var n;return J(this,Kn,r),(n=N(this,sr))==null||n.removeObserver(this),J(this,sr,N(this,qn).getMutationCache().build(N(this,qn),this.options)),N(this,sr).addObserver(this),N(this,sr).execute(t)}},qn=new WeakMap,Ss=new WeakMap,sr=new WeakMap,Kn=new WeakMap,Yn=new WeakSet,sd=function(){var r;const t=((r=N(this,sr))==null?void 0:r.state)??Qh();J(this,Ss,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},_m=function(t){kt.batch(()=>{var r,n,s,a,o,i,c,l;if(N(this,Kn)&&this.hasListeners()){const u=N(this,Ss).variables,d=N(this,Ss).context,f={client:N(this,qn),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((n=(r=N(this,Kn)).onSuccess)==null||n.call(r,t.data,u,d,f),(a=(s=N(this,Kn)).onSettled)==null||a.call(s,t.data,null,u,d,f)):(t==null?void 0:t.type)==="error"&&((i=(o=N(this,Kn)).onError)==null||i.call(o,t.error,u,d,f),(l=(c=N(this,Kn)).onSettled)==null||l.call(c,void 0,t.error,u,d,f))}this.listeners.forEach(u=>{u(N(this,Ss))})})},M5),h3=(N5=class extends Fa{constructor(t={}){super();le(this,xn);this.config=t,J(this,xn,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??Cd(s,r);let o=this.get(a);return o||(o=new i3({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){N(this,xn).has(t.queryHash)||(N(this,xn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,xn).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,xn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,xn).get(t)}getAll(){return[...N(this,xn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Mh(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Mh(t,n)):r}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xn=new WeakMap,N5),b3=(L5=class{constructor(e={}){le(this,mt);le(this,Ps);le(this,Is);le(this,_o);le(this,Mo);le(this,Bs);le(this,No);le(this,Lo);J(this,mt,e.queryCache||new h3),J(this,Ps,e.mutationCache||new f3),J(this,Is,e.defaultOptions||{}),J(this,_o,new Map),J(this,Mo,new Map),J(this,Bs,0)}mount(){nd(this,Bs)._++,N(this,Bs)===1&&(J(this,No,Pd.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,mt).onFocus())})),J(this,Lo,Hc.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,mt).onOnline())})))}unmount(){var e,t;nd(this,Bs)._--,N(this,Bs)===0&&((e=N(this,No))==null||e.call(this),J(this,No,void 0),(t=N(this,Lo))==null||t.call(this),J(this,Lo,void 0))}isFetching(e){return N(this,mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Ps).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,mt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=N(this,mt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Jn(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return N(this,mt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=N(this,mt).get(n.queryHash),a=s==null?void 0:s.state.data,o=Xw(t,a);if(o!==void 0)return N(this,mt).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return kt.batch(()=>N(this,mt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=N(this,mt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=N(this,mt);kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,mt);return kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=kt.batch(()=>N(this,mt).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Gt).catch(Gt)}invalidateQueries(e,t={}){return kt.batch(()=>(N(this,mt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=kt.batch(()=>N(this,mt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(Gt)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Gt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=N(this,mt).build(this,t);return r.isStaleByTime(Jn(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Gt).catch(Gt)}fetchInfiniteQuery(e){return e.behavior=Zh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Gt).catch(Gt)}ensureInfiniteQueryData(e){return e.behavior=Zh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Hc.isOnline()?N(this,Ps).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,mt)}getMutationCache(){return N(this,Ps)}getDefaultOptions(){return N(this,Is)}setDefaultOptions(e){J(this,Is,e)}setQueryDefaults(e,t){N(this,_o).set(Rs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,_o).values()],r={};return t.forEach(n=>{Ro(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){N(this,Mo).set(Rs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,Mo).values()],r={};return t.forEach(n=>{Ro(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,Is).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Cd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Rc&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,Is).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,mt).clear(),N(this,Ps).clear()}},mt=new WeakMap,Ps=new WeakMap,Is=new WeakMap,_o=new WeakMap,Mo=new WeakMap,Bs=new WeakMap,No=new WeakMap,Lo=new WeakMap,L5),Jh=Et.createContext(void 0),Ud=e=>{const t=Et.useContext(Jh);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},y3=({client:e,children:t})=>(Et.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),C.jsx(Jh.Provider,{value:e,children:t})),e1=Et.createContext(!1),g3=()=>Et.useContext(e1);e1.Provider;function x3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var w3=Et.createContext(x3()),v3=()=>Et.useContext(w3),E3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},k3=e=>{Et.useEffect(()=>{e.clearReset()},[e])},C3=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||Hh(r,[e.error,n])),T3=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},A3=(e,t)=>e.isLoading&&e.isFetching&&!t,S3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,t1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function P3(e,t,r){var d,f,m,b,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=g3(),s=v3(),a=Ud(),o=a.defaultQueryOptions(e);(f=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=n?"isRestoring":"optimistic",T3(o),E3(o,s),k3(s);const i=!a.getQueryCache().get(o.queryHash),[c]=Et.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(Et.useSyncExternalStore(Et.useCallback(E=>{const v=u?c.subscribe(kt.batchCalls(E)):Gt;return c.updateResult(),v},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Et.useEffect(()=>{c.setOptions(o)},[o,c]),S3(o,l))throw t1(o,c,s);if(C3({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((b=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||b.call(m,o,l),o.experimental_prefetchInRender&&!zs&&A3(l,n)){const E=i?t1(o,c,s):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;E==null||E.catch(Gt).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function I3(e,t){return P3(e,c3)}function en(e,t){const r=Ud(),[n]=Et.useState(()=>new m3(r,e));Et.useEffect(()=>{n.setOptions(e)},[n,e]);const s=Et.useSyncExternalStore(Et.useCallback(o=>n.subscribe(kt.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=Et.useCallback((o,i)=>{n.mutate(o,i).catch(Gt)},[n]);if(s.error&&Hh(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}const B3=M.createContext(null),Dd={didCatch:!1,error:null};class F3 extends M.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Dd}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:a,reason:"imperative-api"}),this.setState(Dd)}}componentDidCatch(t,r){var n,s;(n=(s=this.props).onError)===null||n===void 0||n.call(s,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:s}=this.props;if(n&&r.error!==null&&O3(t.resetKeys,s)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:s,prev:t.resetKeys,reason:"keys"}),this.setState(Dd)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:s}=this.props,{didCatch:a,error:o}=this.state;let i=t;if(a){const c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")i=r(c);else if(n)i=M.createElement(n,c);else if(s!==void 0)i=s;else throw o}return M.createElement(B3.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}}function O3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const r1=e=>{let t;const r=new Set,n=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(m=>m(t,f))}},s=()=>t,i={setState:n,getState:s,getInitialState:()=>c,subscribe:l=>(r.add(l),()=>r.delete(l))},c=t=e(n,s,i);return i},U3=(e=>e?r1(e):r1),D3=e=>e;function _3(e,t=D3){const r=M.useSyncExternalStore(e.subscribe,M.useCallback(()=>t(e.getState()),[e,t]),M.useCallback(()=>t(e.getInitialState()),[e,t]));return M.useDebugValue(r),r}const n1=e=>{const t=U3(e),r=n=>_3(t,n);return Object.assign(r,t),r},M3=(e=>e?n1(e):n1),_d={disclaimerAccepted:!0,currentTime:Date.now(),swapExecution:{}},ee=M3((e,t)=>({state:_d,updateState:r=>e(n=>({state:{...n.state,...r}})),updateSwapExecution:r=>e(n=>({state:{...n.state,swapExecution:{...n.state.swapExecution,...r}}})),resetSwapExecution:r=>e(n=>({state:{...n.state,swapExecution:{..._d.swapExecution,...r}}})),resetState:r=>{e({state:{..._d,currentTime:Date.now(),swapExecution:{...t().state.swapExecution,acceptedMarketPrice:void 0,acceptedSrcAmount:void 0},isMarketOrder:t().state.isMarketOrder,...r}}),setTimeout(()=>{t().resetSwapExecution()},1e3)}}));(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".orbs_OrbsLogo{object-fit:contain;display:inline}.orbs_PoweredBy{border-radius:8px;margin-left:auto;margin-right:auto}.orbs_PoweredBy a{display:flex;align-items:center;justify-content:center;text-decoration:none;color:inherit}.orbs_PoweredBy span{font-size:14px}.orbs_PoweredBy .orbs_OrbsLogo{margin-left:6px;margin-right:6px;width:18px;height:18px}.orbs_Text{margin:0;padding:0}.orbs_Spinner{width:var(--size, 38px);height:var(--size, 38px);border:var(--border-width, 3px) solid var(--border-color, white);border-bottom-color:var(--bottom-border-color, rgba(255, 255, 255, .2));border-radius:50%;display:inline-block;box-sizing:border-box;animation:orbs_rotation 1s linear infinite}@keyframes orbs_rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.orbs_TradeStepLayout{--layout-min-height: 220px;--layout-width: 100%;--layout-display: flex;--layout-direction: column;--layout-align: center;--layout-overflow: visible;display:var(--layout-display);flex-direction:var(--layout-direction);align-items:var(--layout-align);width:var(--layout-width);min-height:var(--layout-min-height);overflow:var(--layout-overflow)}.orbs_TradeStepLayoutBody{--body-gap: 20px;--body-margin-top: 30px;--body-width: 100%;--body-display: flex;--body-direction: column;--body-align: center;--body-overflow: visible;gap:var(--body-gap);align-items:var(--body-align);display:var(--body-display);flex-direction:var(--body-direction);width:var(--body-width);margin-top:var(--body-margin-top);overflow:var(--body-overflow)}.orbs_TradeStepLayoutHeader{--header-gap: 30px;--header-display: flex;--header-direction: column;--header-align: center;--header-justify: center;--header-overflow: visible;display:var(--header-display);flex-direction:var(--header-direction);align-items:var(--header-align);justify-content:var(--header-justify);gap:var(--header-gap);overflow:var(--header-overflow)}.orbs_TradeStepLayoutTitle{--title-font-size: 18px;--title-font-weight: 500;--title-line-height: normal;--title-color: inherit;--title-text-align: center;--title-margin: 0;--title-padding: 0;font-size:var(--title-font-size);font-weight:var(--title-font-weight);line-height:var(--title-line-height);color:var(--title-color);text-align:var(--title-text-align);margin:var(--title-margin);padding:var(--title-padding)}.orbs_StepIndicator{--indicator-display: flex;--indicator-align: center;--indicator-justify: flex-start;--indicator-height: 7px;--indicator-width: 120px;--indicator-border-radius: 999px;--indicator-bg-color: white;--indicator-margin-bottom: 20px;--indicator-position: relative;--indicator-overflow: hidden;--indicator-border: none;--indicator-box-shadow: none;display:var(--indicator-display);align-items:var(--indicator-align);justify-content:var(--indicator-justify);height:var(--indicator-height);width:var(--indicator-width);border-radius:var(--indicator-border-radius);overflow:var(--indicator-overflow);background-color:var(--indicator-bg-color);margin-bottom:var(--indicator-margin-bottom);position:var(--indicator-position);border:var(--indicator-border);box-shadow:var(--indicator-box-shadow)}.orbs_StepIndicatorLine{--line-height: 100%;--line-bg-color: black;--line-position: absolute;--line-top: 0;--line-left: 0;--line-right: 0;--line-bottom: 0;--line-transition: all .3s ease;--line-border-radius: inherit;--line-box-shadow: none;height:var(--line-height);background-color:var(--line-bg-color);position:var(--line-position);top:var(--line-top);left:var(--line-left);right:var(--line-right);bottom:var(--line-bottom);transition:var(--line-transition);border-radius:var(--line-border-radius);box-shadow:var(--line-box-shadow)}.orbs_TradeStepLayoutFooter{--footer-display: flex;--footer-align: center;--footer-justify: center;--footer-direction: column;--footer-margin-top: auto;--footer-padding-top: 30px;--footer-width: 100%;--footer-overflow: visible;--footer-border-top: none;display:var(--footer-display);align-items:var(--footer-align);justify-content:var(--footer-justify);flex-direction:var(--footer-direction);margin-top:var(--footer-margin-top);padding-top:var(--footer-padding-top);width:var(--footer-width);overflow:var(--footer-overflow);border-top:var(--footer-border-top)}.orbs_TradeStepLayoutFooter p{--footer-text-font-size: 15px;--footer-text-line-height: normal;--footer-text-color: inherit;--footer-text-margin: 0;--footer-text-padding: 0;font-size:var(--footer-text-font-size);line-height:var(--footer-text-line-height);color:var(--footer-text-color);margin:var(--footer-text-margin);padding:var(--footer-text-padding)}.orbs_TradeStepLayoutFooterLink{--link-color: inherit;--link-text-decoration: none;--link-font-size: 15px;--link-text-align: center;--link-margin: auto;--link-outline: none;--link-line-height: normal;--link-padding: 0;--link-transition: color .2s ease;--link-hover-color: inherit;--link-hover-text-decoration: underline;color:var(--link-color);text-decoration:var(--link-text-decoration);font-size:var(--link-font-size);text-align:var(--link-text-align);margin-left:var(--link-margin);margin-right:var(--link-margin);outline:var(--link-outline);line-height:var(--link-line-height);padding:var(--link-padding);transition:var(--link-transition)}.orbs_TradeStepLayoutFooterLink:hover{color:var(--link-hover-color);text-decoration:var(--link-hover-text-decoration)}.orbs_TradeStepLayoutSuccessIcon{--success-icon-display: flex;--success-icon-justify: center;--success-icon-align: center;--success-icon-width: 60px;--success-icon-height: 60px;--success-icon-border-radius: 50%;--success-icon-overflow: visible;--success-icon-bg-color: transparent;--success-icon-border: none;--success-icon-box-shadow: none;display:var(--success-icon-display);justify-content:var(--success-icon-justify);align-items:var(--success-icon-align);width:var(--success-icon-width);height:var(--success-icon-height);border-radius:var(--success-icon-border-radius);overflow:var(--success-icon-overflow);background-color:var(--success-icon-bg-color);border:var(--success-icon-border);box-shadow:var(--success-icon-box-shadow)}.orbs_TradeStepLayoutErrorIcon{--error-icon-width: 80px;--error-icon-height: 80px;--error-icon-display: flex;--error-icon-justify: center;--error-icon-align: center;--error-icon-overflow: visible;--error-icon-bg-color: transparent;--error-icon-border: none;--error-icon-box-shadow: none;width:var(--error-icon-width);height:var(--error-icon-height);display:var(--error-icon-display);justify-content:var(--error-icon-justify);align-items:var(--error-icon-align);overflow:var(--error-icon-overflow);background-color:var(--error-icon-bg-color);border:var(--error-icon-border);box-shadow:var(--error-icon-box-shadow)}.orbs_FailedContentMsg{font-size:22px;font-weight:500}.orbs_TradePreview{display:flex;align-items:center;justify-content:center;gap:8px;width:100%}.orbs_TradePreviewToken{display:flex;align-items:center;gap:6px;max-width:calc(50% - 30px)}.orbs_TradePreviewToken p{--token-font-size: 15px;--token-white-space: nowrap;--token-overflow: hidden;--token-text-overflow: ellipsis;--token-flex: 1;--token-margin: 0;--token-padding: 0;font-size:var(--token-font-size);white-space:var(--token-white-space);overflow:var(--token-overflow);text-overflow:var(--token-text-overflow);flex:var(--token-flex);margin:var(--token-margin)}.orbs_TradepPreviewIcon{width:22px;height:22px}.orbs_TradepPreviewLogo{width:24px;height:24px;border-radius:50%;overflow:hidden}.orbs_FlexRow{display:flex;flex-direction:row}.orbs_FlexColumn{display:flex;flex-direction:column}@keyframes orbs_skeletonAnimation{0%{opacity:.2}to{opacity:.4}}.orbs_SkeletonLoader{animation:orbs_skeletonAnimation 1s linear infinite alternate;background-color:#fff}.orbs_Main-wrapper{width:100%}.orbs_Main{width:100%;display:flex;flex-direction:column;gap:28px}.orbs_MainToken{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:8px}.orbs_MainTokenLeft{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.orbs_MainTokenUsd{display:flex;align-items:center;gap:5px}.orbs_MainTokenUsd small{font-size:12px;opacity:.6}.orbs_MainContentLoader{width:100%;display:flex;gap:15px;align-items:center;margin-top:20px}.orbs_MainContentRectengularLoader{flex:1;height:20px;max-width:250px;border-radius:20px}.orbs_MainContentCircleLoader{width:30px;height:30px;border-radius:50%}.orbs_MainTokenLogo{--width: 40px;--height: 40px;width:var(--width);height:var(--height)}.orbs_MainTokenLogo img{width:100%;height:100%;object-fit:cover}.orbs_SwapFlow{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}.orbs_SwapFlow *{box-sizing:border-box}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const Le=e=>`orbs_${e}`;function Ho({children:e,className:t=""}){return C.jsx("p",{className:`${t} ${Le("Text")}`,children:e})}const s1=M.createContext({});function N3({children:e,...t}){return C.jsx(s1.Provider,{value:t,children:e})}const tn=()=>M.useContext(s1);var pt=(e=>(e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILED=3]="FAILED",e))(pt||{});const L3=({className:e="",size:t=38,borderWidth:r=3,borderColor:n="white",bottomBorderColor:s="rgba(255, 255, 255, 0.2)"})=>{const a={"--size":`${t}px`,"--border-width":`${r}px`,"--border-color":n,"--bottom-border-color":s};return C.jsx("div",{className:`${Le("Spinner")} ${e}`,style:a})};function Gc({className:e="",body:t,footerLink:r,footerText:n,title:s,children:a}){return C.jsxs("div",{className:`${Le("TradeStepLayout")} ${e}`,children:[C.jsxs("div",{className:Le("TradeStepLayoutHeader"),children:[C.jsx(G3,{}),s&&C.jsx(Ho,{className:Le("TradeStepLayoutTitle"),children:s})]}),t&&C.jsx("div",{className:Le("TradeStepLayoutBody"),children:t}),C.jsx(z3,{link:r,text:n}),a]})}const z3=({link:e,text:t})=>{const{swapStatus:r}=tn();return!e&&!t?null:C.jsxs("div",{className:Le("TradeStepLayoutFooter"),children:[C.jsx(V3,{}),e?C.jsx(R3,{link:e,text:t}):r===pt.FAILED?void 0:C.jsx(Ho,{children:t})]})},R3=({link:e,text:t})=>C.jsx("a",{target:"_blank",className:Le("TradeStepLayoutFooterLink"),href:e,children:t});function H3(){const{components:e}=tn();return e.SuccessIcon?e.SuccessIcon:C.jsxs("svg",{fill:"none",viewBox:"0 0 16 16",className:Le("TradeStepLayoutSuccessIcon"),children:[C.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#00C853"}),C.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#00C853",d:"M5 8l2 2 4-4"})]})}function $3(){const{components:e}=tn();return e.FailedIcon?e.FailedIcon:C.jsxs("svg",{className:Le("TradeStepLayoutErrorIcon"),viewBox:"0 0 16 16",fill:"none",children:[C.jsx("circle",{cx:"8",cy:"8",r:"7",strokeWidth:"1.5",stroke:"#FF3D00"}),C.jsx("path",{strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#FF3D00",d:"M8 4v5M8 11h.01"})]})}const G3=()=>{const{swapStatus:e}=tn();return e===pt.SUCCESS?C.jsx(H3,{}):e===pt.FAILED?C.jsx($3,{}):C.jsx(j3,{})},j3=()=>{const{components:e}=tn();return e.Loader?e.Loader:C.jsx(L3,{size:60,borderWidth:5,className:Le("TradeStepLayoutSpinner")})},V3=()=>{const{totalSteps:e,currentStepIndex:t=0,swapStatus:r}=tn();return r!==pt.LOADING||e===1?null:C.jsx("div",{className:Le("StepIndicator"),children:C.jsx("div",{style:{width:`${100/(e||0)}%`,left:`${t*100/(e||0)}%`},className:Le("StepIndicatorLine")})})},W3=({error:e,footerLink:t,footerText:r})=>C.jsx(Gc,{footerLink:t,footerText:r,body:e||C.jsx("p",{className:Le("FailedContentMsg"),children:"Something went wrong"}),className:Le("FailedContent")});function q3(){return C.jsx("svg",{fill:"currentColor",viewBox:"0 0 16 16",className:Le("TradepPreviewIcon"),children:C.jsx("path",{fillRule:"evenodd",d:"M4 8a.5.5 0 01.5-.5h5.793L8.146 5.354a.5.5 0 11.708-.708l3 3a.5.5 0 010 .708l-3 3a.5.5 0 01-.708-.708L10.293 8.5H4.5A.5.5 0 014 8z"})})}const a1=({inTokenOnly:e})=>{const{inToken:t,outToken:r,inAmount:n,outAmount:s,components:a}=tn();return C.jsxs("div",{className:Le("TradePreview"),children:[C.jsx(o1,{token:t,amount:n,Logo:a==null?void 0:a.SrcTokenLogo}),!e&&C.jsxs(C.Fragment,{children:[C.jsx(q3,{}),C.jsx(o1,{token:r,amount:s,Logo:a==null?void 0:a.DstTokenLogo})]})]})},o1=({token:e,amount:t,Logo:r})=>C.jsxs("div",{className:Le("TradePreviewToken"),children:[r||C.jsx("img",{src:e==null?void 0:e.logoUrl,className:Le("TradepPreviewLogo"),alt:`${e==null?void 0:e.symbol} logo`}),C.jsxs(Ho,{children:[t," ",e==null?void 0:e.symbol]})]});function K3({title:e,footerLink:t,footerText:r,hideTokens:n}){return C.jsx(Gc,{title:e,className:Le("Success"),body:!n&&C.jsx(a1,{}),footerLink:t,footerText:r})}const i1=({$gap:e=10,$alignItems:t="flex-start",children:r,className:n="",customStyles:s={}})=>{const a={gap:`${e}px`,alignItems:t,width:"100%",...s};return C.jsx("div",{className:`${Le("FlexColumn")} ${n}`,style:a,children:r})};function c1({styles:e={},className:t=""}){return C.jsx("div",{style:e,className:`${Le("SkeletonLoader")} ${t}`})}const Y3=()=>C.jsxs("div",{className:`${Le("MainContentLoader")}`,children:[C.jsx(c1,{className:`${Le("MainContentCircleLoader")}`}),C.jsx(c1,{className:`${Le("MainContentRectengularLoader")}`})]}),Z3=({fromTitle:e,toTitle:t,inUsd:r,outUsd:n})=>{const{swapStatus:s,outAmount:a,inAmount:o,inToken:i,outToken:c,components:l,totalSteps:u}=tn(),d=C.jsx(u1,{fromTitle:e,inUsd:r,inToken:i,toTitle:t,outUsd:n,outToken:c,inAmount:o,outAmount:a,SrcTokenLogo:l.SrcTokenLogo,DstTokenLogo:l.DstTokenLogo});return s?u?C.jsx(X3,{}):C.jsxs(i1,{children:[d,C.jsx(Y3,{})]}):C.jsx(i1,{children:d})},l1=({amount:e,token:t,usd:r,title:n,Logo:s})=>C.jsxs("div",{className:`${Le("MainToken")}`,children:[C.jsxs("div",{className:`${Le("MainTokenLeft")}`,children:[C.jsx(Ho,{className:`${Le("MainTokenTitle")}`,children:n}),C.jsx(Ho,{className:` ${Le("MainTokenAmount")}`,children:`${e&&Number(e)>0?e:""} ${(t==null?void 0:t.symbol)||""}`}),r&&C.jsx("div",{className:` ${Le("MainTokenUsd")}`,children:r})]}),s||C.jsx("div",{className:` ${Le("MainTokenLogo")}`,children:t!=null&&t.logoUrl?C.jsx("img",{src:t==null?void 0:t.logoUrl,alt:"Token logo"}):null})]});function X3(){const{currentStep:e}=tn();return e?C.jsx(Gc,{footerLink:e.footerLink,footerText:e.footerText,title:e.title,body:e.hideTokens?void 0:C.jsx(a1,{inTokenOnly:e==null?void 0:e.inTokenOnly})}):null}const u1=({fromTitle:e,inUsd:t,inToken:r,toTitle:n,outUsd:s,outToken:a,inAmount:o,outAmount:i,SrcTokenLogo:c,DstTokenLogo:l})=>C.jsxs("div",{className:`${Le("Main")}`,children:[C.jsx(l1,{title:e||"Swap from",usd:t,token:r,amount:o,Logo:c}),C.jsx(l1,{title:n||"Swap to",usd:s,token:a,amount:i,Logo:l})]}),es=e=>C.jsx(N3,{...e,children:C.jsx(Q3,{})}),Q3=()=>{const{swapStatus:e,components:t,className:r}=tn();return C.jsx("div",{className:`${Le("SwapFlow")} ${r}`,children:e===pt.SUCCESS?t==null?void 0:t.Success:e===pt.FAILED?t==null?void 0:t.Failed:t==null?void 0:t.Main})};es.Success=K3,es.Failed=W3,es.Main=Z3,es.StepLayout=Gc;var Hs=(e=>(e.WRAP="wrap",e.APPROVE="approve",e.CREATE="create",e))(Hs||{});const J3="1.2.3";let Yt=class Mm extends Error{constructor(t,r={}){var o;const n=r.cause instanceof Mm?r.cause.details:(o=r.cause)!=null&&o.message?r.cause.message:r.details,s=r.cause instanceof Mm&&r.cause.docsPath||r.docsPath,a=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${J3}`].join(`
65
- `);super(a),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"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=t}};function En(e,t){const r=e.exec(t);return r==null?void 0:r.groups}const d1=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,p1=/^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)?$/,f1=/^\(.+?\).*?$/,m1=/^tuple(?<array>(\[(\d*)\])*)$/;function Md(e){let t=e.type;if(m1.test(e.type)&&"components"in e){t="(";const r=e.components.length;for(let s=0;s<r;s++){const a=e.components[s];t+=Md(a),s<r-1&&(t+=", ")}const n=En(m1,e.type);return t+=`)${(n==null?void 0:n.array)||""}`,Md({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Oa(e){let t="";const r=e.length;for(let n=0;n<r;n++){const s=e[n];t+=Md(s),n!==r-1&&(t+=", ")}return t}function jc(e){var t;return e.type==="function"?`function ${e.name}(${Oa(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${Oa(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Oa(e.inputs)})`:e.type==="error"?`error ${e.name}(${Oa(e.inputs)})`:e.type==="constructor"?`constructor(${Oa(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const h1=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function e8(e){return h1.test(e)}function t8(e){return En(h1,e)}const b1=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function r8(e){return b1.test(e)}function n8(e){return En(b1,e)}const y1=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function s8(e){return y1.test(e)}function a8(e){return En(y1,e)}const g1=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function Vc(e){return g1.test(e)}function o8(e){return En(g1,e)}const x1=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function i8(e){return x1.test(e)}function c8(e){return En(x1,e)}const w1=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function l8(e){return w1.test(e)}function u8(e){return En(w1,e)}const d8=/^receive\(\) external payable$/;function p8(e){return d8.test(e)}const v1=new Set(["memory","indexed","storage","calldata"]),f8=new Set(["indexed"]),Nd=new Set(["calldata","memory","storage"]);class m8 extends Yt{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class h8 extends Yt{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 b8 extends Yt{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 y8 extends Yt{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class g8 extends Yt{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class x8 extends Yt{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" 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 w8 extends Yt{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class v8 extends Yt{constructor({param:t,type:r,modifier:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class E8 extends Yt{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 Ua extends Yt{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class k8 extends Yt{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class C8 extends Yt{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 T8 extends Yt{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 A8 extends Yt{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function S8(e,t,r){let n="";if(r)for(const s of Object.entries(r)){if(!s)continue;let a="";for(const o of s[1])a+=`[${o.type}${o.name?`:${o.name}`:""}]`;n+=`(${s[0]}{${a}})`}return t?`${t}:${e}${n}`:`${e}${n}`}const Ld=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 zd(e,t={}){if(s8(e))return P8(e,t);if(r8(e))return I8(e,t);if(e8(e))return B8(e,t);if(i8(e))return F8(e,t);if(l8(e))return O8(e);if(p8(e))return{type:"receive",stateMutability:"payable"};throw new k8({signature:e})}function P8(e,t={}){const r=a8(e);if(!r)throw new Ua({signature:e,type:"function"});const n=or(r.parameters),s=[],a=n.length;for(let i=0;i<a;i++)s.push(kn(n[i],{modifiers:Nd,structs:t,type:"function"}));const o=[];if(r.returns){const i=or(r.returns),c=i.length;for(let l=0;l<c;l++)o.push(kn(i[l],{modifiers:Nd,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:s,outputs:o}}function I8(e,t={}){const r=n8(e);if(!r)throw new Ua({signature:e,type:"event"});const n=or(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(kn(n[o],{modifiers:f8,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:s}}function B8(e,t={}){const r=t8(e);if(!r)throw new Ua({signature:e,type:"error"});const n=or(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(kn(n[o],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:s}}function F8(e,t={}){const r=c8(e);if(!r)throw new Ua({signature:e,type:"constructor"});const n=or(r.parameters),s=[],a=n.length;for(let o=0;o<a;o++)s.push(kn(n[o],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:s}}function O8(e){const t=u8(e);if(!t)throw new Ua({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const U8=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,D8=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,_8=/^u?int$/;function kn(e,t){var d,f;const r=S8(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(Ld.has(r))return Ld.get(r);const n=f1.test(e),s=En(n?D8:U8,e);if(!s)throw new g8({param:e});if(s.name&&N8(s.name))throw new x8({param:e,name:s.name});const a=s.name?{name:s.name}:{},o=s.modifier==="indexed"?{indexed:!0}:{},i=(t==null?void 0:t.structs)??{};let c,l={};if(n){c="tuple";const m=or(s.type),b=[],g=m.length;for(let E=0;E<g;E++)b.push(kn(m[E],{structs:i}));l={components:b}}else if(s.type in i)c="tuple",l={components:i[s.type]};else if(_8.test(s.type))c=`${s.type}256`;else if(s.type==="address payable")c="address";else if(c=s.type,(t==null?void 0:t.type)!=="struct"&&!E1(c))throw new b8({type:c});if(s.modifier){if(!((f=(d=t==null?void 0:t.modifiers)==null?void 0:d.has)!=null&&f.call(d,s.modifier)))throw new w8({param:e,type:t==null?void 0:t.type,modifier:s.modifier});if(Nd.has(s.modifier)&&!L8(c,!!s.array))throw new v8({param:e,type:t==null?void 0:t.type,modifier:s.modifier})}const u={type:`${c}${s.array??""}`,...a,...o,...l};return Ld.set(r,u),u}function or(e,t=[],r="",n=0){const s=e.trim().length;for(let a=0;a<s;a++){const o=e[a],i=e.slice(a+1);switch(o){case",":return n===0?or(i,[...t,r.trim()]):or(i,t,`${r}${o}`,n);case"(":return or(i,t,`${r}${o}`,n+1);case")":return or(i,t,`${r}${o}`,n-1);default:return or(i,t,`${r}${o}`,n)}}if(r==="")return t;if(n!==0)throw new A8({current:r,depth:n});return t.push(r.trim()),t}function E1(e){return e==="address"||e==="bool"||e==="function"||e==="string"||d1.test(e)||p1.test(e)}const M8=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function N8(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||d1.test(e)||p1.test(e)||M8.test(e)}function L8(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function Rd(e){const t={},r=e.length;for(let o=0;o<r;o++){const i=e[o];if(!Vc(i))continue;const c=o8(i);if(!c)throw new Ua({signature:i,type:"struct"});const l=c.properties.split(";"),u=[],d=l.length;for(let f=0;f<d;f++){const b=l[f].trim();if(!b)continue;const g=kn(b,{type:"struct"});u.push(g)}if(!u.length)throw new C8({signature:i});t[c.name]=u}const n={},s=Object.entries(t),a=s.length;for(let o=0;o<a;o++){const[i,c]=s[o];n[i]=k1(c,t)}return n}const z8=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function k1(e=[],t={},r=new Set){const n=[],s=e.length;for(let a=0;a<s;a++){const o=e[a];if(f1.test(o.type))n.push(o);else{const c=En(z8,o.type);if(!(c!=null&&c.type))throw new E8({abiParameter:o});const{array:l,type:u}=c;if(u in t){if(r.has(u))throw new T8({type:u});n.push({...o,type:`tuple${l??""}`,components:k1(t[u],t,new Set([...r,u]))})}else if(E1(u))n.push(o);else throw new h8({type:u})}}return n}function C1(e){const t=Rd(e),r=[],n=e.length;for(let s=0;s<n;s++){const a=e[s];Vc(a)||r.push(zd(a,t))}return r}function T1(e){let t;if(typeof e=="string")t=zd(e);else{const r=Rd(e),n=e.length;for(let s=0;s<n;s++){const a=e[s];if(!Vc(a)){t=zd(a,r);break}}}if(!t)throw new m8({signature:e});return t}function A1(e){const t=[];if(typeof e=="string"){const r=or(e),n=r.length;for(let s=0;s<n;s++)t.push(kn(r[s],{modifiers:v1}))}else{const r=Rd(e),n=e.length;for(let s=0;s<n;s++){const a=e[s];if(Vc(a))continue;const o=or(a),i=o.length;for(let c=0;c<i;c++)t.push(kn(o[c],{modifiers:v1,structs:r}))}}if(t.length===0)throw new y8({params:e});return t}function se(e,t,r){const n=e[t.name];if(typeof n=="function")return n;const s=e[r];return typeof s=="function"?s:a=>t(e,a)}function _r(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new J8(e.type);return`${e.name}(${Wc(e.inputs,{includeName:t})})`}function Wc(e,{includeName:t=!1}={}){return e?e.map(r=>R8(r,{includeName:t})).join(t?", ":","):""}function R8(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Wc(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function Mr(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function lt(e){return Mr(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const S1="2.43.3";let $o={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${S1}`},$=class Nm extends Error{constructor(t,r={}){var i;const n=(()=>{var c;return r.cause instanceof Nm?r.cause.details:(c=r.cause)!=null&&c.message?r.cause.message:r.details})(),s=r.cause instanceof Nm&&r.cause.docsPath||r.docsPath,a=(i=$o.getDocsUrl)==null?void 0:i.call($o,{...r,docsPath:s}),o=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...$o.version?[`Version: ${$o.version}`]:[]].join(`
66
- `);super(o,r.cause?{cause:r.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=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=S1}walk(t){return P1(this,t)}};function P1(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?P1(e.cause,t):t?null:e}class H8 extends ${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(`
67
- `),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class I1 extends ${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(`
68
- `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class B1 extends ${constructor({data:t,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(`
69
- `),{metaMessages:[`Params: (${Wc(r,{includeName:!0})})`,`Data: ${t} (${n} 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=r,this.size=n}}class Go extends ${constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class $8 extends ${constructor({expectedLength:t,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${t}`,`Given length: ${r}`].join(`
70
- `),{name:"AbiEncodingArrayLengthMismatchError"})}}class G8 extends ${constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${lt(r)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class j8 extends ${constructor({expectedLength:t,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${r}`].join(`
71
- `),{name:"AbiEncodingLengthMismatchError"})}}class V8 extends ${constructor(t,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
72
- `),{docsPath:r,name:"AbiErrorInputsNotFoundError"})}}class F1 extends ${constructor(t,{docsPath:r}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
73
- `),{docsPath:r,name:"AbiErrorNotFoundError"})}}class O1 extends ${constructor(t,{docsPath:r}){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(`
74
- `),{docsPath:r,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class W8 extends ${constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class q8 extends ${constructor(t,{docsPath:r}){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(`
75
- `),{docsPath:r,name:"AbiEventSignatureNotFoundError"})}}class U1 extends ${constructor(t,{docsPath:r}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
76
- `),{docsPath:r,name:"AbiEventNotFoundError"})}}class Da extends ${constructor(t,{docsPath:r}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
77
- `),{docsPath:r,name:"AbiFunctionNotFoundError"})}}class D1 extends ${constructor(t,{docsPath:r}){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(`
78
- `),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"})}}class K8 extends ${constructor(t,{docsPath:r}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
79
- `),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"})}}class Y8 extends ${constructor(t,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${_r(t.abiItem)}\`, and`,`\`${r.type}\` in \`${_r(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let Z8=class extends ${constructor({expectedSize:t,givenSize:r}){super(`Expected bytes${t}, got bytes${r}.`,{name:"BytesSizeMismatchError"})}};class qc extends ${constructor({abiItem:t,data:r,params:n,size:s}){super([`Data size of ${s} bytes is too small for non-indexed event parameters.`].join(`
80
- `),{metaMessages:[`Params: (${Wc(n,{includeName:!0})})`,`Data: ${r} (${s} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),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.abiItem=t,this.data=r,this.params=n,this.size=s}}class Hd extends ${constructor({abiItem:t,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${_r(t,{includeName:!0})}".`].join(`
81
- `),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class X8 extends ${constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
82
- `),{docsPath:r,name:"InvalidAbiEncodingType"})}}class Q8 extends ${constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
83
- `),{docsPath:r,name:"InvalidAbiDecodingType"})}}let _1=class extends ${constructor(t){super([`Value "${t}" is not a valid array.`].join(`
84
- `),{name:"InvalidArrayError"})}};class J8 extends ${constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
85
- `),{name:"InvalidDefinitionTypeError"})}}class ev extends ${constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}let M1=class extends ${constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}},N1=class extends ${constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}};class L1 extends ${constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${t} ${n} long.`,{name:"InvalidBytesLengthError"})}}function $s(e,{dir:t,size:r=32}={}){return typeof e=="string"?ts(e,{dir:t,size:r}):tv(e,{dir:t,size:r})}function ts(e,{dir:t,size:r=32}={}){if(r===null)return e;const n=e.replace("0x","");if(n.length>r*2)throw new N1({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function tv(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new N1({size:e.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let s=0;s<r;s++){const a=t==="right";n[a?s:r-s-1]=e[a?s:e.length-s-1]}return n}let z1=class extends ${constructor({max:t,min:r,signed:n,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},rv=class extends ${constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class nv extends ${constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let sv=class extends ${constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function Zt(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,n=0;for(let s=0;s<r.length-1&&r[t==="left"?s:r.length-s-1].toString()==="0";s++)n++;return r=t==="left"?r.slice(n):r.slice(0,r.length-n),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}function Nr(e,{size:t}){if(lt(e)>t)throw new sv({givenSize:lt(e),maxSize:t})}function ze(e,t={}){const{signed:r}=t;t.size&&Nr(e,{size:t.size});const n=BigInt(e);if(!r)return n;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n-1n)-1n;return n<=a?n:n-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function av(e,t={}){let r=e;if(t.size&&(Nr(r,{size:t.size}),r=Zt(r)),Zt(r)==="0x00")return!1;if(Zt(r)==="0x01")return!0;throw new nv(r)}function ir(e,t={}){return Number(ze(e,t))}const ov=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ue(e,t={}){return typeof e=="number"||typeof e=="bigint"?q(e,t):typeof e=="string"?_a(e,t):typeof e=="boolean"?R1(e,t):wt(e,t)}function R1(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(Nr(r,{size:t.size}),$s(r,{size:t.size})):r}function wt(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=ov[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(Nr(n,{size:t.size}),$s(n,{dir:"right",size:t.size})):n}function q(e,t={}){const{signed:r,size:n}=t,s=BigInt(e);let a;n?r?a=(1n<<BigInt(n)*8n-1n)-1n:a=2n**(BigInt(n)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&r?-a-1n:0;if(a&&s>a||s<o){const c=typeof e=="bigint"?"n":"";throw new z1({max:a?`${a}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${e}${c}`})}const i=`0x${(r&&s<0?(1n<<BigInt(n*8))+BigInt(s):s).toString(16)}`;return n?$s(i,{size:n}):i}const iv=new TextEncoder;function _a(e,t={}){const r=iv.encode(e);return wt(r,t)}const cv=new TextEncoder;function Cn(e,t={}){return typeof e=="number"||typeof e=="bigint"?uv(e,t):typeof e=="boolean"?lv(e,t):Mr(e)?cr(e,t):Gs(e,t)}function lv(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(Nr(r,{size:t.size}),$s(r,{size:t.size})):r}const Tn={zero:48,nine:57,A:65,F:70,a:97,f:102};function H1(e){if(e>=Tn.zero&&e<=Tn.nine)return e-Tn.zero;if(e>=Tn.A&&e<=Tn.F)return e-(Tn.A-10);if(e>=Tn.a&&e<=Tn.f)return e-(Tn.a-10)}function cr(e,t={}){let r=e;t.size&&(Nr(r,{size:t.size}),r=$s(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const s=n.length/2,a=new Uint8Array(s);for(let o=0,i=0;o<s;o++){const c=H1(n.charCodeAt(i++)),l=H1(n.charCodeAt(i++));if(c===void 0||l===void 0)throw new $(`Invalid byte sequence ("${n[i-2]}${n[i-1]}" in "${n}").`);a[o]=c*16+l}return a}function uv(e,t){const r=q(e,t);return cr(r)}function Gs(e,t={}){const r=cv.encode(e);return typeof t.size=="number"?(Nr(r,{size:t.size}),$s(r,{dir:"right",size:t.size})):r}const Kc=BigInt(2**32-1),$1=BigInt(32);function dv(e,t=!1){return t?{h:Number(e&Kc),l:Number(e>>$1&Kc)}:{h:Number(e>>$1&Kc)|0,l:Number(e&Kc)|0}}function G1(e,t=!1){const r=e.length;let n=new Uint32Array(r),s=new Uint32Array(r);for(let a=0;a<r;a++){const{h:o,l:i}=dv(e[a],t);[n[a],s[a]]=[o,i]}return[n,s]}const j1=(e,t,r)=>e>>>r,V1=(e,t,r)=>e<<32-r|t>>>r,Ma=(e,t,r)=>e>>>r|t<<32-r,Na=(e,t,r)=>e<<32-r|t>>>r,Yc=(e,t,r)=>e<<64-r|t>>>r-32,Zc=(e,t,r)=>e>>>r-32|t<<64-r,pv=(e,t,r)=>e<<r|t>>>32-r,fv=(e,t,r)=>t<<r|e>>>32-r,mv=(e,t,r)=>t<<r-32|e>>>64-r,hv=(e,t,r)=>e<<r-32|t>>>64-r;function An(e,t,r,n){const s=(t>>>0)+(n>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}const bv=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),yv=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,gv=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),xv=(e,t,r,n,s)=>t+r+n+s+(e/2**32|0)|0,wv=(e,t,r,n,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(s>>>0),vv=(e,t,r,n,s,a)=>t+r+n+s+a+(e/2**32|0)|0,La=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ev(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function jo(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function js(e,...t){if(!Ev(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function kv(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");jo(e.outputLen),jo(e.blockLen)}function za(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 W1(e,t){js(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Cv(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function rs(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function $d(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function rn(e,t){return e<<32-t|e>>>t}const Tv=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Av(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Sv(e){for(let t=0;t<e.length;t++)e[t]=Av(e[t]);return e}const q1=Tv?e=>e:Sv;function Pv(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Xc(e){return typeof e=="string"&&(e=Pv(e)),js(e),e}function Iv(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];js(s),t+=s.length}const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}class Gd{}function Qc(e){const t=n=>e().update(Xc(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Bv(e=32){if(La&&typeof La.getRandomValues=="function")return La.getRandomValues(new Uint8Array(e));if(La&&typeof La.randomBytes=="function")return Uint8Array.from(La.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const Fv=BigInt(0),Vo=BigInt(1),Ov=BigInt(2),Uv=BigInt(7),Dv=BigInt(256),_v=BigInt(113),K1=[],Y1=[],Z1=[];for(let e=0,t=Vo,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],K1.push(2*(5*n+r)),Y1.push((e+1)*(e+2)/2%64);let s=Fv;for(let a=0;a<7;a++)t=(t<<Vo^(t>>Uv)*_v)%Dv,t&Ov&&(s^=Vo<<(Vo<<BigInt(a))-Vo);Z1.push(s)}const X1=G1(Z1,!0),Mv=X1[0],Nv=X1[1],Q1=(e,t,r)=>r>32?mv(e,t,r):pv(e,t,r),J1=(e,t,r)=>r>32?hv(e,t,r):fv(e,t,r);function Lv(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let o=0;o<10;o++)r[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const i=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=Q1(l,u,1)^r[i],f=J1(l,u,1)^r[i+1];for(let m=0;m<50;m+=10)e[o+m]^=d,e[o+m+1]^=f}let s=e[2],a=e[3];for(let o=0;o<24;o++){const i=Y1[o],c=Q1(s,a,i),l=J1(s,a,i),u=K1[o];s=e[u],a=e[u+1],e[u]=c,e[u+1]=l}for(let o=0;o<50;o+=10){for(let i=0;i<10;i++)r[i]=e[o+i];for(let i=0;i<10;i++)e[o+i]^=~r[(i+2)%10]&r[(i+4)%10]}e[0]^=Mv[n],e[1]^=Nv[n]}rs(r)}class jd extends Gd{constructor(t,r,n,s=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=a,jo(n),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Cv(this.state)}clone(){return this._cloneInto()}keccak(){q1(this.state32),Lv(this.state32,this.rounds),q1(this.state32),this.posOut=0,this.pos=0}update(t){za(this),t=Xc(t),js(t);const{blockLen:r,state:n}=this,s=t.length;for(let a=0;a<s;){const o=Math.min(r-this.pos,s-a);for(let i=0;i<o;i++)n[this.pos++]^=t[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:r,pos:n,blockLen:s}=this;t[n]^=r,(r&128)!==0&&n===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){za(this,!1),js(t),this.finish();const r=this.state,{blockLen:n}=this;for(let s=0,a=t.length;s<a;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,a-s);t.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return jo(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(W1(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,rs(this.state)}_cloneInto(t){const{blockLen:r,suffix:n,outputLen:s,rounds:a,enableXOF:o}=this;return t||(t=new jd(r,n,s,o,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=n,t.outputLen=s,t.enableXOF=o,t.destroyed=this.destroyed,t}}const zv=(e,t,r)=>Qc(()=>new jd(t,e,r)),eb=zv(1,136,256/8);function Ot(e,t){const r=t||"hex",n=eb(Mr(e,{strict:!1})?Cn(e):e);return r==="bytes"?n:Ue(n)}const Rv=e=>Ot(Cn(e));function Hv(e){return Rv(e)}function $v(e){let t=!0,r="",n=0,s="",a=!1;for(let o=0;o<e.length;o++){const i=e[o];if(["(",")",","].includes(i)&&(t=!0),i==="("&&n++,i===")"&&n--,!!t){if(n===0){if(i===" "&&["event","function",""].includes(s))s="";else if(s+=i,i===")"){a=!0;break}continue}if(i===" "){e[o-1]!==","&&r!==","&&r!==",("&&(r="",t=!1);continue}s+=i,r+=i}}if(!a)throw new $("Unable to normalize signature.");return s}const Gv=e=>{const t=typeof e=="string"?e:jc(e);return $v(t)};function tb(e){return Hv(Gv(e))}const Jc=tb;let Ct=class extends ${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"})}},Ra=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}};const Vd=new Ra(8192);function Wo(e,t){if(Vd.has(`${e}.${t}`))return Vd.get(`${e}.${t}`);const r=e.substring(2).toLowerCase(),n=Ot(Gs(r),"bytes"),s=r.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(n[o>>1]&15)>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());const a=`0x${s.join("")}`;return Vd.set(`${e}.${t}`,a),a}function Wd(e,t){if(!nt(e,{strict:!1}))throw new Ct({address:e});return Wo(e,t)}const jv=/^0x[a-fA-F0-9]{40}$/,qd=new Ra(8192);function nt(e,t){const{strict:r=!0}=t??{},n=`${e}.${r}`;if(qd.has(n))return qd.get(n);const s=jv.test(e)?e.toLowerCase()===e?!0:r?Wo(e)===e:!0:!1;return qd.set(n,s),s}function lr(e){return typeof e[0]=="string"?ur(e):Vv(e)}function Vv(e){let t=0;for(const s of e)t+=s.length;const r=new Uint8Array(t);let n=0;for(const s of e)r.set(s,n),n+=s.length;return r}function ur(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function Vs(e,t,r,{strict:n}={}){return Mr(e,{strict:!1})?Kd(e,t,r,{strict:n}):sb(e,t,r,{strict:n})}function rb(e,t){if(typeof t=="number"&&t>0&&t>lt(e)-1)throw new M1({offset:t,position:"start",size:lt(e)})}function nb(e,t,r){if(typeof t=="number"&&typeof r=="number"&&lt(e)!==r-t)throw new M1({offset:r,position:"end",size:lt(e)})}function sb(e,t,r,{strict:n}={}){rb(e,t);const s=e.slice(t,r);return n&&nb(s,t,r),s}function Kd(e,t,r,{strict:n}={}){rb(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&nb(s,t,r),s}const Wv=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,ab=/^(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 ns(e,t){if(e.length!==t.length)throw new j8({expectedLength:e.length,givenLength:t.length});const r=qv({params:e,values:t}),n=Zd(r);return n.length===0?"0x":n}function qv({params:e,values:t}){const r=[];for(let n=0;n<e.length;n++)r.push(Yd({param:e[n],value:t[n]}));return r}function Yd({param:e,value:t}){const r=Xd(e.type);if(r){const[n,s]=r;return Yv(t,{length:n,param:{...e,type:s}})}if(e.type==="tuple")return eE(t,{param:e});if(e.type==="address")return Kv(t);if(e.type==="bool")return Xv(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const n=e.type.startsWith("int"),[,,s="256"]=ab.exec(e.type)??[];return Qv(t,{signed:n,size:Number(s)})}if(e.type.startsWith("bytes"))return Zv(t,{param:e});if(e.type==="string")return Jv(t);throw new X8(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Zd(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=lt(i)}const r=[],n=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?(r.push(q(t+s,{size:32})),n.push(i),s+=lt(i)):r.push(i)}return lr([...r,...n])}function Kv(e){if(!nt(e))throw new Ct({address:e});return{dynamic:!1,encoded:ts(e.toLowerCase())}}function Yv(e,{length:t,param:r}){const n=t===null;if(!Array.isArray(e))throw new _1(e);if(!n&&e.length!==t)throw new $8({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let s=!1;const a=[];for(let o=0;o<e.length;o++){const i=Yd({param:r,value:e[o]});i.dynamic&&(s=!0),a.push(i)}if(n||s){const o=Zd(a);if(n){const i=q(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?lr([i,o]):i}}if(s)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:lr(a.map(({encoded:o})=>o))}}function Zv(e,{param:t}){const[,r]=t.type.split("bytes"),n=lt(e);if(!r){let s=e;return n%32!==0&&(s=ts(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:lr([ts(q(n,{size:32})),s])}}if(n!==Number.parseInt(r,10))throw new G8({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:ts(e,{dir:"right"})}}function Xv(e){if(typeof e!="boolean")throw new $(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:ts(R1(e))}}function Qv(e,{signed:t,size:r=256}){if(typeof r=="number"){const n=2n**(BigInt(r)-(t?1n:0n))-1n,s=t?-n-1n:0n;if(e>n||e<s)throw new z1({max:n.toString(),min:s.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:q(e,{size:32,signed:t})}}function Jv(e){const t=_a(e),r=Math.ceil(lt(t)/32),n=[];for(let s=0;s<r;s++)n.push(ts(Vs(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:lr([ts(q(lt(t),{size:32})),...n])}}function eE(e,{param:t}){let r=!1;const n=[];for(let s=0;s<t.components.length;s++){const a=t.components[s],o=Array.isArray(e)?s:a.name,i=Yd({param:a,value:e[o]});n.push(i),i.dynamic&&(r=!0)}return{dynamic:r,encoded:r?Zd(n):lr(n.map(({encoded:s})=>s))}}function Xd(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const qo=e=>Vs(tb(e),0,4);function Ws(e){const{abi:t,args:r=[],name:n}=e,s=Mr(n,{strict:!1}),a=t.filter(i=>s?i.type==="function"?qo(i)===n:i.type==="event"?Jc(i)===n:!1:"name"in i&&i.name===n);if(a.length===0)return;if(a.length===1)return a[0];let o;for(const i of a){if(!("inputs"in i))continue;if(!r||r.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==r.length)continue;if(r.every((l,u)=>{const d="inputs"in i&&i.inputs[u];return d?Qd(l,d):!1})){if(o&&"inputs"in o&&o.inputs){const l=ob(i.inputs,o.inputs,r);if(l)throw new Y8({abiItem:i,type:l[0]},{abiItem:o,type:l[1]})}o=i}}return o||a[0]}function Qd(e,t){const r=typeof e,n=t.type;switch(n){case"address":return nt(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>Qd(Object.values(e)[a],s)):/^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(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(s=>Qd(s,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function ob(e,t,r){for(const n in e){const s=e[n],a=t[n];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return ob(s.components,a.components,r[n]);const o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?nt(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?nt(r[n],{strict:!1}):!1)return o}}const ib="/docs/contract/encodeEventTopics";function Ko(e){var c;const{abi:t,eventName:r,args:n}=e;let s=t[0];if(r){const l=Ws({abi:t,name:r});if(!l)throw new U1(r,{docsPath:ib});s=l}if(s.type!=="event")throw new U1(void 0,{docsPath:ib});const a=_r(s),o=Jc(a);let i=[];if(n&&"inputs"in s){const l=(c=s.inputs)==null?void 0:c.filter(d=>"indexed"in d&&d.indexed),u=Array.isArray(n)?n:Object.values(n).length>0?(l==null?void 0:l.map(d=>n[d.name]))??[]:[];u.length>0&&(i=(l==null?void 0:l.map((d,f)=>Array.isArray(u[f])?u[f].map((m,b)=>cb({param:d,value:u[f][b]})):typeof u[f]<"u"&&u[f]!==null?cb({param:d,value:u[f]}):null))??[])}return[o,...i]}function cb({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Ot(Cn(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new ev(e.type);return ns([e],[t])}function el(e,{method:t}){var n,s;const r={};return e.transport.type==="fallback"&&((s=(n=e.transport).onResponse)==null||s.call(n,({method:a,response:o,status:i,transport:c})=>{i==="success"&&t===a&&(r[o]=c.request)})),(a=>r[a]||e.request)}async function lb(e,t){const{address:r,abi:n,args:s,eventName:a,fromBlock:o,strict:i,toBlock:c}=t,l=el(e,{method:"eth_newFilter"}),u=a?Ko({abi:n,args:s,eventName:a}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof o=="bigint"?q(o):o,toBlock:typeof c=="bigint"?q(c):c,topics:u}]});return{abi:n,args:s,eventName:a,id:d,request:l(d),strict:!!i,type:"event"}}function Ze(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const ub="/docs/contract/encodeFunctionData";function tE(e){const{abi:t,args:r,functionName:n}=e;let s=t[0];if(n){const a=Ws({abi:t,args:r,name:n});if(!a)throw new Da(n,{docsPath:ub});s=a}if(s.type!=="function")throw new Da(void 0,{docsPath:ub});return{abi:[s],functionName:qo(_r(s))}}function dr(e){const{args:t}=e,{abi:r,functionName:n}=(()=>{var i;return e.abi.length===1&&((i=e.functionName)!=null&&i.startsWith("0x"))?e:tE(e)})(),s=r[0],a=n,o="inputs"in s&&s.inputs?ns(s.inputs,t??[]):void 0;return ur([a,o??"0x"])}const rE={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."},db={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},nE={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};let pb=class extends ${constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},fb=class extends ${constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},sE=class extends ${constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const aE={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 sE({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new fb({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new pb({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 pb({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 r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+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 r=this.inspectBytes(e);return this.position+=t??e,r},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 Jd(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(aE);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}function oE(e,t={}){typeof t.size<"u"&&Nr(e,{size:t.size});const r=wt(e,t);return ze(r,t)}function iE(e,t={}){let r=e;if(typeof t.size<"u"&&(Nr(r,{size:t.size}),r=Zt(r)),r.length>1||r[0]>1)throw new rv(r);return!!r[0]}function Sn(e,t={}){typeof t.size<"u"&&Nr(e,{size:t.size});const r=wt(e,t);return ir(r,t)}function cE(e,t={}){let r=e;return typeof t.size<"u"&&(Nr(r,{size:t.size}),r=Zt(r,{dir:"right"})),new TextDecoder().decode(r)}function Yo(e,t){const r=typeof t=="string"?cr(t):t,n=Jd(r);if(lt(r)===0&&e.length>0)throw new Go;if(lt(t)&&lt(t)<32)throw new B1({data:typeof t=="string"?t:wt(t),params:e,size:lt(t)});let s=0;const a=[];for(let o=0;o<e.length;++o){const i=e[o];n.setPosition(s);const[c,l]=Ha(n,i,{staticPosition:0});s+=l,a.push(c)}return a}function Ha(e,t,{staticPosition:r}){const n=Xd(t.type);if(n){const[s,a]=n;return uE(e,{...t,type:a},{length:s,staticPosition:r})}if(t.type==="tuple")return mE(e,t,{staticPosition:r});if(t.type==="address")return lE(e);if(t.type==="bool")return dE(e);if(t.type.startsWith("bytes"))return pE(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return fE(e,t);if(t.type==="string")return hE(e,{staticPosition:r});throw new Q8(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const mb=32,ep=32;function lE(e){const t=e.readBytes(32);return[Wo(wt(sb(t,-20))),32]}function uE(e,t,{length:r,staticPosition:n}){if(!r){const o=Sn(e.readBytes(ep)),i=n+o,c=i+mb;e.setPosition(i);const l=Sn(e.readBytes(mb)),u=Zo(t);let d=0;const f=[];for(let m=0;m<l;++m){e.setPosition(c+(u?m*32:d));const[b,g]=Ha(e,t,{staticPosition:c});d+=g,f.push(b)}return e.setPosition(n+32),[f,32]}if(Zo(t)){const o=Sn(e.readBytes(ep)),i=n+o,c=[];for(let l=0;l<r;++l){e.setPosition(i+l*32);const[u]=Ha(e,t,{staticPosition:i});c.push(u)}return e.setPosition(n+32),[c,32]}let s=0;const a=[];for(let o=0;o<r;++o){const[i,c]=Ha(e,t,{staticPosition:n+s});s+=c,a.push(i)}return[a,s]}function dE(e){return[iE(e.readBytes(32),{size:32}),32]}function pE(e,t,{staticPosition:r}){const[n,s]=t.type.split("bytes");if(!s){const o=Sn(e.readBytes(32));e.setPosition(r+o);const i=Sn(e.readBytes(32));if(i===0)return e.setPosition(r+32),["0x",32];const c=e.readBytes(i);return e.setPosition(r+32),[wt(c),32]}return[wt(e.readBytes(Number.parseInt(s,10),32)),32]}function fE(e,t){const r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[n>48?oE(s,{signed:r}):Sn(s,{signed:r}),32]}function mE(e,t,{staticPosition:r}){const n=t.components.length===0||t.components.some(({name:o})=>!o),s=n?[]:{};let a=0;if(Zo(t)){const o=Sn(e.readBytes(ep)),i=r+o;for(let c=0;c<t.components.length;++c){const l=t.components[c];e.setPosition(i+a);const[u,d]=Ha(e,l,{staticPosition:i});a+=d,s[n?c:l==null?void 0:l.name]=u}return e.setPosition(r+32),[s,32]}for(let o=0;o<t.components.length;++o){const i=t.components[o],[c,l]=Ha(e,i,{staticPosition:r});s[n?o:i==null?void 0:i.name]=c,a+=l}return[s,a]}function hE(e,{staticPosition:t}){const r=Sn(e.readBytes(32)),n=t+r;e.setPosition(n);const s=Sn(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),o=cE(Zt(a));return e.setPosition(t+32),[o,32]}function Zo(e){var n;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(n=e.components)==null?void 0:n.some(Zo);const r=Xd(e.type);return!!(r&&Zo({...e,type:r[1]}))}function hb(e){const{abi:t,data:r}=e,n=Vs(r,0,4);if(n==="0x")throw new Go;const a=[...t||[],db,nE].find(o=>o.type==="error"&&n===qo(_r(o)));if(!a)throw new O1(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:a,args:"inputs"in a&&a.inputs&&a.inputs.length>0?Yo(a.inputs,Vs(r,4)):void 0,errorName:a.name}}const ht=(e,t,r)=>JSON.stringify(e,(n,s)=>typeof s=="bigint"?s.toString():s,r);function bb({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((s,a)=>`${n&&s.name?`${s.name}: `:""}${typeof t[a]=="object"?ht(t[a]):t[a]}`).join(", ")})`}const bE={gwei:9,wei:18},yE={ether:-9,wei:9};function tp(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[s,a]=[r.slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${a?`.${a}`:""}`}function rp(e,t="wei"){return tp(e,bE[t])}function Xt(e,t="wei"){return tp(e,yE[t])}class gE extends ${constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class xE extends ${constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function yb(e){return e.reduce((t,{slot:r,value:n})=>`${t} ${r}: ${n}
86
- `,"")}function wE(e){return e.reduce((t,{address:r,...n})=>{let s=`${t} ${r}:
87
- `;return n.nonce&&(s+=` nonce: ${n.nonce}
88
- `),n.balance&&(s+=` balance: ${n.balance}
89
- `),n.code&&(s+=` code: ${n.code}
90
- `),n.state&&(s+=` state:
91
- `,s+=yb(n.state)),n.stateDiff&&(s+=` stateDiff:
92
- `,s+=yb(n.stateDiff)),s},` State Override:
93
- `).slice(0,-1)}function Xo(e){const t=Object.entries(e).map(([n,s])=>s===void 0||s===!1?null:[n,s]).filter(Boolean),r=t.reduce((n,[s])=>Math.max(n,s.length),0);return t.map(([n,s])=>` ${`${n}:`.padEnd(r+1)} ${s}`).join(`
94
- `)}class vE extends ${constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class EE extends ${constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Xo(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"})}}let kE=class extends ${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 CE extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:f}){var b;const m=Xo({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:r==null?void 0:r.address,to:d,value:typeof f<"u"&&`${rp(f)} ${((b=s==null?void 0:s.nativeCurrency)==null?void 0:b.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Xt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Xt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Xt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:n,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 gb extends ${constructor({blockHash:t,blockNumber:r,blockTag:n,hash:s,index:a}){let o="Transaction";n&&a!==void 0&&(o=`Transaction at block time "${n}" at index "${a}"`),t&&a!==void 0&&(o=`Transaction at block hash "${t}" at index "${a}"`),r&&a!==void 0&&(o=`Transaction at block number "${r}" at index "${a}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class xb extends ${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 wb extends ${constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class TE extends ${constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const AE=e=>e,Qo=e=>e;class vb extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:f,stateOverride:m}){var E;const b=r?Ze(r):void 0;let g=Xo({from:b==null?void 0:b.address,to:d,value:typeof f<"u"&&`${rp(f)} ${((E=s==null?void 0:s.nativeCurrency)==null?void 0:E.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Xt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Xt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Xt(l)} gwei`,nonce:u});m&&(g+=`
95
- ${wE(m)}`),super(t.shortMessage,{cause:t,docsPath:n,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",g].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Eb extends ${constructor(t,{abi:r,args:n,contractAddress:s,docsPath:a,functionName:o,sender:i}){const c=Ws({abi:r,args:n,name:o}),l=c?bb({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,u=c?_r(c,{includeName:!0}):void 0,d=Xo({address:s&&AE(s),function:u,args:l&&l!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:i});super(t.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:t,docsPath:a,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],d&&"Contract Call:",d].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=r,this.args=n,this.cause=t,this.contractAddress=s,this.functionName=o,this.sender=i}}class np extends ${constructor({abi:t,data:r,functionName:n,message:s}){let a,o,i,c;if(r&&r!=="0x")try{o=hb({abi:t,data:r});const{abiItem:u,errorName:d,args:f}=o;if(d==="Error")c=f[0];else if(d==="Panic"){const[m]=f;c=rE[m]}else{const m=u?_r(u,{includeName:!0}):void 0,b=u&&f?bb({abiItem:u,args:f,includeFunctionName:!1,includeName:!1}):void 0;i=[m?`Error: ${m}`:"",b&&b!=="()"?` ${[...Array((d==null?void 0:d.length)??0).keys()].map(()=>" ").join("")}${b}`:""]}}catch(u){a=u}else s&&(c=s);let l;a instanceof O1&&(l=a.signature,i=[`Unable to decode signature "${l}" 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=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${n}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(`
96
- `):`The contract function "${n}" reverted.`,{cause:a,metaMessages:i,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{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=o,this.raw=r,this.reason=c,this.signature=l}}class SE extends ${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 PE extends ${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 tl extends ${constructor({data:t,message:r}){super(r||"",{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 qs extends ${constructor({body:t,cause:r,details:n,headers:s,status:a,url:o}){super("HTTP request failed.",{cause:r,details:n,metaMessages:[a&&`Status: ${a}`,`URL: ${Qo(o)}`,t&&`Request body: ${ht(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=s,this.status=a,this.url=o}}class sp extends ${constructor({body:t,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${Qo(n)}`,`Request body: ${ht(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code,this.data=r.data,this.url=n}}class kb extends ${constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Qo(r)}`,`Request body: ${ht(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=r}}const IE=-1;class Qt extends ${constructor(t,{code:r,docsPath:n,metaMessages:s,name:a,shortMessage:o}){super(o,{cause:t,docsPath:n,metaMessages:s||(t==null?void 0:t.metaMessages),name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||t.name,this.code=t instanceof sp?t.code:r??IE}}class pr extends Qt{constructor(t,r){super(t,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class Jo extends Qt{constructor(t){super(t,{code:Jo.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(Jo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class ei extends Qt{constructor(t){super(t,{code:ei.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(ei,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class ti extends Qt{constructor(t,{method:r}={}){super(t,{code:ti.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}}Object.defineProperty(ti,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class ri extends Qt{constructor(t){super(t,{code:ri.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
97
- `)})}}Object.defineProperty(ri,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Ks extends Qt{constructor(t){super(t,{code:Ks.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Ks,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class ss extends Qt{constructor(t){super(t,{code:ss.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
98
- `)})}}Object.defineProperty(ss,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class ni extends Qt{constructor(t){super(t,{code:ni.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(ni,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class si extends Qt{constructor(t){super(t,{code:si.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(si,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class ai extends Qt{constructor(t){super(t,{code:ai.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(ai,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Ys extends Qt{constructor(t,{method:r}={}){super(t,{code:Ys.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}}Object.defineProperty(Ys,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class $a extends Qt{constructor(t){super(t,{code:$a.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty($a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class oi extends Qt{constructor(t){super(t,{code:oi.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(oi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Ga extends pr{constructor(t){super(t,{code:Ga.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Ga,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class ii extends pr{constructor(t){super(t,{code:ii.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(ii,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class ci extends pr{constructor(t,{method:r}={}){super(t,{code:ci.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}}Object.defineProperty(ci,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class li extends pr{constructor(t){super(t,{code:li.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(li,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class ui extends pr{constructor(t){super(t,{code:ui.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(ui,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class di extends pr{constructor(t){super(t,{code:di.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(di,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class ja extends pr{constructor(t){super(t,{code:ja.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(ja,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class pi extends pr{constructor(t){super(t,{code:pi.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(pi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class fi extends pr{constructor(t){super(t,{code:fi.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(fi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class mi extends pr{constructor(t){super(t,{code:mi.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(mi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class hi extends pr{constructor(t){super(t,{code:hi.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(hi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class bi extends pr{constructor(t){super(t,{code:bi.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(bi,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Va extends pr{constructor(t){super(t,{code:Va.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Va,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class BE extends Qt{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const FE=3;function Zs(e,{abi:t,address:r,args:n,docsPath:s,functionName:a,sender:o}){const i=e instanceof tl?e:e instanceof $?e.walk(b=>"data"in b)||e.walk():{},{code:c,data:l,details:u,message:d,shortMessage:f}=i,m=e instanceof Go?new SE({functionName:a}):[FE,Ks.code].includes(c)&&(l||u||d||f)||c===ss.code&&u==="execution reverted"&&l?new np({abi:t,data:typeof l=="object"?l.data:l,functionName:a,message:i instanceof sp?u:f??d}):e;return new Eb(m,{abi:t,args:n,contractAddress:r,docsPath:s,functionName:a,sender:o})}function OE(e){const t=Ot(`0x${e.substring(4)}`).substring(26);return Wo(`0x${t}`)}async function UE({hash:e,signature:t}){const r=Mr(e)?e:Ue(e),{secp256k1:n}=await Promise.resolve().then(()=>M9);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:l,s:u,v:d,yParity:f}=t,m=Number(f??d),b=Cb(m);return new n.Signature(ze(l),ze(u)).addRecoveryBit(b)}const o=Mr(t)?t:Ue(t);if(lt(o)!==65)throw new Error("invalid signature length");const i=ir(`0x${o.slice(130)}`),c=Cb(i);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function Cb(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 Tb({hash:e,signature:t}){return OE(await UE({hash:e,signature:t}))}function nn(e,t="hex"){const r=Ab(e),n=Jd(new Uint8Array(r.length));return r.encode(n),t==="hex"?wt(n.bytes):n.bytes}function Ab(e){return Array.isArray(e)?DE(e.map(t=>Ab(t))):_E(e)}function DE(e){const t=e.reduce((s,a)=>s+a.length,0),r=Sb(t);return{length:t<=55?1+t:1+r+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+r),r===1?s.pushUint8(t):r===2?s.pushUint16(t):r===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function _E(e){const t=typeof e=="string"?cr(e):e,r=Sb(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+r),r===1?s.pushUint8(t.length):r===2?s.pushUint16(t.length):r===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function Sb(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 $("Length is too large.")}function ME(e){const{chainId:t,nonce:r,to:n}=e,s=e.contractAddress??e.address,a=Ot(ur(["0x05",nn([t?q(t):"0x",s,r?q(r):"0x"])]));return n==="bytes"?cr(a):a}async function rl(e){const{authorization:t,signature:r}=e;return Tb({hash:ME(t),signature:r??t})}class NE extends ${constructor(t,{account:r,docsPath:n,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:f}){var b;const m=Xo({from:r==null?void 0:r.address,to:d,value:typeof f<"u"&&`${rp(f)} ${((b=s==null?void 0:s.nativeCurrency)==null?void 0:b.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Xt(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Xt(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Xt(l)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:n,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 Wa extends ${constructor({cause:t,message:r}={}){var s;const n=(s=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:s.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Wa,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Wa,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});let as=class extends ${constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Xt(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}};Object.defineProperty(as,"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 ap extends ${constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Xt(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(ap,"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 op extends ${constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(op,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class ip extends ${constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
99
- `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(ip,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class cp extends ${constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(cp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class lp extends ${constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
100
- `),{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(lp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class up extends ${constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(up,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class dp extends ${constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(dp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class pp extends ${constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(pp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});let qa=class extends ${constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${Xt(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Xt(n)} gwei`:""}).`].join(`
101
- `),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(qa,"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 yi extends ${constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function nl(e,t){const r=(e.details||"").toLowerCase(),n=e instanceof $?e.walk(s=>(s==null?void 0:s.code)===Wa.code):e;return n instanceof $?new Wa({cause:e,message:n.details}):Wa.nodeMessage.test(r)?new Wa({cause:e,message:e.details}):as.nodeMessage.test(r)?new as({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):ap.nodeMessage.test(r)?new ap({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):op.nodeMessage.test(r)?new op({cause:e,nonce:t==null?void 0:t.nonce}):ip.nodeMessage.test(r)?new ip({cause:e,nonce:t==null?void 0:t.nonce}):cp.nodeMessage.test(r)?new cp({cause:e,nonce:t==null?void 0:t.nonce}):lp.nodeMessage.test(r)?new lp({cause:e}):up.nodeMessage.test(r)?new up({cause:e,gas:t==null?void 0:t.gas}):dp.nodeMessage.test(r)?new dp({cause:e,gas:t==null?void 0:t.gas}):pp.nodeMessage.test(r)?new pp({cause:e}):qa.nodeMessage.test(r)?new qa({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new yi({cause:e})}function LE(e,{docsPath:t,...r}){const n=(()=>{const s=nl(e,r);return s instanceof yi?e:s})();return new NE(n,{docsPath:t,...r})}function Xs(e,{format:t}){if(!t)return{};const r={};function n(a){const o=Object.keys(a);for(const i of o)i in e&&(r[i]=e[i]),a[i]&&typeof a[i]=="object"&&!Array.isArray(a[i])&&n(a[i])}const s=t(e||{});return n(s),r}function sl(e,t){return({exclude:r,format:n})=>({exclude:r,format:(s,a)=>{const o=t(s,a);if(r)for(const i of r)delete o[i];return{...o,...n(s,a)}},type:e})}const zE={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Lr(e,t){const r={};return typeof e.authorizationList<"u"&&(r.authorizationList=RE(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(n=>wt(n)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=q(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=q(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=q(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=q(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=q(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=q(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=zE[e.type]),typeof e.value<"u"&&(r.value=q(e.value)),r}const fp=sl("transactionRequest",Lr);function RE(e){return e.map(t=>({address:t.address,r:t.r?q(BigInt(t.r)):t.r,s:t.s?q(BigInt(t.s)):t.s,chainId:q(t.chainId),nonce:q(t.nonce),...typeof t.yParity<"u"?{yParity:q(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:q(t.v)}:{}}))}function Pb(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:n})=>{if(r.length!==66)throw new L1({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new L1({size:n.length,targetSize:66,type:"hex"});return t[r]=n,t},{})}function HE(e){const{balance:t,nonce:r,state:n,stateDiff:s,code:a}=e,o={};if(a!==void 0&&(o.code=a),t!==void 0&&(o.balance=q(t)),r!==void 0&&(o.nonce=q(r)),n!==void 0&&(o.state=Pb(n)),s!==void 0){if(o.state)throw new xE;o.stateDiff=Pb(s)}return o}function mp(e){if(!e)return;const t={};for(const{address:r,...n}of e){if(!nt(r,{strict:!1}))throw new Ct({address:r});if(t[r])throw new gE({address:r});t[r]=HE(n)}return t}const $E=2n**16n-1n,Qs=2n**256n-1n;function sn(e){const{account:t,maxFeePerGas:r,maxPriorityFeePerGas:n,to:s}=e,a=t?Ze(t):void 0;if(a&&!nt(a.address))throw new Ct({address:a.address});if(s&&!nt(s))throw new Ct({address:s});if(r&&r>Qs)throw new as({maxFeePerGas:r});if(n&&r&&n>r)throw new qa({maxFeePerGas:r,maxPriorityFeePerGas:n})}class Ib extends ${constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class hp extends ${constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class GE extends ${constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Xt(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Bb extends ${constructor({blockHash:t,blockNumber:r}){let n="Block";t&&(n=`Block at hash "${t}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`,{name:"BlockNotFoundError"})}}const Fb={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Js(e,t){const r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?ir(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?ir(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Fb[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&&(r.authorizationList=jE(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}const al=sl("transaction",Js);function jE(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function bp(e,t){const r=(e.transactions??[]).map(n=>typeof n=="string"?n:Js(n));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:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const yp=sl("block",bp);async function zr(e,{blockHash:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest",includeTransactions:s}={}){var l,u,d;const a=s??!1,o=r!==void 0?q(r):void 0;let i=null;if(t?i=await e.request({method:"eth_getBlockByHash",params:[t,a]},{dedupe:!0}):i=await e.request({method:"eth_getBlockByNumber",params:[o||n,a]},{dedupe:!!o}),!i)throw new Bb({blockHash:t,blockNumber:r});return(((d=(u=(l=e.chain)==null?void 0:l.formatters)==null?void 0:u.block)==null?void 0:d.format)||bp)(i,"getBlock")}async function gp(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function VE(e,t){return Ob(e,t)}async function Ob(e,t){var a,o;const{block:r,chain:n=e.chain,request:s}=t||{};try{const i=((a=n==null?void 0:n.fees)==null?void 0:a.maxPriorityFeePerGas)??((o=n==null?void 0:n.fees)==null?void 0:o.defaultPriorityFee);if(typeof i=="function"){const l=r||await se(e,zr,"getBlock")({}),u=await i({block:l,client:e,request:s});if(u===null)throw new Error;return u}if(typeof i<"u")return i;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return ze(c)}catch{const[i,c]=await Promise.all([r?Promise.resolve(r):se(e,zr,"getBlock")({}),se(e,gp,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new hp;const l=c-i.baseFeePerGas;return l<0n?0n:l}}async function WE(e,t){return xp(e,t)}async function xp(e,t){var f,m;const{block:r,chain:n=e.chain,request:s,type:a="eip1559"}=t||{},o=await(async()=>{var b,g;return typeof((b=n==null?void 0:n.fees)==null?void 0:b.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:e,request:s}):((g=n==null?void 0:n.fees)==null?void 0:g.baseFeeMultiplier)??1.2})();if(o<1)throw new Ib;const c=10**(((f=o.toString().split(".")[1])==null?void 0:f.length)??0),l=b=>b*BigInt(Math.ceil(o*c))/BigInt(c),u=r||await se(e,zr,"getBlock")({});if(typeof((m=n==null?void 0:n.fees)==null?void 0:m.estimateFeesPerGas)=="function"){const b=await n.fees.estimateFeesPerGas({block:r,client:e,multiply:l,request:s,type:a});if(b!==null)return b}if(a==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new hp;const b=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await Ob(e,{block:u,chain:n,request:s}),g=l(u.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??g+b,maxPriorityFeePerGas:b}}return{gasPrice:(s==null?void 0:s.gasPrice)??l(await se(e,gp,"getGasPrice")({}))}}async function wp(e,{address:t,blockTag:r="latest",blockNumber:n}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof n=="bigint"?q(n):r]},{dedupe:!!n});return ir(s)}function vp(e){const{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(a=>cr(a)):e.blobs,s=[];for(const a of n)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return r==="bytes"?s:s.map(a=>wt(a))}function Ep(e){const{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(o=>cr(o)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(o=>cr(o)):e.commitments,a=[];for(let o=0;o<n.length;o++){const i=n[o],c=s[o];a.push(Uint8Array.from(t.computeBlobKzgProof(i,c)))}return r==="bytes"?a:a.map(o=>wt(o))}function qE(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const s=BigInt(32),a=BigInt(4294967295),o=Number(r>>s&a),i=Number(r&a),c=n?4:0,l=n?0:4;e.setUint32(t+c,o,n),e.setUint32(t+l,i,n)}function KE(e,t,r){return e&t^~e&r}function YE(e,t,r){return e&t^e&r^t&r}class Ub extends Gd{constructor(t,r,n,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=s,this.buffer=new Uint8Array(t),this.view=$d(this.buffer)}update(t){za(this),t=Xc(t),js(t);const{view:r,buffer:n,blockLen:s}=this,a=t.length;for(let o=0;o<a;){const i=Math.min(s-this.pos,a-o);if(i===s){const c=$d(t);for(;s<=a-o;o+=s)this.process(c,o);continue}n.set(t.subarray(o,o+i),this.pos),this.pos+=i,o+=i,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){za(this),W1(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:s,isLE:a}=this;let{pos:o}=this;r[o++]=128,rs(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(n,0),o=0);for(let d=o;d<s;d++)r[d]=0;qE(n,s-8,BigInt(this.length*8),a),this.process(n,0);const i=$d(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)i.setUint32(4*d,u[d],a)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:s,finished:a,destroyed:o,pos:i}=this;return t.destroyed=o,t.finished=a,t.length=s,t.pos=i,s%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const os=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Mt=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Nt=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),ZE=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),is=new Uint32Array(64);class XE extends Ub{constructor(t=32){super(64,t,8,!1),this.A=os[0]|0,this.B=os[1]|0,this.C=os[2]|0,this.D=os[3]|0,this.E=os[4]|0,this.F=os[5]|0,this.G=os[6]|0,this.H=os[7]|0}get(){const{A:t,B:r,C:n,D:s,E:a,F:o,G:i,H:c}=this;return[t,r,n,s,a,o,i,c]}set(t,r,n,s,a,o,i,c){this.A=t|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=a|0,this.F=o|0,this.G=i|0,this.H=c|0}process(t,r){for(let d=0;d<16;d++,r+=4)is[d]=t.getUint32(r,!1);for(let d=16;d<64;d++){const f=is[d-15],m=is[d-2],b=rn(f,7)^rn(f,18)^f>>>3,g=rn(m,17)^rn(m,19)^m>>>10;is[d]=g+is[d-7]+b+is[d-16]|0}let{A:n,B:s,C:a,D:o,E:i,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const f=rn(i,6)^rn(i,11)^rn(i,25),m=u+f+KE(i,c,l)+ZE[d]+is[d]|0,g=(rn(n,2)^rn(n,13)^rn(n,22))+YE(n,s,a)|0;u=l,l=c,c=i,i=o+m|0,o=a,a=s,s=n,n=m+g|0}n=n+this.A|0,s=s+this.B|0,a=a+this.C|0,o=o+this.D|0,i=i+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,a,o,i,c,l,u)}roundClean(){rs(is)}destroy(){this.set(0,0,0,0,0,0,0,0),rs(this.buffer)}}const Db=G1(["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))),QE=Db[0],JE=Db[1],cs=new Uint32Array(80),ls=new Uint32Array(80);class _b extends Ub{constructor(t=64){super(128,t,16,!1),this.Ah=Nt[0]|0,this.Al=Nt[1]|0,this.Bh=Nt[2]|0,this.Bl=Nt[3]|0,this.Ch=Nt[4]|0,this.Cl=Nt[5]|0,this.Dh=Nt[6]|0,this.Dl=Nt[7]|0,this.Eh=Nt[8]|0,this.El=Nt[9]|0,this.Fh=Nt[10]|0,this.Fl=Nt[11]|0,this.Gh=Nt[12]|0,this.Gl=Nt[13]|0,this.Hh=Nt[14]|0,this.Hl=Nt[15]|0}get(){const{Ah:t,Al:r,Bh:n,Bl:s,Ch:a,Cl:o,Dh:i,Dl:c,Eh:l,El:u,Fh:d,Fl:f,Gh:m,Gl:b,Hh:g,Hl:E}=this;return[t,r,n,s,a,o,i,c,l,u,d,f,m,b,g,E]}set(t,r,n,s,a,o,i,c,l,u,d,f,m,b,g,E){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=a|0,this.Cl=o|0,this.Dh=i|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=d|0,this.Fl=f|0,this.Gh=m|0,this.Gl=b|0,this.Hh=g|0,this.Hl=E|0}process(t,r){for(let S=0;S<16;S++,r+=4)cs[S]=t.getUint32(r),ls[S]=t.getUint32(r+=4);for(let S=16;S<80;S++){const T=cs[S-15]|0,O=ls[S-15]|0,L=Ma(T,O,1)^Ma(T,O,8)^j1(T,O,7),I=Na(T,O,1)^Na(T,O,8)^V1(T,O,7),h=cs[S-2]|0,y=ls[S-2]|0,x=Ma(h,y,19)^Yc(h,y,61)^j1(h,y,6),A=Na(h,y,19)^Zc(h,y,61)^V1(h,y,6),B=gv(I,A,ls[S-7],ls[S-16]),F=xv(B,L,x,cs[S-7],cs[S-16]);cs[S]=F|0,ls[S]=B|0}let{Ah:n,Al:s,Bh:a,Bl:o,Ch:i,Cl:c,Dh:l,Dl:u,Eh:d,El:f,Fh:m,Fl:b,Gh:g,Gl:E,Hh:v,Hl:w}=this;for(let S=0;S<80;S++){const T=Ma(d,f,14)^Ma(d,f,18)^Yc(d,f,41),O=Na(d,f,14)^Na(d,f,18)^Zc(d,f,41),L=d&m^~d&g,I=f&b^~f&E,h=wv(w,O,I,JE[S],ls[S]),y=vv(h,v,T,L,QE[S],cs[S]),x=h|0,A=Ma(n,s,28)^Yc(n,s,34)^Yc(n,s,39),B=Na(n,s,28)^Zc(n,s,34)^Zc(n,s,39),F=n&a^n&i^a&i,_=s&o^s&c^o&c;v=g|0,w=E|0,g=m|0,E=b|0,m=d|0,b=f|0,{h:d,l:f}=An(l|0,u|0,y|0,x|0),l=i|0,u=c|0,i=a|0,c=o|0,a=n|0,o=s|0;const k=bv(x,B,_);n=yv(k,y,A,F),s=k|0}({h:n,l:s}=An(this.Ah|0,this.Al|0,n|0,s|0)),{h:a,l:o}=An(this.Bh|0,this.Bl|0,a|0,o|0),{h:i,l:c}=An(this.Ch|0,this.Cl|0,i|0,c|0),{h:l,l:u}=An(this.Dh|0,this.Dl|0,l|0,u|0),{h:d,l:f}=An(this.Eh|0,this.El|0,d|0,f|0),{h:m,l:b}=An(this.Fh|0,this.Fl|0,m|0,b|0),{h:g,l:E}=An(this.Gh|0,this.Gl|0,g|0,E|0),{h:v,l:w}=An(this.Hh|0,this.Hl|0,v|0,w|0),this.set(n,s,a,o,i,c,l,u,d,f,m,b,g,E,v,w)}roundClean(){rs(cs,ls)}destroy(){rs(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ek extends _b{constructor(){super(48),this.Ah=Mt[0]|0,this.Al=Mt[1]|0,this.Bh=Mt[2]|0,this.Bl=Mt[3]|0,this.Ch=Mt[4]|0,this.Cl=Mt[5]|0,this.Dh=Mt[6]|0,this.Dl=Mt[7]|0,this.Eh=Mt[8]|0,this.El=Mt[9]|0,this.Fh=Mt[10]|0,this.Fl=Mt[11]|0,this.Gh=Mt[12]|0,this.Gl=Mt[13]|0,this.Hh=Mt[14]|0,this.Hl=Mt[15]|0}}const kp=Qc(()=>new XE),tk=Qc(()=>new _b),rk=Qc(()=>new ek),Mb=kp;function Nb(e,t){const r=t||"hex",n=Mb(Mr(e,{strict:!1})?Cn(e):e);return r==="bytes"?n:Ue(n)}function nk(e){const{commitment:t,version:r=1}=e,n=e.to??(typeof t=="string"?"hex":"bytes"),s=Nb(t,"bytes");return s.set([r],0),n==="bytes"?s:wt(s)}function Lb(e){const{commitments:t,version:r}=e,n=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(nk({commitment:a,to:n,version:r}));return s}const zb=6,Rb=32,Cp=4096,Hb=Rb*Cp,$b=Hb*zb-1-1*Cp*zb,Gb=1;class sk extends ${constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}}class jb extends ${constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class ak extends ${constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}}class ok extends ${constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Gb}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}}function ik(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?cr(e.data):e.data,n=lt(r);if(!n)throw new jb;if(n>$b)throw new sk({maxSize:$b,size:n});const s=[];let a=!0,o=0;for(;a;){const i=Jd(new Uint8Array(Hb));let c=0;for(;c<Cp;){const l=r.slice(o,o+(Rb-1));if(i.pushByte(0),i.pushBytes(l),l.length<31){i.pushByte(128),a=!1;break}c++,o+=31}s.push(i)}return t==="bytes"?s.map(i=>i.bytes):s.map(i=>wt(i.bytes))}function Vb(e){const{data:t,kzg:r,to:n}=e,s=e.blobs??ik({data:t,to:n}),a=e.commitments??vp({blobs:s,kzg:r,to:n}),o=e.proofs??Ep({blobs:s,commitments:a,kzg:r,to:n}),i=[];for(let c=0;c<s.length;c++)i.push({blob:s[c],commitment:a[c],proof:o[c]});return i}function Tp(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new EE({transaction:e})}function ol(e,{docsPath:t,...r}){const n=(()=>{const s=nl(e,r);return s instanceof yi?e:s})();return new CE(n,{docsPath:t,...r})}async function us(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return ir(t)}async function Ap(e,t){var h,y,x,A,B;const{account:r=e.account,accessList:n,authorizationList:s,chain:a=e.chain,blobVersionedHashes:o,blobs:i,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:f,maxPriorityFeePerGas:m,nonce:b,nonceManager:g,to:E,type:v,value:w,...S}=t,T=await(async()=>{if(!r||!g||typeof b<"u")return b;const F=Ze(r),_=a?a.id:await se(e,us,"getChainId")({});return await g.consume({address:F.address,chainId:_,client:e})})();sn(t);const O=(y=(h=a==null?void 0:a.formatters)==null?void 0:h.transactionRequest)==null?void 0:y.format,I=(O||Lr)({...Xs(S,{format:O}),account:r?Ze(r):void 0,accessList:n,authorizationList:s,blobs:i,blobVersionedHashes:o,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:f,maxPriorityFeePerGas:m,nonce:T,to:E,type:v,value:w},"fillTransaction");try{const F=await e.request({method:"eth_fillTransaction",params:[I]}),k=(((A=(x=a==null?void 0:a.formatters)==null?void 0:x.transaction)==null?void 0:A.format)||Js)(F.tx);delete k.blockHash,delete k.blockNumber,delete k.r,delete k.s,delete k.transactionIndex,delete k.v,delete k.yParity,k.data=k.input,k.gas&&(k.gas=t.gas??k.gas),k.gasPrice&&(k.gasPrice=t.gasPrice??k.gasPrice),k.maxFeePerBlobGas&&(k.maxFeePerBlobGas=t.maxFeePerBlobGas??k.maxFeePerBlobGas),k.maxFeePerGas&&(k.maxFeePerGas=t.maxFeePerGas??k.maxFeePerGas),k.maxPriorityFeePerGas&&(k.maxPriorityFeePerGas=t.maxPriorityFeePerGas??k.maxPriorityFeePerGas),k.nonce&&(k.nonce=t.nonce??k.nonce);const P=await(async()=>{var H,j;if(typeof((H=a==null?void 0:a.fees)==null?void 0:H.baseFeeMultiplier)=="function"){const Q=await se(e,zr,"getBlock")({});return a.fees.baseFeeMultiplier({block:Q,client:e,request:t})}return((j=a==null?void 0:a.fees)==null?void 0:j.baseFeeMultiplier)??1.2})();if(P<1)throw new Ib;const U=10**(((B=P.toString().split(".")[1])==null?void 0:B.length)??0),z=H=>H*BigInt(Math.ceil(P*U))/BigInt(U);return k.maxFeePerGas&&!t.maxFeePerGas&&(k.maxFeePerGas=z(k.maxFeePerGas)),k.gasPrice&&!t.gasPrice&&(k.gasPrice=z(k.gasPrice)),{raw:F.raw,transaction:{from:I.from,...k}}}catch(F){throw ol(F,{...t,chain:e.chain})}}const Sp=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Wb=new Map,Pp=new Ra(128);async function gi(e,t){var T,O,L;let r=t;r.account??(r.account=e.account),r.parameters??(r.parameters=Sp);const{account:n,chain:s=e.chain,nonceManager:a,parameters:o}=r,i=(()=>{if(typeof(s==null?void 0:s.prepareTransactionRequest)=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s==null?void 0:s.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function l(){return c||(typeof r.chainId<"u"?r.chainId:s?s.id:(c=await se(e,us,"getChainId")({}),c))}const u=n&&Ze(n);let d=r.nonce;if(o.includes("nonce")&&typeof d>"u"&&u&&a){const I=await l();d=await a.consume({address:u.address,chainId:I,client:e})}i!=null&&i.fn&&((T=i.runAt)!=null&&T.includes("beforeFillTransaction"))&&(r=await i.fn({...r,chain:s},{phase:"beforeFillTransaction"}),d??(d=r.nonce));const m=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&r.kzg&&r.blobs||Pp.get(e.uid)===!1||!["fees","gas"].some(h=>o.includes(h))?!1:!!(o.includes("chainId")&&typeof r.chainId!="number"||o.includes("nonce")&&typeof d!="number"||o.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||o.includes("gas")&&typeof r.gas!="bigint"))?await se(e,Ap,"fillTransaction")({...r,nonce:d}).then(I=>{const{chainId:h,from:y,gas:x,gasPrice:A,nonce:B,maxFeePerBlobGas:F,maxFeePerGas:_,maxPriorityFeePerGas:k,type:P,...D}=I.transaction;return Pp.set(e.uid,!0),{...r,...y?{from:y}:{},...P?{type:P}:{},...typeof h<"u"?{chainId:h}:{},...typeof x<"u"?{gas:x}:{},...typeof A<"u"?{gasPrice:A}:{},...typeof B<"u"?{nonce:B}:{},...typeof F<"u"?{maxFeePerBlobGas:F}:{},...typeof _<"u"?{maxFeePerGas:_}:{},...typeof k<"u"?{maxPriorityFeePerGas:k}:{},..."nonceKey"in D&&typeof D.nonceKey<"u"?{nonceKey:D.nonceKey}:{}}}).catch(I=>{var x;const h=I;return h.name!=="TransactionExecutionError"||((x=h.walk)==null?void 0:x.call(h,A=>{const B=A;return B.name==="MethodNotFoundRpcError"||B.name==="MethodNotSupportedRpcError"}))&&Pp.set(e.uid,!1),r}):r;d??(d=m.nonce),r={...m,...u?{from:u==null?void 0:u.address}:{},...d?{nonce:d}:{}};const{blobs:b,gas:g,kzg:E,type:v}=r;i!=null&&i.fn&&((O=i.runAt)!=null&&O.includes("beforeFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"beforeFillParameters"}));let w;async function S(){return w||(w=await se(e,zr,"getBlock")({blockTag:"latest"}),w)}if(o.includes("nonce")&&typeof d>"u"&&u&&!a&&(r.nonce=await se(e,wp,"getTransactionCount")({address:u.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&b&&E){const I=vp({blobs:b,kzg:E});if(o.includes("blobVersionedHashes")){const h=Lb({commitments:I,to:"hex"});r.blobVersionedHashes=h}if(o.includes("sidecars")){const h=Ep({blobs:b,commitments:I,kzg:E}),y=Vb({blobs:b,commitments:I,proofs:h,to:"hex"});r.sidecars=y}}if(o.includes("chainId")&&(r.chainId=await l()),(o.includes("fees")||o.includes("type"))&&typeof v>"u")try{r.type=Tp(r)}catch{let I=Wb.get(e.uid);if(typeof I>"u"){const h=await S();I=typeof(h==null?void 0:h.baseFeePerGas)=="bigint",Wb.set(e.uid,I)}r.type=I?"eip1559":"legacy"}if(o.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){const I=await S(),{maxFeePerGas:h,maxPriorityFeePerGas:y}=await xp(e,{block:I,chain:s,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<y)throw new GE({maxPriorityFeePerGas:y});r.maxPriorityFeePerGas=y,r.maxFeePerGas=h}}else{if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new hp;if(typeof r.gasPrice>"u"){const I=await S(),{gasPrice:h}=await xp(e,{block:I,chain:s,request:r,type:"legacy"});r.gasPrice=h}}return o.includes("gas")&&typeof g>"u"&&(r.gas=await se(e,Ip,"estimateGas")({...r,account:u,prepare:(u==null?void 0:u.type)==="local"?[]:["blobVersionedHashes"]})),i!=null&&i.fn&&((L=i.runAt)!=null&&L.includes("afterFillParameters"))&&(r=await i.fn({...r,chain:s},{phase:"afterFillParameters"})),sn(r),delete r.parameters,r}async function Ip(e,t){var o,i,c;const{account:r=e.account,prepare:n=!0}=t,s=r?Ze(r):void 0,a=(()=>{if(Array.isArray(n))return n;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const l=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await rl({authorization:t.authorizationList[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:u,authorizationList:d,blobs:f,blobVersionedHashes:m,blockNumber:b,blockTag:g,data:E,gas:v,gasPrice:w,maxFeePerBlobGas:S,maxFeePerGas:T,maxPriorityFeePerGas:O,nonce:L,value:I,stateOverride:h,...y}=n?await gi(e,{...t,parameters:a,to:l}):t;if(v&&t.gas!==v)return v;const A=(typeof b=="bigint"?q(b):void 0)||g,B=mp(h);sn(t);const F=(c=(i=(o=e.chain)==null?void 0:o.formatters)==null?void 0:i.transactionRequest)==null?void 0:c.format,k=(F||Lr)({...Xs(y,{format:F}),account:s,accessList:u,authorizationList:d,blobs:f,blobVersionedHashes:m,data:E,gasPrice:w,maxFeePerBlobGas:S,maxFeePerGas:T,maxPriorityFeePerGas:O,nonce:L,to:l,value:I},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:B?[k,A??e.experimental_blockTag??"latest",B]:A?[k,A]:[k]}))}catch(l){throw LE(l,{...t,account:s,chain:e.chain})}}async function ck(e,t){const{abi:r,address:n,args:s,functionName:a,dataSuffix:o,...i}=t,c=dr({abi:r,args:s,functionName:a});try{return await se(e,Ip,"estimateGas")({data:`${c}${o?o.replace("0x",""):""}`,to:n,...i})}catch(l){const u=i.account?Ze(i.account):void 0;throw Zs(l,{abi:r,address:n,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:u==null?void 0:u.address})}}function Ka(e,t){if(!nt(e,{strict:!1}))throw new Ct({address:e});if(!nt(t,{strict:!1}))throw new Ct({address:t});return e.toLowerCase()===t.toLowerCase()}const qb="/docs/contract/decodeEventLog";function il(e){const{abi:t,data:r,strict:n,topics:s}=e,a=n??!0,[o,...i]=s;if(!o)throw new W8({docsPath:qb});const c=t.find(g=>g.type==="event"&&o===Jc(_r(g)));if(!(c&&"name"in c)||c.type!=="event")throw new q8(o,{docsPath:qb});const{name:l,inputs:u}=c,d=u==null?void 0:u.some(g=>!("name"in g&&g.name)),f=d?[]:{},m=u.map((g,E)=>[g,E]).filter(([g])=>"indexed"in g&&g.indexed);for(let g=0;g<m.length;g++){const[E,v]=m[g],w=i[g];if(!w)throw new Hd({abiItem:c,param:E});f[d?v:E.name||v]=lk({param:E,value:w})}const b=u.filter(g=>!("indexed"in g&&g.indexed));if(b.length>0){if(r&&r!=="0x")try{const g=Yo(b,r);if(g)if(d)for(let E=0;E<u.length;E++)f[E]=f[E]??g.shift();else for(let E=0;E<b.length;E++)f[b[E].name]=g[E]}catch(g){if(a)throw g instanceof B1||g instanceof fb?new qc({abiItem:c,data:r,params:b,size:lt(r)}):g}else if(a)throw new qc({abiItem:c,data:"0x",params:b,size:0})}return{eventName:l,args:Object.values(f).length>0?f:void 0}}function lk({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Yo([e],t)||[])[0]}function Bp(e){const{abi:t,args:r,logs:n,strict:s=!0}=e,a=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return n.map(o=>{var u;const i=t.filter(d=>d.type==="event"&&o.topics[0]===Jc(d));if(i.length===0)return null;let c,l;for(const d of i)try{c=il({...o,abi:[d],strict:!0}),l=d;break}catch{}if(!c&&!s){l=i[0];try{c=il({...o,abi:[l],strict:!1})}catch{const d=(u=l.inputs)==null?void 0:u.some(f=>!("name"in f&&f.name));return{...o,args:d?[]:{},eventName:l.name}}}return!c||!l||a&&!a.includes(c.eventName)||!uk({args:c.args,inputs:l.inputs,matchArgs:r})?null:{...c,...o}}).filter(Boolean)}function uk(e){const{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;if(!t)return!1;function s(a,o,i){try{return a.type==="address"?Ka(o,i):a.type==="string"||a.type==="bytes"?Ot(Cn(o))===i:o===i}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((a,o)=>{if(a==null)return!0;const i=r[o];return i?(Array.isArray(a)?a:[a]).some(l=>s(i,l,t[o])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof n=="object"&&!Array.isArray(n)?Object.entries(n).every(([a,o])=>{if(o==null)return!0;const i=r.find(l=>l.name===a);return i?(Array.isArray(o)?o:[o]).some(l=>s(i,l,t[a])):!1}):!1}function an(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}async function Fp(e,{address:t,blockHash:r,fromBlock:n,toBlock:s,event:a,events:o,args:i,strict:c}={}){const l=c??!1,u=o??(a?[a]:void 0);let d=[];u&&(d=[u.flatMap(g=>Ko({abi:[g],eventName:g.name,args:o?void 0:i}))],a&&(d=d[0]));let f;r?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof n=="bigint"?q(n):n,toBlock:typeof s=="bigint"?q(s):s}]});const m=f.map(b=>an(b));return u?Bp({abi:u,args:i,logs:m,strict:l}):m}async function Kb(e,t){const{abi:r,address:n,args:s,blockHash:a,eventName:o,fromBlock:i,toBlock:c,strict:l}=t,u=o?Ws({abi:r,name:o}):void 0,d=u?void 0:r.filter(f=>f.type==="event");return se(e,Fp,"getLogs")({address:n,args:s,blockHash:a,event:u,events:d,fromBlock:i,toBlock:c,strict:l})}const Op="/docs/contract/decodeFunctionResult";function ea(e){const{abi:t,args:r,functionName:n,data:s}=e;let a=t[0];if(n){const i=Ws({abi:t,args:r,name:n});if(!i)throw new Da(n,{docsPath:Op});a=i}if(a.type!=="function")throw new Da(void 0,{docsPath:Op});if(!a.outputs)throw new D1(a.name,{docsPath:Op});const o=Yo(a.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Up=BigInt(0),Dp=BigInt(1);function xi(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function _p(e){if(!xi(e))throw new Error("Uint8Array expected")}function wi(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function cl(e){const t=e.toString(16);return t.length&1?"0"+t:t}function Yb(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Up:BigInt("0x"+e)}const Zb=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",dk=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function vi(e){if(_p(e),Zb)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=dk[e[r]];return t}const Pn={_0:48,_9:57,A:65,F:70,a:97,f:102};function Xb(e){if(e>=Pn._0&&e<=Pn._9)return e-Pn._0;if(e>=Pn.A&&e<=Pn.F)return e-(Pn.A-10);if(e>=Pn.a&&e<=Pn.f)return e-(Pn.a-10)}function ll(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Zb)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let s=0,a=0;s<r;s++,a+=2){const o=Xb(e.charCodeAt(a)),i=Xb(e.charCodeAt(a+1));if(o===void 0||i===void 0){const c=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+a)}n[s]=o*16+i}return n}function ta(e){return Yb(vi(e))}function Qb(e){return _p(e),Yb(vi(Uint8Array.from(e).reverse()))}function Ei(e,t){return ll(e.toString(16).padStart(t*2,"0"))}function Jb(e,t){return Ei(e,t).reverse()}function vr(e,t,r){let n;if(typeof t=="string")try{n=ll(t)}catch(a){throw new Error(e+" must be hex string or Uint8Array, cause: "+a)}else if(xi(t))n=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=n.length;if(typeof r=="number"&&s!==r)throw new Error(e+" of length "+r+" expected, got "+s);return n}function ul(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];_p(s),t+=s.length}const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}const Mp=e=>typeof e=="bigint"&&Up<=e;function Np(e,t,r){return Mp(e)&&Mp(t)&&Mp(r)&&t<=e&&e<r}function Ya(e,t,r,n){if(!Np(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function pk(e){let t;for(t=0;e>Up;e>>=Dp,t+=1);return t}const dl=e=>(Dp<<BigInt(e))-Dp,Lp=e=>new Uint8Array(e),ey=e=>Uint8Array.from(e);function fk(e,t,r){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 r!="function")throw new Error("hmacFn must be a function");let n=Lp(e),s=Lp(e),a=0;const o=()=>{n.fill(1),s.fill(0),a=0},i=(...d)=>r(s,n,...d),c=(d=Lp(0))=>{s=i(ey([0]),d),n=i(),d.length!==0&&(s=i(ey([1]),d),n=i())},l=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const f=[];for(;d<t;){n=i();const m=n.slice();f.push(m),d+=n.length}return ul(...f)};return(d,f)=>{o(),c(d);let m;for(;!(m=f(l()));)c();return o(),m}}const mk={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"||xi(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 pl(e,t,r={}){const n=(s,a,o)=>{const i=mk[a];if(typeof i!="function")throw new Error("invalid validator function");const c=e[s];if(!(o&&c===void 0)&&!i(c,e))throw new Error("param "+String(s)+" is invalid. Expected "+a+", got "+c)};for(const[s,a]of Object.entries(t))n(s,a,!1);for(const[s,a]of Object.entries(r))n(s,a,!0);return e}function ty(e){const t=new WeakMap;return(r,...n)=>{const s=t.get(r);if(s!==void 0)return s;const a=e(r,...n);return t.set(r,a),a}}const hk="0.1.1";function bk(){return hk}class oe extends Error{static setStaticOptions(t){oe.prototype.docsOrigin=t.docsOrigin,oe.prototype.showVersion=t.showVersion,oe.prototype.version=t.version}constructor(t,r={}){const n=(()=>{var u;if(r.cause instanceof oe){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:(u=r.cause)!=null&&u.message?r.cause.message:r.details})(),s=r.cause instanceof oe&&r.cause.docsPath||r.docsPath,a=r.docsOrigin??oe.prototype.docsOrigin,o=`${a}${s??""}`,i=!!(r.version??oe.prototype.showVersion),c=r.version??oe.prototype.version,l=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...n||s||i?["",n?`Details: ${n}`:void 0,s?`See: ${o}`:void 0,i?`Version: ${c}`:void 0]:[]].filter(u=>typeof u=="string").join(`
102
- `);super(l,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{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,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{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,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=r.cause,this.details=n,this.docs=o,this.docsOrigin=a,this.docsPath=s,this.shortMessage=t,this.showVersion=i,this.version=c}walk(t){return ry(this,t)}}Object.defineProperty(oe,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${bk()}`}}),oe.setStaticOptions(oe.defaultStaticOptions);function ry(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?ry(e.cause,t):t?null:e}function Za(e,t){if(Xa(e)>t)throw new _k({givenSize:Xa(e),maxSize:t})}const In={zero:48,nine:57,A:65,F:70,a:97,f:102};function ny(e){if(e>=In.zero&&e<=In.nine)return e-In.zero;if(e>=In.A&&e<=In.F)return e-(In.A-10);if(e>=In.a&&e<=In.f)return e-(In.a-10)}function yk(e,t={}){const{dir:r,size:n=32}=t;if(n===0)return e;if(e.length>n)throw new Mk({size:e.length,targetSize:n,type:"Bytes"});const s=new Uint8Array(n);for(let a=0;a<n;a++){const o=r==="right";s[o?a:n-a-1]=e[o?a:e.length-a-1]}return s}function sy(e,t={}){const{dir:r="left"}=t;let n=e,s=0;for(let a=0;a<n.length-1&&n[r==="left"?a:n.length-a-1].toString()==="0";a++)s++;return n=r==="left"?n.slice(s):n.slice(0,n.length-s),n}function fl(e,t){if(bt(e)>t)throw new Hk({givenSize:bt(e),maxSize:t})}function gk(e,t){if(typeof t=="number"&&t>0&&t>bt(e)-1)throw new hy({offset:t,position:"start",size:bt(e)})}function xk(e,t,r){if(typeof t=="number"&&typeof r=="number"&&bt(e)!==r-t)throw new hy({offset:r,position:"end",size:bt(e)})}function ay(e,t={}){const{dir:r,size:n=32}=t;if(n===0)return e;const s=e.replace("0x","");if(s.length>n*2)throw new $k({size:Math.ceil(s.length/2),targetSize:n,type:"Hex"});return`0x${s[r==="right"?"padEnd":"padStart"](n*2,"0")}`}function wk(e,t={}){const{dir:r="left"}=t;let n=e.replace("0x",""),s=0;for(let a=0;a<n.length-1&&n[r==="left"?a:n.length-a-1].toString()==="0";a++)s++;return n=r==="left"?n.slice(s):n.slice(0,n.length-s),n==="0"?"0x":r==="right"&&n.length%2===1?`0x${n}0`:`0x${n}`}const vk="#__bigint";function ki(e,t,r){return JSON.stringify(e,(n,s)=>typeof s=="bigint"?s.toString()+vk:s,r)}const Ek=new TextDecoder,kk=new TextEncoder;function Ck(e){if(!(e instanceof Uint8Array)){if(!e)throw new ml(e);if(typeof e!="object")throw new ml(e);if(!("BYTES_PER_ELEMENT"in e))throw new ml(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new ml(e)}}function Tk(...e){let t=0;for(const n of e)t+=n.length;const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}function zp(e){return e instanceof Uint8Array?e:typeof e=="string"?ds(e):Ak(e)}function Ak(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function ds(e,t={}){const{size:r}=t;let n=e;r&&(fl(e,r),n=na(e,r));let s=n.slice(2);s.length%2&&(s=`0${s}`);const a=s.length/2,o=new Uint8Array(a);for(let i=0,c=0;i<a;i++){const l=ny(s.charCodeAt(c++)),u=ny(s.charCodeAt(c++));if(l===void 0||u===void 0)throw new oe(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[i]=l<<4|u}return o}function oy(e,t={}){const{size:r}=t,n=kk.encode(e);return typeof r=="number"?(Za(n,r),Sk(n,r)):n}function Sk(e,t){return yk(e,{dir:"right",size:t})}function Pk(e){return crypto.getRandomValues(new Uint8Array(e))}function Xa(e){return e.length}function Ik(e,t,r,n={}){const{strict:s}=n;return e.slice(t,r)}function Bk(e,t={}){const{size:r}=t;typeof r<"u"&&Za(e,r);const n=Pt(e,t);return yt(n,t)}function Fk(e,t={}){const{size:r}=t;let n=e;if(typeof r<"u"&&(Za(n,r),n=iy(n)),n.length>1||n[0]>1)throw new Dk(n);return!!n[0]}function Bn(e,t={}){const{size:r}=t;typeof r<"u"&&Za(e,r);const n=Pt(e,t);return Ti(n,t)}function Ok(e,t={}){const{size:r}=t;let n=e;return typeof r<"u"&&(Za(n,r),n=cy(n)),Ek.decode(n)}function iy(e){return sy(e,{dir:"left"})}function cy(e){return sy(e,{dir:"right"})}function Uk(e){try{return Ck(e),!0}catch{return!1}}class Dk extends oe{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}class ml extends oe{constructor(t){super(`Value \`${typeof t=="object"?ki(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}let _k=class extends oe{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},Mk=class extends oe{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const Nk=new TextEncoder,Lk=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function zk(e,t={}){const{strict:r=!1}=t;if(!e)throw new fy(e);if(typeof e!="string")throw new fy(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new my(e);if(!e.startsWith("0x"))throw new my(e)}function ft(...e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function hl(e){return e instanceof Uint8Array?Pt(e):Array.isArray(e)?Pt(new Uint8Array(e)):e}function ly(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(fl(r,t.size),ra(r,t.size)):r}function Pt(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=Lk[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(fl(n,t.size),na(n,t.size)):n}function Z(e,t={}){const{signed:r,size:n}=t,s=BigInt(e);let a;n?r?a=(1n<<BigInt(n)*8n-1n)-1n:a=2n**(BigInt(n)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&r?-a-1n:0;if(a&&s>a||s<o){const l=typeof e=="bigint"?"n":"";throw new py({max:a?`${a}${l}`:void 0,min:`${o}${l}`,signed:r,size:n,value:`${e}${l}`})}const c=`0x${(r&&s<0?BigInt.asUintN(n*8,BigInt(s)):s).toString(16)}`;return n?ra(c,n):c}function Ci(e,t={}){return Pt(Nk.encode(e),t)}function ra(e,t){return ay(e,{dir:"left",size:t})}function na(e,t){return ay(e,{dir:"right",size:t})}function uy(e){return Pt(Pk(e))}function Be(e,t,r,n={}){const{strict:s}=n;gk(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return s&&xk(a,t,r),a}function bt(e){return Math.ceil((e.length-2)/2)}function Rp(e){return wk(e,{dir:"left"})}function yt(e,t={}){const{signed:r}=t;t.size&&fl(e,t.size);const n=BigInt(e);if(!r)return n;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n)-1n,o=a>>1n;return n<=o?n:n-a-1n}function Ti(e,t={}){const{signed:r,size:n}=t;return Number(!r&&!n?e:yt(e,t))}function dy(e,t={}){const{size:r}=t;let n=ds(e);return r&&(Za(n,r),n=cy(n)),new TextDecoder().decode(n)}function Rr(e,t={}){const{strict:r=!1}=t;try{return zk(e,{strict:r}),!0}catch{return!1}}class py extends oe{constructor({max:t,min:r,signed:n,size:s,value:a}){super(`Number \`${a}\` is not in safe${s?` ${s*8}-bit`:""}${n?" signed":" unsigned"} integer range ${t?`(\`${r}\` to \`${t}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class fy extends oe{constructor(t){super(`Value \`${typeof t=="object"?ki(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class my extends oe{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class Rk extends oe{constructor(t){super(`Hex value \`"${t}"\` is an odd length (${t.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}class Hk extends oe{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class hy extends oe{constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class $k extends oe{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function Gk(e){return{address:e.address,amount:Z(e.amount),index:Z(e.index),validatorIndex:Z(e.validatorIndex)}}function by(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Z(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Z(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Z(e.gasLimit)},...typeof e.number=="bigint"&&{number:Z(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Z(e.prevRandao)},...typeof e.time=="bigint"&&{time:Z(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Gk)}}}const bl=[{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"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Hp=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],yy=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],gy=[...yy,{name:"resolveWithGateways",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"}]}],jk=[...yy,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],xy=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],wy=[{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"}]}],vy=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],Ey=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],ky=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],Vk="0x82ad56cb",Cy="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Wk="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",qk="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",$p="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";class Gp extends ${constructor({blockNumber:t,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...t&&n.blockCreated&&n.blockCreated>t?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class Kk extends ${constructor({chain:t,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class Yk extends ${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(`
103
- `),{name:"ChainNotFoundError"})}}class Ty extends ${constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}let Qa=class extends ${constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}};const jp="/docs/contract/encodeDeployData";function yl(e){const{abi:t,args:r,bytecode:n}=e;if(!r||r.length===0)return n;const s=t.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new H8({docsPath:jp});if(!("inputs"in s))throw new I1({docsPath:jp});if(!s.inputs||s.inputs.length===0)throw new I1({docsPath:jp});const a=ns(s.inputs,r);return ur([n,a])}function Ja({blockNumber:e,chain:t,contract:r}){var s;const n=(s=t==null?void 0:t.contracts)==null?void 0:s[r];if(!n)throw new Gp({chain:t,contract:{name:r}});if(e&&n.blockCreated&&n.blockCreated>e)throw new Gp({blockNumber:e,chain:t,contract:{name:r,blockCreated:n.blockCreated}});return n.address}function Vp(e,{docsPath:t,...r}){const n=(()=>{const s=nl(e,r);return s instanceof yi?e:s})();return new vb(n,{docsPath:t,...r})}function Wp(){let e=()=>{},t=()=>{};return{promise:new Promise((n,s)=>{e=n,t=s}),resolve:e,reject:t}}const qp=new Map;function Ay({fn:e,id:t,shouldSplitBatch:r,wait:n=0,sort:s}){const a=async()=>{const u=c();o();const d=u.map(({args:f})=>f);d.length!==0&&e(d).then(f=>{s&&Array.isArray(f)&&f.sort(s);for(let m=0;m<u.length;m++){const{resolve:b}=u[m];b==null||b([f[m],f])}}).catch(f=>{for(let m=0;m<u.length;m++){const{reject:b}=u[m];b==null||b(f)}})},o=()=>qp.delete(t),i=()=>c().map(({args:u})=>u),c=()=>qp.get(t)||[],l=u=>qp.set(t,[...c(),u]);return{flush:o,async schedule(u){const{promise:d,resolve:f,reject:m}=Wp();return(r==null?void 0:r([...i(),u]))&&a(),c().length>0?(l({args:u,resolve:f,reject:m}),d):(l({args:u,resolve:f,reject:m}),setTimeout(a,n),d)}}}async function Ai(e,t){var F,_,k,P;const{account:r=e.account,authorizationList:n,batch:s=!!((F=e.batch)!=null&&F.multicall),blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",accessList:i,blobs:c,blockOverrides:l,code:u,data:d,factory:f,factoryData:m,gas:b,gasPrice:g,maxFeePerBlobGas:E,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:S,to:T,value:O,stateOverride:L,...I}=t,h=r?Ze(r):void 0;if(u&&(f||m))throw new $("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&T)throw new $("Cannot provide both `code` & `to` as parameters.");const y=u&&d,x=f&&m&&T&&d,A=y||x,B=y?Sy({code:u,data:d}):x?Qk({data:d,factory:f,factoryData:m,to:T}):d;try{sn(t);const U=(typeof a=="bigint"?q(a):void 0)||o,z=l?by(l):void 0,H=mp(L),j=(P=(k=(_=e.chain)==null?void 0:_.formatters)==null?void 0:k.transactionRequest)==null?void 0:P.format,pe=(j||Lr)({...Xs(I,{format:j}),accessList:i,account:h,authorizationList:n,blobs:c,data:B,gas:b,gasPrice:g,maxFeePerBlobGas:E,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:S,to:A?void 0:T,value:O},"call");if(s&&Zk({request:pe})&&!H&&!z)try{return await Xk(e,{...pe,blockNumber:a,blockTag:o})}catch(de){if(!(de instanceof Ty)&&!(de instanceof Gp))throw de}const be=(()=>{const de=[pe,U];return H&&z?[...de,H,z]:H?[...de,H]:z?[...de,{},z]:de})(),ie=await e.request({method:"eth_call",params:be});return ie==="0x"?{data:void 0}:{data:ie}}catch(D){const U=Jk(D),{offchainLookup:z,offchainLookupSignature:H}=await Promise.resolve().then(()=>oC);if(e.ccipRead!==!1&&(U==null?void 0:U.slice(0,10))===H&&T)return{data:await z(e,{data:U,to:T})};throw A&&(U==null?void 0:U.slice(0,10))==="0x101bb98d"?new PE({factory:f}):Vp(D,{...t,account:h,chain:e.chain})}}function Zk({request:e}){const{data:t,to:r,...n}=e;return!(!t||t.startsWith(Vk)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function Xk(e,t){var g;const{batchSize:r=1024,deployless:n=!1,wait:s=0}=typeof((g=e.batch)==null?void 0:g.multicall)=="object"?e.batch.multicall:{},{blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",data:i,to:c}=t,l=(()=>{if(n)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Ja({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Ty})(),d=(typeof a=="bigint"?q(a):void 0)||o,{schedule:f}=Ay({id:`${e.uid}.${d}`,wait:s,shouldSplitBatch(E){return E.reduce((w,{data:S})=>w+(S.length-2),0)>r*2},fn:async E=>{const v=E.map(T=>({allowFailure:!0,callData:T.data,target:T.to})),w=dr({abi:bl,args:[v],functionName:"aggregate3"}),S=await e.request({method:"eth_call",params:[{...l===null?{data:Sy({code:$p,data:w})}:{to:l,data:w}},d]});return ea({abi:bl,args:[v],functionName:"aggregate3",data:S||"0x"})}}),[{returnData:m,success:b}]=await f({data:i,to:c});if(!b)throw new tl({data:m});return m==="0x"?{data:void 0}:{data:m}}function Sy(e){const{code:t,data:r}=e;return yl({abi:C1(["constructor(bytes, bytes)"]),bytecode:Cy,args:[t,r]})}function Qk(e){const{data:t,factory:r,factoryData:n,to:s}=e;return yl({abi:C1(["constructor(address, bytes, address, bytes)"]),bytecode:Wk,args:[s,t,r,n]})}function Jk(e){var r;if(!(e instanceof $))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(r=t.data)==null?void 0:r.data:t.data}async function Hr(e,t){const{abi:r,address:n,args:s,functionName:a,...o}=t,i=dr({abi:r,args:s,functionName:a});try{const{data:c}=await se(e,Ai,"call")({...o,data:i,to:n});return ea({abi:r,args:s,functionName:a,data:c||"0x"})}catch(c){throw Zs(c,{abi:r,address:n,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}async function e7(e,t){const{abi:r,address:n,args:s,dataSuffix:a,functionName:o,...i}=t,c=i.account?Ze(i.account):e.account,l=dr({abi:r,args:s,functionName:o});try{const{data:u}=await se(e,Ai,"call")({batch:!1,data:`${l}${a?a.replace("0x",""):""}`,to:n,...i,account:c}),d=ea({abi:r,args:s,functionName:o,data:u||"0x"}),f=r.filter(m=>"name"in m&&m.name===t.functionName);return{result:d,request:{abi:f,address:n,args:s,dataSuffix:a,functionName:o,...i,account:c}}}catch(u){throw Zs(u,{abi:r,address:n,args:s,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}const Kp=new Map,Py=new Map;let t7=0;function Fn(e,t,r){const n=++t7,s=()=>Kp.get(e)||[],a=()=>{const u=s();Kp.set(e,u.filter(d=>d.id!==n))},o=()=>{const u=s();if(!u.some(f=>f.id===n))return;const d=Py.get(e);if(u.length===1&&d){const f=d();f instanceof Promise&&f.catch(()=>{})}a()},i=s();if(Kp.set(e,[...i,{id:n,fns:t}]),i&&i.length>0)return o;const c={};for(const u in t)c[u]=((...d)=>{var m,b;const f=s();if(f.length!==0)for(const g of f)(b=(m=g.fns)[u])==null||b.call(m,...d)});const l=r(c);return typeof l=="function"&&Py.set(e,l),o}async function Yp(e){return new Promise(t=>setTimeout(t,e))}function eo(e,{emitOnBegin:t,initialWaitTime:r,interval:n}){let s=!0;const a=()=>s=!1;return(async()=>{let i;t&&(i=await e({unpoll:a}));const c=await(r==null?void 0:r(i))??n;await Yp(c);const l=async()=>{s&&(await e({unpoll:a}),await Yp(n),l())};l()})(),a}const r7=new Map,n7=new Map;function s7(e){const t=(s,a)=>({clear:()=>a.delete(s),get:()=>a.get(s),set:o=>a.set(s,o)}),r=t(e,r7),n=t(e,n7);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function a7(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){const n=s7(t),s=n.response.get();if(s&&r>0&&Date.now()-s.created.getTime()<r)return s.data;let a=n.promise.get();a||(a=e(),n.promise.set(a));try{const o=await a;return n.response.set({created:new Date,data:o}),o}finally{n.promise.clear()}}const o7=e=>`blockNumber.${e}`;async function Si(e,{cacheTime:t=e.cacheTime}={}){const r=await a7(()=>e.request({method:"eth_blockNumber"}),{cacheKey:o7(e.uid),cacheTime:t});return BigInt(r)}async function gl(e,{filter:t}){const r="strict"in t&&t.strict,n=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof n[0]=="string")return n;const s=n.map(a=>an(a));return!("abi"in t)||!t.abi?s:Bp({abi:t.abi,logs:s,strict:r})}async function xl(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function i7(e,t){const{abi:r,address:n,args:s,batch:a=!0,eventName:o,fromBlock:i,onError:c,onLogs:l,poll:u,pollingInterval:d=e.pollingInterval,strict:f}=t;return(typeof u<"u"?u:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const E=f??!1,v=ht(["watchContractEvent",n,s,a,e.uid,o,d,E,i]);return Fn(v,{onLogs:l,onError:c},w=>{let S;i!==void 0&&(S=i-1n);let T,O=!1;const L=eo(async()=>{var I;if(!O){try{T=await se(e,lb,"createContractEventFilter")({abi:r,address:n,args:s,eventName:o,strict:E,fromBlock:i})}catch{}O=!0;return}try{let h;if(T)h=await se(e,gl,"getFilterChanges")({filter:T});else{const y=await se(e,Si,"getBlockNumber")({});S&&S<y?h=await se(e,Kb,"getContractEvents")({abi:r,address:n,args:s,eventName:o,fromBlock:S+1n,toBlock:y,strict:E}):h=[],S=y}if(h.length===0)return;if(a)w.onLogs(h);else for(const y of h)w.onLogs([y])}catch(h){T&&h instanceof ss&&(O=!1),(I=w.onError)==null||I.call(w,h)}},{emitOnBegin:!0,interval:d});return async()=>{T&&await se(e,xl,"uninstallFilter")({filter:T}),L()}})})():(()=>{const E=f??!1,v=ht(["watchContractEvent",n,s,a,e.uid,o,d,E]);let w=!0,S=()=>w=!1;return Fn(v,{onLogs:l,onError:c},T=>((async()=>{try{const O=(()=>{if(e.transport.type==="fallback"){const h=e.transport.transports.find(y=>y.config.type==="webSocket"||y.config.type==="ipc");return h?h.value:e.transport}return e.transport})(),L=o?Ko({abi:r,eventName:o,args:s}):[],{unsubscribe:I}=await O.subscribe({params:["logs",{address:n,topics:L}],onData(h){var x;if(!w)return;const y=h.result;try{const{eventName:A,args:B}=il({abi:r,data:y.data,topics:y.topics,strict:f}),F=an(y,{args:B,eventName:A});T.onLogs([F])}catch(A){let B,F;if(A instanceof qc||A instanceof Hd){if(f)return;B=A.abiItem.name,F=(x=A.abiItem.inputs)==null?void 0:x.some(k=>!("name"in k&&k.name))}const _=an(y,{args:F?[]:{},eventName:B});T.onLogs([_])}},onError(h){var y;(y=T.onError)==null||y.call(T,h)}});S=I,w||S()}catch(O){c==null||c(O)}})(),()=>S()))})()}class On extends ${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(`
104
- `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class sa extends ${constructor({docsPath:t,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:t,metaMessages:r,name:"AccountTypeNotSupportedError"})}}function Zp({chain:e,currentChainId:t}){if(!e)throw new Yk;if(t!==e.id)throw new Kk({chain:e,currentChainId:t})}async function Xp(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const Qp=new Ra(128);async function wl(e,t){var w,S,T,O;const{account:r=e.account,chain:n=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,type:b,value:g,...E}=t;if(typeof r>"u")throw new On({docsPath:"/docs/actions/wallet/sendTransaction"});const v=r?Ze(r):null;try{sn(t);const L=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await rl({authorization:a[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`.")})})();if((v==null?void 0:v.type)==="json-rpc"||v===null){let I;n!==null&&(I=await se(e,us,"getChainId")({}),Zp({currentChainId:I,chain:n}));const h=(T=(S=(w=e.chain)==null?void 0:w.formatters)==null?void 0:S.transactionRequest)==null?void 0:T.format,x=(h||Lr)({...Xs(E,{format:h}),accessList:s,account:v,authorizationList:a,blobs:o,chainId:I,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,to:L,type:b,value:g},"sendTransaction"),A=Qp.get(e.uid),B=A?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:B,params:[x]},{retryCount:0})}catch(F){if(A===!1)throw F;const _=F;if(_.name==="InvalidInputRpcError"||_.name==="InvalidParamsRpcError"||_.name==="MethodNotFoundRpcError"||_.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[x]},{retryCount:0}).then(k=>(Qp.set(e.uid,!0),k)).catch(k=>{const P=k;throw P.name==="MethodNotFoundRpcError"||P.name==="MethodNotSupportedRpcError"?(Qp.set(e.uid,!1),_):P});throw _}}if((v==null?void 0:v.type)==="local"){const I=await se(e,gi,"prepareTransactionRequest")({account:v,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,nonceManager:v.nonceManager,parameters:[...Sp,"sidecars"],type:b,value:g,...E,to:L}),h=(O=n==null?void 0:n.serializers)==null?void 0:O.transaction,y=await v.signTransaction(I,{serializer:h});return await se(e,Xp,"sendRawTransaction")({serializedTransaction:y})}throw(v==null?void 0:v.type)==="smart"?new sa({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new sa({docsPath:"/docs/actions/wallet/sendTransaction",type:v==null?void 0:v.type})}catch(L){throw L instanceof sa?L:ol(L,{...t,account:v,chain:t.chain||void 0})}}async function Pi(e,t){return Pi.internal(e,wl,"sendTransaction",t)}(function(e){async function t(r,n,s,a){const{abi:o,account:i=r.account,address:c,args:l,dataSuffix:u,functionName:d,...f}=a;if(typeof i>"u")throw new On({docsPath:"/docs/contract/writeContract"});const m=i?Ze(i):null,b=dr({abi:o,args:l,functionName:d});try{return await se(r,n,s)({data:`${b}${u?u.replace("0x",""):""}`,to:c,account:m,...f})}catch(g){throw Zs(g,{abi:o,address:c,args:l,docsPath:"/docs/contract/writeContract",functionName:d,sender:m==null?void 0:m.address})}}e.internal=t})(Pi||(Pi={}));class c7 extends ${constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}function vl(e,{delay:t=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((s,a)=>{const o=async({count:i=0}={})=>{const c=async({error:l})=>{const u=typeof t=="function"?t({count:i,error:l}):t;u&&await Yp(u),o({count:i+1})};try{const l=await e();s(l)}catch(l){if(i<r&&await n({count:i,error:l}))return c({error:l});a(l)}};o()})}const Iy={"0x0":"reverted","0x1":"success"};function El(e,t){const r={...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=>an(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?ir(e.transactionIndex):null,status:e.status?Iy[e.status]:null,type:e.type?Fb[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}const Jp=sl("transactionReceipt",El),By="0x5792579257925792579257925792579257925792579257925792579257925792",Fy=q(0,{size:32});async function Oy(e,t){const{account:r=e.account,capabilities:n,chain:s=e.chain,experimental_fallback:a,experimental_fallbackDelay:o=32,forceAtomic:i=!1,id:c,version:l="2.0.0"}=t,u=r?Ze(r):null,d=t.calls.map(f=>{const m=f,b=m.abi?dr({abi:m.abi,functionName:m.functionName,args:m.args}):m.data;return{data:m.dataSuffix&&b?lr([b,m.dataSuffix]):b,to:m.to,value:m.value?q(m.value):void 0}});try{const f=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:i,calls:d,capabilities:n,chainId:q(s.id),from:u==null?void 0:u.address,id:c,version:l}]},{retryCount:0});return typeof f=="string"?{id:f}:f}catch(f){const m=f;if(a&&(m.name==="MethodNotFoundRpcError"||m.name==="MethodNotSupportedRpcError"||m.name==="UnknownRpcError"||m.details.toLowerCase().includes("does not exist / is not available")||m.details.toLowerCase().includes("missing or invalid. request()")||m.details.toLowerCase().includes("did not match any variant of untagged enum")||m.details.toLowerCase().includes("account upgraded to unsupported contract")||m.details.toLowerCase().includes("eip-7702 not supported")||m.details.toLowerCase().includes("unsupported wc_ method")||m.details.toLowerCase().includes("feature toggled misconfigured")||m.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(n&&Object.values(n).some(w=>!w.optional)){const w="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new ja(new $(w,{details:w}))}if(i&&d.length>1){const v="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Va(new $(v,{details:v}))}const b=[];for(const v of d){const w=wl(e,{account:u,chain:s,data:v.data,to:v.to,value:v.value?ze(v.value):void 0});b.push(w),o>0&&await new Promise(S=>setTimeout(S,o))}const g=await Promise.allSettled(b);if(g.every(v=>v.status==="rejected"))throw g[0].reason;const E=g.map(v=>v.status==="fulfilled"?v.value:Fy);return{id:lr([...E,q(s.id,{size:32}),By])}}throw ol(f,{...t,account:u,chain:t.chain})}}async function Uy(e,t){async function r(u){if(u.endsWith(By.slice(2))){const f=Zt(Kd(u,-64,-32)),m=Kd(u,0,-64).slice(2).match(/.{1,64}/g),b=await Promise.all(m.map(E=>Fy.slice(2)!==E?e.request({method:"eth_getTransactionReceipt",params:[`0x${E}`]},{dedupe:!0}):void 0)),g=b.some(E=>E===null)?100:b.every(E=>(E==null?void 0:E.status)==="0x1")?200:b.every(E=>(E==null?void 0:E.status)==="0x0")?500:600;return{atomic:!1,chainId:ir(f),receipts:b.filter(Boolean),status:g,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[u]})}const{atomic:n=!1,chainId:s,receipts:a,version:o="2.0.0",...i}=await r(t.id),[c,l]=(()=>{const u=i.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...i,atomic:n,chainId:s?ir(s):void 0,receipts:(a==null?void 0:a.map(u=>({...u,blockNumber:ze(u.blockNumber),gasUsed:ze(u.gasUsed),status:Iy[u.status]})))??[],statusCode:l,status:c,version:o}}async function Dy(e,t){const{id:r,pollingInterval:n=e.pollingInterval,status:s=({statusCode:g})=>g===200||g>=300,retryCount:a=4,retryDelay:o=({count:g})=>~~(1<<g)*200,timeout:i=6e4,throwOnFailure:c=!1}=t,l=ht(["waitForCallsStatus",e.uid,r]),{promise:u,resolve:d,reject:f}=Wp();let m;const b=Fn(l,{resolve:d,reject:f},g=>{const E=eo(async()=>{const v=w=>{clearTimeout(m),E(),w(),b()};try{const w=await vl(async()=>{const S=await se(e,Uy,"getCallsStatus")({id:r});if(c&&S.status==="failure")throw new c7(S);return S},{retryCount:a,delay:o});if(!s(w))return;v(()=>g.resolve(w))}catch(w){v(()=>g.reject(w))}},{interval:n,emitOnBegin:!0});return E});return m=i?setTimeout(()=>{b(),clearTimeout(m),f(new l7({id:r}))},i):void 0,await u}class l7 extends ${constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const ef=256;let kl=ef,Cl;function _y(e=11){if(!Cl||kl+e>ef*2){Cl="",kl=0;for(let t=0;t<ef;t++)Cl+=(256+Math.random()*256|0).toString(16).substring(1)}return Cl.substring(kl,kl+++e)}function My(e){const{batch:t,chain:r,ccipRead:n,key:s="base",name:a="Base Client",type:o="base"}=e,i=e.experimental_blockTag??(typeof(r==null?void 0:r.experimental_preconfirmationTime)=="number"?"pending":void 0),c=(r==null?void 0:r.blockTime)??12e3,l=Math.min(Math.max(Math.floor(c/2),500),4e3),u=e.pollingInterval??l,d=e.cacheTime??u,f=e.account?Ze(e.account):void 0,{config:m,request:b,value:g}=e.transport({account:f,chain:r,pollingInterval:u}),E={...m,...g},v={account:f,batch:t,cacheTime:d,ccipRead:n,chain:r,key:s,name:a,pollingInterval:u,request:b,transport:E,type:o,uid:_y(),...i?{experimental_blockTag:i}:{}};function w(S){return T=>{const O=T(S);for(const I in v)delete O[I];const L={...S,...O};return Object.assign(L,{extend:w(L)})}}return Object.assign(v,{extend:w(v)})}function tf(e){var r,n,s,a,o,i;if(!(e instanceof $))return!1;const t=e.walk(c=>c instanceof np);return t instanceof np?((r=t.data)==null?void 0:r.errorName)==="HttpError"||((n=t.data)==null?void 0:n.errorName)==="ResolverError"||((s=t.data)==null?void 0:s.errorName)==="ResolverNotContract"||((a=t.data)==null?void 0:a.errorName)==="ResolverNotFound"||((o=t.data)==null?void 0:o.errorName)==="ReverseAddressMismatch"||((i=t.data)==null?void 0:i.errorName)==="UnsupportedResolverProfile":!1}function u7(e){const{abi:t,data:r}=e,n=Vs(r,0,4),s=t.find(a=>a.type==="function"&&n===qo(_r(a)));if(!s)throw new K8(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:s.name,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Yo(s.inputs,Vs(r,4)):void 0}}const rf="/docs/contract/encodeErrorResult";function Ny(e){const{abi:t,errorName:r,args:n}=e;let s=t[0];if(r){const c=Ws({abi:t,args:n,name:r});if(!c)throw new F1(r,{docsPath:rf});s=c}if(s.type!=="error")throw new F1(void 0,{docsPath:rf});const a=_r(s),o=qo(a);let i="0x";if(n&&n.length>0){if(!s.inputs)throw new V8(s.name,{docsPath:rf});i=ns(s.inputs,n)}return ur([o,i])}const nf="/docs/contract/encodeFunctionResult";function d7(e){const{abi:t,functionName:r,result:n}=e;let s=t[0];if(r){const o=Ws({abi:t,name:r});if(!o)throw new Da(r,{docsPath:nf});s=o}if(s.type!=="function")throw new Da(void 0,{docsPath:nf});if(!s.outputs)throw new D1(s.name,{docsPath:nf});const a=(()=>{if(s.outputs.length===0)return[];if(s.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new _1(n)})();return ns(s.outputs,a)}const Ii="x-batch-gateway:true";async function Ly(e){const{data:t,ccipRequest:r}=e,{args:[n]}=u7({abi:Hp,data:t}),s=[],a=[];return await Promise.all(n.map(async(o,i)=>{try{a[i]=o.urls.includes(Ii)?await Ly({data:o.data,ccipRequest:r}):await r(o),s[i]=!1}catch(c){s[i]=!0,a[i]=p7(c)}})),d7({abi:Hp,functionName:"query",result:[s,a]})}function p7(e){return e.name==="HttpRequestError"&&e.status?Ny({abi:Hp,errorName:"HttpError",args:[e.status,e.shortMessage]}):Ny({abi:[db],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function zy(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Mr(t)?t:null}function sf(e){let t=new Uint8Array(32).fill(0);if(!e)return wt(t);const r=e.split(".");for(let n=r.length-1;n>=0;n-=1){const s=zy(r[n]),a=s?Cn(s):Ot(Gs(r[n]),"bytes");t=Ot(lr([t,a]),"bytes")}return wt(t)}function f7(e){return`[${e.slice(2)}]`}function m7(e){const t=new Uint8Array(32).fill(0);return e?zy(e)||Ot(Gs(e)):wt(t)}function af(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const r=new Uint8Array(Gs(t).byteLength+2);let n=0;const s=t.split(".");for(let a=0;a<s.length;a++){let o=Gs(s[a]);o.byteLength>255&&(o=Gs(f7(m7(s[a])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function h7(e,t){const{blockNumber:r,blockTag:n,coinType:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Ja({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(f=>a.endsWith(f)))return null;const d=s!=null?[sf(a),BigInt(s)]:[sf(a)];try{const f=dr({abi:wy,functionName:"addr",args:d}),m={address:l,abi:gy,functionName:"resolveWithGateways",args:[Ue(af(a)),f,o??[Ii]],blockNumber:r,blockTag:n},g=await se(e,Hr,"readContract")(m);if(g[0]==="0x")return null;const E=ea({abi:wy,args:d,functionName:"addr",data:g[0]});return E==="0x"||Zt(E)==="0x00"?null:E}catch(f){if(i)throw f;if(tf(f))return null;throw f}}class b7 extends ${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 Bi extends ${constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class of extends ${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 y7 extends ${constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const g7=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,x7=/^(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,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,w7=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,v7=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function E7(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const r=t.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=e})}}function Ry(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Hy({uri:e,gatewayUrls:t}){const r=w7.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};const n=Ry(t==null?void 0:t.ipfs,"https://ipfs.io"),s=Ry(t==null?void 0:t.arweave,"https://arweave.net"),a=e.match(g7),{protocol:o,subpath:i,target:c,subtarget:l=""}=(a==null?void 0:a.groups)||{},u=o==="ipns:/"||i==="ipns/",d=o==="ipfs:/"||i==="ipfs/"||x7.test(e);if(e.startsWith("http")&&!u&&!d){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((u||d)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${s}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(v7,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new of({uri:e})}function $y(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new b7({data:e});return e.image||e.image_url||e.image_data}async function k7({gatewayUrls:e,uri:t}){try{const r=await fetch(t).then(s=>s.json());return await cf({gatewayUrls:e,uri:$y(r)})}catch{throw new of({uri:t})}}async function cf({gatewayUrls:e,uri:t}){const{uri:r,isOnChain:n}=Hy({uri:t,gatewayUrls:e});if(n||await E7(r))return r;throw new of({uri:t})}function C7(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=t.split("/"),[a,o]=r.split(":"),[i,c]=n.split(":");if(!a||a.toLowerCase()!=="eip155")throw new Bi({reason:"Only EIP-155 supported"});if(!o)throw new Bi({reason:"Chain ID not found"});if(!c)throw new Bi({reason:"Contract address not found"});if(!s)throw new Bi({reason:"Token ID not found"});if(!i)throw new Bi({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o,10),namespace:i.toLowerCase(),contractAddress:c,tokenID:s}}async function T7(e,{nft:t}){if(t.namespace==="erc721")return Hr(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 Hr(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 y7({namespace:t.namespace})}async function A7(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?S7(e,{gatewayUrls:t,record:r}):cf({uri:r,gatewayUrls:t})}async function S7(e,{gatewayUrls:t,record:r}){const n=C7(r),s=await T7(e,{nft:n}),{uri:a,isOnChain:o,isEncoded:i}=Hy({uri:s,gatewayUrls:t});if(o&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const l=i?atob(a.replace("data:application/json;base64,","")):a,u=JSON.parse(l);return cf({uri:$y(u),gatewayUrls:t})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),k7({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}async function Gy(e,t){const{blockNumber:r,blockTag:n,key:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Ja({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),u=c==null?void 0:c.ensTlds;if(u&&!u.some(d=>a.endsWith(d)))return null;try{const d={address:l,abi:gy,args:[Ue(af(a)),dr({abi:xy,functionName:"text",args:[sf(a),s]}),o??[Ii]],functionName:"resolveWithGateways",blockNumber:r,blockTag:n},m=await se(e,Hr,"readContract")(d);if(m[0]==="0x")return null;const b=ea({abi:xy,functionName:"text",data:m[0]});return b===""?null:b}catch(d){if(i)throw d;if(tf(d))return null;throw d}}async function P7(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:s,gatewayUrls:a,strict:o,universalResolverAddress:i}){const c=await se(e,Gy,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:s,universalResolverAddress:i,gatewayUrls:a,strict:o});if(!c)return null;try{return await A7(e,{record:c,gatewayUrls:n})}catch{return null}}async function I7(e,t){const{address:r,blockNumber:n,blockTag:s,coinType:a=60n,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Ja({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})();try{const u={address:l,abi:jk,args:[r,a,o??[Ii]],functionName:"reverseWithGateways",blockNumber:n,blockTag:s},d=se(e,Hr,"readContract"),[f]=await d(u);return f||null}catch(u){if(i)throw u;if(tf(u))return null;throw u}}async function B7(e,t){const{blockNumber:r,blockTag:n,name:s}=t,{chain:a}=e,o=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!a)throw new Error("client chain not configured. universalResolverAddress is required.");return Ja({blockNumber:r,chain:a,contract:"ensUniversalResolver"})})(),i=a==null?void 0:a.ensTlds;if(i&&!i.some(l=>s.endsWith(l)))throw new Error(`${s} is not a valid ENS TLD (${i==null?void 0:i.join(", ")}) for chain "${a.name}" (id: ${a.id}).`);const[c]=await se(e,Hr,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Ue(af(s))],blockNumber:r,blockTag:n});return c}async function jy(e,t){var E,v,w;const{account:r=e.account,blockNumber:n,blockTag:s="latest",blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:f,value:m,...b}=t,g=r?Ze(r):void 0;try{sn(t);const T=(typeof n=="bigint"?q(n):void 0)||s,O=(w=(v=(E=e.chain)==null?void 0:E.formatters)==null?void 0:v.transactionRequest)==null?void 0:w.format,I=(O||Lr)({...Xs(b,{format:O}),account:g,blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:d,to:f,value:m},"createAccessList"),h=await e.request({method:"eth_createAccessList",params:[I,T]});return{accessList:h.accessList,gasUsed:BigInt(h.gasUsed)}}catch(S){throw Vp(S,{...t,account:g,chain:e.chain})}}async function F7(e){const t=el(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}async function Vy(e,{address:t,args:r,event:n,events:s,fromBlock:a,strict:o,toBlock:i}={}){const c=s??(n?[n]:void 0),l=el(e,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(m=>Ko({abi:[m],eventName:m.name,args:r}))],n&&(u=u[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof a=="bigint"?q(a):a,toBlock:typeof i=="bigint"?q(i):i,...u.length?{topics:u}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:a,id:d,request:l(d),strict:!!o,toBlock:i,type:"event"}}async function Wy(e){const t=el(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}async function O7(e,{address:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest"}){const s=typeof r=="bigint"?q(r):void 0,a=await e.request({method:"eth_getBalance",params:[t,s||n]});return BigInt(a)}async function U7(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function D7(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?q(r):void 0;let a;return t?a=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):a=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]},{dedupe:!!s}),ir(a)}async function Tl(e,{address:t,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?q(r):void 0,a=await e.request({method:"eth_getCode",params:[t,s||n]},{dedupe:!!s});if(a!=="0x")return a}class _7 extends ${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 M7(e,t){const{address:r,factory:n,factoryData:s}=t;try{const[a,o,i,c,l,u,d]=await se(e,Hr,"readContract")({abi:N7,address:r,functionName:"eip712Domain",factory:n,factoryData:s});return{domain:{name:o,version:i,chainId:Number(c),verifyingContract:l,salt:u},extensions:d,fields:a}}catch(a){const o=a;throw o.name==="ContractFunctionExecutionError"&&o.cause.name==="ContractFunctionZeroDataError"?new _7({address:r}):o}}const N7=[{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"}];function L7(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(r=>r.map(n=>BigInt(n)))}}async function z7(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const a=typeof r=="bigint"?q(r):void 0,o=await e.request({method:"eth_feeHistory",params:[q(t),a||n,s]},{dedupe:!!a});return L7(o)}async function R7(e,{filter:t}){const r=t.strict??!1,s=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(a=>an(a));return t.abi?Bp({abi:t.abi,logs:s,strict:r}):s}function H7(e){const{authorizationList:t}=e;if(t)for(const r of t){const{chainId:n}=r,s=r.address;if(!nt(s))throw new Ct({address:s});if(n<0)throw new Qa({chainId:n})}lf(e)}function $7(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new jb;for(const r of t){const n=lt(r),s=ir(Vs(r,0,1));if(n!==32)throw new ak({hash:r,size:n});if(s!==Gb)throw new ok({hash:r,version:s})}}lf(e)}function lf(e){const{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:s}=e;if(t<=0)throw new Qa({chainId:t});if(s&&!nt(s))throw new Ct({address:s});if(n&&n>Qs)throw new as({maxFeePerGas:n});if(r&&n&&r>n)throw new qa({maxFeePerGas:n,maxPriorityFeePerGas:r})}function G7(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(t<=0)throw new Qa({chainId:t});if(a&&!nt(a))throw new Ct({address:a});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>Qs)throw new as({maxFeePerGas:n})}function j7(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a}=e;if(a&&!nt(a))throw new Ct({address:a});if(typeof t<"u"&&t<=0)throw new Qa({chainId:t});if(r||s)throw new $("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>Qs)throw new as({maxFeePerGas:n})}function Fi(e){if(!e||e.length===0)return[];const t=[];for(let r=0;r<e.length;r++){const{address:n,storageKeys:s}=e[r];for(let a=0;a<s.length;a++)if(s[a].length-2!==64)throw new kE({storageKey:s[a]});if(!nt(n,{strict:!1}))throw new Ct({address:n});t.push([n,s])}return t}function Al(e,t){const r=Tp(e);return r==="eip1559"?q7(e,t):r==="eip2930"?K7(e,t):r==="eip4844"?W7(e,t):r==="eip7702"?V7(e,t):Y7(e,t)}function V7(e,t){const{authorizationList:r,chainId:n,gas:s,nonce:a,to:o,value:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;H7(e);const f=Fi(u),m=Z7(r);return ur(["0x04",nn([q(n),a?q(a):"0x",l?q(l):"0x",c?q(c):"0x",s?q(s):"0x",o??"0x",i?q(i):"0x",d??"0x",f,m,...to(e,t)])])}function W7(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerBlobGas:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;$7(e);let f=e.blobVersionedHashes,m=e.sidecars;if(e.blobs&&(typeof f>"u"||typeof m>"u")){const S=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(L=>wt(L)),T=e.kzg,O=vp({blobs:S,kzg:T});if(typeof f>"u"&&(f=Lb({commitments:O})),typeof m>"u"){const L=Ep({blobs:S,commitments:O,kzg:T});m=Vb({blobs:S,commitments:O,proofs:L})}}const b=Fi(u),g=[q(r),s?q(s):"0x",l?q(l):"0x",c?q(c):"0x",n?q(n):"0x",a??"0x",o?q(o):"0x",d??"0x",b,i?q(i):"0x",f??[],...to(e,t)],E=[],v=[],w=[];if(m)for(let S=0;S<m.length;S++){const{blob:T,commitment:O,proof:L}=m[S];E.push(T),v.push(O),w.push(L)}return ur(["0x03",nn(m?[g,E,v,w]:g)])}function q7(e,t){const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,data:u}=e;lf(e);const d=Fi(l),f=[q(r),s?q(s):"0x",c?q(c):"0x",i?q(i):"0x",n?q(n):"0x",a??"0x",o?q(o):"0x",u??"0x",d,...to(e,t)];return ur(["0x02",nn(f)])}function K7(e,t){const{chainId:r,gas:n,data:s,nonce:a,to:o,value:i,accessList:c,gasPrice:l}=e;G7(e);const u=Fi(c),d=[q(r),a?q(a):"0x",l?q(l):"0x",n?q(n):"0x",o??"0x",i?q(i):"0x",s??"0x",u,...to(e,t)];return ur(["0x01",nn(d)])}function Y7(e,t){const{chainId:r=0,gas:n,data:s,nonce:a,to:o,value:i,gasPrice:c}=e;j7(e);let l=[a?q(a):"0x",c?q(c):"0x",n?q(n):"0x",o??"0x",i?q(i):"0x",s??"0x"];if(t){const u=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);const m=27n+(t.v===27n?0n:1n);if(t.v!==m)throw new vE({v:t.v});return m})(),d=Zt(t.r),f=Zt(t.s);l=[...l,q(u),d==="0x00"?"0x":d,f==="0x00"?"0x":f]}else r>0&&(l=[...l,q(r),"0x","0x"]);return nn(l)}function to(e,t){const r=t??e,{v:n,yParity:s}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof s>"u")return[];const a=Zt(r.r),o=Zt(r.s);return[typeof s=="number"?s?q(1):"0x":n===0n?"0x":n===1n?q(1):n===27n?"0x":q(1),a==="0x00"?"0x":a,o==="0x00"?"0x":o]}function Z7(e){if(!e||e.length===0)return[];const t=[];for(const r of e){const{chainId:n,nonce:s,...a}=r,o=r.address;t.push([n?Ue(n):"0x",o,s?Ue(s):"0x",...to({},a)])}return t}async function X7({address:e,authorization:t,signature:r}){return Ka(Wd(e),await rl({authorization:t,signature:r}))}const Sl=new Ra(8192);function Q7(e,{enabled:t=!0,id:r}){if(!t||!r)return e();if(Sl.get(r))return Sl.get(r);const n=e().finally(()=>Sl.delete(r));return Sl.set(r,n),n}function J7(e,t={}){return async(r,n={})=>{var d;const{dedupe:s=!1,methods:a,retryDelay:o=150,retryCount:i=3,uid:c}={...t,...n},{method:l}=r;if((d=a==null?void 0:a.exclude)!=null&&d.includes(l))throw new Ys(new Error("method not supported"),{method:l});if(a!=null&&a.include&&!a.include.includes(l))throw new Ys(new Error("method not supported"),{method:l});const u=s?_a(`${c}.${ht(r)}`):void 0;return Q7(()=>vl(async()=>{try{return await e(r)}catch(f){const m=f;switch(m.code){case Jo.code:throw new Jo(m);case ei.code:throw new ei(m);case ti.code:throw new ti(m,{method:r.method});case ri.code:throw new ri(m);case Ks.code:throw new Ks(m);case ss.code:throw new ss(m);case ni.code:throw new ni(m);case si.code:throw new si(m);case ai.code:throw new ai(m);case Ys.code:throw new Ys(m,{method:r.method});case $a.code:throw new $a(m);case oi.code:throw new oi(m);case Ga.code:throw new Ga(m);case ii.code:throw new ii(m);case ci.code:throw new ci(m);case li.code:throw new li(m);case ui.code:throw new ui(m);case di.code:throw new di(m);case ja.code:throw new ja(m);case pi.code:throw new pi(m);case fi.code:throw new fi(m);case mi.code:throw new mi(m);case hi.code:throw new hi(m);case bi.code:throw new bi(m);case Va.code:throw new Va(m);case 5e3:throw new Ga(m);default:throw f instanceof $?f:new BE(m)}}},{delay:({count:f,error:m})=>{var b;if(m&&m instanceof qs){const g=(b=m==null?void 0:m.headers)==null?void 0:b.get("Retry-After");if(g!=null&&g.match(/\d/))return Number.parseInt(g,10)*1e3}return~~(1<<f)*o},retryCount:i,shouldRetry:({error:f})=>eC(f)}),{enabled:s,id:u})}}function eC(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===$a.code||e.code===Ks.code:e instanceof qs&&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}class tC extends ${constructor({callbackSelector:t,cause:r,data:n,extraData:s,sender:a,urls:o}){var i;super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],(i=r.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",o&&[" Gateway URL(s):",...o.map(c=>` ${Qo(c)}`)],` Sender: ${a}`,` Data: ${n}`,` Callback selector: ${t}`,` Extra data: ${s}`].flat(),name:"OffchainLookupError"})}}class rC extends ${constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Qo(r)}`,`Response: ${ht(t)}`],name:"OffchainLookupResponseMalformedError"})}}class nC extends ${constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"})}}const sC="0x556f1830",qy={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 aC(e,{blockNumber:t,blockTag:r,data:n,to:s}){const{args:a}=hb({data:n,abi:[qy]}),[o,i,c,l,u]=a,{ccipRead:d}=e,f=d&&typeof(d==null?void 0:d.request)=="function"?d.request:Ky;try{if(!Ka(s,o))throw new nC({sender:o,to:s});const m=i.includes(Ii)?await Ly({data:c,ccipRequest:f}):await f({data:c,sender:o,urls:i}),{data:b}=await Ai(e,{blockNumber:t,blockTag:r,data:lr([l,ns([{type:"bytes"},{type:"bytes"}],[m,u])]),to:s});return b}catch(m){throw new tC({callbackSelector:l,cause:m,data:n,extraData:u,sender:o,urls:i})}}async function Ky({data:e,sender:t,urls:r}){var s;let n=new Error("An unknown error occurred.");for(let a=0;a<r.length;a++){const o=r[a],i=o.includes("{data}")?"GET":"POST",c=i==="POST"?{data:e,sender:t}:void 0,l=i==="POST"?{"Content-Type":"application/json"}:{};try{const u=await fetch(o.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:l,method:i});let d;if((s=u.headers.get("Content-Type"))!=null&&s.startsWith("application/json")?d=(await u.json()).data:d=await u.text(),!u.ok){n=new qs({body:c,details:d!=null&&d.error?ht(d.error):u.statusText,headers:u.headers,status:u.status,url:o});continue}if(!Mr(d)){n=new rC({result:d,url:o});continue}return d}catch(u){n=new qs({body:c,details:u.message,url:o})}}throw n}const oC=Object.freeze(Object.defineProperty({__proto__:null,ccipRequest:Ky,offchainLookup:aC,offchainLookupAbiItem:qy,offchainLookupSignature:sC},Symbol.toStringTag,{value:"Module"}));function p(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(n){return s=>{const a=typeof s=="function"?s(n):s,o={...n,...a};return Object.assign(o,{extend:r(o)})}}return Object.assign(t,{extend:r(t)})}function iC(){return{}}function cC(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:n}){return new Promise((s,a)=>{(async()=>{let o;try{const i=new AbortController;r>0&&(o=setTimeout(()=>{n&&i.abort()},r)),s(await e({signal:(i==null?void 0:i.signal)||null}))}catch(i){(i==null?void 0:i.name)==="AbortError"&&a(t),a(i)}finally{clearTimeout(o)}})()})}function lC(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const Yy=lC();function uC(e,t={}){return{async request(r){var f;const{body:n,fetchFn:s=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:o=t.onResponse,timeout:i=t.timeout??1e4}=r,c={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:l,method:u,signal:d}=c;try{const m=await cC(async({signal:g})=>{const E={...c,body:Array.isArray(n)?ht(n.map(T=>({jsonrpc:"2.0",id:T.id??Yy.take(),...T}))):ht({jsonrpc:"2.0",id:n.id??Yy.take(),...n}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(i>0?g:null)},v=new Request(e,E),w=await(a==null?void 0:a(v,E))??{...E,url:e};return await s(w.url??e,w)},{errorInstance:new kb({body:n,url:e}),timeout:i,signal:!0});o&&await o(m);let b;if((f=m.headers.get("Content-Type"))!=null&&f.startsWith("application/json"))b=await m.json();else{b=await m.text();try{b=JSON.parse(b||"{}")}catch(g){if(m.ok)throw g;b={error:b}}}if(!m.ok)throw new qs({body:n,details:ht(b.error)||m.statusText,headers:m.headers,status:m.status,url:e});return b}catch(m){throw m instanceof qs||m instanceof kb?m:new qs({body:n,cause:m,url:e})}}}}const dC=`Ethereum Signed Message:
105
- `;function pC(e){const t=typeof e=="string"?_a(e):typeof e.raw=="string"?e.raw:wt(e.raw),r=_a(`${dC}${lt(t)}`);return lr([r,t])}function Zy(e,t){return Ot(pC(e),t)}class fC extends ${constructor({domain:t}){super(`Invalid domain "${ht(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class mC extends ${constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class hC extends ${constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function bC(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(c,l)=>{const u={...l};for(const d of c){const{name:f,type:m}=d;m==="address"&&(u[f]=u[f].toLowerCase())}return u},o=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},i=(()=>{if(n!=="EIP712Domain")return a(s[n],r)})();return ht({domain:o,message:i,primaryType:n,types:s})}function Xy(e){const{domain:t,message:r,primaryType:n,types:s}=e,a=(o,i)=>{for(const c of o){const{name:l,type:u}=c,d=i[l],f=u.match(ab);if(f&&(typeof d=="number"||typeof d=="bigint")){const[g,E,v]=f;q(d,{signed:E==="int",size:Number.parseInt(v,10)/8})}if(u==="address"&&typeof d=="string"&&!nt(d))throw new Ct({address:d});const m=u.match(Wv);if(m){const[g,E]=m;if(E&&lt(d)!==Number.parseInt(E,10))throw new Z8({expectedSize:Number.parseInt(E,10),givenSize:lt(d)})}const b=s[u];b&&(yC(u),a(b,d))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new fC({domain:t});a(s.EIP712Domain,t)}if(n!=="EIP712Domain")if(s[n])a(s[n],r);else throw new mC({primaryType:n,types:s})}function Qy({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"||typeof(e==null?void 0:e.chainId)=="bigint")&&{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)}function yC(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new hC({type:e})}function gC(e){const{domain:t={},message:r,primaryType:n}=e,s={EIP712Domain:Qy({domain:t}),...e.types};Xy({domain:t,message:r,primaryType:n,types:s});const a=["0x1901"];return t&&a.push(xC({domain:t,types:s})),n!=="EIP712Domain"&&a.push(Jy({data:r,primaryType:n,types:s})),Ot(lr(a))}function xC({domain:e,types:t}){return Jy({data:e,primaryType:"EIP712Domain",types:t})}function Jy({data:e,primaryType:t,types:r}){const n=eg({data:e,primaryType:t,types:r});return Ot(n)}function eg({data:e,primaryType:t,types:r}){const n=[{type:"bytes32"}],s=[wC({primaryType:t,types:r})];for(const a of r[t]){const[o,i]=rg({types:r,name:a.name,type:a.type,value:e[a.name]});n.push(o),s.push(i)}return ns(n,s)}function wC({primaryType:e,types:t}){const r=Ue(vC({primaryType:e,types:t}));return Ot(r)}function vC({primaryType:e,types:t}){let r="";const n=tg({primaryType:e,types:t});n.delete(e);const s=[e,...Array.from(n).sort()];for(const a of s)r+=`${a}(${t[a].map(({name:o,type:i})=>`${i} ${o}`).join(",")})`;return r}function tg({primaryType:e,types:t},r=new Set){const n=e.match(/^\w*/u),s=n==null?void 0:n[0];if(r.has(s)||t[s]===void 0)return r;r.add(s);for(const a of t[s])tg({primaryType:a.type,types:t},r);return r}function rg({types:e,name:t,type:r,value:n}){if(e[r]!==void 0)return[{type:"bytes32"},Ot(eg({data:n,primaryType:r,types:e}))];if(r==="bytes")return[{type:"bytes32"},Ot(n)];if(r==="string")return[{type:"bytes32"},Ot(Ue(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),a=n.map(o=>rg({name:t,type:s,types:e,value:o}));return[{type:"bytes32"},Ot(ns(a.map(([o])=>o),a.map(([,o])=>o)))]}return[{type:r},n]}class EC extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const uf={checksum:new EC(8192)}.checksum;function Oi(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=eb(zp(e));return r==="Bytes"?n:Pt(n)}function kC(e,t={}){const{as:r=typeof e=="string"?"Hex":"Bytes"}=t,n=Mb(zp(e));return r==="Bytes"?n:Pt(n)}function CC(e){return Rr(e)&&bt(e)===32}function ng(e,t={}){const{compressed:r}=t,{prefix:n,x:s,y:a}=e;if(r===!1||typeof s=="bigint"&&typeof a=="bigint"){if(n!==4)throw new ag({prefix:n,cause:new BC});return}if(r===!0||typeof s=="bigint"&&typeof a>"u"){if(n!==3&&n!==2)throw new ag({prefix:n,cause:new IC});return}throw new PC({publicKey:e})}function TC(e){const t=(()=>{if(Rr(e))return sg(e);if(Uk(e))return AC(e);const{prefix:r,x:n,y:s}=e;return typeof n=="bigint"&&typeof s=="bigint"?{prefix:r??4,x:n,y:s}:{prefix:r,x:n}})();return ng(t),t}function AC(e){return sg(Pt(e))}function sg(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new FC({publicKey:e});if(e.length===130){const n=BigInt(Be(e,0,32)),s=BigInt(Be(e,32,64));return{prefix:4,x:n,y:s}}if(e.length===132){const n=Number(Be(e,0,1)),s=BigInt(Be(e,1,33)),a=BigInt(Be(e,33,65));return{prefix:n,x:s,y:a}}const t=Number(Be(e,0,1)),r=BigInt(Be(e,1,33));return{prefix:t,x:r}}function SC(e,t={}){return ds(df(e,t))}function df(e,t={}){ng(e);const{prefix:r,x:n,y:s}=e,{includePrefix:a=!0}=t;return ft(a?Z(r,{size:1}):"0x",Z(n,{size:32}),typeof s=="bigint"?Z(s,{size:32}):"0x")}class PC extends oe{constructor({publicKey:t}){super(`Value \`${ki(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class ag extends oe{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class IC extends oe{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class BC extends oe{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let FC=class extends oe{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${bt(hl(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const OC=/^0x[a-fA-F0-9]{40}$/;function $r(e,t={}){const{strict:r=!0}=t;if(!OC.test(e))throw new og({address:e,cause:new DC});if(r){if(e.toLowerCase()===e)return;if(pf(e)!==e)throw new og({address:e,cause:new _C})}}function pf(e){if(uf.has(e))return uf.get(e);$r(e,{strict:!1});const t=e.substring(2).toLowerCase(),r=Oi(oy(t),{as:"Bytes"}),n=t.split("");for(let a=0;a<40;a+=2)r[a>>1]>>4>=8&&n[a]&&(n[a]=n[a].toUpperCase()),(r[a>>1]&15)>=8&&n[a+1]&&(n[a+1]=n[a+1].toUpperCase());const s=`0x${n.join("")}`;return uf.set(e,s),s}function UC(e,t={}){const{checksum:r=!1}=t;return $r(e),r?pf(e):e}function Pl(e,t={}){const r=Oi(`0x${df(e).slice(4)}`).substring(26);return UC(`0x${r}`,t)}function ff(e,t){return $r(e,{strict:!1}),$r(t,{strict:!1}),e.toLowerCase()===t.toLowerCase()}function Il(e,t={}){const{strict:r=!0}=t??{};try{return $r(e,{strict:r}),!0}catch{return!1}}class og extends oe{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class DC extends oe{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class _C extends oe{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const MC=/^(.*)\[([0-9]*)\]$/,NC=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,ig=/^(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)?$/,cg=2n**256n-1n;function ro(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=yf(t.type);if(a){const[o,i]=a;return zC(e,{...t,type:i},{checksumAddress:n,length:o,staticPosition:s})}if(t.type==="tuple")return GC(e,t,{checksumAddress:n,staticPosition:s});if(t.type==="address")return LC(e,{checksum:n});if(t.type==="bool")return RC(e);if(t.type.startsWith("bytes"))return HC(e,t,{staticPosition:s});if(t.type.startsWith("uint")||t.type.startsWith("int"))return $C(e,t);if(t.type==="string")return jC(e,{staticPosition:s});throw new vf(t.type)}const lg=32,mf=32;function LC(e,t={}){const{checksum:r=!1}=t,n=e.readBytes(32);return[(a=>r?pf(a):a)(Pt(Ik(n,-20))),32]}function zC(e,t,r){const{checksumAddress:n,length:s,staticPosition:a}=r;if(!s){const c=Bn(e.readBytes(mf)),l=a+c,u=l+lg;e.setPosition(l);const d=Bn(e.readBytes(lg)),f=Ui(t);let m=0;const b=[];for(let g=0;g<d;++g){e.setPosition(u+(f?g*32:m));const[E,v]=ro(e,t,{checksumAddress:n,staticPosition:u});m+=v,b.push(E)}return e.setPosition(a+32),[b,32]}if(Ui(t)){const c=Bn(e.readBytes(mf)),l=a+c,u=[];for(let d=0;d<s;++d){e.setPosition(l+d*32);const[f]=ro(e,t,{checksumAddress:n,staticPosition:l});u.push(f)}return e.setPosition(a+32),[u,32]}let o=0;const i=[];for(let c=0;c<s;++c){const[l,u]=ro(e,t,{checksumAddress:n,staticPosition:a+o});o+=u,i.push(l)}return[i,o]}function RC(e){return[Fk(e.readBytes(32),{size:32}),32]}function HC(e,t,{staticPosition:r}){const[n,s]=t.type.split("bytes");if(!s){const o=Bn(e.readBytes(32));e.setPosition(r+o);const i=Bn(e.readBytes(32));if(i===0)return e.setPosition(r+32),["0x",32];const c=e.readBytes(i);return e.setPosition(r+32),[Pt(c),32]}return[Pt(e.readBytes(Number.parseInt(s,10),32)),32]}function $C(e,t){const r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[n>48?Bk(s,{signed:r}):Bn(s,{signed:r}),32]}function GC(e,t,r){const{checksumAddress:n,staticPosition:s}=r,a=t.components.length===0||t.components.some(({name:c})=>!c),o=a?[]:{};let i=0;if(Ui(t)){const c=Bn(e.readBytes(mf)),l=s+c;for(let u=0;u<t.components.length;++u){const d=t.components[u];e.setPosition(l+i);const[f,m]=ro(e,d,{checksumAddress:n,staticPosition:l});i+=m,o[a?u:d==null?void 0:d.name]=f}return e.setPosition(s+32),[o,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[u,d]=ro(e,l,{checksumAddress:n,staticPosition:s});o[a?c:l==null?void 0:l.name]=u,i+=d}return[o,i]}function jC(e,{staticPosition:t}){const r=Bn(e.readBytes(32)),n=t+r;e.setPosition(n);const s=Bn(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),o=Ok(iy(a));return e.setPosition(t+32),[o,32]}function VC({checksumAddress:e,parameters:t,values:r}){const n=[];for(let s=0;s<t.length;s++)n.push(hf({checksumAddress:e,parameter:t[s],value:r[s]}));return n}function hf({checksumAddress:e=!1,parameter:t,value:r}){const n=t,s=yf(n.type);if(s){const[a,o]=s;return qC(r,{checksumAddress:e,length:a,parameter:{...n,type:o}})}if(n.type==="tuple")return QC(r,{checksumAddress:e,parameter:n});if(n.type==="address")return WC(r,{checksum:e});if(n.type==="bool")return YC(r);if(n.type.startsWith("uint")||n.type.startsWith("int")){const a=n.type.startsWith("int"),[,,o="256"]=ig.exec(n.type)??[];return ZC(r,{signed:a,size:Number(o)})}if(n.type.startsWith("bytes"))return KC(r,{type:n.type});if(n.type==="string")return XC(r);throw new vf(n.type)}function bf(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=bt(i)}const r=[],n=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?(r.push(Z(t+s,{size:32})),n.push(i),s+=bt(i)):r.push(i)}return ft(...r,...n)}function WC(e,t){const{checksum:r=!1}=t;return $r(e,{strict:r}),{dynamic:!1,encoded:ra(e.toLowerCase())}}function qC(e,t){const{checksumAddress:r,length:n,parameter:s}=t,a=n===null;if(!Array.isArray(e))throw new o9(e);if(!a&&e.length!==n)throw new a9({expectedLength:n,givenLength:e.length,type:`${s.type}[${n}]`});let o=!1;const i=[];for(let c=0;c<e.length;c++){const l=hf({checksumAddress:r,parameter:s,value:e[c]});l.dynamic&&(o=!0),i.push(l)}if(a||o){const c=bf(i);if(a){const l=Z(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?ft(l,c):l}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:ft(...i.map(({encoded:c})=>c))}}function KC(e,{type:t}){const[,r]=t.split("bytes"),n=bt(e);if(!r){let s=e;return n%32!==0&&(s=na(s,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:ft(ra(Z(n,{size:32})),s)}}if(n!==Number.parseInt(r,10))throw new pg({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:na(e)}}function YC(e){if(typeof e!="boolean")throw new oe(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:ra(ly(e))}}function ZC(e,{signed:t,size:r}){if(typeof r=="number"){const n=2n**(BigInt(r)-(t?1n:0n))-1n,s=t?-n-1n:0n;if(e>n||e<s)throw new py({max:n.toString(),min:s.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:Z(e,{size:32,signed:t})}}function XC(e){const t=Ci(e),r=Math.ceil(bt(t)/32),n=[];for(let s=0;s<r;s++)n.push(na(Be(t,s*32,(s+1)*32)));return{dynamic:!0,encoded:ft(na(Z(bt(t),{size:32})),...n)}}function QC(e,t){const{checksumAddress:r,parameter:n}=t;let s=!1;const a=[];for(let o=0;o<n.components.length;o++){const i=n.components[o],c=Array.isArray(e)?o:i.name,l=hf({checksumAddress:r,parameter:i,value:e[c]});a.push(l),l.dynamic&&(s=!0)}return{dynamic:s,encoded:s?bf(a):ft(...a.map(({encoded:o})=>o))}}function yf(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Ui(e){var n;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(n=e.components)==null?void 0:n.some(Ui);const r=yf(e.type);return!!(r&&Ui({...e,type:r[1]}))}const JC={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 t9({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new e9({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new ug({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 ug({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 r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+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 r=this.inspectBytes(e);return this.position+=t??e,r},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 gf(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(JC);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}class ug extends oe{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class e9 extends oe{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class t9 extends oe{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function r9(e,t,r={}){const{as:n="Array",checksumAddress:s=!1}=r,a=typeof t=="string"?ds(t):t,o=gf(a);if(Xa(a)===0&&e.length>0)throw new s9;if(Xa(a)&&Xa(a)<32)throw new n9({data:typeof t=="string"?t:Pt(t),parameters:e,size:Xa(a)});let i=0;const c=n==="Array"?[]:{};for(let l=0;l<e.length;++l){const u=e[l];o.setPosition(i);const[d,f]=ro(o,u,{checksumAddress:s,staticPosition:0});i+=f,n==="Array"?c.push(d):c[u.name??l]=d}return c}function xf(e,t,r){const{checksumAddress:n=!1}={};if(e.length!==t.length)throw new fg({expectedLength:e.length,givenLength:t.length});const s=VC({checksumAddress:n,parameters:e,values:t}),a=bf(s);return a.length===0?"0x":a}function wf(e,t){if(e.length!==t.length)throw new fg({expectedLength:e.length,givenLength:t.length});const r=[];for(let n=0;n<e.length;n++){const s=e[n],a=t[n];r.push(wf.encode(s,a))}return ft(...r)}(function(e){function t(r,n,s=!1){if(r==="address"){const c=n;return $r(c),ra(c.toLowerCase(),s?32:0)}if(r==="string")return Ci(n);if(r==="bytes")return n;if(r==="bool")return ra(ly(n),s?32:1);const a=r.match(ig);if(a){const[c,l,u="256"]=a,d=Number.parseInt(u,10)/8;return Z(n,{size:s?32:d,signed:l==="int"})}const o=r.match(NC);if(o){const[c,l]=o;if(Number.parseInt(l,10)!==(n.length-2)/2)throw new pg({expectedSize:Number.parseInt(l,10),value:n});return na(n,s?32:0)}const i=r.match(MC);if(i&&Array.isArray(n)){const[c,l]=i,u=[];for(let d=0;d<n.length;d++)u.push(t(l,n[d],!0));return u.length===0?"0x":ft(...u)}throw new vf(r)}e.encode=t})(wf||(wf={}));function dg(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?A1(e):e}class n9 extends oe{constructor({data:t,parameters:r,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Oa(r)})`,`Data: ${t} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class s9 extends oe{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class a9 extends oe{constructor({expectedLength:t,givenLength:r,type:n}){super(`Array length mismatch for type \`${n}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class pg extends oe{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${bt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class fg extends oe{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
106
- `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class o9 extends oe{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class vf extends oe{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function i9(e){return c9(e,"Hex")}function c9(e,t){const r=t,n=(()=>{if(typeof e=="string"){if(e.length>3&&e.length%2!==0)throw new Rk(e);return ds(e)}return e})(),s=gf(n,{recursiveReadLimit:Number.POSITIVE_INFINITY});return mg(s,r)}function mg(e,t="Hex"){if(e.bytes.length===0)return t==="Hex"?Pt(e.bytes):e.bytes;const r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){const s=hg(e,r,128),a=e.readBytes(s);return t==="Hex"?Pt(a):a}const n=hg(e,r,192);return l9(e,n,t)}function hg(e,t,r){if(r===128&&t<128)return 1;if(t<=r+55)return t-r;if(t===r+55+1)return e.readUint8();if(t===r+55+2)return e.readUint16();if(t===r+55+3)return e.readUint24();if(t===r+55+4)return e.readUint32();throw new oe("Invalid RLP prefix")}function l9(e,t,r){const n=e.position,s=[];for(;e.position-n<t;)s.push(mg(e,r));return s}function u9(e,t){const{as:r}=t,n=bg(e),s=gf(new Uint8Array(n.length));return n.encode(s),r==="Hex"?Pt(s.bytes):s.bytes}function d9(e,t={}){const{as:r="Hex"}=t;return u9(e,{as:r})}function bg(e){return Array.isArray(e)?p9(e.map(t=>bg(t))):f9(e)}function p9(e){const t=e.reduce((s,a)=>s+a.length,0),r=yg(t);return{length:t<=55?1+t:1+r+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+r),r===1?s.pushUint8(t):r===2?s.pushUint16(t):r===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function f9(e){const t=typeof e=="string"?ds(e):e,r=yg(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+r),r===1?s.pushUint8(t.length):r===2?s.pushUint16(t.length):r===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function yg(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new oe("Length is too large.")}class gg extends Gd{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,kv(t);const n=Xc(r);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 s=this.blockLen,a=new Uint8Array(s);a.set(n.length>s?t.create().update(n).digest():n);for(let o=0;o<a.length;o++)a[o]^=54;this.iHash.update(a),this.oHash=t.create();for(let o=0;o<a.length;o++)a[o]^=106;this.oHash.update(a),rs(a)}update(t){return za(this),this.iHash.update(t),this}digestInto(t){za(this),js(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:s,destroyed:a,blockLen:o,outputLen:i}=this;return t=t,t.finished=s,t.destroyed=a,t.blockLen=o,t.outputLen=i,t.oHash=r._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const xg=(e,t,r)=>new gg(e,t).update(r).digest();xg.create=(e,t)=>new gg(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Jt=BigInt(0),jt=BigInt(1),aa=BigInt(2),m9=BigInt(3),wg=BigInt(4),vg=BigInt(5),Eg=BigInt(8);function er(e,t){const r=e%t;return r>=Jt?r:t+r}function Er(e,t,r){let n=e;for(;t-- >Jt;)n*=n,n%=r;return n}function Ef(e,t){if(e===Jt)throw new Error("invert: expected non-zero number");if(t<=Jt)throw new Error("invert: expected positive modulus, got "+t);let r=er(e,t),n=t,s=Jt,a=jt;for(;r!==Jt;){const i=n/r,c=n%r,l=s-a*i;n=r,r=c,s=a,a=l}if(n!==jt)throw new Error("invert: does not exist");return er(s,t)}function kg(e,t){const r=(e.ORDER+jt)/wg,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}function h9(e,t){const r=(e.ORDER-vg)/Eg,n=e.mul(t,aa),s=e.pow(n,r),a=e.mul(t,s),o=e.mul(e.mul(a,aa),s),i=e.mul(a,e.sub(o,e.ONE));if(!e.eql(e.sqr(i),t))throw new Error("Cannot find square root");return i}function b9(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-jt,r=0;for(;t%aa===Jt;)t/=aa,r++;let n=aa;const s=no(e);for(;Tg(s,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return kg;let a=s.pow(n,t);const o=(t+jt)/aa;return function(c,l){if(c.is0(l))return l;if(Tg(c,l)!==1)throw new Error("Cannot find square root");let u=r,d=c.mul(c.ONE,a),f=c.pow(l,t),m=c.pow(l,o);for(;!c.eql(f,c.ONE);){if(c.is0(f))return c.ZERO;let b=1,g=c.sqr(f);for(;!c.eql(g,c.ONE);)if(b++,g=c.sqr(g),b===u)throw new Error("Cannot find square root");const E=jt<<BigInt(u-b-1),v=c.pow(d,E);u=b,d=c.sqr(v),f=c.mul(f,d),m=c.mul(m,v)}return m}}function y9(e){return e%wg===m9?kg:e%Eg===vg?h9:b9(e)}const g9=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function x9(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=g9.reduce((n,s)=>(n[s]="function",n),t);return pl(e,r)}function w9(e,t,r){if(r<Jt)throw new Error("invalid exponent, negatives unsupported");if(r===Jt)return e.ONE;if(r===jt)return t;let n=e.ONE,s=t;for(;r>Jt;)r&jt&&(n=e.mul(n,s)),s=e.sqr(s),r>>=jt;return n}function Cg(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),s=t.reduce((o,i,c)=>e.is0(i)?o:(n[c]=o,e.mul(o,i)),e.ONE),a=e.inv(s);return t.reduceRight((o,i,c)=>e.is0(i)?o:(n[c]=e.mul(o,n[c]),e.mul(o,i)),a),n}function Tg(e,t){const r=(e.ORDER-jt)/aa,n=e.pow(t,r),s=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),o=e.eql(n,e.neg(e.ONE));if(!s&&!a&&!o)throw new Error("invalid Legendre symbol result");return s?1:a?0:-1}function Ag(e,t){t!==void 0&&jo(t);const r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function no(e,t,r=!1,n={}){if(e<=Jt)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:a}=Ag(e,t);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const i=Object.freeze({ORDER:e,isLE:r,BITS:s,BYTES:a,MASK:dl(s),ZERO:Jt,ONE:jt,create:c=>er(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Jt<=c&&c<e},is0:c=>c===Jt,isOdd:c=>(c&jt)===jt,neg:c=>er(-c,e),eql:(c,l)=>c===l,sqr:c=>er(c*c,e),add:(c,l)=>er(c+l,e),sub:(c,l)=>er(c-l,e),mul:(c,l)=>er(c*l,e),pow:(c,l)=>w9(i,c,l),div:(c,l)=>er(c*Ef(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Ef(c,e),sqrt:n.sqrt||(c=>(o||(o=y9(e)),o(i,c))),toBytes:c=>r?Jb(c,a):Ei(c,a),fromBytes:c=>{if(c.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+c.length);return r?Qb(c):ta(c)},invertBatch:c=>Cg(i,c),cmov:(c,l,u)=>u?l:c});return Object.freeze(i)}function Sg(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 Pg(e){const t=Sg(e);return t+Math.ceil(t/2)}function v9(e,t,r=!1){const n=e.length,s=Sg(t),a=Pg(t);if(n<16||n<a||n>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+n);const o=r?Qb(e):ta(e),i=er(o,t-jt)+jt;return r?Jb(i,s):Ei(i,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ig=BigInt(0),kf=BigInt(1);function Cf(e,t){const r=t.negate();return e?r:t}function Bg(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Tf(e,t){Bg(e,t);const r=Math.ceil(t/e)+1,n=2**(e-1),s=2**e,a=dl(e),o=BigInt(e);return{windows:r,windowSize:n,mask:a,maxNumber:s,shiftBy:o}}function Fg(e,t,r){const{windowSize:n,mask:s,maxNumber:a,shiftBy:o}=r;let i=Number(e&s),c=e>>o;i>n&&(i-=a,c+=kf);const l=t*n,u=l+Math.abs(i)-1,d=i===0,f=i<0,m=t%2!==0;return{nextN:c,offset:u,isZero:d,isNeg:f,isNegF:m,offsetF:l}}function E9(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,n)=>{if(!(r instanceof t))throw new Error("invalid point at index "+n)})}function k9(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,n)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+n)})}const Af=new WeakMap,Og=new WeakMap;function Sf(e){return Og.get(e)||1}function C9(e,t){return{constTimeNegate:Cf,hasPrecomputes(r){return Sf(r)!==1},unsafeLadder(r,n,s=e.ZERO){let a=r;for(;n>Ig;)n&kf&&(s=s.add(a)),a=a.double(),n>>=kf;return s},precomputeWindow(r,n){const{windows:s,windowSize:a}=Tf(n,t),o=[];let i=r,c=i;for(let l=0;l<s;l++){c=i,o.push(c);for(let u=1;u<a;u++)c=c.add(i),o.push(c);i=c.double()}return o},wNAF(r,n,s){let a=e.ZERO,o=e.BASE;const i=Tf(r,t);for(let c=0;c<i.windows;c++){const{nextN:l,offset:u,isZero:d,isNeg:f,isNegF:m,offsetF:b}=Fg(s,c,i);s=l,d?o=o.add(Cf(m,n[b])):a=a.add(Cf(f,n[u]))}return{p:a,f:o}},wNAFUnsafe(r,n,s,a=e.ZERO){const o=Tf(r,t);for(let i=0;i<o.windows&&s!==Ig;i++){const{nextN:c,offset:l,isZero:u,isNeg:d}=Fg(s,i,o);if(s=c,!u){const f=n[l];a=a.add(d?f.negate():f)}}return a},getPrecomputes(r,n,s){let a=Af.get(n);return a||(a=this.precomputeWindow(n,r),r!==1&&Af.set(n,s(a))),a},wNAFCached(r,n,s){const a=Sf(r);return this.wNAF(a,this.getPrecomputes(a,r,s),n)},wNAFCachedUnsafe(r,n,s,a){const o=Sf(r);return o===1?this.unsafeLadder(r,n,a):this.wNAFUnsafe(o,this.getPrecomputes(o,r,s),n,a)},setWindowSize(r,n){Bg(n,t),Og.set(r,n),Af.delete(r)}}}function T9(e,t,r,n){E9(r,e),k9(n,t);const s=r.length,a=n.length;if(s!==a)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,i=pk(BigInt(s));let c=1;i>12?c=i-3:i>4?c=i-2:i>0&&(c=2);const l=dl(c),u=new Array(Number(l)+1).fill(o),d=Math.floor((t.BITS-1)/c)*c;let f=o;for(let m=d;m>=0;m-=c){u.fill(o);for(let g=0;g<a;g++){const E=n[g],v=Number(E>>BigInt(m)&l);u[v]=u[v].add(r[g])}let b=o;for(let g=u.length-1,E=o;g>0;g--)E=E.add(u[g]),b=b.add(E);if(f=f.add(b),m!==0)for(let g=0;g<c;g++)f=f.double()}return f}function Ug(e){return x9(e.Fp),pl(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Ag(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Dg(e){e.lowS!==void 0&&wi("lowS",e.lowS),e.prehash!==void 0&&wi("prehash",e.prehash)}function A9(e){const t=Ug(e);pl(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:r,Fp:n,a:s}=t;if(r){if(!n.eql(s,n.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class S9 extends Error{constructor(t=""){super(t)}}const Un={Err:S9,_tlv:{encode:(e,t)=>{const{Err:r}=Un;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");const n=t.length/2,s=cl(n);if(s.length/2&128)throw new r("tlv.encode: long form length too big");const a=n>127?cl(s.length/2|128):"";return cl(e)+a+s+t},decode(e,t){const{Err:r}=Un;let n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");const s=t[n++],a=!!(s&128);let o=0;if(!a)o=s;else{const c=s&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");const l=t.subarray(n,n+c);if(l.length!==c)throw new r("tlv.decode: length bytes not complete");if(l[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(const u of l)o=o<<8|u;if(n+=c,o<128)throw new r("tlv.decode(long): not minimal encoding")}const i=t.subarray(n,n+o);if(i.length!==o)throw new r("tlv.decode: wrong value length");return{v:i,l:t.subarray(n+o)}}},_int:{encode(e){const{Err:t}=Un;if(e<Dn)throw new t("integer: negative integers are not allowed");let r=cl(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){const{Err:t}=Un;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return ta(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=Un,s=vr("signature",e),{v:a,l:o}=n.decode(48,s);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:i,l:c}=n.decode(2,a),{v:l,l:u}=n.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(i),s:r.decode(l)}},hexFromSig(e){const{_tlv:t,_int:r}=Un,n=t.encode(2,r.encode(e.r)),s=t.encode(2,r.encode(e.s)),a=n+s;return t.encode(48,a)}};function Pf(e,t){return vi(Ei(e,t))}const Dn=BigInt(0),It=BigInt(1);BigInt(2);const If=BigInt(3),P9=BigInt(4);function I9(e){const t=A9(e),{Fp:r}=t,n=no(t.n,t.nBitLength),s=t.toBytes||((S,T,O)=>{const L=T.toAffine();return ul(Uint8Array.from([4]),r.toBytes(L.x),r.toBytes(L.y))}),a=t.fromBytes||(S=>{const T=S.subarray(1),O=r.fromBytes(T.subarray(0,r.BYTES)),L=r.fromBytes(T.subarray(r.BYTES,2*r.BYTES));return{x:O,y:L}});function o(S){const{a:T,b:O}=t,L=r.sqr(S),I=r.mul(L,S);return r.add(r.add(I,r.mul(S,T)),O)}function i(S,T){const O=r.sqr(T),L=o(S);return r.eql(O,L)}if(!i(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=r.mul(r.pow(t.a,If),P9),l=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,l)))throw new Error("bad curve params: a or b");function u(S){return Np(S,It,t.n)}function d(S){const{allowedPrivateKeyLengths:T,nByteLength:O,wrapPrivateKey:L,n:I}=t;if(T&&typeof S!="bigint"){if(xi(S)&&(S=vi(S)),typeof S!="string"||!T.includes(S.length))throw new Error("invalid private key");S=S.padStart(O*2,"0")}let h;try{h=typeof S=="bigint"?S:ta(vr("private key",S,O))}catch{throw new Error("invalid private key, expected hex or "+O+" bytes, got "+typeof S)}return L&&(h=er(h,I)),Ya("private key",h,It,I),h}function f(S){if(!(S instanceof g))throw new Error("ProjectivePoint expected")}const m=ty((S,T)=>{const{px:O,py:L,pz:I}=S;if(r.eql(I,r.ONE))return{x:O,y:L};const h=S.is0();T==null&&(T=h?r.ONE:r.inv(I));const y=r.mul(O,T),x=r.mul(L,T),A=r.mul(I,T);if(h)return{x:r.ZERO,y:r.ZERO};if(!r.eql(A,r.ONE))throw new Error("invZ was invalid");return{x:y,y:x}}),b=ty(S=>{if(S.is0()){if(t.allowInfinityPoint&&!r.is0(S.py))return;throw new Error("bad point: ZERO")}const{x:T,y:O}=S.toAffine();if(!r.isValid(T)||!r.isValid(O))throw new Error("bad point: x or y not FE");if(!i(T,O))throw new Error("bad point: equation left != right");if(!S.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(T,O,L){if(T==null||!r.isValid(T))throw new Error("x required");if(O==null||!r.isValid(O)||r.is0(O))throw new Error("y required");if(L==null||!r.isValid(L))throw new Error("z required");this.px=T,this.py=O,this.pz=L,Object.freeze(this)}static fromAffine(T){const{x:O,y:L}=T||{};if(!T||!r.isValid(O)||!r.isValid(L))throw new Error("invalid affine point");if(T instanceof g)throw new Error("projective point not allowed");const I=h=>r.eql(h,r.ZERO);return I(O)&&I(L)?g.ZERO:new g(O,L,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(T){const O=Cg(r,T.map(L=>L.pz));return T.map((L,I)=>L.toAffine(O[I])).map(g.fromAffine)}static fromHex(T){const O=g.fromAffine(a(vr("pointHex",T)));return O.assertValidity(),O}static fromPrivateKey(T){return g.BASE.multiply(d(T))}static msm(T,O){return T9(g,n,T,O)}_setWindowSize(T){w.setWindowSize(this,T)}assertValidity(){b(this)}hasEvenY(){const{y:T}=this.toAffine();if(r.isOdd)return!r.isOdd(T);throw new Error("Field doesn't support isOdd")}equals(T){f(T);const{px:O,py:L,pz:I}=this,{px:h,py:y,pz:x}=T,A=r.eql(r.mul(O,x),r.mul(h,I)),B=r.eql(r.mul(L,x),r.mul(y,I));return A&&B}negate(){return new g(this.px,r.neg(this.py),this.pz)}double(){const{a:T,b:O}=t,L=r.mul(O,If),{px:I,py:h,pz:y}=this;let x=r.ZERO,A=r.ZERO,B=r.ZERO,F=r.mul(I,I),_=r.mul(h,h),k=r.mul(y,y),P=r.mul(I,h);return P=r.add(P,P),B=r.mul(I,y),B=r.add(B,B),x=r.mul(T,B),A=r.mul(L,k),A=r.add(x,A),x=r.sub(_,A),A=r.add(_,A),A=r.mul(x,A),x=r.mul(P,x),B=r.mul(L,B),k=r.mul(T,k),P=r.sub(F,k),P=r.mul(T,P),P=r.add(P,B),B=r.add(F,F),F=r.add(B,F),F=r.add(F,k),F=r.mul(F,P),A=r.add(A,F),k=r.mul(h,y),k=r.add(k,k),F=r.mul(k,P),x=r.sub(x,F),B=r.mul(k,_),B=r.add(B,B),B=r.add(B,B),new g(x,A,B)}add(T){f(T);const{px:O,py:L,pz:I}=this,{px:h,py:y,pz:x}=T;let A=r.ZERO,B=r.ZERO,F=r.ZERO;const _=t.a,k=r.mul(t.b,If);let P=r.mul(O,h),D=r.mul(L,y),U=r.mul(I,x),z=r.add(O,L),H=r.add(h,y);z=r.mul(z,H),H=r.add(P,D),z=r.sub(z,H),H=r.add(O,I);let j=r.add(h,x);return H=r.mul(H,j),j=r.add(P,U),H=r.sub(H,j),j=r.add(L,I),A=r.add(y,x),j=r.mul(j,A),A=r.add(D,U),j=r.sub(j,A),F=r.mul(_,H),A=r.mul(k,U),F=r.add(A,F),A=r.sub(D,F),F=r.add(D,F),B=r.mul(A,F),D=r.add(P,P),D=r.add(D,P),U=r.mul(_,U),H=r.mul(k,H),D=r.add(D,U),U=r.sub(P,U),U=r.mul(_,U),H=r.add(H,U),P=r.mul(D,H),B=r.add(B,P),P=r.mul(j,H),A=r.mul(z,A),A=r.sub(A,P),P=r.mul(z,D),F=r.mul(j,F),F=r.add(F,P),new g(A,B,F)}subtract(T){return this.add(T.negate())}is0(){return this.equals(g.ZERO)}wNAF(T){return w.wNAFCached(this,T,g.normalizeZ)}multiplyUnsafe(T){const{endo:O,n:L}=t;Ya("scalar",T,Dn,L);const I=g.ZERO;if(T===Dn)return I;if(this.is0()||T===It)return this;if(!O||w.hasPrecomputes(this))return w.wNAFCachedUnsafe(this,T,g.normalizeZ);let{k1neg:h,k1:y,k2neg:x,k2:A}=O.splitScalar(T),B=I,F=I,_=this;for(;y>Dn||A>Dn;)y&It&&(B=B.add(_)),A&It&&(F=F.add(_)),_=_.double(),y>>=It,A>>=It;return h&&(B=B.negate()),x&&(F=F.negate()),F=new g(r.mul(F.px,O.beta),F.py,F.pz),B.add(F)}multiply(T){const{endo:O,n:L}=t;Ya("scalar",T,It,L);let I,h;if(O){const{k1neg:y,k1:x,k2neg:A,k2:B}=O.splitScalar(T);let{p:F,f:_}=this.wNAF(x),{p:k,f:P}=this.wNAF(B);F=w.constTimeNegate(y,F),k=w.constTimeNegate(A,k),k=new g(r.mul(k.px,O.beta),k.py,k.pz),I=F.add(k),h=_.add(P)}else{const{p:y,f:x}=this.wNAF(T);I=y,h=x}return g.normalizeZ([I,h])[0]}multiplyAndAddUnsafe(T,O,L){const I=g.BASE,h=(x,A)=>A===Dn||A===It||!x.equals(I)?x.multiplyUnsafe(A):x.multiply(A),y=h(this,O).add(h(T,L));return y.is0()?void 0:y}toAffine(T){return m(this,T)}isTorsionFree(){const{h:T,isTorsionFree:O}=t;if(T===It)return!0;if(O)return O(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:T,clearCofactor:O}=t;return T===It?this:O?O(g,this):this.multiplyUnsafe(t.h)}toRawBytes(T=!0){return wi("isCompressed",T),this.assertValidity(),s(g,this,T)}toHex(T=!0){return wi("isCompressed",T),vi(this.toRawBytes(T))}}g.BASE=new g(t.Gx,t.Gy,r.ONE),g.ZERO=new g(r.ZERO,r.ONE,r.ZERO);const{endo:E,nBitLength:v}=t,w=C9(g,E?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:d,weierstrassEquation:o,isWithinCurveOrder:u}}function B9(e){const t=Ug(e);return pl(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function F9(e){const t=B9(e),{Fp:r,n,nByteLength:s,nBitLength:a}=t,o=r.BYTES+1,i=2*r.BYTES+1;function c(k){return er(k,n)}function l(k){return Ef(k,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:m}=I9({...t,toBytes(k,P,D){const U=P.toAffine(),z=r.toBytes(U.x),H=ul;return wi("isCompressed",D),D?H(Uint8Array.from([P.hasEvenY()?2:3]),z):H(Uint8Array.from([4]),z,r.toBytes(U.y))},fromBytes(k){const P=k.length,D=k[0],U=k.subarray(1);if(P===o&&(D===2||D===3)){const z=ta(U);if(!Np(z,It,r.ORDER))throw new Error("Point is not on curve");const H=f(z);let j;try{j=r.sqrt(H)}catch(be){const ie=be instanceof Error?": "+be.message:"";throw new Error("Point is not on curve"+ie)}const Q=(j&It)===It;return(D&1)===1!==Q&&(j=r.neg(j)),{x:z,y:j}}else if(P===i&&D===4){const z=r.fromBytes(U.subarray(0,r.BYTES)),H=r.fromBytes(U.subarray(r.BYTES,2*r.BYTES));return{x:z,y:H}}else{const z=o,H=i;throw new Error("invalid Point, expected length of "+z+", or uncompressed "+H+", got "+P)}}});function b(k){const P=n>>It;return k>P}function g(k){return b(k)?c(-k):k}const E=(k,P,D)=>ta(k.slice(P,D));class v{constructor(P,D,U){Ya("r",P,It,n),Ya("s",D,It,n),this.r=P,this.s=D,U!=null&&(this.recovery=U),Object.freeze(this)}static fromCompact(P){const D=s;return P=vr("compactSignature",P,D*2),new v(E(P,0,D),E(P,D,2*D))}static fromDER(P){const{r:D,s:U}=Un.toSig(vr("DER",P));return new v(D,U)}assertValidity(){}addRecoveryBit(P){return new v(this.r,this.s,P)}recoverPublicKey(P){const{r:D,s:U,recovery:z}=this,H=I(vr("msgHash",P));if(z==null||![0,1,2,3].includes(z))throw new Error("recovery id invalid");const j=z===2||z===3?D+t.n:D;if(j>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const Q=(z&1)===0?"02":"03",pe=u.fromHex(Q+Pf(j,r.BYTES)),be=l(j),ie=c(-H*be),de=c(U*be),Oe=u.BASE.multiplyAndAddUnsafe(pe,ie,de);if(!Oe)throw new Error("point at infinify");return Oe.assertValidity(),Oe}hasHighS(){return b(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return ll(this.toDERHex())}toDERHex(){return Un.hexFromSig(this)}toCompactRawBytes(){return ll(this.toCompactHex())}toCompactHex(){const P=s;return Pf(this.r,P)+Pf(this.s,P)}}const w={isValidPrivateKey(k){try{return d(k),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const k=Pg(t.n);return v9(t.randomBytes(k),t.n)},precompute(k=8,P=u.BASE){return P._setWindowSize(k),P.multiply(BigInt(3)),P}};function S(k,P=!0){return u.fromPrivateKey(k).toRawBytes(P)}function T(k){if(typeof k=="bigint")return!1;if(k instanceof u)return!0;const D=vr("key",k).length,U=r.BYTES,z=U+1,H=2*U+1;if(!(t.allowedPrivateKeyLengths||s===z))return D===z||D===H}function O(k,P,D=!0){if(T(k)===!0)throw new Error("first arg must be private key");if(T(P)===!1)throw new Error("second arg must be public key");return u.fromHex(P).multiply(d(k)).toRawBytes(D)}const L=t.bits2int||function(k){if(k.length>8192)throw new Error("input is too large");const P=ta(k),D=k.length*8-a;return D>0?P>>BigInt(D):P},I=t.bits2int_modN||function(k){return c(L(k))},h=dl(a);function y(k){return Ya("num < 2^"+a,k,Dn,h),Ei(k,s)}function x(k,P,D=A){if(["recovered","canonical"].some(ve=>ve in D))throw new Error("sign() legacy options not supported");const{hash:U,randomBytes:z}=t;let{lowS:H,prehash:j,extraEntropy:Q}=D;H==null&&(H=!0),k=vr("msgHash",k),Dg(D),j&&(k=vr("prehashed msgHash",U(k)));const pe=I(k),be=d(P),ie=[y(be),y(pe)];if(Q!=null&&Q!==!1){const ve=Q===!0?z(r.BYTES):Q;ie.push(vr("extraEntropy",ve))}const de=ul(...ie),Oe=pe;function X(ve){const Me=L(ve);if(!m(Me))return;const je=l(Me),it=u.BASE.multiply(Me).toAffine(),Ae=c(it.x);if(Ae===Dn)return;const Ee=c(je*c(Oe+Ae*be));if(Ee===Dn)return;let ye=(it.x===Ae?0:2)|Number(it.y&It),Xe=Ee;return H&&b(Ee)&&(Xe=g(Ee),ye^=1),new v(Ae,Xe,ye)}return{seed:de,k2sig:X}}const A={lowS:t.lowS,prehash:!1},B={lowS:t.lowS,prehash:!1};function F(k,P,D=A){const{seed:U,k2sig:z}=x(k,P,D),H=t;return fk(H.hash.outputLen,H.nByteLength,H.hmac)(U,z)}u.BASE._setWindowSize(8);function _(k,P,D,U=B){var ye;const z=k;P=vr("msgHash",P),D=vr("publicKey",D);const{lowS:H,prehash:j,format:Q}=U;if(Dg(U),"strict"in U)throw new Error("options.strict was renamed to lowS");if(Q!==void 0&&Q!=="compact"&&Q!=="der")throw new Error("format must be compact or der");const pe=typeof z=="string"||xi(z),be=!pe&&!Q&&typeof z=="object"&&z!==null&&typeof z.r=="bigint"&&typeof z.s=="bigint";if(!pe&&!be)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let ie,de;try{if(be&&(ie=new v(z.r,z.s)),pe){try{Q!=="compact"&&(ie=v.fromDER(z))}catch(Xe){if(!(Xe instanceof Un.Err))throw Xe}!ie&&Q!=="der"&&(ie=v.fromCompact(z))}de=u.fromHex(D)}catch{return!1}if(!ie||H&&ie.hasHighS())return!1;j&&(P=t.hash(P));const{r:Oe,s:X}=ie,ve=I(P),Me=l(X),je=c(ve*Me),it=c(Oe*Me),Ae=(ye=u.BASE.multiplyAndAddUnsafe(de,je,it))==null?void 0:ye.toAffine();return Ae?c(Ae.x)===Oe:!1}return{CURVE:t,getPublicKey:S,getSharedSecret:O,sign:F,verify:_,ProjectivePoint:u,Signature:v,utils:w}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function O9(e){return{hash:e,hmac:(t,...r)=>xg(e,t,Iv(...r)),randomBytes:Bv}}function Bl(e,t){const r=n=>F9({...e,...O9(n)});return{...r(t),create:r}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _g=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Mg=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),U9=BigInt(0),D9=BigInt(1),Bf=BigInt(2),Ng=(e,t)=>(e+t/Bf)/t;function _9(e){const t=_g,r=BigInt(3),n=BigInt(6),s=BigInt(11),a=BigInt(22),o=BigInt(23),i=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,d=Er(u,r,t)*u%t,f=Er(d,r,t)*u%t,m=Er(f,Bf,t)*l%t,b=Er(m,s,t)*m%t,g=Er(b,a,t)*b%t,E=Er(g,i,t)*g%t,v=Er(E,c,t)*E%t,w=Er(v,i,t)*g%t,S=Er(w,r,t)*u%t,T=Er(S,o,t)*b%t,O=Er(T,n,t)*l%t,L=Er(O,Bf,t);if(!Ff.eql(Ff.sqr(L),e))throw new Error("Cannot find square root");return L}const Ff=no(_g,void 0,void 0,{sqrt:_9}),Di=Bl({a:U9,b:BigInt(7),Fp:Ff,n:Mg,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Mg,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-D9*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,o=BigInt("0x100000000000000000000000000000000"),i=Ng(a*e,t),c=Ng(-n*e,t);let l=er(e-i*r-c*s,t),u=er(-i*n-c*a,t);const d=l>o,f=u>o;if(d&&(l=t-l),f&&(u=t-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:l,k2neg:f,k2:u}}}},kp),M9=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:Di},Symbol.toStringTag,{value:"Module"}));function Fl(e,t={}){const{recovered:r}=t;if(typeof e.r>"u")throw new Mf({signature:e});if(typeof e.s>"u")throw new Mf({signature:e});if(r&&typeof e.yParity>"u")throw new Mf({signature:e});if(e.r<0n||e.r>cg)throw new G9({value:e.r});if(e.s<0n||e.s>cg)throw new j9({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Ul({value:e.yParity})}function N9(e){return Of(Pt(e))}function Of(e){if(e.length!==130&&e.length!==132)throw new $9({signature:e});const t=BigInt(Be(e,0,32)),r=BigInt(Be(e,32,64)),n=(()=>{const s=+`0x${e.slice(130)}`;if(!Number.isNaN(s))try{return Df(s)}catch{throw new Ul({value:s})}})();return typeof n>"u"?{r:t,s:r}:{r:t,s:r,yParity:n}}function Lg(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return Ol(e)}function Ol(e){const t=typeof e=="string"?Of(e):e instanceof Uint8Array?N9(e):typeof e.r=="string"?Uf(e):e.v?L9(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Fl(t),t}function L9(e){return{r:e.r,s:e.s,yParity:Df(e.v)}}function Uf(e){const t=(()=>{const r=e.v?Number(e.v):void 0;let n=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof n!="number"&&(n=Df(r)),typeof n!="number")throw new Ul({value:e.yParity});return n})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function z9(e){const[t,r,n]=e;return Ol({r:r==="0x"?0n:BigInt(r),s:n==="0x"?0n:BigInt(n),yParity:t==="0x"?0:Number(t)})}function R9(e){Fl(e);const t=e.r,r=e.s;return ft(Z(t,{size:32}),Z(r,{size:32}),typeof e.yParity=="number"?Z(_f(e.yParity),{size:1}):"0x")}function zg(e){const{r:t,s:r,yParity:n}=e;return{r:Z(t,{size:32}),s:Z(r,{size:32}),yParity:n===0?"0x0":"0x1"}}function H9(e){const{r:t,s:r,yParity:n}=e;return[n?"0x01":"0x",t===0n?"0x":Rp(Z(t)),r===0n?"0x":Rp(Z(r))]}function Df(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new V9({value:e})}function _f(e){if(e===0)return 27;if(e===1)return 28;throw new Ul({value:e})}class $9 extends oe{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${bt(hl(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class Mf extends oe{constructor({signature:t}){super(`Signature \`${ki(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class G9 extends oe{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class j9 extends oe{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class Ul extends oe{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class V9 extends oe{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function W9(e,t={}){return typeof e.chainId=="string"?Rg(e):{...e,...t.signature}}function Rg(e){const{address:t,chainId:r,nonce:n}=e,s=Lg(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...s}}function q9(e){return e.map(Rg)}function K9(e){const{address:t,chainId:r,nonce:n,...s}=e;return{address:t,chainId:Z(r),nonce:Z(n),...zg(s)}}function Y9(e){return e.map(K9)}function Hg(e){return Pl(Z9(e))}function Z9(e){const{payload:t,signature:r}=e,{r:n,s,yParity:a}=r,i=new Di.Signature(BigInt(n),BigInt(s)).addRecoveryBit(a).recoverPublicKey(hl(t).substring(2));return TC(i)}function X9(e){const{address:t,hash:r,payload:n,publicKey:s,signature:a}=e;return t?ff(t,Hg({payload:n,signature:a})):Di.verify(a,zp(n),SC(s),...r?[{prehash:!0,lowS:!0}]:[])}const Q9="0x8010801080108010801080108010801080108010801080108010801080108010",J9=dg("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function $g(e){if(typeof e=="string"){if(Be(e,-32)!==Q9)throw new rT(e)}else Fl(e.authorization)}function eT(e){$g(e);const t=Ti(Be(e,-64,-32)),r=Be(e,-t-64,-64),n=Be(e,0,-t-64),[s,a,o]=r9(J9,r);return{authorization:W9({address:s.delegation,chainId:Number(s.chainId),nonce:s.nonce,yParity:s.yParity,r:s.r,s:s.s}),signature:n,...o&&o!=="0x"?{data:o,to:a}:{}}}function tT(e){try{return $g(e),!0}catch{return!1}}let rT=class extends oe{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};class nT extends ${constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function sT(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new nT({value:e});let[r,n="0"]=e.split(".");const s=r.startsWith("-");if(s&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),t===0)Math.round(+`.${n}`)===1&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>t){const[a,o,i]=[n.slice(0,t-1),n.slice(t-1,t),n.slice(t)],c=Math.round(+`${o}.${i}`);c>9?n=`${BigInt(a)+BigInt(1)}0`.padStart(a.length+1,"0"):n=`${a}${c}`,n.length>t&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,t)}else n=n.padEnd(t,"0");return BigInt(`${s?"-":""}${r}${n}`)}function aT(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function oT(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?ir(e.nonce):void 0,storageProof:e.storageProof?aT(e.storageProof):void 0}}async function iT(e,{address:t,blockNumber:r,blockTag:n,storageKeys:s}){const a=n??"latest",o=r!==void 0?q(r):void 0,i=await e.request({method:"eth_getProof",params:[t,s,o||a]});return oT(i)}async function cT(e,{address:t,blockNumber:r,blockTag:n="latest",slot:s}){const a=r!==void 0?q(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,s,a||n]})}async function Nf(e,{blockHash:t,blockNumber:r,blockTag:n,hash:s,index:a,sender:o,nonce:i}){var f,m,b;const c=n||"latest",l=r!==void 0?q(r):void 0;let u=null;if(s?u=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?u=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,q(a)]},{dedupe:!0}):typeof a=="number"?u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,q(a)]},{dedupe:!!l}):o&&typeof i=="number"&&(u=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[o,q(i)]},{dedupe:!0})),!u)throw new gb({blockHash:t,blockNumber:r,blockTag:c,hash:s,index:a});return(((b=(m=(f=e.chain)==null?void 0:f.formatters)==null?void 0:m.transaction)==null?void 0:b.format)||Js)(u,"getTransaction")}async function lT(e,{hash:t,transactionReceipt:r}){const[n,s]=await Promise.all([se(e,Si,"getBlockNumber")({}),t?se(e,Nf,"getTransaction")({hash:t}):void 0]),a=(r==null?void 0:r.blockNumber)||(s==null?void 0:s.blockNumber);return a?n-a+1n:0n}async function Dl(e,{hash:t}){var s,a,o;const r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new xb({hash:t});return(((o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionReceipt)==null?void 0:o.format)||El)(r,"getTransactionReceipt")}async function uT(e,t){var w;const{account:r,authorizationList:n,allowFailure:s=!0,blockNumber:a,blockOverrides:o,blockTag:i,stateOverride:c}=t,l=t.contracts,{batchSize:u=t.batchSize??1024,deployless:d=t.deployless??!1}=typeof((w=e.batch)==null?void 0:w.multicall)=="object"?e.batch.multicall:{},f=(()=>{if(t.multicallAddress)return t.multicallAddress;if(d)return null;if(e.chain)return Ja({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),m=[[]];let b=0,g=0;for(let S=0;S<l.length;S++){const{abi:T,address:O,args:L,functionName:I}=l[S];try{const h=dr({abi:T,args:L,functionName:I});g+=(h.length-2)/2,u>0&&g>u&&m[b].length>0&&(b++,g=(h.length-2)/2,m[b]=[]),m[b]=[...m[b],{allowFailure:!0,callData:h,target:O}]}catch(h){const y=Zs(h,{abi:T,address:O,args:L,docsPath:"/docs/contract/multicall",functionName:I,sender:r});if(!s)throw y;m[b]=[...m[b],{allowFailure:!0,callData:"0x",target:O}]}}const E=await Promise.allSettled(m.map(S=>se(e,Hr,"readContract")({...f===null?{code:$p}:{address:f},abi:bl,account:r,args:[S],authorizationList:n,blockNumber:a,blockOverrides:o,blockTag:i,functionName:"aggregate3",stateOverride:c}))),v=[];for(let S=0;S<E.length;S++){const T=E[S];if(T.status==="rejected"){if(!s)throw T.reason;for(let L=0;L<m[S].length;L++)v.push({status:"failure",error:T.reason,result:void 0});continue}const O=T.value;for(let L=0;L<O.length;L++){const{returnData:I,success:h}=O[L],{callData:y}=m[S][L],{abi:x,address:A,functionName:B,args:F}=l[v.length];try{if(y==="0x")throw new Go;if(!h)throw new tl({data:I});const _=ea({abi:x,args:F,data:I,functionName:B});v.push(s?{result:_,status:"success"}:_)}catch(_){const k=Zs(_,{abi:x,address:A,args:F,docsPath:"/docs/contract/multicall",functionName:B});if(!s)throw k;v.push({error:k,result:void 0,status:"failure"})}}}if(v.length!==l.length)throw new $("multicall results mismatch");return v}async function Lf(e,t){const{blockNumber:r,blockTag:n=e.experimental_blockTag??"latest",blocks:s,returnFullTransactions:a,traceTransfers:o,validation:i}=t;try{const c=[];for(const f of s){const m=f.blockOverrides?by(f.blockOverrides):void 0,b=f.calls.map(E=>{const v=E,w=v.account?Ze(v.account):void 0,S=v.abi?dr(v):v.data,T={...v,account:w,data:v.dataSuffix?lr([S||"0x",v.dataSuffix]):S,from:v.from??(w==null?void 0:w.address)};return sn(T),Lr(T)}),g=f.stateOverrides?mp(f.stateOverrides):void 0;c.push({blockOverrides:m,calls:b,stateOverrides:g})}const u=(typeof r=="bigint"?q(r):void 0)||n;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:a,traceTransfers:o,validation:i},u]})).map((f,m)=>({...bp(f),calls:f.calls.map((b,g)=>{var x,A;const{abi:E,args:v,functionName:w,to:S}=s[m].calls[g],T=((x=b.error)==null?void 0:x.data)??b.returnData,O=BigInt(b.gasUsed),L=(A=b.logs)==null?void 0:A.map(B=>an(B)),I=b.status==="0x1"?"success":"failure",h=E&&I==="success"&&T!=="0x"?ea({abi:E,data:T,functionName:w}):null,y=(()=>{var F;if(I==="success")return;let B;if(((F=b.error)==null?void 0:F.data)==="0x"?B=new Go:b.error&&(B=new tl(b.error)),!!B)return Zs(B,{abi:E??[],address:S??"0x",args:v,functionName:w??"<unknown>"})})();return{data:T,gasUsed:O,logs:L,status:I,...I==="success"?{result:h}:{error:y}}})}))}catch(c){const l=c,u=nl(l,{});throw u instanceof yi?l:u}}function zf(e){let t=!0,r="",n=0,s="",a=!1;for(let o=0;o<e.length;o++){const i=e[o];if(["(",")",","].includes(i)&&(t=!0),i==="("&&n++,i===")"&&n--,!!t){if(n===0){if(i===" "&&["event","function","error",""].includes(s))s="";else if(s+=i,i===")"){a=!0;break}continue}if(i===" "){e[o-1]!==","&&r!==","&&r!==",("&&(r="",t=!1);continue}s+=i,r+=i}}if(!a)throw new oe("Unable to normalize signature.");return s}function Rf(e,t){const r=typeof e,n=t.type;switch(n){case"address":return Il(e,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>Rf(Object.values(e)[a],s)):/^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(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(s=>Rf(s,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Gg(e,t,r){for(const n in e){const s=e[n],a=t[n];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return Gg(s.components,a.components,r[n]);const o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?Il(r[n],{strict:!1}):o.includes("address")&&o.includes("bytes")?Il(r[n],{strict:!1}):!1)return o}}function jg(e,t={}){const{prepare:r=!0}=t,n=Array.isArray(e)||typeof e=="string"?T1(e):e;return{...n,...r?{hash:so(n)}:{}}}function _l(e,t,r){const{args:n=[],prepare:s=!0}=r??{},a=Rr(t,{strict:!1}),o=e.filter(l=>a?l.type==="function"||l.type==="error"?Vg(l)===Be(t,0,4):l.type==="event"?so(l)===t:!1:"name"in l&&l.name===t);if(o.length===0)throw new Ml({name:t});if(o.length===1)return{...o[0],...s?{hash:so(o[0])}:{}};let i;for(const l of o){if(!("inputs"in l))continue;if(!n||n.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...s?{hash:so(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((d,f)=>{const m="inputs"in l&&l.inputs[f];return m?Rf(d,m):!1})){if(i&&"inputs"in i&&i.inputs){const d=Gg(l.inputs,i.inputs,n);if(d)throw new pT({abiItem:l,type:d[0]},{abiItem:i,type:d[1]})}i=l}}const c=(()=>{if(i)return i;const[l,...u]=o;return{...l,overloads:u}})();if(!c)throw new Ml({name:t});return{...c,...s?{hash:so(c)}:{}}}function Vg(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return _l(r,n)}return e[0]})();return Be(so(t),0,4)}function dT(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,s]=e;return _l(n,s)}return e[0]})(),r=typeof t=="string"?t:jc(t);return zf(r)}function so(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,n]=e;return _l(r,n)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Oi(Ci(dT(t)))}class pT extends oe{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${zf(jc(t.abiItem))}\`, and`,`\`${r.type}\` in \`${zf(jc(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class Ml extends oe{constructor({name:t,data:r,type:n="item"}){const s=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${n}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function fT(...e){var a;const[t,r]=(()=>{if(Array.isArray(e[0])){const[o,i]=e;return[hT(o),i]}return e})(),{bytecode:n,args:s}=r;return ft(n,(a=t.inputs)!=null&&a.length&&(s!=null&&s.length)?xf(t.inputs,s):"0x")}function mT(e){return jg(e)}function hT(e){const t=e.find(r=>r.type==="constructor");if(!t)throw new Ml({name:"constructor"});return t}function bT(...e){const[t,r=[]]=(()=>{if(Array.isArray(e[0])){const[l,u,d]=e;return[Wg(l,u,{args:d}),d]}const[i,c]=e;return[i,c]})(),{overloads:n}=t,s=n?Wg([t,...n],t.name,{args:r}):t,a=yT(s),o=r.length>0?xf(s.inputs,r):void 0;return o?ft(a,o):a}function ao(e,t={}){return jg(e,t)}function Wg(e,t,r){const n=_l(e,t,r);if(n.type!=="function")throw new Ml({name:t,type:"function"});return n}function yT(e){return Vg(e)}const gT="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",on="0x0000000000000000000000000000000000000000",xT="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function wT(e,t){const{blockNumber:r,blockTag:n,calls:s,stateOverrides:a,traceAssetChanges:o,traceTransfers:i,validation:c}=t,l=t.account?Ze(t.account):void 0;if(o&&!l)throw new $("`account` is required when `traceAssetChanges` is true");const u=l?fT(mT("constructor(bytes, bytes)"),{bytecode:Cy,args:[xT,bT(ao("function getBalance(address)"),[l.address])]}):void 0,d=o?await Promise.all(t.calls.map(async U=>{if(!U.data&&!U.abi)return;const{accessList:z}=await jy(e,{account:l.address,...U,data:U.abi?dr(U):U.data});return z.map(({address:H,storageKeys:j})=>j.length>0?H:null)})).then(U=>U.flat().filter(Boolean)):[],f=await Lf(e,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:u}],stateOverrides:a},{calls:d.map((U,z)=>({abi:[ao("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:U,from:on,nonce:z})),stateOverrides:[{address:on,nonce:0}]}]:[],{calls:[...s,{}].map(U=>({...U,from:l==null?void 0:l.address})),stateOverrides:a},...o?[{calls:[{data:u}]},{calls:d.map((U,z)=>({abi:[ao("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:U,from:on,nonce:z})),stateOverrides:[{address:on,nonce:0}]},{calls:d.map((U,z)=>({to:U,abi:[ao("function decimals() returns (uint256)")],functionName:"decimals",from:on,nonce:z})),stateOverrides:[{address:on,nonce:0}]},{calls:d.map((U,z)=>({to:U,abi:[ao("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:on,nonce:z})),stateOverrides:[{address:on,nonce:0}]},{calls:d.map((U,z)=>({to:U,abi:[ao("function symbol() returns (string)")],functionName:"symbol",from:on,nonce:z})),stateOverrides:[{address:on,nonce:0}]}]:[]],traceTransfers:i,validation:c}),m=o?f[2]:f[0],[b,g,,E,v,w,S,T]=o?f:[],{calls:O,...L}=m,I=O.slice(0,-1)??[],h=(b==null?void 0:b.calls)??[],y=(g==null?void 0:g.calls)??[],x=[...h,...y].map(U=>U.status==="success"?ze(U.data):null),A=(E==null?void 0:E.calls)??[],B=(v==null?void 0:v.calls)??[],F=[...A,...B].map(U=>U.status==="success"?ze(U.data):null),_=((w==null?void 0:w.calls)??[]).map(U=>U.status==="success"?U.result:null),k=((T==null?void 0:T.calls)??[]).map(U=>U.status==="success"?U.result:null),P=((S==null?void 0:S.calls)??[]).map(U=>U.status==="success"?U.result:null),D=[];for(const[U,z]of F.entries()){const H=x[U];if(typeof z!="bigint"||typeof H!="bigint")continue;const j=_[U-1],Q=k[U-1],pe=P[U-1],be=U===0?{address:gT,decimals:18,symbol:"ETH"}:{address:d[U-1],decimals:pe||j?Number(j??1):void 0,symbol:Q??void 0};D.some(ie=>ie.token.address===be.address)||D.push({token:be,value:{pre:H,post:z,diff:z-H}})}return{assetChanges:D,block:L,results:I}}const qg="0x6492649264926492649264926492649264926492649264926492649264926492";function vT(e){if(Be(e,-32)!==qg)throw new CT(e)}function ET(e){const{data:t,signature:r,to:n}=e;return ft(xf(dg("address, bytes, bytes"),[n,t,r]),qg)}function kT(e){try{return vT(e),!0}catch{return!1}}class CT extends oe{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function TT({r:e,s:t,to:r="hex",v:n,yParity:s}){const a=(()=>{if(s===0||s===1)return s;if(n&&(n===27n||n===28n||n>=35n))return n%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new Di.Signature(ze(e),ze(t)).toCompactHex()}${a===0?"1b":"1c"}`;return r==="hex"?o:cr(o)}async function _i(e,t){var c,l,u,d;const{address:r,chain:n=e.chain,hash:s,erc6492VerifierAddress:a=t.universalSignatureVerifierAddress??((l=(c=n==null?void 0:n.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:l.address),multicallAddress:o=t.multicallAddress??((d=(u=n==null?void 0:n.contracts)==null?void 0:u.multicall3)==null?void 0:d.address)}=t;if(n!=null&&n.verifyHash)return await n.verifyHash(e,t);const i=(()=>{const f=t.signature;return Mr(f)?f:typeof f=="object"&&"r"in f&&"s"in f?TT(f):wt(f)})();try{return tT(i)?await AT(e,{...t,multicallAddress:o,signature:i}):await ST(e,{...t,verifierAddress:a,signature:i})}catch(f){try{if(Ka(Wd(r),await Tb({hash:s,signature:i})))return!0}catch{}if(f instanceof oa)return!1;throw f}}async function AT(e,t){var E;const{address:r,blockNumber:n,blockTag:s,hash:a,multicallAddress:o}=t,{authorization:i,data:c,signature:l,to:u}=eT(t.signature);if(await Tl(e,{address:r,blockNumber:n,blockTag:s})===ur(["0xef0100",i.address]))return await PT(e,{address:r,blockNumber:n,blockTag:s,hash:a,signature:l});const f={address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:q(i.r,{size:32}),s:q(i.s,{size:32}),yParity:i.yParity};if(!await X7({address:r,authorization:f}))throw new oa;const b=await se(e,Hr,"readContract")({...o?{address:o}:{code:$p},authorizationList:[f],abi:bl,blockNumber:n,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:u??r,callData:c}]:[],{allowFailure:!0,target:r,callData:dr({abi:vy,functionName:"isValidSignature",args:[a,l]})}]]}),g=(E=b[b.length-1])==null?void 0:E.returnData;if(g!=null&&g.startsWith("0x1626ba7e"))return!0;throw new oa}async function ST(e,t){const{address:r,factory:n,factoryData:s,hash:a,signature:o,verifierAddress:i,...c}=t,l=await(async()=>!n&&!s||kT(o)?o:ET({data:s,signature:o,to:n}))(),u=i?{to:i,data:dr({abi:Ey,functionName:"isValidSig",args:[r,a,l]}),...c}:{data:yl({abi:Ey,args:[r,a,l],bytecode:qk}),...c},{data:d}=await se(e,Ai,"call")(u).catch(f=>{throw f instanceof vb?new oa:f});if(av(d??"0x0"))return!0;throw new oa}async function PT(e,t){const{address:r,blockNumber:n,blockTag:s,hash:a,signature:o}=t;if((await se(e,Hr,"readContract")({address:r,abi:vy,args:[a,o],blockNumber:n,blockTag:s,functionName:"isValidSignature"}).catch(c=>{throw c instanceof Eb?new oa:c})).startsWith("0x1626ba7e"))return!0;throw new oa}let oa=class extends Error{};async function IT(e,{address:t,message:r,factory:n,factoryData:s,signature:a,...o}){const i=Zy(r);return se(e,_i,"verifyHash")({address:t,factory:n,factoryData:s,hash:i,signature:a,...o})}async function BT(e,t){const{address:r,factory:n,factoryData:s,signature:a,message:o,primaryType:i,types:c,domain:l,...u}=t,d=gC({message:o,primaryType:i,types:c,domain:l});return se(e,_i,"verifyHash")({address:r,factory:n,factoryData:s,hash:d,signature:a,...u})}function Kg(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:n,onError:s,poll:a,pollingInterval:o=e.pollingInterval}){const i=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return i?(()=>{const d=ht(["watchBlockNumber",e.uid,t,r,o]);return Fn(d,{onBlockNumber:n,onError:s},f=>eo(async()=>{var m;try{const b=await se(e,Si,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(b===c)return;if(b-c>1&&r)for(let g=c+1n;g<b;g++)f.onBlockNumber(g,c),c=g}(c===void 0||b>c)&&(f.onBlockNumber(b,c),c=b)}catch(b){(m=f.onError)==null||m.call(f,b)}},{emitOnBegin:t,interval:o}))})():(()=>{const d=ht(["watchBlockNumber",e.uid,t,r]);return Fn(d,{onBlockNumber:n,onError:s},f=>{let m=!0,b=()=>m=!1;return(async()=>{try{const g=(()=>{if(e.transport.type==="fallback"){const v=e.transport.transports.find(w=>w.config.type==="webSocket"||w.config.type==="ipc");return v?v.value:e.transport}return e.transport})(),{unsubscribe:E}=await g.subscribe({params:["newHeads"],onData(v){var S;if(!m)return;const w=ze((S=v.result)==null?void 0:S.number);f.onBlockNumber(w,c),c=w},onError(v){var w;(w=f.onError)==null||w.call(f,v)}});b=E,m||b()}catch(g){s==null||s(g)}})(),()=>b()})})()}async function Yg(e,t){const{checkReplacement:r=!0,confirmations:n=1,hash:s,onReplaced:a,retryCount:o=6,retryDelay:i=({count:O})=>~~(1<<O)*200,timeout:c=18e4}=t,l=ht(["waitForTransactionReceipt",e.uid,s]),u=(()=>{var O;return t.pollingInterval?t.pollingInterval:(O=e.chain)!=null&&O.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let d,f,m,b=!1,g,E;const{promise:v,resolve:w,reject:S}=Wp(),T=c?setTimeout(()=>{E==null||E(),g==null||g(),S(new TE({hash:s}))},c):void 0;return g=Fn(l,{onReplaced:a,resolve:w,reject:S},async O=>{if(m=await se(e,Dl,"getTransactionReceipt")({hash:s}).catch(()=>{}),m&&n<=1){clearTimeout(T),O.resolve(m),g==null||g();return}E=se(e,Kg,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(L){const I=y=>{clearTimeout(T),E==null||E(),y(),g==null||g()};let h=L;if(!b)try{if(m){if(n>1&&(!m.blockNumber||h-m.blockNumber+1n<n))return;I(()=>O.resolve(m));return}if(r&&!d&&(b=!0,await vl(async()=>{d=await se(e,Nf,"getTransaction")({hash:s}),d.blockNumber&&(h=d.blockNumber)},{delay:i,retryCount:o}),b=!1),m=await se(e,Dl,"getTransactionReceipt")({hash:s}),n>1&&(!m.blockNumber||h-m.blockNumber+1n<n))return;I(()=>O.resolve(m))}catch(y){if(y instanceof gb||y instanceof xb){if(!d){b=!1;return}try{f=d,b=!0;const x=await vl(()=>se(e,zr,"getBlock")({blockNumber:h,includeTransactions:!0}),{delay:i,retryCount:o,shouldRetry:({error:F})=>F instanceof Bb});b=!1;const A=x.transactions.find(({from:F,nonce:_})=>F===f.from&&_===f.nonce);if(!A||(m=await se(e,Dl,"getTransactionReceipt")({hash:A.hash}),n>1&&(!m.blockNumber||h-m.blockNumber+1n<n)))return;let B="replaced";A.to===f.to&&A.value===f.value&&A.input===f.input?B="repriced":A.from===A.to&&A.value===0n&&(B="cancelled"),I(()=>{var F;(F=O.onReplaced)==null||F.call(O,{reason:B,replacedTransaction:f,transaction:A,transactionReceipt:m}),O.resolve(m)})}catch(x){I(()=>O.reject(x))}}else I(()=>O.reject(y))}}})}),v}function FT(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:s,onError:a,includeTransactions:o,poll:i,pollingInterval:c=e.pollingInterval}){const l=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),u=o??!1;let d;return l?(()=>{const b=ht(["watchBlocks",e.uid,t,r,n,u,c]);return Fn(b,{onBlock:s,onError:a},g=>eo(async()=>{var E;try{const v=await se(e,zr,"getBlock")({blockTag:t,includeTransactions:u});if(v.number!==null&&(d==null?void 0:d.number)!=null){if(v.number===d.number)return;if(v.number-d.number>1&&r)for(let w=(d==null?void 0:d.number)+1n;w<v.number;w++){const S=await se(e,zr,"getBlock")({blockNumber:w,includeTransactions:u});g.onBlock(S,d),d=S}}((d==null?void 0:d.number)==null||t==="pending"&&(v==null?void 0:v.number)==null||v.number!==null&&v.number>d.number)&&(g.onBlock(v,d),d=v)}catch(v){(E=g.onError)==null||E.call(g,v)}},{emitOnBegin:n,interval:c}))})():(()=>{let b=!0,g=!0,E=()=>b=!1;return(async()=>{try{n&&se(e,zr,"getBlock")({blockTag:t,includeTransactions:u}).then(S=>{b&&g&&(s(S,void 0),g=!1)}).catch(a);const v=(()=>{if(e.transport.type==="fallback"){const S=e.transport.transports.find(T=>T.config.type==="webSocket"||T.config.type==="ipc");return S?S.value:e.transport}return e.transport})(),{unsubscribe:w}=await v.subscribe({params:["newHeads"],async onData(S){var O;if(!b)return;const T=await se(e,zr,"getBlock")({blockNumber:(O=S.result)==null?void 0:O.number,includeTransactions:u}).catch(()=>{});b&&(s(T,d),g=!1,d=T)},onError(S){a==null||a(S)}});E=w,b||E()}catch(v){a==null||a(v)}})(),()=>E()})()}function OT(e,{address:t,args:r,batch:n=!0,event:s,events:a,fromBlock:o,onError:i,onLogs:c,poll:l,pollingInterval:u=e.pollingInterval,strict:d}){const f=typeof l<"u"?l:typeof o=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),m=d??!1;return f?(()=>{const E=ht(["watchEvent",t,r,n,e.uid,s,u,o]);return Fn(E,{onLogs:c,onError:i},v=>{let w;o!==void 0&&(w=o-1n);let S,T=!1;const O=eo(async()=>{var L;if(!T){try{S=await se(e,Vy,"createEventFilter")({address:t,args:r,event:s,events:a,strict:m,fromBlock:o})}catch{}T=!0;return}try{let I;if(S)I=await se(e,gl,"getFilterChanges")({filter:S});else{const h=await se(e,Si,"getBlockNumber")({});w&&w!==h?I=await se(e,Fp,"getLogs")({address:t,args:r,event:s,events:a,fromBlock:w+1n,toBlock:h}):I=[],w=h}if(I.length===0)return;if(n)v.onLogs(I);else for(const h of I)v.onLogs([h])}catch(I){S&&I instanceof ss&&(T=!1),(L=v.onError)==null||L.call(v,I)}},{emitOnBegin:!0,interval:u});return async()=>{S&&await se(e,xl,"uninstallFilter")({filter:S}),O()}})})():(()=>{let E=!0,v=()=>E=!1;return(async()=>{try{const w=(()=>{if(e.transport.type==="fallback"){const L=e.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return L?L.value:e.transport}return e.transport})(),S=a??(s?[s]:void 0);let T=[];S&&(T=[S.flatMap(I=>Ko({abi:[I],eventName:I.name,args:r}))],s&&(T=T[0]));const{unsubscribe:O}=await w.subscribe({params:["logs",{address:t,topics:T}],onData(L){var h;if(!E)return;const I=L.result;try{const{eventName:y,args:x}=il({abi:S??[],data:I.data,topics:I.topics,strict:m}),A=an(I,{args:x,eventName:y});c([A])}catch(y){let x,A;if(y instanceof qc||y instanceof Hd){if(d)return;x=y.abiItem.name,A=(h=y.abiItem.inputs)==null?void 0:h.some(F=>!("name"in F&&F.name))}const B=an(I,{args:A?[]:{},eventName:x});c([B])}},onError(L){i==null||i(L)}});v=O,E||v()}catch(w){i==null||i(w)}})(),()=>v()})()}function UT(e,{batch:t=!0,onError:r,onTransactions:n,poll:s,pollingInterval:a=e.pollingInterval}){return(typeof s<"u"?s:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const l=ht(["watchPendingTransactions",e.uid,t,a]);return Fn(l,{onTransactions:n,onError:r},u=>{let d;const f=eo(async()=>{var m;try{if(!d)try{d=await se(e,Wy,"createPendingTransactionFilter")({});return}catch(g){throw f(),g}const b=await se(e,gl,"getFilterChanges")({filter:d});if(b.length===0)return;if(t)u.onTransactions(b);else for(const g of b)u.onTransactions([g])}catch(b){(m=u.onError)==null||m.call(u,b)}},{emitOnBegin:!0,interval:a});return async()=>{d&&await se(e,xl,"uninstallFilter")({filter:d}),f()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!l)return;const m=f.result;n([m])},onError(f){r==null||r(f)}});u=d,l||u()}catch(d){r==null||r(d)}})(),()=>u()})()}function DT(e){var d,f,m;const{scheme:t,statement:r,...n}=((d=e.match(_T))==null?void 0:d.groups)??{},{chainId:s,expirationTime:a,issuedAt:o,notBefore:i,requestId:c,...l}=((f=e.match(MT))==null?void 0:f.groups)??{},u=(m=e.split("Resources:")[1])==null?void 0:m.split(`
107
- - `).slice(1);return{...n,...l,...s?{chainId:Number(s)}:{},...a?{expirationTime:new Date(a)}:{},...o?{issuedAt:new Date(o)}:{},...i?{notBefore:new Date(i)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}const _T=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,MT=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function NT(e){const{address:t,domain:r,message:n,nonce:s,scheme:a,time:o=new Date}=e;if(r&&n.domain!==r||s&&n.nonce!==s||a&&n.scheme!==a||n.expirationTime&&o>=n.expirationTime||n.notBefore&&o<n.notBefore)return!1;try{if(!n.address||!nt(n.address,{strict:!1})||t&&!Ka(n.address,t))return!1}catch{return!1}return!0}async function LT(e,t){const{address:r,domain:n,message:s,nonce:a,scheme:o,signature:i,time:c=new Date,...l}=t,u=DT(s);if(!u.address||!NT({address:r,domain:n,message:u,nonce:a,scheme:o,time:c}))return!1;const f=Zy(s);return _i(e,{address:u.address,hash:f,signature:i,...l})}async function Hf(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:n}){var i,c,l;const s=await e.request({method:"eth_sendRawTransactionSync",params:n?[t,q(n)]:[t]},{retryCount:0}),o=(((l=(c=(i=e.chain)==null?void 0:i.formatters)==null?void 0:c.transactionReceipt)==null?void 0:l.format)||El)(s);if(o.status==="reverted"&&r)throw new wb({receipt:o});return o}function zT(e){return{call:t=>Ai(e,t),createAccessList:t=>jy(e,t),createBlockFilter:()=>F7(e),createContractEventFilter:t=>lb(e,t),createEventFilter:t=>Vy(e,t),createPendingTransactionFilter:()=>Wy(e),estimateContractGas:t=>ck(e,t),estimateGas:t=>Ip(e,t),getBalance:t=>O7(e,t),getBlobBaseFee:()=>U7(e),getBlock:t=>zr(e,t),getBlockNumber:t=>Si(e,t),getBlockTransactionCount:t=>D7(e,t),getBytecode:t=>Tl(e,t),getChainId:()=>us(e),getCode:t=>Tl(e,t),getContractEvents:t=>Kb(e,t),getEip712Domain:t=>M7(e,t),getEnsAddress:t=>h7(e,t),getEnsAvatar:t=>P7(e,t),getEnsName:t=>I7(e,t),getEnsResolver:t=>B7(e,t),getEnsText:t=>Gy(e,t),getFeeHistory:t=>z7(e,t),estimateFeesPerGas:t=>WE(e,t),getFilterChanges:t=>gl(e,t),getFilterLogs:t=>R7(e,t),getGasPrice:()=>gp(e),getLogs:t=>Fp(e,t),getProof:t=>iT(e,t),estimateMaxPriorityFeePerGas:t=>VE(e,t),fillTransaction:t=>Ap(e,t),getStorageAt:t=>cT(e,t),getTransaction:t=>Nf(e,t),getTransactionConfirmations:t=>lT(e,t),getTransactionCount:t=>wp(e,t),getTransactionReceipt:t=>Dl(e,t),multicall:t=>uT(e,t),prepareTransactionRequest:t=>gi(e,t),readContract:t=>Hr(e,t),sendRawTransaction:t=>Xp(e,t),sendRawTransactionSync:t=>Hf(e,t),simulate:t=>Lf(e,t),simulateBlocks:t=>Lf(e,t),simulateCalls:t=>wT(e,t),simulateContract:t=>e7(e,t),verifyHash:t=>_i(e,t),verifyMessage:t=>IT(e,t),verifySiweMessage:t=>LT(e,t),verifyTypedData:t=>BT(e,t),uninstallFilter:t=>xl(e,t),waitForTransactionReceipt:t=>Yg(e,t),watchBlocks:t=>FT(e,t),watchBlockNumber:t=>Kg(e,t),watchContractEvent:t=>i7(e,t),watchEvent:t=>OT(e,t),watchPendingTransactions:t=>UT(e,t)}}function RT(e){const{key:t="public",name:r="Public Client"}=e;return My({...e,key:t,name:r,type:"publicClient"}).extend(zT)}async function HT(e,{chain:t}){const{id:r,name:n,nativeCurrency:s,rpcUrls:a,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:q(r),chainName:n,nativeCurrency:s,rpcUrls:a.default.http,blockExplorerUrls:o?Object.values(o).map(({url:i})=>i):void 0}]},{dedupe:!0,retryCount:0})}function $T(e,t){const{abi:r,args:n,bytecode:s,...a}=t,o=yl({abi:r,args:n,bytecode:s});return wl(e,{...a,...a.authorizationList?{to:null}:{},data:o})}async function GT(e){var r;return((r=e.account)==null?void 0:r.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Wo(n))}async function jT(e,t={}){const{account:r=e.account,chainId:n}=t,s=r?Ze(r):void 0,a=n?[s==null?void 0:s.address,[q(n)]]:[s==null?void 0:s.address],o=await e.request({method:"wallet_getCapabilities",params:a}),i={};for(const[c,l]of Object.entries(o)){i[Number(c)]={};for(let[u,d]of Object.entries(l))u==="addSubAccount"&&(u="unstable_addSubAccount"),i[Number(c)][u]=d}return typeof n=="number"?i[n]:i}async function VT(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function Zg(e,t){var c;const{account:r=e.account,chainId:n,nonce:s}=t;if(!r)throw new On({docsPath:"/docs/eip7702/prepareAuthorization"});const a=Ze(r),o=(()=>{if(t.executor)return t.executor==="self"?t.executor:Ze(t.executor)})(),i={address:t.contractAddress??t.address,chainId:n,nonce:s};return typeof i.chainId>"u"&&(i.chainId=((c=e.chain)==null?void 0:c.id)??await se(e,us,"getChainId")({})),typeof i.nonce>"u"&&(i.nonce=await se(e,wp,"getTransactionCount")({address:a.address,blockTag:"pending"}),(o==="self"||o!=null&&o.address&&Ka(o.address,a.address))&&(i.nonce+=1)),i}async function WT(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>Wd(r))}async function qT(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function KT(e,t){const{chain:r=e.chain}=t,n=t.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3),s=await Oy(e,t);return await Dy(e,{...t,id:s.id,timeout:n})}const $f=new Ra(128);async function Xg(e,t){var O,L,I,h;const{account:r=e.account,chain:n=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,pollingInterval:b,throwOnReceiptRevert:g,type:E,value:v,...w}=t,S=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof r>"u")throw new On({docsPath:"/docs/actions/wallet/sendTransactionSync"});const T=r?Ze(r):null;try{sn(t);const y=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await rl({authorization:a[0]}).catch(()=>{throw new $("`to` is required. Could not infer from `authorizationList`.")})})();if((T==null?void 0:T.type)==="json-rpc"||T===null){let x;n!==null&&(x=await se(e,us,"getChainId")({}),Zp({currentChainId:x,chain:n}));const A=(I=(L=(O=e.chain)==null?void 0:O.formatters)==null?void 0:L.transactionRequest)==null?void 0:I.format,F=(A||Lr)({...Xs(w,{format:A}),accessList:s,account:T,authorizationList:a,blobs:o,chainId:x,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,to:y,type:E,value:v},"sendTransaction"),_=$f.get(e.uid),k=_?"wallet_sendTransaction":"eth_sendTransaction",P=await(async()=>{try{return await e.request({method:k,params:[F]},{retryCount:0})}catch(U){if(_===!1)throw U;const z=U;if(z.name==="InvalidInputRpcError"||z.name==="InvalidParamsRpcError"||z.name==="MethodNotFoundRpcError"||z.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[F]},{retryCount:0}).then(H=>($f.set(e.uid,!0),H)).catch(H=>{const j=H;throw j.name==="MethodNotFoundRpcError"||j.name==="MethodNotSupportedRpcError"?($f.set(e.uid,!1),z):j});throw z}})(),D=await se(e,Yg,"waitForTransactionReceipt")({checkReplacement:!1,hash:P,pollingInterval:b,timeout:S});if(g&&D.status==="reverted")throw new wb({receipt:D});return D}if((T==null?void 0:T.type)==="local"){const x=await se(e,gi,"prepareTransactionRequest")({account:T,accessList:s,authorizationList:a,blobs:o,chain:n,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,nonceManager:T.nonceManager,parameters:[...Sp,"sidecars"],type:E,value:v,...w,to:y}),A=(h=n==null?void 0:n.serializers)==null?void 0:h.transaction,B=await T.signTransaction(x,{serializer:A});return await se(e,Hf,"sendRawTransactionSync")({serializedTransaction:B,throwOnReceiptRevert:g})}throw(T==null?void 0:T.type)==="smart"?new sa({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new sa({docsPath:"/docs/actions/wallet/sendTransactionSync",type:T==null?void 0:T.type})}catch(y){throw y instanceof sa?y:ol(y,{...t,account:T,chain:t.chain||void 0})}}async function YT(e,t){const{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}async function ZT(e,t){const{account:r=e.account}=t;if(!r)throw new On({docsPath:"/docs/eip7702/signAuthorization"});const n=Ze(r);if(!n.signAuthorization)throw new sa({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const s=await Zg(e,t);return n.signAuthorization(s)}async function XT(e,{account:t=e.account,message:r}){if(!t)throw new On({docsPath:"/docs/actions/wallet/signMessage"});const n=Ze(t);if(n.signMessage)return n.signMessage({message:r});const s=typeof r=="string"?_a(r):r.raw instanceof Uint8Array?Ue(r.raw):r.raw;return e.request({method:"personal_sign",params:[s,n.address]},{retryCount:0})}async function QT(e,t){var l,u,d,f;const{account:r=e.account,chain:n=e.chain,...s}=t;if(!r)throw new On({docsPath:"/docs/actions/wallet/signTransaction"});const a=Ze(r);sn({account:a,...t});const o=await se(e,us,"getChainId")({});n!==null&&Zp({currentChainId:o,chain:n});const i=(n==null?void 0:n.formatters)||((l=e.chain)==null?void 0:l.formatters),c=((u=i==null?void 0:i.transactionRequest)==null?void 0:u.format)||Lr;return a.signTransaction?a.signTransaction({...s,chainId:o},{serializer:(f=(d=e.chain)==null?void 0:d.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...s,account:a},"signTransaction"),chainId:q(o),from:a.address}]},{retryCount:0})}async function JT(e,t){const{account:r=e.account,domain:n,message:s,primaryType:a}=t;if(!r)throw new On({docsPath:"/docs/actions/wallet/signTypedData"});const o=Ze(r),i={EIP712Domain:Qy({domain:n}),...t.types};if(Xy({domain:n,message:s,primaryType:a,types:i}),o.signTypedData)return o.signTypedData({domain:n,message:s,primaryType:a,types:i});const c=bC({domain:n,message:s,primaryType:a,types:i});return e.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function e4(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:q(t)}]},{retryCount:0})}async function t4(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function r4(e,t){return Pi.internal(e,Xg,"sendTransactionSync",t)}function n4(e){return{addChain:t=>HT(e,t),deployContract:t=>$T(e,t),fillTransaction:t=>Ap(e,t),getAddresses:()=>GT(e),getCallsStatus:t=>Uy(e,t),getCapabilities:t=>jT(e,t),getChainId:()=>us(e),getPermissions:()=>VT(e),prepareAuthorization:t=>Zg(e,t),prepareTransactionRequest:t=>gi(e,t),requestAddresses:()=>WT(e),requestPermissions:t=>qT(e,t),sendCalls:t=>Oy(e,t),sendCallsSync:t=>KT(e,t),sendRawTransaction:t=>Xp(e,t),sendRawTransactionSync:t=>Hf(e,t),sendTransaction:t=>wl(e,t),sendTransactionSync:t=>Xg(e,t),showCallsStatus:t=>YT(e,t),signAuthorization:t=>ZT(e,t),signMessage:t=>XT(e,t),signTransaction:t=>QT(e,t),signTypedData:t=>JT(e,t),switchChain:t=>e4(e,t),waitForCallsStatus:t=>Dy(e,t),watchAsset:t=>t4(e,t),writeContract:t=>Pi(e,t),writeContractSync:t=>r4(e,t)}}function s4(e){const{key:t="wallet",name:r="Wallet Client",transport:n}=e;return My({...e,key:t,name:r,transport:n,type:"walletClient"}).extend(n4)}function Qg({key:e,methods:t,name:r,request:n,retryCount:s=3,retryDelay:a=150,timeout:o,type:i},c){const l=_y();return{config:{key:e,methods:t,name:r,request:n,retryCount:s,retryDelay:a,timeout:o,type:i},request:J7(n,{methods:t,retryCount:s,retryDelay:a,uid:l}),value:c}}function a4(e,t={}){const{key:r="custom",methods:n,name:s="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>Qg({key:r,methods:n,name:s,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})}class o4 extends ${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 i4(e,t={}){const{batch:r,fetchFn:n,fetchOptions:s,key:a="http",methods:o,name:i="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:u,raw:d}=t;return({chain:f,retryCount:m,timeout:b})=>{const{batchSize:g=1e3,wait:E=0}=typeof r=="object"?r:{},v=t.retryCount??m,w=b??t.timeout??1e4,S=f==null?void 0:f.rpcUrls.default.http[0];if(!S)throw new o4;const T=uC(S,{fetchFn:n,fetchOptions:s,onRequest:c,onResponse:l,timeout:w});return Qg({key:a,methods:o,name:i,async request({method:O,params:L}){const I={method:O,params:L},{schedule:h}=Ay({id:S,wait:E,shouldSplitBatch(B){return B.length>g},fn:B=>T.request({body:B}),sort:(B,F)=>B.id-F.id}),y=async B=>r?h(B):[await T.request({body:B})],[{error:x,result:A}]=await y(I);if(d)return{error:x,result:A};if(x)throw new sp({body:I,error:x,url:S});return A},retryCount:v,retryDelay:u,timeout:w,type:"http"},{fetchOptions:s,url:S})}}function c4(e){const{r:t,s:r}=Di.Signature.fromCompact(e.slice(2,130)),n=+`0x${e.slice(130)}`,[s,a]=(()=>{if(n===0||n===1)return[void 0,n];if(n===27)return[BigInt(n),0];if(n===28)return[BigInt(n),1];throw new Error("Invalid yParityOrV value")})();return typeof s<"u"?{r:q(t,{size:32}),s:q(r,{size:32}),v:s,yParity:a}:{r:q(t,{size:32}),s:q(r,{size:32}),yParity:a}}const l4=e=>e.replace(/,/g,""),Nl=(e,t)=>!t||!e||G(e).isNaN()?"":sT(e,t).toString(),ia=(e,t)=>{try{if(!t||!e||G(e).isNaN())return"";const r=G(e).toFixed();return tp(BigInt(r),t)}catch(r){return console.error(r),""}},u4=async e=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy failed",t),!1}},Jg=e=>{if(!e)return"";const t=Math.floor(e/1e3),r=Math.floor(t/(1440*60)),n=Math.floor(t%(1440*60)/3600),s=Math.floor(t%3600/60),a=t%60,o=[];return r&&o.push(`${r} days `),n&&o.push(`${n} hours `),s&&o.push(`${s} minutes`),a&&o.push(`${a} seconds`),o.join(" ")},Ll=(e,t)=>e?`${e.substring(0,(t==null?void 0:t.start)||6)}...${e.substring(e.length-((t==null?void 0:t.end)||5))}`:"",d4=e=>{const t="An error occurred.";if(!e||!e.message)return t;try{return e.message.toLowerCase().indexOf("rejected")?"Transaction Rejected":t}catch{return t}};function e6(e,t=6,r=8){try{if(!e)return"";const n=e.startsWith("-")?"-":"",s=n?e.slice(1):e,[a,o=""]=s.split(".");if(!o||Number(o)===0)return n+a;if(a!=="0"){const m=o.slice(0,t).replace(/0+$/,""),b=m?"."+m:"";return n+a+b}const i=o.search(/[^0]/);if(i===-1||i+1>r)return n+"0";const c=o.slice(0,i),l=Math.max(0,r-i),d=o.slice(i).slice(0,Math.min(t,l)).replace(/0+$/,"");return d?n+"0."+c+d:n+"0"}catch{return e||""}}const Gf=e=>{var t,r,n,s;if(e!=null&&e.message)return((r=(t=e.message)==null?void 0:t.toLowerCase())==null?void 0:r.includes("rejected"))||((s=(n=e.message)==null?void 0:n.toLowerCase())==null?void 0:s.includes("denied"))},p4=e=>{switch(e){case Ft.base.id:return 1e-4;default:return .01}},t6=(e,t)=>{const r=Ns(t);return r&&Ms(e.address)?r.wToken:e};function r6(e){return e?e/864e5:0}function jf(e){return e?e/6e4:0}const f4=(e,t)=>e?Re.TWAP_MARKET:t===1?Re.LIMIT:Re.TWAP_LIMIT,Vf=(e,t,r)=>{const n=Ns(r);return Ms((e==null?void 0:e.address)||"")&&_s((t==null?void 0:t.address)||"",(n==null?void 0:n.wToken.address)||"")},Wf=(e,t,r)=>{const n=Ns(r);return _s((e==null?void 0:e.address)||"",(n==null?void 0:n.wToken.address)||"")&&Ms((t==null?void 0:t.address)||"")},oo=(e,t)=>{if(!t)return"";const r=Ns(t);return`${r==null?void 0:r.explorer}/tx/${e}`},m4=p({id:16600,name:"0G Newton Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-newton.0g.ai"}},testnet:!0}),h4=p({id:16601,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),b4=p({id:16661,name:"0G Mainnet",nativeCurrency:{name:"0G",symbol:"0G",decimals:18},rpcUrls:{default:{http:["https://evmrpc.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan.0g.ai"}},testnet:!1}),y4=p({id:16602,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),g4=p({id:995,name:"5ireChain",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Mainnet Explorer",url:"https://5irescan.io/"}},testnet:!1}),x4=p({id:179,name:"ABEY Mainnet",nativeCurrency:{name:"ABEY",symbol:"ABEY",decimals:18},rpcUrls:{default:{http:["https://rpc.abeychain.com"]}},blockExplorers:{default:{name:"Abey Scan",url:"https://abeyscan.com"}},testnet:!1}),qf=50000n,n6=$E*32n,s6={block:yp({format(e){var r;const t=(r=e.transactions)==null?void 0:r.map(n=>{var a;if(typeof n=="string")return n;const s=(a=s6.transaction)==null?void 0:a.format(n);return s.typeHex==="0x71"?s.type="eip712":s.typeHex==="0xff"&&(s.type="priority"),s});return{l1BatchNumber:e.l1BatchNumber?ze(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?ze(e.l1BatchTimestamp):null,transactions:t}}}),transaction:al({format(e){const t={};return e.type==="0x71"?t.type="eip712":e.type==="0xff"&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?ze(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?ze(e.l1BatchTxIndex):null}}}),transactionReceipt:Jp({format(e){return{l1BatchNumber:e.l1BatchNumber?ze(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?ze(e.l1BatchTxIndex):null,logs:e.logs.map(t=>({...an(t),l1BatchNumber:t.l1BatchNumber?ze(t.l1BatchNumber):null,transactionLogIndex:ir(t.transactionLogIndex),logType:t.logType})),l2ToL1Logs:e.l2ToL1Logs.map(t=>({blockNumber:ze(t.blockHash),blockHash:t.blockHash,l1BatchNumber:t.l1BatchNumber?ze(t.l1BatchNumber):null,transactionIndex:ze(t.transactionIndex),shardId:ze(t.shardId),isService:t.isService,sender:t.sender,key:t.key,value:t.value,transactionHash:t.transactionHash,logIndex:ze(t.logIndex)}))}}}),transactionRequest:fp({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(e){return e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:Ue(e.gasPerPubdata)}:{gasPerPubdata:Ue(qf)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(cr(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(t=>Array.from(cr(t)))}:{},...e.customSignature?{customSignature:Array.from(cr(e.customSignature))}:{}},type:"0x71"}:{}}})};class w4 extends ${constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(`
108
- `),{name:"InvalidEip712TransactionError"})}}function a6(e){return!!(e.type==="eip712"||"customSignature"in e&&e.customSignature||"paymaster"in e&&e.paymaster||"paymasterInput"in e&&e.paymasterInput||"gasPerPubdata"in e&&typeof e.gasPerPubdata=="bigint"||"factoryDeps"in e&&e.factoryDeps)}function o6(e){const{chainId:t,to:r,from:n,paymaster:s,paymasterInput:a}=e;if(!a6(e))throw new w4;if(!t||t<=0)throw new Qa({chainId:t});if(r&&!nt(r))throw new Ct({address:r});if(n&&!nt(n))throw new Ct({address:n});if(s&&!nt(s))throw new Ct({address:s});if(s&&!a)throw new $("`paymasterInput` must be provided when `paymaster` is defined");if(!s&&a)throw new $("`paymaster` must be provided when `paymasterInput` is defined")}function v4(e,t){return a6(e)?k4(e):Al(e,t)}const E4={transaction:v4};function k4(e){const{chainId:t,gas:r,nonce:n,to:s,from:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,customSignature:l,factoryDeps:u,paymaster:d,paymasterInput:f,gasPerPubdata:m,data:b}=e;o6(e);const g=[n?Ue(n):"0x",c?Ue(c):"0x",i?Ue(i):"0x",r?Ue(r):"0x",s??"0x",o?Ue(o):"0x",b??"0x",Ue(t),Ue(""),Ue(""),Ue(t),a??"0x",Ue(m||qf),u??[],l??"0x",d&&f?[d,f]:[]];return ur(["0x71",nn(g)])}class C4 extends ${constructor({givenLength:t,maxBytecodeSize:r}){super(`Bytecode cannot be longer than ${r} bytes. Given length: ${t}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class T4 extends ${constructor({givenLengthInWords:t}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${t}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class A4 extends ${constructor({givenLength:t}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${t}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function S4(e){const t=Cn(e);if(t.length%32!==0)throw new A4({givenLength:t.length});if(t.length>n6)throw new C4({givenLength:t.length,maxBytecodeSize:n6});const r=Nb(t),n=Cn(r),s=t.length/32;if(s%2===0)throw new T4({givenLengthInWords:s});const a=Cn(s),o=$s(a,{size:2}),i=new Uint8Array([1,0]);return n.set(i,0),n.set(o,2),n}const P4=e=>{o6(e);const t=I4(e);return{domain:{name:"zkSync",version:"2",chainId:e.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:t}};function I4(e){const{gas:t,nonce:r,to:n,from:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:i,factoryDeps:c,paymaster:l,paymasterInput:u,gasPerPubdata:d,data:f}=e;return{txType:113n,from:BigInt(s),to:n?BigInt(n):0n,gasLimit:t??0n,gasPerPubdataByteLimit:d??qf,maxFeePerGas:o??0n,maxPriorityFeePerGas:i??0n,paymaster:l?BigInt(l):0n,nonce:r?BigInt(r):0n,value:a??0n,data:f??"0x",factoryDeps:(c==null?void 0:c.map(m=>Ue(S4(m))))??[],paymasterInput:u||"0x"}}const fr={blockTime:1e3,formatters:s6,serializers:E4,custom:{getEip712Domain:P4}},B4=p({...fr,blockTime:200,id:2741,name:"Abstract",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.mainnet.abs.xyz"],webSocket:["wss://api.mainnet.abs.xyz/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.mainnet.abs.xyz"}},contracts:{multicall3:{address:"0xAa4De41dba0Ca5dCBb288b7cC6b708F3aaC759E7",blockCreated:5288},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:5263}}}),F4=p({...fr,blockTime:200,id:11124,name:"Abstract Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.testnet.abs.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.testnet.abs.xyz"}},testnet:!0,contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:358349},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:431682}}}),O4=p({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{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}),U4=p({id:47,name:"Acria IntelliChain",nativeCurrency:{decimals:18,name:"ACRIA",symbol:"ACRIA"},rpcUrls:{default:{http:["https://aic.acria.ai"]}},blockExplorers:{default:{name:"Acria Explorer",url:"https://explorer.acria.ai"}},testnet:!1}),D4=p({id:1215,name:"ADF Chain",nativeCurrency:{name:"ADDFILL",symbol:"ADF",decimals:18},rpcUrls:{default:{http:["https://mainnet.adftechnology.com"]}},blockExplorers:{default:{name:"ADF Mainnet Explorer",url:"https://explorer.adftechnology.com"}},testnet:!1}),_4=p({id:9990,name:"Agung Network",nativeCurrency:{decimals:18,name:"Agung",symbol:"AGNG"},rpcUrls:{default:{http:["https://wss-async.agung.peaq.network"],webSocket:["wss://wss-async.agung.peaq.network"]}},blockExplorers:{default:{name:"Subscan",url:"https://agung-testnet.subscan.io"}},testnet:!0}),M4=p({id:168,name:"AIOZ Network",nativeCurrency:{decimals:18,name:"AIOZ",symbol:"AIOZ"},rpcUrls:{default:{http:["https://eth-dataseed.aioz.network"]}},blockExplorers:{default:{name:"AIOZ Explorer",url:"https://explorer.aioz.network"}},testnet:!1}),N4=p({id:41455,name:"Aleph Zero",nativeCurrency:{name:"Aleph Zero",symbol:"AZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero.raas.gelato.cloud"]}},blockExplorers:{default:{name:"Aleph Zero EVM Explorer",url:"https://evm-explorer.alephzero.org",apiUrl:"https://evm-explorer.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4603377}}}),L4=p({id:2039,name:"Aleph Zero Testnet",nativeCurrency:{name:"TZERO",symbol:"TZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero-testnet.gelato.digital"],webSocket:["wss://ws.alephzero-testnet.gelato.digital"]}},blockExplorers:{default:{name:"Aleph Zero EVM Testnet explorer",url:"https://evm-explorer-testnet.alephzero.org",apiUrl:"https://evm-explorer-testnet.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2861745}},testnet:!0}),z4=p({id:10241024,name:"AlienX Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://explorer.alienxchain.io"}},testnet:!1}),R4=p({id:10241025,name:"ALIENX Hal Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://hal-rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://hal-explorer.alienxchain.io"}},testnet:!0}),i6={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},Kf={block:yp({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>{if(typeof n=="string")return n;const s=Js(n);return s.typeHex==="0x7e"&&(s.isSystemTx=n.isSystemTx,s.mint=n.mint?ze(n.mint):void 0,s.sourceHash=n.sourceHash,s.type="deposit"),s}),stateRoot:e.stateRoot}}}),transaction:al({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ze(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:Jp({format(e){return{l1GasPrice:e.l1GasPrice?ze(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?ze(e.l1GasUsed):null,l1Fee:e.l1Fee?ze(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function c6(e,t){return G4(e)?$4(e):Al(e,t)}const H4={transaction:c6};function $4(e){j4(e);const{sourceHash:t,data:r,from:n,gas:s,isSystemTx:a,mint:o,to:i,value:c}=e,l=[t,n,i??"0x",o?Ue(o):"0x",c?Ue(c):"0x",s?Ue(s):"0x",a?"0x1":"0x",r??"0x"];return ur(["0x7e",nn(l)])}function G4(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function j4(e){const{from:t,to:r}=e;if(t&&!nt(t))throw new Ct({address:t});if(r&&!nt(r))throw new Ct({address:r})}const V={blockTime:2e3,contracts:i6,formatters:Kf,serializers:H4},zl=1,V4=p({...V,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:{...V.contracts,l2OutputOracle:{[zl]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[zl]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[zl]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:zl}),Rl=11155111,W4=p({...V,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:{...V.contracts,l2OutputOracle:{[Rl]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[Rl]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[Rl]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:Rl}),q4=p({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"]}}}),K4=p({id:33139,name:"ApeChain",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.apechain.com/http"],webSocket:["wss://rpc.apechain.com/ws"]}},blockExplorers:{default:{name:"Apescan",url:"https://apescan.io",apiUrl:"https://api.apescan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:20889}},sourceId:42161}),Y4=p({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}),Z4=p({id:62606,name:"Apollo",nativeCurrency:{decimals:18,name:"Apollo",symbol:"APOLLO"},rpcUrls:{default:{http:["https://mainnet-rpc.apolloscan.io"]}},blockExplorers:{default:{name:"Apollo Explorer",url:"https://apolloscan.io"}}}),X4=p({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,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}}}),Q4=p({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}),J4=p({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}}}),eA=p({id:421614,name:"Arbitrum Sepolia",blockTime:250,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}),tA=p({id:5042002,name:"Arc Testnet",nativeCurrency:{name:"USDC",symbol:"USDC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.arc.network","https://rpc.quicknode.testnet.arc.network","https://rpc.blockdaemon.testnet.arc.network"],webSocket:["wss://rpc.testnet.arc.network","wss://rpc.quicknode.testnet.arc.network"]}},blockExplorers:{default:{name:"ArcScan",url:"https://testnet.arcscan.app",apiUrl:"https://testnet.arcscan.app/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),rA=p({id:7897,name:"Arena-Z",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.arena-z.gg"]}},blockExplorers:{default:{name:"Arena-Z Explorer",url:"https://explorer.arena-z.gg",apiUrl:"https://explorer.arena-z.gg"}}}),nA=p({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),sA=p({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}),aA=p({id:463,name:"Areum",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areum.network"],webSocket:["wss://mainnet-ws.areum.network"]}},blockExplorers:{default:{name:"Areum Explorer",url:"https://explorer.areum.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),oA=p({id:11822,name:"Artela Testnet",nativeCurrency:{name:"ART",symbol:"ART",decimals:18},rpcUrls:{default:{http:["https://betanet-rpc1.artela.network"]}},blockExplorers:{default:{name:"Artela",url:"https://betanet-scan.artela.network",apiUrl:"https://betanet-scan.artela.network/api"}},contracts:{multicall3:{address:"0xd07c8635f76e8745Ee7092fbb6e8fbc5FeF09DD7",blockCreated:7001871}},testnet:!0}),iA=p({id:10242,name:"Arthera",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer.arthera.net",apiUrl:"https://explorer.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4502791}}}),cA=p({id:10243,name:"Arthera Testnet",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc-test.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer-test.arthera.net",apiUrl:"https://explorer-test.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:22051}}}),lA=p({id:42420,name:"AssetChain Mainnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://mainnet-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Explorer",url:"https://scan.assetchain.org",apiUrl:"https://scan.assetchain.org/api"}},testnet:!1,contracts:{}}),uA=p({id:42421,name:"AssetChain Testnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://enugu-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Testnet Explorer",url:"https://scan-testnet.assetchain.org",apiUrl:"https://scan-testnet.assetchain.org/api"}},testnet:!0,contracts:{multicall3:{address:"0x989F832D35988cb5e3eB001Fa2Fe789469EC31Ea",blockCreated:17177}}}),dA=p({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}),pA=p({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-zkevm.astar.network"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),fA=p({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}),mA=p({id:2340,name:"Atleta Olympia",nativeCurrency:{decimals:18,name:"Atla",symbol:"ATLA"},rpcUrls:{default:{http:["https://testnet-rpc.atleta.network:9944","https://testnet-rpc.atleta.network"],ws:["wss://testnet-rpc.atleta.network:9944"]}},blockExplorers:{default:{name:"Atleta Olympia Explorer",url:"https://blockscout.atleta.network",apiUrl:"https://blockscout.atleta.network/api"}},contracts:{multicall3:{address:"0x1472ec6392180fb84F345d2455bCC75B26577115",blockCreated:1076473}},testnet:!0}),hA=p({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}}}),bA=p({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}),yA=p({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}),gA=p({id:785,name:"Autheo Testnet",nativeCurrency:{decimals:18,name:"Autheo",symbol:"THEO"},rpcUrls:{default:{http:["https://testnet-rpc1.autheo.com","https://testnet-rpc2.autheo.com"]}},blockExplorers:{default:{name:"Autheo Testnet Block Explorer",url:"https://testnet-explorer.autheo.com/"}}}),xA=p({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),wA=p({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:"SnowTrace",url:"https://testnet.snowtrace.io",apiUrl:"https://api-testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),vA=p({id:8333,name:"B3",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},sourceId:8453}),EA=p({id:1993,name:"B3 Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},testnet:!0,sourceId:168587773}),kA=p({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"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),Mi=1,l6=p({...V,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:{...V.contracts,disputeGameFactory:{[Mi]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Mi]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Mi]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Mi]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Mi}),CA=p({...l6,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}}),TA=p({id:123420001114,name:"Basecamp Testnet",nativeCurrency:{decimals:18,name:"Camp",symbol:"CAMP"},rpcUrls:{default:{http:["https://rpc.basecamp.t.raas.gelato.cloud"]}},blockExplorers:{default:{name:"basecamp",url:"https://basecamp.cloud.blockscout.com"}},testnet:!0}),Hl=5,AA=p({...V,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:{...V.contracts,l2OutputOracle:{[Hl]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[Hl]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[Hl]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:Hl}),Ni=11155111,u6=p({...V,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:{...V.contracts,disputeGameFactory:{[Ni]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Ni]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Ni]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Ni]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:Ni}),SA=p({...u6,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}}),PA=p({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{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}}}),IA=p({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{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}),BA=p({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"}}}),FA=p({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}),OA=p({id:80094,name:"Berachain",blockTime:2e3,nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},ensRegistry:{address:"0x5b22280886a2f5e09a49bea7e320eab0e5320e28",blockCreated:877007},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:9310021}},rpcUrls:{default:{http:["https://rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://berascan.com"}},ensTlds:[".bera"],testnet:!1}),UA=p({id:80069,blockTime:2e3,name:"Berachain Bepolia",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},rpcUrls:{default:{http:["https://bepolia.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://bepolia.beratrail.io"}},testnet:!0}),DA=p({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:866924}},testnet:!0}),_A=p({id:80084,name:"Berachain bArtio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:109269},ensRegistry:{address:"0xB0eef18971290b333450586D33dcA6cE122651D2",blockCreated:7736794},ensUniversalResolver:{address:"0x41692Ef1EA0C79E6b73077E4A67572D2BDbD7057",blockCreated:7736795}},ensTlds:[".bera"],rpcUrls:{default:{http:["https://bartio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain bArtio Beratrail",url:"https://bartio.beratrail.io"}},testnet:!0}),MA=p({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"}}}),NA=p({id:3068,name:"Bifrost Mainnet",nativeCurrency:{name:"BFC",symbol:"BFC",decimals:18},rpcUrls:{default:{http:["https://public-01.mainnet.bifrostnetwork.com/rpc"]}},blockExplorers:{default:{name:"Bifrost Blockscout",url:"https://explorer.mainnet.bifrostnetwork.com"}},testnet:!1}),LA=p({id:53456,name:"BirdLayer",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.birdlayer.xyz","https://rpc1.birdlayer.xyz"],webSocket:["wss://rpc.birdlayer.xyz/ws"]}},blockExplorers:{default:{name:"BirdLayer Explorer",url:"https://scan.birdlayer.xyz"}}}),zA=p({id:32520,name:"Bitgert Mainnet",nativeCurrency:{decimals:18,name:"Brise",symbol:"Brise"},rpcUrls:{default:{http:["https://rpc-bitgert.icecreamswap.com"]}},blockExplorers:{default:{name:"Bitgert Scan",url:"https://brisescan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2118034}},testnet:!1}),RA=p({id:96,name:"KUB Mainnet",nativeCurrency:{name:"KUB Coin",symbol:"KUB",decimals:18},rpcUrls:{default:{http:["https://rpc.bitkubchain.io"]}},blockExplorers:{default:{name:"KUB Chain Mainnet Explorer",url:"https://www.bkcscan.com",apiUrl:"https://www.bkcscan.com/api"}}}),HA=p({id:25925,name:"Bitkub Testnet",network:"Bitkub Testnet",nativeCurrency:{name:"Bitkub Test",symbol:"tKUB",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.bitkubchain.io"]}},blockExplorers:{default:{name:"Bitkub Chain Testnet Explorer",url:"https://testnet.bkcscan.com",apiUrl:"https://testnet.bkcscan.com/api"}},testnet:!0}),$A=p({id:200901,name:"Bitlayer Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org"],webSocket:["wss://ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer mainnet scan",url:"https://www.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:2421963}}}),GA=p({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer testnet scan",url:"https://testnet.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:4135671}},testnet:!0}),jA=p({id:7171,name:"Bitrock Mainnet",nativeCurrency:{name:"BROCK",symbol:"BROCK",decimals:18},rpcUrls:{default:{http:["https://brockrpc.io"]}},blockExplorers:{default:{name:"Bitrock Explorer",url:"https://explorer.bit-rock.io"}},testnet:!1}),VA=p({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:31078552}}}),WA=p({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),$l=1,qA=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929},l2OutputOracle:{[$l]:{address:"0x826D1B0D4111Ad9146Eb8941D7Ca2B6a44215c76",blockCreated:19300358}},portal:{[$l]:{address:"0x0Ec68c5B10F21EFFb74f2A5C61DFe6b08C0Db6Cb",blockCreated:19300357}},l1StandardBridge:{[$l]:{address:"0x697402166Fbf2F22E970df8a6486Ef171dbfc524",blockCreated:19300360}}},sourceId:$l}),KA=p({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:11155111}),Yf=1,YA=p({...V,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:"BOB Explorer",url:"https://explorer.gobob.xyz"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{[Yf]:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{[Yf]:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:Yf}),ZA=p({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}}}),XA=p({id:28882,name:"Boba Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://testnet.bobascan.com"}},testnet:!0}),Zf=11155111,QA=p({...V,id:808813,name:"BOB Sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://bob-sepolia.rpc.gobob.xyz"],webSocket:["wss://bob-sepolia.rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Sepolia Explorer",url:"https://bob-sepolia.explorer.gobob.xyz"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{[Zf]:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{[Zf]:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:Zf}),JA=p({id:11100,name:"Bool Beta Mainnet",nativeCurrency:{decimals:18,name:"BOL",symbol:"BOL"},rpcUrls:{default:{http:["https://beta-rpc-node-http.bool.network"]}},blockExplorers:{default:{name:"BoolScan",url:"https://beta-mainnet.boolscan.com/"}},testnet:!1}),eS=p({id:3637,name:"Botanix",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.botanixlabs.com"],webSocket:["wss://rpc.botanixlabs.com/ws"]}},blockExplorers:{default:{name:"Botanixscan",url:"https://botanixscan.io"}}}),tS=p({id:3636,name:"Botanix Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://node.botanixlabs.dev"]}},blockExplorers:{default:{name:"Botanix Testnet Explorer",url:"https://testnet.botanixscan.io"}},testnet:!0}),rS=p({id:6001,name:"BounceBit Mainnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-mainnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://bbscan.io"}},testnet:!1}),nS=p({id:6e3,name:"BounceBit Testnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-testnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://testnet.bbscan.io"}},testnet:!0}),sS=p({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"}}}),aS=p({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}),oS=p({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),iS=p({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}),cS=p({id:97,name:"BNB 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://api-testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),lS=p({id:223,name:"B2",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.bsquared.network"}}}),uS=p({id:1123,name:"B2 Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-explorer.bsquared.network"}},testnet:!0}),dS=p({id:200901,name:"Bitlayer",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://www.btrscan.com"}}}),pS=p({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",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:"Bitlayer(BTR) Scan",url:"https://testnet.btrscan.com"}},testnet:!0}),fS=p({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"}}}),mS=p({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}),hS=p({id:13370,name:"Cannon",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),bS=p({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}}}),yS={estimateFeesPerGas:async e=>{var s;if(!((s=e.request)!=null&&s.feeCurrency))return null;const[t,r]=await Promise.all([gS(e.client,e.request.feeCurrency),xS(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-r)+r,maxPriorityFeePerGas:r}}};async function gS(e,t){const r=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(r)}async function xS(e,t){const r=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(r)}function d6(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&(Zt(e).toLowerCase()==="0x"||Zt(e).toLowerCase()==="0x00")}function Li(e){return!d6(e)}function wS(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function p6(e){return e.type==="cip64"?!0:wS(e)&&Li(e.feeCurrency)}const vS={block:yp({format(e){var r;return{transactions:(r=e.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:{...Js(n),...n.gatewayFee?{gatewayFee:ze(n.gatewayFee),gatewayFeeRecipient:n.gatewayFeeRecipient}:{},feeCurrency:n.feeCurrency})}}}),transaction:al({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?ze(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};const t={feeCurrency:e.feeCurrency};return e.type==="0x7b"?t.type="cip64":(e.type==="0x7c"&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?ze(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:fp({format(e){const t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),p6(e)&&(t.type="0x7b"),t}})};function ES(e,t){return p6(e)?CS(e,t):c6(e,t)}const kS={transaction:ES};function CS(e,t){AS(e);const{chainId:r,gas:n,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,feeCurrency:u,data:d}=e,f=[Ue(r),s?Ue(s):"0x",c?Ue(c):"0x",i?Ue(i):"0x",n?Ue(n):"0x",a??"0x",o?Ue(o):"0x",d??"0x",Fi(l),u,...to(e,t)];return ur(["0x7b",nn(f)])}const TS=Qs;function AS(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:a,feeCurrency:o}=e;if(t<=0)throw new Qa({chainId:t});if(a&&!nt(a))throw new Ct({address:a});if(n)throw new $("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(Li(s)&&s>TS)throw new as({maxFeePerGas:s});if(Li(r)&&Li(s)&&r>s)throw new qa({maxFeePerGas:s,maxPriorityFeePerGas:r});if(Li(o)&&!nt(o))throw new $("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(d6(o))throw new $("`feeCurrency` must be provided for CIP-64 transactions.")}const zi={blockTime:1e3,contracts:i6,formatters:vS,serializers:kS,fees:yS},SS=p({...zi,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}),Gl=17e3,PS=p({...zi,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 Alfajores Explorer",url:"https://celo-alfajores.blockscout.com",apiUrl:"https://celo-alfajores.blockscout.com/api"}},contracts:{...zi.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001},portal:{[Gl]:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{[Gl]:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{[Gl]:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{[Gl]:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0}),Xf=11155111,IS=p({...zi,id:11142220,name:"Celo Sepolia Testnet",nativeCurrency:{decimals:18,name:"CELO",symbol:"S-CELO"},rpcUrls:{default:{http:["https://forno.celo-sepolia.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Sepolia Explorer",url:"https://celo-sepolia.blockscout.com/",apiUrl:"https://celo-sepolia.blockscout.com/api"}},contracts:{...zi.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1},portal:{[Xf]:{address:"0x44ae3d41a335a7d05eb533029917aad35662dcc2",blockCreated:8825790}},disputeGameFactory:{[Xf]:{address:"0x57c45d82d1a995f1e135b8d7edc0a6bb5211cfaa",blockCreated:8825790}},l1StandardBridge:{[Xf]:{address:"0xec18a3c30131a0db4246e785355fbc16e2eaf408",blockCreated:8825790}}},testnet:!0}),BS=p({id:5858,name:"Chang Chain Foundation Mainnet",nativeCurrency:{decimals:18,name:"CTH",symbol:"CTH"},rpcUrls:{default:{http:["https://rpc.cthscan.com"]}},blockExplorers:{default:{name:"Chang Chain explorer",url:"https://cthscan.com"}}}),FS=p({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.chiliz.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8080847}}}),OS=p({id:2882,name:"Chips Network",network:"CHIPS",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://node.chips.ooo/wasp/api/v1/chains/iota1pp3d3mnap3ufmgqnjsnw344sqmf5svjh26y2khnmc89sv6788y3r207a8fn/evm"]}}}),US=p({id:5115,name:"Citrea Testnet",nativeCurrency:{name:"cBTC",symbol:"cBTC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.citrea.xyz"]}},blockExplorers:{default:{name:"Citrea Explorer",url:"https://explorer.testnet.citrea.xyz",apiUrl:"https://explorer.testnet.citrea.xyz/api"}},testnet:!0}),DS=p({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"}}}),_S=p({id:112,name:"Coinbit Mainnet",nativeCurrency:{name:"GIDR",symbol:"GIDR",decimals:18},rpcUrls:{default:{http:["https://coinbit-rpc-mainnet.chain.sbcrypto.app"]}},blockExplorers:{default:{name:"Coinbit Explorer",url:"https://coinbit-explorer.chain.sbcrypto.app"}},testnet:!1}),MS=p({id:52,name:"CoinEx Mainnet",nativeCurrency:{name:"cet",symbol:"cet",decimals:18},rpcUrls:{default:{http:["https://rpc.coinex.net"]}},blockExplorers:{default:{name:"CoinEx Explorer",url:"https://www.coinex.net"}},testnet:!1}),NS=p({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.com"],webSocket:["wss://evm.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),LS=p({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.com"],webSocket:["wss://evmtestnet.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),zS=p({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}),RS=p({id:1115,name:"Core Testnet",nativeCurrency:{decimals:18,name:"tCore",symbol:"TCORE"},rpcUrls:{default:{http:["https://rpc.test.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet",url:"https://scan.test.btcs.network",apiUrl:"https://api.test.btcs.network/api"}},contracts:{multicall3:{address:"0xCcddF20A1932537123C2E48Bd8e00b108B8f7569",blockCreated:29350509}},testnet:!0}),HS=p({id:1114,name:"Core Testnet2",nativeCurrency:{decimals:18,name:"tCore2",symbol:"TCORE2"},rpcUrls:{default:{http:["https://rpc.test2.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet2",url:"https://scan.test2.btcs.network",apiUrl:"https://api.test2.btcs.network/api"}},contracts:{multicall3:{address:"0x3CB285ff3Cd5C7C7e570b1E7DE3De17A0f985e56",blockCreated:3838600}},testnet:!0}),$S=p({id:21e6,name:"Corn",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Explorer",url:"https://cornscan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/21000000/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3228}},sourceId:1}),GS=p({id:21000001,name:"Corn Testnet",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Testnet Explorer",url:"https://testnet.cornscan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/21000001/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4886}},testnet:!0,sourceId:11155111}),jS=p({id:44,name:"Crab Network",nativeCurrency:{decimals:18,name:"Crab Network Native Token",symbol:"CRAB"},rpcUrls:{default:{http:["https://crab-rpc.darwinia.network"],webSocket:["wss://crab-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://crab-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3032593}}}),VS=p({id:66665,name:"Creator",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.creatorchain.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.creatorchain.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),WS=p({id:102032,name:"Creditcoin Devnet",nativeCurrency:{name:"Devnet CTC",symbol:"devCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-devnet.creditcoin.network"],webSocket:["wss://rpc.cc3-devnet.creditcoin.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-devnet.blockscout.com",apiUrl:"https://creditcoin3-dev.subscan.io"}},testnet:!0}),qS=p({id:102030,name:"Creditcoin",nativeCurrency:{name:"Creditcoin",symbol:"CTC",decimals:18},rpcUrls:{default:{http:["https://mainnet3.creditcoin.network"],webSocket:["wss://mainnet3.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin.blockscout.com",apiUrl:"https://creditcoin.blockscout.com/api"}},testnet:!1}),KS=p({id:102031,name:"Creditcoin Testnet",nativeCurrency:{name:"Creditcoin Testnet",symbol:"tCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-testnet.creditcoin.network"],webSocket:["wss://rpc.cc3-testnet.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-testnet.blockscout.com",apiUrl:"https://creditcoin-testnet.blockscout.com/api"}},testnet:!0}),YS=p({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}}}),ZS=p({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 (Testnet)",url:"https://explorer.cronos.org/testnet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),XS=p({id:388,name:"Cronos zkEVM Mainnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM CRO",symbol:"zkCRO"},rpcUrls:{default:{http:["https://mainnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM (Mainnet) Chain Explorer",url:"https://explorer.zkevm.cronos.org"}},contracts:{multicall3:{address:"0x06f4487d7c4a5983d2660db965cc6d2565e4cfaa",blockCreated:72}}}),QS=p({id:282,name:"Cronos zkEVM Testnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM Test Coin",symbol:"zkTCRO"},rpcUrls:{default:{http:["https://testnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM Testnet Explorer",url:"https://explorer.zkevm.cronos.org/testnet"}},testnet:!0}),JS=p({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}}}),eP=p({id:4158,name:"CrossFi Mainnet",nativeCurrency:{decimals:18,name:"CrossFi",symbol:"XFI"},rpcUrls:{default:{http:["https://rpc.mainnet.ms"]}},blockExplorers:{default:{name:"CrossFi Blockchain Explorer",url:"https://xfiscan.com"}},testnet:!1}),tP=p({id:33111,name:"Curtis",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.curtis.apechain.com"]}},blockExplorers:{default:{name:"Curtis Explorer",url:"https://explorer.curtis.apechain.com"}},testnet:!0}),rP=p({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}}}),nP=p({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}),sP=p({id:824,name:"Daily Network Mainnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.mainnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Mainnet Explorer",url:"https://explorer.mainnet.dailycrypto.net"}},testnet:!1}),aP=p({id:825,name:"Daily Network Testnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.testnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Testnet Explorer",url:"https://explorer.testnet.dailycrypto.net"}},testnet:!0}),oP=p({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://explorer.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),iP=p({id:55931,name:"Datahaven Testnet",nativeCurrency:{decimals:18,name:"MOCK",symbol:"MOCK"},rpcUrls:{default:{http:["https://services.datahaven-testnet.network/testnet"],webSocket:["wss://services.datahaven-testnet.network/testnet"]}},blockExplorers:{default:{name:"DhScan",url:"https://testnet.dhscan.io/",apiUrl:"https://testnet.dhscan.io/api-docs"}},contracts:{},testnet:!0}),cP=p({id:20240603,name:"DBK chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.dbkchain.io"]}},blockExplorers:{default:{name:"DBK Chain Explorer",url:"https://scan.dbkchain.io"}},testnet:!1}),lP=p({...V,id:2716446429837e3,name:"Dchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchain-2716446429837000-1.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchain-2716446429837000-1.sagaexplorer.io",apiUrl:"https://api-dchain-2716446429837000-1.sagaexplorer.io/api"}},contracts:{...V.contracts}}),uP=p({...V,id:2713017997578e3,name:"Dchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchaintestnet-2713017997578000-1.jsonrpc.testnet.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io",apiUrl:"https://api-dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io/api"}},contracts:{...V.contracts}}),dP=p({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),pP=p({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{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}),fP=p({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"}}}),mP=p({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}}}),hP=p({id:15,name:"Diode Prenet",nativeCurrency:{decimals:18,name:"DIODE",symbol:"DIODE"},rpcUrls:{default:{http:["https://prenet.diode.io:8443"],webSocket:["wss://prenet.diode.io:8443/ws"]}},blockExplorers:{default:{name:"Diode Explorer",url:"https://diode.io/prenet"}},testnet:!1}),bP=p({id:513100,name:"DisChain",nativeCurrency:{decimals:18,name:"DIS",symbol:"DIS"},rpcUrls:{default:{http:["https://rpc.dischain.xyz"]}},blockExplorers:{default:{name:"DisChain Explorer",url:"https://www.oklink.com/dis"}}}),yP=p({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}),gP=p({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Wrapped Dogecoin",symbol:"WDOGE"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}},contracts:{multicall3:{address:"0x68a8609a60a008EFA633dfdec592c03B030cC508",blockCreated:25384031}}}),xP=p({id:97476,name:"Doma Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc-testnet.doma.xyz"]}},blockExplorers:{default:{name:"Doma Testnet Explorer",url:"https://explorer-testnet.doma.xyz"}},testnet:!0}),wP=p({id:42026,name:"Donatuz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.donatuz.com"]}},blockExplorers:{default:{name:"Donatuz Explorer",url:"https://explorer.donatuz.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),vP=p({id:7979,name:"DOS Chain",nativeCurrency:{decimals:18,name:"DOS Chain",symbol:"DOS"},rpcUrls:{default:{http:["https://main.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Explorer",url:"https://doscan.io",apiUrl:"https://api.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:161908}}}),EP=p({id:3939,name:"DOS Chain Testnet",nativeCurrency:{decimals:18,name:"DOS Chain Testnet",symbol:"DOS"},rpcUrls:{default:{http:["https://test.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Testnet Explorer",url:"https://test.doscan.io",apiUrl:"https://api-test.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69623}},testnet:!0}),kP=p({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"}}}),CP=p({id:23452,name:"DreyerX Testnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["http://testnet-rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Testnet Scan",url:"https://testnet-scan.dreyerx.com"}},testnet:!0}),TP=p({id:555888,name:"DustBoy IoT",nativeCurrency:{name:"Ether",symbol:"DST",decimals:18},rpcUrls:{default:{http:["https://dustboy-rpc.jibl2.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://dustboy.jibl2.com",apiUrl:"https://dustboy.jibl2.com/api"}},contracts:{multicall3:{address:"0xFFD34aa2C62B2D52E00A361e466C229788f4eD6a",blockCreated:526569}},testnet:!1}),AP=p({id:1100,name:"Dymension",nativeCurrency:{name:"DYM",symbol:"DYM",decimals:18},rpcUrls:{default:{http:["https://dymension-evm-rpc.publicnode.com"],webSocket:["wss://dymension-evm-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Dym FYI",url:"https://dym.fyi"}},testnet:!1}),SP=p({id:5424,name:"edeXa",nativeCurrency:{name:"edeXa",symbol:"EDX",decimals:18},rpcUrls:{default:{http:["https://rpc.edexa.network"]}},blockExplorers:{default:{name:"edeXa Explorer",url:"https://explorer.edexa.network",apiUrl:"https://explorer.edexa.network/api/v2"}}}),PP=p({id:1995,name:"edeXa Testnet",nativeCurrency:{name:"edeXa",symbol:"tEDX",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.edexa.network"]}},blockExplorers:{default:{name:"edeXa Testnet Explorer",url:"https://explorer.testnet.edexa.network",apiUrl:"https://explorer.testnet.edexa.network/api/v2"}},testnet:!0}),IP=p({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"}}}),BP=p({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"}}}),FP=p({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}}}),OP=p({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"}}}),UP=p({id:41923,name:"EDU Chain",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.edu-chain.raas.gelato.cloud"]}},blockExplorers:{default:{name:"EDU Chain Explorer",url:"https://educhain.blockscout.com/"}},testnet:!1}),DP=p({id:656476,name:"EDU Chain Testnet",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.open-campus-codex.gelato.digital/"],webSocket:["wss://ws.open-campus-codex.gelato.digital"]}},blockExplorers:{default:{name:"EDU Chain Testnet Explorer",url:"https://opencampus-codex.blockscout.com",apiUrl:"https://opencampus-codex.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15514133}},testnet:!0}),_P=p({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"}}}),MP=p({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}),NP=p({id:20,name:"Elastos Smart Chain",nativeCurrency:{name:"ELA",symbol:"ELA",decimals:18},rpcUrls:{default:{http:["https://api2.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc.elastos.io"}},testnet:!1}),LP=p({id:21,name:"Elastos Smart Chain Testnet",nativeCurrency:{name:"tELA",symbol:"tELA",decimals:18},rpcUrls:{default:{http:["https://api-testnet.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc-testnet.elastos.io"}},testnet:!0}),zP=p({id:52014,name:"Electroneum Mainnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.electroneum.com"}},testnet:!1}),RP=p({id:5201420,name:"Electroneum Testnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.thesecurityteam.rocks"}},testnet:!0}),HP=p({...V,id:1338,name:"Elysium Testnet",nativeCurrency:{decimals:18,name:"LAVA",symbol:"LAVA"},rpcUrls:{default:{http:["https://elysium-test-rpc.vulcanforged.com"]}},blockExplorers:{default:{name:"Elysium testnet explorer",url:"https://elysium-explorer.vulcanforged.com"}},testnet:!0}),$P=p({id:246,name:"Energy Mainnet",nativeCurrency:{name:"EWT",symbol:"EWT",decimals:18},rpcUrls:{default:{http:["https://rpc.energyweb.org"]}},blockExplorers:{default:{name:"EnergyWeb Explorer",url:"https://explorer.energyweb.org"}},testnet:!1}),GP=p({id:173,name:"ENI Mainnet",nativeCurrency:{decimals:18,name:"ENI",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc.eniac.network"]}},blockExplorers:{default:{name:"ENI Explorer",url:"https://scan.eniac.network"}},testnet:!1}),jP=p({id:6912115,name:"ENI Testnet",nativeCurrency:{decimals:18,name:"ENI Testnet Token",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc-testnet.eniac.network"]}},blockExplorers:{default:{name:"ENI Testnet Explorer",url:"https://scan-testnet.eniac.network"}},testnet:!0}),VP=p({id:119,name:"ENULS Mainnet",nativeCurrency:{decimals:18,name:"NULS",symbol:"NULS"},rpcUrls:{default:{http:["https://evmapi2.nuls.io"]}},blockExplorers:{default:{name:"ENULS Explorer",url:"https://evmscan.nuls.io"}},testnet:!1}),WP=p({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:{}}),qP=p({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}}}),KP=p({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}),YP=p({id:140,name:"Eteria",nativeCurrency:{name:"Eteria",symbol:"ERA",decimals:18},rpcUrls:{default:{http:["https://mainnet.eteria.io/v1"]}},blockExplorers:{default:{name:"Eteria Explorer",url:"https://explorer.eteria.io",apiUrl:"https://explorer.eteria.io/api"}}}),ZP=p({id:42793,name:"Etherlink",blockTime:4830,nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.mainnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink",url:"https://explorer.etherlink.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:33899}}}),XP=p({id:127823,name:"Etherlink Shadownet Testnet",nativeCurrency:{decimals:18,name:"tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.shadownet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Shadownet Testnet Explorer",url:"https://shadownet.explorer.etherlink.com"}},testnet:!0}),QP=p({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}),JP=p({id:183,name:"Ethernity",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.ethernitychain.io"]}},blockExplorers:{default:{name:"Ethernity Explorer",url:"https://ernscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),eI=p({id:20256789,name:"ETP Mainnet",nativeCurrency:{decimals:18,name:"ETP Chain Native Token",symbol:"ETP"},rpcUrls:{default:{http:["https://rpc.etpscan.xyz"]}},blockExplorers:{default:{name:"ETP Scan",url:"https://etpscan.xyz"}}}),tI=p({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"}}}),rI=p({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/"}}}),nI=p({id:22052002,name:"Excelon Mainnet",network:"XLON",nativeCurrency:{decimals:18,name:"Excelon",symbol:"xlon"},rpcUrls:{default:{http:["https://edgewallet1.xlon.org"]}},blockExplorers:{default:{name:"Excelon explorer",url:"https://explorer.excelon.io"}}}),sI=p({id:2,name:"Expanse Network",nativeCurrency:{decimals:18,name:"EXP",symbol:"EXP"},rpcUrls:{default:{http:["https://node.expanse.tech"]}},blockExplorers:{default:{name:"Expanse Explorer",url:"https://explorer.expanse.tech"}},testnet:!1}),aI=p({id:7200,name:"exSat Network",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan.exsat.network",apiUrl:"https://scan.exsat.network/api"}}}),oI=p({id:839999,name:"exSat Testnet",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm-tst3.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan-testnet.exsat.network",apiUrl:"https://scan-testnet.exsat.network/api"}}}),iI=p({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://250.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),cI=p({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}),lI=p({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}},testnet:!0}),uI=p({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"}}}),dI=p({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}}}),pI=p({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}),fI=p({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}),mI=p({id:253368190,name:"Flame",network:"flame",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.flame.astria.org"],webSocket:["wss://ws.flame.astria.org"]}},blockExplorers:{default:{name:"Flame Explorer",url:"https://explorer.flame.astria.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6829148}}}),hI=p({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3002461}}}),bI=p({id:114,name:"Flare Testnet Coston2",nativeCurrency:{decimals:18,name:"Coston2 Flare",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}),yI=p({id:747,name:"Flow EVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://evm.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}},blockTime:800}),gI=p({id:646,name:"Flow EVM 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}}}),xI=p({id:545,name:"Flow EVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://evm-testnet.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:137518}},testnet:!0,blockTime:800}),wI=p({id:9999999,name:"Fluence",nativeCurrency:{name:"FLT",symbol:"FLT",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.fluence.dev"],webSocket:["wss://ws.mainnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.mainnet.fluence.dev",apiUrl:"https://blockscout.mainnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:207583}}}),vI=p({id:123420000220,name:"Fluence Stage",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.stage.fluence.dev"],webSocket:["wss://ws.stage.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.stage.fluence.dev",apiUrl:"https://blockscout.stage.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83227}},testnet:!0}),EI=p({id:52164803,name:"Fluence Testnet",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.fluence.dev"],webSocket:["wss://ws.testnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.testnet.fluence.dev",apiUrl:"https://blockscout.testnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96424}},testnet:!0}),kI=p({id:20993,name:"Fluent Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.dev.gblend.xyz"]}},blockExplorers:{default:{name:"Fluent Explorer",url:"https://blockscout.dev.gblend.xyz"}},testnet:!0}),io=1,CI=p({id:478,name:"Form Network",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.form.network/http"],webSocket:["wss://rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Explorer",url:"https://explorer.form.network"}},contracts:{...V.contracts,addressManager:{[io]:{address:"0x15c249E46A2F924C2dB3A1560CF86729bAD1f07B"}},l1CrossDomainMessenger:{[io]:{address:"0xF333158DCCad1dF6C3F0a3aEe8BC31fA94d9eD5c"}},l2OutputOracle:{[io]:{address:"0x4ccAAF69F41c5810cA875183648B577CaCf1F67E"}},portal:{[io]:{address:"0x4E259Ee5F4136408908160dD32295A5031Fa426F"}},l1StandardBridge:{[io]:{address:"0xdc20aA63D3DE59574E065957190D8f24e0F7B8Ba"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:io}),TI=p({id:984122,name:"Forma",network:"forma",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.forma.art"],webSocket:["wss://ws.forma.art"]}},blockExplorers:{default:{name:"Forma Explorer",url:"https://explorer.forma.art"}},contracts:{multicall3:{address:"0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079",blockCreated:252705}}}),co=11155111,AI=p({id:132902,name:"Form Testnet",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia-rpc.form.network/http"],webSocket:["wss://sepolia-rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Testnet Explorer",url:"https://sepolia-explorer.form.network"}},contracts:{...V.contracts,addressManager:{[co]:{address:"0xd5C38fa934f7fd7477D4800F4f38a1c5BFdF1373"}},l1CrossDomainMessenger:{[co]:{address:"0x37A68565c4BE9700b3E3Ec60cC4416cAC3052FAa"}},l2OutputOracle:{[co]:{address:"0x9eA2239E65a59EC9C7F1ED4C116dD58Da71Fc1e2"}},portal:{[co]:{address:"0x60377e3cE15dF4CCA24c4beF076b60314240b032"}},l1StandardBridge:{[co]:{address:"0xD4531f633942b2725896F47cD2aFd260b44Ab1F7"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0,sourceId:co}),SI=p({id:80931,name:"Forta Chain",nativeCurrency:{symbol:"FORT",name:"FORT",decimals:18},rpcUrls:{default:{http:["https://rpc-forta-chain-8gj1qndmfc.t.conduit.xyz"]}},blockExplorers:{default:{name:"Forta Explorer",url:"https://explorer.forta.org"}}}),PI=p({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"]}}}),jl=1,II=p({...V,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax",symbol:"FRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...V.contracts,l2OutputOracle:{[jl]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[jl]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[jl]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:jl}),Vl=17e3,BI=p({...V,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax",symbol:"FRAX",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:{...V.contracts,l2OutputOracle:{[Vl]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Vl]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[Vl]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:Vl}),FI=p({...V,id:33979,name:"Funki",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.funkichain.com"]}},blockExplorers:{default:{name:"Funki Mainnet Explorer",url:"https://funkiscan.io"}},contracts:{...V.contracts},sourceId:1}),OI=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:11155111}),UI=p({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}}}),DI=p({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"}}}),_I=p({id:32659,name:"Fusion Mainnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://mainnet.fusionnetwork.io"],webSocket:["wss://mainnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10441605}},testnet:!1}),MI=p({id:46688,name:"Fusion Testnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://testnet.fusionnetwork.io"],webSocket:["wss://testnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://testnet.fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10428309}},testnet:!0}),Wl=17e3,NI=p({...V,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:Wl,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"],webSocket:["wss://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Wl]:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{[Wl]:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{[Wl]:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}}),LI=p({id:86,name:"GateChain Mainnet",nativeCurrency:{name:"GateChainToken",symbol:"GT",decimals:18},rpcUrls:{default:{http:["https://evm.nodeinfo.cc"],webSocket:["wss://evm-ws.gatenode.cc"]}},blockExplorers:{default:{name:"Gate Scan",url:"https://www.gatescan.org",apiUrl:"https://gatescan.org/api"}},testnet:!1}),zI=p({id:63157,name:"Geist Mainnet",nativeCurrency:{decimals:18,name:"Aavegotchi GHST Token",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://geist-mainnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:660735}}}),RI=p({id:16507,name:"Genesys Mainnet",nativeCurrency:{decimals:18,name:"GSYS",symbol:"GSYS"},rpcUrls:{default:{http:["https://rpc.genesys.network"]}},blockExplorers:{default:{name:"Genesys Explorer",url:"https://gchainexplorer.genesys.network"}},testnet:!1}),ql=11155111,f6=p({...V,id:91342,network:"giwa-sepolia",name:"GIWA Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia-rpc.giwa.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.giwa.io",apiUrl:"https://sepolia-explorer.giwa.io/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[ql]:{address:"0x37347caB2afaa49B776372279143D71ad1f354F6"}},portal:{[ql]:{address:"0x956962C34687A954e611A83619ABaA37Ce6bC78A"}},l1StandardBridge:{[ql]:{address:"0x77b2ffc0F57598cAe1DB76cb398059cF5d10A7E7"}}},testnet:!0,sourceId:ql}),HI=p({...f6,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-rpc-flashblocks.giwa.io"]}}}),$I=p({id:251,name:"Glide L1 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l1-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l1-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),GI=p({id:253,name:"Glide L2 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l2-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l2-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),jI=p({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"xDAI",symbol:"XDAI"},blockTime:5e3,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}}}),VI=p({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},blockTime:5e3,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}),WI=p({id:2345,name:"GOAT",nativeCurrency:{decimals:18,name:"Bitcoin",symbol:"BTC"},rpcUrls:{default:{http:["https://rpc.goat.network"]}},blockExplorers:{default:{name:"Goat Explorer",url:"https://explorer.goat.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),qI=p({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}),KI=p({id:60,name:"GoChain",nativeCurrency:{decimals:18,name:"GO",symbol:"GO"},rpcUrls:{default:{http:["https://rpc.gochain.io"]}},blockExplorers:{default:{name:"GoChain Explorer",url:"https://explorer.gochain.io"}},testnet:!1}),YI=p({id:71402,name:"Godwoken Mainnet",nativeCurrency:{decimals:18,name:"pCKB",symbol:"pCKB"},rpcUrls:{default:{http:["https://v1.mainnet.godwoken.io/rpc"]}},blockExplorers:{default:{name:"GW Scan",url:"https://v1.gwscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15034}},testnet:!1}),ZI=p({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://5.rpc.thirdweb.com"]}},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}),XI=p({id:440017,name:"Graphite Network",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Spectre",url:"https://main.atgraphite.com",apiUrl:"https://api.main.atgraphite.com/api"}},testnet:!1}),QI=p({id:54170,name:"Graphite Network Testnet",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-test-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-test-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Testnet Spectre",url:"https://test.atgraphite.com",apiUrl:"https://api.test.atgraphite.com/api"}},testnet:!0}),JI=p({id:1625,name:"Gravity Alpha Mainnet",nativeCurrency:{name:"G",symbol:"G",decimals:18},rpcUrls:{default:{http:["https://rpc.gravity.xyz"]}},blockExplorers:{default:{name:"Gravity Explorer",url:"https://explorer.gravity.xyz",apiUrl:"https://explorer.gravity.xyz/api"}},contracts:{multicall3:{address:"0xf8ac4BEB2F75d2cFFb588c63251347fdD629B92c",blockCreated:16851}}}),eB=p({id:43419,name:"Gunz Mainnet",nativeCurrency:{name:"GUN",symbol:"GUN",decimals:18},rpcUrls:{default:{http:["https://rpc.gunzchain.io/ext/bc/2M47TxWHGnhNtq6pM5zPXdATBtuqubxn5EPFgFmEawCQr9WFML/rpc"]}},blockExplorers:{default:{name:"Gunz Explorer",url:"https://gunzscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:70502}}}),tB=p({id:260,name:"Guru Network Mainnet",nativeCurrency:{name:"GURU Token",symbol:"GURU",decimals:18},rpcUrls:{default:{http:["https://rpc-main.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/260"]}},blockExplorers:{default:{name:"Guruscan",url:"https://scan.gurunetwork.ai"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:271691}},testnet:!1}),rB=p({id:261,name:"Guru Network Testnet",nativeCurrency:{name:"tGURU Token",symbol:"tGURU",decimals:18},rpcUrls:{default:{http:["https://rpc-test.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/261"]}},blockExplorers:{default:{name:"Guruscan",url:"https://sepolia.gurunetwork.ai"}},testnet:!0}),nB=p({id:5112,name:"Ham",nativeCurrency:{decimals:18,name:"Ham",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.ham.fun"],webSocket:["wss://rpc.ham.fun"]}},blockExplorers:{default:{name:"Ham Chain Explorer",url:"https://explorer.ham.fun",apiUrl:"https://explorer.ham.fun/api/v2"}}}),sB=p({id:216,name:"Happychain Testnet",nativeCurrency:{symbol:"HAPPY",name:"HAPPY",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.happy.tech/http"],webSocket:["wss://rpc.testnet.happy.tech/ws"]}},blockExplorers:{default:{name:"Happy Chain Testnet Explorer",url:"https://explorer.testnet.happy.tech"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0}),aB=p({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"}}}),oB=p({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"}}}),iB=p({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),cB=p({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://1666600000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),lB=p({id:177,name:"HashKey Chain",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://mainnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Explorer",url:"https://hashkey.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),uB=p({id:133,name:"HashKey Chain Testnet",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://testnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Testnet explorer",url:"https://testnet-explorer.hsk.xyz"}},testnet:!0}),dB=p({id:1523903251,name:"Haust Network Testnet",nativeCurrency:{decimals:18,name:"HAUST",symbol:"HAUST"},rpcUrls:{default:{http:["https://rpc-testnet.haust.app"]}},blockExplorers:{default:{name:"Haust Network Testnet Explorer",url:"https://explorer-testnet.haust.app"}},testnet:!0}),pB=p({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}),fB=p({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}),mB=p({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}),hB=p({id:8668,name:"Hela Mainnet",nativeCurrency:{name:"HLUSD",symbol:"HLUSD",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.helachain.com"]}},blockExplorers:{default:{name:"Hela explorer",url:"https://mainnet-blockexplorer.helachain.com"}},testnet:!1}),bB=p({id:42e3,name:"Helios Testnet",network:"helios-testnet",nativeCurrency:{symbol:"HLS",name:"Helios",decimals:18},rpcUrls:{default:{http:["https://testnet1.helioschainlabs.org"]}},blockExplorers:{default:{name:"Helios Testnet Explorer",url:"https://explorer.helioschainlabs.org/"}},testnet:!0}),yB=p({id:43111,name:"Hemi",network:"Hemi",blockTime:12e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.hemi.xyz"}},testnet:!1}),gB=p({id:743111,name:"Hemi Sepolia",network:"Hemi Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"Hemi Sepolia explorer",url:"https://testnet.explorer.hemi.xyz"}},testnet:!0}),xB=p({id:68414,name:"Henesys",nativeCurrency:{name:"NEXPACE",symbol:"NXPC",decimals:18},rpcUrls:{default:{http:["https://henesys-rpc.msu.io"]}},blockExplorers:{default:{name:"Avalanche Explorer",url:"https://subnets.avax.network/henesys"}}}),wB=p({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",apiUrl:"https://api-holesky.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:4295055}},testnet:!0}),vB=p({id:560048,name:"Hoodi",nativeCurrency:{name:"Hoodi Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.ethpandaops.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.etherscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2589}},testnet:!0}),EB=p({id:269,name:"High Performance Blockchain",nativeCurrency:{name:"HPB",symbol:"HPB",decimals:18},rpcUrls:{default:{http:["https://hpbnode.com"]}},blockExplorers:{default:{name:"hpbScan",url:"https://hscan.org"}},testnet:!1}),kB=p({id:190415,name:"HPP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.hpp.io"],webSocket:["wss://mainnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Mainnet Explorer",url:"https://explorer.hpp.io"}},testnet:!1}),CB=p({id:181228,name:"HPP Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.hpp.io"],webSocket:["wss://testnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Sepolia Explorer",url:"https://sepolia-explorer.hpp.io"}},testnet:!0}),TB=p({id:12323,name:"Huddle01 dRTC Chain",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle01.calderachain.xyz/http"],webSocket:["wss://huddle01.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle01.calderaexplorer.xyz",apiUrl:"https://huddle01.calderaexplorer.xyz/api"}},sourceId:42161}),AB=p({id:2524852,name:"Huddle01 dRTC Chain Testnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle-testnet.rpc.caldera.xyz/http"],webSocket:["wss://huddle-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle-testnet.explorer.caldera.xyz",apiUrl:"https://huddle-testnet.explorer.caldera.xyz/api"}},sourceId:421614}),SB=p({id:6985385,name:"Humanity",nativeCurrency:{name:"H",symbol:"H",decimals:18},rpcUrls:{default:{http:["https://humanity-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Humanity Mainnet Explorer",url:"https://humanity-mainnet.explorer.alchemy.com",apiUrl:"https://humanity-mainnet.explorer.alchemy.com/api"}},testnet:!1}),PB=p({id:7080969,name:"Humanity Testnet",nativeCurrency:{name:"tHP",symbol:"tHP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.humanity.org"]}},blockExplorers:{default:{name:"Humanity Testnet Explorer",url:"https://humanity-testnet.explorer.alchemy.com",apiUrl:"https://humanity-testnet.explorer.alchemy.com/api"}},testnet:!0}),IB=p({id:5234,name:"Humanode",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.mainnet.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.mainnet.stages.humanode.io"]}},blockExplorers:{default:{name:"Subscan",url:"https://humanode.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4413097}}}),BB=p({id:14853,name:"Humanode Testnet 5",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.testnet5.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.testnet5.stages.humanode.io"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),FB=p({id:2911,name:"HYCHAIN",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://explorer.hychain.com"}},testnet:!1}),OB=p({id:29112,name:"HYCHAIN Testnet",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://testnet-rpc.hychain.com/http"}},testnet:!0}),m6=p({id:999,name:"HyperEVM",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},blockExplorers:{default:{name:"HyperEVMScan",url:"https://hyperevmscan.io"}},rpcUrls:{default:{http:["https://rpc.hyperliquid.xyz/evm"]}},testnet:!1}),UB=p({id:998,name:"Hyperliquid EVM Testnet",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},rpcUrls:{default:{http:["https://rpc.hyperliquid-testnet.xyz/evm"]}},testnet:!0}),DB=p({id:73115,name:"ICB Network",nativeCurrency:{decimals:18,name:"ICB Native Token",symbol:"ICBX"},rpcUrls:{default:{http:["https://rpc1-mainnet.icbnetwork.info"]}},blockExplorers:{default:{name:"ICB Explorer",url:"https://icbscan.io",apiUrl:"https://icbscan.io/api"}},testnet:!1}),_B=p({id:74,name:"IDChain Mainnet",nativeCurrency:{decimals:18,name:"EIDI",symbol:"EIDI"},rpcUrls:{default:{http:["https://idchain.one/rpc"],webSocket:["wss://idchain.one/ws"]}},blockExplorers:{default:{name:"IDChain Explorer",url:"https://explorer.idchain.one"}},testnet:!1}),MB=p({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",apiUrl:"https://explorer.immutable.com/api"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),NB=p({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}),LB=p({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}}}),zB=p({id:7233,name:"InitVerse Mainnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-mainnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseScan",url:"https://www.iniscan.com",apiUrl:"https://explorer-api.inichain.com/api"}},contracts:{multicall3:{address:"0x83466BE48A067115FFF91f7b892Ed1726d032e47",blockCreated:2318}}}),RB=p({id:7234,name:"InitVerse Genesis Testnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-testnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseGenesisScan",url:"https://genesis-testnet.iniscan.com",apiUrl:"https://explorer-testnet-api.inichain.com/api"}},contracts:{multicall3:{address:"0x0cF32CBDd6c437331EA4f85ed2d881A5379B5a6F",blockCreated:16361}},testnet:!0}),HB=p({id:1776,name:"Injective",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://sentry.evm-rpc.injective.network"],webSocket:["wss://sentry.evm-ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://blockscout.injective.network",apiUrl:"https://blockscout.injective.network/api"}},testnet:!1}),$B=p({id:1439,name:"Injective Testnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://k8s.testnet.json-rpc.injective.network"],webSocket:["wss://k8s.testnet.ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://testnet.blockscout.injective.network",apiUrl:"https://testnet.blockscout.injective.network/api"}},testnet:!0}),Kl=1,GB=p({...V,id:57073,name:"Ink",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel.inkonchain.com","https://rpc-qnd.inkonchain.com"],webSocket:["wss://rpc-gel.inkonchain.com","wss://rpc-qnd.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.inkonchain.com",apiUrl:"https://explorer.inkonchain.com/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},...V.contracts,disputeGameFactory:{[Kl]:{address:"0x10d7b35078d3baabb96dd45a9143b94be65b12cd"}},portal:{[Kl]:{address:"0x5d66c1782664115999c47c9fa5cd031f495d3e4f"}},l1StandardBridge:{[Kl]:{address:"0x88ff1e5b602916615391f55854588efcbb7663f0"}}},testnet:!1,sourceId:Kl}),Yl=11155111,jB=p({...V,id:763373,name:"Ink Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel-sepolia.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer-sepolia.inkonchain.com/",apiUrl:"https://explorer-sepolia.inkonchain.com/api/v2"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[Yl]:{address:"0x860e626c700af381133d9f4af31412a2d1db3d5d"}},portal:{[Yl]:{address:"0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7"}},l1StandardBridge:{[Yl]:{address:"0x33f60714bbd74d62b66d79213c348614de51901c"}}},testnet:!0,sourceId:Yl}),VB=p({id:8822,name:"IOTA EVM",network:"iotaevm",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.iota.org",apiUrl:"https://explorer.evm.iota.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25022}}}),WB=p({id:1075,name:"IOTA EVM Testnet",network:"iotaevm-testnet",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.testnet.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.testnet.iotaledger.net",apiUrl:"https://explorer.evm.testnet.iotaledger.net/api"}},testnet:!0}),qB=p({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}}}),KB=p({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"}},contracts:{multicall3:{address:"0xb5cecD6894c6f473Ec726A176f1512399A2e355d",blockCreated:24347592}},testnet:!0}),YB=p({id:8017,name:"iSunCoin Mainnet",nativeCurrency:{decimals:18,name:"ISC",symbol:"ISC"},rpcUrls:{default:{http:["https://mainnet.isuncoin.com"]}},blockExplorers:{default:{name:"iSunCoin Explorer",url:"https://baifa.io/app/chains/8017"}}}),ZB=p({id:680,name:"Jasmy Chain",network:"jasmyChain",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc.jasmychain.io"],webSocket:["wss://rpc.jasmychain.io"]}},testnet:!1}),XB=p({id:681,name:"Jasmy Chain Testnet",network:"jasmyChainTestnet",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc_testnet.jasmychain.io"],webSocket:["wss://rpc_testnet.jasmychain.io"]}},testnet:!0}),QB=p({id:8899,name:"JB Chain",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{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}),JB=p({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}),eF=p({id:81,name:"Japan Open Chain Mainnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Token",symbol:"JOC"},rpcUrls:{default:{http:["https://rpc-1.japanopenchain.org:8545","https://rpc-2.japanopenchain.org:8545","https://rpc-3.japanopenchain.org"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.japanopenchain.org"}},testnet:!1}),tF=p({id:10081,name:"Japan Open Chain Testnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Testnet Token",symbol:"JOCT"},rpcUrls:{default:{http:["https://rpc-1.testnet.japanopenchain.org:8545","https://rpc-2.testnet.japanopenchain.org:8545","https://rpc-3.testnet.japanopenchain.org"]}},blockExplorers:{default:{name:"Testnet Block Explorer",url:"https://explorer.testnet.japanopenchain.org"}},testnet:!0}),rF=p({id:5734951,name:"Jovay Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.jovay.io"]}},blockExplorers:{default:{name:"Jovay Explorer",url:"https://explorer.jovay.io/l2"}},testnet:!1}),nF=p({id:2019775,name:"Jovay Sepolia Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://api.zan.top/public/jovay-testnet"]}},blockExplorers:{default:{name:"Jovay Testnet Explorer",url:"https://sepolia-explorer.jovay.io/l2"}},testnet:!0}),sF=p({id:45003,name:"Juneo JUNE-Chain",nativeCurrency:{decimals:18,name:"JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/2",apiUrl:"https://juneoscan.io/chain/2/api"}}}),aF=p({id:45013,name:"Juneo BCH1-Chain",nativeCurrency:{decimals:18,name:"Juneo BCH1-Chain",symbol:"BCH1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/BCH1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/12",apiUrl:"https://juneoscan.io/chain/12/api"}}}),oF=p({id:45004,name:"Juneo DAI1-Chain",nativeCurrency:{decimals:18,name:"Juneo DAI1-Chain",symbol:"DAI1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DAI1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/5",apiUrl:"https://juneoscan.io/chain/5/api"}}}),iF=p({id:45010,name:"Juneo DOGE1-Chain",nativeCurrency:{decimals:18,name:"Juneo DOGE1-Chain",symbol:"DOGE1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DOGE1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/10",apiUrl:"https://juneoscan.io/chain/10/api"}}}),cF=p({id:45011,name:"Juneo EUR1-Chain",nativeCurrency:{decimals:18,name:"Juneo EUR1-Chain",symbol:"EUR1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/EUR1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/6",apiUrl:"https://juneoscan.io/chain/6/api"}}}),lF=p({id:45008,name:"Juneo GLD1-Chain",nativeCurrency:{decimals:18,name:"Juneo GLD1-Chain",symbol:"GLD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/GLD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/8",apiUrl:"https://juneoscan.io/chain/8/api"}}}),uF=p({id:45014,name:"Juneo LINK1-Chain",nativeCurrency:{decimals:18,name:"Juneo LINK1-Chain",symbol:"LINK1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LINK1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/13",apiUrl:"https://juneoscan.io/chain/13/api"}}}),dF=p({id:45009,name:"Juneo LTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo LTC1-Chain",symbol:"LTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/11",apiUrl:"https://juneoscan.io/chain/11/api"}}}),pF=p({id:45007,name:"Juneo mBTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo mBTC1-Chain",symbol:"mBTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/mBTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/9",apiUrl:"https://juneoscan.io/chain/9/api"}}}),fF=p({id:45012,name:"Juneo SGD1-Chain",nativeCurrency:{decimals:18,name:"Juneo SGD1-Chain",symbol:"SGD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/SGD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/7",apiUrl:"https://juneoscan.io/chain/7/api"}}}),mF=p({id:101003,name:"Socotra JUNE-Chain",nativeCurrency:{decimals:18,name:"Socotra JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.socotra-testnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://socotra.juneoscan.io/chain/2",apiUrl:"https://socotra.juneoscan.io/chain/2/api"}},testnet:!0}),hF=p({id:45006,name:"Juneo USD1-Chain",nativeCurrency:{decimals:18,name:"Juneo USD1-Chain",symbol:"USD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/4",apiUrl:"https://juneoscan.io/chain/4/api"}}}),bF=p({id:45005,name:"Juneo USDT1-Chain",nativeCurrency:{decimals:18,name:"Juneo USDT1-Chain",symbol:"USDT1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USDT1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/3",apiUrl:"https://juneoscan.io/chain/3/api"}}}),yF=p({id:8217,name:"Kaia",nativeCurrency:{decimals:18,name:"Kaia",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kaiascan.io",apiUrl:"https://api-cypress.klaytnscope.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),gF=p({id:1001,name:"Kairos Testnet",network:"kairos",nativeCurrency:{decimals:18,name:"Kairos KAIA",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en-kairos.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kairos.kaiascan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),xF=p({id:1802203764,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}),wF=p({id:920637907288165,name:"Kakarot Starknet 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}),vF=p({id:24,name:"KardiaChain Mainnet",nativeCurrency:{name:"KAI",symbol:"KAI",decimals:18},rpcUrls:{default:{http:["https://rpc.kardiachain.io"]}},blockExplorers:{default:{name:"KardiaChain Explorer",url:"https://explorer.kardiachain.io"}},testnet:!1}),EF=p({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{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}),kF=p({id:747474,name:"Katana",network:"katana",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katana.network"]}},blockExplorers:{default:{name:"katana explorer",url:"https://katanascan.com"}},testnet:!1}),CF=p({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}),TF=p({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}),AF=p({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),SF=p({id:1336,name:"Kii Testnet Oro",network:"kii-testnet-oro",nativeCurrency:{name:"Kii",symbol:"KII",decimals:18},rpcUrls:{default:{http:["https://json-rpc.uno.sentry.testnet.v3.kiivalidator.com"]}},blockExplorers:{default:{name:"KiiExplorer",url:"https://explorer.kiichain.io/testnet"}},testnet:!0}),PF=p({id:7887,name:"Kinto Mainnet",network:"Kinto Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.kinto.xyz/http"]}},blockExplorers:{default:{name:"Kinto Explorer",url:"https://explorer.kinto.xyz"}},testnet:!1}),IF=p({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}}}),BF=p({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}),FF=p({id:701,name:"Koi Network",nativeCurrency:{decimals:18,name:"Koi Network Native Token",symbol:"KRING"},rpcUrls:{default:{http:["https://koi-rpc.darwinia.network"],webSocket:["wss://koi-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://koi-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:180001}},testnet:!0}),OF=p({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:16054868}},testnet:!1}),UF=p({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8900914}},testnet:!0}),DF=p({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}),_F=p({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}),MF=p({id:360890,name:"LAVITA Mainnet",nativeCurrency:{name:"vTFUEL",symbol:"vTFUEL",decimals:18},rpcUrls:{default:{http:["https://tsub360890-eth-rpc.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"LAVITA Explorer",url:"https://tsub360890-explorer.thetatoken.org"}},testnet:!1}),NF=p({id:232,name:"Lens",nativeCurrency:{name:"GHO",symbol:"GHO",decimals:18},rpcUrls:{default:{http:["https://rpc.lens.xyz"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://explorer.lens.xyz",apiUrl:"https://explorer.lens.xyz/api"}}}),LF=p({id:37111,name:"Lens Testnet",nativeCurrency:{name:"GRASS",symbol:"GRASS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.lens.dev"],webSocket:["wss://rpc.testnet.lens.dev/ws"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://block-explorer.testnet.lens.dev",apiUrl:"https://block-explorer-api.staging.lens.dev/api"}},testnet:!0}),zF=p({id:21363,name:"Lestnet",nativeCurrency:{name:"Lestnet Ether",symbol:"LETH",decimals:18},rpcUrls:{default:{http:["https://service.lestnet.org"]}},blockExplorers:{default:{name:"Lestnet Explorer",url:"https://explore.lestnet.org"}},testnet:!0}),RF=p({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"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:127188532}},testnet:!0}),HF=p({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"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:125499184}},testnet:!1});async function $F(e,t){var s,a,o;const{account:r=e.account}=t;if(!r)throw new On;const n=Ze(r);try{const{accessList:i,blockNumber:c,blockTag:l,data:u,gas:d,gasPrice:f,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:g,to:E,value:v,...w}=t,T=(typeof c=="bigint"?q(c):void 0)||l;sn(t);const O=(o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionRequest)==null?void 0:o.format,I=(O||Lr)({...Xs(w,{format:O}),account:n,accessList:i,data:u,gas:d,gasPrice:f,maxFeePerGas:m,maxPriorityFeePerGas:b,nonce:g,to:E,value:v},"estimateGas"),{baseFeePerGas:h,gasLimit:y,priorityFeePerGas:x}=await e.request({method:"linea_estimateGas",params:T?[I,T]:[I]});return{baseFeePerGas:BigInt(h),gasLimit:BigInt(y),priorityFeePerGas:BigInt(x)}}catch(i){throw Vp(i,{...t,account:n,chain:e.chain})}}const Qf={fees:{estimateFeesPerGas:h6,async maxPriorityFeePerGas({block:e,client:t,request:r}){const n=await h6({block:e,client:t,multiply:s=>s,request:r,type:"eip1559"});return n!=null&&n.maxPriorityFeePerGas?n.maxPriorityFeePerGas:null}}};async function h6({client:e,multiply:t,request:r,type:n}){try{const s=await $F(e,{...r,account:r==null?void 0:r.account}),{priorityFeePerGas:a}=s,i=t(BigInt(s.baseFeePerGas))+a;return n==="legacy"?{gasPrice:i}:{maxFeePerGas:i,maxPriorityFeePerGas:a}}catch{return null}}const GF=p({...Qf,id:59144,name:"Linea Mainnet",blockTime:2e3,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},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),jF=p({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}),VF=p({...Qf,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},ensRegistry:{address:"0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7",blockCreated:2395094},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:17168484}},ensTlds:[".linea.eth"],testnet:!0}),WF=p({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}),Zl=1,qF=p({...V,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:{...V.contracts,multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"},l2OutputOracle:{[Zl]:{address:"0x113cB99283AF242Da0A0C54347667edF531Aa7d6"}},portal:{[Zl]:{address:"0x26dB93F8b8b4f7016240af62F7730979d353f9A7"}},l1StandardBridge:{[Zl]:{address:"0x2658723Bf70c7667De6B25F99fcce13A16D25d08"}}},sourceId:Zl}),Xl=11155111,KF=p({...V,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:{...V.contracts,l2OutputOracle:{[Xl]:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Xl]:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{[Xl]:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:Xl}),YF=p({id:9496,name:"Load Alphanet",nativeCurrency:{name:"Testnet LOAD",symbol:"tLOAD",decimals:18},rpcUrls:{default:{http:["https://alphanet.load.network"]}},blockExplorers:{default:{name:"Load Alphanet Explorer",url:"https://explorer.load.network"}},testnet:!0}),ZF=p({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),XF=p({id:15551,name:"LoopNetwork Mainnet",nativeCurrency:{name:"LOOP",symbol:"LOOP",decimals:18},rpcUrls:{default:{http:["https://api.mainnetloop.com"]}},blockExplorers:{default:{name:"LoopNetwork Blockchain Explorer",url:"https://explorer.mainnetloop.com/"}},testnet:!1}),QF=p({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}}}),JF=p({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}),eO=p({id:994873017,name:"Lumia Mainnet",network:"LumiaMainnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Explorer",url:"https://explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3975939}},testnet:!1}),tO=p({id:1952959480,name:"Lumia Testnet",network:"LumiaTestnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Testnet Explorer",url:"https://testnet-explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2235063}},testnet:!0}),rO=p({id:96370,name:"Lumoz",nativeCurrency:{decimals:18,name:"Lumoz Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://rpc.lumoz.org"]}},blockExplorers:{default:{name:"Lumoz Scan",url:"https://scan.lumoz.info"}},testnet:!1}),nO=p({id:105363,name:"Lumoz Testnet",nativeCurrency:{decimals:18,name:"Lumoz Testnet Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://testnet-rpc.lumoz.org"]}},testnet:!0}),sO=p({id:721,name:"Lycan",nativeCurrency:{decimals:18,name:"Lycan",symbol:"LYC"},rpcUrls:{default:{http:["https://rpc.lycanchain.com","https://us-east.lycanchain.com","https://us-west.lycanchain.com","https://eu-north.lycanchain.com","https://eu-west.lycanchain.com","https://asia-southeast.lycanchain.com"],webSocket:["wss://rpc.lycanchain.com","wss://us-east.lycanchain.com","wss://us-west.lycanchain.com","wss://eu-north.lycanchain.com","wss://eu-west.lycanchain.com","wss://asia-southeast.lycanchain.com"]}},blockExplorers:{default:{name:"Lycan Explorer",url:"https://explorer.lycanchain.com"}}}),aO=p({id:957,name:"Lyra Chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.lyra.finance"]}},blockExplorers:{default:{name:"Lyra Explorer",url:"https://explorer.lyra.finance",apiUrl:"https://explorer.lyra.finance/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1935198}}}),oO=p({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),iO=p({id:595,name:"Mandala TC9",network:"mandala",nativeCurrency:{name:"Mandala",symbol:"mACA",decimals:18},rpcUrls:{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}),cO=p({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}}}),lO=p({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}),uO=p({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}),dO=p({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}}}),pO=p({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}),fO=p({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}),mO=p({id:5887,name:"MANTRA DuKong EVM Testnet",nativeCurrency:{decimals:18,name:"MANTRA",symbol:"MANTRA"},rpcUrls:{default:{http:["https://evm.dukong.mantrachain.io"]}},blockExplorers:{default:{name:"MANTRAScan",url:"https://mantrascan.io/dukong"}},testnet:!0}),hO=p({id:5888,name:"MANTRA EVM",nativeCurrency:{decimals:18,name:"OM",symbol:"OM"},rpcUrls:{default:{http:["https://evm.mantrachain.io"],webSocket:["https://evm.mantrachain.io/ws"]}},blockExplorers:{default:{name:"MANTRA Scan",url:"https://mantrascan.io/mainnet"}}}),bO=p({id:22776,name:"MAP Protocol",nativeCurrency:{decimals:18,name:"MAPO",symbol:"MAPO"},rpcUrls:{default:{http:["https://rpc.maplabs.io"]}},blockExplorers:{default:{name:"MAPO Scan",url:"https://maposcan.io"}},testnet:!1}),yO=p({id:698,name:"Matchain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://matchscan.io"}}}),gO=p({id:699,name:"Matchain Testnet",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://testnet.matchscan.io"}},testnet:!0}),xO=p({id:29548,name:"MCH Verse",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.oasys.mycryptoheroes.net"]}},blockExplorers:{default:{name:"MCH Verse Explorer",url:"https://explorer.oasys.mycryptoheroes.net",apiUrl:"https://explorer.oasys.mycryptoheroes.net/api"}},testnet:!1}),wO=p({id:6342,blockTime:1e3,name:"MegaETH Testnet",nativeCurrency:{name:"MegaETH Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://carrot.megaeth.com/rpc"],webSocket:["wss://carrot.megaeth.com/ws"]}},blockExplorers:{default:{name:"MegaETH Testnet Explorer",url:"https://www.megaexplorer.xyz/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),vO=p({id:7078815900,name:"Mekong Pectra Devnet",nativeCurrency:{name:"eth",symbol:"eth",decimals:18},rpcUrls:{default:{http:["https://rpc.mekong.ethpandaops.io"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.mekong.ethpandaops.io"}},testnet:!0}),EO=p({id:333000333,name:"Meld",nativeCurrency:{decimals:18,name:"Meld",symbol:"MELD"},rpcUrls:{default:{http:["https://rpc-1.meld.com"]}},blockExplorers:{default:{name:"MELDscan",url:"https://meldscan.io"}},contracts:{multicall3:{address:"0x769ee5a8e82c15c1b6e358f62ac8eb6e3abe8dc5",blockCreated:360069}}}),kO=p({id:4352,name:"MemeCore",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.memecore.net"],webSocket:["wss://ws.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Explorer",url:"https://memecorescan.io",apiUrl:"https://api.memecorescan.io/api"},okx:{name:"MemeCore Explorer",url:"https://web3.okx.com/explorer/memecore"},memecore:{name:"MemeCore Explorer",url:"https://blockscout.memecore.com",apiUrl:"https://blockscout.memecore.com/api"}}}),CO=p({id:43521,name:"Formicarium",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.formicarium.memecore.net"],webSocket:["wss://ws.formicarium.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Testnet Explorer",url:"https://formicarium.memecorescan.io"},okx:{name:"MemeCore Testnet Explorer",url:"https://web3.okx.com/explorer/formicarium-testnet"},memecore:{name:"MemeCore Testnet Explorer",url:"https://formicarium.blockscout.memecore.com",apiUrl:"https://formicarium.blockscout.memecore.com/api"}},testnet:!0}),TO=p({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"}}}),AO=p({id:4203,name:"Merlin Erigon Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-erigon-rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-erigon-scan.merlinchain.io",apiUrl:"https://testnet-erigon-scan.merlinchain.io/api"}},testnet:!0}),SO=p({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}}}),PO=p({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}),IO=p({id:11,name:"Metadium Network",nativeCurrency:{decimals:18,name:"META",symbol:"META"},rpcUrls:{default:{http:["https://api.metadium.com/prod"]}},blockExplorers:{default:{name:"Metadium Explorer",url:"https://explorer.metadium.com"}},testnet:!1}),Ql=1,BO=p({...V,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:{...V.contracts,l2OutputOracle:{[Ql]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[Ql]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[Ql]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:Ql}),FO=p({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"}}}),OO=p({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"}}}),UO=p({id:1088,name:"Metis",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://metis.rpc.hypersync.xyz","https://metis-pokt.nodies.app","https://api.blockeden.xyz/metis/67nCBdZQSH9z3YqDDjdm","https://metis-andromeda.rpc.thirdweb.com","https://metis-andromeda.gateway.tenderly.co","https://metis.api.onfinality.io/public","https://andromeda.metis.io/?owner=1088","https://metis-mainnet.public.blastapi.io"],webSocket:["wss://metis-rpc.publicnode.com","wss://metis.drpc.org"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}}),DO=p({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}}}),_O=p({id:59902,name:"Metis Sepolia",nativeCurrency:{decimals:18,name:"Test Metis",symbol:"tMETIS"},rpcUrls:{default:{http:["https://sepolia.metisdevops.link","https://metis-sepolia-rpc.publicnode.com","https://metis-sepolia.gateway.tenderly.co"],webSocket:["wss://metis-sepolia-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Metis Sepolia Explorer",url:"https://sepolia-explorer.metisdevops.link",apiUrl:"https://sepolia-explorer.metisdevops.link/api-docs"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:224185}}}),MO=p({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}}}),NO=p({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}),LO=p({id:185,name:"Mint Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain explorer",url:"https://explorer.mintchain.io"}},testnet:!1}),zO=p({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}),RO=p({id:124832,name:"Mitosis Testnet",nativeCurrency:{name:"MITO",symbol:"MITO",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.mitosis.org"]}},blockExplorers:{default:{name:"Mitosis testnet explorer",url:"https://testnet.mitosiscan.xyz"}},testnet:!0}),Jl=1,HO=p({...V,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:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882},l2OutputOracle:{[Jl]:{address:"0x4317ba146D4933D889518a3e5E11Fe7a53199b04"}},portal:{[Jl]:{address:"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07"}},l1StandardBridge:{[Jl]:{address:"0x735aDBbE72226BD52e818E7181953f42E3b0FF21"}}},sourceId:Jl}),eu=11155111,$O=p({...V,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:{...V.contracts,l2OutputOracle:{[eu]:{address:"0x2634BD65ba27AB63811c74A63118ACb312701Bfa",blockCreated:3778393}},portal:{[eu]:{address:"0x320e1580effF37E008F1C92700d1eBa47c1B23fD",blockCreated:3778395}},l1StandardBridge:{[eu]:{address:"0xbC5C679879B2965296756CD959C3C739769995E2",blockCreated:3778392}},multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:eu}),GO=p({id:143,name:"Monad",blockTime:400,nativeCurrency:{name:"Monad",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://rpc.monad.xyz","https://rpc1.monad.xyz"],webSocket:["wss://rpc.monad.xyz","wss://rpc1.monad.xyz"]}},blockExplorers:{default:{name:"MonadVision",url:"https://monadvision.com"},monadscan:{name:"Monadscan",url:"https://monadscan.com",apiUrl:"https://api.monadscan.com/api"}},testnet:!1,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:9248132}}}),jO=p({id:10143,name:"Monad Testnet",blockTime:400,nativeCurrency:{name:"Testnet MON Token",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.monad.xyz"]}},blockExplorers:{default:{name:"Monad Testnet explorer",url:"https://testnet.monadexplorer.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:251449}},testnet:!0}),VO=p({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}),WO=p({id:1284,name:"Moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{default:{http:["https://rpc.api.moonbeam.network"],webSocket:["wss://wss.api.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io",apiUrl:"https://api-moonbeam.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),qO=p({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"]}}}),KO=p({id:1285,name:"Moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{default:{http:["https://rpc.api.moonriver.moonbeam.network"],webSocket:["wss://wss.api.moonriver.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io",apiUrl:"https://api-moonriver.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1}),YO=p({id:2818,name:"Morph",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.morphl2.io"],webSocket:["wss://rpc.morphl2.io:8443"]}},blockExplorers:{default:{name:"Morph Explorer",url:"https://explorer.morphl2.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3654913}},testnet:!1}),ZO=p({id:2810,name:"Morph Holesky",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-quicknode-holesky.morphl2.io"],webSocket:["wss://rpc-quicknode-holesky.morphl2.io"]}},blockExplorers:{default:{name:"Morph Holesky Explorer",url:"https://explorer-holesky.morphl2.io",apiUrl:"https://explorer-api-holesky.morphl2.io/api?"}},testnet:!0}),XO=p({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}),QO=p({id:5551,name:"Nahmii 2 Mainnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://l2.nahmii.io"]}},blockExplorers:{default:{name:"Nahmii 2 Explorer",url:"https://explorer.n2.nahmii.io"}},testnet:!1}),JO=p({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"}}}),eU=p({id:397,name:"NEAR Protocol",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.mainnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer.near.org"}},testnet:!1}),tU=p({id:398,name:"NEAR Protocol Testnet",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.testnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer-testnet.near.org"}},testnet:!0}),rU=p({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}),nU=p({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}),sU=p({id:47763,name:"Neo X Mainnet",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://mainnet-1.rpc.banelabs.org","https://mainnet-2.rpc.banelabs.org"]}},blockExplorers:{default:{name:"Neo X - Explorer",url:"https://xexplorer.neo.org"}},testnet:!1}),aU=p({id:12227332,name:"Neo X Testnet T4",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.banelabs.org/"]}},blockExplorers:{default:{name:"neox-scan",url:"https://xt4scan.ngd.network"}},testnet:!0}),oU=p({id:1012,name:"Newton",nativeCurrency:{name:"Newton",symbol:"NEW",decimals:18},rpcUrls:{default:{http:["https://global.rpc.mainnet.newtonproject.org"]}},blockExplorers:{default:{name:"NewFi explorer",url:"https://explorer.newtonproject.org/"}},testnet:!1}),iU=p({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}}}),cU=p({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}}}),lU=p({id:6900,name:"Nibiru",nativeCurrency:{decimals:18,name:"NIBI",symbol:"NIBI"},rpcUrls:{default:{http:["https://evm-rpc.nibiru.fi"]}},blockExplorers:{default:{name:"NibiScan",url:"https://nibiscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:19587573}}}),uU=p({id:200024,name:"Nitrograph Testnet",testnet:!0,rpcUrls:{default:{http:["https://rpc-testnet.nitrograph.foundation"]}},nativeCurrency:{name:"Nitro",symbol:"NOS",decimals:18},blockExplorers:{default:{url:"https://explorer-testnet.nitrograph.foundation",name:"Nitrograph Explorer"}}}),dU=p({id:166,name:"Nomina",nativeCurrency:{name:"Nomina",symbol:"NOM",decimals:18},rpcUrls:{default:{http:["https://mainnet.nomina.io"],webSocket:["wss://mainnet.nomina.io"]}},blockExplorers:{default:{name:"Nomina Explorer",url:"https://nomscan.io"}},testnet:!1}),pU=p({id:4090,network:"oasis-testnet",name:"Oasis Testnet",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.oasis.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://oasis.ftnscan.com",apiUrl:"https://oasis.ftnscan.com/api"}},testnet:!0}),fU=p({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"}}}),mU=p({id:911867,name:"Odyssey Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://odyssey.ithaca.xyz"]}},blockExplorers:{default:{name:"Odyssey Explorer",url:"https://odyssey-explorer.ithaca.xyz",apiUrl:"https://odyssey-explorer.ithaca.xyz/api"}},testnet:!0}),hU=p({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}}}),bU=p({id:311,name:"Omax Mainnet",nativeCurrency:{decimals:18,name:"OMAX",symbol:"OMAX"},rpcUrls:{default:{http:["https://mainapi.omaxray.com"]}},blockExplorers:{default:{name:"Omax Explorer",url:"https://omaxscan.com"}},testnet:!1}),yU=p({id:166,name:"Omni",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://mainnet.omni.network"],webSocket:["wss://mainnet.omni.network"]}},blockExplorers:{default:{name:"OmniScan",url:"https://omniscan.network"}},testnet:!1}),gU=p({id:164,name:"Omni Omega",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://omega.omni.network"],webSocket:["wss://omega.omni.network"]}},blockExplorers:{default:{name:"Omega OmniScan",url:"https://omega.omniscan.network/"}},testnet:!0}),xU=p({id:309075,name:"One World Chain Mainnet",nativeCurrency:{decimals:18,name:"OWCT",symbol:"OWCT"},rpcUrls:{default:{http:["https://mainnet-rpc.oneworldchain.org"]}},blockExplorers:{default:{name:"One World Explorer",url:"https://mainnet.oneworldchain.org"}},testnet:!1}),wU=p({id:9700,name:"OORT MainnetDev",nativeCurrency:{decimals:18,name:"OORT",symbol:"OORT"},rpcUrls:{default:{http:["https://dev-rpc.oortech.com"]}},blockExplorers:{default:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"}}}),tu=56,vU=p({id:204,name:"opBNB",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://opbnb-mainnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opBNB (BSCScan)",url:"https://opbnb.bscscan.com",apiUrl:"https://api-opbnb.bscscan.com/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881},l2OutputOracle:{[tu]:{address:"0x153CAB79f4767E2ff862C94aa49573294B13D169"}},portal:{[tu]:{address:"0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"}},l1StandardBridge:{[tu]:{address:"0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"}}},sourceId:tu}),ru=97,EU=p({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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108},l2OutputOracle:{[ru]:{address:"0xFf2394Bb843012562f4349C6632a0EcB92fC8810"}},portal:{[ru]:{address:"0x4386C8ABf2009aC0c263462Da568DD9d46e52a31"}},l1StandardBridge:{[ru]:{address:"0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840"}}},testnet:!0,sourceId:ru}),kU=p({id:1612,name:"OpenLedger",nativeCurrency:{name:"Open",symbol:"OPEN",decimals:18},rpcUrls:{default:{http:["https://rpc.openledger.xyz"]}},blockExplorers:{default:{name:"OpenLedger Explorer",url:"https://scan.openledger.xyz"}},testnet:!1}),Ri=1,CU=p({...V,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:{...V.contracts,disputeGameFactory:{[Ri]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Ri]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Ri]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Ri]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:Ri}),nu=5,TU=p({...V,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:{...V.contracts,l2OutputOracle:{[nu]:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{[nu]:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{[nu]:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:nu}),Hi=11155111,AU=p({...V,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:{...V.contracts,disputeGameFactory:{[Hi]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[Hi]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[Hi]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[Hi]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:Hi}),SU=p({id:62050,name:"Optopia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan.optopia.ai"}},testnet:!1}),PU=p({id:62049,name:"Optopia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan-testnet.optopia.ai"}},testnet:!0}),IU=p({id:291,name:"Orderly",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.orderly.network"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorer.orderly.network"}},testnet:!1}),BU=p({id:4460,name:"Orderly Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorerl2new-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"}},testnet:!0}),FU=p({id:41144114,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),OU=p({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}}}),UU=p({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}),DU=p({id:3338,name:"Peaq",nativeCurrency:{decimals:18,name:"peaq",symbol:"PEAQ"},rpcUrls:{default:{http:["https://quicknode1.peaq.xyz","https://quicknode2.peaq.xyz","https://quicknode3.peaq.xyz"],webSocket:["wss://quicknode1.peaq.xyz","wss://quicknode2.peaq.xyz","wss://quicknode3.peaq.xyz"]}},blockExplorers:{default:{name:"Subscan",url:"https://peaq.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3566354}}}),su=1,_U=p({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"}},contracts:{l2OutputOracle:{[su]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{[su]:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{[su]:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:Kf,sourceId:su}),au=11155111,MU=p({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"}},contracts:{l2OutputOracle:{[au]:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{[au]:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{[au]:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:Kf,sourceId:au,testnet:!0}),NU=p({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}}}),LU=p({id:7070,name:"Planq Mainnet",nativeCurrency:{decimals:18,name:"PLQ",symbol:"PLQ"},rpcUrls:{default:{http:["https://planq-rpc.nodies.app","https://evm-rpc.planq.network","https://jsonrpc.planq.nodestake.top"]}},blockExplorers:{default:{name:"Planq Explorer",url:"https://evm.planq.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8470015}},testnet:!1}),zU=p({id:9745,name:"Plasma",blockTime:1e3,nativeCurrency:{name:"Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://rpc.plasma.to"]}},blockExplorers:{default:{name:"PlasmaScan",url:"https://plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),RU=p({id:9747,name:"Plasma Devnet",nativeCurrency:{name:"Devnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://devnet-rpc.plasma.to"]}},testnet:!0,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),HU=p({id:9746,name:"Plasma Testnet",nativeCurrency:{name:"Testnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plasma.to"]}},blockExplorers:{default:{name:"RouteScan",url:"https://testnet.plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),$U=p({...fr,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}),GU=p({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}}}),jU=p({id:98865,name:"Plume (Legacy)",nativeCurrency:{name:"Plume Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.plumenetwork.xyz"],webSocket:["wss://rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plumenetwork.xyz",apiUrl:"https://explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:48577}},sourceId:1}),VU=p({id:98864,name:"Plume Devnet (Legacy)",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://test-rpc.plumenetwork.xyz"],webSocket:["wss://test-rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://test-explorer.plumenetwork.xyz",apiUrl:"https://test-explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:481948}},testnet:!0,sourceId:11155111}),WU=p({id:98866,name:"Plume",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://rpc.plume.org"],webSocket:["wss://rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plume.org",apiUrl:"https://explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39679}},sourceId:1}),qU=p({id:98867,name:"Plume Testnet",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plume.org"],webSocket:["wss://testnet-rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plume.org",apiUrl:"https://testnet-explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:199712}},testnet:!0,sourceId:11155111}),KU=p({id:161221135,name:"Plume Testnet (Legacy)",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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6022332}},testnet:!0,sourceId:11155111}),YU=p({id:631571,name:"Polter Testnet",nativeCurrency:{decimals:18,name:"Polter GHST",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-polter.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://polter-testnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11245}},testnet:!0}),ZU=p({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),XU=p({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),QU=p({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://80001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),JU=p({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}}}),eD=p({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}}}),tD=p({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}}}),rD=p({id:8008,name:"Polynomial",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://polynomialscan.io"}},testnet:!1,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),nD=p({id:80008,name:"Polynomia Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sepolia.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://sepolia.polynomialscan.io"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),sD=p({id:60603,name:"POTOS Mainnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc.potos.hk"]}},blockExplorers:{default:{name:"POTOS Mainnet explorer",url:"https://scan.potos.hk"}},testnet:!1}),aD=p({id:60600,name:"POTOS Testnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc-testnet.potos.hk"]}},blockExplorers:{default:{name:"POTOS Testnet explorer",url:"https://scan-testnet.potos.hk"}},testnet:!0}),oD=p({id:23023,name:"PremiumBlock Testnet",nativeCurrency:{name:"Premium Block",symbol:"PBLK",decimals:18},rpcUrls:{default:{http:["https://rpc.premiumblock.org"]}},blockExplorers:{default:{name:"PremiumBlocks Explorer",url:"https://scan.premiumblock.org"}},testnet:!0}),iD=p({id:369,name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,blockTime:1e4,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://ipfs.scan.pulsechain.com",apiUrl:"https://api.scan.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),cD=p({id:943,name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},blockTime:1e4,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}}}),lD=p({id:490092,name:"Pumpfi Testnet",nativeCurrency:{decimals:18,name:"PMPT",symbol:"PMPT"},rpcUrls:{default:{http:["https://rpc1testnet.pumpfi.me"]}},blockExplorers:{default:{name:"Pumpfi Testnet Scan",url:"https://testnetscan.pumpfi.me"}},testnet:!0}),b6=11155111,uD=p({...V,name:"Pyrope Testnet",testnet:!0,id:695569,sourceId:b6,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.pyropechain.com"],webSocket:["wss://rpc.pyropechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://pyrope.blockscout.com"}},contracts:{...V.contracts,l1StandardBridge:{[b6]:{address:"0xC24932c31D9621aE9e792576152B7ef010cFC2F8"}}}}),dD=p({id:766,name:"QL1",nativeCurrency:{decimals:18,name:"QOM",symbol:"QOM"},rpcUrls:{default:{http:["https://rpc.qom.one"]}},blockExplorers:{default:{name:"Ql1 Explorer",url:"https://scan.qom.one"}},contracts:{multicall3:{address:"0x7A52370716ea730585884F5BDB0f6E60C39b8C64"}},testnet:!1}),pD=p({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"}}}),fD=p({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}),mD=p({id:9,name:"Quai Network Mainnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Quaiscan",url:"https://quaiscan.io",apiUrl:"https://quaiscan.io/api"}},testnet:!1}),hD=p({id:15e3,name:"Quai Network Testnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://orchard.rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Orchard Quaiscan",url:"https://orchard.quaiscan.io",apiUrl:"https://orchard.quaiscan.io/api"}},testnet:!0}),bD=p({id:5318007,name:"Reactive Lasna Testnet",nativeCurrency:{decimals:18,name:"Lasna React",symbol:"lREACT"},rpcUrls:{default:{http:["https://lasna-rpc.rnk.dev"]}},blockExplorers:{default:{name:"Reactscan",url:"https://lasna.reactscan.net"}},testnet:!0}),yD=p({id:111188,name:"re.al",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.realforreal.gelato.digital"]}},blockExplorers:{default:{name:"re.al Explorer",url:"https://explorer.re.al",apiUrl:"https://explorer.re.al/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:695}}}),gD=p({id:151,name:"Redbelly Network Mainnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.mainnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.routescan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/151/etherscan/api"}},testnet:!1}),xD=p({id:153,name:"Redbelly Network Testnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.testnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.testnet.routescan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/153_2/etherscan/api"}},testnet:!0}),wD=p({id:50342,name:"Reddio",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://mainnet.reddio.com/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://reddio.cloud.blockscout.com",apiUrl:"https://reddio.cloud.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:848849}},testnet:!1}),vD=p({id:50341,name:"Reddio Sepolia",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://reddio-dev.reddio.com"]}},blockExplorers:{default:{name:"Reddioscan",url:"https://reddio-devnet.l2scan.co",apiUrl:"https://reddio-devnet.l2scan.co/api"}},testnet:!0}),ou=1,ED=p({...V,name:"Redstone",id:690,sourceId:ou,nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.redstonechain.com"],webSocket:["wss://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[ou]:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{[ou]:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{[ou]:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}}),kD=p({id:47805,name:"REI Mainnet",nativeCurrency:{decimals:18,name:"REI",symbol:"REI"},rpcUrls:{default:{http:["https://rpc.rei.network"],webSocket:["wss://rpc.rei.network"]}},blockExplorers:{default:{name:"REI Scan",url:"https://scan.rei.network"}},testnet:!1}),CD=p({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}),TD=p({id:11155931,name:"RISE Testnet",nativeCurrency:{name:"RISE Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.riselabs.xyz"],webSocket:["wss://testnet.riselabs.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.testnet.riselabs.xyz/",apiUrl:"https://explorer.testnet.riselabs.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}},testnet:!0}),AD=p({id:753,name:"Rivalz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rivalz.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Rivalz Caldera Explorer",url:"https://rivalz.calderaexplorer.xyz"}},testnet:!1}),SD=p({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}}}),PD=p({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}}}),ID=p({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}}}),BD=p({id:7668,name:"The Root Network",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://root.rootnet.live/archive"],webSocket:["wss://root.rootnet.live/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:9218338}}}),FD=p({id:7672,name:"The Root Network - Porcini",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://porcini.rootnet.app/archive"],webSocket:["wss://porcini.rootnet.app/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://porcini.rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:10555692}},testnet:!0}),OD=p({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}}}),UD=p({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2771150}},testnet:!0}),iu=1,DD=p({...V,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:{...V.contracts,l2OutputOracle:{[iu]:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{[iu]:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:19387057}},l1StandardBridge:{[iu]:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:iu}),cu=11155111,_D=p({...V,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:{...V.contracts,l2OutputOracle:{[cu]:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{[cu]:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{[cu]:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:cu}),MD=p({id:7225878,name:"Saakuru Mainnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.saakuru.network"]}},blockExplorers:{default:{name:"Saakuru Explorer",url:"https://explorer.saakuru.network"}},testnet:!1}),ND=p({id:5464,name:"Saga",network:"saga",nativeCurrency:{decimals:18,name:"gas",symbol:"GAS"},rpcUrls:{default:{http:["https://sagaevm.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Saga Explorer",url:"https://sagaevm.sagaexplorer.io"}},contracts:{multicall3:{address:"0x864DDc9B50B9A0dF676d826c9B9EDe9F8913a160",blockCreated:467530}}}),LD=p({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}),zD=p({id:1996,name:"Sanko",nativeCurrency:{name:"DMT",symbol:"DMT",decimals:18},rpcUrls:{default:{http:["https://mainnet.sanko.xyz"]}},blockExplorers:{default:{name:"Sanko Explorer",url:"https://explorer.sanko.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:37}},testnet:!1}),RD=p({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}}),HD=p({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"}},testnet:!0}),$D=p({id:3109,name:"SatoshiVM Alpha Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://svmscan.io",apiUrl:"https://svmscan.io/api"}}}),GD=p({id:3110,name:"SatoshiVM Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://test-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet.svmscan.io",apiUrl:"https://testnet.svmscan.io/api"}},testnet:!0}),jD=p({id:534352,name:"Scroll",blockTime:3e3,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}),VD=p({id:534351,name:"Scroll Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://sepolia.scrollscan.com",apiUrl:"https://api-sepolia.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9473}},testnet:!0}),WD=p({id:1329,name:"Sei Network",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc.sei-apis.com/"],webSocket:["wss://evm-ws.sei-apis.com/"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com",apiUrl:"https://seitrace.com/pacific-1/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}}}),qD=p({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}),KD=p({id:5124,name:"Seismic Devnet",nativeCurrency:{name:"Seismic Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://node-2.seismicdev.net/rpc"]}},blockExplorers:{default:{name:"Seismic Devnet Explorer",url:"https://explorer-2.seismicdev.net"}},testnet:!0}),YD=p({id:1328,name:"Sei Testnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-testnet.sei-apis.com"],webSocket:["wss://evm-ws-testnet.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:98697651}},testnet:!0}),ZD=p({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0}),lu=1,XD=p({...V,id:360,name:"Shape",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.shape.network"]}},blockExplorers:{default:{name:"shapescan",url:"https://shapescan.xyz",apiUrl:"https://shapescan.xyz/api"}},contracts:{...V.contracts,l2OutputOracle:{[lu]:{address:"0x6Ef8c69CfE4635d866e3E02732068022c06e724D",blockCreated:20369940}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1},portal:{[lu]:{address:"0xEB06fFa16011B5628BaB98E29776361c83741dd3",blockCreated:20369933}},l1StandardBridge:{[lu]:{address:"0x62Edd5f4930Ea92dCa3fB81689bDD9b9d076b57B",blockCreated:20369935}}},sourceId:lu}),QD=p({...V,id:11011,name:"Shape Sepolia Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.shape.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer-sepolia.shape.network/",apiUrl:"https://explorer-sepolia.shape.network/api/v2"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0,sourceId:11155111}),JD=p({id:8118,name:"Shardeum",nativeCurrency:{name:"Shardeum",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://api.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer.shardeum.org"}},testnet:!1}),e_=p({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}),t_=p({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}}}),r_=p({id:157,name:"Puppynet Shibarium",nativeCurrency:{decimals:18,name:"Bone",symbol:"BONE"},rpcUrls:{default:{http:["https://puppynet.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://puppyscan.shib.io",apiUrl:"https://puppyscan.shib.io/api"}},contracts:{multicall3:{address:"0xA4029b74FBA366c926eDFA7Dd10B21C621170a4c",blockCreated:3035769}},testnet:!0}),n_=p({id:336,name:"Shiden",nativeCurrency:{decimals:18,name:"SDN",symbol:"SDN"},rpcUrls:{default:{http:["https://shiden.public.blastapi.io"],webSocket:["wss://shiden-rpc.dwellir.com"]}},blockExplorers:{default:{name:"Shiden Scan",url:"https://shiden.subscan.io"}},testnet:!1}),s_=p({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"}}}),a_=p({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}),o_=p({id:97453,name:"Sidra Chain",nativeCurrency:{decimals:18,name:"Sidra Digital Asset",symbol:"SDA"},rpcUrls:{default:{http:["https://node.sidrachain.com"]}},blockExplorers:{default:{name:"Sidra Chain Explorer",url:"https://ledger.sidrachain.com"}}}),i_=p({id:380929,name:"Silent Data Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.silentdata.com"]}},blockExplorers:{default:{name:"Silent Data Mainnet Explorer",url:"https://explorer-mainnet.rollup.silentdata.com"}},testnet:!1}),c_=p({id:2355,name:"Silicon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.silicon.network","https://silicon-mainnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconScope",url:"https://scope.silicon.network"}}}),l_=p({id:1722641160,name:"Silicon Sepolia zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-sepolia.silicon.network","https://silicon-testnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconSepoliaScope",url:"https://scope-sepolia.silicon.network"}},testnet:!0}),u_=p({id:98,name:"Six Protocol",nativeCurrency:{decimals:18,name:"SIX",symbol:"SIX"},rpcUrls:{default:{http:["https://sixnet-rpc-evm.sixprotocol.net"]}},blockExplorers:{default:{name:"Six Protocol Scan",url:"https://sixscan.io/sixnet"}},testnet:!1}),d_=p({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:{}}),p_=p({id:1564830818,name:"SKALE Calypso 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}}}),f_=p({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}),m_=p({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:{}}),h_=p({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:{}}),b_=p({id:2046399126,name:"SKALE Europa 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}}}),y_=p({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}),g_=p({id:2139927552,name:"Exorde Network",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:{}}),x_=p({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:{}}),w_=p({id:1482601649,name:"SKALE Nebula 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}}}),v_=p({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}),E_=p({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:{}}),k_=p({id:1187947933,name:"SKALE Base",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://skale-base.skalenodes.com/v1/base"],webSocket:["wss://skale-base.skalenodes.com/v1/ws/base"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://skale-base-explorer.skalenodes.com/"}},testnet:!0}),C_=p({id:324705682,name:"SKALE Base Sepolia Testnet",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://base-sepolia-testnet.skalenodes.com/v1/base-testnet"],webSocket:["wss://base-sepolia-testnet.skalenodes.com/v1/ws/base-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://base-sepolia-testnet-explorer.skalenodes.com/"}},testnet:!0}),T_=p({id:1350216234,name:"SKALE Titan 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}}}),A_=p({id:1020352220,name:"SKALE Titan Testnet",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}),S_=p({id:984123,name:"Forma Sketchpad",network:"sketchpad",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.sketchpad-1.forma.art"],webSocket:["wss://ws.sketchpad-1.forma.art"]}},blockExplorers:{default:{name:"Sketchpad Explorer",url:"https://explorer.sketchpad-1.forma.art"}},testnet:!0}),$i=1,P_=p({...V,id:2192,network:"snaxchain-mainnet",name:"SnaxChain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://explorer.snaxchain.io",apiUrl:"https://explorer.snaxchain.io/api"}},contracts:{...V.contracts,disputeGameFactory:{[$i]:{address:"0x472562Fcf26D6b2793f8E0b0fB660ba0E5e08A46"}},l2OutputOracle:{[$i]:{address:"0x2172e492Fc807F5d5645D0E3543f139ECF539294"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[$i]:{address:"0x79f446D024d74D0Bb6E699C131c703463c5D65E9"}},l1StandardBridge:{[$i]:{address:"0x6534Bdb6b5c060d3e6aa833433333135eFE8E0aA"}}},sourceId:$i}),Gi=11155111,I_=p({...V,id:13001,network:"snaxchain-testnet",name:"SnaxChain Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://testnet-explorer.snaxchain.io",apiUrl:"https://testnet-explorer.snaxchain.io/api"}},contracts:{...V.contracts,disputeGameFactory:{[Gi]:{address:"0x206a75d89d45F146C54020F132FF93bEDD09f55E"}},l2OutputOracle:{[Gi]:{address:"0x60e3A368a4cdCEf85ffB964e372726F56A46221e"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Gi]:{address:"0xb5afdd0E8dDF081Ef90e8A3e0c7b5798e66E954E"}},l1StandardBridge:{[Gi]:{address:"0xbd37E1a59D4C00C9A46F75018dffd84061bC5f74"}}},testnet:!0,sourceId:Gi}),B_=p({id:5031,name:"Somnia",nativeCurrency:{name:"Somnia",symbol:"SOMI",decimals:18},rpcUrls:{default:{http:["https://api.infra.mainnet.somnia.network"]}},blockExplorers:{default:{name:"Somnia Explorer",url:"https://explorer.somnia.network",apiUrl:"https://explorer.somnia.network/api"}},testnet:!1}),F_=p({id:50312,name:"Somnia Testnet",nativeCurrency:{name:"STT",symbol:"STT",decimals:18},rpcUrls:{default:{http:["https://dream-rpc.somnia.network"]}},blockExplorers:{default:{name:"Somnia Testnet Explorer",url:"https://shannon-explorer.somnia.network/",apiUrl:"https://shannon-explorer.somnia.network/api"}},contracts:{multicall3:{address:"0x841b8199E6d3Db3C6f264f6C2bd8848b3cA64223",blockCreated:71314235}},testnet:!0}),ji=1,O_=p({...V,id:1868,name:"Soneium Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com",apiUrl:"https://soneium.blockscout.com/api"}},contracts:{...V.contracts,disputeGameFactory:{[ji]:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{[ji]:{address:"0x0000000000000000000000000000000000000000"}},portal:{[ji]:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{[ji]:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:ji}),Vi=11155111,U_=p({...V,id:1946,name:"Soneium Minato Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.minato.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium-minato.blockscout.com",apiUrl:"https://soneium-minato.blockscout.com/api"}},contracts:{...V.contracts,disputeGameFactory:{[Vi]:{address:"0xB3Ad2c38E6e0640d7ce6aA952AB3A60E81bf7a01"}},l2OutputOracle:{[Vi]:{address:"0x710e5286C746eC38beeB7538d0146f60D27be343"}},portal:{[Vi]:{address:"0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3",blockCreated:6466136}},l1StandardBridge:{[Vi]:{address:"0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2",blockCreated:6466136}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},testnet:!0,sourceId:Vi}),D_=p({id:19,name:"Songbird Canary-Network",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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13382504}}}),__=p({id:16,name:"Songbird Testnet Coston",nativeCurrency:{decimals:18,name:"Coston Flare",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}),M_=p({id:146,name:"Sonic",blockTime:630,nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Explorer",url:"https://sonicscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:60}},testnet:!1}),N_=p({id:57054,name:"Sonic Blaze Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.blaze.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Blaze Testnet Explorer",url:"https://testnet.sonicscan.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1100}},testnet:!0}),L_=p({id:64165,name:"Sonic Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.testnet.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Testnet Explorer",url:"https://testnet.soniclabs.com/"}},testnet:!0}),z_=p({...fr,blockTime:200,id:50104,name:"Sophon",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.sophon.xyz"],webSocket:["wss://rpc.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.sophon.xyz"}},contracts:{multicall3:{address:"0x5f4867441d2416cA88B1b3fd38f21811680CD2C8",blockCreated:116}},testnet:!1}),R_=p({...fr,blockTime:200,id:531050104,name:"Sophon Testnet",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.testnet.sophon.xyz"],webSocket:["wss://rpc.testnet.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.testnet.sophon.xyz"}},contracts:{multicall3:{address:"0x83c04d112adedA2C6D9037bb6ecb42E7f0b108Af",blockCreated:15642}},testnet:!0}),H_=p({id:100021,name:"Sova",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sova.io"]}},blockExplorers:{default:{name:"Sova Block Explorer",url:"hhttps://explorer.sova.io"}},testnet:!1}),$_=p({id:120893,name:"Sova Network Sepolia",nativeCurrency:{decimals:18,name:"Sepolia Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.testnet.sova.io"]}},blockExplorers:{default:{name:"Sova Sepolia Explorer",url:"https://explorer.testnet.sova.io"}},testnet:!0}),G_=p({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}),j_=p({id:2201,name:"Stable Testnet",nativeCurrency:{decimals:18,name:"gUSDT",symbol:"gUSDT"},rpcUrls:{default:{http:["https://rpc.testnet.stable.xyz"],webSocket:["wss://rpc.testnet.stable.xyz"]}},blockExplorers:{default:{name:"Stablescan",url:"https://testnet.stablescan.xyz",apiUrl:"https://testnet.stablescan.xyz/api"}},testnet:!0}),y6=p({...Qf,id:1660990954,name:"Status Network Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://public.sepolia.rpc.status.network"],webSocket:["wss://public.sepolia.rpc.status.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepoliascan.status.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1578364}},testnet:!0}),V_=p({id:1234,name:"Step Network",nativeCurrency:{name:"FITFI",symbol:"FITFI",decimals:18},rpcUrls:{default:{http:["https://rpc.step.network"]}},blockExplorers:{default:{name:"Step Scan",url:"https://stepscan.io"}},testnet:!1}),W_=p({id:1514,name:"Story",nativeCurrency:{decimals:18,name:"IP Token",symbol:"IP"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:340998},ensRegistry:{address:"0x5dc881dda4e4a8d312be3544ad13118d1a04cb17",blockCreated:648924},ensUniversalResolver:{address:"0xddfb18888a9466688235887dec2a10c4f5effee9",blockCreated:649114}},rpcUrls:{default:{http:["https://mainnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story explorer",url:"https://storyscan.io",apiUrl:"https://storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!1}),q_=p({id:1315,name:"Story Aeneid",network:"story-aeneid",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1792},ensRegistry:{address:"0x5dC881dDA4e4a8d312be3544AD13118D1a04Cb17",blockCreated:1322033},ensUniversalResolver:{address:"0x6D3B3F99177FB2A5de7F9E928a9BD807bF7b5BAD",blockCreated:1322097}},rpcUrls:{default:{http:["https://aeneid.storyrpc.io"]}},blockExplorers:{default:{name:"Story Aeneid Explorer",url:"https://aeneid.storyscan.io",apiUrl:"https://aeneid.storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!0}),K_=p({id:1516,name:"Story Odyssey",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://rpc.odyssey.storyrpc.io"]}},blockExplorers:{default:{name:"Story Odyssey Explorer",url:"https://odyssey.storyscan.xyz"}},testnet:!0}),Y_=p({id:1513,name:"Story Testnet",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://testnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story Testnet Explorer",url:"https://testnet.storyscan.xyz"}},testnet:!0}),Z_=p({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"}}}),X_=p({id:8866,name:"SuperLumio",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.lumio.io"]}},blockExplorers:{default:{name:"Lumio explorer",url:"https://explorer.lumio.io"}},testnet:!1}),Q_=p({id:55244,name:"Superposition",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.superposition.so"]}},blockExplorers:{default:{name:"Superposition Explorer",url:"https://explorer.superposition.so"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39}},testnet:!1}),Wi=1,J_=p({...V,id:5330,name:"Superseed",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Explorer",url:"https://explorer.superseed.xyz",apiUrl:"https://explorer.superseed.xyz/api/v2"}},contracts:{...V.contracts,disputeGameFactory:{[Wi]:{address:"0x8b097CF1f9BbD9cbFD0DD561858a1FCbC8857Be0",blockCreated:20737481}},l2OutputOracle:{[Wi]:{address:"0x693A0F8854F458D282DE3C5b69E8eE5EEE8aA949",blockCreated:20737481}},portal:{[Wi]:{address:"0x2c2150aa5c75A24fB93d4fD2F2a895D618054f07",blockCreated:20737481}},l1StandardBridge:{[Wi]:{address:"0x8b0576E39F1233679109F9b40cFcC2a7E0901Ede",blockCreated:20737481}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:Wi}),Jf=11155111,eM=p({...V,id:53302,name:"Superseed Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Sepolia Explorer",url:"https://sepolia-explorer.superseed.xyz",apiUrl:"https://sepolia-explorer.superseed.xyz/api/v2"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},portal:{[Jf]:{address:"0x7A0db8C51432d2C3eb4e8f360a2EeB26FF2809fB",blockCreated:5523438}},l1StandardBridge:{[Jf]:{address:"0x2B227A603fAAdB3De0ED050b63ADD232B5f2c28C",blockCreated:5523442}}},testnet:!0,sourceId:Jf}),tM=p({id:763375,name:"Surge Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-rpc.hoodi.surge.wtf"],webSocket:["wss://l2-ws.hoodi.surge.wtf"]}},blockExplorers:{default:{name:"Surge Testnet Blockscout",url:"https://explorer.hoodi.surge.wtf"}},testnet:!0}),rM=p({id:254,name:"Swan Chain Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.swanchain.org"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://swanscan.io"}},testnet:!1}),nM=p({id:20241133,name:"Swan Proxima Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://rpc-proxima.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://proxima-explorer.swanchain.io"}},testnet:!0}),sM=p({id:2024,name:"Swan Saturn Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://saturn-rpc.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://saturn-explorer.swanchain.io"}},testnet:!0}),aM=p({...V,id:1923,name:"Swellchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-mainnet.alt.technology"]}},blockExplorers:{default:{name:"Swell Explorer",url:"https://explorer.swellnetwork.io",apiUrl:"https://explorer.swellnetwork.io/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),oM=p({...V,id:1924,name:"Swellchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-testnet.alt.technology"]}},blockExplorers:{default:{name:"Swellchain Testnet Explorer",url:"https://swell-testnet-explorer.alt.technology",apiUrl:"https://swell-testnet-explorer.alt.technology/api"}},contracts:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),iM=p({id:94,name:"SwissDLT Mainnet",nativeCurrency:{decimals:18,name:"BCTS",symbol:"BCTS"},rpcUrls:{default:{http:["https://rpc.swissdlt.ch"]}},blockExplorers:{default:{name:"SwissDLT Explorer",url:"https://explorer.swissdlt.ch"}},testnet:!1}),cM=p({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}}}),lM=p({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}}}),uM=p({id:239,name:"TAC",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/tac"]}},blockExplorers:{default:{name:"Blockscout",url:"https://tac.blockscout.com",apiUrl:"https://tac.blockscout.com/api"},native:{name:"TAC Explorer",url:"https://explorer.tac.build",apiUrl:"https://explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),dM=p({id:2391,name:"TAC SPB Testnet",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://spb.rpc.tac.build"]}},blockExplorers:{default:{name:"TAC",url:"https://spb.explorer.tac.build",apiUrl:"https://spb.explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:471429}},testnet:!0}),pM=p({id:167e3,name:"Taiko Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.mainnet.taiko.xyz"],webSocket:["wss://ws.mainnet.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://taikoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11269}}}),fM=p({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"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59757}},testnet:!0}),mM=p({id:167013,name:"Taiko Hoodi",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.taiko.xyz"],webSocket:["wss://ws.hoodi.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.taikoscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:581116}},testnet:!0}),hM=p({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}),bM=p({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"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.katla.taiko.xyz"}}}),yM=p({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"}}}),gM=p({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"}}}),xM=p({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}),wM=p({id:10218,name:"Tea Sepolia",nativeCurrency:{name:"Sepolia Tea",symbol:"TEA",decimals:18},rpcUrls:{default:{http:["https://tea-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Tea Sepolia Explorer",url:"https://sepolia.tea.xyz"}},testnet:!0}),vM=p({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}),EM=p({id:40,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.telos.net"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:246530709}}}),kM=p({id:41,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.testnet.telos.net"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0});/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const g6=no(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),CM=g6.create(BigInt("-3")),TM=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),AM=Bl({a:CM,b:TM,Fp:g6,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},kp),x6=no(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff")),SM=x6.create(BigInt("-3")),PM=BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");Bl({a:SM,b:PM,Fp:x6,n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),h:BigInt(1),lowS:!1},rk);const w6=no(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),IM=w6.create(BigInt("-3")),BM=BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");Bl({a:IM,b:BM,Fp:w6,n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),h:BigInt(1),lowS:!1,allowedPrivateKeyLengths:[130,131,132]},tk);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const FM=AM;function v6(e){const{hash:t,payload:r,publicKey:n,signature:s}=e;return FM.verify(s,r instanceof Uint8Array?r:ds(r),df(n).substring(2),...t?[{prehash:!0,lowS:!0}]:[])}const OM=new TextEncoder;Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]);const uu={...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63};function UM(e){const t=e.replace(/=+$/,""),r=t.length,n=new Uint8Array(r+3);OM.encodeInto(t+"===",n);for(let a=0,o=0;a<t.length;a+=4,o+=3){const i=(uu[n[a]]<<18)+(uu[n[a+1]]<<12)+(uu[n[a+2]]<<6)+uu[n[a+3]];n[o]=i>>16,n[o+1]=i>>8&255,n[o+2]=i&255}const s=(r>>2)*3+(r%4&&r%4-1);return new Uint8Array(n.buffer,0,s)}Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]);function DM(e){const{challenge:t,hash:r=!0,metadata:n,publicKey:s,signature:a}=e,{authenticatorData:o,challengeIndex:i,clientDataJSON:c,typeIndex:l,userVerificationRequired:u}=n,d=ds(o);if(d.length<37)return!1;const f=d[32];if((f&1)!==1||u&&(f&4)!==4||(f&8)!==8&&(f&16)===16)return!1;if(l!==void 0){const w='"type":"webauthn.get"';if(w!==c.slice(Number(l),w.length+1))return!1}const m=i!==void 0?c.slice(Number(i)).match(/^"challenge":"(.*?)"/):c.match(/"challenge":"(.*?)"/);if(!m)return!1;const[b,g]=m;if(Pt(UM(g))!==t)return!1;const E=kC(oy(c),{as:"Bytes"}),v=Tk(d,E);return v6({hash:r,payload:v,publicKey:s,signature:a})}const e0="0x01",t0="0x02",E6="0x03",ca="0x7777777777777777777777777777777777777777777777777777777777777777";function lo(e){const t=e.endsWith(ca.slice(2))?Be(e,0,-bt(ca)):e;if(bt(t)===65){const o=Of(t);return Fl(o),{signature:o,type:"secp256k1"}}const n=Be(t,0,1),s=Be(t,1),a=bt(s);if(n===e0){if(a!==129)throw new Yi({reason:`Invalid P256 signature envelope size: expected 129 bytes, got ${a} bytes`,serialized:t});return{publicKey:{prefix:4,x:yt(Be(s,64,96)),y:yt(Be(s,96,128))},prehash:Ti(Be(s,128,129))!==0,signature:{r:yt(Be(s,0,32)),s:yt(Be(s,32,64))},type:"p256"}}if(n===t0){if(a<128)throw new Yi({reason:`Invalid WebAuthn signature envelope size: expected at least 128 bytes, got ${a} bytes`,serialized:t});const o=a-128,i=Be(s,0,o);let c,l;for(let u=37;u<o;u++){const d=dy(Be(i,u));if(d.startsWith("{")&&d.endsWith("}"))try{JSON.parse(d),c=Be(i,0,u),l=d;break}catch{}}if(!c||!l)throw new Yi({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{publicKey:{prefix:4,x:yt(Be(s,o+64,o+96)),y:yt(Be(s,o+96,o+128))},metadata:{authenticatorData:c,clientDataJSON:l},signature:{r:yt(Be(s,o,o+32)),s:yt(Be(s,o+32,o+64))},type:"webAuthn"}}if(n===E6){const o=Be(s,0,20),i=lo(Be(s,20));return{userAddress:o,inner:i,type:"keychain"}}throw new Yi({reason:`Unknown signature type identifier: ${n}. Expected ${e0} (P256) or ${t0} (WebAuthn)`,serialized:t})}function qi(e){if(typeof e=="string")return lo(e);if(typeof e=="object"&&e!==null&&"r"in e&&"s"in e&&"yParity"in e)return{signature:e,type:"secp256k1"};const t=r0(e);return{...e,...t==="p256"?{prehash:e.prehash}:{},type:t}}function du(e){if(e.type==="secp256k1")return{signature:Uf(e),type:"secp256k1"};if(e.type==="p256")return{prehash:e.preHash,publicKey:{prefix:4,x:yt(e.pubKeyX),y:yt(e.pubKeyY)},signature:{r:yt(e.r),s:yt(e.s)},type:"p256"};if(e.type==="webAuthn"){const t=e.webauthnData,r=bt(t);let n,s;for(let a=37;a<r;a++){const o=dy(Be(t,a));if(o.startsWith("{")&&o.endsWith("}"))try{JSON.parse(o),n=Be(t,0,a),s=o;break}catch{}}if(!n||!s)throw new Yi({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{metadata:{authenticatorData:n,clientDataJSON:s},publicKey:{prefix:4,x:yt(e.pubKeyX),y:yt(e.pubKeyY)},signature:{r:yt(e.r),s:yt(e.s)},type:"webAuthn"}}if(e.type==="keychain"||"userAddress"in e&&"signature"in e)return{type:"keychain",userAddress:e.userAddress,inner:du(e.signature)};throw new Ki({envelope:e})}function r0(e){if(typeof e!="object"||e===null)throw new Ki({envelope:e});if("type"in e&&e.type)return e.type;if("signature"in e&&!("publicKey"in e)&&typeof e.signature=="object"&&e.signature!==null&&"r"in e.signature&&"s"in e.signature&&"yParity"in e.signature||"r"in e&&"s"in e&&"yParity"in e)return"secp256k1";if("signature"in e&&"prehash"in e&&"publicKey"in e&&typeof e.prehash=="boolean")return"p256";if("signature"in e&&"metadata"in e&&"publicKey"in e)return"webAuthn";if("userAddress"in e&&"inner"in e)return"keychain";throw new Ki({envelope:e})}function pu(e,t={}){const r=r0(e);if(r==="secp256k1")return ft(R9(e.signature),t.magic?ca:"0x");if(r==="p256"){const n=e;return ft(e0,Z(n.signature.r,{size:32}),Z(n.signature.s,{size:32}),Z(n.publicKey.x,{size:32}),Z(n.publicKey.y,{size:32}),Z(n.prehash?1:0,{size:1}),t.magic?ca:"0x")}if(r==="webAuthn"){const n=e,s=ft(n.metadata.authenticatorData,Ci(n.metadata.clientDataJSON));return ft(t0,s,Z(n.signature.r,{size:32}),Z(n.signature.s,{size:32}),Z(n.publicKey.x,{size:32}),Z(n.publicKey.y,{size:32}),t.magic?ca:"0x")}if(r==="keychain"){const n=e;return ft(E6,n.userAddress,pu(n.inner),t.magic?ca:"0x")}throw new Ki({envelope:e})}function n0(e){const t=r0(e);if(t==="secp256k1")return{...zg(e.signature),type:"secp256k1"};if(t==="p256"){const r=e;return{preHash:r.prehash,pubKeyX:Z(r.publicKey.x,{size:32}),pubKeyY:Z(r.publicKey.y,{size:32}),r:Z(r.signature.r,{size:32}),s:Z(r.signature.s,{size:32}),type:"p256"}}if(t==="webAuthn"){const r=e,n=ft(r.metadata.authenticatorData,Ci(r.metadata.clientDataJSON));return{pubKeyX:Z(r.publicKey.x,{size:32}),pubKeyY:Z(r.publicKey.y,{size:32}),r:Z(r.signature.r,{size:32}),s:Z(r.signature.s,{size:32}),type:"webAuthn",webauthnData:n}}if(t==="keychain"){const r=e;return{type:"keychain",userAddress:r.userAddress,signature:n0(r.inner)}}throw new Ki({envelope:e})}function _M(e,t){const{payload:r}=t,n=(()=>{if(t.address)return t.address;if(t.publicKey)return Pl(t.publicKey)})();if(!n)return!1;const s=qi(e);if(s.type==="secp256k1")return n?X9({address:n,payload:r,signature:s.signature}):!1;if(s.type==="p256"){const a=Pl(s.publicKey);return ff(a,n)?v6({hash:s.prehash,publicKey:s.publicKey,payload:r,signature:s.signature}):!1}if(s.type==="webAuthn"){const a=Pl(s.publicKey);return ff(a,n)?DM({challenge:hl(r),metadata:s.metadata,publicKey:s.publicKey,signature:s.signature}):!1}throw new MM(`Unable to verify signature envelope of type "${s.type}".`)}class Ki extends oe{constructor({envelope:t}){super(`Unable to coerce value (\`${ki(t)}\`) to a valid signature envelope.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.CoercionError"})}}let Yi=class extends oe{constructor({reason:t,serialized:r}){super(`Unable to deserialize signature envelope: ${t}`,{metaMessages:[`Serialized: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.InvalidSerializedError"})}};class MM extends oe{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.VerificationError"})}}function NM(e,t={}){return typeof e.chainId=="string"?k6(e):t.signature?{...e,signature:t.signature}:e}function k6(e){const{address:t,chainId:r,nonce:n}=e,s=du(e.signature);return{address:t,chainId:Number(r),nonce:BigInt(n),signature:s}}function LM(e){return e.map(t=>k6(t))}function zM(e){const[t,r,n,s]=e,a={address:r,chainId:t==="0x"?0:Number(t),nonce:n==="0x"?0n:BigInt(n)};return s&&(a.signature=lo(s)),NM(a)}function RM(e){const t=[];for(const r of e)t.push(zM(r));return t}function HM(e){const{address:t,chainId:r,nonce:n,signature:s}=e;return{address:t,chainId:Z(r),nonce:Z(n),signature:n0(s)}}function $M(e){return e.map(t=>HM(t))}function GM(e){const{address:t,chainId:r,nonce:n}=e,s=e.signature?pu(e.signature):void 0;return[r?Z(r):"0x",t,n?Z(n):"0x",...s?[s]:[]]}function jM(e){if(!e||e.length===0)return[];const t=[];for(const r of e)t.push(GM(r));return t}function VM(e,t={}){return typeof e.expiry=="string"?C6(e):t.signature?{...e,signature:qi(t.signature)}:e}function C6(e){const{chainId:t="0x0",keyId:r,expiry:n=0,limits:s,keyType:a}=e,o=du(e.signature);return{address:r,chainId:t==="0x"?0n:yt(t),expiry:Number(n),limits:s==null?void 0:s.map(i=>({token:i.token,limit:BigInt(i.limit)})),signature:o,type:a}}function WM(e){const[t,r]=e,[n,s,a,o,i]=t,c=(()=>{switch(s){case"0x":case"0x00":return"secp256k1";case"0x01":return"p256";case"0x02":return"webAuthn";default:throw new Error(`Invalid key type: ${s}`)}})(),l={address:a,expiry:typeof o<"u"?Ti(o):void 0,type:c,...n!=="0x"?{chainId:yt(n)}:{},...typeof o<"u"?{expiry:Ti(o)}:{},...typeof i<"u"?{limits:i.map(([u,d])=>({token:u,limit:BigInt(d)}))}:{}};return r&&(l.signature=lo(r)),VM(l)}function qM(e){const{address:t,chainId:r=0n,expiry:n,limits:s,type:a,signature:o}=e;return{chainId:r===0n?"0x":Z(r),expiry:typeof n=="number"?Z(n):null,limits:s==null?void 0:s.map(({token:i,limit:c})=>({token:i,limit:Z(c)})),keyId:t,signature:n0(o),keyType:a}}function KM(e){const{address:t,chainId:r=0n,expiry:n,limits:s}=e,a=e.signature?pu(e.signature):void 0,o=(()=>{switch(e.type){case"secp256k1":return"0x";case"p256":return"0x01";case"webAuthn":return"0x02";default:throw new Error(`Invalid key type: ${e.type}`)}})();return[[r===0n?"0x":Z(r),o,t,typeof n=="number"?Z(n):void 0,(s==null?void 0:s.map(c=>[c.token,Z(c.limit)]))??void 0].filter(Boolean),...a?[a]:[]]}const YM="0x20c0";function T6(e){if(typeof e=="string")return $r(e),e;const t=Z(e,{size:18});return ft(YM,t)}const A6={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},S6={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function ZM(e,t={}){if(!e)return null;const r=Lg(e),n={...e,...r};return n.blockNumber=e.blockNumber?BigInt(e.blockNumber):null,n.data=e.input,n.gas=BigInt(e.gas??0n),n.nonce=BigInt(e.nonce??0n),n.transactionIndex=e.transactionIndex?Number(e.transactionIndex):null,n.value=BigInt(e.value??0n),e.authorizationList&&(n.authorizationList=q9(e.authorizationList)),e.chainId&&(n.chainId=Number(e.chainId)),e.gasPrice&&(n.gasPrice=BigInt(e.gasPrice)),e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=BigInt(e.maxFeePerBlobGas)),e.maxFeePerGas&&(n.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.type&&(n.type=S6[e.type]??e.type),r&&(n.v=_f(r.yParity)),n}const P6={...A6,tempo:"0x76"},XM={...S6,"0x76":"tempo"};function QM(e,t={}){if(!e)return null;const r=ZM(e);return r.type=XM[e.type],e.aaAuthorizationList&&(r.authorizationList=LM(e.aaAuthorizationList),delete r.aaAuthorizationList),e.calls&&(r.calls=e.calls.map(n=>({to:n.to,value:n.value&&n.value!=="0x"?BigInt(n.value):void 0,data:n.input||n.data||"0x"}))),e.feeToken&&(r.feeToken=e.feeToken),e.nonceKey&&(r.nonceKey=BigInt(e.nonceKey)),e.signature&&(r.signature=du(e.signature)),e.validAfter&&(r.validAfter=Number(e.validAfter)),e.validBefore&&(r.validBefore=Number(e.validBefore)),e.keyAuthorization&&(r.keyAuthorization=C6(e.keyAuthorization)),e.feePayerSignature&&(r.feePayerSignature=Uf(e.feePayerSignature),r.feePayerSignature.v=_f(r.feePayerSignature.yParity)),r}function JM(e){const t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.authorizationList<"u"&&(t.authorizationList=Y9(e.authorizationList)),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(t.blobs=e.blobs),typeof e.chainId<"u"&&(t.chainId=Z(e.chainId)),typeof e.data<"u"?(t.data=e.data,t.input=e.data):typeof e.input<"u"&&(t.data=e.input,t.input=e.input),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=Z(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=Z(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=Z(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=Z(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=Z(e.maxPriorityFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=Z(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=Z(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=A6[e.type]||e.type),typeof e.value<"u"&&(t.value=Z(e.value)),t}function eN(e){const t=JM({...e,authorizationList:void 0});e.authorizationList&&(t.authorizationList=$M(e.authorizationList)),e.calls&&(t.calls=e.calls.map(n=>({to:n.to,value:n.value?Z(n.value):"0x",data:n.data??"0x"}))),typeof e.feeToken<"u"&&(t.feeToken=T6(e.feeToken)),e.keyAuthorization&&(t.keyAuthorization=qM(e.keyAuthorization)),typeof e.validBefore<"u"&&(t.validBefore=Z(e.validBefore)),typeof e.validAfter<"u"&&(t.validAfter=Z(e.validAfter));const r=(()=>{if(e.nonceKey==="random")return uy(6);if(typeof e.nonceKey=="bigint")return Z(e.nonceKey)})();return r&&(t.nonceKey=r),(typeof e.calls<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"||e.type==="tempo")&&(t.type=P6.tempo,delete t.data,delete t.input,delete t.to,delete t.value),t}function tN(e){const t=[];for(let r=0;r<e.length;r++){const[n,s]=e[r];n&&$r(n,{strict:!1}),t.push({address:n,storageKeys:s.map(a=>CC(a)?a:Rp(a))})}return t}function rN(e){if(!e||e.length===0)return[];const t=[];for(const{address:r,storageKeys:n}of e){for(let s=0;s<n.length;s++)if(bt(n[s])!==32)throw new nN({storageKey:n[s]});r&&$r(r,{strict:!1}),t.push([r,n])}return t}class nN extends oe{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${bt(t)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccessList.InvalidStorageKeySizeError"})}}const I6={wei:0,gwei:9,szabo:12,finney:15,ether:18};function sN(e,t=0){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[s,a]=[r.slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${a?`.${a}`:""}`}function s0(e,t="wei"){return sN(e,I6.gwei-I6[t])}class aN extends oe{constructor({feeCap:t}={}){super(`The fee cap (\`maxFeePerGas\`/\`maxPriorityFeePerGas\`${t?` = ${s0(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.FeeCapTooHighError"})}}class oN extends oe{constructor({chainId:t}){super(typeof t<"u"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidChainIdError"})}}class iN extends oe{constructor({attributes:t,serialized:r,type:n}){const s=Object.entries(t).map(([a,o])=>typeof o>"u"?a:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${n}" was provided.`,{metaMessages:[`Serialized Transaction: "${r}"`,s.length>0?`Missing Attributes: ${s.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidSerializedError"})}}class cN extends oe{constructor({maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${s0(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${s0(r)} gwei`:""}).`].join(`
109
- `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.TipAboveFeeCapError"})}}const lN="0x78",uN="0x76",B6="tempo";function a0(e){const{calls:t,chainId:r,maxFeePerGas:n,maxPriorityFeePerGas:s,validBefore:a,validAfter:o}=e;if(!t||t.length===0)throw new bN;if(typeof a=="number"&&typeof o=="number"&&a<=o)throw new yN({validBefore:a,validAfter:o});if(t)for(const i of t)i.to&&$r(i.to,{strict:!1});if(r<=0)throw new oN({chainId:r});if(n&&BigInt(n)>2n**256n-1n)throw new aN({feeCap:n});if(s&&n&&s>n)throw new cN({maxFeePerGas:n,maxPriorityFeePerGas:s})}function dN(e){const t=i9(Be(e,1)),[r,n,s,a,o,i,c,l,u,d,f,m,b,g,E]=t,v=Array.isArray(g)?g:void 0,w=v?E:g;if(!(t.length===13||t.length===14||t.length===15))throw new iN({attributes:{authorizationList:b,chainId:r,maxPriorityFeePerGas:n,maxFeePerGas:s,gas:a,calls:o,accessList:i,keyAuthorization:v,nonceKey:c,nonce:l,validBefore:u,validAfter:d,feeToken:f,feePayerSignatureOrSender:m,...t.length>12?{signature:w}:{}},serialized:e,type:B6});let S={chainId:Number(r),type:B6};if(Rr(a)&&a!=="0x"&&(S.gas=BigInt(a)),Rr(l)&&(S.nonce=l==="0x"?0n:BigInt(l)),Rr(s)&&s!=="0x"&&(S.maxFeePerGas=BigInt(s)),Rr(n)&&n!=="0x"&&(S.maxPriorityFeePerGas=BigInt(n)),Rr(c)&&(S.nonceKey=c==="0x"?0n:BigInt(c)),Rr(u)&&u!=="0x"&&(S.validBefore=Number(u)),Rr(d)&&d!=="0x"&&(S.validAfter=Number(d)),Rr(f)&&f!=="0x"&&(S.feeToken=f),o&&o!=="0x"){const O=o;S.calls=O.map(L=>{const[I,h,y]=L,x={};return I&&I!=="0x"&&(x.to=I),h&&h!=="0x"&&(x.value=BigInt(h)),y&&y!=="0x"&&(x.data=y),x})}(i==null?void 0:i.length)!==0&&i!=="0x"&&(S.accessList=tN(i)),(b==null?void 0:b.length)!==0&&b!=="0x"&&(S.authorizationList=RM(b)),m!=="0x"&&m!==void 0&&(m==="0x00"||Il(m)?S.feePayerSignature=null:S.feePayerSignature=z9(m)),v&&(S.keyAuthorization=WM(v));const T=w?lo(w):void 0;return T&&(S={...S,signature:T}),a0(S),S}function pN(e,t={}){const{feePayerSignature:r,signature:n}=t,s=typeof e=="string"?dN(e):e;return a0(s),{...s,...n?{signature:qi(n)}:{},...r?{feePayerSignature:Ol(r)}:{},type:"tempo"}}function Zi(e,t={}){const{accessList:r,authorizationList:n,calls:s,chainId:a,feeToken:o,gas:i,keyAuthorization:c,nonce:l,nonceKey:u,maxFeePerGas:d,maxPriorityFeePerGas:f,validBefore:m,validAfter:b}=e;a0(e);const g=rN(r),E=t.signature||e.signature,v=jM(n),w=s.map(O=>[O.to??"0x",O.value?Z(O.value):"0x",O.data??"0x"]),S=(()=>{if(t.sender)return t.sender;const O=typeof t.feePayerSignature<"u"?t.feePayerSignature:e.feePayerSignature;return O===null?"0x00":O?H9(O):"0x"})(),T=[Z(a),f?Z(f):"0x",d?Z(d):"0x",i?Z(i):"0x",w,g,u?Z(u):"0x",l?Z(l):"0x",typeof m=="number"?Z(m):"0x",typeof b=="number"?Z(b):"0x",typeof o=="bigint"||typeof o=="string"?T6(o):"0x",S,v,...c?[KM(c)]:[],...E?[pu(qi(E))]:[]];return ft(t.format==="feePayer"?lN:uN,d9(T))}function fN(e){return mN(e,{presign:!0})}function mN(e,t={}){const r=Zi({...e,...t.presign?{signature:void 0}:{}});return Oi(r)}function hN(e,t){const{sender:r}=t,n=Zi({...e,signature:void 0},{sender:r,format:"feePayer"});return Oi(n)}class bN extends oe{constructor(){super("Calls list cannot be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.CallsEmptyError"})}}class yN extends oe{constructor({validBefore:t,validAfter:r}){super(`validBefore (${t}) must be greater than validAfter (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.InvalidValidityWindowError"})}}function F6(e){const t=e.account;return t!=null&&t.keyType&&t.keyType!=="secp256k1"||typeof e.calls<"u"||typeof e.feePayer<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.signature<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"?"tempo":e.type?e.type:Tp(e)}function o0(e){try{return F6(e)==="tempo"}catch{return!1}}async function gN(e,t){if(!o0(e)){if(t&&"type"in t&&t.type!=="secp256k1")throw new Error("Unsupported signature type. Expected `secp256k1` but got `"+t.type+"`.");if(t&&"type"in t){const{r:n,s,yParity:a}=t==null?void 0:t.signature;return Al(e,{r:Z(n,{size:32}),s:Z(s,{size:32}),yParity:a})}return Al(e,t)}if(F6(e)==="tempo")return xN(e,t);throw new Error("Unsupported transaction type")}async function xN(e,t){var l;const r=(()=>{if(e.signature)return e.signature;if(t&&"type"in t)return t;if(t)return qi({r:BigInt(t.r),s:BigInt(t.s),yParity:Number(t.yParity)})})(),{chainId:n,feePayer:s,feePayerSignature:a,nonce:o,...i}=e,c={...i,calls:(l=i.calls)!=null&&l.length?i.calls:[{to:i.to||(!i.data||i.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:i.value,data:i.data}],chainId:Number(n),feePayerSignature:a?{r:BigInt(a.r),s:BigInt(a.s),yParity:Number(a.yParity)}:s?null:void 0,type:"tempo",...o?{nonce:BigInt(o)}:{}};if(s===!0&&delete c.feeToken,r&&typeof e.feePayer=="object"){const u=pN(c,{signature:r}),d=(()=>{if(e.from)return e.from;if(r.type==="secp256k1")return Hg({payload:fN(u),signature:r.signature});throw new Error("Unable to extract sender from transaction or signature.")})(),f=hN(u,{sender:d}),m=await e.feePayer.sign({hash:f});return Zi(u,{feePayerSignature:Ol(m)})}if(s===!0){const u=Zi(c,{feePayerSignature:null,signature:r});return e.from&&r?ft(u,e.from,"0xfeefeefeefee"):u}return Zi({...c,...s?{feeToken:void 0}:{}},{feePayerSignature:void 0,signature:r})}function wN(e){if(!o0(e))return Js(e);const{feePayerSignature:t,gasPrice:r,nonce:n,...s}=QM(e);return{...s,accessList:s.accessList,feePayerSignature:t?{r:Z(t.r,{size:32}),s:Z(t.s,{size:32}),v:BigInt(t.v??27),yParity:t.yParity}:void 0,nonce:Number(n),typeHex:P6[s.type],type:s.type}}function vN(e){return El(e)}function EN(e,t){const r=e,n=r.account?Ze(r.account):void 0;if(!o0(r))return Lr(e);t&&(r.calls=r.calls??[{to:e.to||(!e.data||e.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:e.value,data:e.data}]),r.feePayer===!0&&delete r.feeToken;const s=eN({...r,type:"tempo"});t==="estimateGas"&&(s.maxFeePerGas=void 0,s.maxPriorityFeePerGas=void 0),s.to=void 0,s.data=void 0,s.value=void 0;const[a,o]=(()=>{const c=n&&"keyType"in n?n.keyType:n==null?void 0:n.source;return c?c==="webAuthn"?["webAuthn",`0x${"ff".repeat(1400)}`]:["p256","secp256k1"].includes(c)?[c,void 0]:[void 0,void 0]:[void 0,void 0]})(),i=n&&"accessKeyAddress"in n?n.accessKeyAddress:void 0;return{...s,...o?{keyData:o}:{},...i?{keyId:i}:{},...a?{keyType:a}:{},...r.feePayer?{feePayer:typeof r.feePayer=="object"?Ze(r.feePayer):r.feePayer}:{}}}const kN=CN();function CN(){return new Map}function TN(e){return`${e.address.toLowerCase()}-${e.chainId}`}function O6(e,t){const r=TN(t);let n=e.get(r);return n||(n={counter:0,resetScheduled:!1},e.set(r,n)),n}function AN(e,t){const r=O6(e,t);r.counter=0,r.resetScheduled=!1}function SN(e,t){const r=O6(e,t);r.resetScheduled||(r.resetScheduled=!0,queueMicrotask(()=>AN(e,t)));const n=r.counter;return r.counter++,n===0?0n:yt(uy(6))}const i0={blockTime:1e3,extendSchema:iC(),formatters:{transaction:al({exclude:["aaAuthorizationList"],format:wN}),transactionReceipt:Jp({format:vN}),transactionRequest:fp({format:EN})},prepareTransactionRequest:[async(e,{phase:t})=>{var n;const r=e;return t==="afterFillParameters"?(typeof r.nonceKey=="bigint"&&r.nonceKey>0n&&(r.gas=(r.gas??0n)+40000n),r):(r.nonceKey=(()=>{var o;if(typeof r.nonceKey<"u"&&r.nonceKey!=="random")return r.nonceKey;const s=((o=r.account)==null?void 0:o.address)??r.from;if(!s||!r.chain)return;const a=SN(kN,{address:s,chainId:r.chain.id});if(a!==0n)return a})(),r.nonce=(()=>{if(typeof r.nonce=="number")return r.nonce;if(r.nonceKey)return 0})(),!r.feeToken&&((n=r.chain)!=null&&n.feeToken)&&(r.feeToken=r.chain.feeToken),r)},{runAt:["beforeFillTransaction","afterFillParameters"]}],serializers:{transaction:((e,t)=>gN(e,t))},async verifyHash(e,t){const{address:r,hash:n,signature:s}=t;if(typeof s=="string"&&s.endsWith(ca.slice(2))){const a=lo(s);if(a.type!=="keychain"){const o=await Tl(e,{address:r,blockNumber:t.blockNumber,blockTag:t.blockTag});if(!o||o==="0xef01007702c00000000000000000000000000000000000")return _M(a,{address:r,payload:n})}}return await se(e,_i,"verifyHash")({...t,chain:null})}},PN=p({...i0,id:42429,name:"Tempo Devnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.devnet.tempoxyz.dev"],webSocket:["wss://rpc.devnet.tempoxyz.dev"]}}}),IN=p({...i0,id:1337,name:"Tempo",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["http://localhost:8545"]}}}),BN=p({...i0,id:42429,blockExplorers:{default:{name:"Tempo Explorer",url:"https://explore.tempo.xyz"}},name:"Tempo Testnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.testnet.tempo.xyz"],webSocket:["wss://rpc.testnet.tempo.xyz"]}}}),FN=p({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}),ON=p({id:752025,name:"Ternoa",nativeCurrency:{name:"Capsule Coin",symbol:"CAPS",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.zkevm.ternoa.network"]}},blockExplorers:{default:{name:"Ternoa Explorer",url:"https://explorer-mainnet.zkevm.ternoa.network"}},testnet:!1}),UN=p({id:7,name:"ThaiChain",nativeCurrency:{name:"TCH",symbol:"TCH",decimals:18},rpcUrls:{default:{http:["https://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}),DN=p({id:8428,name:"THAT Mainnet",nativeCurrency:{name:"THAT",symbol:"THAT",decimals:18},rpcUrls:{default:{http:["https://api.thatchain.io/mainnet"]}},blockExplorers:{default:{name:"Blockscout",url:"https://that.blockscout.com"}},testnet:!1}),_N=p({id:361,name:"Theta Mainnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://explorer.thetatoken.org"}},testnet:!1}),MN=p({id:365,name:"Theta Testnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api-testnet.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://testnet-explorer.thetatoken.org"}},testnet:!0}),NN=p({id:108,name:"ThunderCore Mainnet",nativeCurrency:{name:"TT",symbol:"TT",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.thundercore.com"]}},blockExplorers:{default:{name:"ThunderCore Explorer",url:"https://explorer-mainnet.thundercore.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),LN=p({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 Thunder Explorer",url:"https://testnet.5irescan.io/"}},testnet:!0}),zN=p({id:62092,name:"TikTrix Testnet",nativeCurrency:{name:"tTTX",symbol:"tTTX",decimals:18},rpcUrls:{default:{http:["https://tiktrix-rpc.xyz"]}},blockExplorers:{default:{name:"TikTrix Testnet Explorer",url:"https://tiktrix.xyz"}},testnet:!0}),RN=p({id:6969,name:"Tomb Mainnet",nativeCurrency:{name:"TOMB",symbol:"TOMB",decimals:18},rpcUrls:{default:{http:["https://rpc.tombchain.com"]}},blockExplorers:{default:{name:"Tomb Explorer",url:"https://tombscout.com"}},testnet:!1}),HN=p({...fr,id:61166,name:"Treasure",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.treasure.lol"],webSocket:["wss://rpc.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Block Explorer",url:"https://treasurescan.io"}},contracts:{multicall3:{address:"0x2e29fe39496a56856D8698bD43e1dF4D0CE6266a",blockCreated:101}},testnet:!1}),$N=p({...fr,id:978658,name:"Treasure Topaz Testnet",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.topaz.treasure.lol"],webSocket:["wss://rpc.topaz.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Topaz Block Explorer",url:"https://topaz.treasurescan.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:108112}},testnet:!0}),GN=p({id:728126428,name:"Tron",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org",apiUrl:"https://apilist.tronscanapi.com/api"}}}),jN=p({id:3448148188,name:"Tron Nile",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://nile.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0}),VN=p({id:2494104990,name:"Tron Shasta",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.shasta.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0}),WN=p({id:8,name:"Ubiq Mainnet",nativeCurrency:{name:"UBQ",symbol:"UBQ",decimals:18},rpcUrls:{default:{http:["https://pyrus2.ubiqscan.io"]}},blockExplorers:{default:{name:"Ubiq Scan",url:"https://ubiqscan.io"}},testnet:!1}),qN=p({id:19991,name:"Ultra EVM",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Explorer",url:"https://evmexplorer.ultra.io"}}}),KN=p({id:18881,name:"Ultra EVM Testnet",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.test.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Testnet Explorer",url:"https://evmexplorer.testnet.ultra.io"}},testnet:!0}),YN=p({id:1231,name:"Ultron Mainnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-rpc.net"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://ulxscan.com"}},testnet:!1}),ZN=p({id:1230,name:"Ultron Testnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-dev.io"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://explorer.ultron-dev.io"}},testnet:!0}),fu=1,XN=p({...V,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[fu]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[fu]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[fu]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:fu}),mu=11155111,QN=p({...V,id:1301,name:"Unichain Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia.unichain.org"]}},blockExplorers:{default:{name:"Uniscan",url:"https://sepolia.uniscan.xyz",apiUrl:"https://api-sepolia.uniscan.xyz/api"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},portal:{[mu]:{address:"0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD"}},l1StandardBridge:{[mu]:{address:"0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"}},disputeGameFactory:{[mu]:{address:"0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b"}}},testnet:!0,sourceId:mu}),JN=p({id:8880,name:"Unique Mainnet",nativeCurrency:{decimals:18,name:"UNQ",symbol:"UNQ"},rpcUrls:{default:{http:["https://rpc.unique.network"]}},blockExplorers:{default:{name:"Unique Subscan",url:"https://unique.subscan.io/"}}}),eL=p({id:8882,name:"Opal Testnet",nativeCurrency:{decimals:18,name:"OPL",symbol:"OPL"},rpcUrls:{default:{http:["https://rpc-opal.unique.network"]}},blockExplorers:{default:{name:"Opal Subscan",url:"https://opal.subscan.io/"}},testnet:!0}),tL=p({id:8881,name:"Quartz Mainnet",nativeCurrency:{decimals:18,name:"QTZ",symbol:"QTZ"},rpcUrls:{default:{http:["https://rpc-quartz.unique.network"]}},blockExplorers:{default:{name:"Quartz Subscan",url:"https://quartz.subscan.io/"}}}),rL=p({id:18233,name:"Unreal",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.unreal-orbit.gelato.digital"]}},blockExplorers:{default:{name:"Unreal Explorer",url:"https://unreal.blockscout.com",apiUrl:"https://unreal.blockscout.com/api/v2"}},testnet:!0,contracts:{multicall3:{address:"0x8b6B0e60D8CD84898Ea8b981065A12F876eA5677",blockCreated:1745}}}),nL=p({id:1480,name:"Vana",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.vana.org/"]}},blockExplorers:{default:{name:"Vana Block Explorer",url:"https://vanascan.io",apiUrl:"https://vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:716763}}}),sL=p({id:14800,name:"Vana Moksha Testnet",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.moksha.vana.org"]}},blockExplorers:{default:{name:"Vana Moksha Testnet",url:"https://moksha.vanascan.io",apiUrl:"https://moksha.vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:732283}},testnet:!0}),aL=p({id:2040,name:"Vanar Mainnet",nativeCurrency:{name:"VANRY",symbol:"VANRY",decimals:18},rpcUrls:{default:{http:["https://rpc.vanarchain.com"]}},blockExplorers:{default:{name:"Vanar Mainnet Explorer",url:"https://explorer.vanarchain.com/"}},testnet:!1}),oL=p({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"}}}),iL=p({id:106,name:"Velas EVM Mainnet",nativeCurrency:{name:"VLX",symbol:"VLX",decimals:18},rpcUrls:{default:{http:["https://evmexplorer.velas.com/rpc"]}},blockExplorers:{default:{name:"Velas Explorer",url:"https://evmexplorer.velas.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:55883577}},testnet:!1}),cL=p({id:88,name:"Viction",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://vicscan.xyz"}},testnet:!1}),lL=p({id:89,name:"Viction Testnet",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://testnet.vicscan.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:12170179}},testnet:!0}),uL=p({id:888888,name:"Vision",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org"}},testnet:!1}),dL=p({id:666666,name:"Vision Testnet",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://vpioneer.infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org/?chain=vpioneer"}},testnet:!0}),pL=p({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}}}),fL=p({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}),mL=p({id:9496,name:"WeaveVM Alphanet",nativeCurrency:{name:"Testnet WeaveVM",symbol:"tWVM",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.wvm.dev"]}},blockExplorers:{default:{name:"WeaveVM Alphanet Explorer",url:"https://explorer.wvm.dev"}},testnet:!0}),hL=p({id:1111,name:"WEMIX",network:"wemix-mainnet",nativeCurrency:{name:"WEMIX",symbol:"WEMIX",decimals:18},rpcUrls:{default:{http:["https://api.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://explorer.wemix.com"}}}),bL=p({id:1112,name:"WEMIX Testnet",network:"wemix-testnet",nativeCurrency:{name:"WEMIX",symbol:"tWEMIX",decimals:18},rpcUrls:{default:{http:["https://api.test.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://testnet.wemixscan.com",apiUrl:"https://testnet.wemixscan.com/api"}},testnet:!0}),yL=p({id:420420421,name:"Westend Asset Hub",nativeCurrency:{decimals:18,name:"Westies",symbol:"WND"},rpcUrls:{default:{http:["https://westend-asset-hub-eth-rpc.polkadot.io"]}},blockExplorers:{default:{name:"subscan",url:"https://westend-asset-hub-eth-explorer.parity.io"}},testnet:!0}),gL=p({testnet:!1,name:"Whitechain",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://explorer.whitechain.io"}},id:1875,rpcUrls:{default:{http:["https://rpc.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25212237}}}),xL=p({testnet:!0,name:"Whitechain Testnet",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://testnet.whitechain.io"}},id:2625,rpcUrls:{default:{http:["https://rpc-testnet.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"}}),wL=p({id:42070,name:"WMC Testnet",nativeCurrency:{name:"WMTx",symbol:"WMTx",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet-base.worldmobile.net"]}},blockExplorers:{default:{name:"WMC Explorer",url:"https://explorer2-base-testnet.worldmobile.net"}},testnet:!0}),Xi=1,vL=p({...V,id:480,name:"World Chain",network:"worldchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan",url:"https://worldscan.org",apiUrl:"https://api.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-mainnet.explorer.alchemy.com",apiUrl:"https://worldchain-mainnet.explorer.alchemy.com/api"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Xi]:{address:"0x069c4c579671f8c120b1327a73217D01Ea2EC5ea"}},l2OutputOracle:{[Xi]:{address:"0x19A6d1E9034596196295CF148509796978343c5D"}},portal:{[Xi]:{address:"0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"}},l1StandardBridge:{[Xi]:{address:"0x470458C91978D2d929704489Ad730DC3E3001113"}}},testnet:!1,sourceId:Xi}),Qi=11155111,EL=p({...V,id:4801,name:"World Chain Sepolia",network:"worldchain-sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan Sepolia",url:"https://sepolia.worldscan.org",apiUrl:"https://api-sepolia.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-sepolia.explorer.alchemy.com",apiUrl:"https://worldchain-sepolia.explorer.alchemy.com/api"}},contracts:{...V.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Qi]:{address:"0x8Ec1111f67Dad6b6A93B3F42DfBC92D81c98449A"}},l2OutputOracle:{[Qi]:{address:"0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e"}},portal:{[Qi]:{address:"0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4"}},l1StandardBridge:{[Qi]:{address:"0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE"}}},testnet:!0,sourceId:Qi}),kL=p({id:103,name:"WorldLand Mainnet",nativeCurrency:{decimals:18,name:"WLC",symbol:"WLC"},rpcUrls:{default:{http:["https://seoul.worldland.foundation"]}},blockExplorers:{default:{name:"WorldLand Scan",url:"https://scan.worldland.foundation"}},testnet:!1}),CL=p({id:660279,name:"Xai Mainnet",nativeCurrency:{name:"Xai",symbol:"XAI",decimals:18},rpcUrls:{default:{http:["https://xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.xai-chain.net"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:222549}},testnet:!1}),TL=p({id:37714555429,name:"Xai Testnet",nativeCurrency:{name:"sXai",symbol:"sXAI",decimals:18},rpcUrls:{default:{http:["https://testnet-v2.xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer-v2.xai-chain.net"}},testnet:!0}),AL=p({id:50,name:"XDC Network",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xdcrpc.com"]}},blockExplorers:{default:{name:"XDCScan",url:"https://xdcscan.com"}},contracts:{multicall3:{address:"0x0B1795ccA8E4eC4df02346a082df54D437F8D9aF",blockCreated:75884020}}}),SL=p({id:51,name:"Apothem Network",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]}},blockExplorers:{default:{name:"XDCScan",url:"https://testnet.xdcscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59765389}}}),PL=p({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",apiUrl:"https://www.oklink.com/api/v5/explorer/xlayer/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:47416}}}),U6=p({id:195,name:"X1 Testnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://xlayertestrpc.okx.com"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer-test"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:624344}},testnet:!0}),IL=p({id:3721,name:"Xone Chain Mainnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc.xone.org"]}},blockExplorers:{default:{name:"Xone Mainnet Explorer",url:"https://xonescan.com",apiUrl:"http://api.xonescan.com/api"}},testnet:!1}),BL=p({id:33772211,name:"Xone Chain Testnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc-testnet.xone.org","https://rpc-testnet.xone.plus","https://rpc-testnet.knight.center"]}},blockExplorers:{default:{name:"Xone Testnet Explorer",url:"https://testnet.xonescan.com",apiUrl:"http://api.testnet.xonescan.com/api"}},testnet:!0}),FL=p({id:20250217,name:"Xphere Mainnet",nativeCurrency:{decimals:18,name:"XP",symbol:"XP"},rpcUrls:{default:{http:["https://en-bkk.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xp.tamsa.io"}},testnet:!1}),OL=p({id:1998991,name:"Xphere Testnet",nativeCurrency:{decimals:18,name:"XPT",symbol:"XPT"},rpcUrls:{default:{http:["http://testnet.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xpt.tamsa.io"}},testnet:!0}),UL=p({id:273,name:"XR One",nativeCurrency:{decimals:18,name:"XR1",symbol:"XR1"},rpcUrls:{default:{http:["https://xr1.calderachain.xyz/http"],webSocket:["wss://xr1.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr1.calderaexplorer.xyz"}},testnet:!1}),DL=p({id:144e4,name:"XRPL EVM",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.xrplevm.org",apiUrl:"https://explorer.xrplevm.org/api/v2"}},testnet:!1}),_L=p({id:1440002,name:"XRPL EVM Devnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org/"]},public:{http:["https://rpc.xrplevm.org/"]}},blockExplorers:{default:{name:"XRPLEVM Devnet Explorer",url:"https://explorer.xrplevm.org/"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:15237286}},testnet:!0}),ML=p({id:1449e3,name:"XRPL EVM Testnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.testnet.xrplevm.org",apiUrl:"https://explorer.testnet.xrplevm.org/api/v2"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:492302}},testnet:!0}),NL=p({id:2730,name:"XR Sepolia",nativeCurrency:{decimals:18,name:"tXR",symbol:"tXR"},rpcUrls:{default:{http:["https://xr-sepolia-testnet.rpc.caldera.xyz/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr-sepolia-testnet.explorer.caldera.xyz"}},testnet:!0}),LL=p({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"}}}),zL=p({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}),RL=p({id:8408,name:"ZenChain Testnet",nativeCurrency:{decimals:18,name:"ZTC",symbol:"ZTC"},rpcUrls:{default:{http:["https://zenchain-testnet.api.onfinality.io/public"],webSocket:["wss://zenchain-testnet.api.onfinality.io/public-ws"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:230019}},blockExplorers:{default:{name:"Zentrace",url:"https://zentrace.io"}},testnet:!0}),HL=p({id:383414847825,name:"Zeniq Mainnet",nativeCurrency:{name:"ZENIQ",symbol:"ZENIQ",decimals:18},rpcUrls:{default:{http:["https://api.zeniq.network"]}},blockExplorers:{default:{name:"Zeniq Explorer",url:"https://zeniqscan.com"}},testnet:!1}),$L=p({id:543210,name:"Zero Network",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zerion.io/v1/zero"]}},blockExplorers:{default:{name:"Zero Network Explorer",url:"https://explorer.zero.network"}},testnet:!1}),GL=p({id:7e3,name:"ZetaChain",nativeCurrency:{decimals:18,name:"Zeta",symbol:"ZETA"},rpcUrls:{default:{http:["https://zetachain-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1632781}},blockExplorers:{default:{name:"ZetaScan",url:"https://zetascan.com"}},testnet:!1}),jL=p({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"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2715217}},blockExplorers:{default:{name:"ZetaScan",url:"https://testnet.zetascan.com"}},testnet:!0}),VL=p({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}),WL=p({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}),qL=p({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}),c0=1,KL=p({...V,id:48900,name:"Zircuit Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.zircuit.com","https://zircuit1-mainnet.liquify.com","https://zircuit1-mainnet.p2pify.com","https://zircuit-mainnet.drpc.org"]}},blockExplorers:{default:{name:"Zircuit Explorer",url:"https://explorer.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[c0]:{address:"0x92Ef6Af472b39F1b363da45E35530c24619245A4"}},portal:{[c0]:{address:"0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"}},l1StandardBridge:{[c0]:{address:"0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"}}},testnet:!1}),l0=11155111,YL=p({...V,id:48898,name:"Zircuit Garfield Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://garfield-testnet.zircuit.com/"]}},blockExplorers:{default:{name:"Zircuit Garfield Testnet Explorer",url:"https://explorer.garfield-testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[l0]:{address:"0xd69D3AC5CA686cCF94b258291772bc520FEAf211"}},portal:{[l0]:{address:"0x4E21A71Ac3F7607Da5c06153A17B1DD20E702c21"}},l1StandardBridge:{[l0]:{address:"0x87a7E2bCA9E35BA49282E832a28A6023904460D8"}}},testnet:!0}),u0=11155111,ZL=p({...V,id:48899,name:"Zircuit Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.zircuit.com","https://zircuit1-testnet.p2pify.com","https://zircuit1-testnet.liquify.com"]}},blockExplorers:{default:{name:"Zircuit Testnet Explorer",url:"https://explorer.testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6040287},l2OutputOracle:{[u0]:{address:"0x740C2dac453aEf7140809F80b72bf0e647af8148"}},portal:{[u0]:{address:"0x787f1C8c5924178689E0560a43D848bF8E54b23e"}},l1StandardBridge:{[u0]:{address:"0x0545c5fe980098C16fcD0eCB5E79753afa6d9af9"}}},testnet:!0}),XL=p({id:42766,name:"ZKFair Mainnet",network:"zkfair-mainnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{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}),QL=p({id:43851,name:"ZKFair Testnet",network:"zkfair-testnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://testnet-rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://testnet-scan.zkfair.io"}},testnet:!0}),JL=p({id:810180,name:"zkLink Nova",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://explorer.zklink.io"}}}),ez=p({id:810181,name:"zkLink Nova Sepolia Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://sepolia.explorer.zklink.io"}}}),D6=p({...fr,blockTime:200,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"},native:{name:"ZKsync Explorer",url:"https://explorer.zksync.io/",apiUrl:"https://block-explorer-api.mainnet.zksync.io/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:45659388}}}),_6=p({...fr,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}),tz=p({...fr,id:272,name:"ZKsync CLI Local Custom Hyperchain",nativeCurrency:{name:"BAT",symbol:"BAT",decimals:18},rpcUrls:{default:{http:["http://localhost:15200"],webSocket:["ws://localhost:15201"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),rz=p({...fr,id:270,name:"ZKsync CLI Local Hyperchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15100"],webSocket:["ws://localhost:15101"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),nz=p({id:9,name:"ZKsync CLI Local Hyperchain L1",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15045"]}},blockExplorers:{default:{name:"Blockscout",url:"http://localhost:15001/",apiUrl:"http://localhost:15001/api/v2"}},testnet:!0}),M6=p({...fr,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}),N6=p({...fr,blockTime:200,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:"Etherscan",url:"https://sepolia-era.zksync.network/",apiUrl:"https://api-sepolia-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://sepolia.explorer.zksync.io/",blockExplorerApi:"https://block-explorer-api.sepolia.zksync.dev/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:3855712}},testnet:!0}),hu=1,sz=p({...V,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:{...V.contracts,l2OutputOracle:{[hu]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[hu]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[hu]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:hu}),bu=11155111,az=p({...V,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:{...V.contracts,l2OutputOracle:{[bu]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[bu]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[bu]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:bu,testnet:!0}),L6=5,oz=p({...V,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:{...V.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[L6]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:L6,testnet:!0}),iz=Object.freeze(Object.defineProperty({__proto__:null,abey:x4,abstract:B4,abstractTestnet:F4,acala:O4,acria:U4,adf:D4,agungTestnet:_4,aioz:M4,alephZero:N4,alephZeroTestnet:L4,alienx:z4,alienxHalTestnet:R4,ancient8:V4,ancient8Sepolia:W4,anvil:q4,apeChain:K4,apexTestnet:Y4,apollo:Z4,arbitrum:X4,arbitrumGoerli:Q4,arbitrumNova:J4,arbitrumSepolia:eA,arcTestnet:tA,arenaz:rA,areonNetwork:nA,areonNetworkTestnet:sA,areum:aA,artelaTestnet:oA,arthera:iA,artheraTestnet:cA,assetChain:lA,assetChainTestnet:uA,astar:dA,astarZkEVM:pA,astarZkyoto:fA,atletaOlympia:mA,aurora:hA,auroraTestnet:bA,auroria:yA,autheoTestnet:gA,avalanche:xA,avalancheFuji:wA,b3:vA,b3Sepolia:EA,bahamut:kA,base:l6,baseGoerli:AA,basePreconf:CA,baseSepolia:u6,baseSepoliaPreconf:SA,basecampTestnet:TA,beam:PA,beamTestnet:IA,bearNetworkChainMainnet:BA,bearNetworkChainTestnet:FA,berachain:OA,berachainBepolia:UA,berachainTestnet:DA,berachainTestnetbArtio:_A,bevmMainnet:MA,bifrost:NA,birdlayer:LA,bitTorrent:VA,bitTorrentTestnet:WA,bitgert:zA,bitkub:RA,bitkubTestnet:HA,bitlayer:$A,bitlayerTestnet:GA,bitrock:jA,blast:qA,blastSepolia:KA,bob:YA,bobSepolia:QA,boba:ZA,bobaSepolia:XA,boolBetaMainnet:JA,botanix:eS,botanixTestnet:tS,bounceBit:rS,bounceBitTestnet:nS,bronos:sS,bronosTestnet:aS,bsc:oS,bscGreenfield:iS,bscTestnet:cS,bsquared:lS,bsquaredTestnet:uS,btr:dS,btrTestnet:pS,bxn:fS,bxnTestnet:mS,cannon:hS,canto:bS,celo:SS,celoAlfajores:PS,celoSepolia:IS,chang:BS,chiliz:FS,chips:OS,citreaTestnet:US,classic:DS,coinbit:_S,coinex:MS,confluxESpace:NS,confluxESpaceTestnet:LS,coreDao:zS,coreTestnet1:RS,coreTestnet2:HS,corn:$S,cornTestnet:GS,crab:jS,creatorTestnet:VS,creditCoin3Devnet:WS,creditCoin3Mainnet:qS,creditCoin3Testnet:KS,cronos:YS,cronosTestnet:ZS,cronoszkEVM:XS,cronoszkEVMTestnet:QS,crossbell:JS,crossfi:eP,curtis:tP,cyber:rP,cyberTestnet:nP,dailyNetwork:sP,dailyNetworkTestnet:aP,darwinia:oP,datahavenTestnet:iP,dbkchain:cP,dchain:lP,dchainTestnet:uP,defichainEvm:dP,defichainEvmTestnet:pP,degen:fP,dfk:mP,diode:hP,disChain:bP,dodochainTestnet:yP,dogechain:gP,domaTestnet:xP,donatuz:wP,dosChain:vP,dosChainTestnet:EP,dreyerxMainnet:kP,dreyerxTestnet:CP,dustboyIoT:TP,dymension:AP,edexa:SP,edexaTestnet:PP,edgeless:IP,edgelessTestnet:BP,edgeware:FP,edgewareTestnet:OP,eduChain:UP,eduChainTestnet:DP,ekta:_P,ektaTestnet:MP,elastos:NP,elastosTestnet:LP,electroneum:zP,electroneumTestnet:RP,elysiumTestnet:HP,energy:$P,eni:GP,eniTestnet:jP,enuls:VP,eon:WP,eos:qP,eosTestnet:KP,eteria:YP,etherlink:ZP,etherlinkShadownetTestnet:XP,etherlinkTestnet:QP,ethernity:JP,etp:eI,evmos:tI,evmosTestnet:rI,excelonMainnet:nI,expanse:sI,exsat:aI,exsatTestnet:oI,fantom:iI,fantomSonicTestnet:cI,fantomTestnet:lI,fibo:uI,filecoin:dI,filecoinCalibration:pI,filecoinHyperspace:fI,fireChain:g4,flame:mI,flare:hI,flareTestnet:bI,flowMainnet:yI,flowPreviewnet:gI,flowTestnet:xI,fluence:wI,fluenceStage:vI,fluenceTestnet:EI,fluentTestnet:kI,form:CI,formTestnet:AI,forma:TI,formicarium:CO,forta:SI,foundry:PI,fraxtal:II,fraxtalTestnet:BI,funkiMainnet:FI,funkiSepolia:OI,fuse:UI,fuseSparknet:DI,fusion:_I,fusionTestnet:MI,garnet:NI,gatechain:LI,geist:zI,genesys:RI,giwaSepolia:f6,giwaSepoliaPreconf:HI,glideL1Protocol:$I,glideL2Protocol:GI,gnosis:jI,gnosisChiado:VI,goChain:KI,goat:WI,gobi:qI,godwoken:YI,goerli:ZI,graphite:XI,graphiteTestnet:QI,gravity:JI,gunz:eB,guruNetwork:tB,guruTestnet:rB,ham:nB,happychainTestnet:sB,haqqMainnet:aB,haqqTestedge2:oB,hardhat:iB,harmonyOne:cB,hashkey:lB,hashkeyTestnet:uB,haustTestnet:dB,hedera:pB,hederaPreviewnet:fB,hederaTestnet:mB,hela:hB,heliosTestnet:bB,hemi:yB,hemiSepolia:gB,henesys:xB,holesky:wB,hoodi:vB,hpb:EB,hpp:kB,hppSepolia:CB,huddle01Mainnet:TB,huddle01Testnet:AB,humanity:SB,humanityTestnet:PB,humanode:IB,humanodeTestnet5:BB,hychain:FB,hychainTestnet:OB,hyperEvm:m6,hyperliquid:m6,hyperliquidEvmTestnet:UB,iSunCoin:YB,icbNetwork:DB,idchain:_B,immutableZkEvm:MB,immutableZkEvmTestnet:NB,inEVM:LB,initVerse:zB,initVerseGenesis:RB,injective:HB,injectiveTestnet:$B,ink:GB,inkSepolia:jB,iota:VB,iotaTestnet:WB,iotex:qB,iotexTestnet:KB,jasmyChain:ZB,jasmyChainTestnet:XB,jbc:QB,jbcTestnet:JB,jocMainnet:eF,jocTestnet:tF,jovay:rF,jovaySepolia:nF,juneo:sF,juneoBCH1Chain:aF,juneoDAI1Chain:oF,juneoDOGE1Chain:iF,juneoEUR1Chain:cF,juneoGLD1Chain:lF,juneoLINK1Chain:uF,juneoLTC1Chain:dF,juneoSGD1Chain:fF,juneoSocotraTestnet:mF,juneoUSD1Chain:hF,juneoUSDT1Chain:bF,juneomBTC1Chain:pF,kaia:yF,kairos:gF,kakarotSepolia:xF,kakarotStarknetSepolia:wF,kardiaChain:vF,karura:EF,katana:kF,kava:CF,kavaTestnet:TF,kcc:AF,kiiTestnetOro:SF,kinto:PF,klaytn:IF,klaytnBaobab:BF,koi:FF,kroma:OF,kromaSepolia:UF,l3x:DF,l3xTestnet:_F,lavita:MF,lens:NF,lensTestnet:LF,lestnet:zF,lightlinkPegasus:RF,lightlinkPhoenix:HF,linea:GF,lineaGoerli:jF,lineaSepolia:VF,lineaTestnet:WF,lisk:qF,liskSepolia:KF,loadAlphanet:YF,localhost:ZF,loop:XF,lukso:QF,luksoTestnet:JF,lumiaMainnet:eO,lumiaTestnet:tO,lumoz:rO,lumozTestnet:nO,lycan:sO,lyra:aO,mainnet:oO,mandala:iO,manta:cO,mantaSepoliaTestnet:lO,mantaTestnet:uO,mantle:dO,mantleSepoliaTestnet:pO,mantleTestnet:fO,mantraDuKongEVMTestnet:mO,mantraEVM:hO,mapProtocol:bO,matchain:yO,matchainTestnet:gO,mchVerse:xO,megaethTestnet:wO,mekong:vO,meld:EO,memecore:kO,merlin:TO,merlinErigonTestnet:AO,metachain:SO,metachainIstanbul:PO,metadium:IO,metalL2:BO,meter:FO,meterTestnet:OO,metis:UO,metisGoerli:DO,metisSepolia:_O,mev:MO,mevTestnet:NO,mint:LO,mintSepoliaTestnet:zO,mitosisTestnet:RO,mode:HO,modeTestnet:$O,monad:GO,monadTestnet:jO,moonbaseAlpha:VO,moonbeam:WO,moonbeamDev:qO,moonriver:KO,morph:YO,morphHolesky:ZO,morphSepolia:XO,nahmii:QO,nautilus:JO,near:eU,nearTestnet:tU,neonDevnet:rU,neonMainnet:nU,neoxMainnet:sU,neoxT4:aU,newton:oU,nexi:iU,nexilix:cU,nibiru:lU,nitrographTestnet:uU,nomina:dU,oasisTestnet:pU,oasys:fU,odysseyTestnet:mU,okc:hU,omax:bU,omni:yU,omniOmega:gU,oneWorld:xU,oortMainnetDev:wU,opBNB:vU,opBNBTestnet:EU,openledger:kU,optimism:CU,optimismGoerli:TU,optimismSepolia:AU,optopia:SU,optopiaTestnet:PU,orderly:IU,orderlySepolia:BU,otimDevnet:FU,palm:OU,palmTestnet:UU,peaq:DU,pgn:_U,pgnTestnet:MU,phoenix:NU,planq:LU,plasma:zU,plasmaDevnet:RU,plasmaTestnet:HU,playfiAlbireo:$U,plinga:GU,plume:jU,plumeDevnet:VU,plumeMainnet:WU,plumeSepolia:qU,plumeTestnet:KU,polterTestnet:YU,polygon:ZU,polygonAmoy:XU,polygonMumbai:QU,polygonZkEvm:JU,polygonZkEvmCardona:eD,polygonZkEvmTestnet:tD,polynomial:rD,polynomialSepolia:nD,potos:sD,potosTestnet:aD,premiumBlockTestnet:oD,pulsechain:iD,pulsechainV4:cD,pumpfiTestnet:lD,pyrope:uD,qMainnet:pD,qTestnet:fD,ql1:dD,quai:mD,quaiTestnet:hD,reactiveTestnet:bD,real:yD,redbellyMainnet:gD,redbellyTestnet:xD,reddio:wD,reddioSepolia:vD,redstone:ED,rei:kD,reyaNetwork:CD,riseTestnet:TD,rivalz:AD,rollux:SD,rolluxTestnet:PD,ronin:ID,root:BD,rootPorcini:FD,rootstock:OD,rootstockTestnet:UD,rss3:DD,rss3Sepolia:_D,saakuru:MD,saga:ND,saigon:LD,sanko:zD,sapphire:RD,sapphireTestnet:HD,satoshiVM:$D,satoshiVMTestnet:GD,scroll:jD,scrollSepolia:VD,sei:WD,seiDevnet:qD,seiTestnet:YD,seismicDevnet:KD,sepolia:ZD,shape:XD,shapeSepolia:QD,shardeum:JD,shardeumSphinx:e_,shibarium:t_,shibariumTestnet:r_,shiden:n_,shimmer:s_,shimmerTestnet:a_,sidraChain:o_,silentData:i_,silicon:c_,siliconSepolia:l_,sixProtocol:u_,skaleBase:k_,skaleBaseSepoliaTestnet:C_,skaleBlockBrawlers:d_,skaleCalypso:p_,skaleCalypsoTestnet:f_,skaleCryptoBlades:m_,skaleCryptoColosseum:h_,skaleEuropa:b_,skaleEuropaTestnet:y_,skaleExorde:g_,skaleHumanProtocol:x_,skaleNebula:w_,skaleNebulaTestnet:v_,skaleRazor:E_,skaleTitan:T_,skaleTitanTestnet:A_,sketchpad:S_,snax:P_,snaxTestnet:I_,somnia:B_,somniaTestnet:F_,soneium:O_,soneiumMinato:U_,songbird:D_,songbirdTestnet:__,sonic:M_,sonicBlazeTestnet:N_,sonicTestnet:L_,sophon:z_,sophonTestnet:R_,sova:H_,sovaSepolia:$_,spicy:G_,stableTestnet:j_,statusNetworkSepolia:y6,statusSepolia:y6,step:V_,story:W_,storyAeneid:q_,storyOdyssey:K_,storyTestnet:Y_,stratis:Z_,superlumio:X_,superposition:Q_,superseed:J_,superseedSepolia:eM,surgeTestnet:tM,swan:rM,swanProximaTestnet:nM,swanSaturnTestnet:sM,swellchain:aM,swellchainTestnet:oM,swissdlt:iM,syscoin:cM,syscoinTestnet:lM,tac:uM,tacSPB:dM,taiko:pM,taikoHekla:fM,taikoHoodi:mM,taikoJolnir:hM,taikoKatla:bM,taikoTestnetSepolia:yM,taraxa:gM,taraxaTestnet:xM,teaSepolia:wM,telcoinTestnet:vM,telos:EM,telosTestnet:kM,tempoDevnet:PN,tempoLocalnet:IN,tempoTestnet:BN,tenet:FN,ternoa:ON,thaiChain:UN,that:DN,theta:_N,thetaTestnet:MN,thunderCore:NN,thunderTestnet:LN,tiktrixTestnet:zN,tomb:RN,treasure:HN,treasureTopaz:$N,tron:GN,tronNile:jN,tronShasta:VN,ubiq:WN,ultra:qN,ultraTestnet:KN,ultron:YN,ultronTestnet:ZN,unichain:XN,unichainSepolia:QN,unique:JN,uniqueOpal:eL,uniqueQuartz:tL,unreal:rL,vana:nL,vanaMoksha:sL,vanar:aL,vechain:oL,velas:iL,viction:cL,victionTestnet:lL,vision:uL,visionTestnet:dL,wanchain:pL,wanchainTestnet:fL,weaveVMAlphanet:mL,wemix:hL,wemixTestnet:bL,westendAssetHub:yL,whitechain:gL,whitechainTestnet:xL,wmcTestnet:wL,worldLand:kL,worldchain:vL,worldchainSepolia:EL,x1Testnet:U6,xLayer:PL,xLayerTestnet:U6,xai:CL,xaiTestnet:TL,xdc:AL,xdcTestnet:SL,xoneMainnet:IL,xoneTestnet:BL,xphereMainnet:FL,xphereTestnet:OL,xrOne:UL,xrSepolia:NL,xrplevm:DL,xrplevmDevnet:_L,xrplevmTestnet:ML,yooldoVerse:LL,yooldoVerseTestnet:zL,zenchainTestnet:RL,zeniq:HL,zeroG:m4,zeroGGalileoTestnet:h4,zeroGMainnet:b4,zeroGTestnet:y4,zeroNetwork:$L,zetachain:GL,zetachainAthensTestnet:jL,zhejiang:VL,zilliqa:WL,zilliqaTestnet:qL,zircuit:KL,zircuitGarfieldTestnet:YL,zircuitTestnet:ZL,zkFair:XL,zkFairTestnet:QL,zkLinkNova:JL,zkLinkNovaSepoliaTestnet:ez,zkSync:D6,zkSyncInMemoryNode:_6,zkSyncLocalNode:M6,zkSyncSepoliaTestnet:N6,zksync:D6,zksyncInMemoryNode:_6,zksyncLocalCustomHyperchain:tz,zksyncLocalHyperchain:rz,zksyncLocalHyperchainL1:nz,zksyncLocalNode:M6,zksyncSepoliaTestnet:N6,zora:sz,zoraSepolia:az,zoraTestnet:oz},Symbol.toStringTag,{value:"Module"})),cz=(e,t)=>{const r=Object.values(iz).find(o=>o.id===e);if(!r)return{walletClient:void 0,publicClient:void 0};const n=t?a4(t):void 0,s=n?s4({chain:r,transport:n}):void 0,a=RT({chain:r,transport:n||i4()});return{walletClient:s,publicClient:a}},lz=()=>C.jsx("div",{className:"twap-error-fallback",children:C.jsx("p",{style:{fontSize:20,fontWeight:600,textAlign:"center",width:"100%",marginTop:40},children:"Something went wrong"})});function uz({children:e}){return C.jsx(F3,{FallbackComponent:lz,onError:t=>dt.onCrash(t),children:C.jsx(C.Fragment,{children:e})})}const z6=M.createContext(null),dz=new b3({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),pz=e=>{var n,s,a;const t=ee(o=>o.updateState),r=ee(o=>o.state.isMarketOrder);return M.useEffect(()=>{const o=setInterval(()=>{t({currentTime:Date.now()})},6e4);return()=>clearInterval(o)},[t]),M.useEffect(()=>{var o,i,c,l,u,d,f,m,b,g,E,v;t({isMarketOrder:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.isMarketOrder,typedChunks:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.chunks,typedFillDelay:(d=(u=e.overrides)==null?void 0:u.state)==null?void 0:d.fillDelay,typedDuration:(m=(f=e.overrides)==null?void 0:f.state)==null?void 0:m.duration,typedLimitPrice:(g=(b=e.overrides)==null?void 0:b.state)==null?void 0:g.limitPrice,typedTriggerPrice:(v=(E=e.overrides)==null?void 0:E.state)==null?void 0:v.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(n=e.overrides)==null?void 0:n.state,e.module]),M.useEffect(()=>{var o,i,c,l;t({typedLimitPrice:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.limitPrice,typedTriggerPrice:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(s=e.srcToken)==null?void 0:s.address,(a=e.dstToken)==null?void 0:a.address]),M.useEffect(()=>{e.module===ge.LIMIT&&t({isMarketOrder:!1}),Number(Us)<=2&&e.module===ge.TAKE_PROFIT&&t({isMarketOrder:!0})},[e.module]),M.useEffect(()=>{r&&t({isInvertedTrade:!1})},[r]),null},fz=({marketReferencePrice:e,srcToken:t,dstToken:r,chainId:n,typedInputAmount:s})=>M.useMemo(()=>{if(Vf(t,r,n)||Wf(t,r,n))return{isLoading:!1,noLiquidity:!1,value:Nl(s||"0",t==null?void 0:t.decimals)};if(G(e.value||0).isZero()||G(s||0).isZero())return e;const a=G(e.value||0).dividedBy(s||0).toFixed();return{...e,value:a}},[e,s,t,r,n]),mz=e=>{const t=ee(l=>l.state.swapExecution.acceptedMarketPrice),{walletClient:r,publicClient:n}=M.useMemo(()=>cz(e.chainId,e.provider),[e.chainId,e.provider]),s=M.useMemo(()=>rh(e.partner),[e.partner]),a=M.useMemo(()=>{const l=s[0];return e.chainId&&s.includes(e.chainId)?e.chainId:l},[e.chainId,s]),o=M.useMemo(()=>bd(e.partner,a),[e.partner,a]),i=fz(e),c=M.useMemo(()=>Ch(e.minChunkSizeUsd),[e.minChunkSizeUsd]);return M.useEffect(()=>{dt.init(o,c,a)},[o,a,c]),C.jsxs(z6.Provider,{value:{typedInputAmount:e.typedInputAmount,resetTypedInputAmount:e.resetTypedInputAmount,minChunkSizeUsd:c,account:e.account,walletClient:r,publicClient:n,marketPrice:t||i.value,marketPriceLoading:!t&&i.isLoading,noLiquidity:!t&&i.noLiquidity,config:o,slippage:e.priceProtection,supportedChains:s,chainId:a,partner:e.partner,module:e.module,fees:e.fees||0,components:e.components,overrides:e.overrides,callbacks:e.callbacks,getTranslation:e.getTranslation,translations:e.translations,useToken:e.useToken,refetchBalances:e.refetchBalances,srcUsd1Token:e.srcUsd1Token,dstUsd1Token:e.dstUsd1Token,srcBalance:e.srcBalance,dstBalance:e.dstBalance,srcToken:e.srcToken,dstToken:e.dstToken,isDev:e.isDev},children:[C.jsx(pz,{...e}),C.jsx(uz,{children:e.children})]})},hz=e=>C.jsx(y3,{client:dz,children:C.jsx(mz,{...e})}),re=()=>{const e=M.useContext(z6);if(e===null)throw new Error("useSpotContext must be used within SpotProvider");return e},bz=2e4,yz=[{text:"Minutes",value:$t.Minutes},{text:"Hours",value:$t.Hours},{text:"Days",value:$t.Days}],gz="The protocol uses an oracle price to help protect users from unfavorable executions. If the execution price is worse than the oracle price by more than the allowed percentage, the transaction will not be executed.";var d0={},xz=[{id:"fa",name:"Font Awesome",projectUrl:"https://fontawesome.com/",license:"CC BY 4.0 License",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"},{id:"io",name:"Ionicons 4",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"io5",name:"Ionicons 5",projectUrl:"https://ionicons.com/",license:"MIT",licenseUrl:"https://github.com/ionic-team/ionicons/blob/master/LICENSE"},{id:"md",name:"Material Design icons",projectUrl:"http://google.github.io/material-design-icons/",license:"Apache License Version 2.0",licenseUrl:"https://github.com/google/material-design-icons/blob/master/LICENSE"},{id:"ti",name:"Typicons",projectUrl:"http://s-ings.com/typicons/",license:"CC BY-SA 3.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/3.0/"},{id:"go",name:"Github Octicons icons",projectUrl:"https://octicons.github.com/",license:"MIT",licenseUrl:"https://github.com/primer/octicons/blob/master/LICENSE"},{id:"fi",name:"Feather",projectUrl:"https://feathericons.com/",license:"MIT",licenseUrl:"https://github.com/feathericons/feather/blob/master/LICENSE"},{id:"gi",name:"Game Icons",projectUrl:"https://game-icons.net/",license:"CC BY 3.0",licenseUrl:"https://creativecommons.org/licenses/by/3.0/"},{id:"wi",name:"Weather Icons",projectUrl:"https://erikflowers.github.io/weather-icons/",license:"SIL OFL 1.1",licenseUrl:"http://scripts.sil.org/OFL"},{id:"di",name:"Devicons",projectUrl:"https://vorillaz.github.io/devicons/",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ai",name:"Ant Design Icons",projectUrl:"https://github.com/ant-design/ant-design-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"bs",name:"Bootstrap Icons",projectUrl:"https://github.com/twbs/icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"ri",name:"Remix Icon",projectUrl:"https://github.com/Remix-Design/RemixIcon",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"fc",name:"Flat Color Icons",projectUrl:"https://github.com/icons8/flat-color-icons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"gr",name:"Grommet-Icons",projectUrl:"https://github.com/grommet/grommet-icons",license:"Apache License Version 2.0",licenseUrl:"http://www.apache.org/licenses/"},{id:"hi",name:"Heroicons",projectUrl:"https://github.com/refactoringui/heroicons",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"si",name:"Simple Icons",projectUrl:"https://simpleicons.org/",license:"CC0 1.0 Universal",licenseUrl:"https://creativecommons.org/publicdomain/zero/1.0/"},{id:"im",name:"IcoMoon Free",projectUrl:"https://github.com/Keyamoon/IcoMoon-Free",license:"CC BY 4.0 License"},{id:"bi",name:"BoxIcons",projectUrl:"https://github.com/atisawd/boxicons",license:"CC BY 4.0 License"},{id:"cg",name:"css.gg",projectUrl:"https://github.com/astrit/css.gg",license:"MIT",licenseUrl:"https://opensource.org/licenses/MIT"},{id:"vsc",name:"VS Code Icons",projectUrl:"https://github.com/microsoft/vscode-codicons",license:"CC BY 4.0",licenseUrl:"https://creativecommons.org/licenses/by/4.0/"}],p0={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},f0=M.createContext&&M.createContext(p0),ps=function(){return ps=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},ps.apply(this,arguments)},wz=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};function R6(e){return e&&e.map(function(t,r){return M.createElement(t.tag,ps({key:r},t.attr),R6(t.child))})}function vz(e){return function(t){return M.createElement(H6,ps({attr:ps({},e.attr)},t),R6(e.child))}}function H6(e){var t=function(r){var n=e.attr,s=e.size,a=e.title,o=wz(e,["attr","size","title"]),i=s||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),M.createElement("svg",ps({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:ps(ps({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&M.createElement("title",null,a),e.children)};return f0!==void 0?M.createElement(f0.Consumer,null,function(r){return t(r)}):t(p0)}const yu=fw(Object.freeze(Object.defineProperty({__proto__:null,DefaultContext:p0,GenIcon:vz,IconBase:H6,IconContext:f0,IconsManifest:xz},Symbol.toStringTag,{value:"Module"})));var $6;function Ez(){if($6)return d0;$6=1;var e=yu.GenIcon;return d0.IoIosArrowDown=function(r){return e({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"}}]})(r)},d0}var G6=Ez(),m0={},j6;function kz(){if(j6)return m0;j6=1;var e=yu.GenIcon;return m0.AiOutlineCopy=function(r){return e({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]})(r)},m0}var Cz=kz();//! moment.js
110
- //! version : 2.30.1
111
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
112
- //! license : MIT
113
- //! momentjs.com
114
- var V6;function te(){return V6.apply(null,arguments)}function Tz(e){V6=e}function Gr(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function la(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function He(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h0(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(He(e,t))return!1;return!0}function tr(e){return e===void 0}function _n(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Ji(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function W6(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function fs(e,t){for(var r in t)He(t,r)&&(e[r]=t[r]);return He(t,"toString")&&(e.toString=t.toString),He(t,"valueOf")&&(e.valueOf=t.valueOf),e}function cn(e,t,r,n){return x2(e,t,r,n,!0).utc()}function Az(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function ke(e){return e._pf==null&&(e._pf=Az()),e._pf}var b0;Array.prototype.some?b0=Array.prototype.some:b0=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function y0(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=ke(e),r=b0.call(t.parsedDateParts,function(s){return s!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function gu(e){var t=cn(NaN);return e!=null?fs(ke(t),e):ke(t).userInvalidated=!0,t}var q6=te.momentProperties=[],g0=!1;function x0(e,t){var r,n,s,a=q6.length;if(tr(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),tr(t._i)||(e._i=t._i),tr(t._f)||(e._f=t._f),tr(t._l)||(e._l=t._l),tr(t._strict)||(e._strict=t._strict),tr(t._tzm)||(e._tzm=t._tzm),tr(t._isUTC)||(e._isUTC=t._isUTC),tr(t._offset)||(e._offset=t._offset),tr(t._pf)||(e._pf=ke(t)),tr(t._locale)||(e._locale=t._locale),a>0)for(r=0;r<a;r++)n=q6[r],s=t[n],tr(s)||(e[n]=s);return e}function ec(e){x0(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),g0===!1&&(g0=!0,te.updateOffset(this),g0=!1)}function jr(e){return e instanceof ec||e!=null&&e._isAMomentObject!=null}function K6(e){te.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function kr(e,t){var r=!0;return fs(function(){if(te.deprecationHandler!=null&&te.deprecationHandler(null,e),r){var n=[],s,a,o,i=arguments.length;for(a=0;a<i;a++){if(s="",typeof arguments[a]=="object"){s+=`
115
- [`+a+"] ";for(o in arguments[0])He(arguments[0],o)&&(s+=o+": "+arguments[0][o]+", ");s=s.slice(0,-2)}else s=arguments[a];n.push(s)}K6(e+`
116
- Arguments: `+Array.prototype.slice.call(n).join("")+`
117
- `+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var Y6={};function Z6(e,t){te.deprecationHandler!=null&&te.deprecationHandler(e,t),Y6[e]||(K6(t),Y6[e]=!0)}te.suppressDeprecationWarnings=!1,te.deprecationHandler=null;function ln(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Sz(e){var t,r;for(r in e)He(e,r)&&(t=e[r],ln(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function w0(e,t){var r=fs({},e),n;for(n in t)He(t,n)&&(la(e[n])&&la(t[n])?(r[n]={},fs(r[n],e[n]),fs(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)He(e,n)&&!He(t,n)&&la(e[n])&&(r[n]=fs({},r[n]));return r}function v0(e){e!=null&&this.set(e)}var E0;Object.keys?E0=Object.keys:E0=function(e){var t,r=[];for(t in e)He(e,t)&&r.push(t);return r};var Pz={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Iz(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return ln(n)?n.call(t,r):n}function un(e,t,r){var n=""+Math.abs(e),s=t-n.length,a=e>=0;return(a?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var k0=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,xu=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,C0={},uo={};function ue(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(uo[e]=s),t&&(uo[t[0]]=function(){return un(s.apply(this,arguments),t[1],t[2])}),r&&(uo[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function Bz(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Fz(e){var t=e.match(k0),r,n;for(r=0,n=t.length;r<n;r++)uo[t[r]]?t[r]=uo[t[r]]:t[r]=Bz(t[r]);return function(s){var a="",o;for(o=0;o<n;o++)a+=ln(t[o])?t[o].call(s,e):t[o];return a}}function wu(e,t){return e.isValid()?(t=X6(t,e.localeData()),C0[t]=C0[t]||Fz(t),C0[t](e)):e.localeData().invalidDate()}function X6(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(xu.lastIndex=0;r>=0&&xu.test(e);)e=e.replace(xu,n),xu.lastIndex=0,r-=1;return e}var Oz={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Uz(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(k0).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var Dz="Invalid date";function _z(){return this._invalidDate}var Mz="%d",Nz=/\d{1,2}/;function Lz(e){return this._ordinal.replace("%d",e)}var zz={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Rz(e,t,r,n){var s=this._relativeTime[r];return ln(s)?s(e,t,r,n):s.replace(/%d/i,e)}function Hz(e,t){var r=this._relativeTime[e>0?"future":"past"];return ln(r)?r(t):r.replace(/%s/i,t)}var Q6={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Cr(e){return typeof e=="string"?Q6[e]||Q6[e.toLowerCase()]:void 0}function T0(e){var t={},r,n;for(n in e)He(e,n)&&(r=Cr(n),r&&(t[r]=e[n]));return t}var $z={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Gz(e){var t=[],r;for(r in e)He(e,r)&&t.push({unit:r,priority:$z[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var J6=/\d/,mr=/\d\d/,e2=/\d{3}/,A0=/\d{4}/,vu=/[+-]?\d{6}/,Je=/\d\d?/,t2=/\d\d\d\d?/,r2=/\d\d\d\d\d\d?/,Eu=/\d{1,3}/,S0=/\d{1,4}/,ku=/[+-]?\d{1,6}/,po=/\d+/,Cu=/[+-]?\d+/,jz=/Z|[+-]\d\d:?\d\d/gi,Tu=/Z|[+-]\d\d(?::?\d\d)?/gi,Vz=/[+-]?\d+(\.\d{1,3})?/,tc=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,fo=/^[1-9]\d?/,P0=/^([1-9]\d|\d)/,Au;Au={};function ae(e,t,r){Au[e]=ln(t)?t:function(n,s){return n&&r?r:t}}function Wz(e,t){return He(Au,e)?Au[e](t._strict,t._locale):new RegExp(qz(e))}function qz(e){return Mn(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,a){return r||n||s||a}))}function Mn(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Tr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Fe(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Tr(t)),r}var I0={};function qe(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),_n(t)&&(n=function(a,o){o[t]=Fe(a)}),s=e.length,r=0;r<s;r++)I0[e[r]]=n}function rc(e,t){qe(e,function(r,n,s,a){s._w=s._w||{},t(r,s._w,s,a)})}function Kz(e,t,r){t!=null&&He(I0,e)&&I0[e](t,r._a,r,e)}function Su(e){return e%4===0&&e%100!==0||e%400===0}var Lt=0,Nn=1,dn=2,Tt=3,Vr=4,Ln=5,ua=6,Yz=7,Zz=8;ue("Y",0,0,function(){var e=this.year();return e<=9999?un(e,4):"+"+e}),ue(0,["YY",2],0,function(){return this.year()%100}),ue(0,["YYYY",4],0,"year"),ue(0,["YYYYY",5],0,"year"),ue(0,["YYYYYY",6,!0],0,"year"),ae("Y",Cu),ae("YY",Je,mr),ae("YYYY",S0,A0),ae("YYYYY",ku,vu),ae("YYYYYY",ku,vu),qe(["YYYYY","YYYYYY"],Lt),qe("YYYY",function(e,t){t[Lt]=e.length===2?te.parseTwoDigitYear(e):Fe(e)}),qe("YY",function(e,t){t[Lt]=te.parseTwoDigitYear(e)}),qe("Y",function(e,t){t[Lt]=parseInt(e,10)});function nc(e){return Su(e)?366:365}te.parseTwoDigitYear=function(e){return Fe(e)+(Fe(e)>68?1900:2e3)};var n2=mo("FullYear",!0);function Xz(){return Su(this.year())}function mo(e,t){return function(r){return r!=null?(s2(this,e,r),te.updateOffset(this,t),this):sc(this,e)}}function sc(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function s2(e,t,r){var n,s,a,o,i;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}a=r,o=e.month(),i=e.date(),i=i===29&&o===1&&!Su(a)?28:i,s?n.setUTCFullYear(a,o,i):n.setFullYear(a,o,i)}}function Qz(e){return e=Cr(e),ln(this[e])?this[e]():this}function Jz(e,t){if(typeof e=="object"){e=T0(e);var r=Gz(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=Cr(e),ln(this[e]))return this[e](t);return this}function eR(e,t){return(e%t+t)%t}var gt;Array.prototype.indexOf?gt=Array.prototype.indexOf:gt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function B0(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=eR(t,12);return e+=(t-r)/12,r===1?Su(e)?29:28:31-r%7%2}ue("M",["MM",2],"Mo",function(){return this.month()+1}),ue("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),ue("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ae("M",Je,fo),ae("MM",Je,mr),ae("MMM",function(e,t){return t.monthsShortRegex(e)}),ae("MMMM",function(e,t){return t.monthsRegex(e)}),qe(["M","MM"],function(e,t){t[Nn]=Fe(e)-1}),qe(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[Nn]=s:ke(r).invalidMonth=e});var tR="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),a2="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),o2=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,rR=tc,nR=tc;function sR(e,t){return e?Gr(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||o2).test(t)?"format":"standalone"][e.month()]:Gr(this._months)?this._months:this._months.standalone}function aR(e,t){return e?Gr(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[o2.test(t)?"format":"standalone"][e.month()]:Gr(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function oR(e,t,r){var n,s,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)a=cn([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").toLocaleLowerCase();return r?t==="MMM"?(s=gt.call(this._shortMonthsParse,o),s!==-1?s:null):(s=gt.call(this._longMonthsParse,o),s!==-1?s:null):t==="MMM"?(s=gt.call(this._shortMonthsParse,o),s!==-1?s:(s=gt.call(this._longMonthsParse,o),s!==-1?s:null)):(s=gt.call(this._longMonthsParse,o),s!==-1?s:(s=gt.call(this._shortMonthsParse,o),s!==-1?s:null))}function iR(e,t,r){var n,s,a;if(this._monthsParseExact)return oR.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=cn([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(a="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function i2(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Fe(t);else if(t=e.localeData().monthsParse(t),!_n(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,B0(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function c2(e){return e!=null?(i2(this,e),te.updateOffset(this,!0),this):sc(this,"Month")}function cR(){return B0(this.year(),this.month())}function lR(e){return this._monthsParseExact?(He(this,"_monthsRegex")||l2.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(He(this,"_monthsShortRegex")||(this._monthsShortRegex=rR),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function uR(e){return this._monthsParseExact?(He(this,"_monthsRegex")||l2.call(this),e?this._monthsStrictRegex:this._monthsRegex):(He(this,"_monthsRegex")||(this._monthsRegex=nR),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function l2(){function e(c,l){return l.length-c.length}var t=[],r=[],n=[],s,a,o,i;for(s=0;s<12;s++)a=cn([2e3,s]),o=Mn(this.monthsShort(a,"")),i=Mn(this.months(a,"")),t.push(o),r.push(i),n.push(i),n.push(o);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function dR(e,t,r,n,s,a,o){var i;return e<100&&e>=0?(i=new Date(e+400,t,r,n,s,a,o),isFinite(i.getFullYear())&&i.setFullYear(e)):i=new Date(e,t,r,n,s,a,o),i}function ac(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Pu(e,t,r){var n=7+t-r,s=(7+ac(e,0,n).getUTCDay()-t)%7;return-s+n-1}function u2(e,t,r,n,s){var a=(7+r-n)%7,o=Pu(e,n,s),i=1+7*(t-1)+a+o,c,l;return i<=0?(c=e-1,l=nc(c)+i):i>nc(e)?(c=e+1,l=i-nc(e)):(c=e,l=i),{year:c,dayOfYear:l}}function oc(e,t,r){var n=Pu(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,a,o;return s<1?(o=e.year()-1,a=s+zn(o,t,r)):s>zn(e.year(),t,r)?(a=s-zn(e.year(),t,r),o=e.year()+1):(o=e.year(),a=s),{week:a,year:o}}function zn(e,t,r){var n=Pu(e,t,r),s=Pu(e+1,t,r);return(nc(e)-n+s)/7}ue("w",["ww",2],"wo","week"),ue("W",["WW",2],"Wo","isoWeek"),ae("w",Je,fo),ae("ww",Je,mr),ae("W",Je,fo),ae("WW",Je,mr),rc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Fe(e)});function pR(e){return oc(e,this._week.dow,this._week.doy).week}var fR={dow:0,doy:6};function mR(){return this._week.dow}function hR(){return this._week.doy}function bR(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function yR(e){var t=oc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}ue("d",0,"do","day"),ue("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),ue("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),ue("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),ue("e",0,0,"weekday"),ue("E",0,0,"isoWeekday"),ae("d",Je),ae("e",Je),ae("E",Je),ae("dd",function(e,t){return t.weekdaysMinRegex(e)}),ae("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ae("dddd",function(e,t){return t.weekdaysRegex(e)}),rc(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:ke(r).invalidWeekday=e}),rc(["d","e","E"],function(e,t,r,n){t[n]=Fe(e)});function gR(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function xR(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function F0(e,t){return e.slice(t,7).concat(e.slice(0,t))}var wR="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),d2="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),vR="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ER=tc,kR=tc,CR=tc;function TR(e,t){var r=Gr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?F0(r,this._week.dow):e?r[e.day()]:r}function AR(e){return e===!0?F0(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function SR(e){return e===!0?F0(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function PR(e,t,r){var n,s,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=cn([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?t==="dddd"?(s=gt.call(this._weekdaysParse,o),s!==-1?s:null):t==="ddd"?(s=gt.call(this._shortWeekdaysParse,o),s!==-1?s:null):(s=gt.call(this._minWeekdaysParse,o),s!==-1?s:null):t==="dddd"?(s=gt.call(this._weekdaysParse,o),s!==-1||(s=gt.call(this._shortWeekdaysParse,o),s!==-1)?s:(s=gt.call(this._minWeekdaysParse,o),s!==-1?s:null)):t==="ddd"?(s=gt.call(this._shortWeekdaysParse,o),s!==-1||(s=gt.call(this._weekdaysParse,o),s!==-1)?s:(s=gt.call(this._minWeekdaysParse,o),s!==-1?s:null)):(s=gt.call(this._minWeekdaysParse,o),s!==-1||(s=gt.call(this._weekdaysParse,o),s!==-1)?s:(s=gt.call(this._shortWeekdaysParse,o),s!==-1?s:null))}function IR(e,t,r){var n,s,a;if(this._weekdaysParseExact)return PR.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=cn([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function BR(e){if(!this.isValid())return e!=null?this:NaN;var t=sc(this,"Day");return e!=null?(e=gR(e,this.localeData()),this.add(e-t,"d")):t}function FR(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function OR(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=xR(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function UR(e){return this._weekdaysParseExact?(He(this,"_weekdaysRegex")||O0.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(He(this,"_weekdaysRegex")||(this._weekdaysRegex=ER),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function DR(e){return this._weekdaysParseExact?(He(this,"_weekdaysRegex")||O0.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(He(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=kR),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function _R(e){return this._weekdaysParseExact?(He(this,"_weekdaysRegex")||O0.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(He(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=CR),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function O0(){function e(u,d){return d.length-u.length}var t=[],r=[],n=[],s=[],a,o,i,c,l;for(a=0;a<7;a++)o=cn([2e3,1]).day(a),i=Mn(this.weekdaysMin(o,"")),c=Mn(this.weekdaysShort(o,"")),l=Mn(this.weekdays(o,"")),t.push(i),r.push(c),n.push(l),s.push(i),s.push(c),s.push(l);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function U0(){return this.hours()%12||12}function MR(){return this.hours()||24}ue("H",["HH",2],0,"hour"),ue("h",["hh",2],0,U0),ue("k",["kk",2],0,MR),ue("hmm",0,0,function(){return""+U0.apply(this)+un(this.minutes(),2)}),ue("hmmss",0,0,function(){return""+U0.apply(this)+un(this.minutes(),2)+un(this.seconds(),2)}),ue("Hmm",0,0,function(){return""+this.hours()+un(this.minutes(),2)}),ue("Hmmss",0,0,function(){return""+this.hours()+un(this.minutes(),2)+un(this.seconds(),2)});function p2(e,t){ue(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}p2("a",!0),p2("A",!1);function f2(e,t){return t._meridiemParse}ae("a",f2),ae("A",f2),ae("H",Je,P0),ae("h",Je,fo),ae("k",Je,fo),ae("HH",Je,mr),ae("hh",Je,mr),ae("kk",Je,mr),ae("hmm",t2),ae("hmmss",r2),ae("Hmm",t2),ae("Hmmss",r2),qe(["H","HH"],Tt),qe(["k","kk"],function(e,t,r){var n=Fe(e);t[Tt]=n===24?0:n}),qe(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),qe(["h","hh"],function(e,t,r){t[Tt]=Fe(e),ke(r).bigHour=!0}),qe("hmm",function(e,t,r){var n=e.length-2;t[Tt]=Fe(e.substr(0,n)),t[Vr]=Fe(e.substr(n)),ke(r).bigHour=!0}),qe("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Tt]=Fe(e.substr(0,n)),t[Vr]=Fe(e.substr(n,2)),t[Ln]=Fe(e.substr(s)),ke(r).bigHour=!0}),qe("Hmm",function(e,t,r){var n=e.length-2;t[Tt]=Fe(e.substr(0,n)),t[Vr]=Fe(e.substr(n))}),qe("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[Tt]=Fe(e.substr(0,n)),t[Vr]=Fe(e.substr(n,2)),t[Ln]=Fe(e.substr(s))});function NR(e){return(e+"").toLowerCase().charAt(0)==="p"}var LR=/[ap]\.?m?\.?/i,zR=mo("Hours",!0);function RR(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var m2={calendar:Pz,longDateFormat:Oz,invalidDate:Dz,ordinal:Mz,dayOfMonthOrdinalParse:Nz,relativeTime:zz,months:tR,monthsShort:a2,week:fR,weekdays:wR,weekdaysMin:vR,weekdaysShort:d2,meridiemParse:LR},st={},ic={},cc;function HR(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function h2(e){return e&&e.toLowerCase().replace("_","-")}function $R(e){for(var t=0,r,n,s,a;t<e.length;){for(a=h2(e[t]).split("-"),r=a.length,n=h2(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Iu(a.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&HR(a,n)>=r-1)break;r--}t++}return cc}function GR(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Iu(e){var t=null,r;if(st[e]===void 0&&typeof module<"u"&&module&&module.exports&&GR(e))try{t=cc._abbr,r=require,r("./locale/"+e),ms(t)}catch{st[e]=null}return st[e]}function ms(e,t){var r;return e&&(tr(t)?r=Rn(e):r=D0(e,t),r?cc=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),cc._abbr}function D0(e,t){if(t!==null){var r,n=m2;if(t.abbr=e,st[e]!=null)Z6("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=st[e]._config;else if(t.parentLocale!=null)if(st[t.parentLocale]!=null)n=st[t.parentLocale]._config;else if(r=Iu(t.parentLocale),r!=null)n=r._config;else return ic[t.parentLocale]||(ic[t.parentLocale]=[]),ic[t.parentLocale].push({name:e,config:t}),null;return st[e]=new v0(w0(n,t)),ic[e]&&ic[e].forEach(function(s){D0(s.name,s.config)}),ms(e),st[e]}else return delete st[e],null}function jR(e,t){if(t!=null){var r,n,s=m2;st[e]!=null&&st[e].parentLocale!=null?st[e].set(w0(st[e]._config,t)):(n=Iu(e),n!=null&&(s=n._config),t=w0(s,t),n==null&&(t.abbr=e),r=new v0(t),r.parentLocale=st[e],st[e]=r),ms(e)}else st[e]!=null&&(st[e].parentLocale!=null?(st[e]=st[e].parentLocale,e===ms()&&ms(e)):st[e]!=null&&delete st[e]);return st[e]}function Rn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return cc;if(!Gr(e)){if(t=Iu(e),t)return t;e=[e]}return $R(e)}function VR(){return E0(st)}function _0(e){var t,r=e._a;return r&&ke(e).overflow===-2&&(t=r[Nn]<0||r[Nn]>11?Nn:r[dn]<1||r[dn]>B0(r[Lt],r[Nn])?dn:r[Tt]<0||r[Tt]>24||r[Tt]===24&&(r[Vr]!==0||r[Ln]!==0||r[ua]!==0)?Tt:r[Vr]<0||r[Vr]>59?Vr:r[Ln]<0||r[Ln]>59?Ln:r[ua]<0||r[ua]>999?ua:-1,ke(e)._overflowDayOfYear&&(t<Lt||t>dn)&&(t=dn),ke(e)._overflowWeeks&&t===-1&&(t=Yz),ke(e)._overflowWeekday&&t===-1&&(t=Zz),ke(e).overflow=t),e}var WR=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qR=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,KR=/Z|[+-]\d\d(?::?\d\d)?/,Bu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],M0=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],YR=/^\/?Date\((-?\d+)/i,ZR=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,XR={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function b2(e){var t,r,n=e._i,s=WR.exec(n)||qR.exec(n),a,o,i,c,l=Bu.length,u=M0.length;if(s){for(ke(e).iso=!0,t=0,r=l;t<r;t++)if(Bu[t][1].exec(s[1])){o=Bu[t][0],a=Bu[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(s[3]){for(t=0,r=u;t<r;t++)if(M0[t][1].exec(s[3])){i=(s[2]||" ")+M0[t][0];break}if(i==null){e._isValid=!1;return}}if(!a&&i!=null){e._isValid=!1;return}if(s[4])if(KR.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=o+(i||"")+(c||""),L0(e)}else e._isValid=!1}function QR(e,t,r,n,s,a){var o=[JR(e),a2.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return a&&o.push(parseInt(a,10)),o}function JR(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function eH(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function tH(e,t,r){if(e){var n=d2.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return ke(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function rH(e,t,r){if(e)return XR[e];if(t)return 0;var n=parseInt(r,10),s=n%100,a=(n-s)/100;return a*60+s}function y2(e){var t=ZR.exec(eH(e._i)),r;if(t){if(r=QR(t[4],t[3],t[2],t[5],t[6],t[7]),!tH(t[1],r,e))return;e._a=r,e._tzm=rH(t[8],t[9],t[10]),e._d=ac.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ke(e).rfc2822=!0}else e._isValid=!1}function nH(e){var t=YR.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(b2(e),e._isValid===!1)delete e._isValid;else return;if(y2(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:te.createFromInputFallback(e)}te.createFromInputFallback=kr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ho(e,t,r){return e??t??r}function sH(e){var t=new Date(te.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function N0(e){var t,r,n=[],s,a,o;if(!e._d){for(s=sH(e),e._w&&e._a[dn]==null&&e._a[Nn]==null&&aH(e),e._dayOfYear!=null&&(o=ho(e._a[Lt],s[Lt]),(e._dayOfYear>nc(o)||e._dayOfYear===0)&&(ke(e)._overflowDayOfYear=!0),r=ac(o,0,e._dayOfYear),e._a[Nn]=r.getUTCMonth(),e._a[dn]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Tt]===24&&e._a[Vr]===0&&e._a[Ln]===0&&e._a[ua]===0&&(e._nextDay=!0,e._a[Tt]=0),e._d=(e._useUTC?ac:dR).apply(null,n),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Tt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(ke(e).weekdayMismatch=!0)}}function aH(e){var t,r,n,s,a,o,i,c,l;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,r=ho(t.GG,e._a[Lt],oc(et(),1,4).year),n=ho(t.W,1),s=ho(t.E,1),(s<1||s>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=oc(et(),a,o),r=ho(t.gg,e._a[Lt],l.year),n=ho(t.w,l.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+a,(t.e<0||t.e>6)&&(c=!0)):s=a),n<1||n>zn(r,a,o)?ke(e)._overflowWeeks=!0:c!=null?ke(e)._overflowWeekday=!0:(i=u2(r,n,s,a,o),e._a[Lt]=i.year,e._dayOfYear=i.dayOfYear)}te.ISO_8601=function(){},te.RFC_2822=function(){};function L0(e){if(e._f===te.ISO_8601){b2(e);return}if(e._f===te.RFC_2822){y2(e);return}e._a=[],ke(e).empty=!0;var t=""+e._i,r,n,s,a,o,i=t.length,c=0,l,u;for(s=X6(e._f,e._locale).match(k0)||[],u=s.length,r=0;r<u;r++)a=s[r],n=(t.match(Wz(a,e))||[])[0],n&&(o=t.substr(0,t.indexOf(n)),o.length>0&&ke(e).unusedInput.push(o),t=t.slice(t.indexOf(n)+n.length),c+=n.length),uo[a]?(n?ke(e).empty=!1:ke(e).unusedTokens.push(a),Kz(a,n,e)):e._strict&&!n&&ke(e).unusedTokens.push(a);ke(e).charsLeftOver=i-c,t.length>0&&ke(e).unusedInput.push(t),e._a[Tt]<=12&&ke(e).bigHour===!0&&e._a[Tt]>0&&(ke(e).bigHour=void 0),ke(e).parsedDateParts=e._a.slice(0),ke(e).meridiem=e._meridiem,e._a[Tt]=oH(e._locale,e._a[Tt],e._meridiem),l=ke(e).era,l!==null&&(e._a[Lt]=e._locale.erasConvertYear(l,e._a[Lt])),N0(e),_0(e)}function oH(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function iH(e){var t,r,n,s,a,o,i=!1,c=e._f.length;if(c===0){ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)a=0,o=!1,t=x0({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],L0(t),y0(t)&&(o=!0),a+=ke(t).charsLeftOver,a+=ke(t).unusedTokens.length*10,ke(t).score=a,i?a<n&&(n=a,r=t):(n==null||a<n||o)&&(n=a,r=t,o&&(i=!0));fs(e,r||t)}function cH(e){if(!e._d){var t=T0(e._i),r=t.day===void 0?t.date:t.day;e._a=W6([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),N0(e)}}function lH(e){var t=new ec(_0(g2(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function g2(e){var t=e._i,r=e._f;return e._locale=e._locale||Rn(e._l),t===null||r===void 0&&t===""?gu({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),jr(t)?new ec(_0(t)):(Ji(t)?e._d=t:Gr(r)?iH(e):r?L0(e):uH(e),y0(e)||(e._d=null),e))}function uH(e){var t=e._i;tr(t)?e._d=new Date(te.now()):Ji(t)?e._d=new Date(t.valueOf()):typeof t=="string"?nH(e):Gr(t)?(e._a=W6(t.slice(0),function(r){return parseInt(r,10)}),N0(e)):la(t)?cH(e):_n(t)?e._d=new Date(t):te.createFromInputFallback(e)}function x2(e,t,r,n,s){var a={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(la(e)&&h0(e)||Gr(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=s,a._l=r,a._i=e,a._f=t,a._strict=n,lH(a)}function et(e,t,r,n){return x2(e,t,r,n,!1)}var dH=kr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=et.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:gu()}),pH=kr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=et.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:gu()});function w2(e,t){var r,n;if(t.length===1&&Gr(t[0])&&(t=t[0]),!t.length)return et();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function fH(){var e=[].slice.call(arguments,0);return w2("isBefore",e)}function mH(){var e=[].slice.call(arguments,0);return w2("isAfter",e)}var hH=function(){return Date.now?Date.now():+new Date},lc=["year","quarter","month","week","day","hour","minute","second","millisecond"];function bH(e){var t,r=!1,n,s=lc.length;for(t in e)if(He(e,t)&&!(gt.call(lc,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[lc[n]]){if(r)return!1;parseFloat(e[lc[n]])!==Fe(e[lc[n]])&&(r=!0)}return!0}function yH(){return this._isValid}function gH(){return Wr(NaN)}function Fu(e){var t=T0(e),r=t.year||0,n=t.quarter||0,s=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,i=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=bH(t),this._milliseconds=+u+l*1e3+c*6e4+i*1e3*60*60,this._days=+o+a*7,this._months=+s+n*3+r*12,this._data={},this._locale=Rn(),this._bubble()}function Ou(e){return e instanceof Fu}function z0(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function xH(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0,o;for(o=0;o<n;o++)Fe(e[o])!==Fe(t[o])&&a++;return a+s}function v2(e,t){ue(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+un(~~(r/60),2)+t+un(~~r%60,2)})}v2("Z",":"),v2("ZZ",""),ae("Z",Tu),ae("ZZ",Tu),qe(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=R0(Tu,e)});var wH=/([\+\-]|\d\d)/gi;function R0(e,t){var r=(t||"").match(e),n,s,a;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(wH)||["-",0,0],a=+(s[1]*60)+Fe(s[2]),a===0?0:s[0]==="+"?a:-a)}function H0(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(jr(e)||Ji(e)?e.valueOf():et(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),te.updateOffset(r,!1),r):et(e).local()}function $0(e){return-Math.round(e._d.getTimezoneOffset())}te.updateOffset=function(){};function vH(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=R0(Tu,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=$0(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?T2(this,Wr(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,te.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:$0(this)}function EH(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function kH(e){return this.utcOffset(0,e)}function CH(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract($0(this),"m")),this}function TH(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=R0(jz,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function AH(e){return this.isValid()?(e=e?et(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function SH(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function PH(){if(!tr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return x0(e,this),e=g2(e),e._a?(t=e._isUTC?cn(e._a):et(e._a),this._isDSTShifted=this.isValid()&&xH(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function IH(){return this.isValid()?!this._isUTC:!1}function BH(){return this.isValid()?this._isUTC:!1}function E2(){return this.isValid()?this._isUTC&&this._offset===0:!1}var FH=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,OH=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wr(e,t){var r=e,n=null,s,a,o;return Ou(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:_n(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=FH.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:Fe(n[dn])*s,h:Fe(n[Tt])*s,m:Fe(n[Vr])*s,s:Fe(n[Ln])*s,ms:Fe(z0(n[ua]*1e3))*s}):(n=OH.exec(e))?(s=n[1]==="-"?-1:1,r={y:da(n[2],s),M:da(n[3],s),w:da(n[4],s),d:da(n[5],s),h:da(n[6],s),m:da(n[7],s),s:da(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(o=UH(et(r.from),et(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),a=new Fu(r),Ou(e)&&He(e,"_locale")&&(a._locale=e._locale),Ou(e)&&He(e,"_isValid")&&(a._isValid=e._isValid),a}Wr.fn=Fu.prototype,Wr.invalid=gH;function da(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function k2(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function UH(e,t){var r;return e.isValid()&&t.isValid()?(t=H0(t,e),e.isBefore(t)?r=k2(e,t):(r=k2(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function C2(e,t){return function(r,n){var s,a;return n!==null&&!isNaN(+n)&&(Z6(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=r,r=n,n=a),s=Wr(r,n),T2(this,s,e),this}}function T2(e,t,r,n){var s=t._milliseconds,a=z0(t._days),o=z0(t._months);e.isValid()&&(n=n??!0,o&&i2(e,sc(e,"Month")+o*r),a&&s2(e,"Date",sc(e,"Date")+a*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&te.updateOffset(e,a||o))}var DH=C2(1,"add"),_H=C2(-1,"subtract");function A2(e){return typeof e=="string"||e instanceof String}function MH(e){return jr(e)||Ji(e)||A2(e)||_n(e)||LH(e)||NH(e)||e===null||e===void 0}function NH(e){var t=la(e)&&!h0(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,a,o=n.length;for(s=0;s<o;s+=1)a=n[s],r=r||He(e,a);return t&&r}function LH(e){var t=Gr(e),r=!1;return t&&(r=e.filter(function(n){return!_n(n)&&A2(e)}).length===0),t&&r}function zH(e){var t=la(e)&&!h0(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,a;for(s=0;s<n.length;s+=1)a=n[s],r=r||He(e,a);return t&&r}function RH(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function HH(e,t){arguments.length===1&&(arguments[0]?MH(arguments[0])?(e=arguments[0],t=void 0):zH(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||et(),n=H0(r,this).startOf("day"),s=te.calendarFormat(this,n)||"sameElse",a=t&&(ln(t[s])?t[s].call(this,r):t[s]);return this.format(a||this.localeData().calendar(s,this,et(r)))}function $H(){return new ec(this)}function GH(e,t){var r=jr(e)?e:et(e);return this.isValid()&&r.isValid()?(t=Cr(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function jH(e,t){var r=jr(e)?e:et(e);return this.isValid()&&r.isValid()?(t=Cr(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function VH(e,t,r,n){var s=jr(e)?e:et(e),a=jr(t)?t:et(t);return this.isValid()&&s.isValid()&&a.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(a,r):!this.isAfter(a,r))):!1}function WH(e,t){var r=jr(e)?e:et(e),n;return this.isValid()&&r.isValid()?(t=Cr(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function qH(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function KH(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function YH(e,t,r){var n,s,a;if(!this.isValid())return NaN;if(n=H0(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=Cr(t),t){case"year":a=Uu(this,n)/12;break;case"month":a=Uu(this,n);break;case"quarter":a=Uu(this,n)/3;break;case"second":a=(this-n)/1e3;break;case"minute":a=(this-n)/6e4;break;case"hour":a=(this-n)/36e5;break;case"day":a=(this-n-s)/864e5;break;case"week":a=(this-n-s)/6048e5;break;default:a=this-n}return r?a:Tr(a)}function Uu(e,t){if(e.date()<t.date())return-Uu(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,a;return t-n<0?(s=e.clone().add(r-1,"months"),a=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),a=(t-n)/(s-n)),-(r+a)||0}te.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",te.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function ZH(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function XH(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?wu(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ln(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",wu(r,"Z")):wu(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function QH(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",a=t+'[")]',this.format(r+n+s+a)}function JH(e){e||(e=this.isUtc()?te.defaultFormatUtc:te.defaultFormat);var t=wu(this,e);return this.localeData().postformat(t)}function e$(e,t){return this.isValid()&&(jr(e)&&e.isValid()||et(e).isValid())?Wr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function t$(e){return this.from(et(),e)}function r$(e,t){return this.isValid()&&(jr(e)&&e.isValid()||et(e).isValid())?Wr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function n$(e){return this.to(et(),e)}function S2(e){var t;return e===void 0?this._locale._abbr:(t=Rn(e),t!=null&&(this._locale=t),this)}var P2=kr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function I2(){return this._locale}var Du=1e3,bo=60*Du,_u=60*bo,B2=(365*400+97)*24*_u;function yo(e,t){return(e%t+t)%t}function F2(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-B2:new Date(e,t,r).valueOf()}function O2(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-B2:Date.UTC(e,t,r)}function s$(e){var t,r;if(e=Cr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?O2:F2,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=yo(t+(this._isUTC?0:this.utcOffset()*bo),_u);break;case"minute":t=this._d.valueOf(),t-=yo(t,bo);break;case"second":t=this._d.valueOf(),t-=yo(t,Du);break}return this._d.setTime(t),te.updateOffset(this,!0),this}function a$(e){var t,r;if(e=Cr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?O2:F2,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=_u-yo(t+(this._isUTC?0:this.utcOffset()*bo),_u)-1;break;case"minute":t=this._d.valueOf(),t+=bo-yo(t,bo)-1;break;case"second":t=this._d.valueOf(),t+=Du-yo(t,Du)-1;break}return this._d.setTime(t),te.updateOffset(this,!0),this}function o$(){return this._d.valueOf()-(this._offset||0)*6e4}function i$(){return Math.floor(this.valueOf()/1e3)}function c$(){return new Date(this.valueOf())}function l$(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function u$(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function d$(){return this.isValid()?this.toISOString():null}function p$(){return y0(this)}function f$(){return fs({},ke(this))}function m$(){return ke(this).overflow}function h$(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ue("N",0,0,"eraAbbr"),ue("NN",0,0,"eraAbbr"),ue("NNN",0,0,"eraAbbr"),ue("NNNN",0,0,"eraName"),ue("NNNNN",0,0,"eraNarrow"),ue("y",["y",1],"yo","eraYear"),ue("y",["yy",2],0,"eraYear"),ue("y",["yyy",3],0,"eraYear"),ue("y",["yyyy",4],0,"eraYear"),ae("N",G0),ae("NN",G0),ae("NNN",G0),ae("NNNN",A$),ae("NNNNN",S$),qe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?ke(r).era=s:ke(r).invalidEra=e}),ae("y",po),ae("yy",po),ae("yyy",po),ae("yyyy",po),ae("yo",P$),qe(["y","yy","yyy","yyyy"],Lt),qe(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Lt]=r._locale.eraYearOrdinalParse(e,s):t[Lt]=parseInt(e,10)});function b$(e,t){var r,n,s,a=this._eras||Rn("en")._eras;for(r=0,n=a.length;r<n;++r){switch(typeof a[r].since){case"string":s=te(a[r].since).startOf("day"),a[r].since=s.valueOf();break}switch(typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":s=te(a[r].until).startOf("day").valueOf(),a[r].until=s.valueOf();break}}return a}function y$(e,t,r){var n,s,a=this.eras(),o,i,c;for(e=e.toUpperCase(),n=0,s=a.length;n<s;++n)if(o=a[n].name.toUpperCase(),i=a[n].abbr.toUpperCase(),c=a[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(i===e)return a[n];break;case"NNNN":if(o===e)return a[n];break;case"NNNNN":if(c===e)return a[n];break}else if([o,i,c].indexOf(e)>=0)return a[n]}function g$(e,t){var r=e.since<=e.until?1:-1;return t===void 0?te(e.since).year():te(e.since).year()+(t-e.offset)*r}function x$(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function w$(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function v$(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function E$(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-te(s[e].since).year())*r+s[e].offset;return this.year()}function k$(e){return He(this,"_erasNameRegex")||j0.call(this),e?this._erasNameRegex:this._erasRegex}function C$(e){return He(this,"_erasAbbrRegex")||j0.call(this),e?this._erasAbbrRegex:this._erasRegex}function T$(e){return He(this,"_erasNarrowRegex")||j0.call(this),e?this._erasNarrowRegex:this._erasRegex}function G0(e,t){return t.erasAbbrRegex(e)}function A$(e,t){return t.erasNameRegex(e)}function S$(e,t){return t.erasNarrowRegex(e)}function P$(e,t){return t._eraYearOrdinalRegex||po}function j0(){var e=[],t=[],r=[],n=[],s,a,o,i,c,l=this.eras();for(s=0,a=l.length;s<a;++s)o=Mn(l[s].name),i=Mn(l[s].abbr),c=Mn(l[s].narrow),t.push(o),e.push(i),r.push(c),n.push(o),n.push(i),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}ue(0,["gg",2],0,function(){return this.weekYear()%100}),ue(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Mu(e,t){ue(0,[e,e.length],0,t)}Mu("gggg","weekYear"),Mu("ggggg","weekYear"),Mu("GGGG","isoWeekYear"),Mu("GGGGG","isoWeekYear"),ae("G",Cu),ae("g",Cu),ae("GG",Je,mr),ae("gg",Je,mr),ae("GGGG",S0,A0),ae("gggg",S0,A0),ae("GGGGG",ku,vu),ae("ggggg",ku,vu),rc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Fe(e)}),rc(["gg","GG"],function(e,t,r,n){t[n]=te.parseTwoDigitYear(e)});function I$(e){return U2.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function B$(e){return U2.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function F$(){return zn(this.year(),1,4)}function O$(){return zn(this.isoWeekYear(),1,4)}function U$(){var e=this.localeData()._week;return zn(this.year(),e.dow,e.doy)}function D$(){var e=this.localeData()._week;return zn(this.weekYear(),e.dow,e.doy)}function U2(e,t,r,n,s){var a;return e==null?oc(this,n,s).year:(a=zn(e,n,s),t>a&&(t=a),_$.call(this,e,t,r,n,s))}function _$(e,t,r,n,s){var a=u2(e,t,r,n,s),o=ac(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}ue("Q",0,"Qo","quarter"),ae("Q",J6),qe("Q",function(e,t){t[Nn]=(Fe(e)-1)*3});function M$(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}ue("D",["DD",2],"Do","date"),ae("D",Je,fo),ae("DD",Je,mr),ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),qe(["D","DD"],dn),qe("Do",function(e,t){t[dn]=Fe(e.match(Je)[0])});var D2=mo("Date",!0);ue("DDD",["DDDD",3],"DDDo","dayOfYear"),ae("DDD",Eu),ae("DDDD",e2),qe(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Fe(e)});function N$(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}ue("m",["mm",2],0,"minute"),ae("m",Je,P0),ae("mm",Je,mr),qe(["m","mm"],Vr);var L$=mo("Minutes",!1);ue("s",["ss",2],0,"second"),ae("s",Je,P0),ae("ss",Je,mr),qe(["s","ss"],Ln);var z$=mo("Seconds",!1);ue("S",0,0,function(){return~~(this.millisecond()/100)}),ue(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ue(0,["SSS",3],0,"millisecond"),ue(0,["SSSS",4],0,function(){return this.millisecond()*10}),ue(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ue(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ue(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ue(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ue(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ae("S",Eu,J6),ae("SS",Eu,mr),ae("SSS",Eu,e2);var hs,_2;for(hs="SSSS";hs.length<=9;hs+="S")ae(hs,po);function R$(e,t){t[ua]=Fe(("0."+e)*1e3)}for(hs="S";hs.length<=9;hs+="S")qe(hs,R$);_2=mo("Milliseconds",!1),ue("z",0,0,"zoneAbbr"),ue("zz",0,0,"zoneName");function H$(){return this._isUTC?"UTC":""}function $$(){return this._isUTC?"Coordinated Universal Time":""}var K=ec.prototype;K.add=DH,K.calendar=HH,K.clone=$H,K.diff=YH,K.endOf=a$,K.format=JH,K.from=e$,K.fromNow=t$,K.to=r$,K.toNow=n$,K.get=Qz,K.invalidAt=m$,K.isAfter=GH,K.isBefore=jH,K.isBetween=VH,K.isSame=WH,K.isSameOrAfter=qH,K.isSameOrBefore=KH,K.isValid=p$,K.lang=P2,K.locale=S2,K.localeData=I2,K.max=pH,K.min=dH,K.parsingFlags=f$,K.set=Jz,K.startOf=s$,K.subtract=_H,K.toArray=l$,K.toObject=u$,K.toDate=c$,K.toISOString=XH,K.inspect=QH,typeof Symbol<"u"&&Symbol.for!=null&&(K[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),K.toJSON=d$,K.toString=ZH,K.unix=i$,K.valueOf=o$,K.creationData=h$,K.eraName=x$,K.eraNarrow=w$,K.eraAbbr=v$,K.eraYear=E$,K.year=n2,K.isLeapYear=Xz,K.weekYear=I$,K.isoWeekYear=B$,K.quarter=K.quarters=M$,K.month=c2,K.daysInMonth=cR,K.week=K.weeks=bR,K.isoWeek=K.isoWeeks=yR,K.weeksInYear=U$,K.weeksInWeekYear=D$,K.isoWeeksInYear=F$,K.isoWeeksInISOWeekYear=O$,K.date=D2,K.day=K.days=BR,K.weekday=FR,K.isoWeekday=OR,K.dayOfYear=N$,K.hour=K.hours=zR,K.minute=K.minutes=L$,K.second=K.seconds=z$,K.millisecond=K.milliseconds=_2,K.utcOffset=vH,K.utc=kH,K.local=CH,K.parseZone=TH,K.hasAlignedHourOffset=AH,K.isDST=SH,K.isLocal=IH,K.isUtcOffset=BH,K.isUtc=E2,K.isUTC=E2,K.zoneAbbr=H$,K.zoneName=$$,K.dates=kr("dates accessor is deprecated. Use date instead.",D2),K.months=kr("months accessor is deprecated. Use month instead",c2),K.years=kr("years accessor is deprecated. Use year instead",n2),K.zone=kr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",EH),K.isDSTShifted=kr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",PH);function G$(e){return et(e*1e3)}function j$(){return et.apply(null,arguments).parseZone()}function M2(e){return e}var $e=v0.prototype;$e.calendar=Iz,$e.longDateFormat=Uz,$e.invalidDate=_z,$e.ordinal=Lz,$e.preparse=M2,$e.postformat=M2,$e.relativeTime=Rz,$e.pastFuture=Hz,$e.set=Sz,$e.eras=b$,$e.erasParse=y$,$e.erasConvertYear=g$,$e.erasAbbrRegex=C$,$e.erasNameRegex=k$,$e.erasNarrowRegex=T$,$e.months=sR,$e.monthsShort=aR,$e.monthsParse=iR,$e.monthsRegex=uR,$e.monthsShortRegex=lR,$e.week=pR,$e.firstDayOfYear=hR,$e.firstDayOfWeek=mR,$e.weekdays=TR,$e.weekdaysMin=SR,$e.weekdaysShort=AR,$e.weekdaysParse=IR,$e.weekdaysRegex=UR,$e.weekdaysShortRegex=DR,$e.weekdaysMinRegex=_R,$e.isPM=NR,$e.meridiem=RR;function Nu(e,t,r,n){var s=Rn(),a=cn().set(n,t);return s[r](a,e)}function N2(e,t,r){if(_n(e)&&(t=e,e=void 0),e=e||"",t!=null)return Nu(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Nu(e,n,r,"month");return s}function V0(e,t,r,n){typeof e=="boolean"?(_n(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,_n(t)&&(r=t,t=void 0),t=t||"");var s=Rn(),a=e?s._week.dow:0,o,i=[];if(r!=null)return Nu(t,(r+a)%7,n,"day");for(o=0;o<7;o++)i[o]=Nu(t,(o+a)%7,n,"day");return i}function V$(e,t){return N2(e,t,"months")}function W$(e,t){return N2(e,t,"monthsShort")}function q$(e,t,r){return V0(e,t,r,"weekdays")}function K$(e,t,r){return V0(e,t,r,"weekdaysShort")}function Y$(e,t,r){return V0(e,t,r,"weekdaysMin")}ms("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Fe(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),te.lang=kr("moment.lang is deprecated. Use moment.locale instead.",ms),te.langData=kr("moment.langData is deprecated. Use moment.localeData instead.",Rn);var Hn=Math.abs;function Z$(){var e=this._data;return this._milliseconds=Hn(this._milliseconds),this._days=Hn(this._days),this._months=Hn(this._months),e.milliseconds=Hn(e.milliseconds),e.seconds=Hn(e.seconds),e.minutes=Hn(e.minutes),e.hours=Hn(e.hours),e.months=Hn(e.months),e.years=Hn(e.years),this}function L2(e,t,r,n){var s=Wr(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function X$(e,t){return L2(this,e,t,1)}function Q$(e,t){return L2(this,e,t,-1)}function z2(e){return e<0?Math.floor(e):Math.ceil(e)}function J$(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,a,o,i,c;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=z2(W0(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Tr(e/1e3),n.seconds=s%60,a=Tr(s/60),n.minutes=a%60,o=Tr(a/60),n.hours=o%24,t+=Tr(o/24),c=Tr(R2(t)),r+=c,t-=z2(W0(c)),i=Tr(r/12),r%=12,n.days=t,n.months=r,n.years=i,this}function R2(e){return e*4800/146097}function W0(e){return e*146097/4800}function eG(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=Cr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+R2(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(W0(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function $n(e){return function(){return this.as(e)}}var H2=$n("ms"),tG=$n("s"),rG=$n("m"),nG=$n("h"),sG=$n("d"),aG=$n("w"),oG=$n("M"),iG=$n("Q"),cG=$n("y"),lG=H2;function uG(){return Wr(this)}function dG(e){return e=Cr(e),this.isValid()?this[e+"s"]():NaN}function pa(e){return function(){return this.isValid()?this._data[e]:NaN}}var pG=pa("milliseconds"),fG=pa("seconds"),mG=pa("minutes"),hG=pa("hours"),bG=pa("days"),yG=pa("months"),gG=pa("years");function xG(){return Tr(this.days()/7)}var Gn=Math.round,go={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function wG(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function vG(e,t,r,n){var s=Wr(e).abs(),a=Gn(s.as("s")),o=Gn(s.as("m")),i=Gn(s.as("h")),c=Gn(s.as("d")),l=Gn(s.as("M")),u=Gn(s.as("w")),d=Gn(s.as("y")),f=a<=r.ss&&["s",a]||a<r.s&&["ss",a]||o<=1&&["m"]||o<r.m&&["mm",o]||i<=1&&["h"]||i<r.h&&["hh",i]||c<=1&&["d"]||c<r.d&&["dd",c];return r.w!=null&&(f=f||u<=1&&["w"]||u<r.w&&["ww",u]),f=f||l<=1&&["M"]||l<r.M&&["MM",l]||d<=1&&["y"]||["yy",d],f[2]=t,f[3]=+e>0,f[4]=n,wG.apply(null,f)}function EG(e){return e===void 0?Gn:typeof e=="function"?(Gn=e,!0):!1}function kG(e,t){return go[e]===void 0?!1:t===void 0?go[e]:(go[e]=t,e==="s"&&(go.ss=t-1),!0)}function CG(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=go,s,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},go,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),a=vG(this,!r,n,s),r&&(a=s.pastFuture(+this,a)),s.postformat(a)}var q0=Math.abs;function xo(e){return(e>0)-(e<0)||+e}function Lu(){if(!this.isValid())return this.localeData().invalidDate();var e=q0(this._milliseconds)/1e3,t=q0(this._days),r=q0(this._months),n,s,a,o,i=this.asSeconds(),c,l,u,d;return i?(n=Tr(e/60),s=Tr(n/60),e%=60,n%=60,a=Tr(r/12),r%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=i<0?"-":"",l=xo(this._months)!==xo(i)?"-":"",u=xo(this._days)!==xo(i)?"-":"",d=xo(this._milliseconds)!==xo(i)?"-":"",c+"P"+(a?l+a+"Y":"")+(r?l+r+"M":"")+(t?u+t+"D":"")+(s||n||e?"T":"")+(s?d+s+"H":"")+(n?d+n+"M":"")+(e?d+o+"S":"")):"P0D"}var Ne=Fu.prototype;Ne.isValid=yH,Ne.abs=Z$,Ne.add=X$,Ne.subtract=Q$,Ne.as=eG,Ne.asMilliseconds=H2,Ne.asSeconds=tG,Ne.asMinutes=rG,Ne.asHours=nG,Ne.asDays=sG,Ne.asWeeks=aG,Ne.asMonths=oG,Ne.asQuarters=iG,Ne.asYears=cG,Ne.valueOf=lG,Ne._bubble=J$,Ne.clone=uG,Ne.get=dG,Ne.milliseconds=pG,Ne.seconds=fG,Ne.minutes=mG,Ne.hours=hG,Ne.days=bG,Ne.weeks=xG,Ne.months=yG,Ne.years=gG,Ne.humanize=CG,Ne.toISOString=Lu,Ne.toString=Lu,Ne.toJSON=Lu,Ne.locale=S2,Ne.localeData=I2,Ne.toIsoString=kr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Lu),Ne.lang=P2,ue("X",0,0,"unix"),ue("x",0,0,"valueOf"),ae("x",Cu),ae("X",Vz),qe("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),qe("x",function(e,t,r){r._d=new Date(Fe(e))});//! moment.js
118
- te.version="2.30.1",Tz(et),te.fn=K,te.min=fH,te.max=mH,te.now=hH,te.utc=cn,te.unix=G$,te.months=V$,te.isDate=Ji,te.locale=ms,te.invalid=gu,te.duration=Wr,te.isMoment=jr,te.weekdays=q$,te.parseZone=j$,te.localeData=Rn,te.isDuration=Ou,te.monthsShort=W$,te.weekdaysMin=Y$,te.defineLocale=D0,te.updateLocale=jR,te.locales=VR,te.weekdaysShort=K$,te.normalizeUnits=Cr,te.relativeTimeRounding=EG,te.relativeTimeThreshold=kG,te.calendarFormat=RH,te.prototype=K,te.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function TG(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}var K0;(function(e){e.event="event",e.props="prop"})(K0||(K0={}));function Y0(){}function AG(e){var t,r=void 0;return function(){for(var n=[],s=arguments.length;s--;)n[s]=arguments[s];return t&&n.length===t.length&&n.every(function(a,o){return a===t[o]})||(t=n,r=e.apply(void 0,n)),r}}function $2(e){return!!(e||"").match(/\d/)}function wo(e){return e==null}function SG(e){return typeof e=="number"&&isNaN(e)}function G2(e){return wo(e)||SG(e)||typeof e=="number"&&!isFinite(e)}function j2(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function PG(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function IG(e,t,r){var n=PG(r),s=e.search(/[1-9]/);return s=s===-1?e.length:s,e.substring(0,s)+e.substring(s,e.length).replace(n,"$1"+t)}function BG(e){var t=M.useRef(e);t.current=e;var r=M.useRef(function(){for(var n=[],s=arguments.length;s--;)n[s]=arguments[s];return t.current.apply(t,n)});return r.current}function Z0(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var s=e.split("."),a=s[0],o=s[1]||"";return{beforeDecimal:a,afterDecimal:o,hasNegation:r,addNegation:n}}function FG(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",s=r[1]||"";return(t?"-":"")+n+(s?"."+s:"")}function V2(e,t,r){for(var n="",s=r?"0":"",a=0;a<=t-1;a++)n+=e[a]||s;return n}function W2(e,t){return Array(t+1).join(e)}function q2(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),s=n[0],a=n[1];if(a=Number(a),!a)return r+s;s=s.replace(".","");var o=1+a,i=s.length;return o<0?s="0."+W2("0",Math.abs(o))+s:o>=i?s=s+W2("0",o-i):s=(s.substring(0,o)||"0")+"."+s.substring(o),r+s}function K2(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,s=Z0(e),a=s.beforeDecimal,o=s.afterDecimal,i=s.hasNegation,c=parseFloat("0."+(o||"0")),l=o.length<=t?"0."+o:c.toFixed(t),u=l.split("."),d=a;a&&Number(u[0])&&(d=a.split("").reverse().reduce(function(g,E,v){return g.length>v?(Number(g[0])+Number(E)).toString()+g.substring(1,g.length):E+g},u[0]));var f=V2(u[1]||"",t,r),m=i?"-":"",b=n?".":"";return""+m+d+b+f}function uc(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var OG=AG(function(e,t){for(var r=0,n=0,s=e.length,a=t.length;e[r]===t[r]&&r<s;)r++;for(;e[s-1-n]===t[a-1-n]&&a-n>r&&s-n>r;)n++;return{from:{start:r,end:s-n},to:{start:r,end:a-n}}});function UG(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function DG(e,t,r,n,s,a){a===void 0&&(a=Y0);var o=BG(function(b,g){var E,v;return G2(b)?(v="",E=""):typeof b=="number"||g?(v=typeof b=="number"?q2(b):b,E=n(v)):(v=s(b,void 0),E=n(v)),{formattedValue:E,numAsString:v}}),i=M.useState(function(){return o(wo(e)?t:e,r)}),c=i[0],l=i[1],u=function(b,g){b.formattedValue!==c.formattedValue&&l({formattedValue:b.formattedValue,numAsString:b.value}),a(b,g)},d=e,f=r;wo(e)&&(d=c.numAsString,f=!0);var m=o(d,f);return M.useMemo(function(){l(m)},[m.formattedValue]),[c,u]}function Y2(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,s=t.prefix;s===void 0&&(s="");var a=t.suffix;a===void 0&&(a="");var o=t.allowNegative,i=t.thousandsGroupStyle;if(i===void 0&&(i="thousand"),e===""||e==="-")return e;var c=zu(t),l=c.thousandSeparator,u=c.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,f=Z0(e,o),m=f.beforeDecimal,b=f.afterDecimal,g=f.addNegation;return r!==void 0&&(b=V2(b,r,!!n)),l&&(m=IG(m,l,i)),s&&(m=s+m),a&&(b=b+a),g&&(m="-"+m),e=m+(d&&u||"")+b,e}function zu(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function _G(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),s=r.test(e),a=n.test(e);return e=e.replace(/-/g,""),s&&!a&&t&&(e="-"+e),e}function MG(e,t){return new RegExp("(^-)|[0-9]|"+j2(e),"g")}function NG(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function LG(e,t,r){var n;t===void 0&&(t=UG(e));var s=r.allowNegative,a=r.prefix;a===void 0&&(a="");var o=r.suffix;o===void 0&&(o="");var i=r.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=zu(r),m=f.allowedDecimalSeparators,b=f.decimalSeparator,g=e[d]===b;if($2(e)&&(e===a||e===o)&&t.lastValue==="")return e;if(d-u===1&&m.indexOf(e[u])!==-1){var E=i===0?"":b;e=e.substring(0,u)+E+e.substring(u+1,e.length)}var v=function(D,U,z){var H=!1,j=!1;a.startsWith("-")?H=!1:D.startsWith("--")?(H=!1,j=!0):o.startsWith("-")&&D.length===o.length?H=!1:D[0]==="-"&&(H=!0);var Q=H?1:0;return j&&(Q=2),Q&&(D=D.substring(Q),U-=Q,z-=Q),{value:D,start:U,end:z,hasNegation:H}},w=v(e,u,d),S=w.hasNegation;n=w,e=n.value,u=n.start,d=n.end;var T=v(t.lastValue,c.start,c.end),O=T.start,L=T.end,I=T.value,h=e.substring(u,d);e.length&&I.length&&(O>I.length-o.length||L<a.length)&&!(h&&o.startsWith(h))&&(e=I);var y=0;e.startsWith(a)?y+=a.length:u<a.length&&(y=u),e=e.substring(y),d-=y;var x=e.length,A=e.length-o.length;e.endsWith(o)?x=A:(d>A||d>e.length-o.length)&&(x=d),e=e.substring(0,x),e=_G(S?"-"+e:e,s),e=(e.match(MG(b))||[]).join("");var B=e.indexOf(b);e=e.replace(new RegExp(j2(b),"g"),function(D,U){return U===B?".":""});var F=Z0(e,s),_=F.beforeDecimal,k=F.afterDecimal,P=F.addNegation;return l.end-l.start<c.end-c.start&&_===""&&g&&!parseFloat(k)&&(e=P?"-":""),e}function zG(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var s=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]==="-";s.fill(!1,0,r.length+(a?1:0));var o=e.length;return s.fill(!1,o-n.length+1,o+1),s}function RG(e){var t=zu(e),r=t.thousandSeparator,n=t.decimalSeparator,s=e.prefix;s===void 0&&(s="");var a=e.allowNegative;if(a===void 0&&(a=!0),r===n)throw new Error(`
119
- Decimal separator can't be same as thousand separator.
120
- thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
121
- decimalSeparator: `+n+` (default value for decimalSeparator is .)
122
- `);return s.startsWith("-")&&a&&(console.error(`
123
- Prefix can't start with '-' when allowNegative is true.
124
- prefix: `+s+`
125
- allowNegative: `+a+`
126
- `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function HG(e){e=RG(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=Y0);var a=e.onBlur;a===void 0&&(a=Y0);var o=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,m=e.onValueChange,b=TG(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=zu(e),E=g.decimalSeparator,v=g.allowedDecimalSeparators,w=function(P){return Y2(P,e)},S=function(P,D){return LG(P,D,e)},T=wo(d)?u:d,O=f??NG(T,l,t);wo(d)?wo(u)||(O=O||typeof u=="number"):O=O||typeof d=="number";var L=function(P){return G2(P)?P:(typeof P=="number"&&(P=q2(P)),O&&typeof i=="number"?K2(P,i,!!c):P)},I=DG(L(d),L(u),!!O,w,S,m),h=I[0],y=h.numAsString,x=h.formattedValue,A=I[1],B=function(P){var D=P.target,U=P.key,z=D.selectionStart,H=D.selectionEnd,j=D.value;if(j===void 0&&(j=""),(U==="Backspace"||U==="Delete")&&H<l.length){P.preventDefault();return}if(z!==H){s(P);return}U==="Backspace"&&j[0]==="-"&&z===l.length+1&&r&&uc(D,1),i&&c&&(U==="Backspace"&&j[z-1]===E?(uc(D,z-1),P.preventDefault()):U==="Delete"&&j[z]===E&&P.preventDefault()),v!=null&&v.includes(U)&&j[z]===E&&uc(D,z+1);var Q=o===!0?",":o;U==="Backspace"&&j[z-1]===Q&&uc(D,z-1),U==="Delete"&&j[z]===Q&&uc(D,z+1),s(P)},F=function(P){var D=y;if(D.match(/\d/g)||(D=""),n||(D=FG(D)),c&&i&&(D=K2(D,i,c)),D!==y){var U=Y2(D,e);A({formattedValue:U,value:D,floatValue:parseFloat(D)},{event:P,source:K0.event})}a(P)},_=function(P){return P===E?!0:$2(P)},k=function(P){var D=P.currentValue,U=P.lastValue,z=P.formattedValue,H=P.currentValueIndex,j=P.formattedValueIndex,Q=D[H],pe=z[j],be=OG(U,D),ie=be.to,de=function(Oe){return S(Oe).indexOf(".")+l.length};return d===0&&c&&i&&D[ie.start]===E&&de(D)<H&&de(z)>j?!1:H>=ie.start&&H<ie.end&&v&&v.includes(Q)&&pe===E?!0:Q===pe};return Object.assign(Object.assign({},b),{value:x,valueIsNumericString:!1,isValidInputCharacter:_,isCharacterSame:k,onValueChange:A,format:w,removeFormatting:S,getCaretBoundary:function(P){return zG(P,e)},onKeyDown:B,onBlur:F})}const Z2=(e,t)=>M.useMemo(()=>Nl(t,e),[e,t]),qr=(e,t)=>M.useMemo(()=>ia(t,e),[e,t]),vo=()=>{const{chainId:e}=re();return M.useMemo(()=>Ns(e),[e])},Ru=e=>{const t=vo();return M.useMemo(()=>{if(!(!e||!t))return oo(e,t.id)},[e,t])},bs=(e,t)=>M.useMemo(()=>!e||!t||G(e||"0").isZero()||G(t||"0").isZero()?"":G(e||"0").times(t).toFixed(),[e,t]),$G=()=>{const{srcToken:e,dstToken:t,chainId:r}=re();return M.useMemo(()=>Vf(e,t,r),[e,t,r])},GG=()=>{const{srcToken:e,dstToken:t,chainId:r}=re();return M.useMemo(()=>Wf(e,t,r),[e,t,r])},jG=()=>{const e=$G(),t=GG();return e||t},Hu=e=>{const{overrides:t}=re();return M.useMemo(()=>t!=null&&t.dateFormat?t.dateFormat(e||0):te(e).format("DD/MM/YYYY HH:mm"),[e,t==null?void 0:t.dateFormat])};function VG(){const{callbacks:e}=re();return M.useCallback(async t=>{var r;try{await navigator.clipboard.writeText(t),(r=e==null?void 0:e.onCopy)==null||r.call(e)}catch(n){console.error("Copy failed:",n)}},[e==null?void 0:e.onCopy])}const WG=(e,t)=>M.useMemo(()=>e6(e==null?void 0:e.toString(),t),[e,t]),Ar=({value:e,decimalScale:t=3,prefix:r,suffix:n})=>{var c;const s=WG(e,t),{overrides:a}=re(),o=a==null?void 0:a.numberFormat,i=HG({allowLeadingZeros:!0,thousandSeparator:",",displayType:"text",value:s||"",decimalScale:18,prefix:r,suffix:n});return o?o(e||""):(c=i.value)==null?void 0:c.toString()},qG={expirationTooltip:"This is the date and time marking the end of the period which you have selected for your order to be executed.",tradeSizeTooltip:"The number of input tokens that will be removed from your balance and swapped for the output token in each individual trade.",totalTradesTooltip:"The total number of individual trades that will be scheduled as part of your order. Note that in limit orders, not all trades that are scheduled will be executed.",minDstAmountTooltip:" This is the minimum number of tokens that may be received. NOTE: This minimum only refers to executed trades. Some trades may not be executed if the limit price is higher than the available market prices and your order may only be partially filled.",limitPriceTooltip:"Trades will only execute if the available market price is better than the limit price, potentially resulting in partial fills or orders remaining unfilled upon expiration.",maxDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, partially filled, or remain unfilled based on the specified parameters.",tradeIntervalTooltip:"The estimated time that will elapse between each trade in your order. Note that as this time includes an allowance of two minutes for bidder auction and block settlement, which cannot be predicted exactly, actual time may vary.",triggerPriceTooltip:"The price at which the order will be executed. If the market price is higher than the trigger price, the order will be executed at the market price.",placeOrder:"Place order",enterAmount:"Enter an amount",emptyLimitPrice:"Limit price is required",insufficientFunds:"Insufficient Balance",tradeIntervalLabel:"Trade interval",expirationLabel:"Expiration",limitPrice:"Limit Price",finalExecutionPrice:"Final execution price",marketPrice:"Market price",from:"From",to:"To",Open:"Open",Completed:"Completed",Expired:"Expired",Cancelled:"Cancelled",cancelOrder:"Cancel Order",minReceivedPerTrade:"Min. received per trade",triggerPricePerChunk:"Trigger Price per trade",maxChunksError:"Max. trades amount is {maxChunks}",minChunksError:"Min. trades amount is {minChunks}",minTradeSizeError:"Min. trade size is ${minTradeSize}",allOrders:"All",minFillDelayError:"Min. trade interval is {fillDelay}",maxFillDelayError:"Max. trade interval is {fillDelay}",recipient:"Recipient",marketOrderWarning:"Each individual trade in this order will be filled at the current market price at the time of execution.",limitPriceMessage:"Limit orders may not execute when the token's price is equal or close to the limit price, due to gas and standard swap fees.",limit:"Limit",maxDurationError:"Max. expiry is {duration}",minDurationError:"Min. expiry is {duration}",expiry:"Expiry",individualTradeSize:"Individual trade size",numberOfTrades:"No. of trades",averageExecutionPrice:"Avg. execution price",twapMarket:"TWAP-market",twapLimit:"TWAP-limit",stopLoss:"Stop-loss",stopLossMarket:"Stop-loss market",stopLossLimit:"Stop-loss limit",takeProfit:"Take-profit",minReceived:"Min. received",noOrders:"No {status} orders",noLiquidity:"No liquidity for this pair",executionSummary:"Execution summary",orderInfo:"Order info",orderFills:"Order fills",fillTransactionHash:"Transaction hash",noFills:"No fills yet",backToOrder:"Back to {type} order",fillAmountOut:"Amount out",fillAmountReceived:"Amount received",fillIndex:"Index",fillTimestamp:"Timestamp",fillTxHash:"Tx hash",wrapAction:"Wrap {symbol}",approveAction:"Approve {symbol}",createOrderAction:"Create {name} order",amountReceived:"Amount received",createdAt:"Created at",amountOut:"Amount out",status:"Status",progress:"Progress",minutes:"minutes",days:"days",tradeIntervalTitle:"Every",tradesAmountTitle:"Over",stopLossTooltip:"The trigger price at which your stop-loss order will be activated.",takeProfitTooltip:"The trigger price at which your take-profit order will be activated.",stopLossLabel:"Trigger Price",StopLossTriggerPriceError:"Trigger price must be less than market price",TakeProfitTriggerPriceError:"Trigger price must be greater than market price",triggerLimitPriceError:"Limit price must be less than trigger price",triggerPrice:"Trigger Price",tradePrice:"Trade Price",triggerMarketPriceDisclaimer:" In extreme market movements, slippage may occur and the executed price of the market order may be worse than the specified trigger price.",stopLossLimitPriceTooltip:"The stop loss order will execute at the specified limit price or better, once the stop price is triggered.",stopLossDurationTooltip:"This is the time period during which the order will be active. Please note that orders may be completed earlier than this time, or remain unfilled based on the specified parameters.",emptyTriggerPrice:"Trigger price is required",id:"ID",fees:"Fees {value}",version:"Version",maxOrderSizeError:"Max. trade size is {maxOrderSize} USD",viewOnExplorer:"View on explorer",proceedInWallet:"Proceed in wallet",wrapMsg:"Note: {symbol} was wrapped to {wSymbol}",createOrderActionSuccess:"{name} order placed"};function KG(e){let t=e;const r=/\{[^{}]*\}/g;for(;r.test(t);)t=t.replace(r,"");return t}const Ie=()=>{const e=re();return M.useCallback((r,n)=>{var o,i;const s=(o=e.getTranslation)==null?void 0:o.call(e,r,n);if(s&&s!==r)return s;const a=((i=e.translations)==null?void 0:i[r])||qG[r];return KG(a.replace(/{(\w+)}/g,(c,l)=>(n==null?void 0:n[l])||c))},[e.getTranslation,e.translations])},pn=({value:e,decimalScale:t=3,prefix:r,suffix:n,defaultValue:s="-"})=>{const a=Ar({value:e,decimalScale:t,prefix:r,suffix:n});return C.jsx(C.Fragment,{children:a??s})},$u=({value:e})=>{const t=Ar({value:e,decimalScale:2});return t?C.jsx("small",{className:"twap-order-details__detail-row-value-usd",children:` ($${t})`}):null},YG=({deadline:e,label:t,tooltip:r})=>{const n=Hu(e);return C.jsx(Sr,{title:t,tooltip:r,children:n})},ZG=({price:e,dstToken:t,label:r,tooltip:n,usd:s,srcToken:a})=>{const o=Ar({value:e,decimalScale:3});return G(e||0).isZero()?null:C.jsx(Sr,{title:r,tooltip:n,children:C.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["1 ",a==null?void 0:a.symbol," = ",`${o||"-"} ${t==null?void 0:t.symbol}`,C.jsx($u,{value:s})]})})},XG=({tradeSize:e,srcToken:t,trades:r,label:n,tooltip:s})=>r===1?null:C.jsxs(Sr,{title:n,tooltip:s,children:[e?C.jsx(pn,{value:e,decimalScale:3}):"-"," ",(t==null?void 0:t.symbol)||""]}),QG=({dstToken:e,dstMinAmountOut:t,label:r,tooltip:n,usd:s})=>{const a=Ar({value:t});return G(t||0).isZero()?null:C.jsxs(Sr,{title:r,tooltip:n,children:[`${t?a:"-"} ${e==null?void 0:e.symbol}`,C.jsx($u,{value:s})]})},JG=({trades:e,label:t,tooltip:r})=>e===1?null:C.jsx(Sr,{title:t,tooltip:r,children:e}),ej=()=>{var s;const e=Ie(),{account:t}=re(),r=(s=vo())==null?void 0:s.explorer,n=Ll(t);return C.jsx(Sr,{title:e("recipient")||"",children:r?C.jsx("a",{href:`${r}/address/${t}`,target:"_blank",children:n}):n})},tj=({fillDelayMillis:e,chunks:t=0,label:r,tooltip:n})=>{const s=M.useMemo(()=>Jg(e),[e]);return t===1?null:C.jsx(Sr,{title:r,tooltip:n,children:s})},Sr=({title:e,tooltip:t,children:r,className:n="",onClick:s,style:a})=>{const{components:o}=re(),i=o.Tooltip;return C.jsxs("div",{className:`${n} twap-order-details__detail-row`,onClick:s,style:a,children:[C.jsxs("div",{className:"twap-order-details__detail-row-label",children:[C.jsx("p",{className:"twap-order-details__detail-row-label-value",children:e}),t&&i&&C.jsx(i,{tooltipText:t})]}),C.jsx("div",{className:"twap-order-details__detail-row-value",children:r})]})},rj=({id:e})=>{const{components:t}=re(),r=t==null?void 0:t.Tooltip,n=VG();return e.startsWith("0x")?C.jsx(Sr,{title:"ID",onClick:()=>n(e),style:{cursor:"pointer"},children:r&&C.jsx(r,{tooltipText:e,children:C.jsxs("div",{className:"twap-order-details__detail-row-value-id",children:[C.jsx("p",{children:Ll(e)}),C.jsx(Cz.AiOutlineCopy,{})]})})}):C.jsx(Sr,{title:"ID",children:e})},nj=({version:e})=>C.jsx(Sr,{title:"Version",children:e});function he({children:e,className:t=""}){return C.jsx("div",{className:`${t} twap-order-details`,children:e})}const sj=({children:e})=>e,aj=({fees:e,label:t,usd:r,dstTokenSymbol:n})=>{const s=Ar({value:e});return C.jsxs(Sr,{title:t,children:[`${e?s:"-"} ${n}`,C.jsx($u,{value:r})]})};he.Deadline=YG,he.Fees=aj,he.TradeSize=XG,he.MinDestAmount=QG,he.TradesAmount=JG,he.Recipient=ej,he.TradeInterval=tj,he.DetailRow=Sr,he.Price=ZG,he.OrderID=rj,he.Container=sj,he.OrderVersion=nj,he.USD=$u;const X0=()=>{const{publicClient:e}=re();return en({mutationFn:async t=>{if(!e)throw new Error("publicClient is not defined");const r=10;let n=0,s=1e3;for(;n<r;)try{return await e.waitForTransactionReceipt({hash:t,confirmations:2,retryDelay:s})}catch(a){if(n++,n>=r)throw new Error(`Failed after ${r} attempts: ${a}`);await new Promise(o=>setTimeout(o,s)),s*=2}}}).mutateAsync},X2=e=>{const t=Ie(),r=e.limitPriceUsd,n=e.srcAmountPerTrade,s=e.srcAmountPerTradeUsd,a=M.useMemo(()=>!e.minDestAmountPerTrade||!e.totalTrades?"":G(e.minDestAmountPerTrade).multipliedBy(e.totalTrades).decimalPlaces(0).toFixed(),[e.minDestAmountPerTrade,e.totalTrades]),o=M.useMemo(()=>!e.minDestAmountPerTradeUsd||!e.totalTrades?"":G(e.minDestAmountPerTradeUsd).multipliedBy(e.totalTrades).decimalPlaces(2).toFixed(),[e.minDestAmountPerTradeUsd,e.totalTrades]),i=e.triggerPrice,c=e.triggerPriceUsd,l=e.srcUsd,u=e.dstUsd,d=e.dstAmount;return M.useMemo(()=>({srcToken:e.srcToken,dstToken:e.dstToken,srcUsd:l||"",dstUsd:u||"",orderType:e.orderType,dstMinAmount:a,dstMinAmountUsd:o,limitPrice:{label:t("limitPrice"),tooltip:t("limitPriceTooltip"),value:e.limitPrice||"",usd:r||""},deadline:{tooltip:t("expirationTooltip"),label:t("expirationLabel"),value:e.deadline||0},createdAt:{label:t("createdAt"),value:e.createdAt||0},srcAmount:{label:t("amountOut"),value:e.srcAmount||"",usd:l||""},dstAmount:{value:d||"",usd:u||""},sizePerTrade:{tooltip:t("tradeSizeTooltip"),label:t("individualTradeSize"),value:n||"",usd:s},totalTrades:{tooltip:t("totalTradesTooltip"),label:t("numberOfTrades"),value:e.totalTrades||0},minDestAmountPerTrade:{tooltip:t("minDstAmountTooltip"),label:t(e.totalTrades&&e.totalTrades>1?"minReceivedPerTrade":"minReceived"),value:e.minDestAmountPerTrade||"",usd:e.minDestAmountPerTradeUsd},tradeInterval:{tooltip:t("tradeIntervalTooltip"),label:t("tradeIntervalLabel"),value:e.tradeInterval||0},triggerPrice:{tooltip:t("triggerPriceTooltip"),label:t("triggerPrice"),value:i||"",usd:c},recipient:{label:t("recipient"),value:e.account||""}}),[t,e.srcToken,e.dstToken,l,u,e.orderType,a,o,e.limitPrice,r,e.deadline,e.srcAmount,d,n,s,e.totalTrades,e.minDestAmountPerTrade,e.minDestAmountPerTradeUsd,e.tradeInterval,i,c,e.account,e.createdAt])},oj=(e,t,r)=>{const n=vo();return M.useMemo(()=>e==null?void 0:e.map(s=>({srcToken:t,dstToken:r,srcAmount:ia(s.inAmount,t==null?void 0:t.decimals),dstAmount:ia(s.outAmount,r==null?void 0:r.decimals),timestamp:s.timestamp,txHash:s.txHash,explorerUrl:oo(s.txHash,n==null?void 0:n.id),executionRate:hd(s.inAmount,s.outAmount,t==null?void 0:t.decimals,r==null?void 0:r.decimals)})).filter(s=>s.srcToken!==void 0&&s.dstToken!==void 0),[e,t,r,n])},Q2=e=>{const{data:t}=Eo(),{useToken:r,config:n}=re(),s=Ie(),a=M.useMemo(()=>t==null?void 0:t.find(O=>O.id===e),[t,e])||{},o=tx(a),i=r==null?void 0:r(a==null?void 0:a.srcTokenAddress),c=r==null?void 0:r(a==null?void 0:a.dstTokenAddress),l=qr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmount),u=cj(i,c,a),d=lj(i,c,a),f=uj(i,c,a),m=qr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountFilled),b=qr(c==null?void 0:c.decimals,a==null?void 0:a.dstAmountFilled),g=a==null?void 0:a.progress,E=qr(i==null?void 0:i.decimals,a==null?void 0:a.srcAmountPerTrade),v=qr(c==null?void 0:c.decimals,a==null?void 0:a.dstMinAmountPerTrade),w=M.useMemo(()=>a?a.version===2?a.fillDelay:n.twapConfig?md(a,n.twapConfig):0:0,[a,n]),S=X2({srcToken:i,dstToken:c,account:a==null?void 0:a.maker,limitPrice:u,deadline:a==null?void 0:a.deadline,tradeInterval:w,srcAmount:l,totalTrades:a==null?void 0:a.totalTradesAmount,srcAmountPerTrade:E,minDestAmountPerTrade:v,triggerPrice:d,orderType:a==null?void 0:a.type}),T=oj(a==null?void 0:a.fills,i,c)??[];return M.useMemo(()=>{if(a!=null&&a.id)return{original:a,fills:T,title:o,...S,createdAt:{label:s("createdAt"),value:a==null?void 0:a.createdAt},id:{label:s("id"),value:a==null?void 0:a.id},amountInFilled:{label:s("amountOut"),value:m??""},amountOutFilled:{label:s("amountReceived"),value:b??"",token:c},progress:{label:s("progress"),value:g},executionPrice:{label:s((a==null?void 0:a.totalTradesAmount)===1?"finalExecutionPrice":"averageExecutionPrice"),value:f},version:{label:s("version"),value:a==null?void 0:a.version}}},[a,s,f,m,b,g,o,i,c,S])},J2=e=>{const t=Ie();return M.useMemo(()=>{switch(e){case Re.TWAP_MARKET:return t("twapMarket");case Re.LIMIT:return t("limit");case Re.TWAP_LIMIT:return t("twapLimit");case Re.STOP_LOSS_MARKET:return t("stopLossMarket");case Re.STOP_LOSS_LIMIT:return t("stopLossLimit");case Re.TAKE_PROFIT:return t("takeProfit");default:return t("twapMarket")}},[t,e])},Q0=()=>{const{module:e}=re(),t=ee(r=>r.state.isMarketOrder);return M.useMemo(()=>e===ge.TWAP?t?Re.TWAP_MARKET:Re.TWAP_LIMIT:e===ge.LIMIT?Re.LIMIT:e===ge.STOP_LOSS?t?Re.STOP_LOSS_MARKET:Re.STOP_LOSS_LIMIT:e===ge.TAKE_PROFIT?Re.TAKE_PROFIT:Re.TWAP_MARKET,[e,t])},ex=()=>{const e=Q0();return J2(e)},tx=e=>J2(e==null?void 0:e.type),rx=()=>{const{account:e,config:t,chainId:r,isDev:n}=re();return M.useMemo(()=>["useTwapOrderHistoryManager",e,t==null?void 0:t.adapter,r,n],[e,t,r,n])},ij=()=>{const{callbacks:e,refetchBalances:t}=re(),r=Ud(),n=rx();return M.useCallback(s=>{var c;const a=r.getQueryData(n);let o=!1;const i=[];a&&a.filter(l=>l.version===2).forEach(l=>{var d;const u=s.find(f=>f.id===l.id);u&&u.progress!==l.progress&&(o=!0,i.push(u),u.status===ut.Completed&&((d=e==null?void 0:e.onOrderFilled)==null||d.call(e,u)))}),o&&((c=e==null?void 0:e.onOrdersProgressUpdate)==null||c.call(e,i),t==null||t())},[r,n,e,t])},Eo=()=>{const{account:e,config:t,chainId:r,isDev:n}=re(),s=rx(),a=ij();return I3({refetchInterval:bz,refetchOnWindowFocus:!0,retry:!1,staleTime:1/0,queryKey:s,queryFn:async({signal:i})=>{if(!e||!r||!t)return[];const c=await Dh({signal:i,chainId:r,config:t,account:e,isDev:n});return a(c),c.map(l=>t!=null&&t.twapConfig?{...l,fillDelayMillis:md(l,t.twapConfig)}:l)}})},nx=(e=[],t=ar.All)=>{let r=e??[];return t===ar.Open&&(r=r.filter(n=>n.status===ut.Open)),t===ar.Completed&&(r=r.filter(n=>n.status===ut.Completed)),t===ar.Cancelled&&(r=r.filter(n=>n.status===ut.Cancelled)),t===ar.Expired&&(r=r.filter(n=>n.status===ut.Expired)),r.sort((n,s)=>s.createdAt-n.createdAt)},sx=()=>{const e=ee(r=>r.state.orderHistoryStatusFilter),{data:t}=Eo();return M.useMemo(()=>nx(t,e),[e,t])},cj=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r||r!=null&&r.isMarketPrice))return nh(r,e==null?void 0:e.decimals,t==null?void 0:t.decimals)},[r,e,t]),lj=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r))return sh(r,e.decimals,t.decimals)},[r,e,t]),uj=(e,t,r)=>M.useMemo(()=>{if(!(!e||!t||!r))return hd(r.srcAmountFilled,r.dstAmountFilled,e.decimals,t.decimals)},[r,e,t]),dj=()=>{const e=ee(r=>r.updateState),t=ee(r=>r.state.orderIdsToCancel);return M.useCallback(r=>{t!=null&&t.includes(r)?e({orderIdsToCancel:t==null?void 0:t.filter(n=>n!==r)}):e({orderIdsToCancel:[...t||[],r]})},[e,t])},ax=()=>{const e=Ie();return M.useCallback(t=>{if(!t)return e("allOrders");switch(t){case ar.Open:return e("Open");case ar.Completed:return e("Completed");case ar.Expired:return e("Expired");case ar.Cancelled:return e("Cancelled");default:return e("allOrders")}},[e])},pj=()=>{const e=ax();return M.useMemo(()=>Object.values(ar).map(t=>({text:e(t),value:t})),[e])},fj=()=>{const{data:e,isLoading:t,refetch:r,isRefetching:n}=Eo(),{mutateAsync:s,isPending:a}=ix(),o=ee(O=>O.state.selectedOrderID),i=ee(O=>O.updateState),c=ee(O=>O.state.orderHistoryStatusFilter),l=ee(O=>O.state.showSelectedOrderFills),u=M.useCallback(O=>i({orderHistoryStatusFilter:O}),[]),d=pj(),f=sx(),m=Q2(o),b=M.useMemo(()=>nx(e,ar.Open),[e]),g=M.useCallback(O=>{i(O?{selectedOrderID:O}:{selectedOrderID:void 0,showSelectedOrderFills:!1})},[i]),E=M.useCallback(()=>r().then(O=>O.data),[r]),v=M.useCallback(async O=>s({orders:[O]}).then(L=>(L==null?void 0:L[0])||""),[s]),w=M.useCallback(()=>s({orders:b}),[s,e]),S=M.useCallback(()=>i({showSelectedOrderFills:!1}),[i]),T=M.useMemo(()=>{const O=c||d[0].value;return d.find(L=>L.value===O)},[d,c]);return{refetchOrders:E,onCancelOrder:v,onSelectOrderFilter:u,onDisplayOrder:g,onCancelAllOpenOrders:w,onHideOrderFills:S,isRefetching:n,allOrders:e??[],selectedOrders:f,isDisplayingOrderFills:l,isLoading:t,selectedOrder:o?m:void 0,openOrdersCount:(b==null?void 0:b.length)||0,isCancelOrderLoading:a,selectedOrderFilter:T,orderFilters:d}},ox=()=>{const{refetch:e}=Eo();return en({mutationFn:async t=>{var r;for(;;){const n=(r=await e())==null?void 0:r.data;if(!n)throw new Error("orders not found");if(t.every(a=>{const o=n.find(i=>i.id===a);return(o==null?void 0:o.status)===ut.Cancelled}))break;await new Promise(a=>setTimeout(a,1e3))}}})},ix=()=>{const{account:e,walletClient:t,publicClient:r,config:n,callbacks:s,chainId:a}=re(),o=X0(),i=ox().mutateAsync,c=ee(d=>d.updateState),l=async d=>{dt.onCancelOrderRequest(d.map(f=>f.id.toString()),1);try{return(await Promise.all(d.map(m=>t.writeContract({account:e,address:m.twapAddress,abi:Rm,functionName:"cancel",args:[m.id],chain:t.chain}))))[0]}catch(f){throw dt.onCancelOrderError(f),f}},u=async d=>{var f;try{dt.onCancelOrderRequest(d.map(g=>g.hash),2);const m=await t.writeContract({account:e,address:n.repermit,abi:zm,functionName:"cancel",args:[d.map(g=>g.hash)],chain:t.chain}),b=await o(m);if(!b)throw new Error("failed to get transaction receipt");if(b.status==="reverted")throw new Error("failed to cancel order");return dt.onCancelOrderSuccess(m),(f=s==null?void 0:s.onCancelOrderSuccess)==null||f.call(s,{orders:d,txHash:m,explorerUrl:oo(m,a)}),b.transactionHash}catch(m){throw dt.onCancelOrderError(m),m}};return en({mutationFn:async({orders:d})=>{var f,m;if(!e||!t||!r||!n)throw new Error("missing required parameters");try{(f=s==null?void 0:s.onCancelOrderRequest)==null||f.call(s,d),c({cancelOrderStatus:pt.LOADING,cancelOrderTxHash:void 0,cancelOrderError:void 0});const b=d.filter(w=>w.version===1),g=d.filter(w=>w.version===2),[E,v]=await Promise.all([b.length?l(b):Promise.resolve(""),g.length?u(g):Promise.resolve("")]);return await i(d.map(w=>w.id)),c({cancelOrderStatus:pt.SUCCESS,orderIdsToCancel:[]}),[...E||[],v]}catch(b){console.error("cancel order error",b),(m=s==null?void 0:s.onCancelOrderFailed)==null||m.call(s,b),Gf(b)?c({cancelOrderStatus:void 0}):(c({cancelOrderStatus:pt.FAILED}),dt.onCancelOrderError(b))}}})},Gu=0,ys=1,ko=2,cx=4;function lx(e){return()=>e}function mj(e){e()}function ux(e,t){return r=>e(t(r))}function dx(e,t){return()=>e(t)}function hj(e,t){return r=>e(t,r)}function J0(e){return e!==void 0}function bj(...e){return()=>{e.map(mj)}}function Co(){}function ju(e,t){return t(e),e}function yj(e,t){return t(e)}function tt(...e){return e}function Ve(e,t){return e(ys,t)}function Ce(e,t){e(Gu,t)}function em(e){e(ko)}function at(e){return e(cx)}function ce(e,t){return Ve(e,hj(t,Gu))}function Kr(e,t){const r=e(ys,n=>{r(),t(n)});return r}function px(e){let t,r;return n=>s=>{t=s,r&&clearTimeout(r),r=setTimeout(()=>{n(t)},e)}}function fx(e,t){return e===t}function rt(e=fx){let t;return r=>n=>{e(t,n)||(t=n,r(n))}}function fe(e){return t=>r=>{e(r)&&t(r)}}function ne(e){return t=>ux(t,e)}function fn(e){return t=>()=>{t(e)}}function W(e,...t){const r=gj(...t);return(n,s)=>{switch(n){case ko:em(e);return;case ys:return Ve(e,r(s))}}}function mn(e,t){return r=>n=>{r(t=e(t,n))}}function fa(e){return t=>r=>{e>0?e--:t(r)}}function jn(e){let t=null,r;return n=>s=>{t=s,!r&&(r=setTimeout(()=>{r=void 0,n(t)},e))}}function Te(...e){const t=new Array(e.length);let r=0,n=null;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);Ve(a,c=>{const l=r;r=r|i,t[o]=c,l!==s&&r===s&&n&&(n(),n=null)})}),a=>o=>{const i=()=>{a([o].concat(t))};r===s?i():n=i}}function gj(...e){return t=>e.reduceRight(yj,t)}function xj(e){let t,r;const n=()=>t==null?void 0:t();return function(s,a){switch(s){case ys:return a?r===a?void 0:(n(),r=a,t=Ve(e,a),t):(n(),Co);case ko:n(),r=null;return}}}function Y(e){let t=e;const r=De();return(n,s)=>{switch(n){case Gu:t=s;break;case ys:{s(t);break}case cx:return t}return r(n,s)}}function zt(e,t){return ju(Y(t),r=>ce(e,r))}function De(){const e=[];return(t,r)=>{switch(t){case Gu:e.slice().forEach(n=>{n(r)});return;case ko:e.splice(0,e.length);return;case ys:return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)}}}}function hr(e){return ju(De(),t=>ce(e,t))}function Ge(e,t=[],{singleton:r}={singleton:!0}){return{constructor:e,dependencies:t,id:wj(),singleton:r}}const wj=()=>Symbol();function vj(e){const t=new Map,r=({constructor:n,dependencies:s,id:a,singleton:o})=>{if(o&&t.has(a))return t.get(a);const i=n(s.map(c=>r(c)));return o&&t.set(a,i),i};return r(e)}function vt(...e){const t=De(),r=new Array(e.length);let n=0;const s=Math.pow(2,e.length)-1;return e.forEach((a,o)=>{const i=Math.pow(2,o);Ve(a,c=>{r[o]=c,n=n|i,n===s&&Ce(t,r)})}),function(a,o){switch(a){case ko:{em(t);return}case ys:return n===s&&o(r),Ve(t,o)}}}function me(e,t=fx){return W(e,rt(t))}function tm(...e){return function(t,r){switch(t){case ko:return;case ys:return bj(...e.map(n=>Ve(n,r)))}}}var rr=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(rr||{});const Ej={0:"debug",3:"error",1:"log",2:"warn"},kj=()=>typeof globalThis>"u"?window:globalThis,gs=Ge(()=>{const e=Y(3);return{log:Y((t,r,n=1)=>{var s;const a=(s=kj().VIRTUOSO_LOG_LEVEL)!=null?s:at(e);n>=a&&console[Ej[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,r)}),logLevel:e}},[],{singleton:!0});function ma(e,t,r){return rm(e,t,r).callbackRef}function rm(e,t,r){const n=M.useRef(null);let s=o=>{};const a=M.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(o=>{const i=()=>{const c=o[0].target;c.offsetParent!==null&&e(c)};r?i():requestAnimationFrame(i)}):null,[e,r]);return s=o=>{o&&t?(a==null||a.observe(o),n.current=o):(n.current&&(a==null||a.unobserve(n.current)),n.current=null)},{callbackRef:s,ref:n}}function Cj(e,t,r,n,s,a,o,i,c){const l=M.useCallback(u=>{const d=Tj(u.children,t,i?"offsetWidth":"offsetHeight",s);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const m=f.lastElementChild.dataset.viewportType==="window";let b;m&&(b=f.ownerDocument.defaultView);const g=o?i?o.scrollLeft:o.scrollTop:m?i?b.scrollX||b.document.documentElement.scrollLeft:b.scrollY||b.document.documentElement.scrollTop:i?f.scrollLeft:f.scrollTop,E=o?i?o.scrollWidth:o.scrollHeight:m?i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight:i?f.scrollWidth:f.scrollHeight,v=o?i?o.offsetWidth:o.offsetHeight:m?i?b.innerWidth:b.innerHeight:i?f.offsetWidth:f.offsetHeight;n({scrollHeight:E,scrollTop:Math.max(g,0),viewportHeight:v}),a==null||a(i?mx("column-gap",getComputedStyle(u).columnGap,s):mx("row-gap",getComputedStyle(u).rowGap,s)),d!==null&&e(d)},[e,t,s,a,o,n,i]);return rm(l,r,c)}function Tj(e,t,r,n){const s=e.length;if(s===0)return null;const a=[];for(let o=0;o<s;o++){const i=e.item(o);if(i.dataset.index===void 0)continue;const c=parseInt(i.dataset.index),l=parseFloat(i.dataset.knownSize),u=t(i,r);if(u===0&&n("Zero-sized element, this should not happen",{child:i},rr.ERROR),u===l)continue;const d=a[a.length-1];a.length===0||d.size!==u||d.endIndex!==c-1?a.push({endIndex:c,size:u,startIndex:c}):a[a.length-1].endIndex++}return a}function mx(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,rr.WARN),t==="normal"?0:parseInt(t??"0",10)}function hx(e,t,r){const n=M.useRef(null),s=M.useCallback(c=>{if(!(c!=null&&c.offsetParent))return;const l=c.getBoundingClientRect(),u=l.width;let d,f;if(t){const m=t.getBoundingClientRect(),b=l.top-m.top;f=m.height-Math.max(0,b),d=b+t.scrollTop}else{const m=o.current.ownerDocument.defaultView;f=m.innerHeight-Math.max(0,l.top),d=l.top+m.scrollY}n.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(n.current)},[e,t]),{callbackRef:a,ref:o}=rm(s,!0,r),i=M.useCallback(()=>{s(o.current)},[s,o]);return M.useEffect(()=>{var c;if(t){t.addEventListener("scroll",i);const l=new ResizeObserver(()=>{requestAnimationFrame(i)});return l.observe(t),()=>{t.removeEventListener("scroll",i),l.unobserve(t)}}else{const l=(c=o.current)==null?void 0:c.ownerDocument.defaultView;return l==null||l.addEventListener("scroll",i),l==null||l.addEventListener("resize",i),()=>{l==null||l.removeEventListener("scroll",i),l==null||l.removeEventListener("resize",i)}}},[i,t,o]),a}const Vt=Ge(()=>{const e=De(),t=De(),r=Y(0),n=De(),s=Y(0),a=De(),o=De(),i=Y(0),c=Y(0),l=Y(0),u=Y(0),d=De(),f=De(),m=Y(!1),b=Y(!1),g=Y(!1);return ce(W(e,ne(({scrollTop:E})=>E)),t),ce(W(e,ne(({scrollHeight:E})=>E)),o),ce(t,s),{deviation:r,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:i,horizontalDirection:b,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:m,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:n,statefulScrollTop:s,viewportHeight:a}},[],{singleton:!0}),dc={lvl:0};function bx(e,t){const r=e.length;if(r===0)return[];let{index:n,value:s}=t(e[0]);const a=[];for(let o=1;o<r;o++){const{index:i,value:c}=t(e[o]);a.push({end:i-1,start:n,value:s}),n=i,s=c}return a.push({end:1/0,start:n,value:s}),a}function Ke(e){return e===dc}function pc(e,t){if(!Ke(e))return t===e.k?e.v:t<e.k?pc(e.l,t):pc(e.r,t)}function Yr(e,t,r="k"){if(Ke(e))return[-1/0,void 0];if(Number(e[r])===t)return[e.k,e.v];if(Number(e[r])<t){const n=Yr(e.r,t,r);return n[0]===-1/0?[e.k,e.v]:n}return Yr(e.l,t,r)}function br(e,t,r){return Ke(e)?xx(t,r,1):t===e.k?At(e,{k:t,v:r}):t<e.k?wx(At(e,{l:br(e.l,t,r)})):wx(At(e,{r:br(e.r,t,r)}))}function To(){return dc}function Ao(e,t,r){if(Ke(e))return[];const n=Yr(e,t)[0];return Aj(sm(e,n,r))}function nm(e,t){if(Ke(e))return dc;const{k:r,l:n,r:s}=e;if(t===r){if(Ke(n))return s;if(Ke(s))return n;{const[a,o]=gx(n);return Vu(At(e,{k:a,l:yx(n),v:o}))}}else return t<r?Vu(At(e,{l:nm(n,t)})):Vu(At(e,{r:nm(s,t)}))}function ha(e){return Ke(e)?[]:[...ha(e.l),{k:e.k,v:e.v},...ha(e.r)]}function sm(e,t,r){if(Ke(e))return[];const{k:n,l:s,r:a,v:o}=e;let i=[];return n>t&&(i=i.concat(sm(s,t,r))),n>=t&&n<=r&&i.push({k:n,v:o}),n<=r&&(i=i.concat(sm(a,t,r))),i}function Vu(e){const{l:t,lvl:r,r:n}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(am(t))return vx(At(e,{lvl:r-1}));if(!Ke(t)&&!Ke(t.r))return At(t.r,{l:At(t,{r:t.r.l}),lvl:r,r:At(e,{l:t.r.r,lvl:r-1})});throw new Error("Unexpected empty nodes")}else{if(am(e))return om(At(e,{lvl:r-1}));if(!Ke(n)&&!Ke(n.l)){const s=n.l,a=am(s)?n.lvl-1:n.lvl;return At(s,{l:At(e,{lvl:r-1,r:s.l}),lvl:s.lvl+1,r:om(At(n,{l:s.r,lvl:a}))})}else throw new Error("Unexpected empty nodes")}}function At(e,t){return xx(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function yx(e){return Ke(e.r)?e.l:Vu(At(e,{r:yx(e.r)}))}function am(e){return Ke(e)||e.lvl>e.r.lvl}function gx(e){return Ke(e.r)?[e.k,e.v]:gx(e.r)}function xx(e,t,r,n=dc,s=dc){return{k:e,l:n,lvl:r,r:s,v:t}}function wx(e){return om(vx(e))}function vx(e){const{l:t}=e;return!Ke(t)&&t.lvl===e.lvl?At(t,{r:At(e,{l:t.r})}):e}function om(e){const{lvl:t,r}=e;return!Ke(r)&&!Ke(r.r)&&r.lvl===t&&r.r.lvl===t?At(r,{l:At(e,{r:r.l}),lvl:t+1}):e}function Aj(e){return bx(e,({k:t,v:r})=>({index:t,value:r}))}function Ex(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function fc(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const im=Ge(()=>({recalcInProgress:Y(!1)}),[],{singleton:!0});function kx(e,t,r){return e[Wu(e,t,r)]}function Wu(e,t,r,n=0){let s=e.length-1;for(;n<=s;){const a=Math.floor((n+s)/2),o=e[a],i=r(o,t);if(i===0)return a;if(i===-1){if(s-n<2)return a-1;s=a-1}else{if(s===n)return a;n=a+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function Sj(e,t,r,n){const s=Wu(e,t,n),a=Wu(e,r,n,s);return e.slice(s,a+1)}function xs(e,t){return Math.round(e.getBoundingClientRect()[t])}function qu(e){return!Ke(e.groupOffsetTree)}function cm({index:e},t){return t===e?0:t<e?-1:1}function Pj(){return{groupIndices:[],groupOffsetTree:To(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:To()}}function Ij(e,t){let r=Ke(e)?0:1/0;for(const n of t){const{endIndex:s,size:a,startIndex:o}=n;if(r=Math.min(r,o),Ke(e)){e=br(e,0,a);continue}const i=Ao(e,o-1,s+1);if(i.some(Mj(n)))continue;let c=!1,l=!1;for(const{end:u,start:d,value:f}of i)c?(s>=d||a===f)&&(e=nm(e,d)):(l=f!==a,c=!0),u>s&&s>=d&&f!==a&&(e=br(e,s+1,f));l&&(e=br(e,o,a))}return[e,r]}function Bj(e){return typeof e.groupIndex<"u"}function Fj({offset:e},t){return t===e?0:t<e?-1:1}function mc(e,t,r){if(t.length===0)return 0;const{index:n,offset:s,size:a}=kx(t,e,cm),o=e-n,i=a*o+(o-1)*r+s;return i>0?i+r:i}function Cx(e,t){if(!qu(t))return e;let r=0;for(;t.groupIndices[r]<=e+r;)r++;return e+r}function Tx(e,t,r){if(Bj(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?r:e.index;let s=Cx(n,t);return s=Math.max(0,s,Math.min(r,s)),s}}function Oj(e,t,r,n=0){return n>0&&(t=Math.max(t,kx(e,n,cm).offset)),bx(Sj(e,t,r,Fj),_j)}function Uj(e,[t,r,n,s]){t.length>0&&n("received item sizes",t,rr.DEBUG);const a=e.sizeTree;let o=a,i=0;if(r.length>0&&Ke(a)&&t.length===2){const f=t[0].size,m=t[1].size;o=r.reduce((b,g)=>br(br(b,g,f),g+1,m),o)}else[o,i]=Ij(o,t);if(o===a)return e;const{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=lm(e.offsetTree,i,o,s);return{groupIndices:r,groupOffsetTree:r.reduce((f,m)=>br(f,m,mc(m,d,s)),To()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function Dj(e){return ha(e).map(({k:t,v:r},n,s)=>{const a=s[n+1];return{endIndex:a?a.k-1:1/0,size:r,startIndex:t}})}function Ax(e,t){let r=0,n=0;for(;r<e;)r+=t[n+1]-t[n]-1,n++;return n-(r===e?0:1)}function lm(e,t,r,n){let s=e,a=0,o=0,i=0,c=0;if(t!==0){c=Wu(s,t-1,cm),i=s[c].offset;const l=Yr(r,t-1);a=l[0],o=l[1],s.length&&s[c].size===Yr(r,t)[1]&&(c-=1),s=s.slice(0,c+1)}else s=[];for(const{start:l,value:u}of Ao(r,t,1/0)){const d=l-a,f=d*o+i+d*n;s.push({index:l,offset:f,size:u}),a=l,i=f,o=u}return{lastIndex:a,lastOffset:i,lastSize:o,offsetTree:s}}function _j(e){return{index:e.index,value:e}}function Mj(e){const{endIndex:t,size:r,startIndex:n}=e;return s=>s.start===n&&(s.end===t||s.end===1/0)&&s.value===r}const Nj={offsetHeight:"height",offsetWidth:"width"},hn=Ge(([{log:e},{recalcInProgress:t}])=>{const r=De(),n=De(),s=zt(n,0),a=De(),o=De(),i=Y(0),c=Y([]),l=Y(void 0),u=Y(void 0),d=Y(void 0),f=Y(void 0),m=Y((I,h)=>xs(I,Nj[h])),b=Y(void 0),g=Y(0),E=Pj(),v=zt(W(r,Te(c,e,g),mn(Uj,E),rt()),E),w=zt(W(c,rt(),mn((I,h)=>({current:h,prev:I.current}),{current:[],prev:[]}),ne(({prev:I})=>I)),[]);ce(W(c,fe(I=>I.length>0),Te(v,g),ne(([I,h,y])=>{const x=I.reduce((A,B,F)=>br(A,B,mc(B,h.offsetTree,y)||F),To());return{...h,groupIndices:I,groupOffsetTree:x}})),v),ce(W(n,Te(v),fe(([I,{lastIndex:h}])=>I<h),ne(([I,{lastIndex:h,lastSize:y}])=>[{endIndex:h,size:y,startIndex:I}])),r),ce(l,u);const S=zt(W(l,ne(I=>I===void 0)),!0);ce(W(u,fe(I=>I!==void 0&&Ke(at(v).sizeTree)),ne(I=>{const h=at(d),y=at(c).length>0;return h?y?[{endIndex:0,size:h,startIndex:0},{endIndex:1,size:I,startIndex:1}]:[]:[{endIndex:0,size:I,startIndex:0}]})),r),ce(W(f,fe(I=>I!==void 0&&I.length>0&&Ke(at(v).sizeTree)),ne(I=>{const h=[];let y=I[0],x=0;for(let A=1;A<I.length;A++){const B=I[A];B!==y&&(h.push({endIndex:A-1,size:y,startIndex:x}),y=B,x=A)}return h.push({endIndex:I.length-1,size:y,startIndex:x}),h})),r),ce(W(c,Te(d,u),fe(([,I,h])=>I!==void 0&&h!==void 0),ne(([I,h,y])=>{const x=[];for(let A=0;A<I.length;A++){const B=I[A],F=I[A+1];x.push({startIndex:B,endIndex:B,size:h}),F!==void 0&&x.push({startIndex:B+1,endIndex:F-1,size:y})}return x})),r);const T=hr(W(r,Te(v),mn(({sizes:I},[h,y])=>({changed:y!==I,sizes:y}),{changed:!1,sizes:E}),ne(I=>I.changed)));Ve(W(i,mn((I,h)=>({diff:I.prev-h,prev:h}),{diff:0,prev:0}),ne(I=>I.diff)),I=>{const{groupIndices:h}=at(v);if(I>0)Ce(t,!0),Ce(a,I+Ax(I,h));else if(I<0){const y=at(w);y.length>0&&(I-=Ax(-I,y)),Ce(o,I)}}),Ve(W(i,Te(e)),([I,h])=>{I<0&&h("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:i},rr.ERROR)});const O=hr(a);ce(W(a,Te(v),ne(([I,h])=>{const y=h.groupIndices.length>0,x=[],A=h.lastSize;if(y){const B=pc(h.sizeTree,0);let F=0,_=0;for(;F<I;){const P=h.groupIndices[_],D=h.groupIndices.length===_+1?1/0:h.groupIndices[_+1]-P-1;x.push({endIndex:P,size:B,startIndex:P}),x.push({endIndex:P+1+D-1,size:A,startIndex:P+1}),_++,F+=D+1}const k=ha(h.sizeTree);return F!==I&&k.shift(),k.reduce((P,{k:D,v:U})=>{let z=P.ranges;return P.prevSize!==0&&(z=[...P.ranges,{endIndex:D+I-1,size:P.prevSize,startIndex:P.prevIndex}]),{prevIndex:D+I,prevSize:U,ranges:z}},{prevIndex:I,prevSize:0,ranges:x}).ranges}return ha(h.sizeTree).reduce((B,{k:F,v:_})=>({prevIndex:F+I,prevSize:_,ranges:[...B.ranges,{endIndex:F+I-1,size:B.prevSize,startIndex:B.prevIndex}]}),{prevIndex:0,prevSize:A,ranges:[]}).ranges})),r);const L=hr(W(o,Te(v,g),ne(([I,{offsetTree:h},y])=>{const x=-I;return mc(x,h,y)})));return ce(W(o,Te(v,g),ne(([I,h,y])=>{if(h.groupIndices.length>0){if(Ke(h.sizeTree))return h;let x=To();const A=at(w);let B=0,F=0,_=0;for(;B<-I;){_=A[F];const k=A[F+1]-_-1;F++,B+=k+1}if(x=ha(h.sizeTree).reduce((k,{k:P,v:D})=>br(k,Math.max(0,P+I),D),x),B!==-I){const k=pc(h.sizeTree,_);x=br(x,0,k);const P=Yr(h.sizeTree,-I+1)[1];x=br(x,1,P)}return{...h,sizeTree:x,...lm(h.offsetTree,0,x,y)}}else{const x=ha(h.sizeTree).reduce((A,{k:B,v:F})=>br(A,Math.max(0,B+I),F),To());return{...h,sizeTree:x,...lm(h.offsetTree,0,x,y)}}})),v),{beforeUnshiftWith:O,data:b,defaultItemSize:u,firstItemIndex:i,fixedItemSize:l,fixedGroupSize:d,gap:g,groupIndices:c,heightEstimates:f,itemSize:m,listRefresh:T,shiftWith:o,shiftWithOffset:L,sizeRanges:r,sizes:v,statefulTotalCount:s,totalCount:n,trackItemSizes:S,unshiftWith:a}},tt(gs,im),{singleton:!0});function Lj(e){return e.reduce((t,r)=>(t.groupIndices.push(t.totalCount),t.totalCount+=r+1,t),{groupIndices:[],totalCount:0})}const Sx=Ge(([{groupIndices:e,sizes:t,totalCount:r},{headerHeight:n,scrollTop:s}])=>{const a=De(),o=De(),i=hr(W(a,ne(Lj)));return ce(W(i,ne(c=>c.totalCount)),r),ce(W(i,ne(c=>c.groupIndices)),e),ce(W(vt(s,t,n),fe(([c,l])=>qu(l)),ne(([c,l,u])=>Yr(l.groupOffsetTree,Math.max(c-u,0),"v")[0]),rt(),ne(c=>[c])),o),{groupCounts:a,topItemsIndexes:o}},tt(hn,Vt)),ws=Ge(([{log:e}])=>{const t=Y(!1),r=hr(W(t,fe(n=>n),rt()));return Ve(t,n=>{n&&at(e)("props updated",{},rr.DEBUG)}),{didMount:r,propsReady:t}},tt(gs),{singleton:!0}),zj=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Px(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!zj)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const hc=Ge(([{gap:e,listRefresh:t,sizes:r,totalCount:n},{fixedFooterHeight:s,fixedHeaderHeight:a,footerHeight:o,headerHeight:i,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const m=De(),b=De(),g=Y(0);let E=null,v=null,w=null;function S(){E&&(E(),E=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),Ce(c,!1)}return ce(W(m,Te(r,d,n,g,i,o,f),Te(e,a,s),ne(([[T,O,L,I,h,y,x,A],B,F,_])=>{const k=Px(T),{align:P,behavior:D,offset:U}=k,z=I-1,H=Tx(k,O,z);let j=mc(H,O.offsetTree,B)+y;P==="end"?(j+=F+Yr(O.sizeTree,H)[1]-L+_,H===z&&(j+=x)):P==="center"?j+=(F+Yr(O.sizeTree,H)[1]-L+_)/2:j-=h,U&&(j+=U);const Q=pe=>{S(),pe?(A("retrying to scroll to",{location:T},rr.DEBUG),Ce(m,T)):(Ce(b,!0),A("list did not change, scroll successful",{},rr.DEBUG))};if(S(),D==="smooth"){let pe=!1;w=Ve(t,be=>{pe=pe||be}),E=Kr(u,()=>{Q(pe)})}else E=Kr(W(t,Rj(150)),Q);return v=setTimeout(()=>{S()},1200),Ce(c,!0),A("scrolling from index to",{behavior:D,index:H,top:j},rr.DEBUG),{behavior:D,top:j}})),l),{scrollTargetReached:b,scrollToIndex:m,topListHeight:g}},tt(hn,Vt,gs),{singleton:!0});function Rj(e){return t=>{const r=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(r))}}}function um(e,t){e==0?t():requestAnimationFrame(()=>{um(e-1,t)})}function dm(e,t){const r=t-1;return typeof e=="number"?e:e.index==="LAST"?r:e.index}const bc=Ge(([{defaultItemSize:e,listRefresh:t,sizes:r},{scrollTop:n},{scrollTargetReached:s,scrollToIndex:a},{didMount:o}])=>{const i=Y(!0),c=Y(0),l=Y(!0);return ce(W(o,Te(c),fe(([u,d])=>!!d),fn(!1)),i),ce(W(o,Te(c),fe(([u,d])=>!!d),fn(!1)),l),Ve(W(vt(t,o),Te(i,r,e,l),fe(([[,u],d,{sizeTree:f},m,b])=>u&&(!Ke(f)||J0(m))&&!d&&!b),Te(c)),([,u])=>{Kr(s,()=>{Ce(l,!0)}),um(4,()=>{Kr(n,()=>{Ce(i,!0)}),Ce(a,u)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:i}},tt(hn,Vt,hc,ws),{singleton:!0});function Ix(e,t){return Math.abs(e-t)<1.01}const yc="up",gc="down",Hj="none",$j={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Gj=0,xc=Ge(([{footerHeight:e,headerHeight:t,scrollBy:r,scrollContainerState:n,scrollTop:s,viewportHeight:a}])=>{const o=Y(!1),i=Y(!0),c=De(),l=De(),u=Y(4),d=Y(Gj),f=zt(W(tm(W(me(s),fa(1),fn(!0)),W(me(s),fa(1),fn(!1),px(100))),rt()),!1),m=zt(W(tm(W(r,fn(!0)),W(r,fn(!1),px(200))),rt()),!1);ce(W(vt(me(s),me(d)),ne(([w,S])=>w<=S),rt()),i),ce(W(i,jn(50)),l);const b=hr(W(vt(n,me(a),me(t),me(e),me(u)),mn((w,[{scrollHeight:S,scrollTop:T},O,L,I,h])=>{const y=T+O-S>-h,x={scrollHeight:S,scrollTop:T,viewportHeight:O};if(y){let B,F;return T>w.state.scrollTop?(B="SCROLLED_DOWN",F=w.state.scrollTop-T):(B="SIZE_DECREASED",F=w.state.scrollTop-T||w.scrollTopDelta),{atBottom:!0,atBottomBecause:B,scrollTopDelta:F,state:x}}let A;return x.scrollHeight>w.state.scrollHeight?A="SIZE_INCREASED":O<w.state.viewportHeight?A="VIEWPORT_HEIGHT_DECREASING":T<w.state.scrollTop?A="SCROLLING_UPWARDS":A="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:A,state:x}},$j),rt((w,S)=>w&&w.atBottom===S.atBottom))),g=zt(W(n,mn((w,{scrollHeight:S,scrollTop:T,viewportHeight:O})=>{if(Ix(w.scrollHeight,S))return{changed:!1,jump:0,scrollHeight:S,scrollTop:T};{const L=S-(T+O)<1;return w.scrollTop!==T&&L?{changed:!0,jump:w.scrollTop-T,scrollHeight:S,scrollTop:T}:{changed:!0,jump:0,scrollHeight:S,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),fe(w=>w.changed),ne(w=>w.jump)),0);ce(W(b,ne(w=>w.atBottom)),o),ce(W(o,jn(50)),c);const E=Y(gc);ce(W(n,ne(({scrollTop:w})=>w),rt(),mn((w,S)=>at(m)?{direction:w.direction,prevScrollTop:S}:{direction:S<w.prevScrollTop?yc:gc,prevScrollTop:S},{direction:gc,prevScrollTop:0}),ne(w=>w.direction)),E),ce(W(n,jn(50),fn(Hj)),E);const v=Y(0);return ce(W(f,fe(w=>!w),fn(0)),v),ce(W(s,jn(100),Te(f),fe(([w,S])=>!!S),mn(([w,S],[T])=>[S,T],[0,0]),ne(([w,S])=>S-w)),v),{atBottomState:b,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:i,isScrolling:f,lastJumpDueToItemResize:g,scrollDirection:E,scrollVelocity:v}},tt(Vt)),wc="top",vc="bottom",Bx="none";function Fx(e,t,r){return typeof e=="number"?r===yc&&t===wc||r===gc&&t===vc?e:0:r===yc?t===wc?e.main:e.reverse:t===vc?e.main:e.reverse}function Ox(e,t){var r;return typeof e=="number"?e:(r=e[t])!=null?r:0}const pm=Ge(([{deviation:e,fixedHeaderHeight:t,headerHeight:r,scrollTop:n,viewportHeight:s}])=>{const a=De(),o=Y(0),i=Y(0),c=Y(0),l=zt(W(vt(me(n),me(s),me(r),me(a,fc),me(c),me(o),me(t),me(e),me(i)),ne(([u,d,f,[m,b],g,E,v,w,S])=>{const T=u-w,O=E+v,L=Math.max(f-T,0);let I=Bx;const h=Ox(S,wc),y=Ox(S,vc);return m-=w,m+=f+v,b+=f+v,b-=w,m>u+O-h&&(I=yc),b<u-L+d+y&&(I=gc),I!==Bx?[Math.max(T-f-Fx(g,wc,I)-h,0),T-L-v+d+Fx(g,vc,I)+y]:null}),fe(u=>u!=null),rt(fc)),[0,0]);return{increaseViewportBy:i,listBoundary:a,overscan:c,topListHeight:o,visibleRange:l}},tt(Vt),{singleton:!0});function jj(e,t,r){if(qu(t)){const n=Cx(e,t);return[{index:Yr(t.groupOffsetTree,n)[0],offset:0,size:0},{data:r==null?void 0:r[0],index:n,offset:0,size:0}]}return[{data:r==null?void 0:r[0],index:e,offset:0,size:0}]}const fm={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Ku(e,t,r,n,s,a){const{lastIndex:o,lastOffset:i,lastSize:c}=s;let l=0,u=0;if(e.length>0){l=e[0].offset;const g=e[e.length-1];u=g.offset+g.size}const d=r-o,f=i+d*c+(d-1)*n,m=l,b=f-u;return{bottom:u,firstItemIndex:a,items:Dx(e,s,a),offsetBottom:b,offsetTop:l,top:m,topItems:Dx(t,s,a),topListHeight:t.reduce((g,E)=>E.size+g,0),totalCount:r}}function Ux(e,t,r,n,s,a){let o=0;if(r.groupIndices.length>0)for(const u of r.groupIndices){if(u-o>=e)break;o++}const i=e+o,c=dm(t,i),l=Array.from({length:i}).map((u,d)=>({data:a[d+c],index:d+c,offset:0,size:0}));return Ku(l,[],i,s,r,n)}function Dx(e,t,r){if(e.length===0)return[];if(!qu(t))return e.map(l=>({...l,index:l.index+r,originalIndex:l.index}));const n=e[0].index,s=e[e.length-1].index,a=[],o=Ao(t.groupOffsetTree,n,s);let i,c=0;for(const l of e){(!i||i.end<l.index)&&(i=o.shift(),c=t.groupIndices.indexOf(i.start));let u;l.index===i.start?u={index:c,type:"group"}:u={groupIndex:c,index:l.index-(c+1)+r},a.push({...u,data:l.data,offset:l.offset,originalIndex:l.index,size:l.size})}return a}function _x(e,t){var r;return e===void 0?0:typeof e=="number"?e:(r=e[t])!=null?r:0}const ba=Ge(([{data:e,firstItemIndex:t,gap:r,sizes:n,totalCount:s},a,{listBoundary:o,topListHeight:i,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:m},{recalcInProgress:b}])=>{const g=Y([]),E=Y(0),v=De(),w=Y(0);ce(a.topItemsIndexes,g);const S=zt(W(vt(m,b,me(c,fc),me(s),me(n),me(l),u,me(g),me(t),me(r),me(w),e),fe(([I,h,,y,,,,,,,,x])=>{const A=x&&x.length!==y;return I&&!h&&!A}),ne(([,,[I,h],y,x,A,B,F,_,k,P,D])=>{var U,z,H,j;const Q=x,{offsetTree:pe,sizeTree:be}=Q,ie=at(E);if(y===0)return{...fm,totalCount:y};if(I===0&&h===0)return ie===0?{...fm,totalCount:y}:Ux(ie,A,x,_,k,D||[]);if(Ke(be))return ie>0?null:Ku(jj(dm(A,y),Q,D),[],y,k,Q,_);const de=[];if(F.length>0){const Ae=F[0],Ee=F[F.length-1];let ye=0;for(const Xe of Ao(be,Ae,Ee)){const Ye=Xe.value,Qe=Math.max(Xe.start,Ae),Or=Math.min(Xe.end,Ee);for(let Ut=Qe;Ut<=Or;Ut++)de.push({data:D==null?void 0:D[Ut],index:Ut,offset:ye,size:Ye}),ye+=Ye}}if(!B)return Ku([],de,y,k,Q,_);const Oe=F.length>0?F[F.length-1]+1:0,X=Oj(pe,I,h,Oe);if(X.length===0)return null;const ve=y-1,Me=ju([],Ae=>{for(const Ee of X){const ye=Ee.value;let Xe=ye.offset,Ye=Ee.start;const Qe=ye.size;if(ye.offset<I){Ye+=Math.floor((I-ye.offset+k)/(Qe+k));const Ut=Ye-Ee.start;Xe+=Ut*Qe+Ut*k}Ye<Oe&&(Xe+=(Oe-Ye)*Qe,Ye=Oe);const Or=Math.min(Ee.end,ve);for(let Ut=Ye;Ut<=Or&&!(Xe>=h);Ut++)Ae.push({data:D==null?void 0:D[Ut],index:Ut,offset:Xe,size:Qe}),Xe+=Qe+k}}),je=_x(P,wc),it=_x(P,vc);if(Me.length>0&&(je>0||it>0)){const Ae=Me[0],Ee=Me[Me.length-1];if(je>0&&Ae.index>Oe){const ye=Math.min(je,Ae.index-Oe),Xe=[];let Ye=Ae.offset;for(let Qe=Ae.index-1;Qe>=Ae.index-ye;Qe--){const Or=(z=(U=Ao(be,Qe,Qe)[0])==null?void 0:U.value)!=null?z:Ae.size;Ye-=Or+k,Xe.unshift({data:D==null?void 0:D[Qe],index:Qe,offset:Ye,size:Or})}Me.unshift(...Xe)}if(it>0&&Ee.index<ve){const ye=Math.min(it,ve-Ee.index);let Xe=Ee.offset+Ee.size+k;for(let Ye=Ee.index+1;Ye<=Ee.index+ye;Ye++){const Qe=(j=(H=Ao(be,Ye,Ye)[0])==null?void 0:H.value)!=null?j:Ee.size;Me.push({data:D==null?void 0:D[Ye],index:Ye,offset:Xe,size:Qe}),Xe+=Qe+k}}}return Ku(Me,de,y,k,Q,_)}),fe(I=>I!==null),rt()),fm);ce(W(e,fe(J0),ne(I=>I==null?void 0:I.length)),s),ce(W(S,ne(I=>I.topListHeight)),d),ce(d,i),ce(W(S,ne(I=>[I.top,I.bottom])),o),ce(W(S,ne(I=>I.items)),v);const T=hr(W(S,fe(({items:I})=>I.length>0),Te(s,e),fe(([{items:I},h])=>I[I.length-1].originalIndex===h-1),ne(([,I,h])=>[I-1,h]),rt(fc),ne(([I])=>I))),O=hr(W(S,jn(200),fe(({items:I,topItems:h})=>I.length>0&&I[0].originalIndex===h.length),ne(({items:I})=>I[0].index),rt())),L=hr(W(S,fe(({items:I})=>I.length>0),ne(({items:I})=>{let h=0,y=I.length-1;for(;I[h].type==="group"&&h<y;)h++;for(;I[y].type==="group"&&y>h;)y--;return{endIndex:I[y].index,startIndex:I[h].index}}),rt(Ex)));return{endReached:T,initialItemCount:E,itemsRendered:v,listState:S,minOverscanItemCount:w,rangeChanged:L,startReached:O,topItemsIndexes:g,...f}},tt(hn,Sx,pm,bc,hc,xc,ws,im),{singleton:!0}),Mx=Ge(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:r,headerHeight:n},{listState:s}])=>{const a=De(),o=zt(W(vt(r,e,n,t,s),ne(([i,c,l,u,d])=>i+c+l+u+d.offsetBottom+d.bottom)),0);return ce(me(o),a),{totalListHeight:o,totalListHeightChanged:a}},tt(Vt,ba),{singleton:!0}),Vj=Ge(([{viewportHeight:e},{totalListHeight:t}])=>{const r=Y(!1),n=zt(W(vt(r,e,t),fe(([s])=>s),ne(([,s,a])=>Math.max(0,s-a)),jn(0),rt()),0);return{alignToBottom:r,paddingTopAddition:n}},tt(Vt,Mx),{singleton:!0}),Nx=Ge(()=>({context:Y(null)})),Wj=({itemBottom:e,itemTop:t,locationParams:{align:r,behavior:n,...s},viewportBottom:a,viewportTop:o})=>t<o?{...s,align:r??"start",behavior:n}:e>a?{...s,align:r??"end",behavior:n}:null,Lx=Ge(([{gap:e,sizes:t,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:s,headerHeight:a,scrollingInProgress:o,scrollTop:i,viewportHeight:c},{scrollToIndex:l}])=>{const u=De();return ce(W(u,Te(t,c,r,a,s,n,i),Te(e),ne(([[d,f,m,b,g,E,v,w],S])=>{const{align:T,behavior:O,calculateViewLocation:L=Wj,done:I,...h}=d,y=Tx(d,f,b-1),x=mc(y,f.offsetTree,S)+g+E,A=x+Yr(f.sizeTree,y)[1],B=w+E,F=w+m-v,_=L({itemBottom:A,itemTop:x,locationParams:{align:T,behavior:O,...h},viewportBottom:F,viewportTop:B});return _?I&&Kr(W(o,fe(k=>!k),fa(at(o)?1:2)),I):I&&I(),_}),fe(d=>d!==null)),l),{scrollIntoView:u}},tt(hn,Vt,hc,ba,gs),{singleton:!0});function zx(e){return e?e==="smooth"?"smooth":"auto":!1}const qj=(e,t)=>typeof e=="function"?zx(e(t)):t&&zx(e),Kj=Ge(([{listRefresh:e,totalCount:t,fixedItemSize:r,data:n},{atBottomState:s,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:i},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:m}])=>{const b=Y(!1),g=De();let E=null;function v(O){Ce(o,{align:"end",behavior:O,index:"LAST"})}Ve(W(vt(W(me(t),fa(1)),c),Te(me(b),a,i,d),ne(([[O,L],I,h,y,x])=>{let A=L&&y,B="auto";return A&&(B=qj(I,h||x),A=A&&!!B),{followOutputBehavior:B,shouldFollow:A,totalCount:O}}),fe(({shouldFollow:O})=>O)),({followOutputBehavior:O,totalCount:L})=>{E&&(E(),E=null),at(r)?requestAnimationFrame(()=>{at(u)("following output to ",{totalCount:L},rr.DEBUG),v(O)}):E=Kr(e,()=>{at(u)("following output to ",{totalCount:L},rr.DEBUG),v(O),E=null})});function w(O){const L=Kr(s,I=>{O&&!I.atBottom&&I.notAtBottomBecause==="SIZE_INCREASED"&&!E&&(at(u)("scrolling to bottom due to increased size",{},rr.DEBUG),v("auto"))});setTimeout(L,100)}Ve(W(vt(me(b),t,l),fe(([O,,L])=>O&&L),mn(({value:O},[,L])=>({refreshed:O===L,value:L}),{refreshed:!1,value:0}),fe(({refreshed:O})=>O),Te(b,t)),([,O])=>{at(i)&&w(O!==!1)}),Ve(g,()=>{w(at(b)!==!1)}),Ve(vt(me(b),s),([O,L])=>{O&&!L.atBottom&&L.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const S=Y(null),T=De();return ce(tm(W(me(n),ne(O=>{var L;return(L=O==null?void 0:O.length)!=null?L:0})),W(me(t))),T),Ve(W(vt(W(T,fa(1)),c),Te(me(S),i,d,f),ne(([[O,L],I,h,y,x])=>L&&h&&(I==null?void 0:I({context:x,totalCount:O,scrollingInProgress:y}))),fe(O=>!!O),jn(0)),O=>{E&&(E(),E=null),at(r)?requestAnimationFrame(()=>{at(u)("scrolling into view",{}),Ce(m,O)}):E=Kr(e,()=>{at(u)("scrolling into view",{}),Ce(m,O),E=null})}),{autoscrollToBottom:g,followOutput:b,scrollIntoViewOnChange:S}},tt(hn,xc,hc,bc,ws,gs,Vt,Nx,Lx)),Yj=Ge(([{data:e,firstItemIndex:t,gap:r,sizes:n},{initialTopMostItemIndex:s},{initialItemCount:a,listState:o},{didMount:i}])=>(ce(W(i,Te(a),fe(([,c])=>c!==0),Te(s,n,t,r,e),ne(([[,c],l,u,d,f,m=[]])=>Ux(c,l,u,d,f,m))),o),{}),tt(hn,bc,ba,ws),{singleton:!0}),Zj=Ge(([{didMount:e},{scrollTo:t},{listState:r}])=>{const n=Y(0);return Ve(W(e,Te(n),fe(([,s])=>s!==0),ne(([,s])=>({top:s}))),s=>{Kr(W(r,fa(1),fe(a=>a.items.length>1)),()=>{requestAnimationFrame(()=>{Ce(t,s)})})}),{initialScrollTop:n}},tt(ws,Vt,ba),{singleton:!0}),Rx=Ge(([{scrollVelocity:e}])=>{const t=Y(!1),r=De(),n=Y(!1);return ce(W(e,Te(n,t,r),fe(([s,a])=>!!a),ne(([s,a,o,i])=>{const{enter:c,exit:l}=a;if(o){if(l(s,i))return!1}else if(c(s,i))return!0;return o}),rt()),t),Ve(W(vt(t,e,r),Te(n)),([[s,a,o],i])=>{s&&i&&i.change&&i.change(a,o)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:r,scrollVelocity:e}},tt(xc),{singleton:!0}),mm=Ge(([{scrollContainerState:e,scrollTo:t}])=>{const r=De(),n=De(),s=De(),a=Y(!1),o=Y(void 0);return ce(W(vt(r,n),ne(([{scrollHeight:i,scrollTop:c,viewportHeight:l},{offsetTop:u}])=>({scrollHeight:i,scrollTop:Math.max(0,c-u),viewportHeight:l}))),e),ce(W(t,Te(n),ne(([i,{offsetTop:c}])=>({...i,top:i.top+c}))),s),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:r,windowScrollTo:s,windowViewportRect:n}},tt(Vt)),Xj=Ge(([{sizeRanges:e,sizes:t},{headerHeight:r,scrollTop:n},{initialTopMostItemIndex:s},{didMount:a},{useWindowScroll:o,windowScrollContainerState:i,windowViewportRect:c}])=>{const l=De(),u=Y(void 0),d=Y(null),f=Y(null);return ce(i,d),ce(c,f),Ve(W(l,Te(t,n,o,d,f,r)),([m,b,g,E,v,w,S])=>{const T=Dj(b.sizeTree);E&&v!==null&&w!==null&&(g=v.scrollTop-w.offsetTop),g-=S,m({ranges:T,scrollTop:g})}),ce(W(u,fe(J0),ne(Qj)),s),ce(W(a,Te(u),fe(([,m])=>m!==void 0),rt(),ne(([,m])=>m.ranges)),e),{getState:l,restoreStateFrom:u}},tt(hn,Vt,bc,ws,mm));function Qj(e){return{align:"start",index:0,offset:e.scrollTop}}const Jj=Ge(([{topItemsIndexes:e}])=>{const t=Y(0);return ce(W(t,fe(r=>r>=0),ne(r=>Array.from({length:r}).map((n,s)=>s))),e),{topItemCount:t}},tt(ba));function Hx(e){let t=!1,r;return()=>(t||(t=!0,r=e()),r)}const eV=Hx(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),tV=Ge(([{deviation:e,scrollBy:t,scrollingInProgress:r,scrollTop:n},{isAtBottom:s,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:i},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:f},{log:m},{recalcInProgress:b}])=>{const g=hr(W(c,Te(o),mn(([,v,w,S],[{bottom:T,items:O,offsetBottom:L,totalCount:I},h])=>{const y=T+L;let x=0;return w===I&&v.length>0&&O.length>0&&(O[0].originalIndex===0&&v[0].originalIndex===0||(x=y-S,x!==0&&(x+=h))),[x,O,I,y]},[0,[],0,0]),fe(([v])=>v!==0),Te(n,i,r,s,m,b),fe(([,v,w,S,,,T])=>!T&&!S&&v!==0&&w===yc),ne(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},rr.DEBUG),v))));function E(v){v>0?(Ce(t,{behavior:"auto",top:-v}),Ce(e,0)):(Ce(e,0),Ce(t,{behavior:"auto",top:-v}))}return Ve(W(g,Te(e,a)),([v,w,S])=>{S&&eV()?Ce(e,w-v):E(-v)}),Ve(W(vt(zt(a,!1),e,b),fe(([v,w,S])=>!v&&!S&&w!==0),ne(([v,w])=>w),jn(1)),E),ce(W(d,ne(v=>({top:-v}))),t),Ve(W(l,Te(f,u),ne(([v,{groupIndices:w,lastSize:S,sizeTree:T},O])=>{function L(I){return I*(S+O)}if(w.length===0)return L(v);{let I=0;const h=pc(T,0);let y=0,x=0;for(;y<v;){y++,I+=h;let A=w.length===x+1?1/0:w[x+1]-w[x]-1;y+A>v&&(I-=h,A=v-y+1),y+=A,I+=L(A),x++}return I}})),v=>{Ce(e,v),requestAnimationFrame(()=>{Ce(t,{top:v}),requestAnimationFrame(()=>{Ce(e,0),Ce(b,!1)})})}),{deviation:e}},tt(Vt,xc,ba,hn,gs,im)),rV=Ge(([e,t,r,n,s,a,o,i,c,l,u])=>({...e,...t,...r,...n,...s,...a,...o,...i,...c,...l,...u}),tt(pm,Yj,ws,Rx,Mx,Zj,Vj,mm,Lx,gs,Nx)),$x=Ge(([{data:e,defaultItemSize:t,firstItemIndex:r,fixedItemSize:n,fixedGroupSize:s,gap:a,groupIndices:o,heightEstimates:i,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:m},{initialItemFinalLocationReached:b,initialTopMostItemIndex:g,scrolledToInitialItem:E},v,w,S,T,{scrollToIndex:O},L,{topItemCount:I},{groupCounts:h},y])=>{const{listState:x,minOverscanItemCount:A,topItemsIndexes:B,rangeChanged:F,..._}=T;return ce(F,y.scrollSeekRangeChanged),ce(W(y.windowViewportRect,ne(k=>k.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:r,fixedItemHeight:n,fixedGroupHeight:s,gap:a,groupCounts:h,heightEstimates:i,initialItemFinalLocationReached:b,initialTopMostItemIndex:g,scrolledToInitialItem:E,sizeRanges:l,topItemCount:I,topItemsIndexes:B,totalCount:f,...S,groupIndices:o,itemSize:c,listState:x,minOverscanItemCount:A,scrollToIndex:O,statefulTotalCount:d,trackItemSizes:m,rangeChanged:F,..._,...y,...v,sizes:u,...w}},tt(hn,bc,Vt,Xj,Kj,ba,hc,tV,Jj,Sx,rV));function nV(e,t){const r={},n={};let s=0;const a=e.length;for(;s<a;)n[e[s]]=1,s+=1;for(const o in t)Object.hasOwn(n,o)||(r[o]=t[o]);return r}const Yu=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Gx(e,t,r){const n=Object.keys(t.required||{}),s=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),i=M.createContext({});function c(E,v){E.propsReady&&Ce(E.propsReady,!1);for(const w of n){const S=E[t.required[w]];Ce(S,v[w])}for(const w of s)if(w in v){const S=E[t.optional[w]];Ce(S,v[w])}E.propsReady&&Ce(E.propsReady,!0)}function l(E){return a.reduce((v,w)=>(v[w]=S=>{const T=E[t.methods[w]];Ce(T,S)},v),{})}function u(E){return o.reduce((v,w)=>(v[w]=xj(E[t.events[w]]),v),{})}const d=M.forwardRef((E,v)=>{const{children:w,...S}=E,[T]=M.useState(()=>ju(vj(e),I=>{c(I,S)})),[O]=M.useState(dx(u,T));Yu(()=>{for(const I of o)I in S&&Ve(O[I],S[I]);return()=>{Object.values(O).map(em)}},[S,O,T]),Yu(()=>{c(T,S)}),M.useImperativeHandle(v,lx(l(T)));const L=r;return C.jsx(i.Provider,{value:T,children:r?C.jsx(L,{...nV([...n,...s,...o],S),children:w}):w})}),f=E=>{const v=M.useContext(i);return M.useCallback(w=>{Ce(v[E],w)},[v,E])},m=E=>{const v=M.useContext(i)[E],w=M.useCallback(S=>Ve(v,S),[v]);return M.useSyncExternalStore(w,()=>at(v),()=>at(v))},b=E=>{const v=M.useContext(i)[E],[w,S]=M.useState(dx(at,v));return Yu(()=>Ve(v,T=>{T!==w&&S(lx(T))}),[v,w]),w},g=M.version.startsWith("18")?m:b;return{Component:d,useEmitter:(E,v)=>{const w=M.useContext(i)[E];Yu(()=>Ve(w,v),[v,w])},useEmitterValue:g,usePublisher:f}}const jx=M.createContext(void 0),Vx=M.createContext(void 0),Wx=typeof document<"u"?M.useLayoutEffect:M.useEffect;function hm(e){return"self"in e}function sV(e){return"body"in e}function qx(e,t,r,n=Co,s,a){const o=M.useRef(null),i=M.useRef(null),c=M.useRef(null),l=M.useCallback(f=>{let m,b,g;const E=f.target;if(sV(E)||hm(E)){const w=hm(E)?E:E.defaultView;g=a?w.scrollX:w.scrollY,m=a?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight,b=a?w.innerWidth:w.innerHeight}else g=a?E.scrollLeft:E.scrollTop,m=a?E.scrollWidth:E.scrollHeight,b=a?E.offsetWidth:E.offsetHeight;const v=()=>{e({scrollHeight:m,scrollTop:Math.max(g,0),viewportHeight:b})};f.suppressFlushSync?v():Os.flushSync(v),i.current!==null&&(g===i.current||g<=0||g===m-b)&&(i.current=null,t(!0),c.current&&(clearTimeout(c.current),c.current=null))},[e,t,a]);M.useEffect(()=>{const f=s||o.current;return n(s||o.current),l({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",l,{passive:!0}),()=>{n(null),f.removeEventListener("scroll",l)}},[o,l,r,n,s]);function u(f){const m=o.current;if(!m||(a?"offsetWidth"in m&&m.offsetWidth===0:"offsetHeight"in m&&m.offsetHeight===0))return;const b=f.behavior==="smooth";let g,E,v;hm(m)?(E=Math.max(xs(m.document.documentElement,a?"width":"height"),a?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight),g=a?m.innerWidth:m.innerHeight,v=a?window.scrollX:window.scrollY):(E=m[a?"scrollWidth":"scrollHeight"],g=xs(m,a?"width":"height"),v=m[a?"scrollLeft":"scrollTop"]);const w=E-g;if(f.top=Math.ceil(Math.max(Math.min(w,f.top),0)),Ix(g,E)||f.top===v){e({scrollHeight:E,scrollTop:v,viewportHeight:g}),b&&t(!0);return}b?(i.current=f.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,i.current=null,t(!0)},1e3)):i.current=null,a&&(f={behavior:f.behavior,left:f.top}),m.scrollTo(f)}function d(f){a&&(f={behavior:f.behavior,left:f.top}),o.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}const bm="-webkit-sticky",Kx="sticky",ym=Hx(()=>{if(typeof document>"u")return Kx;const e=document.createElement("div");return e.style.position=bm,e.style.position===bm?bm:Kx});function gm(e){return e}const aV=Ge(()=>{const e=Y(i=>`Item ${i}`),t=Y(i=>`Group ${i}`),r=Y({}),n=Y(gm),s=Y("div"),a=Y(Co),o=(i,c=null)=>zt(W(r,ne(l=>l[i]),rt()),c);return{components:r,computeItemKey:n,EmptyPlaceholder:o("EmptyPlaceholder"),FooterComponent:o("Footer"),GroupComponent:o("Group","div"),groupContent:t,HeaderComponent:o("Header"),HeaderFooterTag:s,ItemComponent:o("Item","div"),itemContent:e,ListComponent:o("List","div"),ScrollerComponent:o("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:o("ScrollSeekPlaceholder"),TopItemListComponent:o("TopItemList")}}),oV=Ge(([e,t])=>({...e,...t}),tt($x,aV)),iV=({height:e})=>C.jsx("div",{style:{height:e}}),cV={overflowAnchor:"none",position:ym(),zIndex:1},Yx={overflowAnchor:"none"},lV={...Yx,display:"inline-block",height:"100%"},Zx=M.memo(function({showTopList:e=!1}){const t=xe("listState"),r=Pr("sizeRanges"),n=xe("useWindowScroll"),s=xe("customScrollParent"),a=Pr("windowScrollContainerState"),o=Pr("scrollContainerState"),i=s||n?a:o,c=xe("itemContent"),l=xe("context"),u=xe("groupContent"),d=xe("trackItemSizes"),f=xe("itemSize"),m=xe("log"),b=Pr("gap"),g=xe("horizontalDirection"),{callbackRef:E}=Cj(r,f,d,e?Co:i,m,b,s,g,xe("skipAnimationFrameInResizeObserver")),[v,w]=M.useState(0);xm("deviation",_=>{v!==_&&w(_)});const S=xe("EmptyPlaceholder"),T=xe("ScrollSeekPlaceholder")||iV,O=xe("ListComponent"),L=xe("ItemComponent"),I=xe("GroupComponent"),h=xe("computeItemKey"),y=xe("isSeeking"),x=xe("groupIndices").length>0,A=xe("alignToBottom"),B=xe("initialItemFinalLocationReached"),F=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginLeft:v!==0?v:A?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:A?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...B?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&S?C.jsx(S,{...Rt(S,l)}):C.jsx(O,{...Rt(O,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:E,style:F,children:(e?t.topItems:t.items).map(_=>{const k=_.originalIndex,P=h(k+t.firstItemIndex,_.data,l);return y?M.createElement(T,{...Rt(T,l),height:_.size,index:_.index,key:P,type:_.type||"item",..._.type==="group"?{}:{groupIndex:_.groupIndex}}):_.type==="group"?M.createElement(I,{...Rt(I,l),"data-index":k,"data-item-index":_.index,"data-known-size":_.size,key:P,style:cV},u(_.index,l)):M.createElement(L,{...Rt(L,l),...fV(L,_.data),"data-index":k,"data-item-group-index":_.groupIndex,"data-item-index":_.index,"data-known-size":_.size,key:P,style:g?lV:Yx},x?c(_.index,_.groupIndex,_.data,l):c(_.index,_.data,l))})})}),uV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},dV={outline:"none",overflowX:"auto",position:"relative"},Zu=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),pV={position:ym(),top:0,width:"100%",zIndex:1};function Rt(e,t){if(typeof e!="string")return{context:t}}function fV(e,t){return{item:typeof e=="string"?void 0:t}}const mV=M.memo(function(){const e=xe("HeaderComponent"),t=Pr("headerHeight"),r=xe("HeaderFooterTag"),n=ma(M.useMemo(()=>a=>{t(xs(a,"height"))},[t]),!0,xe("skipAnimationFrameInResizeObserver")),s=xe("context");return e?C.jsx(r,{ref:n,children:C.jsx(e,{...Rt(e,s)})}):null}),hV=M.memo(function(){const e=xe("FooterComponent"),t=Pr("footerHeight"),r=xe("HeaderFooterTag"),n=ma(M.useMemo(()=>a=>{t(xs(a,"height"))},[t]),!0,xe("skipAnimationFrameInResizeObserver")),s=xe("context");return e?C.jsx(r,{ref:n,children:C.jsx(e,{...Rt(e,s)})}):null});function Xx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.memo(function({children:n,style:s,context:a,...o}){const i=r("scrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:m,scrollToCallback:b}=qx(i,l,c,u,void 0,d);return e("scrollTo",b),e("scrollBy",f),C.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:m,style:{...d?dV:uV,...s},tabIndex:0,...o,...Rt(c,a),children:n})})}function Qx({useEmitter:e,useEmitterValue:t,usePublisher:r}){return M.memo(function({children:n,style:s,context:a,...o}){const i=r("windowScrollContainerState"),c=t("ScrollerComponent"),l=r("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),m=M.useRef(null),b=t("scrollerRef"),{scrollByCallback:g,scrollerRef:E,scrollToCallback:v}=qx(i,l,c,b,f);return Wx(()=>{var w;return E.current=f||((w=m.current)==null?void 0:w.ownerDocument.defaultView),()=>{E.current=null}},[E,f]),e("windowScrollTo",v),e("scrollBy",g),C.jsx(c,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...s,...u!==0?{height:u+d}:{}},...o,...Rt(c,a),children:n})})}const bV=({children:e})=>{const t=M.useContext(jx),r=Pr("viewportHeight"),n=Pr("fixedItemHeight"),s=xe("alignToBottom"),a=xe("horizontalDirection"),o=M.useMemo(()=>ux(r,c=>xs(c,a?"width":"height")),[r,a]),i=ma(o,!0,xe("skipAnimationFrameInResizeObserver"));return M.useEffect(()=>{t&&(r(t.viewportHeight),n(t.itemHeight))},[t,r,n]),C.jsx("div",{"data-viewport-type":"element",ref:i,style:Zu(s),children:e})},yV=({children:e})=>{const t=M.useContext(jx),r=Pr("windowViewportRect"),n=Pr("fixedItemHeight"),s=xe("customScrollParent"),a=hx(r,s,xe("skipAnimationFrameInResizeObserver")),o=xe("alignToBottom");return M.useEffect(()=>{t&&(n(t.itemHeight),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,r,n]),C.jsx("div",{"data-viewport-type":"window",ref:a,style:Zu(o),children:e})},gV=({children:e})=>{const t=xe("TopItemListComponent")||"div",r=xe("headerHeight"),n={...pV,marginTop:`${r}px`},s=xe("context");return C.jsx(t,{style:n,...Rt(t,s),children:e})},xV=M.memo(function(e){const t=xe("useWindowScroll"),r=xe("topItemsIndexes").length>0,n=xe("customScrollParent"),s=xe("context");return C.jsxs(n||t?EV:vV,{...e,context:s,children:[r&&C.jsx(gV,{children:C.jsx(Zx,{showTopList:!0})}),C.jsxs(n||t?yV:bV,{children:[C.jsx(mV,{}),C.jsx(Zx,{}),C.jsx(hV,{})]})]})}),{Component:wV,useEmitter:xm,useEmitterValue:xe,usePublisher:Pr}=Gx(oV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},xV),vV=Xx({useEmitter:xm,useEmitterValue:xe,usePublisher:Pr}),EV=Qx({useEmitter:xm,useEmitterValue:xe,usePublisher:Pr}),Jx=wV;tt($x,Ge(()=>{const e=Y(l=>C.jsxs("td",{children:["Item $",l]})),t=Y(null),r=Y(l=>C.jsxs("td",{colSpan:1e3,children:["Group ",l]})),n=Y(null),s=Y(null),a=Y({}),o=Y(gm),i=Y(Co),c=(l,u=null)=>zt(W(a,ne(d=>d[l]),rt()),u);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:s,fixedHeaderContent:n,itemContent:e,groupContent:r,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}})),ym();const e5={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},kV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:t5,floor:Xu,max:Ec,min:wm,round:r5}=Math;function n5(e,t,r){return Array.from({length:t-e+1}).map((n,s)=>({data:r===null?null:r[s+e],index:s+e}))}function CV(e){return{...kV,items:e}}function Qu(e,t){return e&&e.width===t.width&&e.height===t.height}function TV(e,t){return e&&e.column===t.column&&e.row===t.row}const AV=Ge(([{increaseViewportBy:e,listBoundary:t,overscan:r,visibleRange:n},{footerHeight:s,headerHeight:a,scrollBy:o,scrollContainerState:i,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,m,{didMount:b,propsReady:g},{customScrollParent:E,useWindowScroll:v,windowScrollContainerState:w,windowScrollTo:S,windowViewportRect:T},O])=>{const L=Y(0),I=Y(0),h=Y(e5),y=Y({height:0,width:0}),x=Y({height:0,width:0}),A=De(),B=De(),F=Y(0),_=Y(null),k=Y({column:0,row:0}),P=De(),D=De(),U=Y(!1),z=Y(0),H=Y(!0),j=Y(!1),Q=Y(!1);Ve(W(b,Te(z),fe(([X,ve])=>!!ve)),()=>{Ce(H,!1)}),Ve(W(vt(b,H,x,y,z,j),fe(([X,ve,Me,je,,it])=>X&&!ve&&Me.height!==0&&je.height!==0&&!it)),([,,,,X])=>{Ce(j,!0),um(1,()=>{Ce(A,X)}),Kr(W(l),()=>{Ce(t,[0,0]),Ce(H,!0)})}),ce(W(D,fe(X=>X!=null&&X.scrollTop>0),fn(0)),I),Ve(W(b,Te(D),fe(([,X])=>X!=null)),([,X])=>{X&&(Ce(y,X.viewport),Ce(x,X.item),Ce(k,X.gap),X.scrollTop>0&&(Ce(U,!0),Kr(W(l,fa(1)),ve=>{Ce(U,!1)}),Ce(c,{top:X.scrollTop})))}),ce(W(y,ne(({height:X})=>X)),d),ce(W(vt(me(y,Qu),me(x,Qu),me(k,(X,ve)=>X&&X.column===ve.column&&X.row===ve.row),me(l)),ne(([X,ve,Me,je])=>({gap:Me,item:ve,scrollTop:je,viewport:X}))),P),ce(W(vt(me(L),n,me(k,TV),me(x,Qu),me(y,Qu),me(_),me(I),me(U),me(H),me(z)),fe(([,,,,,,,X])=>!X),ne(([X,[ve,Me],je,it,Ae,Ee,ye,,Xe,Ye])=>{const{column:Qe,row:Or}=je,{height:Ut,width:Am}=it,{width:z5}=Ae;if(ye===0&&(X===0||z5===0))return e5;if(Am===0){const j5=dm(Ye,X),tq=j5+Math.max(ye-1,0);return CV(n5(j5,tq,Ee))}const td=s5(z5,Am,Qe);let zo,Sa;Xe?ve===0&&Me===0&&ye>0?(zo=0,Sa=ye-1):(zo=td*Xu((ve+Or)/(Ut+Or)),Sa=td*t5((Me+Or)/(Ut+Or))-1,Sa=wm(X-1,Ec(Sa,td-1)),zo=wm(Sa,Ec(0,zo))):(zo=0,Sa=-1);const R5=n5(zo,Sa,Ee),{bottom:H5,top:$5}=a5(Ae,je,it,R5),G5=t5(X/td),eq=G5*Ut+(G5-1)*Or-H5;return{bottom:H5,itemHeight:Ut,items:R5,itemWidth:Am,offsetBottom:eq,offsetTop:$5,top:$5}})),h),ce(W(_,fe(X=>X!==null),ne(X=>X.length)),L),ce(W(vt(y,x,h,k),fe(([X,ve,{items:Me}])=>Me.length>0&&ve.height!==0&&X.height!==0),ne(([X,ve,{items:Me},je])=>{const{bottom:it,top:Ae}=a5(X,je,ve,Me);return[Ae,it]}),rt(fc)),t);const pe=Y(!1);ce(W(l,Te(pe),ne(([X,ve])=>ve||X!==0)),pe);const be=hr(W(vt(h,L),fe(([{items:X}])=>X.length>0),Te(pe),fe(([[X,ve],Me])=>{const je=X.items[X.items.length-1].index===ve-1;return(Me||X.bottom>0&&X.itemHeight>0&&X.offsetBottom===0&&X.items.length===ve)&&je}),ne(([[,X]])=>X-1),rt())),ie=hr(W(me(h),fe(({items:X})=>X.length>0&&X[0].index===0),fn(0),rt())),de=hr(W(me(h),Te(U),fe(([{items:X},ve])=>X.length>0&&!ve),ne(([{items:X}])=>({endIndex:X[X.length-1].index,startIndex:X[0].index})),rt(Ex),jn(0)));ce(de,m.scrollSeekRangeChanged),ce(W(A,Te(y,x,L,k),ne(([X,ve,Me,je,it])=>{const Ae=Px(X),{align:Ee,behavior:ye,offset:Xe}=Ae;let Ye=Ae.index;Ye==="LAST"&&(Ye=je-1),Ye=Ec(0,Ye,wm(je-1,Ye));let Qe=vm(ve,it,Me,Ye);return Ee==="end"?Qe=r5(Qe-ve.height+Me.height):Ee==="center"&&(Qe=r5(Qe-ve.height/2+Me.height/2)),Xe&&(Qe+=Xe),{behavior:ye,top:Qe}})),c);const Oe=zt(W(h,ne(X=>X.offsetBottom+X.bottom)),0);return ce(W(T,ne(X=>({height:X.visibleHeight,width:X.visibleWidth}))),y),{customScrollParent:E,data:_,deviation:F,footerHeight:s,gap:k,headerHeight:a,increaseViewportBy:e,initialItemCount:I,itemDimensions:x,overscan:r,restoreStateFrom:D,scrollBy:o,scrollContainerState:i,scrollHeight:B,scrollTo:c,scrollToIndex:A,scrollTop:l,smoothScrollTargetReached:u,totalCount:L,useWindowScroll:v,viewportDimensions:y,windowScrollContainerState:w,windowScrollTo:S,windowViewportRect:T,...m,gridState:h,horizontalDirection:Q,initialTopMostItemIndex:z,totalListHeight:Oe,...f,endReached:be,propsReady:g,rangeChanged:de,startReached:ie,stateChanged:P,stateRestoreInProgress:U,...O}},tt(pm,Vt,xc,Rx,ws,mm,gs));function s5(e,t,r){return Ec(1,Xu((e+r)/(Xu(t)+r)))}function a5(e,t,r,n){const{height:s}=r;if(s===void 0||n.length===0)return{bottom:0,top:0};const a=vm(e,t,r,n[0].index);return{bottom:vm(e,t,r,n[n.length-1].index)+s,top:a}}function vm(e,t,r,n){const s=s5(e.width,r.width,t.column),a=Xu(n/s),o=a*r.height+Ec(0,a-1)*t.row;return o>0?o+t.row:o}const SV=Ge(()=>{const e=Y(d=>`Item ${d}`),t=Y({}),r=Y(null),n=Y("virtuoso-grid-item"),s=Y("virtuoso-grid-list"),a=Y(gm),o=Y("div"),i=Y(Co),c=(d,f=null)=>zt(W(t,ne(m=>m[d]),rt()),f),l=Y(!1),u=Y(!1);return ce(me(u),l),{components:t,computeItemKey:a,context:r,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:o,itemClassName:n,ItemComponent:c("Item","div"),itemContent:e,listClassName:s,ListComponent:c("List","div"),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),PV=Ge(([e,t])=>({...e,...t}),tt(AV,SV)),IV=M.memo(function(){const e=ot("gridState"),t=ot("listClassName"),r=ot("itemClassName"),n=ot("itemContent"),s=ot("computeItemKey"),a=ot("isSeeking"),o=Ir("scrollHeight"),i=ot("ItemComponent"),c=ot("ListComponent"),l=ot("ScrollSeekPlaceholder"),u=ot("context"),d=Ir("itemDimensions"),f=Ir("gap"),m=ot("log"),b=ot("stateRestoreInProgress"),g=Ir("reportReadyState"),E=ma(M.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;o(w);const S=v.firstChild;if(S){const{height:T,width:O}=S.getBoundingClientRect();d({height:T,width:O})}f({column:i5("column-gap",getComputedStyle(v).columnGap,m),row:i5("row-gap",getComputedStyle(v).rowGap,m)})},[o,d,f,m]),!0,!1);return Wx(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),b?null:C.jsx(c,{className:t,ref:E,...Rt(c,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const w=s(v.index,v.data,u);return a?C.jsx(l,{...Rt(l,u),height:e.itemHeight,index:v.index,width:e.itemWidth},w):M.createElement(i,{...Rt(i,u),className:r,"data-index":v.index,key:w},n(v.index,v.data,u))})})}),BV=M.memo(function(){const e=ot("HeaderComponent"),t=Ir("headerHeight"),r=ot("headerFooterTag"),n=ma(M.useMemo(()=>a=>{t(xs(a,"height"))},[t]),!0,!1),s=ot("context");return e?C.jsx(r,{ref:n,children:C.jsx(e,{...Rt(e,s)})}):null}),FV=M.memo(function(){const e=ot("FooterComponent"),t=Ir("footerHeight"),r=ot("headerFooterTag"),n=ma(M.useMemo(()=>a=>{t(xs(a,"height"))},[t]),!0,!1),s=ot("context");return e?C.jsx(r,{ref:n,children:C.jsx(e,{...Rt(e,s)})}):null}),OV=({children:e})=>{const t=M.useContext(Vx),r=Ir("itemDimensions"),n=Ir("viewportDimensions"),s=ma(M.useMemo(()=>a=>{n(a.getBoundingClientRect())},[n]),!0,!1);return M.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),r({height:t.itemHeight,width:t.itemWidth}))},[t,n,r]),C.jsx("div",{ref:s,style:Zu(!1),children:e})},UV=({children:e})=>{const t=M.useContext(Vx),r=Ir("windowViewportRect"),n=Ir("itemDimensions"),s=ot("customScrollParent"),a=hx(r,s,!1);return M.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),r({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,r,n]),C.jsx("div",{ref:a,style:Zu(!1),children:e})},DV=M.memo(function({...e}){const t=ot("useWindowScroll"),r=ot("customScrollParent"),n=r||t?MV:_V,s=r||t?UV:OV,a=ot("context");return C.jsx(n,{...e,...Rt(n,a),children:C.jsxs(s,{children:[C.jsx(BV,{}),C.jsx(IV,{}),C.jsx(FV,{})]})})}),{useEmitter:o5,useEmitterValue:ot,usePublisher:Ir}=Gx(PV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},DV),_V=Xx({useEmitter:o5,useEmitterValue:ot,usePublisher:Ir}),MV=Qx({useEmitter:o5,useEmitterValue:ot,usePublisher:Ir});function i5(e,t,r){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&r(`${e} was not resolved to pixel value correctly`,t,rr.WARN),t==="normal"?0:parseInt(t??"0",10)}var Em={},c5;function NV(){if(c5)return Em;c5=1;var e=yu.GenIcon;return Em.AiFillQuestionCircle=function(r){return e({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 0 0-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}}]})(r)},Em}var LV=NV();function l5({logo:e,className:t="",style:r={},alt:n="Token logo"}){const[s,a]=M.useState(!1);return M.useEffect(()=>{a(!1)},[e]),e&&!s?C.jsx("img",{alt:n,style:r,onError:()=>a(!0),className:`twap-token-logo ${t}`,src:e}):C.jsx(LV.AiFillQuestionCircle,{style:{width:20,height:20},className:"twap-token-svg"})}var km={},u5;function zV(){if(u5)return km;u5=1;var e=yu.GenIcon;return km.HiArrowRight=function(r){return e({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"}}]})(r)},km}var d5=zV();const RV=({count:e})=>{const t=Ie(),r=ee(n=>n.updateState);return C.jsxs("div",{className:"twap-orders__selected-order-fills-button",onClick:()=>r({showSelectedOrderFills:!0}),children:[C.jsxs("p",{children:[t("orderFills")," ",C.jsxs("span",{className:"twap-orders__selected-order-fills-button-count",children:["(",e,")"]})]}),C.jsx(G6.IoIosArrowDown,{})]})},p5=({token:e})=>{const{components:t}=re();return C.jsxs("div",{className:"twap-orders__selected-order-fills-token",children:[t.TokenLogo?C.jsx(t.TokenLogo,{token:e}):C.jsx(l5,{logo:e==null?void 0:e.logoUrl}),C.jsx("p",{className:"twap-orders__selected-order-fills-token-symbol",children:e==null?void 0:e.symbol})]})},HV=({srcToken:e,dstToken:t})=>C.jsxs("div",{className:"twap-orders__selected-order-fills-tokens",children:[C.jsx(p5,{token:e}),C.jsx("span",{className:"twap-orders__selected-order-fills-token-separator",children:C.jsx(d5.HiArrowRight,{})}),C.jsx(p5,{token:t})]}),$V=({fill:e,index:t,srcToken:r,dstToken:n})=>{const s=qr(r==null?void 0:r.decimals,e.inAmount),a=qr(n==null?void 0:n.decimals,e.outAmount),o=Hu(e.timestamp),i=Ru(e.txHash),c=Ie();return C.jsxs(he,{className:"twap-fills-view__item",children:[C.jsx(he.DetailRow,{title:c("fillIndex"),className:"twap-fills-view__item-index",children:C.jsx("p",{children:`#${t}`})}),C.jsx(he.DetailRow,{title:c("fillTimestamp"),className:"twap-fills-view__item-date",children:o}),C.jsxs(he.DetailRow,{title:c("fillAmountOut"),className:"twap-fills-view__item-amount-in",children:[C.jsx(pn,{value:s})," ",(r==null?void 0:r.symbol)??""]}),C.jsxs(he.DetailRow,{title:c("fillAmountReceived"),className:"twap-fills-view__item-amount-out",children:[C.jsx(pn,{value:a})," ",(n==null?void 0:n.symbol)??""]}),e.txHash&&C.jsx(he.DetailRow,{title:c("fillTransactionHash"),className:"twap-fills-view__item-tx",children:C.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",title:e.txHash,children:Ll(e.txHash)})})]})},GV=({order:e})=>{var n;const t=Ie(),r=((n=e.original)==null?void 0:n.fills)??[];return C.jsxs("div",{className:"twap-orders__selected-order-fills",children:[C.jsx(HV,{srcToken:e.srcToken,dstToken:e.dstToken}),r.length===0?C.jsx("p",{className:"twap-orders__selected-order-fills-empty",children:t("noFills")}):C.jsx("div",{className:"twap-orders__selected-order-fills-list",children:C.jsx(Jx,{style:{height:"100%"},totalCount:r.length,itemContent:s=>{const a=r[s];return a?C.jsx($V,{fill:a,index:s+1,srcToken:e.srcToken,dstToken:e.dstToken}):null}})})]})},f5=M.createContext({}),Ht=()=>M.useContext(f5),jV=()=>{const e=ee(f=>f.state.selectedOrderID),t=Q2(e),r=Ie(),[n,s]=M.useState("panel1"),a=ee(f=>f.updateState),o=ee(f=>f.state.showSelectedOrderFills),{components:i}=re(),c=i.TokenLogo;M.useEffect(()=>{s("panel1"),a({showSelectedOrderFills:!1})},[t==null?void 0:t.id.value]);const l=f=>{s(n===f?!1:f)};if(!t)return null;const u=t.fills??[],d=o?C.jsx(GV,{order:t}):C.jsxs(C.Fragment,{children:[C.jsx(u1,{SrcTokenLogo:c&&C.jsx(c,{token:t.srcToken}),DstTokenLogo:c&&C.jsx(c,{token:t.dstToken}),fromTitle:r("from"),inToken:t.srcToken,toTitle:r("to"),outToken:t.dstToken}),C.jsx(he.Container,{children:C.jsxs("div",{className:"twap-orders__selected-order-bottom",children:[C.jsxs("div",{className:"twap-orders__selected-order-accordions",children:[C.jsx(m5,{title:r("executionSummary"),onClick:()=>l("panel1"),expanded:n==="panel1",children:C.jsx(JV,{})}),C.jsx(m5,{title:r("orderInfo"),expanded:n==="panel2",onClick:()=>l("panel2"),children:C.jsx(VV,{})}),C.jsx(RV,{count:u.length})]}),C.jsx(tW,{})]})})]});return C.jsx(f5.Provider,{value:{order:t},children:C.jsx("div",{className:`twap-orders__selected-order ${`twap-orders__selected-order-${t.original.status.toLowerCase()}`}`,children:d})})},m5=({expanded:e,onClick:t,children:r,title:n})=>C.jsxs("div",{className:"twap-orders__selected-order-accordion",children:[C.jsxs("div",{onClick:t,className:"twap-orders__selected-order-accordion-trigger",children:[C.jsx("p",{children:n}),C.jsx(G6.IoIosArrowDown,{style:{transform:e?"rotate(180deg)":"rotate(0deg)"}})]}),e&&C.jsx("div",{className:"twap-orders__selected-order-accordion-details",children:r})]}),VV=()=>C.jsxs(he,{children:[C.jsx(QV,{}),C.jsx(rW,{}),C.jsx(YV,{}),C.jsx(nW,{}),C.jsx(WV,{}),C.jsx(qV,{}),C.jsx(KV,{}),C.jsx(ZV,{}),C.jsx(XV,{}),C.jsx(cW,{}),C.jsx(he.Recipient,{})]}),WV=()=>{const{order:e}=Ht();return C.jsx(he.TradeSize,{tradeSize:e.sizePerTrade.value,srcToken:e.srcToken,label:e.sizePerTrade.label,tooltip:e.sizePerTrade.tooltip,trades:e.totalTrades.value})},qV=()=>{const{order:e}=Ht();return C.jsx(he.TradesAmount,{trades:e.totalTrades.value,label:e.totalTrades.label,tooltip:e.totalTrades.tooltip})},KV=()=>{const{order:e}=Ht();return C.jsx(he.MinDestAmount,{dstToken:e.dstToken,dstMinAmountOut:e.minDestAmountPerTrade.value,label:e.minDestAmountPerTrade.label,tooltip:e.minDestAmountPerTrade.tooltip})},YV=()=>{const{order:e}=Ht();return C.jsx(he.Deadline,{deadline:e.deadline.value,label:e.deadline.label,tooltip:e.deadline.tooltip})},ZV=()=>{const{order:e}=Ht();return C.jsx(he.TradeInterval,{fillDelayMillis:e.tradeInterval.value,chunks:e.totalTrades.value,label:e.tradeInterval.label,tooltip:e.tradeInterval.tooltip})},XV=()=>{const{order:e}=Ht();return C.jsx(he.Price,{srcToken:e.srcToken,dstToken:e.dstToken,price:e.triggerPrice.value,label:e.triggerPrice.label,tooltip:e.triggerPrice.tooltip})},QV=()=>{const{order:e}=Ht();return C.jsx(he.OrderID,{id:e.id.value||""})},JV=()=>C.jsxs(he,{children:[C.jsx(oW,{}),C.jsx(sW,{}),C.jsx(eW,{}),C.jsx(iW,{}),C.jsx(lW,{})]}),eW=()=>{var t;const{order:e}=Ht();return e.amountOutFilled.value?C.jsx(he.DetailRow,{title:e.amountOutFilled.label,children:C.jsxs("p",{children:[C.jsx(pn,{value:e.amountOutFilled.value})," ",(t=e.dstToken)==null?void 0:t.symbol]})}):null},tW=()=>{const{order:e}=Ht(),t=Ie(),{mutateAsync:r,isPending:n}=ix(),{components:s}=re(),a=s.Button,o=M.useCallback(async()=>r({orders:[e.original]}),[r,e]);return!e||e.original.status!==ut.Open||!a?null:C.jsx(a,{loading:n,onClick:o,disabled:n,className:"twap-cancel-order",text:t("cancelOrder"),children:t("cancelOrder")})},rW=()=>{const{order:e}=Ht(),t=Ie(),r=Hu(e.createdAt.value);return C.jsx(he.DetailRow,{title:t("createdAt")||"",children:C.jsx("p",{children:r})})},nW=()=>{var r;const{order:e}=Ht(),t=Ie();return C.jsx(he.DetailRow,{title:t("amountOut")||"",children:C.jsxs("p",{children:[C.jsx(pn,{value:e.srcAmount.value,decimalScale:3})," ",(r=e.srcToken)==null?void 0:r.symbol]})})},sW=()=>{var t;const{order:e}=Ht();return C.jsx(he.DetailRow,{title:e.amountInFilled.label,children:C.jsxs("p",{children:[C.jsx(pn,{value:e.amountInFilled.value,decimalScale:3})," ",(t=e.srcToken)==null?void 0:t.symbol]})})},aW=()=>{const{order:e}=Ht(),t=Ie();return M.useMemo(()=>{switch(e.original.status){case ut.Open:return t("Open")||"";case ut.Completed:return t("Completed")||"";case ut.Expired:return t("Expired")||"";case ut.Cancelled:return t("Cancelled")||""}},[e.original.status,t])},oW=()=>{const e=Ie(),t=aW();return C.jsx(he.DetailRow,{title:e("status")||"",children:C.jsx("p",{children:t})})},iW=()=>{const{order:e}=Ht();return C.jsx(he.DetailRow,{title:e.progress.label,children:C.jsxs("p",{children:[C.jsx(pn,{value:e.progress.value||0,decimalScale:2}),"%"]})})},cW=()=>{const{order:e}=Ht(),t=Ie();return e.limitPrice.value?C.jsx(he.Price,{label:t("limitPrice")||"",price:e.limitPrice.value,srcToken:e.srcToken,dstToken:e.dstToken,tooltip:e.limitPrice.tooltip}):null},lW=()=>{const{order:e}=Ht();return e.executionPrice.value?C.jsx(he.Price,{label:e.executionPrice.label,price:e.executionPrice.value,srcToken:e.srcToken,dstToken:e.dstToken}):null},uW=()=>C.jsx("div",{className:"twap-orders__loader",children:C.jsx("p",{children:"Loading..."})}),dW=()=>{const{isLoading:e}=Eo(),t=sx(),r=ee(a=>a.state.orderIdsToCancel),n=ee(a=>a.state.cancelOrdersMode),s=dj();return C.jsx(C.Fragment,{children:e?C.jsx(uW,{}):t!=null&&t.length?C.jsx("div",{className:`twap-orders__list ${n?"twap-orders__list-select-mode":""}`,children:C.jsx(Jx,{style:{height:"100%"},data:t,itemContent:(a,o)=>C.jsx(pW,{cancelOrdersMode:!!n,selected:(r==null?void 0:r.includes(o.id))||!1,selectOrder:s,order:o},a)})}):C.jsx(fW,{})})},pW=({order:e,selectOrder:t,selected:r,cancelOrdersMode:n})=>{const s=ee(i=>i.updateState),a=Et.useCallback(()=>{s({selectedOrderID:e==null?void 0:e.id})},[s,e==null?void 0:e.id]),o=Et.useCallback(()=>{n?t(e==null?void 0:e.id):a()},[n,t,a,e==null?void 0:e.id]);return C.jsx("div",{className:`twap-orders__list-item twap-orders__list-item-${e.status} ${n?"twap-orders__list-item-select-mode":""} ${r?"twap-orders__list-item-selected":""}`,onClick:o,children:C.jsxs("div",{className:"twap-orders__list-item-content",children:[C.jsx(mW,{order:e}),C.jsx(hW,{value:e.progress||0}),C.jsxs("div",{className:"twap-orders__list-item-tokens",children:[C.jsx(h5,{address:e.srcTokenAddress}),C.jsx(d5.HiArrowRight,{className:"twap-orders__list-item-tokens-arrow"}),C.jsx(h5,{address:e.dstTokenAddress})]})]})})},fW=()=>{const e=ee(s=>s.state.orderHistoryStatusFilter),t=ax(),r=Ie(),n=t(e);return C.jsx("div",{className:"twap-orders__list-empty",children:C.jsx("p",{children:r("noOrders",{status:n})})})},mW=({order:e})=>{const t=e&&e.status,r=tx(e),n=Hu(e.createdAt);return C.jsxs("div",{className:"twap-orders__list-item-header",children:[C.jsxs("p",{className:"twap-orders__list-item-header-title",children:[r," ",C.jsx("span",{children:`(${n})`})]}),C.jsx("p",{className:"twap-orders__list-item-header-status",children:t})]})},h5=e=>{const{useToken:t,components:r}=re(),n=t==null?void 0:t(e.address);return C.jsx("div",{className:"twap-orders__list-item-token",children:n?C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"twap-orders__list-item-token-logo",children:r.TokenLogo?C.jsx(r.TokenLogo,{token:n}):C.jsx(l5,{logo:n==null?void 0:n.logoUrl})}),C.jsx("p",{className:"twap-orders__list-item-token-symbol",children:n==null?void 0:n.symbol})]}):C.jsx("div",{})})};function hW(e){return C.jsxs("div",{className:"twap-orders__list-item-progress",children:[C.jsx("div",{className:"twap-orders__list-item-progress-bar",children:C.jsx("div",{className:"twap-orders__list-item-progress-bar-filled",style:{width:`${e.value}%`}})}),C.jsx("div",{className:"twap-orders__list-item-token-progress-label",children:C.jsx("p",{children:`${Math.round(e.value)}%`})})]})}const bW=()=>{const e=ee(r=>r.state.selectedOrderID),t=e!==void 0;return C.jsx("div",{className:`twap-orders ${e!==void 0?"twap-orders__show-selected":""}`,children:t?C.jsx(jV,{}):C.jsx(dW,{})})},yW=e=>{const t=Ie(),{marketPrice:r,typedInputAmount:n}=re();return M.useMemo(()=>{const{isError:a,value:o}=wh(e);if(!(!a||G(n||"0").isZero()||!r))return{type:Dt.MIN_FILL_DELAY,value:o,message:t("minFillDelayError",{fillDelay:`${jf(o)} ${t("minutes")}`})}},[e,t,n,r])},vs=()=>{const{callbacks:e}=re(),t=ee(a=>a.state.typedFillDelay),r=ee(a=>a.updateState),n=M.useMemo(()=>t||_c,[t]),s=yW(n);return{fillDelay:n,onChange:M.useCallback(a=>{var o;r({typedFillDelay:a}),(o=e==null?void 0:e.onFillDelayChange)==null||o.call(e,a)},[r,e]),error:s,milliseconds:n.unit*n.value}},gW=()=>{const{onChange:e,fillDelay:t,error:r}=vs(),n=Ie(),s=M.useCallback(o=>e({unit:t.unit,value:Number(o)}),[e,t]),a=M.useCallback(o=>e({unit:o,value:t.value}),[e,t]);return{onInputChange:s,onUnitSelect:a,onChange:e,milliseconds:t.unit*t.value,fillDelay:t,error:r,label:n("tradeIntervalTitle"),tooltip:n("tradeIntervalTooltip")}},Zr=()=>{const{srcToken:e,typedInputAmount:t}=re(),r=Ie(),s=ee(a=>a.state.swapExecution.acceptedSrcAmount)||t;return{amountWei:Z2(e==null?void 0:e.decimals,s),amountUI:s,error:G(s||0).isZero()?r("enterAmount"):void 0}},xW=(e,t)=>{const{module:r,srcUsd1Token:n,marketPrice:s,minChunkSizeUsd:a,typedInputAmount:o}=re(),i=Ie();return M.useMemo(()=>{if(G(o||"0").isZero()||!s||G(n||"0").isZero())return;if(!e)return{type:Dt.MIN_CHUNKS,value:1,message:i("minChunksError",{minChunks:"1"})};const{isError:c}=Eh(e,t,r);if(c)return{type:Dt.MAX_CHUNKS,value:t,message:i("maxChunksError",{maxChunks:`${t}`})};const{isError:l,value:u}=vh(o||"",n||"",a||0);if(l)return{type:Dt.MIN_TRADE_SIZE,value:u,message:i("minTradeSizeError",{minTradeSize:`${u}`})}},[e,t,r,o,n,a,i,s])},Br=()=>{const{srcToken:e,srcUsd1Token:t,module:r,minChunkSizeUsd:n}=re(),s=ee(g=>g.state.typedChunks),a=vs().fillDelay,o=ee(g=>g.updateState),{amountWei:i,amountUI:c}=Zr(),l=M.useMemo(()=>uh(a,c||"",t||"",n||0),[c,t,n,a]),u=M.useMemo(()=>lh(l,r,s),[l,s,r]),d=M.useCallback(g=>o({typedChunks:g}),[o]),f=M.useMemo(()=>fh(i||"",u),[i,u]),m=qr(e==null?void 0:e.decimals,f),b=M.useMemo(()=>t?G(m||"0").times(t||0).toString():"0",[m,t]);return{totalTrades:u,maxTrades:l,amountPerTradeUI:m,amountPerTradeWei:f,amountPerTradeUsd:b,onChange:d,error:xW(u,l)}},wW=()=>{const{srcToken:e,dstToken:t}=re(),r=Ie(),{onChange:n,totalTrades:s,amountPerTradeUsd:a,amountPerTradeUI:o,error:i,maxTrades:c,amountPerTradeWei:l}=Br(),u=Ar({value:o}),d=Ar({value:a});return{error:i,maxTrades:c,totalTrades:s,amountPerTrade:u,amountPerTradeWei:l,onChange:n,label:r("tradesAmountTitle"),tooltip:r("totalTradesTooltip"),amountPerTradeUsd:d,fromToken:e,toToken:t}},vW=e=>{const{module:t,marketPrice:r}=re(),n=Ie();return M.useMemo(()=>{const s=gh(t,e),a=xh(e);if(r){if(s.isError)return{type:Dt.MAX_ORDER_DURATION,value:s.value,message:n("maxDurationError",{duration:`${Math.floor(r6(s.value)).toFixed(0)} ${n("days")}`})};if(a.isError)return{type:Dt.MIN_ORDER_DURATION,value:a.value,message:n("minDurationError",{duration:`${Math.floor(jf(a.value)).toFixed(0)} ${n("minutes")}`})}}},[e,n,t,r])},Cm=()=>{const{module:e,callbacks:t}=re(),r=ee(c=>c.state.typedDuration),n=ee(c=>c.updateState),s=Br().totalTrades,a=vs().fillDelay,o=M.useMemo(()=>ch(e,s,a,r),[s,a,r,e]),i=vW(o);return{duration:o,setDuration:M.useCallback(c=>{var l;n({typedDuration:c}),(l=t==null?void 0:t.onDurationChange)==null||l.call(t,c)},[n,t]),error:i}},EW=()=>{const{module:e}=re(),t=Ie(),{duration:r,setDuration:n,error:s}=Cm(),a=M.useCallback(c=>{n({unit:r.unit,value:Number(c)})},[n,r]),o=M.useCallback(c=>{n({unit:c,value:r.value})},[n,r]),i=M.useMemo(()=>e===ge.STOP_LOSS?t("stopLossDurationTooltip"):t("maxDurationTooltip"),[t,e]);return{duration:r,onChange:n,milliseconds:r.unit*r.value,onInputChange:a,onUnitSelect:o,label:t("expiry"),tooltip:i,error:s}},kW=()=>{const e=ee(a=>a.state.isMarketOrder),{module:t}=re(),r=Ie(),n=M.useMemo(()=>{if(e&&t===ge.STOP_LOSS)return{text:r("triggerMarketPriceDisclaimer"),url:ld}},[e,r,t]),s=M.useMemo(()=>{if(!(t!==ge.LIMIT&&t!==ge.TWAP))return{text:r(e?"marketOrderWarning":"limitPriceMessage"),url:"https://www.orbs.com/dtwap-and-dlimit-faq/"}},[e,r,t]);return n||s},Ju=()=>{const{srcToken:e,dstToken:t,marketPriceLoading:r}=re(),n=ee(l=>l.updateState),s=ee(l=>l.state.isInvertedTrade),a=ee(l=>l.state.typedTriggerPrice),o=ee(l=>l.state.typedLimitPrice),i=ee(l=>l.state.isMarketOrder);return{onInvert:M.useCallback(()=>{a!==void 0&&n({typedTriggerPrice:G(1).div(a).toFixed()}),o!==void 0&&n({typedLimitPrice:G(1).div(o).toFixed()}),n({isInvertedTrade:!s})},[n,s,a,o,r]),isInverted:s,fromToken:s?t:e,toToken:s?e:t,isMarketPrice:i}},b5=({typedValue:e,tokenDecimals:t=18,initialPrice:r="0",percentage:n,setValue:s,setPercentage:a})=>{const{srcUsd1Token:o,dstUsd1Token:i}=re(),{isInverted:c}=Ju(),l=M.useMemo(()=>G((()=>{if(e!==void 0){const E=c?G(e).isZero()?G(0):G(1).div(e):G(e);return Nl(E.toFixed(),t)}if(n!==void 0&&G(r||"0").gt(0)&&!G(r||"0").isNaN()){const E=G(r||"0"),v=G(n||0).div(100);return E.plus(E.multipliedBy(v)).decimalPlaces(0).toFixed()}return G(r).gt(0)?r:""})()).decimalPlaces(0).toFixed(),[e,n,t,r,c]),u=M.useCallback(g=>{s(g),a(null)},[s,a]),d=M.useCallback(g=>{s(void 0),a(g)},[s,a]),f=M.useMemo(()=>{if(!r||G(r).isZero())return"";if(n!=null)return n;if(l){const g=G(r),v=G(l).minus(g).div(g).multipliedBy(100).decimalPlaces(2).toString();return G(v||"0").isZero()?"":v}return""},[l,r,n]),m=M.useMemo(()=>{let g="";if(e!==void 0)g=e;else{const E=ia(l,t);if(G(E||"0").isZero())return"";g=c?G(1).div(E).toFixed():E}return g},[e,t,l,c]),b=bs(c?o:i,m||"0");return{amountWei:G(l).isNaN()?"":l,amountUI:G(m).isNaN()?"":m,selectedPercentage:f,onChange:u,onPercentageChange:d,isInverted:c,usd:G(b).isNaN()?"":b,isTypedValue:e!==void 0}},CW=()=>{const{module:e}=re();return M.useMemo(()=>e===ge.STOP_LOSS?Km:Ym,[e])},Tm=()=>{const{module:e}=re(),t=ee(r=>r.state.isMarketOrder);return M.useMemo(()=>e!==ge.STOP_LOSS&&e!==ge.TAKE_PROFIT||t?void 0:e===ge.STOP_LOSS?Zm:Xm,[e,t])},TW=(e="")=>{const{module:t,marketPrice:r,typedInputAmount:n}=re(),s=Ie();return M.useMemo(()=>{if(G(n||"0").isZero()||!r||t!==ge.STOP_LOSS&&t!==ge.TAKE_PROFIT)return;const a=mh(r||"",e||"",t);if(a!=null&&a.isError)return{type:Dt.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE,value:a.value,message:s("StopLossTriggerPriceError")||""};const o=hh(r||"",e||"",t);if(o!=null&&o.isError)return{type:Dt.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE,value:o.value,message:s("TakeProfitTriggerPriceError")||""};if(!e||G(e||0).isZero())return{type:Dt.EMPTY_TRIGGER_PRICE,value:e,message:s("emptyTriggerPrice")||""}},[r,e,t,s,n])},AW=e=>{const{srcToken:t,dstToken:r,module:n,dstUsd1Token:s}=re(),a=Br().amountPerTradeWei,o=ee(l=>l.state.isMarketOrder),i=M.useMemo(()=>ih(n,a,e,(t==null?void 0:t.decimals)||0),[e,a,o,t==null?void 0:t.decimals,n]),c=qr((r==null?void 0:r.decimals)||0,i);return{amountWei:i,amountUI:c,usd:bs(c,s)}},Es=()=>{const{dstToken:e,marketPrice:t,module:r,callbacks:n}=re(),s=ee(b=>b.updateState),a=CW(),o=ee(b=>b.state.triggerPricePercent),i=o===void 0?a:o,c=r===ge.STOP_LOSS||r===ge.TAKE_PROFIT,l=b5({typedValue:ee(b=>b.state.typedTriggerPrice),percentage:i,tokenDecimals:(e==null?void 0:e.decimals)||18,initialPrice:c?t:void 0,setValue:M.useCallback(b=>{var g;s({typedTriggerPrice:b}),(g=n==null?void 0:n.onTriggerPriceChange)==null||g.call(n,b||"")},[s,n]),setPercentage:M.useCallback(b=>{var g;s({triggerPricePercent:b}),(g=n==null?void 0:n.onTriggerPricePercentChange)==null||g.call(n,b||"")},[s,n])}),u=TW(l.amountWei),{amountWei:d,amountUI:f,usd:m}=AW(l.amountWei);return M.useMemo(()=>({...l,error:u,pricePerChunkWei:d,pricePerChunkUI:f,pricePerChunkUsd:m}),[l,u,d,f,m])},SW=()=>{const{module:e,marketPrice:t,marketPriceLoading:r}=re(),n=Ie(),{amountUI:s,onChange:a,onPercentageChange:o,usd:i,selectedPercentage:c,error:l,pricePerChunkUI:u,pricePerChunkUsd:d,isTypedValue:f}=Es(),m=ee(O=>O.state.isMarketOrder),b=ee(O=>O.updateState),{isInverted:g,onInvert:E,fromToken:v,toToken:w}=Ju(),S=M.useCallback(()=>{b({triggerPricePercent:void 0,typedTriggerPrice:void 0})},[b]),T=e!==ge.STOP_LOSS&&e!==ge.TAKE_PROFIT;return{price:s,amountPerChunk:u,amountPerChunkUsd:d,error:l,label:n("stopLossLabel"),tooltip:e===ge.STOP_LOSS?n("stopLossTooltip"):n("takeProfitTooltip"),onChange:a,onPercentageChange:o,percentage:c,isActive:!m,onReset:S,usd:i,fromToken:v,toToken:w,prefix:"",isLoading:r||!t,isInverted:g,hide:T,onInvert:E,totalTrades:Br().totalTrades,isTypedValue:f}},PW=e=>{const{module:t,marketPrice:r,typedInputAmount:n}=re(),s=Ie(),{amountWei:a}=Es(),o=ee(i=>i.state.isMarketOrder);return M.useMemo(()=>{if(G(n||"0").isZero()||!a||!r)return;const i=bh(a,e,o,t),c=yh(a,e,o,t);if(i!=null&&i.isError)return{type:Dt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:s("triggerLimitPriceError")||"",value:i.value};if(c!=null&&c.isError)return{type:Dt.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:s("triggerLimitPriceError")||"",value:c.value};if(e&&G(e||0).isZero())return{type:Dt.MISSING_LIMIT_PRICE,message:s("emptyLimitPrice")||"",value:e||""}},[e,s,a,t,o,n,r])},kc=()=>{const{dstToken:e,marketPrice:t,callbacks:r}=re(),n=ee(l=>l.updateState),s=Tm(),a=ee(l=>l.state.limitPricePercent),o=a===void 0?s:a,i=b5({typedValue:ee(l=>l.state.typedLimitPrice),percentage:o,tokenDecimals:(e==null?void 0:e.decimals)||18,initialPrice:t,setValue:M.useCallback(l=>{var u;n({typedLimitPrice:l}),(u=r==null?void 0:r.onLimitPriceChange)==null||u.call(r,l||"")},[n,r]),setPercentage:M.useCallback(l=>{var u;n({limitPricePercent:l}),(u=r==null?void 0:r.onLimitPricePercentChange)==null||u.call(r,l||"")},[n,r])}),c=PW(i.amountWei);return M.useMemo(()=>({...i,error:c}),[i,c])},IW=()=>{const{module:e}=re(),t=ee(i=>i.updateState),r=ee(i=>i.state.isMarketOrder),n=Tm(),s=ee(i=>i.state.triggerPricePercent)||0,a=e===ge.LIMIT,o=M.useCallback(()=>{!r&&e===ge.STOP_LOSS&&t({limitPricePercent:n}),t({isMarketOrder:!r})},[t,s,e,r,n]);return{isLimitPrice:!r,toggleLimitPrice:o,hide:a}},y5=()=>{const{module:e,marketPrice:t}=re(),r=kc().amountWei,n=Es().amountWei,s=ee(a=>a.state.isMarketOrder);return e===ge.LIMIT||!s?r||"":e===ge.STOP_LOSS||e===ge.TAKE_PROFIT?n||"":t||""},Cc=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=re(),n=y5(),s=Zr().amountWei,a=M.useMemo(()=>ah(s||"",n,(e==null?void 0:e.decimals)||0),[s,n,e==null?void 0:e.decimals]),o=qr(t==null?void 0:t.decimals,a);return{amountWei:a,amountUI:o,usd:bs(o,r)}},Tc=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:r}=re(),n=y5(),s=Br().amountPerTradeWei,a=ee(c=>c.state.isMarketOrder),o=M.useMemo(()=>oh(s,n,!!a,(e==null?void 0:e.decimals)||0),[s,n,a,e==null?void 0:e.decimals]),i=qr(t==null?void 0:t.decimals,o);return{amountWei:o,amountUI:i,usd:bs(i,r)}},BW=()=>{const{typedInputAmount:e,marketPriceLoading:t,dstToken:r}=re(),{amountUI:n,usd:s}=Cc(),o=jG()?e:n;return{value:o,valueWei:Z2(r==null?void 0:r.decimals,o),isLoading:t,usd:s}},FW=()=>{const{module:e,marketPriceLoading:t}=re(),r=Ie(),{amountUI:n,onChange:s,onPercentageChange:a,usd:o,selectedPercentage:i,error:c,isTypedValue:l}=kc(),{amountUI:u,usd:d}=Tc(),f=ee(L=>L.updateState),m=Tm(),{isLimitPrice:b,toggleLimitPrice:g}=IW(),{isInverted:E,onInvert:v,fromToken:w,toToken:S}=Ju(),T=M.useCallback(()=>{f({typedLimitPrice:void 0}),f({limitPricePercent:m})},[f,e,m]),O=M.useMemo(()=>e===ge.STOP_LOSS?r("stopLossLimitPriceTooltip"):r("limitPriceTooltip"),[r,e]);return{price:n,amountPerChunk:u,amountPerChunkUsd:d,error:c,label:r("limitPrice"),tooltip:O,onChange:s,onPercentageChange:a,onReset:T,usd:o,fromToken:w,tradesAmount:Br().totalTrades,toToken:S,percentage:i,isInverted:E,isLoading:t,isLimitPrice:b,toggleLimitPrice:g,onInvert:v,isTypedValue:l}},OW=()=>{const{minChunkSizeUsd:e,typedInputAmount:t,srcUsd1Token:r}=re(),n=Ie(),s=bs(t,r);return M.useMemo(()=>G(e).gt(G(s||"0"))?{type:Dt.MIN_TRADE_SIZE_ERROR,value:e,message:n("minTradeSizeError",{minTradeSize:`${e}`})}:void 0,[e,s,n])};function g5(){const{marketPrice:e,marketPriceLoading:t,typedInputAmount:r,srcUsd1Token:n,srcBalance:s,chainId:a}=re(),o=ee(E=>E.state.swapExecution.status),i=Ie(),{error:c}=Es(),{error:l}=kc(),{error:u}=Br(),{error:d}=vs(),{error:f}=Cm(),m=OW(),b=Zr().amountWei,g=M.useMemo(()=>{if(s&&G(b).gt(s))return{type:Dt.INSUFFICIENT_BALANCE,message:i("insufficientFunds"),value:s||""}},[s,b,i,a]);return M.useMemo(()=>Th({marketPrice:e,typedInputAmount:r,srcUsd1Token:n,marketPriceLoading:t,triggerPriceError:c,limitPriceError:l,tradesError:u,fillDelayError:d,durationError:f,balanceError:g,minTradeSizeError:m}),[e,t,r,c,l,u,d,f,g,o,n,m])}const UW=()=>{const e=ee(n=>n.state.isMarketOrder),t=ee(n=>n.updateState),r=M.useCallback(()=>{t({isMarketOrder:!e})},[t,e]);return{isMarketPrice:!e,togglePrice:r}},ed=()=>{const e=ee(r=>r.state.currentTime),t=Cm().duration;return M.useMemo(()=>dh(e,t),[e,t])},DW=()=>{const{srcUsd1Token:e,dstUsd1Token:t}=re(),r=Zr().amountUI,n=Cc().amountUI,s=bs(r,e),a=bs(n,t);return{srcAmountUsd:s,dstAmountUsd:a}},_W=()=>{const{fees:e,dstUsd1Token:t}=re(),{amountUI:r}=Cc(),n=M.useMemo(()=>!e||!r?"":G(r).multipliedBy(e).dividedBy(100).toFixed(),[r,e]);return{amount:n,percent:e,usd:bs(n,t)}},x5=()=>{const{srcToken:e,dstToken:t,account:r,chainId:n,slippage:s,config:a,module:o,fees:i}=re(),{amountWei:c}=Zr(),{amountPerTradeWei:l,totalTrades:u}=Br(),d=ed(),{amountWei:f}=Tc(),{pricePerChunkWei:m}=Es(),{milliseconds:b}=vs();return M.useMemo(()=>{var g;return Sh({chainId:n,srcToken:Ms((e==null?void 0:e.address)||"")?((g=Ns(n))==null?void 0:g.wToken.address)||"":(e==null?void 0:e.address)||"",dstToken:(t==null?void 0:t.address)||"",srcAmount:c,deadlineMillis:d,fillDelayMillis:!u||u===1?0:b,slippage:s*100,account:r,srcAmountPerTrade:l,dstMinAmountPerTrade:f,triggerAmountPerTrade:m,config:a,module:o})},[e,t,r,n,s,a,o,c,l,u,b,f,m,i])},w5=()=>{const{srcToken:e,dstToken:t,account:r}=re(),{amountWei:n}=Zr(),{amountWei:s}=kc(),{amountPerTradeWei:a,totalTrades:o}=Br(),i=ed(),{amountWei:c}=Tc(),{pricePerChunkWei:l}=Es(),{milliseconds:u}=vs(),d=x5();return M.useMemo(()=>({srcToken:e,dstToken:t,limitPrice:s,deadline:i,srcAmount:n,srcAmountPerTrade:a,totalTrades:o,minDestAmountPerTrade:c,tradeInterval:u,triggerPricePerTrade:l,maker:r,rePermitData:d}),[e,t,s,i,n,a,o,c,u,l,r,d])},v5=()=>{const{srcToken:e,dstToken:t,account:r}=re(),n=Ie(),{amountUI:s,usd:a}=Tc(),{amountPerTradeUI:o,amountPerTradeUsd:i,totalTrades:c}=Br(),{amountUI:l,usd:u}=Es(),d=ed(),{amountUI:f,usd:m}=kc(),{amount:b,percent:g,usd:E}=_W(),{milliseconds:v}=vs(),{amountUI:w}=Cc(),{srcAmountUsd:S,dstAmountUsd:T}=DW(),O=Zr().amountUI,L=ee(A=>A.state.isMarketOrder),I=ee(A=>A.state.currentTime),h=X2({srcToken:e,dstToken:t,account:r,limitPrice:L?void 0:f,limitPriceUsd:L?void 0:m,deadline:d,tradeInterval:v,srcAmount:O,totalTrades:c,srcAmountPerTrade:o,srcAmountPerTradeUsd:i,minDestAmountPerTrade:s,minDestAmountPerTradeUsd:a,triggerPrice:l,triggerPriceUsd:u,srcUsd:S,dstUsd:T,dstAmount:w,orderType:Q0(),createdAt:I}),y=Ar({value:b}),x=Ar({value:E});return M.useMemo(()=>({...h,fees:{label:n("fees",{value:`${g}%`}),amount:y,usd:x||"",percentage:g}}),[h,y,x,g])},E5=M.createContext({}),MW=({children:e,...t})=>C.jsx(E5.Provider,{value:t,children:e}),NW=()=>M.useContext(E5),k5=()=>{var s,a;const e=Ie(),{wrapTxHash:t,srcToken:r}=ee(o=>o.state.swapExecution),n=(a=(s=vo())==null?void 0:s.wToken)==null?void 0:a.symbol;return t?C.jsx("p",{className:"twap-error-wrap-msg",children:e("wrapMsg",{symbol:(r==null?void 0:r.symbol)||"",wSymbol:n||""})}):null},C5=()=>{const e=Ie(),t=ee(n=>n.state.swapExecution.status),r=ex();return t===pt.SUCCESS?e("createOrderActionSuccess",{name:r}):e("createOrderAction",{name:r})},LW=()=>{const e=ee(b=>b.state.swapExecution.srcToken),t=Ie(),{step:r,wrapTxHash:n,approveTxHash:s}=ee(b=>b.state.swapExecution),a=vo(),o=Ru(n),i=Ru(n),c=Ru(s),l=ee(b=>b.state.swapExecution.status),d=Ms((e==null?void 0:e.address)||"")?(a==null?void 0:a.native.symbol)||"":(e==null?void 0:e.symbol)||"",f=a==null?void 0:a.wToken.symbol,m=C5();return M.useMemo(()=>r===Hs.WRAP?{title:t("wrapAction",{symbol:d}),footerLink:o,footerText:t(o?"viewOnExplorer":"proceedInWallet")}:r===Hs.APPROVE?{title:t("approveAction",{symbol:d}),footerLink:c,footerText:t(c?"viewOnExplorer":"proceedInWallet")}:{title:m,footerText:l===pt.LOADING?t("proceedInWallet"):void 0},[r,c,d,m,t,o,i,f,l])},zW=({error:e})=>C.jsxs("div",{className:"twap-error",children:[C.jsx("h2",{className:"twap-error-title",children:"Transaction failed"}),(e==null?void 0:e.code)&&C.jsxs("p",{className:"twap-error-code",children:["Error code: ",e==null?void 0:e.code]}),C.jsx(k5,{})]});function RW({error:e}){const{components:t}=re(),r=Ie(),n=ee(o=>{var i;return(i=o.state.swapExecution)==null?void 0:i.wrapTxHash}),s=t.SubmitOrderErrorView,a=C.jsx(es.Failed,{error:C.jsx(zW,{error:e}),footerLink:ld,footerText:r("viewOnExplorer")});return s?C.jsx(s,{wrapTxHash:n,error:e,children:a}):a}const HW=()=>{const{components:e}=re(),t=ee(u=>u.state.swapExecution.srcToken),r=ee(u=>u.state.swapExecution.dstToken),{reviewDetails:n}=NW(),s=Ie(),a=ee(u=>{var d;return!!((d=u.state.swapExecution)!=null&&d.status)}),o=v5(),i=e.USD,c=e.SubmitOrderMainView,l=C.jsxs(C.Fragment,{children:[C.jsx(es.Main,{fromTitle:s("from"),toTitle:s("to"),inUsd:i?C.jsx(i,{value:o.srcUsd,isLoading:!1}):C.jsx(pn,{value:o.srcUsd,decimalScale:2,prefix:"$"}),outUsd:i?C.jsx(i,{value:o.dstUsd,isLoading:!1}):C.jsx(pn,{value:o.dstUsd,decimalScale:2,prefix:"$"})}),!a&&C.jsxs("div",{className:"twap-create-order-bottom",children:[C.jsx(he.Container,{children:C.jsxs("div",{className:"twap-create-order-details",children:[C.jsx(he.Deadline,{deadline:o.deadline.value,label:o.deadline.label,tooltip:o.deadline.tooltip||""}),C.jsx(he.Price,{srcToken:t,price:o.triggerPrice.value,dstToken:r,label:o.triggerPrice.label,tooltip:o.triggerPrice.tooltip,usd:o.triggerPrice.usd}),C.jsx(he.Price,{srcToken:t,price:o.limitPrice.value,dstToken:r,label:o.limitPrice.label,usd:o.limitPrice.usd,tooltip:o.limitPrice.tooltip}),C.jsx(he.MinDestAmount,{dstToken:r,dstMinAmountOut:o.minDestAmountPerTrade.value,label:o.minDestAmountPerTrade.label,tooltip:o.minDestAmountPerTrade.tooltip||"",usd:o.minDestAmountPerTrade.usd}),C.jsx(he.TradeSize,{tradeSize:o.sizePerTrade.value,trades:o.totalTrades.value,srcToken:t,label:o.sizePerTrade.label,tooltip:o.sizePerTrade.tooltip}),C.jsx(he.TradesAmount,{trades:o.totalTrades.value,label:o.totalTrades.label,tooltip:o.totalTrades.tooltip}),C.jsx(he.TradeInterval,{chunks:o.totalTrades.value,fillDelayMillis:o.tradeInterval.value,label:o.tradeInterval.label,tooltip:o.tradeInterval.tooltip}),C.jsx(he.Recipient,{}),o.fees.amount&&C.jsx(he.Fees,{fees:o.fees.amount,label:o.fees.label,usd:o.fees.usd,dstTokenSymbol:r==null?void 0:r.symbol})]})}),n]})]});return c?C.jsx(c,{children:l}):l},$W=e=>{const{status:t,stepIndex:r,totalSteps:n,parsedError:s}=ee(w=>w.state.swapExecution),{components:a}=re(),o=a.Spinner,i=a.SuccessIcon,c=a.ErrorIcon,l=a.TokenLogo,{srcToken:u,dstToken:d}=re(),f=Zr().amountUI,m=Cc().amountUI,b=Ar({value:f,decimalScale:2}),g=Ar({value:m,decimalScale:2}),E=M.useMemo(()=>({symbol:u==null?void 0:u.symbol,logoUrl:u==null?void 0:u.logoUrl}),[u]),v=M.useMemo(()=>({symbol:d==null?void 0:d.symbol,logoUrl:d==null?void 0:d.logoUrl}),[d]);return C.jsx(MW,{...e,children:C.jsx(es,{inAmount:b,outAmount:g,swapStatus:t,totalSteps:n,currentStep:LW(),currentStepIndex:r,inToken:E,outToken:v,components:{SrcTokenLogo:l&&C.jsx(l,{token:u}),DstTokenLogo:l&&C.jsx(l,{token:d}),Failed:C.jsx(RW,{error:s}),Success:C.jsx(GW,{}),Main:C.jsx(HW,{}),Loader:o,SuccessIcon:i,FailedIcon:c}})})},GW=()=>{const e=C5(),{components:t}=re(),r=ee(a=>a.state.swapExecution.orderId),n=t.SubmitOrderSuccessView,s=C.jsxs(C.Fragment,{children:[C.jsx(es.Success,{title:e}),C.jsx(k5,{})]});return n?C.jsx(n,{newOrderId:r,children:s}):s},jW=()=>{const{supportedChains:e}=re();return M.useMemo(()=>e,[e])},VW=()=>{const{config:e}=re();return M.useMemo(()=>({spender:e.repermit}),[e])},WW=()=>{var c;const{account:e,walletClient:t,overrides:r,refetchBalances:n,callbacks:s,chainId:a}=re(),o=(c=vo())==null?void 0:c.wToken,i=X0();return en({mutationFn:async({onHash:l,srcAmountWei:u})=>{var m,b;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!o)throw new Error("tokenAddress is not defined");let d;dt.onWrapRequest(),(m=s==null?void 0:s.onWrapRequest)==null||m.call(s),r!=null&&r.wrap?d=await r.wrap(u):d=await t.writeContract({abi:Lm,functionName:"deposit",account:e,address:o.address,value:BigInt(u),chain:t.chain}),l==null||l(d);const f=await i(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to wrap token");return dt.onWrapSuccess(d),(b=s==null?void 0:s.onWrapSuccess)==null||b.call(s,{txHash:f.transactionHash,explorerUrl:oo(f.transactionHash,a),amount:ia(u,o.decimals)}),n==null||n(),f},onError:l=>{throw dt.onWrapError(l),l}})},T5=()=>{const{account:e,walletClient:t,chainId:r,callbacks:n}=re(),{rePermitData:s}=w5(),{refetch:a}=Eo();return en({mutationFn:async()=>{var b,g,E,v;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!r)throw new Error("missing chainId");const{order:o,domain:i,types:c,primaryType:l}=s;dt.onSignOrderRequest(o),(b=n==null?void 0:n.onSignOrderRequest)==null||b.call(n),console.log({domain:i,types:c,primaryType:l,message:o,account:e}),console.log("Using domain:",i),console.log("Using types:",c),console.log("Order data to sign:",JSON.stringify(o,null,2)),console.log(`Account address: ${e}`);let u;try{u=await(t==null?void 0:t.signTypedData({domain:i,types:c,primaryType:l,message:o,account:e}))}catch(w){throw(g=n==null?void 0:n.onSignOrderError)==null||g.call(n,w),dt.onSignOrderError(w),w}dt.onSignOrderSuccess(u),(E=n==null?void 0:n.onSignOrderSuccess)==null||E.call(n,u);const d=c4(u),f={v:q(d.v||0),r:d.r,s:d.s},m=await Bh(o,f);return(v=n==null?void 0:n.onOrderCreated)==null||v.call(n,m),await a(),m}})},A5=()=>{const{account:e,publicClient:t,config:r}=re();return en({mutationFn:async({tokenAddress:n,srcAmountWei:s})=>{if(!t)throw new Error("missing publicClient");if(!e)throw new Error("missing account");if(!r)throw new Error("missing config");const a=await t.readContract({address:n,abi:ky,functionName:"allowance",args:[e,r.repermit]}).then(i=>i.toString()),o=G(a||"0").lt(G(s).toString());return{allowance:a,approvalRequired:o}}})},qW=()=>{const{account:e,walletClient:t,overrides:r,config:n,chainId:s,callbacks:a}=re(),o=X0(),{mutateAsync:i}=A5();return en({onError:c=>{dt.onApproveError(c)},mutationFn:async({token:c,onHash:l,srcAmountWei:u})=>{var b,g;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!n)throw new Error("missing config");(b=a==null?void 0:a.onApproveRequest)==null||b.call(a),dt.onApproveRequest();let d;if(r!=null&&r.approveOrder?d=await r.approveOrder({tokenAddress:c.address,spenderAddress:n.repermit,amount:Qs}):d=await t.writeContract({abi:ky,functionName:"approve",account:e,address:c.address,args:[n.repermit,Qs],chain:t.chain}),!d)throw new Error("failed to approve token");l(d);const f=await o(d);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to approve token");let m=!1;for(let E=0;E<3;E++){const{approvalRequired:v}=await i({tokenAddress:c.address,srcAmountWei:u});if(!v){m=!0;break}E<2&&await new Promise(w=>setTimeout(w,3e3))}if(!m)throw new Error(`Insufficient ${c.symbol} allowance to perform the swap. Please approve the token first.`);return dt.onApproveSuccess(f.transactionHash),(g=a==null?void 0:a.onApproveSuccess)==null||g.call(a,{txHash:f.transactionHash,explorerUrl:oo(f.transactionHash,s),token:c,amount:ia(u,c.decimals)}),f}})},KW=()=>{const{account:e,chainId:t,srcToken:r,dstToken:n,module:s,slippage:a}=re(),o=Es(),i=Zr().amountWei,c=Br().amountPerTradeWei,l=ed(),u=Br().totalTrades,d=vs().fillDelay,f=Tc().amountWei,m=ee(b=>b.state.isMarketOrder);return en({mutationFn:async()=>{dt.onRequestOrder({account:e,chainId:t,module:s,srcToken:r,dstToken:n,fromTokenAmount:i,srcChunkAmount:c,triggerPricePerTrade:o.pricePerChunkWei,deadline:l,fillDelay:d.unit*d.value,minDstAmountOutPerTrade:f,slippage:a,isMarketOrder:m||!1,chunksAmount:u})}})};function YW(e){const t=e.message,r=t.match(/,\s*code\s*:\s*(\d+)/i);return{message:t.replace(/^error\s*:/i,"").replace(/,\s*code\s*:\s*\d+/i,"").trim()||"",code:r?Number(r[1]):0}}const S5=()=>{const{srcToken:e,dstToken:t,chainId:r,callbacks:n}=re(),s=qW().mutateAsync,a=WW().mutateAsync,o=T5().mutateAsync,{mutateAsync:i}=A5(),c=ee(d=>d.updateSwapExecution),{amountWei:l}=Zr(),u=KW().mutate;return en({mutationFn:async()=>{var f,m;const d=Ms((e==null?void 0:e.address)||" ");try{if(!e)throw new Error("missing srcToken");if(!t)throw new Error("missing dstToken");if(!r)throw new Error("missing chainId");const b=t6(e,r);c({allowanceLoading:!0,wrapTxHash:void 0,approveTxHash:void 0});const{approvalRequired:g}=await i({tokenAddress:b.address,srcAmountWei:l});let E=0,v=1;d&&v++,g&&v++,c({totalSteps:v,stepIndex:E,allowanceLoading:!1,status:pt.LOADING}),u(),d&&(c({step:Hs.WRAP}),await a({onHash:S=>c({wrapTxHash:S}),srcAmountWei:l}),E++,c({stepIndex:E})),g&&(c({step:Hs.APPROVE}),await s({token:b,onHash:S=>c({approveTxHash:S}),srcAmountWei:l}),E++,c({stepIndex:E})),c({step:Hs.CREATE});const w=await o();return c({status:pt.SUCCESS,orderId:w.id}),w}catch(b){if(Gf(b))(f=n==null?void 0:n.onSubmitOrderRejected)==null||f.call(n),c({step:void 0,status:void 0,stepIndex:void 0,error:b});else{const g=YW(b);(m=n==null?void 0:n.onSubmitOrderFailed)==null||m.call(n,g),c({status:pt.FAILED,parsedError:g,error:b})}throw b}}})},ZW=()=>{const{marketPrice:e,srcToken:t,dstToken:r,resetTypedInputAmount:n}=re(),s=S5(),{amountUI:a}=Zr(),o=ee(g=>g.resetState),i=ee(g=>g.state.swapExecution),c=ee(g=>g.updateSwapExecution),l=ee(g=>g.resetSwapExecution),u=ex(),d=M.useCallback(()=>{(i==null?void 0:i.status)===pt.SUCCESS&&n(),i!=null&&i.status&&(i==null?void 0:i.status)!==pt.LOADING&&o()},[i==null?void 0:i.status,o,n]),f=M.useCallback(()=>{(i==null?void 0:i.status)!==pt.LOADING&&l({srcToken:t,dstToken:r})},[l,t,r]),m=en({mutationFn:async()=>(c({acceptedSrcAmount:a,acceptedMarketPrice:e}),await s.mutateAsync())}),b=M.useCallback(()=>m.mutateAsync(),[m]);return M.useMemo(()=>({reset:o,onCloseModal:d,onOpenModal:f,onSubmit:b,orderTitle:u,...i,isLoading:(i==null?void 0:i.status)===pt.LOADING,isSuccess:(i==null?void 0:i.status)===pt.SUCCESS,isFailed:(i==null?void 0:i.status)===pt.FAILED}),[o,d,b,i,u])},XW=()=>{const e=Ie(),{marketPrice:t,srcToken:r,dstToken:n,marketPriceLoading:s,srcBalance:a,srcUsd1Token:o,noLiquidity:i,typedInputAmount:c}=re(),l=s||G(o||"0").isZero()||a===void 0||G(t||"0").isZero(),u=!!(r&&n&&c&&l),d=g5(),f=M.useMemo(()=>i?e("noLiquidity"):G(c||"0").isZero()?e("enterAmount"):e("placeOrder"),[d,e,c,i]),m=!!(d||i||u||G(c||"0").isZero()||!r||!n);return M.useMemo(()=>({disabled:m,text:f,loading:u}),[m,f,u])},QW=({children:e,container:t})=>{const[r,n]=M.useState(!1),s=M.useRef(null);if(M.useLayoutEffect(()=>(n(!0),s.current=t??document.body,()=>{s.current=null}),[]),typeof document>"u"||!r)return null;const a=s.current;return a?Os.createPortal(e,a):null};Ph(qw.version);const JW={SubmitOrderPanel:$W,Orders:bW,Portal:QW};R.CRASH_ERROR_MESSAGE=dw,R.Components=JW,R.Configs=Pe,R.DEFAULT_DURATION_OPTIONS=yz,R.DEFAULT_FILL_DELAY=_c,R.DEFAULT_STOP_LOSS_LIMIT_PERCENTAGE=Zm,R.DEFAULT_STOP_LOSS_PERCENTAGE=Km,R.DEFAULT_TAKE_PROFIT_LIMIT_PERCENTAGE=Xm,R.DEFAULT_TAKE_PROFIT_PERCENTAGE=Ym,R.DISCLAIMER_URL=uw,R.EIP712_TYPES=Wm,R.EIP712_TYPES_DEV=qm,R.ERC20_ABI=X5,R.EXCLUSIVITY_OVERRIDE_BPS=aw,R.FEES=sw,R.FormatNumber=pn,R.IWETH_ABI=Lm,R.InputErrors=Dt,R.LEGACY_EXCHANGES_MAP=Vm,R.MAX_ORDER_DURATION_MILLIS=Pa,R.MIN_CHUNKS=nw,R.MIN_FILL_DELAY_MILLIS=Uc,R.MIN_FILL_DELAY_MINUTES=Hm,R.MIN_ORDER_DURATION_MILLIS=od,R.Module=ge,R.ORBS_LOGO=iw,R.ORBS_LOGO_FALLBACK=cw,R.ORBS_SLTP_FAQ_URL=ow,R.ORBS_TWAP_FAQ_URL=ld,R.ORBS_WEBSITE_URL=lw,R.OrderFilter=ar,R.OrderStatus=ut,R.OrderType=Re,R.PRICE_PROTECTION_SETTINGS=gz,R.Partners=Jr,R.QUERY_PARAMS=Ia,R.REPERMIT_ABI=zm,R.REPERMIT_PRIMARY_TYPE=cd,R.SPOT_VERSION=Us,R.SUGGEST_CHUNK_VALUE=rw,R.SpotProvider=hz,R.Steps=Hs,R.SwapStatus=pt,R.THE_GRAPH_ORDERS_API=$m,R.TWAP_ABI=Rm,R.TimeUnit=$t,R.analytics=dt,R.buildRePermitOrderData=Sh,R.buildV2Order=wd,R.copy=u4,R.ensureWrappedToken=t6,R.eqIgnoreCase=_s,R.fillDelayText=Jg,R.formatDecimals=e6,R.getAccountOrders=Dh,R.getApiEndpoint=Oc,R.getChunks=lh,R.getConfig=bd,R.getDeadline=dh,R.getDestTokenAmount=ah,R.getDestTokenMinAmountPerChunk=oh,R.getDuration=ch,R.getErrors=Th,R.getEstimatedDelayBetweenChunksMillis=ph,R.getExplorerUrl=oo,R.getMaxChunksError=Eh,R.getMaxFillDelayError=ww,R.getMaxOrderDurationError=gh,R.getMaxPossibleChunks=uh,R.getMinChunkSizeUsd=Ch,R.getMinFillDelayError=wh,R.getMinNativeBalance=p4,R.getMinOrderDurationError=xh,R.getMinTradeSizeError=vh,R.getNetwork=Ns,R.getOrderExecutionRate=hd,R.getOrderFillDelayMillis=md,R.getOrderLimitPriceRate=nh,R.getOrderType=f4,R.getPartnerChains=rh,R.getPartnerIdentifier=_t,R.getPartners=kh,R.getSrcTokenChunkAmount=fh,R.getStopLossLimitPriceError=bh,R.getStopLossPriceError=mh,R.getTakeProfitLimitPriceError=yh,R.getTakeProfitPriceError=hh,R.getTriggerPricePerChunk=ih,R.getTriggerPricePerTrade=sh,R.isNativeAddress=Ms,R.isTxRejected=Gf,R.makeElipsisAddress=Ll,R.maxUint256=Dc,R.millisToDays=r6,R.millisToMinutes=jf,R.nativeTokenAddresses=jm,R.networks=Ft,R.parseError=d4,R.removeCommas=l4,R.setUIVersion=Ph,R.shouldUnwrapOnly=Wf,R.shouldWrapOnly=Vf,R.submitOrder=Bh,R.toAmountUi=ia,R.toAmountWei=Nl,R.useAddresses=VW,R.useDisclaimerPanel=kW,R.useDstTokenPanel=BW,R.useDurationPanel=EW,R.useFillDelayPanel=gW,R.useFormatNumber=Ar,R.useInputErrors=g5,R.useInvertTradePanel=Ju,R.useLimitPricePanel=FW,R.useOrder=w5,R.useOrderDisplay=v5,R.useOrderHistoryPanel=fj,R.useOrderType=Q0,R.usePartnerChains=jW,R.useRePermitOrderData=x5,R.useRefetchUntilStatusSynced=ox,R.useSignOrder=T5,R.useSubmitOrder=S5,R.useSubmitOrderButton=XW,R.useSubmitOrderPanel=ZW,R.useTogglePricePanel=UW,R.useTradesPanel=wW,R.useTranslations=Ie,R.useTriggerPricePanel=SW,R.zeroAddress=Gm,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
64
+ `,extractResults:p=>{var f;return(((f=p.data)==null?void 0:f.orderFilleds)||[]).map(m=>({...m,timestamp:new Date(m.timestamp).getTime()}))}})};class db extends Error{constructor(){super("No graph endpoint found"),this.name="NoGraphEndpointError"}}const pb=async({chainId:e,signal:t,page:n,limit:r,filters:s})=>{try{const a=await cb({chainId:e,signal:t,page:n,limit:r,filters:s}),[o,i]=await Promise.all([ub({chainId:e,orders:a,signal:t}),lb({chainId:e,orders:a,signal:t})]),c=a.map(d=>{const p=o==null?void 0:o.filter(f=>f.TWAP_id===Number(d.Contract_id)&&jn(f.exchange,d.exchange)&&jn(f.twapAddress,d.twapAddress));return ob(d,e,p,fb(d,p||[],i))}).sort((d,p)=>p.createdAt-d.createdAt),l=new Set;return c.filter(d=>l.has(d.id)?!1:(l.add(d.id),!0))}catch{return[]}},fb=(e,t,n)=>{var i;const r=(i=n==null?void 0:n.find(c=>c.twapId===e.Contract_id.toString()&&jn(c.twapAddress,e.twapAddress)))==null?void 0:i.status,a=Cd(t).reduce((c,l)=>c.plus(l.inAmount),new z(0)).toFixed(),o=Ad(e.ask_srcAmount,a);return mb(o,e.ask_deadline*1e3,r)},Ad=(e,t)=>{if(!t||!e)return 0;const n=z(t).dividedBy(e).toNumber();return n>=.99?100:n<=0?0:Number((n*100).toFixed(2))},mb=(e,t,n)=>e===100?at.Completed:n==="CANCELLED"?at.Cancelled:n==="COMPLETED"?at.Completed:t>Date.now()?at.Open:at.Expired,hb=async({signal:e,page:t,chainId:n,limit:r,config:s,account:a,isDev:o=!1})=>(await Promise.all([s?pb({chainId:n,signal:e,page:t,limit:r,filters:{accounts:[a],configs:s.twapConfig?[s.twapConfig]:[]}}):Promise.resolve([]),sb({chainId:n,signal:e,account:a,exchange:s==null?void 0:s.adapter,isDev:o})]).then(([l,d])=>[...l,...d])).sort((l,d)=>d.createdAt-l.createdAt),bb={version:"1.0.2"};var Ir=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yb={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xb=(Dh=class{constructor(){Z(this,jt,yb);Z(this,xr,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&I(this,xr)&&e!==I(this,jt)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:I(this,jt),provider:e}),K(this,jt,e),process.env.NODE_ENV!=="production"&&K(this,xr,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&K(this,xr,!0),I(this,jt).setTimeout(e,t)}clearTimeout(e){I(this,jt).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&K(this,xr,!0),I(this,jt).setInterval(e,t)}clearInterval(e){I(this,jt).clearInterval(e)}},jt=new WeakMap,xr=new WeakMap,Dh),Kn=new xb;function gb(e){setTimeout(e,0)}var Wn=typeof window>"u"||"Deno"in globalThis;function qe(){}function wb(e,t){return typeof e=="function"?e(t):e}function Qi(e){return typeof e=="number"&&e>=0&&e!==1/0}function Td(e,t){return Math.max(e+(t||0)-Date.now(),0)}function wn(e,t){return typeof e=="function"?e(t):e}function xt(e,t){return typeof e=="function"?e(t):e}function Sd(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:a,queryKey:o,stale:i}=e;if(o){if(r){if(t.queryHash!==Ji(o,t.options))return!1}else if(!Ss(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||s&&s!==t.state.fetchStatus||a&&!a(t))}function Pd(e,t){const{exact:n,status:r,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Xn(t.options.mutationKey)!==Xn(a))return!1}else if(!Ss(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Ji(e,t){return((t==null?void 0:t.queryKeyHashFn)||Xn)(e)}function Xn(e){return JSON.stringify(e,(t,n)=>ec(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ss(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ss(e[n],t[n])):!1}var Eb=Object.prototype.hasOwnProperty;function Yi(e,t){if(e===t)return e;const n=Bd(e)&&Bd(t);if(!n&&!(ec(e)&&ec(t)))return t;const s=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,i=n?new Array(o):{};let c=0;for(let l=0;l<o;l++){const d=n?l:a[l],p=e[d],f=t[d];if(p===f){i[d]=p,(n?l<s:Eb.call(e,d))&&c++;continue}if(p===null||f===null||typeof p!="object"||typeof f!="object"){i[d]=f;continue}const m=Yi(p,f);i[d]=m,m===p&&c++}return s===o&&c===s?e:i}function Qa(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Bd(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ec(e){if(!Ud(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ud(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ud(e){return Object.prototype.toString.call(e)==="[object Object]"}function kb(e){return new Promise(t=>{Kn.setTimeout(t,e)})}function tc(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Yi(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Yi(e,t)}return t}function Cb(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function vb(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ja=Symbol();function Id(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Ja&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ja?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Fd(e,t){return typeof e=="function"?e(...t):!!e}var Ab=(Mh=class extends Ir{constructor(){super();Z(this,gr);Z(this,On);Z(this,ps);K(this,ps,t=>{if(!Wn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){I(this,On)||this.setEventListener(I(this,ps))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,On))==null||t.call(this),K(this,On,void 0))}setEventListener(t){var n;K(this,ps,t),(n=I(this,On))==null||n.call(this),K(this,On,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){I(this,gr)!==t&&(K(this,gr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof I(this,gr)=="boolean"?I(this,gr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},gr=new WeakMap,On=new WeakMap,ps=new WeakMap,Mh),nc=new Ab;function rc(){let e,t;const n=new Promise((s,a)=>{e=s,t=a});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var Tb=gb;function Sb(){let e=[],t=0,n=i=>{i()},r=i=>{i()},s=Tb;const a=i=>{t?e.push(i):s(()=>{n(i)})},o=()=>{const i=e;e=[],i.length&&s(()=>{r(()=>{i.forEach(c=>{n(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||o()}return c},batchCalls:i=>(...c)=>{a(()=>{i(...c)})},schedule:a,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{s=i}}}var Fe=Sb(),Pb=(_h=class extends Ir{constructor(){super();Z(this,fs,!0);Z(this,Dn);Z(this,ms);K(this,ms,t=>{if(!Wn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){I(this,Dn)||this.setEventListener(I(this,ms))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,Dn))==null||t.call(this),K(this,Dn,void 0))}setEventListener(t){var n;K(this,ms,t),(n=I(this,Dn))==null||n.call(this),K(this,Dn,t(this.setOnline.bind(this)))}setOnline(t){I(this,fs)!==t&&(K(this,fs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return I(this,fs)}},fs=new WeakMap,Dn=new WeakMap,ms=new WeakMap,_h),Ya=new Pb;function Bb(e){return Math.min(1e3*2**e,3e4)}function Od(e){return(e??"online")==="online"?Ya.isOnline():!0}var sc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Dd(e){let t=!1,n=0,r;const s=rc(),a=()=>s.status!=="pending",o=g=>{var P;if(!a()){const B=new sc(g);f(B),(P=e.onCancel)==null||P.call(e,B)}},i=()=>{t=!0},c=()=>{t=!1},l=()=>nc.isFocused()&&(e.networkMode==="always"||Ya.isOnline())&&e.canRun(),d=()=>Od(e.networkMode)&&e.canRun(),p=g=>{a()||(r==null||r(),s.resolve(g))},f=g=>{a()||(r==null||r(),s.reject(g))},m=()=>new Promise(g=>{var P;r=B=>{(a()||l())&&g(B)},(P=e.onPause)==null||P.call(e)}).then(()=>{var g;r=void 0,a()||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(a())return;let g;const P=n===0?e.initialPromise:void 0;try{g=P??e.fn()}catch(B){g=Promise.reject(B)}Promise.resolve(g).then(p).catch(B=>{var N;if(a())return;const v=e.retry??(Wn?0:3),U=e.retryDelay??Bb,k=typeof U=="function"?U(n,B):U,D=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,B);if(t||!D){f(B);return}n++,(N=e.onFail)==null||N.call(e,n,B),kb(k).then(()=>l()?void 0:m()).then(()=>{t?f(B):y()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(r==null||r(),s),cancelRetry:i,continueRetry:c,canStart:d,start:()=>(d()?y():m().then(y),s)}}var Md=(Nh=class{constructor(){Z(this,wr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qi(this.gcTime)&&K(this,wr,Kn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wn?1/0:300*1e3))}clearGcTimeout(){I(this,wr)&&(Kn.clearTimeout(I(this,wr)),K(this,wr,void 0))}},wr=new WeakMap,Nh),Ub=(Rh=class extends Md{constructor(t){super();Z(this,Dt);Z(this,Er);Z(this,hs);Z(this,Et);Z(this,kr);Z(this,Ne);Z(this,Ha);Z(this,Cr);K(this,Cr,!1),K(this,Ha,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,kr,t.client),K(this,Et,I(this,kr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Er,Rd(this.options)),this.state=t.state??I(this,Er),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=I(this,Ne))==null?void 0:t.promise}setOptions(t){if(this.options={...I(this,Ha),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Rd(this.options);n.data!==void 0&&(this.setState(Nd(n.data,n.dataUpdatedAt)),K(this,Er,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,Et).remove(this)}setData(t,n){const r=tc(this.state.data,t,this.options);return ae(this,Dt,xn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ae(this,Dt,xn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=I(this,Ne))==null?void 0:r.promise;return(s=I(this,Ne))==null||s.cancel(t),n?n.then(qe).catch(qe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(I(this,Er))}isActive(){return this.observers.some(t=>xt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ja||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>wn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Td(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,Ne))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,Ne))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),I(this,Et).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(I(this,Ne)&&(I(this,Cr)?I(this,Ne).cancel({revert:!0}):I(this,Ne).cancelRetry()),this.scheduleGc()),I(this,Et).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ae(this,Dt,xn).call(this,{type:"invalidate"})}async fetch(t,n){var c,l,d,p,f,m,y,g,P,B,v,U;if(this.state.fetchStatus!=="idle"&&((c=I(this,Ne))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(I(this,Ne))return I(this,Ne).continueRetry(),I(this,Ne).promise}if(t&&this.setOptions(t),!this.options.queryFn){const k=this.observers.find(D=>D.options.queryFn);k&&this.setOptions(k.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,s=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(K(this,Cr,!0),r.signal)})},a=()=>{const k=Id(this.options,n),N=(()=>{const _={client:I(this,kr),queryKey:this.queryKey,meta:this.meta};return s(_),_})();return K(this,Cr,!1),this.options.persister?this.options.persister(k,N,this):k(N)},i=(()=>{const k={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:I(this,kr),state:this.state,fetchFn:a};return s(k),k})();(l=this.options.behavior)==null||l.onFetch(i,this),K(this,hs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=i.fetchOptions)==null?void 0:d.meta))&&ae(this,Dt,xn).call(this,{type:"fetch",meta:(p=i.fetchOptions)==null?void 0:p.meta}),K(this,Ne,Dd({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,onCancel:k=>{k instanceof sc&&k.revert&&this.setState({...I(this,hs),fetchStatus:"idle"}),r.abort()},onFail:(k,D)=>{ae(this,Dt,xn).call(this,{type:"failed",failureCount:k,error:D})},onPause:()=>{ae(this,Dt,xn).call(this,{type:"pause"})},onContinue:()=>{ae(this,Dt,xn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const k=await I(this,Ne).start();if(k===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(k),(m=(f=I(this,Et).config).onSuccess)==null||m.call(f,k,this),(g=(y=I(this,Et).config).onSettled)==null||g.call(y,k,this.state.error,this),k}catch(k){if(k instanceof sc){if(k.silent)return I(this,Ne).promise;if(k.revert){if(this.state.data===void 0)throw k;return this.state.data}}throw ae(this,Dt,xn).call(this,{type:"error",error:k}),(B=(P=I(this,Et).config).onError)==null||B.call(P,k,this),(U=(v=I(this,Et).config).onSettled)==null||U.call(v,this.state.data,k,this),k}finally{this.scheduleGc()}}},Er=new WeakMap,hs=new WeakMap,Et=new WeakMap,kr=new WeakMap,Ne=new WeakMap,Ha=new WeakMap,Cr=new WeakMap,Dt=new WeakSet,xn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,..._d(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Nd(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return K(this,hs,t.manual?s:void 0),s;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Fe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),I(this,Et).notify({query:this,type:"updated",action:t})})},Rh);function _d(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Od(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Nd(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Rd(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ib=(zh=class extends Ir{constructor(t,n){super();Z(this,fe);Z(this,nt);Z(this,de);Z(this,Ga);Z(this,Ke);Z(this,vr);Z(this,bs);Z(this,fn);Z(this,Mn);Z(this,ja);Z(this,ys);Z(this,xs);Z(this,Ar);Z(this,Tr);Z(this,_n);Z(this,gs,new Set);this.options=n,K(this,nt,t),K(this,Mn,null),K(this,fn,rc()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(I(this,de).addObserver(this),zd(I(this,de),this.options)?ae(this,fe,Ka).call(this):this.updateResult(),ae(this,fe,Wu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ac(I(this,de),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ac(I(this,de),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ae(this,fe,Xu).call(this),ae(this,fe,Zu).call(this),I(this,de).removeObserver(this)}setOptions(t){const n=this.options,r=I(this,de);if(this.options=I(this,nt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xt(this.options.enabled,I(this,de))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ae(this,fe,Qu).call(this),I(this,de).setOptions(this.options),n._defaulted&&!Qa(this.options,n)&&I(this,nt).getQueryCache().notify({type:"observerOptionsUpdated",query:I(this,de),observer:this});const s=this.hasListeners();s&&Ld(I(this,de),r,this.options,n)&&ae(this,fe,Ka).call(this),this.updateResult(),s&&(I(this,de)!==r||xt(this.options.enabled,I(this,de))!==xt(n.enabled,I(this,de))||wn(this.options.staleTime,I(this,de))!==wn(n.staleTime,I(this,de)))&&ae(this,fe,qu).call(this);const a=ae(this,fe,Vu).call(this);s&&(I(this,de)!==r||xt(this.options.enabled,I(this,de))!==xt(n.enabled,I(this,de))||a!==I(this,_n))&&ae(this,fe,Ku).call(this,a)}getOptimisticResult(t){const n=I(this,nt).getQueryCache().build(I(this,nt),t),r=this.createResult(n,t);return Ob(this,r)&&(K(this,Ke,r),K(this,bs,this.options),K(this,vr,I(this,de).state)),r}getCurrentResult(){return I(this,Ke)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&I(this,fn).status==="pending"&&I(this,fn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){I(this,gs).add(t)}getCurrentQuery(){return I(this,de)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=I(this,nt).defaultQueryOptions(t),r=I(this,nt).getQueryCache().build(I(this,nt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ae(this,fe,Ka).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),I(this,Ke)))}createResult(t,n){var b;const r=I(this,de),s=this.options,a=I(this,Ke),o=I(this,vr),i=I(this,bs),l=t!==r?t.state:I(this,Ga),{state:d}=t;let p={...d},f=!1,m;if(n._optimisticResults){const x=this.hasListeners(),C=!x&&zd(t,n),E=x&&Ld(t,r,n,s);(C||E)&&(p={...p,..._d(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:P}=p;m=p.data;let B=!1;if(n.placeholderData!==void 0&&m===void 0&&P==="pending"){let x;a!=null&&a.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData)?(x=a.data,B=!0):x=typeof n.placeholderData=="function"?n.placeholderData((b=I(this,xs))==null?void 0:b.state.data,I(this,xs)):n.placeholderData,x!==void 0&&(P="success",m=tc(a==null?void 0:a.data,x,n),f=!0)}if(n.select&&m!==void 0&&!B)if(a&&m===(o==null?void 0:o.data)&&n.select===I(this,ja))m=I(this,ys);else try{K(this,ja,n.select),m=n.select(m),m=tc(a==null?void 0:a.data,m,n),K(this,ys,m),K(this,Mn,null)}catch(x){K(this,Mn,x)}I(this,Mn)&&(y=I(this,Mn),m=I(this,ys),g=Date.now(),P="error");const v=p.fetchStatus==="fetching",U=P==="pending",k=P==="error",D=U&&v,N=m!==void 0,h={status:P,fetchStatus:p.fetchStatus,isPending:U,isSuccess:P==="success",isError:k,isInitialLoading:D,isLoading:D,data:m,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>l.dataUpdateCount||p.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!U,isLoadingError:k&&!N,isPaused:p.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:k&&N,isStale:oc(t,n),refetch:this.refetch,promise:I(this,fn),isEnabled:xt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const x=T=>{h.status==="error"?T.reject(h.error):h.data!==void 0&&T.resolve(h.data)},C=()=>{const T=K(this,fn,h.promise=rc());x(T)},E=I(this,fn);switch(E.status){case"pending":t.queryHash===r.queryHash&&x(E);break;case"fulfilled":(h.status==="error"||h.data!==E.value)&&C();break;case"rejected":(h.status!=="error"||h.error!==E.reason)&&C();break}}return h}updateResult(){const t=I(this,Ke),n=this.createResult(I(this,de),this.options);if(K(this,vr,I(this,de).state),K(this,bs,this.options),I(this,vr).data!==void 0&&K(this,xs,I(this,de)),Qa(n,t))return;K(this,Ke,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!I(this,gs).size)return!0;const o=new Set(a??I(this,gs));return this.options.throwOnError&&o.add("error"),Object.keys(I(this,Ke)).some(i=>{const c=i;return I(this,Ke)[c]!==t[c]&&o.has(c)})};ae(this,fe,Vh).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ae(this,fe,Wu).call(this)}},nt=new WeakMap,de=new WeakMap,Ga=new WeakMap,Ke=new WeakMap,vr=new WeakMap,bs=new WeakMap,fn=new WeakMap,Mn=new WeakMap,ja=new WeakMap,ys=new WeakMap,xs=new WeakMap,Ar=new WeakMap,Tr=new WeakMap,_n=new WeakMap,gs=new WeakMap,fe=new WeakSet,Ka=function(t){ae(this,fe,Qu).call(this);let n=I(this,de).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(qe)),n},qu=function(){ae(this,fe,Xu).call(this);const t=wn(this.options.staleTime,I(this,de));if(Wn||I(this,Ke).isStale||!Qi(t))return;const r=Td(I(this,Ke).dataUpdatedAt,t)+1;K(this,Ar,Kn.setTimeout(()=>{I(this,Ke).isStale||this.updateResult()},r))},Vu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(I(this,de)):this.options.refetchInterval)??!1},Ku=function(t){ae(this,fe,Zu).call(this),K(this,_n,t),!(Wn||xt(this.options.enabled,I(this,de))===!1||!Qi(I(this,_n))||I(this,_n)===0)&&K(this,Tr,Kn.setInterval(()=>{(this.options.refetchIntervalInBackground||nc.isFocused())&&ae(this,fe,Ka).call(this)},I(this,_n)))},Wu=function(){ae(this,fe,qu).call(this),ae(this,fe,Ku).call(this,ae(this,fe,Vu).call(this))},Xu=function(){I(this,Ar)&&(Kn.clearTimeout(I(this,Ar)),K(this,Ar,void 0))},Zu=function(){I(this,Tr)&&(Kn.clearInterval(I(this,Tr)),K(this,Tr,void 0))},Qu=function(){const t=I(this,nt).getQueryCache().build(I(this,nt),this.options);if(t===I(this,de))return;const n=I(this,de);K(this,de,t),K(this,Ga,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Vh=function(t){Fe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(I(this,Ke))}),I(this,nt).getQueryCache().notify({query:I(this,de),type:"observerResultsUpdated"})})},zh);function Fb(e,t){return xt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zd(e,t){return Fb(e,t)||e.state.data!==void 0&&ac(e,t,t.refetchOnMount)}function ac(e,t,n){if(xt(t.enabled,e)!==!1&&wn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&oc(e,t)}return!1}function Ld(e,t,n,r){return(e!==t||xt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&oc(e,n)}function oc(e,t){return xt(t.enabled,e)!==!1&&e.isStaleByTime(wn(t.staleTime,e))}function Ob(e,t){return!Qa(e.getCurrentResult(),t)}function $d(e){return{onFetch:(t,n)=>{var d,p,f,m,y;const r=t.options,s=(f=(p=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:p.fetchMore)==null?void 0:f.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const P=U=>{Object.defineProperty(U,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},B=Id(t.options,t.fetchOptions),v=async(U,k,D)=>{if(g)return Promise.reject();if(k==null&&U.pages.length)return Promise.resolve(U);const _=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:k,direction:D?"backward":"forward",meta:t.options.meta};return P(C),C})(),h=await B(_),{maxPages:b}=t.options,x=D?vb:Cb;return{pages:x(U.pages,h,b),pageParams:x(U.pageParams,k,b)}};if(s&&a.length){const U=s==="backward",k=U?Db:Hd,D={pages:a,pageParams:o},N=k(r,D);i=await v(D,N,U)}else{const U=e??a.length;do{const k=c===0?o[0]??r.initialPageParam:Hd(r,i);if(c>0&&k==null)break;i=await v(i,k),c++}while(c<U)}return i};t.options.persister?t.fetchFn=()=>{var g,P;return(P=(g=t.options).persister)==null?void 0:P.call(g,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function Hd(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Db(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Mb=(Lh=class extends Md{constructor(t){super();Z(this,Vt);Z(this,qa);Z(this,qt);Z(this,We);Z(this,Sr);K(this,qa,t.client),this.mutationId=t.mutationId,K(this,We,t.mutationCache),K(this,qt,[]),this.state=t.state||Gd(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){I(this,qt).includes(t)||(I(this,qt).push(t),this.clearGcTimeout(),I(this,We).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,qt,I(this,qt).filter(n=>n!==t)),this.scheduleGc(),I(this,We).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){I(this,qt).length||(this.state.status==="pending"?this.scheduleGc():I(this,We).remove(this))}continue(){var t;return((t=I(this,Sr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,c,l,d,p,f,m,y,g,P,B,v,U,k,D,N,_,h,b;const n=()=>{ae(this,Vt,Hn).call(this,{type:"continue"})},r={client:I(this,qa),meta:this.options.meta,mutationKey:this.options.mutationKey};K(this,Sr,Dd({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(x,C)=>{ae(this,Vt,Hn).call(this,{type:"failed",failureCount:x,error:C})},onPause:()=>{ae(this,Vt,Hn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,We).canRun(this)}));const s=this.state.status==="pending",a=!I(this,Sr).canStart();try{if(s)n();else{ae(this,Vt,Hn).call(this,{type:"pending",variables:t,isPaused:a}),await((i=(o=I(this,We).config).onMutate)==null?void 0:i.call(o,t,this,r));const C=await((l=(c=this.options).onMutate)==null?void 0:l.call(c,t,r));C!==this.state.context&&ae(this,Vt,Hn).call(this,{type:"pending",context:C,variables:t,isPaused:a})}const x=await I(this,Sr).start();return await((p=(d=I(this,We).config).onSuccess)==null?void 0:p.call(d,x,t,this.state.context,this,r)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,x,t,this.state.context,r)),await((g=(y=I(this,We).config).onSettled)==null?void 0:g.call(y,x,null,this.state.variables,this.state.context,this,r)),await((B=(P=this.options).onSettled)==null?void 0:B.call(P,x,null,t,this.state.context,r)),ae(this,Vt,Hn).call(this,{type:"success",data:x}),x}catch(x){try{throw await((U=(v=I(this,We).config).onError)==null?void 0:U.call(v,x,t,this.state.context,this,r)),await((D=(k=this.options).onError)==null?void 0:D.call(k,x,t,this.state.context,r)),await((_=(N=I(this,We).config).onSettled)==null?void 0:_.call(N,void 0,x,this.state.variables,this.state.context,this,r)),await((b=(h=this.options).onSettled)==null?void 0:b.call(h,void 0,x,t,this.state.context,r)),x}finally{ae(this,Vt,Hn).call(this,{type:"error",error:x})}}finally{I(this,We).runNext(this)}}},qa=new WeakMap,qt=new WeakMap,We=new WeakMap,Sr=new WeakMap,Vt=new WeakSet,Hn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Fe.batch(()=>{I(this,qt).forEach(r=>{r.onMutationUpdate(t)}),I(this,We).notify({mutation:this,type:"updated",action:t})})},Lh);function Gd(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _b=($h=class extends Ir{constructor(t={}){super();Z(this,mn);Z(this,Mt);Z(this,Va);this.config=t,K(this,mn,new Set),K(this,Mt,new Map),K(this,Va,0)}build(t,n,r){const s=new Mb({client:t,mutationCache:this,mutationId:++Fi(this,Va)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){I(this,mn).add(t);const n=eo(t);if(typeof n=="string"){const r=I(this,Mt).get(n);r?r.push(t):I(this,Mt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(I(this,mn).delete(t)){const n=eo(t);if(typeof n=="string"){const r=I(this,Mt).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&I(this,Mt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=eo(t);if(typeof n=="string"){const r=I(this,Mt).get(n),s=r==null?void 0:r.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=eo(t);if(typeof n=="string"){const s=(r=I(this,Mt).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Fe.batch(()=>{I(this,mn).forEach(t=>{this.notify({type:"removed",mutation:t})}),I(this,mn).clear(),I(this,Mt).clear()})}getAll(){return Array.from(I(this,mn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Pd(n,r))}findAll(t={}){return this.getAll().filter(n=>Pd(t,n))}notify(t){Fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Fe.batch(()=>Promise.all(t.map(n=>n.continue().catch(qe))))}},mn=new WeakMap,Mt=new WeakMap,Va=new WeakMap,$h);function eo(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Nb=(Hh=class extends Ir{constructor(t,n){super();Z(this,yn);Z(this,hn);Z(this,Nn);Z(this,rt);Z(this,bn);K(this,hn,t),this.setOptions(n),this.bindMethods(),ae(this,yn,Oi).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=I(this,hn).defaultMutationOptions(t),Qa(this.options,n)||I(this,hn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:I(this,rt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Xn(n.mutationKey)!==Xn(this.options.mutationKey)?this.reset():((r=I(this,rt))==null?void 0:r.state.status)==="pending"&&I(this,rt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=I(this,rt))==null||t.removeObserver(this)}onMutationUpdate(t){ae(this,yn,Oi).call(this),ae(this,yn,Ju).call(this,t)}getCurrentResult(){return I(this,Nn)}reset(){var t;(t=I(this,rt))==null||t.removeObserver(this),K(this,rt,void 0),ae(this,yn,Oi).call(this),ae(this,yn,Ju).call(this)}mutate(t,n){var r;return K(this,bn,n),(r=I(this,rt))==null||r.removeObserver(this),K(this,rt,I(this,hn).getMutationCache().build(I(this,hn),this.options)),I(this,rt).addObserver(this),I(this,rt).execute(t)}},hn=new WeakMap,Nn=new WeakMap,rt=new WeakMap,bn=new WeakMap,yn=new WeakSet,Oi=function(){var n;const t=((n=I(this,rt))==null?void 0:n.state)??Gd();K(this,Nn,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ju=function(t){Fe.batch(()=>{var n,r,s,a,o,i,c,l;if(I(this,bn)&&this.hasListeners()){const d=I(this,Nn).variables,p=I(this,Nn).context,f={client:I(this,hn),meta:this.options.meta,mutationKey:this.options.mutationKey};(t==null?void 0:t.type)==="success"?((r=(n=I(this,bn)).onSuccess)==null||r.call(n,t.data,d,p,f),(a=(s=I(this,bn)).onSettled)==null||a.call(s,t.data,null,d,p,f)):(t==null?void 0:t.type)==="error"&&((i=(o=I(this,bn)).onError)==null||i.call(o,t.error,d,p,f),(l=(c=I(this,bn)).onSettled)==null||l.call(c,void 0,t.error,d,p,f))}this.listeners.forEach(d=>{d(I(this,Nn))})})},Hh),Rb=(Gh=class extends Ir{constructor(t={}){super();Z(this,Kt);this.config=t,K(this,Kt,new Map)}build(t,n,r){const s=n.queryKey,a=n.queryHash??Ji(s,n);let o=this.get(a);return o||(o=new Ub({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){I(this,Kt).has(t.queryHash)||(I(this,Kt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=I(this,Kt).get(t.queryHash);n&&(t.destroy(),n===t&&I(this,Kt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Fe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return I(this,Kt).get(t)}getAll(){return[...I(this,Kt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Sd(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Sd(t,r)):n}notify(t){Fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kt=new WeakMap,Gh),zb=(jh=class{constructor(e={}){Z(this,Ce);Z(this,Rn);Z(this,zn);Z(this,ws);Z(this,Es);Z(this,Ln);Z(this,ks);Z(this,Cs);K(this,Ce,e.queryCache||new Rb),K(this,Rn,e.mutationCache||new _b),K(this,zn,e.defaultOptions||{}),K(this,ws,new Map),K(this,Es,new Map),K(this,Ln,0)}mount(){Fi(this,Ln)._++,I(this,Ln)===1&&(K(this,ks,nc.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,Ce).onFocus())})),K(this,Cs,Ya.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,Ce).onOnline())})))}unmount(){var e,t;Fi(this,Ln)._--,I(this,Ln)===0&&((e=I(this,ks))==null||e.call(this),K(this,ks,void 0),(t=I(this,Cs))==null||t.call(this),K(this,Cs,void 0))}isFetching(e){return I(this,Ce).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return I(this,Rn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,Ce).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=I(this,Ce).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(wn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return I(this,Ce).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=I(this,Ce).get(r.queryHash),a=s==null?void 0:s.state.data,o=wb(t,a);if(o!==void 0)return I(this,Ce).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Fe.batch(()=>I(this,Ce).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,Ce).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=I(this,Ce);Fe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=I(this,Ce);return Fe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Fe.batch(()=>I(this,Ce).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(qe).catch(qe)}invalidateQueries(e,t={}){return Fe.batch(()=>(I(this,Ce).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Fe.batch(()=>I(this,Ce).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,n);return n.throwOnError||(a=a.catch(qe)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(qe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=I(this,Ce).build(this,t);return n.isStaleByTime(wn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qe).catch(qe)}fetchInfiniteQuery(e){return e.behavior=$d(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qe).catch(qe)}ensureInfiniteQueryData(e){return e.behavior=$d(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ya.isOnline()?I(this,Rn).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,Ce)}getMutationCache(){return I(this,Rn)}getDefaultOptions(){return I(this,zn)}setDefaultOptions(e){K(this,zn,e)}setQueryDefaults(e,t){I(this,ws).set(Xn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...I(this,ws).values()],n={};return t.forEach(r=>{Ss(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){I(this,Es).set(Xn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...I(this,Es).values()],n={};return t.forEach(r=>{Ss(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...I(this,zn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ji(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ja&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...I(this,zn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){I(this,Ce).clear(),I(this,Rn).clear()}},Ce=new WeakMap,Rn=new WeakMap,zn=new WeakMap,ws=new WeakMap,Es=new WeakMap,Ln=new WeakMap,ks=new WeakMap,Cs=new WeakMap,jh),jd=Ie.createContext(void 0),ic=e=>{const t=Ie.useContext(jd);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Lb=({client:e,children:t})=>(Ie.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),re.jsx(jd.Provider,{value:e,children:t})),qd=Ie.createContext(!1),$b=()=>Ie.useContext(qd);qd.Provider;function Hb(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Gb=Ie.createContext(Hb()),jb=()=>Ie.useContext(Gb),qb=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Vb=e=>{Ie.useEffect(()=>{e.clearReset()},[e])},Kb=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Fd(n,[e.error,r])),Wb=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Xb=(e,t)=>e.isLoading&&e.isFetching&&!t,Zb=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Vd=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Qb(e,t,n){var p,f,m,y,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=$b(),s=jb(),a=ic(),o=a.defaultQueryOptions(e);(f=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||f.call(p,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=r?"isRestoring":"optimistic",Wb(o),qb(o,s),Vb(s);const i=!a.getQueryCache().get(o.queryHash),[c]=Ie.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(Ie.useSyncExternalStore(Ie.useCallback(P=>{const B=d?c.subscribe(Fe.batchCalls(P)):qe;return c.updateResult(),B},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Ie.useEffect(()=>{c.setOptions(o)},[o,c]),Zb(o,l))throw Vd(o,c,s);if(Kb({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;if((y=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||y.call(m,o,l),o.experimental_prefetchInRender&&!Wn&&Xb(l,r)){const P=i?Vd(o,c,s):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;P==null||P.catch(qe).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?l:c.trackResult(l)}function Jb(e,t){return Qb(e,Ib)}function Qt(e,t){const n=ic(),[r]=Ie.useState(()=>new Nb(n,e));Ie.useEffect(()=>{r.setOptions(e)},[r,e]);const s=Ie.useSyncExternalStore(Ie.useCallback(o=>r.subscribe(Fe.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=Ie.useCallback((o,i)=>{r.mutate(o,i).catch(qe)},[r]);if(s.error&&Fd(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}const Yb=L.createContext(null),cc={didCatch:!1,error:null};class ey extends L.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=cc}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:a,reason:"imperative-api"}),this.setState(cc)}}componentDidCatch(t,n){var r,s;(r=(s=this.props).onError)===null||r===void 0||r.call(s,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:s}=this.props;if(r&&n.error!==null&&ty(t.resetKeys,s)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:s,prev:t.resetKeys,reason:"keys"}),this.setState(cc)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:s}=this.props,{didCatch:a,error:o}=this.state;let i=t;if(a){const c={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")i=n(c);else if(r)i=L.createElement(r,c);else if(s!==void 0)i=s;else throw o}return L.createElement(Yb.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}}function ty(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const Kd=e=>{let t;const n=new Set,r=(l,d)=>{const p=typeof l=="function"?l(t):l;if(!Object.is(p,t)){const f=t;t=d??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(m=>m(t,f))}},s=()=>t,i={setState:r,getState:s,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,s,i);return i},ny=(e=>e?Kd(e):Kd),ry=e=>e;function sy(e,t=ry){const n=L.useSyncExternalStore(e.subscribe,L.useCallback(()=>t(e.getState()),[e,t]),L.useCallback(()=>t(e.getInitialState()),[e,t]));return L.useDebugValue(n),n}const Wd=e=>{const t=ny(e),n=r=>sy(t,r);return Object.assign(n,t),n},ay=(e=>e?Wd(e):Wd),lc={},Xd={currentTime:Date.now(),swapExecutions:[lc],swapExecutionIndex:0},se=ay((e,t)=>({state:Xd,updateState:n=>e(r=>({state:{...r.state,...n}})),updateSwapExecutionAtIndex:(n,r)=>e(s=>{const a=[...s.state.swapExecutions];return a[n]={...a[n]??lc,...r},{state:{...s.state,swapExecutions:a}}}),resetState:()=>{const n=t().state;e({state:{...Xd,currentTime:Date.now(),isMarketOrder:n.isMarketOrder,swapExecutions:[...n.swapExecutions,lc],swapExecutionIndex:n.swapExecutionIndex+1}})}})),Ps=()=>{const e=se(s=>s.state.swapExecutionIndex),t=se(s=>s.state.swapExecutions[s.state.swapExecutionIndex]??{}),n=se(s=>s.updateSwapExecutionAtIndex),r=L.useCallback(s=>n(e,s),[n,e]);return L.useMemo(()=>({...t,update:r}),[t,r])};var vt=(e=>(e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILED=3]="FAILED",e))(vt||{}),Bs=(e=>(e.WRAP="wrap",e.APPROVE="approve",e.CREATE="create",e))(Bs||{});const oy="1.2.3";let Ze=class Yu extends Error{constructor(t,n={}){var o;const r=n.cause instanceof Yu?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,s=n.cause instanceof Yu&&n.cause.docsPath||n.docsPath,a=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${oy}`].join(`
65
+ `);super(a),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=s,this.metaMessages=n.metaMessages,this.shortMessage=t}};function Jt(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const Zd=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Qd=/^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)?$/,Jd=/^\(.+?\).*?$/,Yd=/^tuple(?<array>(\[(\d*)\])*)$/;function uc(e){let t=e.type;if(Yd.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s<n;s++){const a=e.components[s];t+=uc(a),s<n-1&&(t+=", ")}const r=Jt(Yd,e.type);return t+=`)${(r==null?void 0:r.array)||""}`,uc({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Fr(e){let t="";const n=e.length;for(let r=0;r<n;r++){const s=e[r];t+=uc(s),r!==n-1&&(t+=", ")}return t}function to(e){var t;return e.type==="function"?`function ${e.name}(${Fr(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${Fr(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Fr(e.inputs)})`:e.type==="error"?`error ${e.name}(${Fr(e.inputs)})`:e.type==="constructor"?`constructor(${Fr(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const ep=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function iy(e){return ep.test(e)}function cy(e){return Jt(ep,e)}const tp=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function ly(e){return tp.test(e)}function uy(e){return Jt(tp,e)}const np=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function dy(e){return np.test(e)}function py(e){return Jt(np,e)}const rp=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function no(e){return rp.test(e)}function fy(e){return Jt(rp,e)}const sp=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function my(e){return sp.test(e)}function hy(e){return Jt(sp,e)}const ap=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function by(e){return ap.test(e)}function yy(e){return Jt(ap,e)}const xy=/^receive\(\) external payable$/;function gy(e){return xy.test(e)}const op=new Set(["memory","indexed","storage","calldata"]),wy=new Set(["indexed"]),dc=new Set(["calldata","memory","storage"]);class Ey extends Ze{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class ky extends Ze{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 Cy extends Ze{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 vy extends Ze{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class Ay extends Ze{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class Ty extends Ze{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 Sy extends Ze{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 Py extends Ze{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 By extends Ze{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 Or extends Ze{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class Uy extends Ze{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class Iy extends Ze{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 Fy extends Ze{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 Oy extends Ze{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 Dy(e,t,n){let r="";if(n)for(const s of Object.entries(n)){if(!s)continue;let a="";for(const o of s[1])a+=`[${o.type}${o.name?`:${o.name}`:""}]`;r+=`(${s[0]}{${a}})`}return t?`${t}:${e}${r}`:`${e}${r}`}const pc=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 fc(e,t={}){if(dy(e))return My(e,t);if(ly(e))return _y(e,t);if(iy(e))return Ny(e,t);if(my(e))return Ry(e,t);if(by(e))return zy(e);if(gy(e))return{type:"receive",stateMutability:"payable"};throw new Uy({signature:e})}function My(e,t={}){const n=py(e);if(!n)throw new Or({signature:e,type:"function"});const r=ot(n.parameters),s=[],a=r.length;for(let i=0;i<a;i++)s.push(Yt(r[i],{modifiers:dc,structs:t,type:"function"}));const o=[];if(n.returns){const i=ot(n.returns),c=i.length;for(let l=0;l<c;l++)o.push(Yt(i[l],{modifiers:dc,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:s,outputs:o}}function _y(e,t={}){const n=uy(e);if(!n)throw new Or({signature:e,type:"event"});const r=ot(n.parameters),s=[],a=r.length;for(let o=0;o<a;o++)s.push(Yt(r[o],{modifiers:wy,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:s}}function Ny(e,t={}){const n=cy(e);if(!n)throw new Or({signature:e,type:"error"});const r=ot(n.parameters),s=[],a=r.length;for(let o=0;o<a;o++)s.push(Yt(r[o],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:s}}function Ry(e,t={}){const n=hy(e);if(!n)throw new Or({signature:e,type:"constructor"});const r=ot(n.parameters),s=[],a=r.length;for(let o=0;o<a;o++)s.push(Yt(r[o],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:s}}function zy(e){const t=yy(e);if(!t)throw new Or({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const Ly=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,$y=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Hy=/^u?int$/;function Yt(e,t){var p,f;const n=Dy(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(pc.has(n))return pc.get(n);const r=Jd.test(e),s=Jt(r?$y:Ly,e);if(!s)throw new Ay({param:e});if(s.name&&jy(s.name))throw new Ty({param:e,name:s.name});const a=s.name?{name:s.name}:{},o=s.modifier==="indexed"?{indexed:!0}:{},i=(t==null?void 0:t.structs)??{};let c,l={};if(r){c="tuple";const m=ot(s.type),y=[],g=m.length;for(let P=0;P<g;P++)y.push(Yt(m[P],{structs:i}));l={components:y}}else if(s.type in i)c="tuple",l={components:i[s.type]};else if(Hy.test(s.type))c=`${s.type}256`;else if(s.type==="address payable")c="address";else if(c=s.type,(t==null?void 0:t.type)!=="struct"&&!ip(c))throw new Cy({type:c});if(s.modifier){if(!((f=(p=t==null?void 0:t.modifiers)==null?void 0:p.has)!=null&&f.call(p,s.modifier)))throw new Sy({param:e,type:t==null?void 0:t.type,modifier:s.modifier});if(dc.has(s.modifier)&&!qy(c,!!s.array))throw new Py({param:e,type:t==null?void 0:t.type,modifier:s.modifier})}const d={type:`${c}${s.array??""}`,...a,...o,...l};return pc.set(n,d),d}function ot(e,t=[],n="",r=0){const s=e.trim().length;for(let a=0;a<s;a++){const o=e[a],i=e.slice(a+1);switch(o){case",":return r===0?ot(i,[...t,n.trim()]):ot(i,t,`${n}${o}`,r);case"(":return ot(i,t,`${n}${o}`,r+1);case")":return ot(i,t,`${n}${o}`,r-1);default:return ot(i,t,`${n}${o}`,r)}}if(n==="")return t;if(r!==0)throw new Oy({current:n,depth:r});return t.push(n.trim()),t}function ip(e){return e==="address"||e==="bool"||e==="function"||e==="string"||Zd.test(e)||Qd.test(e)}const Gy=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function jy(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||Zd.test(e)||Qd.test(e)||Gy.test(e)}function qy(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function mc(e){const t={},n=e.length;for(let o=0;o<n;o++){const i=e[o];if(!no(i))continue;const c=fy(i);if(!c)throw new Or({signature:i,type:"struct"});const l=c.properties.split(";"),d=[],p=l.length;for(let f=0;f<p;f++){const y=l[f].trim();if(!y)continue;const g=Yt(y,{type:"struct"});d.push(g)}if(!d.length)throw new Iy({signature:i});t[c.name]=d}const r={},s=Object.entries(t),a=s.length;for(let o=0;o<a;o++){const[i,c]=s[o];r[i]=cp(c,t)}return r}const Vy=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function cp(e=[],t={},n=new Set){const r=[],s=e.length;for(let a=0;a<s;a++){const o=e[a];if(Jd.test(o.type))r.push(o);else{const c=Jt(Vy,o.type);if(!(c!=null&&c.type))throw new By({abiParameter:o});const{array:l,type:d}=c;if(d in t){if(n.has(d))throw new Fy({type:d});r.push({...o,type:`tuple${l??""}`,components:cp(t[d],t,new Set([...n,d]))})}else if(ip(d))r.push(o);else throw new ky({type:d})}}return r}function lp(e){const t=mc(e),n=[],r=e.length;for(let s=0;s<r;s++){const a=e[s];no(a)||n.push(fc(a,t))}return n}function up(e){let t;if(typeof e=="string")t=fc(e);else{const n=mc(e),r=e.length;for(let s=0;s<r;s++){const a=e[s];if(!no(a)){t=fc(a,n);break}}}if(!t)throw new Ey({signature:e});return t}function dp(e){const t=[];if(typeof e=="string"){const n=ot(e),r=n.length;for(let s=0;s<r;s++)t.push(Yt(n[s],{modifiers:op}))}else{const n=mc(e),r=e.length;for(let s=0;s<r;s++){const a=e[s];if(no(a))continue;const o=ot(a),i=o.length;for(let c=0;c<i;c++)t.push(Yt(o[c],{modifiers:op,structs:n}))}}if(t.length===0)throw new vy({params:e});return t}function W(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const s=e[n];return typeof s=="function"?s:a=>t(e,a)}function At(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new o6(e.type);return`${e.name}(${ro(e.inputs,{includeName:t})})`}function ro(e,{includeName:t=!1}={}){return e?e.map(n=>Ky(n,{includeName:t})).join(t?", ":","):""}function Ky(e,{includeName:t}){return e.type.startsWith("tuple")?`(${ro(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function Tt(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function we(e){return Tt(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const pp="2.43.3";let Us={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${pp}`},R=class ed extends Error{constructor(t,n={}){var i;const r=(()=>{var c;return n.cause instanceof ed?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),s=n.cause instanceof ed&&n.cause.docsPath||n.docsPath,a=(i=Us.getDocsUrl)==null?void 0:i.call(Us,{...n,docsPath:s}),o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...r?[`Details: ${r}`]:[],...Us.version?[`Version: ${Us.version}`]:[]].join(`
66
+ `);super(o,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=s,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=pp}walk(t){return fp(this,t)}};function fp(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?fp(e.cause,t):t?null:e}class Wy extends R{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(`
67
+ `),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class mp extends R{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(`
68
+ `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class hp extends R{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
69
+ `),{metaMessages:[`Params: (${ro(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 Is extends R{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class Xy extends R{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
70
+ `),{name:"AbiEncodingArrayLengthMismatchError"})}}class Zy extends R{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${we(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class Qy extends R{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
71
+ `),{name:"AbiEncodingLengthMismatchError"})}}class Jy extends R{constructor(t,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
72
+ `),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class bp extends R{constructor(t,{docsPath:n}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
73
+ `),{docsPath:n,name:"AbiErrorNotFoundError"})}}class yp extends R{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(`
74
+ `),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class Yy extends R{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class e6 extends R{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(`
75
+ `),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class xp extends R{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(`
76
+ `),{docsPath:n,name:"AbiEventNotFoundError"})}}class Dr extends R{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(`
77
+ `),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class gp extends R{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(`
78
+ `),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class t6 extends R{constructor(t,{docsPath:n}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
79
+ `),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class n6 extends R{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${At(t.abiItem)}\`, and`,`\`${n.type}\` in \`${At(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}let r6=class extends R{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}};class so extends R{constructor({abiItem:t,data:n,params:r,size:s}){super([`Data size of ${s} bytes is too small for non-indexed event parameters.`].join(`
80
+ `),{metaMessages:[`Params: (${ro(r,{includeName:!0})})`,`Data: ${n} (${s} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),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.abiItem=t,this.data=n,this.params=r,this.size=s}}class hc extends R{constructor({abiItem:t,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${At(t,{includeName:!0})}".`].join(`
81
+ `),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class s6 extends R{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
82
+ `),{docsPath:n,name:"InvalidAbiEncodingType"})}}class a6 extends R{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
83
+ `),{docsPath:n,name:"InvalidAbiDecodingType"})}}let wp=class extends R{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
84
+ `),{name:"InvalidArrayError"})}};class o6 extends R{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
85
+ `),{name:"InvalidDefinitionTypeError"})}}class i6 extends R{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}let Ep=class extends R{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},kp=class extends R{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class Cp extends R{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 Zn(e,{dir:t,size:n=32}={}){return typeof e=="string"?En(e,{dir:t,size:n}):c6(e,{dir:t,size:n})}function En(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new kp({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function c6(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new kp({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let s=0;s<n;s++){const a=t==="right";r[a?s:n-s-1]=e[a?s:e.length-s-1]}return r}let vp=class extends R{constructor({max:t,min:n,signed:r,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}},l6=class extends R{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};class u6 extends R{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let d6=class extends R{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function Qe(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let s=0;s<n.length-1&&n[t==="left"?s:n.length-s-1].toString()==="0";s++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function St(e,{size:t}){if(we(e)>t)throw new d6({givenSize:we(e),maxSize:t})}function pe(e,t={}){const{signed:n}=t;t.size&&St(e,{size:t.size});const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n-1n)-1n;return r<=a?r:r-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function p6(e,t={}){let n=e;if(t.size&&(St(n,{size:t.size}),n=Qe(n)),Qe(n)==="0x00")return!1;if(Qe(n)==="0x01")return!0;throw new u6(n)}function it(e,t={}){return Number(pe(e,t))}const f6=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ue(e,t={}){return typeof e=="number"||typeof e=="bigint"?j(e,t):typeof e=="string"?Mr(e,t):typeof e=="boolean"?Ap(e,t):Be(e,t)}function Ap(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(St(n,{size:t.size}),Zn(n,{size:t.size})):n}function Be(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=f6[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(St(r,{size:t.size}),Zn(r,{dir:"right",size:t.size})):r}function j(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let a;r?n?a=(1n<<BigInt(r)*8n-1n)-1n:a=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&n?-a-1n:0;if(a&&s>a||s<o){const c=typeof e=="bigint"?"n":"";throw new vp({max:a?`${a}${c}`:void 0,min:`${o}${c}`,signed:n,size:r,value:`${e}${c}`})}const i=`0x${(n&&s<0?(1n<<BigInt(r*8))+BigInt(s):s).toString(16)}`;return r?Zn(i,{size:r}):i}const m6=new TextEncoder;function Mr(e,t={}){const n=m6.encode(e);return Be(n,t)}const h6=new TextEncoder;function en(e,t={}){return typeof e=="number"||typeof e=="bigint"?y6(e,t):typeof e=="boolean"?b6(e,t):Tt(e)?ct(e,t):Qn(e,t)}function b6(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(St(n,{size:t.size}),Zn(n,{size:t.size})):n}const tn={zero:48,nine:57,A:65,F:70,a:97,f:102};function Tp(e){if(e>=tn.zero&&e<=tn.nine)return e-tn.zero;if(e>=tn.A&&e<=tn.F)return e-(tn.A-10);if(e>=tn.a&&e<=tn.f)return e-(tn.a-10)}function ct(e,t={}){let n=e;t.size&&(St(n,{size:t.size}),n=Zn(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const s=r.length/2,a=new Uint8Array(s);for(let o=0,i=0;o<s;o++){const c=Tp(r.charCodeAt(i++)),l=Tp(r.charCodeAt(i++));if(c===void 0||l===void 0)throw new R(`Invalid byte sequence ("${r[i-2]}${r[i-1]}" in "${r}").`);a[o]=c*16+l}return a}function y6(e,t){const n=j(e,t);return ct(n)}function Qn(e,t={}){const n=h6.encode(e);return typeof t.size=="number"?(St(n,{size:t.size}),Zn(n,{dir:"right",size:t.size})):n}const ao=BigInt(2**32-1),Sp=BigInt(32);function x6(e,t=!1){return t?{h:Number(e&ao),l:Number(e>>Sp&ao)}:{h:Number(e>>Sp&ao)|0,l:Number(e&ao)|0}}function Pp(e,t=!1){const n=e.length;let r=new Uint32Array(n),s=new Uint32Array(n);for(let a=0;a<n;a++){const{h:o,l:i}=x6(e[a],t);[r[a],s[a]]=[o,i]}return[r,s]}const Bp=(e,t,n)=>e>>>n,Up=(e,t,n)=>e<<32-n|t>>>n,_r=(e,t,n)=>e>>>n|t<<32-n,Nr=(e,t,n)=>e<<32-n|t>>>n,oo=(e,t,n)=>e<<64-n|t>>>n-32,io=(e,t,n)=>e>>>n-32|t<<64-n,g6=(e,t,n)=>e<<n|t>>>32-n,w6=(e,t,n)=>t<<n|e>>>32-n,E6=(e,t,n)=>t<<n-32|e>>>64-n,k6=(e,t,n)=>e<<n-32|t>>>64-n;function nn(e,t,n,r){const s=(t>>>0)+(r>>>0);return{h:e+n+(s/2**32|0)|0,l:s|0}}const C6=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),v6=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,A6=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),T6=(e,t,n,r,s)=>t+n+r+s+(e/2**32|0)|0,S6=(e,t,n,r,s)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(s>>>0),P6=(e,t,n,r,s,a)=>t+n+r+s+a+(e/2**32|0)|0,Rr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function B6(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Fs(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Jn(e,...t){if(!B6(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function U6(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Fs(e.outputLen),Fs(e.blockLen)}function zr(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 Ip(e,t){Jn(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function I6(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function kn(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function bc(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function zt(e,t){return e<<32-t|e>>>t}const F6=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function O6(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function D6(e){for(let t=0;t<e.length;t++)e[t]=O6(e[t]);return e}const Fp=F6?e=>e:D6;function M6(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function co(e){return typeof e=="string"&&(e=M6(e)),Jn(e),e}function _6(...e){let t=0;for(let r=0;r<e.length;r++){const s=e[r];Jn(s),t+=s.length}const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const a=e[r];n.set(a,s),s+=a.length}return n}class yc{}function lo(e){const t=r=>e().update(co(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function N6(e=32){if(Rr&&typeof Rr.getRandomValues=="function")return Rr.getRandomValues(new Uint8Array(e));if(Rr&&typeof Rr.randomBytes=="function")return Uint8Array.from(Rr.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const R6=BigInt(0),Os=BigInt(1),z6=BigInt(2),L6=BigInt(7),$6=BigInt(256),H6=BigInt(113),Op=[],Dp=[],Mp=[];for(let e=0,t=Os,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Op.push(2*(5*r+n)),Dp.push((e+1)*(e+2)/2%64);let s=R6;for(let a=0;a<7;a++)t=(t<<Os^(t>>L6)*H6)%$6,t&z6&&(s^=Os<<(Os<<BigInt(a))-Os);Mp.push(s)}const _p=Pp(Mp,!0),G6=_p[0],j6=_p[1],Np=(e,t,n)=>n>32?E6(e,t,n):g6(e,t,n),Rp=(e,t,n)=>n>32?k6(e,t,n):w6(e,t,n);function q6(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const i=(o+8)%10,c=(o+2)%10,l=n[c],d=n[c+1],p=Np(l,d,1)^n[i],f=Rp(l,d,1)^n[i+1];for(let m=0;m<50;m+=10)e[o+m]^=p,e[o+m+1]^=f}let s=e[2],a=e[3];for(let o=0;o<24;o++){const i=Dp[o],c=Np(s,a,i),l=Rp(s,a,i),d=Op[o];s=e[d],a=e[d+1],e[d]=c,e[d+1]=l}for(let o=0;o<50;o+=10){for(let i=0;i<10;i++)n[i]=e[o+i];for(let i=0;i<10;i++)e[o+i]^=~n[(i+2)%10]&n[(i+4)%10]}e[0]^=G6[r],e[1]^=j6[r]}kn(n)}class xc extends yc{constructor(t,n,r,s=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=a,Fs(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=I6(this.state)}clone(){return this._cloneInto()}keccak(){Fp(this.state32),q6(this.state32,this.rounds),Fp(this.state32),this.posOut=0,this.pos=0}update(t){zr(this),t=co(t),Jn(t);const{blockLen:n,state:r}=this,s=t.length;for(let a=0;a<s;){const o=Math.min(n-this.pos,s-a);for(let i=0;i<o;i++)r[this.pos++]^=t[a++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:s}=this;t[r]^=n,(n&128)!==0&&r===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){zr(this,!1),Jn(t),this.finish();const n=this.state,{blockLen:r}=this;for(let s=0,a=t.length;s<a;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,a-s);t.set(n.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Fs(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Ip(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,kn(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:s,rounds:a,enableXOF:o}=this;return t||(t=new xc(n,r,s,o,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=r,t.outputLen=s,t.enableXOF=o,t.destroyed=this.destroyed,t}}const V6=(e,t,n)=>lo(()=>new xc(t,e,n)),zp=V6(1,136,256/8);function Re(e,t){const n=t||"hex",r=zp(Tt(e,{strict:!1})?en(e):e);return n==="bytes"?r:ue(r)}const K6=e=>Re(en(e));function W6(e){return K6(e)}function X6(e){let t=!0,n="",r=0,s="",a=!1;for(let o=0;o<e.length;o++){const i=e[o];if(["(",")",","].includes(i)&&(t=!0),i==="("&&r++,i===")"&&r--,!!t){if(r===0){if(i===" "&&["event","function",""].includes(s))s="";else if(s+=i,i===")"){a=!0;break}continue}if(i===" "){e[o-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}s+=i,n+=i}}if(!a)throw new R("Unable to normalize signature.");return s}const Z6=e=>{const t=typeof e=="string"?e:to(e);return X6(t)};function Lp(e){return W6(Z6(e))}const uo=Lp;let Oe=class extends R{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"})}},Lr=class 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 gc=new Lr(8192);function Ds(e,t){if(gc.has(`${e}.${t}`))return gc.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=Re(Qn(n),"bytes"),s=n.split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(r[o>>1]&15)>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());const a=`0x${s.join("")}`;return gc.set(`${e}.${t}`,a),a}function wc(e,t){if(!xe(e,{strict:!1}))throw new Oe({address:e});return Ds(e,t)}const Q6=/^0x[a-fA-F0-9]{40}$/,Ec=new Lr(8192);function xe(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(Ec.has(r))return Ec.get(r);const s=Q6.test(e)?e.toLowerCase()===e?!0:n?Ds(e)===e:!0:!1;return Ec.set(r,s),s}function lt(e){return typeof e[0]=="string"?ut(e):J6(e)}function J6(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function ut(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Yn(e,t,n,{strict:r}={}){return Tt(e,{strict:!1})?kc(e,t,n,{strict:r}):Gp(e,t,n,{strict:r})}function $p(e,t){if(typeof t=="number"&&t>0&&t>we(e)-1)throw new Ep({offset:t,position:"start",size:we(e)})}function Hp(e,t,n){if(typeof t=="number"&&typeof n=="number"&&we(e)!==n-t)throw new Ep({offset:n,position:"end",size:we(e)})}function Gp(e,t,n,{strict:r}={}){$p(e,t);const s=e.slice(t,n);return r&&Hp(s,t,n),s}function kc(e,t,n,{strict:r}={}){$p(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&Hp(s,t,n),s}const Y6=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,jp=/^(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 Cn(e,t){if(e.length!==t.length)throw new Qy({expectedLength:e.length,givenLength:t.length});const n=e2({params:e,values:t}),r=vc(n);return r.length===0?"0x":r}function e2({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(Cc({param:e[r],value:t[r]}));return n}function Cc({param:e,value:t}){const n=Ac(e.type);if(n){const[r,s]=n;return n2(t,{length:r,param:{...e,type:s}})}if(e.type==="tuple")return i2(t,{param:e});if(e.type==="address")return t2(t);if(e.type==="bool")return s2(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,s="256"]=jp.exec(e.type)??[];return a2(t,{signed:r,size:Number(s)})}if(e.type.startsWith("bytes"))return r2(t,{param:e});if(e.type==="string")return o2(t);throw new s6(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function vc(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=we(i)}const n=[],r=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?(n.push(j(t+s,{size:32})),r.push(i),s+=we(i)):n.push(i)}return lt([...n,...r])}function t2(e){if(!xe(e))throw new Oe({address:e});return{dynamic:!1,encoded:En(e.toLowerCase())}}function n2(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new wp(e);if(!r&&e.length!==t)throw new Xy({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let s=!1;const a=[];for(let o=0;o<e.length;o++){const i=Cc({param:n,value:e[o]});i.dynamic&&(s=!0),a.push(i)}if(r||s){const o=vc(a);if(r){const i=j(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?lt([i,o]):i}}if(s)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:lt(a.map(({encoded:o})=>o))}}function r2(e,{param:t}){const[,n]=t.type.split("bytes"),r=we(e);if(!n){let s=e;return r%32!==0&&(s=En(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:lt([En(j(r,{size:32})),s])}}if(r!==Number.parseInt(n,10))throw new Zy({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:En(e,{dir:"right"})}}function s2(e){if(typeof e!="boolean")throw new R(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:En(Ap(e))}}function a2(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,s=t?-r-1n:0n;if(e>r||e<s)throw new vp({max:r.toString(),min:s.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:j(e,{size:32,signed:t})}}function o2(e){const t=Mr(e),n=Math.ceil(we(t)/32),r=[];for(let s=0;s<n;s++)r.push(En(Yn(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:lt([En(j(we(t),{size:32})),...r])}}function i2(e,{param:t}){let n=!1;const r=[];for(let s=0;s<t.components.length;s++){const a=t.components[s],o=Array.isArray(e)?s:a.name,i=Cc({param:a,value:e[o]});r.push(i),i.dynamic&&(n=!0)}return{dynamic:n,encoded:n?vc(r):lt(r.map(({encoded:s})=>s))}}function Ac(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Ms=e=>Yn(Lp(e),0,4);function er(e){const{abi:t,args:n=[],name:r}=e,s=Tt(r,{strict:!1}),a=t.filter(i=>s?i.type==="function"?Ms(i)===r:i.type==="event"?uo(i)===r:!1:"name"in i&&i.name===r);if(a.length===0)return;if(a.length===1)return a[0];let o;for(const i of a){if(!("inputs"in i))continue;if(!n||n.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==n.length)continue;if(n.every((l,d)=>{const p="inputs"in i&&i.inputs[d];return p?Tc(l,p):!1})){if(o&&"inputs"in o&&o.inputs){const l=qp(i.inputs,o.inputs,n);if(l)throw new n6({abiItem:i,type:l[0]},{abiItem:o,type:l[1]})}o=i}}return o||a[0]}function Tc(e,t){const n=typeof e,r=t.type;switch(r){case"address":return xe(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((s,a)=>Tc(Object.values(e)[a],s)):/^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(s=>Tc(s,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function qp(e,t,n){for(const r in e){const s=e[r],a=t[r];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return qp(s.components,a.components,n[r]);const o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?xe(n[r],{strict:!1}):o.includes("address")&&o.includes("bytes")?xe(n[r],{strict:!1}):!1)return o}}const Vp="/docs/contract/encodeEventTopics";function _s(e){var c;const{abi:t,eventName:n,args:r}=e;let s=t[0];if(n){const l=er({abi:t,name:n});if(!l)throw new xp(n,{docsPath:Vp});s=l}if(s.type!=="event")throw new xp(void 0,{docsPath:Vp});const a=At(s),o=uo(a);let i=[];if(r&&"inputs"in s){const l=(c=s.inputs)==null?void 0:c.filter(p=>"indexed"in p&&p.indexed),d=Array.isArray(r)?r:Object.values(r).length>0?(l==null?void 0:l.map(p=>r[p.name]))??[]:[];d.length>0&&(i=(l==null?void 0:l.map((p,f)=>Array.isArray(d[f])?d[f].map((m,y)=>Kp({param:p,value:d[f][y]})):typeof d[f]<"u"&&d[f]!==null?Kp({param:p,value:d[f]}):null))??[])}return[o,...i]}function Kp({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Re(en(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new i6(e.type);return Cn([e],[t])}function po(e,{method:t}){var r,s;const n={};return e.transport.type==="fallback"&&((s=(r=e.transport).onResponse)==null||s.call(r,({method:a,response:o,status:i,transport:c})=>{i==="success"&&t===a&&(n[o]=c.request)})),(a=>n[a]||e.request)}async function Wp(e,t){const{address:n,abi:r,args:s,eventName:a,fromBlock:o,strict:i,toBlock:c}=t,l=po(e,{method:"eth_newFilter"}),d=a?_s({abi:r,args:s,eventName:a}):void 0,p=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof o=="bigint"?j(o):o,toBlock:typeof c=="bigint"?j(c):c,topics:d}]});return{abi:r,args:s,eventName:a,id:p,request:l(p),strict:!!i,type:"event"}}function he(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const Xp="/docs/contract/encodeFunctionData";function c2(e){const{abi:t,args:n,functionName:r}=e;let s=t[0];if(r){const a=er({abi:t,args:n,name:r});if(!a)throw new Dr(r,{docsPath:Xp});s=a}if(s.type!=="function")throw new Dr(void 0,{docsPath:Xp});return{abi:[s],functionName:Ms(At(s))}}function dt(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var i;return e.abi.length===1&&((i=e.functionName)!=null&&i.startsWith("0x"))?e:c2(e)})(),s=n[0],a=r,o="inputs"in s&&s.inputs?Cn(s.inputs,t??[]):void 0;return ut([a,o??"0x"])}const l2={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."},Zp={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},u2={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};let Qp=class extends R{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},Jp=class extends R{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},d2=class extends R{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const p2={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 d2({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Jp({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Qp({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 Qp({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 Sc(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(p2);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function f2(e,t={}){typeof t.size<"u"&&St(e,{size:t.size});const n=Be(e,t);return pe(n,t)}function m2(e,t={}){let n=e;if(typeof t.size<"u"&&(St(n,{size:t.size}),n=Qe(n)),n.length>1||n[0]>1)throw new l6(n);return!!n[0]}function rn(e,t={}){typeof t.size<"u"&&St(e,{size:t.size});const n=Be(e,t);return it(n,t)}function h2(e,t={}){let n=e;return typeof t.size<"u"&&(St(n,{size:t.size}),n=Qe(n,{dir:"right"})),new TextDecoder().decode(n)}function Ns(e,t){const n=typeof t=="string"?ct(t):t,r=Sc(n);if(we(n)===0&&e.length>0)throw new Is;if(we(t)&&we(t)<32)throw new hp({data:typeof t=="string"?t:Be(t),params:e,size:we(t)});let s=0;const a=[];for(let o=0;o<e.length;++o){const i=e[o];r.setPosition(s);const[c,l]=$r(r,i,{staticPosition:0});s+=l,a.push(c)}return a}function $r(e,t,{staticPosition:n}){const r=Ac(t.type);if(r){const[s,a]=r;return y2(e,{...t,type:a},{length:s,staticPosition:n})}if(t.type==="tuple")return E2(e,t,{staticPosition:n});if(t.type==="address")return b2(e);if(t.type==="bool")return x2(e);if(t.type.startsWith("bytes"))return g2(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return w2(e,t);if(t.type==="string")return k2(e,{staticPosition:n});throw new a6(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const Yp=32,Pc=32;function b2(e){const t=e.readBytes(32);return[Ds(Be(Gp(t,-20))),32]}function y2(e,t,{length:n,staticPosition:r}){if(!n){const o=rn(e.readBytes(Pc)),i=r+o,c=i+Yp;e.setPosition(i);const l=rn(e.readBytes(Yp)),d=Rs(t);let p=0;const f=[];for(let m=0;m<l;++m){e.setPosition(c+(d?m*32:p));const[y,g]=$r(e,t,{staticPosition:c});p+=g,f.push(y)}return e.setPosition(r+32),[f,32]}if(Rs(t)){const o=rn(e.readBytes(Pc)),i=r+o,c=[];for(let l=0;l<n;++l){e.setPosition(i+l*32);const[d]=$r(e,t,{staticPosition:i});c.push(d)}return e.setPosition(r+32),[c,32]}let s=0;const a=[];for(let o=0;o<n;++o){const[i,c]=$r(e,t,{staticPosition:r+s});s+=c,a.push(i)}return[a,s]}function x2(e){return[m2(e.readBytes(32),{size:32}),32]}function g2(e,t,{staticPosition:n}){const[r,s]=t.type.split("bytes");if(!s){const o=rn(e.readBytes(32));e.setPosition(n+o);const i=rn(e.readBytes(32));if(i===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(i);return e.setPosition(n+32),[Be(c),32]}return[Be(e.readBytes(Number.parseInt(s,10),32)),32]}function w2(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[r>48?f2(s,{signed:n}):rn(s,{signed:n}),32]}function E2(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:o})=>!o),s=r?[]:{};let a=0;if(Rs(t)){const o=rn(e.readBytes(Pc)),i=n+o;for(let c=0;c<t.components.length;++c){const l=t.components[c];e.setPosition(i+a);const[d,p]=$r(e,l,{staticPosition:i});a+=p,s[r?c:l==null?void 0:l.name]=d}return e.setPosition(n+32),[s,32]}for(let o=0;o<t.components.length;++o){const i=t.components[o],[c,l]=$r(e,i,{staticPosition:n});s[r?o:i==null?void 0:i.name]=c,a+=l}return[s,a]}function k2(e,{staticPosition:t}){const n=rn(e.readBytes(32)),r=t+n;e.setPosition(r);const s=rn(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),o=h2(Qe(a));return e.setPosition(t+32),[o,32]}function Rs(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(Rs);const n=Ac(e.type);return!!(n&&Rs({...e,type:n[1]}))}function e0(e){const{abi:t,data:n}=e,r=Yn(n,0,4);if(r==="0x")throw new Is;const a=[...t||[],Zp,u2].find(o=>o.type==="error"&&r===Ms(At(o)));if(!a)throw new yp(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:a,args:"inputs"in a&&a.inputs&&a.inputs.length>0?Ns(a.inputs,Yn(n,4)):void 0,errorName:a.name}}const Ae=(e,t,n)=>JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString():s,n);function t0({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((s,a)=>`${r&&s.name?`${s.name}: `:""}${typeof t[a]=="object"?Ae(t[a]):t[a]}`).join(", ")})`}const C2={gwei:9,wei:18},v2={ether:-9,wei:9};function Bc(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[s,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${s||"0"}${a?`.${a}`:""}`}function Uc(e,t="wei"){return Bc(e,C2[t])}function Je(e,t="wei"){return Bc(e,v2[t])}class A2 extends R{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class T2 extends R{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function n0(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r}
86
+ `,"")}function S2(e){return e.reduce((t,{address:n,...r})=>{let s=`${t} ${n}:
87
+ `;return r.nonce&&(s+=` nonce: ${r.nonce}
88
+ `),r.balance&&(s+=` balance: ${r.balance}
89
+ `),r.code&&(s+=` code: ${r.code}
90
+ `),r.state&&(s+=` state:
91
+ `,s+=n0(r.state)),r.stateDiff&&(s+=` stateDiff:
92
+ `,s+=n0(r.stateDiff)),s},` State Override:
93
+ `).slice(0,-1)}function zs(e){const t=Object.entries(e).map(([r,s])=>s===void 0||s===!1?null:[r,s]).filter(Boolean),n=t.reduce((r,[s])=>Math.max(r,s.length),0);return t.map(([r,s])=>` ${`${r}:`.padEnd(n+1)} ${s}`).join(`
94
+ `)}class P2 extends R{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class B2 extends R{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",zs(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"})}}let U2=class extends R{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 I2 extends R{constructor(t,{account:n,docsPath:r,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:p,value:f}){var y;const m=zs({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:n==null?void 0:n.address,to:p,value:typeof f<"u"&&`${Uc(f)} ${((y=s==null?void 0:s.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Je(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Je(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Je(l)} 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 r0 extends R{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:s,index:a}){let o="Transaction";r&&a!==void 0&&(o=`Transaction at block time "${r}" at index "${a}"`),t&&a!==void 0&&(o=`Transaction at block hash "${t}" at index "${a}"`),n&&a!==void 0&&(o=`Transaction at block number "${n}" at index "${a}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class s0 extends R{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 a0 extends R{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class F2 extends R{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const O2=e=>e,Ls=e=>e;class o0 extends R{constructor(t,{account:n,docsPath:r,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:p,value:f,stateOverride:m}){var P;const y=n?he(n):void 0;let g=zs({from:y==null?void 0:y.address,to:p,value:typeof f<"u"&&`${Uc(f)} ${((P=s==null?void 0:s.nativeCurrency)==null?void 0:P.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Je(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Je(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Je(l)} gwei`,nonce:d});m&&(g+=`
95
+ ${S2(m)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",g].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class i0 extends R{constructor(t,{abi:n,args:r,contractAddress:s,docsPath:a,functionName:o,sender:i}){const c=er({abi:n,args:r,name:o}),l=c?t0({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,d=c?At(c,{includeName:!0}):void 0,p=zs({address:s&&O2(s),function:d,args:l&&l!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:i});super(t.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:t,docsPath:a,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],p&&"Contract Call:",p].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=s,this.functionName=o,this.sender=i}}class Ic extends R{constructor({abi:t,data:n,functionName:r,message:s}){let a,o,i,c;if(n&&n!=="0x")try{o=e0({abi:t,data:n});const{abiItem:d,errorName:p,args:f}=o;if(p==="Error")c=f[0];else if(p==="Panic"){const[m]=f;c=l2[m]}else{const m=d?At(d,{includeName:!0}):void 0,y=d&&f?t0({abiItem:d,args:f,includeFunctionName:!1,includeName:!1}):void 0;i=[m?`Error: ${m}`:"",y&&y!=="()"?` ${[...Array((p==null?void 0:p.length)??0).keys()].map(()=>" ").join("")}${y}`:""]}}catch(d){a=d}else s&&(c=s);let l;a instanceof yp&&(l=a.signature,i=[`Unable to decode signature "${l}" 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=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${r}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(`
96
+ `):`The contract function "${r}" reverted.`,{cause:a,metaMessages:i,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{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=o,this.raw=n,this.reason=c,this.signature=l}}class D2 extends R{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 M2 extends R{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 fo extends R{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 tr extends R{constructor({body:t,cause:n,details:r,headers:s,status:a,url:o}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[a&&`Status: ${a}`,`URL: ${Ls(o)}`,t&&`Request body: ${Ae(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=s,this.status=a,this.url=o}}class Fc extends R{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${Ls(r)}`,`Request body: ${Ae(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data,this.url=r}}class c0 extends R{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Ls(n)}`,`Request body: ${Ae(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=n}}const _2=-1;class Ye extends R{constructor(t,{code:n,docsPath:r,metaMessages:s,name:a,shortMessage:o}){super(o,{cause:t,docsPath:r,metaMessages:s||(t==null?void 0:t.metaMessages),name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||t.name,this.code=t instanceof Fc?t.code:n??_2}}class pt extends Ye{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class $s extends Ye{constructor(t){super(t,{code:$s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty($s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Hs extends Ye{constructor(t){super(t,{code:Hs.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Hs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Gs extends Ye{constructor(t,{method:n}={}){super(t,{code:Gs.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(Gs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class js extends Ye{constructor(t){super(t,{code:js.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
97
+ `)})}}Object.defineProperty(js,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class nr extends Ye{constructor(t){super(t,{code:nr.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(nr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class vn extends Ye{constructor(t){super(t,{code:vn.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
98
+ `)})}}Object.defineProperty(vn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class qs extends Ye{constructor(t){super(t,{code:qs.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(qs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Vs extends Ye{constructor(t){super(t,{code:Vs.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Vs,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Ks extends Ye{constructor(t){super(t,{code:Ks.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Ks,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class rr extends Ye{constructor(t,{method:n}={}){super(t,{code:rr.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(rr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Hr extends Ye{constructor(t){super(t,{code:Hr.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Hr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Ws extends Ye{constructor(t){super(t,{code:Ws.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Ws,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Gr extends pt{constructor(t){super(t,{code:Gr.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Gr,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Xs extends pt{constructor(t){super(t,{code:Xs.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Xs,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Zs extends pt{constructor(t,{method:n}={}){super(t,{code:Zs.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(Zs,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Qs extends pt{constructor(t){super(t,{code:Qs.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Qs,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Js extends pt{constructor(t){super(t,{code:Js.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Js,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Ys extends pt{constructor(t){super(t,{code:Ys.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Ys,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class jr extends pt{constructor(t){super(t,{code:jr.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(jr,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class ea extends pt{constructor(t){super(t,{code:ea.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(ea,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class ta extends pt{constructor(t){super(t,{code:ta.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(ta,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class na extends pt{constructor(t){super(t,{code:na.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(na,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class ra extends pt{constructor(t){super(t,{code:ra.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(ra,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class sa extends pt{constructor(t){super(t,{code:sa.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(sa,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class qr extends pt{constructor(t){super(t,{code:qr.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(qr,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class N2 extends Ye{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const R2=3;function sr(e,{abi:t,address:n,args:r,docsPath:s,functionName:a,sender:o}){const i=e instanceof fo?e:e instanceof R?e.walk(y=>"data"in y)||e.walk():{},{code:c,data:l,details:d,message:p,shortMessage:f}=i,m=e instanceof Is?new D2({functionName:a}):[R2,nr.code].includes(c)&&(l||d||p||f)||c===vn.code&&d==="execution reverted"&&l?new Ic({abi:t,data:typeof l=="object"?l.data:l,functionName:a,message:i instanceof Fc?d:f??p}):e;return new i0(m,{abi:t,args:r,contractAddress:n,docsPath:s,functionName:a,sender:o})}function z2(e){const t=Re(`0x${e.substring(4)}`).substring(26);return Ds(`0x${t}`)}async function L2({hash:e,signature:t}){const n=Tt(e)?e:ue(e),{secp256k1:r}=await Promise.resolve().then(()=>Gg);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:l,s:d,v:p,yParity:f}=t,m=Number(f??p),y=l0(m);return new r.Signature(pe(l),pe(d)).addRecoveryBit(y)}const o=Tt(t)?t:ue(t);if(we(o)!==65)throw new Error("invalid signature length");const i=it(`0x${o.slice(130)}`),c=l0(i);return r.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function l0(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 u0({hash:e,signature:t}){return z2(await L2({hash:e,signature:t}))}function Lt(e,t="hex"){const n=d0(e),r=Sc(new Uint8Array(n.length));return n.encode(r),t==="hex"?Be(r.bytes):r.bytes}function d0(e){return Array.isArray(e)?$2(e.map(t=>d0(t))):H2(e)}function $2(e){const t=e.reduce((s,a)=>s+a.length,0),n=p0(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function H2(e){const t=typeof e=="string"?ct(e):e,n=p0(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function p0(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 R("Length is too large.")}function G2(e){const{chainId:t,nonce:n,to:r}=e,s=e.contractAddress??e.address,a=Re(ut(["0x05",Lt([t?j(t):"0x",s,n?j(n):"0x"])]));return r==="bytes"?ct(a):a}async function mo(e){const{authorization:t,signature:n}=e;return u0({hash:G2(t),signature:n??t})}class j2 extends R{constructor(t,{account:n,docsPath:r,chain:s,data:a,gas:o,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:p,value:f}){var y;const m=zs({from:n==null?void 0:n.address,to:p,value:typeof f<"u"&&`${Uc(f)} ${((y=s==null?void 0:s.nativeCurrency)==null?void 0:y.symbol)||"ETH"}`,data:a,gas:o,gasPrice:typeof i<"u"&&`${Je(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${Je(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Je(l)} 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 Vr extends R{constructor({cause:t,message:n}={}){var s;const r=(s=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:s.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Vr,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Vr,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});let An=class extends R{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Je(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}};Object.defineProperty(An,"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 Oc extends R{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Je(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Oc,"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 Dc extends R{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(Dc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Mc extends R{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(`
99
+ `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Mc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class _c extends R{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(_c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Nc extends R{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
100
+ `),{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(Nc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Rc extends R{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(Rc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class zc extends R{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(zc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Lc extends R{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Lc,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});let Kr=class extends R{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Je(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Je(r)} gwei`:""}).`].join(`
101
+ `),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(Kr,"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 aa extends R{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function ho(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof R?e.walk(s=>(s==null?void 0:s.code)===Vr.code):e;return r instanceof R?new Vr({cause:e,message:r.details}):Vr.nodeMessage.test(n)?new Vr({cause:e,message:e.details}):An.nodeMessage.test(n)?new An({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Oc.nodeMessage.test(n)?new Oc({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Dc.nodeMessage.test(n)?new Dc({cause:e,nonce:t==null?void 0:t.nonce}):Mc.nodeMessage.test(n)?new Mc({cause:e,nonce:t==null?void 0:t.nonce}):_c.nodeMessage.test(n)?new _c({cause:e,nonce:t==null?void 0:t.nonce}):Nc.nodeMessage.test(n)?new Nc({cause:e}):Rc.nodeMessage.test(n)?new Rc({cause:e,gas:t==null?void 0:t.gas}):zc.nodeMessage.test(n)?new zc({cause:e,gas:t==null?void 0:t.gas}):Lc.nodeMessage.test(n)?new Lc({cause:e}):Kr.nodeMessage.test(n)?new Kr({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new aa({cause:e})}function q2(e,{docsPath:t,...n}){const r=(()=>{const s=ho(e,n);return s instanceof aa?e:s})();return new j2(r,{docsPath:t,...n})}function ar(e,{format:t}){if(!t)return{};const n={};function r(a){const o=Object.keys(a);for(const i of o)i in e&&(n[i]=e[i]),a[i]&&typeof a[i]=="object"&&!Array.isArray(a[i])&&r(a[i])}const s=t(e||{});return r(s),n}function bo(e,t){return({exclude:n,format:r})=>({exclude:n,format:(s,a)=>{const o=t(s,a);if(n)for(const i of n)delete o[i];return{...o,...r(s,a)}},type:e})}const V2={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Pt(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=K2(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>Be(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=j(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=j(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=j(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=j(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=j(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=j(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=V2[e.type]),typeof e.value<"u"&&(n.value=j(e.value)),n}const $c=bo("transactionRequest",Pt);function K2(e){return e.map(t=>({address:t.address,r:t.r?j(BigInt(t.r)):t.r,s:t.s?j(BigInt(t.s)):t.s,chainId:j(t.chainId),nonce:j(t.nonce),...typeof t.yParity<"u"?{yParity:j(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:j(t.v)}:{}}))}function f0(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Cp({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Cp({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function W2(e){const{balance:t,nonce:n,state:r,stateDiff:s,code:a}=e,o={};if(a!==void 0&&(o.code=a),t!==void 0&&(o.balance=j(t)),n!==void 0&&(o.nonce=j(n)),r!==void 0&&(o.state=f0(r)),s!==void 0){if(o.state)throw new T2;o.stateDiff=f0(s)}return o}function Hc(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!xe(n,{strict:!1}))throw new Oe({address:n});if(t[n])throw new A2({address:n});t[n]=W2(r)}return t}const X2=2n**16n-1n,or=2n**256n-1n;function $t(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:s}=e,a=t?he(t):void 0;if(a&&!xe(a.address))throw new Oe({address:a.address});if(s&&!xe(s))throw new Oe({address:s});if(n&&n>or)throw new An({maxFeePerGas:n});if(r&&n&&r>n)throw new Kr({maxFeePerGas:n,maxPriorityFeePerGas:r})}class m0 extends R{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Gc extends R{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class Z2 extends R{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Je(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class h0 extends R{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 b0={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function ir(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?it(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?it(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?b0[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&&(n.authorizationList=Q2(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const yo=bo("transaction",ir);function Q2(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function jc(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:ir(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:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const qc=bo("block",jc);async function Bt(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:s}={}){var l,d,p;const a=s??!1,o=n!==void 0?j(n):void 0;let i=null;if(t?i=await e.request({method:"eth_getBlockByHash",params:[t,a]},{dedupe:!0}):i=await e.request({method:"eth_getBlockByNumber",params:[o||r,a]},{dedupe:!!o}),!i)throw new h0({blockHash:t,blockNumber:n});return(((p=(d=(l=e.chain)==null?void 0:l.formatters)==null?void 0:d.block)==null?void 0:p.format)||jc)(i,"getBlock")}async function Vc(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function J2(e,t){return y0(e,t)}async function y0(e,t){var a,o;const{block:n,chain:r=e.chain,request:s}=t||{};try{const i=((a=r==null?void 0:r.fees)==null?void 0:a.maxPriorityFeePerGas)??((o=r==null?void 0:r.fees)==null?void 0:o.defaultPriorityFee);if(typeof i=="function"){const l=n||await W(e,Bt,"getBlock")({}),d=await i({block:l,client:e,request:s});if(d===null)throw new Error;return d}if(typeof i<"u")return i;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return pe(c)}catch{const[i,c]=await Promise.all([n?Promise.resolve(n):W(e,Bt,"getBlock")({}),W(e,Vc,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new Gc;const l=c-i.baseFeePerGas;return l<0n?0n:l}}async function Y2(e,t){return Kc(e,t)}async function Kc(e,t){var f,m;const{block:n,chain:r=e.chain,request:s,type:a="eip1559"}=t||{},o=await(async()=>{var y,g;return typeof((y=r==null?void 0:r.fees)==null?void 0:y.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:s}):((g=r==null?void 0:r.fees)==null?void 0:g.baseFeeMultiplier)??1.2})();if(o<1)throw new m0;const c=10**(((f=o.toString().split(".")[1])==null?void 0:f.length)??0),l=y=>y*BigInt(Math.ceil(o*c))/BigInt(c),d=n||await W(e,Bt,"getBlock")({});if(typeof((m=r==null?void 0:r.fees)==null?void 0:m.estimateFeesPerGas)=="function"){const y=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:l,request:s,type:a});if(y!==null)return y}if(a==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new Gc;const y=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await y0(e,{block:d,chain:r,request:s}),g=l(d.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??g+y,maxPriorityFeePerGas:y}}return{gasPrice:(s==null?void 0:s.gasPrice)??l(await W(e,Vc,"getGasPrice")({}))}}async function Wc(e,{address:t,blockTag:n="latest",blockNumber:r}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?j(r):n]},{dedupe:!!r});return it(s)}function Xc(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(a=>ct(a)):e.blobs,s=[];for(const a of r)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return n==="bytes"?s:s.map(a=>Be(a))}function Zc(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=>ct(o)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(o=>ct(o)):e.commitments,a=[];for(let o=0;o<r.length;o++){const i=r[o],c=s[o];a.push(Uint8Array.from(t.computeBlobKzgProof(i,c)))}return n==="bytes"?a:a.map(o=>Be(o))}function e5(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),a=BigInt(4294967295),o=Number(n>>s&a),i=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,i,r)}function t5(e,t,n){return e&t^~e&n}function n5(e,t,n){return e&t^e&n^t&n}class x0 extends yc{constructor(t,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(t),this.view=bc(this.buffer)}update(t){zr(this),t=co(t),Jn(t);const{view:n,buffer:r,blockLen:s}=this,a=t.length;for(let o=0;o<a;){const i=Math.min(s-this.pos,a-o);if(i===s){const c=bc(t);for(;s<=a-o;o+=s)this.process(c,o);continue}r.set(t.subarray(o,o+i),this.pos),this.pos+=i,o+=i,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){zr(this),Ip(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:a}=this;let{pos:o}=this;n[o++]=128,kn(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(r,0),o=0);for(let p=o;p<s;p++)n[p]=0;e5(r,s-8,BigInt(this.length*8),a),this.process(r,0);const i=bc(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<l;p++)i.setUint32(4*p,d[p],a)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:a,destroyed:o,pos:i}=this;return t.destroyed=o,t.finished=a,t.length=s,t.pos=i,s%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Tn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$e=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),He=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),r5=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Sn=new Uint32Array(64);class s5 extends x0{constructor(t=32){super(64,t,8,!1),this.A=Tn[0]|0,this.B=Tn[1]|0,this.C=Tn[2]|0,this.D=Tn[3]|0,this.E=Tn[4]|0,this.F=Tn[5]|0,this.G=Tn[6]|0,this.H=Tn[7]|0}get(){const{A:t,B:n,C:r,D:s,E:a,F:o,G:i,H:c}=this;return[t,n,r,s,a,o,i,c]}set(t,n,r,s,a,o,i,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=a|0,this.F=o|0,this.G=i|0,this.H=c|0}process(t,n){for(let p=0;p<16;p++,n+=4)Sn[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const f=Sn[p-15],m=Sn[p-2],y=zt(f,7)^zt(f,18)^f>>>3,g=zt(m,17)^zt(m,19)^m>>>10;Sn[p]=g+Sn[p-7]+y+Sn[p-16]|0}let{A:r,B:s,C:a,D:o,E:i,F:c,G:l,H:d}=this;for(let p=0;p<64;p++){const f=zt(i,6)^zt(i,11)^zt(i,25),m=d+f+t5(i,c,l)+r5[p]+Sn[p]|0,g=(zt(r,2)^zt(r,13)^zt(r,22))+n5(r,s,a)|0;d=l,l=c,c=i,i=o+m|0,o=a,a=s,s=r,r=m+g|0}r=r+this.A|0,s=s+this.B|0,a=a+this.C|0,o=o+this.D|0,i=i+this.E|0,c=c+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,s,a,o,i,c,l,d)}roundClean(){kn(Sn)}destroy(){this.set(0,0,0,0,0,0,0,0),kn(this.buffer)}}const g0=Pp(["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))),a5=g0[0],o5=g0[1],Pn=new Uint32Array(80),Bn=new Uint32Array(80);class w0 extends x0{constructor(t=64){super(128,t,16,!1),this.Ah=He[0]|0,this.Al=He[1]|0,this.Bh=He[2]|0,this.Bl=He[3]|0,this.Ch=He[4]|0,this.Cl=He[5]|0,this.Dh=He[6]|0,this.Dl=He[7]|0,this.Eh=He[8]|0,this.El=He[9]|0,this.Fh=He[10]|0,this.Fl=He[11]|0,this.Gh=He[12]|0,this.Gl=He[13]|0,this.Hh=He[14]|0,this.Hl=He[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:s,Ch:a,Cl:o,Dh:i,Dl:c,Eh:l,El:d,Fh:p,Fl:f,Gh:m,Gl:y,Hh:g,Hl:P}=this;return[t,n,r,s,a,o,i,c,l,d,p,f,m,y,g,P]}set(t,n,r,s,a,o,i,c,l,d,p,f,m,y,g,P){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=s|0,this.Ch=a|0,this.Cl=o|0,this.Dh=i|0,this.Dl=c|0,this.Eh=l|0,this.El=d|0,this.Fh=p|0,this.Fl=f|0,this.Gh=m|0,this.Gl=y|0,this.Hh=g|0,this.Hl=P|0}process(t,n){for(let U=0;U<16;U++,n+=4)Pn[U]=t.getUint32(n),Bn[U]=t.getUint32(n+=4);for(let U=16;U<80;U++){const k=Pn[U-15]|0,D=Bn[U-15]|0,N=_r(k,D,1)^_r(k,D,8)^Bp(k,D,7),_=Nr(k,D,1)^Nr(k,D,8)^Up(k,D,7),h=Pn[U-2]|0,b=Bn[U-2]|0,x=_r(h,b,19)^oo(h,b,61)^Bp(h,b,6),C=Nr(h,b,19)^io(h,b,61)^Up(h,b,6),E=A6(_,C,Bn[U-7],Bn[U-16]),T=T6(E,N,x,Pn[U-7],Pn[U-16]);Pn[U]=T|0,Bn[U]=E|0}let{Ah:r,Al:s,Bh:a,Bl:o,Ch:i,Cl:c,Dh:l,Dl:d,Eh:p,El:f,Fh:m,Fl:y,Gh:g,Gl:P,Hh:B,Hl:v}=this;for(let U=0;U<80;U++){const k=_r(p,f,14)^_r(p,f,18)^oo(p,f,41),D=Nr(p,f,14)^Nr(p,f,18)^io(p,f,41),N=p&m^~p&g,_=f&y^~f&P,h=S6(v,D,_,o5[U],Bn[U]),b=P6(h,B,k,N,a5[U],Pn[U]),x=h|0,C=_r(r,s,28)^oo(r,s,34)^oo(r,s,39),E=Nr(r,s,28)^io(r,s,34)^io(r,s,39),T=r&a^r&i^a&i,O=s&o^s&c^o&c;B=g|0,v=P|0,g=m|0,P=y|0,m=p|0,y=f|0,{h:p,l:f}=nn(l|0,d|0,b|0,x|0),l=i|0,d=c|0,i=a|0,c=o|0,a=r|0,o=s|0;const w=C6(x,E,O);r=v6(w,b,C,T),s=w|0}({h:r,l:s}=nn(this.Ah|0,this.Al|0,r|0,s|0)),{h:a,l:o}=nn(this.Bh|0,this.Bl|0,a|0,o|0),{h:i,l:c}=nn(this.Ch|0,this.Cl|0,i|0,c|0),{h:l,l:d}=nn(this.Dh|0,this.Dl|0,l|0,d|0),{h:p,l:f}=nn(this.Eh|0,this.El|0,p|0,f|0),{h:m,l:y}=nn(this.Fh|0,this.Fl|0,m|0,y|0),{h:g,l:P}=nn(this.Gh|0,this.Gl|0,g|0,P|0),{h:B,l:v}=nn(this.Hh|0,this.Hl|0,B|0,v|0),this.set(r,s,a,o,i,c,l,d,p,f,m,y,g,P,B,v)}roundClean(){kn(Pn,Bn)}destroy(){kn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class i5 extends w0{constructor(){super(48),this.Ah=$e[0]|0,this.Al=$e[1]|0,this.Bh=$e[2]|0,this.Bl=$e[3]|0,this.Ch=$e[4]|0,this.Cl=$e[5]|0,this.Dh=$e[6]|0,this.Dl=$e[7]|0,this.Eh=$e[8]|0,this.El=$e[9]|0,this.Fh=$e[10]|0,this.Fl=$e[11]|0,this.Gh=$e[12]|0,this.Gl=$e[13]|0,this.Hh=$e[14]|0,this.Hl=$e[15]|0}}const Qc=lo(()=>new s5),c5=lo(()=>new w0),l5=lo(()=>new i5),E0=Qc;function k0(e,t){const n=t||"hex",r=E0(Tt(e,{strict:!1})?en(e):e);return n==="bytes"?r:ue(r)}function u5(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),s=k0(t,"bytes");return s.set([n],0),r==="bytes"?s:Be(s)}function C0(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(u5({commitment:a,to:r,version:n}));return s}const v0=6,A0=32,Jc=4096,T0=A0*Jc,S0=T0*v0-1-1*Jc*v0,P0=1;class d5 extends R{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class B0 extends R{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class p5 extends R{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class f5 extends R{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${P0}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function m5(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?ct(e.data):e.data,r=we(n);if(!r)throw new B0;if(r>S0)throw new d5({maxSize:S0,size:r});const s=[];let a=!0,o=0;for(;a;){const i=Sc(new Uint8Array(T0));let c=0;for(;c<Jc;){const l=n.slice(o,o+(A0-1));if(i.pushByte(0),i.pushBytes(l),l.length<31){i.pushByte(128),a=!1;break}c++,o+=31}s.push(i)}return t==="bytes"?s.map(i=>i.bytes):s.map(i=>Be(i.bytes))}function U0(e){const{data:t,kzg:n,to:r}=e,s=e.blobs??m5({data:t,to:r}),a=e.commitments??Xc({blobs:s,kzg:n,to:r}),o=e.proofs??Zc({blobs:s,commitments:a,kzg:n,to:r}),i=[];for(let c=0;c<s.length;c++)i.push({blob:s[c],commitment:a[c],proof:o[c]});return i}function Yc(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new B2({transaction:e})}function xo(e,{docsPath:t,...n}){const r=(()=>{const s=ho(e,n);return s instanceof aa?e:s})();return new I2(r,{docsPath:t,...n})}async function Un(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return it(t)}async function el(e,t){var h,b,x,C,E;const{account:n=e.account,accessList:r,authorizationList:s,chain:a=e.chain,blobVersionedHashes:o,blobs:i,data:c,gas:l,gasPrice:d,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:m,nonce:y,nonceManager:g,to:P,type:B,value:v,...U}=t,k=await(async()=>{if(!n||!g||typeof y<"u")return y;const T=he(n),O=a?a.id:await W(e,Un,"getChainId")({});return await g.consume({address:T.address,chainId:O,client:e})})();$t(t);const D=(b=(h=a==null?void 0:a.formatters)==null?void 0:h.transactionRequest)==null?void 0:b.format,_=(D||Pt)({...ar(U,{format:D}),account:n?he(n):void 0,accessList:r,authorizationList:s,blobs:i,blobVersionedHashes:o,data:c,gas:l,gasPrice:d,maxFeePerBlobGas:p,maxFeePerGas:f,maxPriorityFeePerGas:m,nonce:k,to:P,type:B,value:v},"fillTransaction");try{const T=await e.request({method:"eth_fillTransaction",params:[_]}),w=(((C=(x=a==null?void 0:a.formatters)==null?void 0:x.transaction)==null?void 0:C.format)||ir)(T.tx);delete w.blockHash,delete w.blockNumber,delete w.r,delete w.s,delete w.transactionIndex,delete w.v,delete w.yParity,w.data=w.input,w.gas&&(w.gas=t.gas??w.gas),w.gasPrice&&(w.gasPrice=t.gasPrice??w.gasPrice),w.maxFeePerBlobGas&&(w.maxFeePerBlobGas=t.maxFeePerBlobGas??w.maxFeePerBlobGas),w.maxFeePerGas&&(w.maxFeePerGas=t.maxFeePerGas??w.maxFeePerGas),w.maxPriorityFeePerGas&&(w.maxPriorityFeePerGas=t.maxPriorityFeePerGas??w.maxPriorityFeePerGas),w.nonce&&(w.nonce=t.nonce??w.nonce);const A=await(async()=>{var $,q;if(typeof(($=a==null?void 0:a.fees)==null?void 0:$.baseFeeMultiplier)=="function"){const J=await W(e,Bt,"getBlock")({});return a.fees.baseFeeMultiplier({block:J,client:e,request:t})}return((q=a==null?void 0:a.fees)==null?void 0:q.baseFeeMultiplier)??1.2})();if(A<1)throw new m0;const S=10**(((E=A.toString().split(".")[1])==null?void 0:E.length)??0),M=$=>$*BigInt(Math.ceil(A*S))/BigInt(S);return w.maxFeePerGas&&!t.maxFeePerGas&&(w.maxFeePerGas=M(w.maxFeePerGas)),w.gasPrice&&!t.gasPrice&&(w.gasPrice=M(w.gasPrice)),{raw:T.raw,transaction:{from:_.from,...w}}}catch(T){throw xo(T,{...t,chain:e.chain})}}const tl=["blobVersionedHashes","chainId","fees","gas","nonce","type"],I0=new Map,nl=new Lr(128);async function oa(e,t){var k,D,N;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=tl);const{account:r,chain:s=e.chain,nonceManager:a,parameters:o}=n,i=(()=>{if(typeof(s==null?void 0:s.prepareTransactionRequest)=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s==null?void 0:s.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function l(){return c||(typeof n.chainId<"u"?n.chainId:s?s.id:(c=await W(e,Un,"getChainId")({}),c))}const d=r&&he(r);let p=n.nonce;if(o.includes("nonce")&&typeof p>"u"&&d&&a){const _=await l();p=await a.consume({address:d.address,chainId:_,client:e})}i!=null&&i.fn&&((k=i.runAt)!=null&&k.includes("beforeFillTransaction"))&&(n=await i.fn({...n,chain:s},{phase:"beforeFillTransaction"}),p??(p=n.nonce));const m=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&n.kzg&&n.blobs||nl.get(e.uid)===!1||!["fees","gas"].some(h=>o.includes(h))?!1:!!(o.includes("chainId")&&typeof n.chainId!="number"||o.includes("nonce")&&typeof p!="number"||o.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||o.includes("gas")&&typeof n.gas!="bigint"))?await W(e,el,"fillTransaction")({...n,nonce:p}).then(_=>{const{chainId:h,from:b,gas:x,gasPrice:C,nonce:E,maxFeePerBlobGas:T,maxFeePerGas:O,maxPriorityFeePerGas:w,type:A,...F}=_.transaction;return nl.set(e.uid,!0),{...n,...b?{from:b}:{},...A?{type:A}:{},...typeof h<"u"?{chainId:h}:{},...typeof x<"u"?{gas:x}:{},...typeof C<"u"?{gasPrice:C}:{},...typeof E<"u"?{nonce:E}:{},...typeof T<"u"?{maxFeePerBlobGas:T}:{},...typeof O<"u"?{maxFeePerGas:O}:{},...typeof w<"u"?{maxPriorityFeePerGas:w}:{},..."nonceKey"in F&&typeof F.nonceKey<"u"?{nonceKey:F.nonceKey}:{}}}).catch(_=>{var x;const h=_;return h.name!=="TransactionExecutionError"||((x=h.walk)==null?void 0:x.call(h,C=>{const E=C;return E.name==="MethodNotFoundRpcError"||E.name==="MethodNotSupportedRpcError"}))&&nl.set(e.uid,!1),n}):n;p??(p=m.nonce),n={...m,...d?{from:d==null?void 0:d.address}:{},...p?{nonce:p}:{}};const{blobs:y,gas:g,kzg:P,type:B}=n;i!=null&&i.fn&&((D=i.runAt)!=null&&D.includes("beforeFillParameters"))&&(n=await i.fn({...n,chain:s},{phase:"beforeFillParameters"}));let v;async function U(){return v||(v=await W(e,Bt,"getBlock")({blockTag:"latest"}),v)}if(o.includes("nonce")&&typeof p>"u"&&d&&!a&&(n.nonce=await W(e,Wc,"getTransactionCount")({address:d.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&y&&P){const _=Xc({blobs:y,kzg:P});if(o.includes("blobVersionedHashes")){const h=C0({commitments:_,to:"hex"});n.blobVersionedHashes=h}if(o.includes("sidecars")){const h=Zc({blobs:y,commitments:_,kzg:P}),b=U0({blobs:y,commitments:_,proofs:h,to:"hex"});n.sidecars=b}}if(o.includes("chainId")&&(n.chainId=await l()),(o.includes("fees")||o.includes("type"))&&typeof B>"u")try{n.type=Yc(n)}catch{let _=I0.get(e.uid);if(typeof _>"u"){const h=await U();_=typeof(h==null?void 0:h.baseFeePerGas)=="bigint",I0.set(e.uid,_)}n.type=_?"eip1559":"legacy"}if(o.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const _=await U(),{maxFeePerGas:h,maxPriorityFeePerGas:b}=await Kc(e,{block:_,chain:s,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<b)throw new Z2({maxPriorityFeePerGas:b});n.maxPriorityFeePerGas=b,n.maxFeePerGas=h}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new Gc;if(typeof n.gasPrice>"u"){const _=await U(),{gasPrice:h}=await Kc(e,{block:_,chain:s,request:n,type:"legacy"});n.gasPrice=h}}return o.includes("gas")&&typeof g>"u"&&(n.gas=await W(e,rl,"estimateGas")({...n,account:d,prepare:(d==null?void 0:d.type)==="local"?[]:["blobVersionedHashes"]})),i!=null&&i.fn&&((N=i.runAt)!=null&&N.includes("afterFillParameters"))&&(n=await i.fn({...n,chain:s},{phase:"afterFillParameters"})),$t(n),delete n.parameters,n}async function rl(e,t){var o,i,c;const{account:n=e.account,prepare:r=!0}=t,s=n?he(n):void 0,a=(()=>{if(Array.isArray(r))return r;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const l=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await mo({authorization:t.authorizationList[0]}).catch(()=>{throw new R("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:d,authorizationList:p,blobs:f,blobVersionedHashes:m,blockNumber:y,blockTag:g,data:P,gas:B,gasPrice:v,maxFeePerBlobGas:U,maxFeePerGas:k,maxPriorityFeePerGas:D,nonce:N,value:_,stateOverride:h,...b}=r?await oa(e,{...t,parameters:a,to:l}):t;if(B&&t.gas!==B)return B;const C=(typeof y=="bigint"?j(y):void 0)||g,E=Hc(h);$t(t);const T=(c=(i=(o=e.chain)==null?void 0:o.formatters)==null?void 0:i.transactionRequest)==null?void 0:c.format,w=(T||Pt)({...ar(b,{format:T}),account:s,accessList:d,authorizationList:p,blobs:f,blobVersionedHashes:m,data:P,gasPrice:v,maxFeePerBlobGas:U,maxFeePerGas:k,maxPriorityFeePerGas:D,nonce:N,to:l,value:_},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:E?[w,C??e.experimental_blockTag??"latest",E]:C?[w,C]:[w]}))}catch(l){throw q2(l,{...t,account:s,chain:e.chain})}}async function h5(e,t){const{abi:n,address:r,args:s,functionName:a,dataSuffix:o,...i}=t,c=dt({abi:n,args:s,functionName:a});try{return await W(e,rl,"estimateGas")({data:`${c}${o?o.replace("0x",""):""}`,to:r,...i})}catch(l){const d=i.account?he(i.account):void 0;throw sr(l,{abi:n,address:r,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:d==null?void 0:d.address})}}function Wr(e,t){if(!xe(e,{strict:!1}))throw new Oe({address:e});if(!xe(t,{strict:!1}))throw new Oe({address:t});return e.toLowerCase()===t.toLowerCase()}const F0="/docs/contract/decodeEventLog";function go(e){const{abi:t,data:n,strict:r,topics:s}=e,a=r??!0,[o,...i]=s;if(!o)throw new Yy({docsPath:F0});const c=t.find(g=>g.type==="event"&&o===uo(At(g)));if(!(c&&"name"in c)||c.type!=="event")throw new e6(o,{docsPath:F0});const{name:l,inputs:d}=c,p=d==null?void 0:d.some(g=>!("name"in g&&g.name)),f=p?[]:{},m=d.map((g,P)=>[g,P]).filter(([g])=>"indexed"in g&&g.indexed);for(let g=0;g<m.length;g++){const[P,B]=m[g],v=i[g];if(!v)throw new hc({abiItem:c,param:P});f[p?B:P.name||B]=b5({param:P,value:v})}const y=d.filter(g=>!("indexed"in g&&g.indexed));if(y.length>0){if(n&&n!=="0x")try{const g=Ns(y,n);if(g)if(p)for(let P=0;P<d.length;P++)f[P]=f[P]??g.shift();else for(let P=0;P<y.length;P++)f[y[P].name]=g[P]}catch(g){if(a)throw g instanceof hp||g instanceof Jp?new so({abiItem:c,data:n,params:y,size:we(n)}):g}else if(a)throw new so({abiItem:c,data:"0x",params:y,size:0})}return{eventName:l,args:Object.values(f).length>0?f:void 0}}function b5({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Ns([e],t)||[])[0]}function sl(e){const{abi:t,args:n,logs:r,strict:s=!0}=e,a=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return r.map(o=>{var d;const i=t.filter(p=>p.type==="event"&&o.topics[0]===uo(p));if(i.length===0)return null;let c,l;for(const p of i)try{c=go({...o,abi:[p],strict:!0}),l=p;break}catch{}if(!c&&!s){l=i[0];try{c=go({...o,abi:[l],strict:!1})}catch{const p=(d=l.inputs)==null?void 0:d.some(f=>!("name"in f&&f.name));return{...o,args:p?[]:{},eventName:l.name}}}return!c||!l||a&&!a.includes(c.eventName)||!y5({args:c.args,inputs:l.inputs,matchArgs:n})?null:{...c,...o}}).filter(Boolean)}function y5(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function s(a,o,i){try{return a.type==="address"?Wr(o,i):a.type==="string"||a.type==="bytes"?Re(en(o))===i:o===i}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((a,o)=>{if(a==null)return!0;const i=n[o];return i?(Array.isArray(a)?a:[a]).some(l=>s(i,l,t[o])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([a,o])=>{if(o==null)return!0;const i=n.find(l=>l.name===a);return i?(Array.isArray(o)?o:[o]).some(l=>s(i,l,t[a])):!1}):!1}function Ht(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,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 al(e,{address:t,blockHash:n,fromBlock:r,toBlock:s,event:a,events:o,args:i,strict:c}={}){const l=c??!1,d=o??(a?[a]:void 0);let p=[];d&&(p=[d.flatMap(g=>_s({abi:[g],eventName:g.name,args:o?void 0:i}))],a&&(p=p[0]));let f;n?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:p,blockHash:n}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:p,fromBlock:typeof r=="bigint"?j(r):r,toBlock:typeof s=="bigint"?j(s):s}]});const m=f.map(y=>Ht(y));return d?sl({abi:d,args:i,logs:m,strict:l}):m}async function O0(e,t){const{abi:n,address:r,args:s,blockHash:a,eventName:o,fromBlock:i,toBlock:c,strict:l}=t,d=o?er({abi:n,name:o}):void 0,p=d?void 0:n.filter(f=>f.type==="event");return W(e,al,"getLogs")({address:r,args:s,blockHash:a,event:d,events:p,fromBlock:i,toBlock:c,strict:l})}const ol="/docs/contract/decodeFunctionResult";function cr(e){const{abi:t,args:n,functionName:r,data:s}=e;let a=t[0];if(r){const i=er({abi:t,args:n,name:r});if(!i)throw new Dr(r,{docsPath:ol});a=i}if(a.type!=="function")throw new Dr(void 0,{docsPath:ol});if(!a.outputs)throw new gp(a.name,{docsPath:ol});const o=Ns(a.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const il=BigInt(0),cl=BigInt(1);function ia(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ll(e){if(!ia(e))throw new Error("Uint8Array expected")}function ca(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function wo(e){const t=e.toString(16);return t.length&1?"0"+t:t}function D0(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?il:BigInt("0x"+e)}const M0=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",x5=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function la(e){if(ll(e),M0)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=x5[e[n]];return t}const sn={_0:48,_9:57,A:65,F:70,a:97,f:102};function _0(e){if(e>=sn._0&&e<=sn._9)return e-sn._0;if(e>=sn.A&&e<=sn.F)return e-(sn.A-10);if(e>=sn.a&&e<=sn.f)return e-(sn.a-10)}function Eo(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(M0)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let s=0,a=0;s<n;s++,a+=2){const o=_0(e.charCodeAt(a)),i=_0(e.charCodeAt(a+1));if(o===void 0||i===void 0){const c=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+a)}r[s]=o*16+i}return r}function lr(e){return D0(la(e))}function N0(e){return ll(e),D0(la(Uint8Array.from(e).reverse()))}function ua(e,t){return Eo(e.toString(16).padStart(t*2,"0"))}function R0(e,t){return ua(e,t).reverse()}function gt(e,t,n){let r;if(typeof t=="string")try{r=Eo(t)}catch(a){throw new Error(e+" must be hex string or Uint8Array, cause: "+a)}else if(ia(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(e+" of length "+n+" expected, got "+s);return r}function ko(...e){let t=0;for(let r=0;r<e.length;r++){const s=e[r];ll(s),t+=s.length}const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const a=e[r];n.set(a,s),s+=a.length}return n}const ul=e=>typeof e=="bigint"&&il<=e;function dl(e,t,n){return ul(e)&&ul(t)&&ul(n)&&t<=e&&e<n}function Xr(e,t,n,r){if(!dl(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function g5(e){let t;for(t=0;e>il;e>>=cl,t+=1);return t}const Co=e=>(cl<<BigInt(e))-cl,pl=e=>new Uint8Array(e),z0=e=>Uint8Array.from(e);function w5(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=pl(e),s=pl(e),a=0;const o=()=>{r.fill(1),s.fill(0),a=0},i=(...p)=>n(s,r,...p),c=(p=pl(0))=>{s=i(z0([0]),p),r=i(),p.length!==0&&(s=i(z0([1]),p),r=i())},l=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let p=0;const f=[];for(;p<t;){r=i();const m=r.slice();f.push(m),p+=r.length}return ko(...f)};return(p,f)=>{o(),c(p);let m;for(;!(m=f(l()));)c();return o(),m}}const E5={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"||ia(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 vo(e,t,n={}){const r=(s,a,o)=>{const i=E5[a];if(typeof i!="function")throw new Error("invalid validator function");const c=e[s];if(!(o&&c===void 0)&&!i(c,e))throw new Error("param "+String(s)+" is invalid. Expected "+a+", got "+c)};for(const[s,a]of Object.entries(t))r(s,a,!1);for(const[s,a]of Object.entries(n))r(s,a,!0);return e}function L0(e){const t=new WeakMap;return(n,...r)=>{const s=t.get(n);if(s!==void 0)return s;const a=e(n,...r);return t.set(n,a),a}}const k5="0.1.1";function C5(){return k5}class X extends Error{static setStaticOptions(t){X.prototype.docsOrigin=t.docsOrigin,X.prototype.showVersion=t.showVersion,X.prototype.version=t.version}constructor(t,n={}){const r=(()=>{var d;if(n.cause instanceof X){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(d=n.cause)!=null&&d.message?n.cause.message:n.details})(),s=n.cause instanceof X&&n.cause.docsPath||n.docsPath,a=n.docsOrigin??X.prototype.docsOrigin,o=`${a}${s??""}`,i=!!(n.version??X.prototype.showVersion),c=n.version??X.prototype.version,l=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||s||i?["",r?`Details: ${r}`:void 0,s?`See: ${o}`:void 0,i?`Version: ${c}`:void 0]:[]].filter(d=>typeof d=="string").join(`
102
+ `);super(l,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{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,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{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,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=n.cause,this.details=r,this.docs=o,this.docsOrigin=a,this.docsPath=s,this.shortMessage=t,this.showVersion=i,this.version=c}walk(t){return $0(this,t)}}Object.defineProperty(X,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${C5()}`}}),X.setStaticOptions(X.defaultStaticOptions);function $0(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?$0(e.cause,t):t?null:e}function Zr(e,t){if(Qr(e)>t)throw new H5({givenSize:Qr(e),maxSize:t})}const an={zero:48,nine:57,A:65,F:70,a:97,f:102};function H0(e){if(e>=an.zero&&e<=an.nine)return e-an.zero;if(e>=an.A&&e<=an.F)return e-(an.A-10);if(e>=an.a&&e<=an.f)return e-(an.a-10)}function v5(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new G5({size:e.length,targetSize:r,type:"Bytes"});const s=new Uint8Array(r);for(let a=0;a<r;a++){const o=n==="right";s[o?a:r-a-1]=e[o?a:e.length-a-1]}return s}function G0(e,t={}){const{dir:n="left"}=t;let r=e,s=0;for(let a=0;a<r.length-1&&r[n==="left"?a:r.length-a-1].toString()==="0";a++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r}function Ao(e,t){if(Te(e)>t)throw new W5({givenSize:Te(e),maxSize:t})}function A5(e,t){if(typeof t=="number"&&t>0&&t>Te(e)-1)throw new ef({offset:t,position:"start",size:Te(e)})}function T5(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Te(e)!==n-t)throw new ef({offset:n,position:"end",size:Te(e)})}function j0(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const s=e.replace("0x","");if(s.length>r*2)throw new X5({size:Math.ceil(s.length/2),targetSize:r,type:"Hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function S5(e,t={}){const{dir:n="left"}=t;let r=e.replace("0x",""),s=0;for(let a=0;a<r.length-1&&r[n==="left"?a:r.length-a-1].toString()==="0";a++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r==="0"?"0x":n==="right"&&r.length%2===1?`0x${r}0`:`0x${r}`}const P5="#__bigint";function da(e,t,n){return JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString()+P5:s,n)}const B5=new TextDecoder,U5=new TextEncoder;function I5(e){if(!(e instanceof Uint8Array)){if(!e)throw new To(e);if(typeof e!="object")throw new To(e);if(!("BYTES_PER_ELEMENT"in e))throw new To(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new To(e)}}function F5(...e){let t=0;for(const r of e)t+=r.length;const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const a=e[r];n.set(a,s),s+=a.length}return n}function fl(e){return e instanceof Uint8Array?e:typeof e=="string"?In(e):O5(e)}function O5(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function In(e,t={}){const{size:n}=t;let r=e;n&&(Ao(e,n),r=dr(e,n));let s=r.slice(2);s.length%2&&(s=`0${s}`);const a=s.length/2,o=new Uint8Array(a);for(let i=0,c=0;i<a;i++){const l=H0(s.charCodeAt(c++)),d=H0(s.charCodeAt(c++));if(l===void 0||d===void 0)throw new X(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[i]=l<<4|d}return o}function q0(e,t={}){const{size:n}=t,r=U5.encode(e);return typeof n=="number"?(Zr(r,n),D5(r,n)):r}function D5(e,t){return v5(e,{dir:"right",size:t})}function M5(e){return crypto.getRandomValues(new Uint8Array(e))}function Qr(e){return e.length}function _5(e,t,n,r={}){const{strict:s}=r;return e.slice(t,n)}function N5(e,t={}){const{size:n}=t;typeof n<"u"&&Zr(e,n);const r=Me(e,t);return Se(r,t)}function R5(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Zr(r,n),r=V0(r)),r.length>1||r[0]>1)throw new $5(r);return!!r[0]}function on(e,t={}){const{size:n}=t;typeof n<"u"&&Zr(e,n);const r=Me(e,t);return fa(r,t)}function z5(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Zr(r,n),r=K0(r)),B5.decode(r)}function V0(e){return G0(e,{dir:"left"})}function K0(e){return G0(e,{dir:"right"})}function L5(e){try{return I5(e),!0}catch{return!1}}class $5 extends X{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}class To extends X{constructor(t){super(`Value \`${typeof t=="object"?da(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}let H5=class extends X{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},G5=class extends X{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:"Bytes.SizeExceedsPaddingSizeError"})}};const j5=new TextEncoder,q5=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function V5(e,t={}){const{strict:n=!1}=t;if(!e)throw new J0(e);if(typeof e!="string")throw new J0(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Y0(e);if(!e.startsWith("0x"))throw new Y0(e)}function ke(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function So(e){return e instanceof Uint8Array?Me(e):Array.isArray(e)?Me(new Uint8Array(e)):e}function W0(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Ao(n,t.size),ur(n,t.size)):n}function Me(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=q5[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(Ao(r,t.size),dr(r,t.size)):r}function V(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let a;r?n?a=(1n<<BigInt(r)*8n-1n)-1n:a=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&n?-a-1n:0;if(a&&s>a||s<o){const l=typeof e=="bigint"?"n":"";throw new Q0({max:a?`${a}${l}`:void 0,min:`${o}${l}`,signed:n,size:r,value:`${e}${l}`})}const c=`0x${(n&&s<0?BigInt.asUintN(r*8,BigInt(s)):s).toString(16)}`;return r?ur(c,r):c}function pa(e,t={}){return Me(j5.encode(e),t)}function ur(e,t){return j0(e,{dir:"left",size:t})}function dr(e,t){return j0(e,{dir:"right",size:t})}function X0(e){return Me(M5(e))}function ce(e,t,n,r={}){const{strict:s}=r;A5(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&T5(a,t,n),a}function Te(e){return Math.ceil((e.length-2)/2)}function ml(e){return S5(e,{dir:"left"})}function Se(e,t={}){const{signed:n}=t;t.size&&Ao(e,t.size);const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n)-1n,o=a>>1n;return r<=o?r:r-a-1n}function fa(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:Se(e,t))}function Z0(e,t={}){const{size:n}=t;let r=In(e);return n&&(Zr(r,n),r=K0(r)),new TextDecoder().decode(r)}function Ut(e,t={}){const{strict:n=!1}=t;try{return V5(e,{strict:n}),!0}catch{return!1}}class Q0 extends X{constructor({max:t,min:n,signed:r,size:s,value:a}){super(`Number \`${a}\` is not in safe${s?` ${s*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class J0 extends X{constructor(t){super(`Value \`${typeof t=="object"?da(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class Y0 extends X{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class K5 extends X{constructor(t){super(`Hex value \`"${t}"\` is an odd length (${t.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}class W5 extends X{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class ef extends X{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:"Hex.SliceOffsetOutOfBoundsError"})}}class X5 extends X{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:"Hex.SizeExceedsPaddingSizeError"})}}function Z5(e){return{address:e.address,amount:V(e.amount),index:V(e.index),validatorIndex:V(e.validatorIndex)}}function tf(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:V(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:V(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:V(e.gasLimit)},...typeof e.number=="bigint"&&{number:V(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:V(e.prevRandao)},...typeof e.time=="bigint"&&{time:V(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Z5)}}}const Po=[{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"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],hl=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],nf=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],rf=[...nf,{name:"resolveWithGateways",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"}]}],Q5=[...nf,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],sf=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],af=[{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"}]}],of=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],cf=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],lf=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],J5="0x82ad56cb",uf="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Y5="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",ex="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",bl="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";class yl extends R{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 tx extends R{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 nx extends R{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(`
103
+ `),{name:"ChainNotFoundError"})}}class df extends R{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}let Jr=class extends R{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}};const xl="/docs/contract/encodeDeployData";function Bo(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const s=t.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new Wy({docsPath:xl});if(!("inputs"in s))throw new mp({docsPath:xl});if(!s.inputs||s.inputs.length===0)throw new mp({docsPath:xl});const a=Cn(s.inputs,n);return ut([r,a])}function Yr({blockNumber:e,chain:t,contract:n}){var s;const r=(s=t==null?void 0:t.contracts)==null?void 0:s[n];if(!r)throw new yl({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new yl({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function gl(e,{docsPath:t,...n}){const r=(()=>{const s=ho(e,n);return s instanceof aa?e:s})();return new o0(r,{docsPath:t,...n})}function wl(){let e=()=>{},t=()=>{};return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}const El=new Map;function pf({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:s}){const a=async()=>{const d=c();o();const p=d.map(({args:f})=>f);p.length!==0&&e(p).then(f=>{s&&Array.isArray(f)&&f.sort(s);for(let m=0;m<d.length;m++){const{resolve:y}=d[m];y==null||y([f[m],f])}}).catch(f=>{for(let m=0;m<d.length;m++){const{reject:y}=d[m];y==null||y(f)}})},o=()=>El.delete(t),i=()=>c().map(({args:d})=>d),c=()=>El.get(t)||[],l=d=>El.set(t,[...c(),d]);return{flush:o,async schedule(d){const{promise:p,resolve:f,reject:m}=wl();return(n==null?void 0:n([...i(),d]))&&a(),c().length>0?(l({args:d,resolve:f,reject:m}),p):(l({args:d,resolve:f,reject:m}),setTimeout(a,r),p)}}}async function ma(e,t){var T,O,w,A;const{account:n=e.account,authorizationList:r,batch:s=!!((T=e.batch)!=null&&T.multicall),blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",accessList:i,blobs:c,blockOverrides:l,code:d,data:p,factory:f,factoryData:m,gas:y,gasPrice:g,maxFeePerBlobGas:P,maxFeePerGas:B,maxPriorityFeePerGas:v,nonce:U,to:k,value:D,stateOverride:N,..._}=t,h=n?he(n):void 0;if(d&&(f||m))throw new R("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(d&&k)throw new R("Cannot provide both `code` & `to` as parameters.");const b=d&&p,x=f&&m&&k&&p,C=b||x,E=b?ff({code:d,data:p}):x?ax({data:p,factory:f,factoryData:m,to:k}):p;try{$t(t);const S=(typeof a=="bigint"?j(a):void 0)||o,M=l?tf(l):void 0,$=Hc(N),q=(A=(w=(O=e.chain)==null?void 0:O.formatters)==null?void 0:w.transactionRequest)==null?void 0:A.format,ie=(q||Pt)({...ar(_,{format:q}),accessList:i,account:h,authorizationList:r,blobs:c,data:E,gas:y,gasPrice:g,maxFeePerBlobGas:P,maxFeePerGas:B,maxPriorityFeePerGas:v,nonce:U,to:C?void 0:k,value:D},"call");if(s&&rx({request:ie})&&!$&&!M)try{return await sx(e,{...ie,blockNumber:a,blockTag:o})}catch(ee){if(!(ee instanceof df)&&!(ee instanceof yl))throw ee}const le=(()=>{const ee=[ie,S];return $&&M?[...ee,$,M]:$?[...ee,$]:M?[...ee,{},M]:ee})(),Y=await e.request({method:"eth_call",params:le});return Y==="0x"?{data:void 0}:{data:Y}}catch(F){const S=ox(F),{offchainLookup:M,offchainLookupSignature:$}=await Promise.resolve().then(()=>f8);if(e.ccipRead!==!1&&(S==null?void 0:S.slice(0,10))===$&&k)return{data:await M(e,{data:S,to:k})};throw C&&(S==null?void 0:S.slice(0,10))==="0x101bb98d"?new M2({factory:f}):gl(F,{...t,account:h,chain:e.chain})}}function rx({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(J5)||!n||Object.values(r).filter(s=>typeof s<"u").length>0)}async function sx(e,t){var g;const{batchSize:n=1024,deployless:r=!1,wait:s=0}=typeof((g=e.batch)==null?void 0:g.multicall)=="object"?e.batch.multicall:{},{blockNumber:a,blockTag:o=e.experimental_blockTag??"latest",data:i,to:c}=t,l=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Yr({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new df})(),p=(typeof a=="bigint"?j(a):void 0)||o,{schedule:f}=pf({id:`${e.uid}.${p}`,wait:s,shouldSplitBatch(P){return P.reduce((v,{data:U})=>v+(U.length-2),0)>n*2},fn:async P=>{const B=P.map(k=>({allowFailure:!0,callData:k.data,target:k.to})),v=dt({abi:Po,args:[B],functionName:"aggregate3"}),U=await e.request({method:"eth_call",params:[{...l===null?{data:ff({code:bl,data:v})}:{to:l,data:v}},p]});return cr({abi:Po,args:[B],functionName:"aggregate3",data:U||"0x"})}}),[{returnData:m,success:y}]=await f({data:i,to:c});if(!y)throw new fo({data:m});return m==="0x"?{data:void 0}:{data:m}}function ff(e){const{code:t,data:n}=e;return Bo({abi:lp(["constructor(bytes, bytes)"]),bytecode:uf,args:[t,n]})}function ax(e){const{data:t,factory:n,factoryData:r,to:s}=e;return Bo({abi:lp(["constructor(address, bytes, address, bytes)"]),bytecode:Y5,args:[s,t,n,r]})}function ox(e){var n;if(!(e instanceof R))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 It(e,t){const{abi:n,address:r,args:s,functionName:a,...o}=t,i=dt({abi:n,args:s,functionName:a});try{const{data:c}=await W(e,ma,"call")({...o,data:i,to:r});return cr({abi:n,args:s,functionName:a,data:c||"0x"})}catch(c){throw sr(c,{abi:n,address:r,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}async function ix(e,t){const{abi:n,address:r,args:s,dataSuffix:a,functionName:o,...i}=t,c=i.account?he(i.account):e.account,l=dt({abi:n,args:s,functionName:o});try{const{data:d}=await W(e,ma,"call")({batch:!1,data:`${l}${a?a.replace("0x",""):""}`,to:r,...i,account:c}),p=cr({abi:n,args:s,functionName:o,data:d||"0x"}),f=n.filter(m=>"name"in m&&m.name===t.functionName);return{result:p,request:{abi:f,address:r,args:s,dataSuffix:a,functionName:o,...i,account:c}}}catch(d){throw sr(d,{abi:n,address:r,args:s,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}const kl=new Map,mf=new Map;let cx=0;function cn(e,t,n){const r=++cx,s=()=>kl.get(e)||[],a=()=>{const d=s();kl.set(e,d.filter(p=>p.id!==r))},o=()=>{const d=s();if(!d.some(f=>f.id===r))return;const p=mf.get(e);if(d.length===1&&p){const f=p();f instanceof Promise&&f.catch(()=>{})}a()},i=s();if(kl.set(e,[...i,{id:r,fns:t}]),i&&i.length>0)return o;const c={};for(const d in t)c[d]=((...p)=>{var m,y;const f=s();if(f.length!==0)for(const g of f)(y=(m=g.fns)[d])==null||y.call(m,...p)});const l=n(c);return typeof l=="function"&&mf.set(e,l),o}async function Cl(e){return new Promise(t=>setTimeout(t,e))}function es(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let s=!0;const a=()=>s=!1;return(async()=>{let i;t&&(i=await e({unpoll:a}));const c=await(n==null?void 0:n(i))??r;await Cl(c);const l=async()=>{s&&(await e({unpoll:a}),await Cl(r),l())};l()})(),a}const lx=new Map,ux=new Map;function dx(e){const t=(s,a)=>({clear:()=>a.delete(s),get:()=>a.get(s),set:o=>a.set(s,o)}),n=t(e,lx),r=t(e,ux);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function px(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=dx(t),s=r.response.get();if(s&&n>0&&Date.now()-s.created.getTime()<n)return s.data;let a=r.promise.get();a||(a=e(),r.promise.set(a));try{const o=await a;return r.response.set({created:new Date,data:o}),o}finally{r.promise.clear()}}const fx=e=>`blockNumber.${e}`;async function ha(e,{cacheTime:t=e.cacheTime}={}){const n=await px(()=>e.request({method:"eth_blockNumber"}),{cacheKey:fx(e.uid),cacheTime:t});return BigInt(n)}async function Uo(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 s=r.map(a=>Ht(a));return!("abi"in t)||!t.abi?s:sl({abi:t.abi,logs:s,strict:n})}async function Io(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function mx(e,t){const{abi:n,address:r,args:s,batch:a=!0,eventName:o,fromBlock:i,onError:c,onLogs:l,poll:d,pollingInterval:p=e.pollingInterval,strict:f}=t;return(typeof d<"u"?d:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const P=f??!1,B=Ae(["watchContractEvent",r,s,a,e.uid,o,p,P,i]);return cn(B,{onLogs:l,onError:c},v=>{let U;i!==void 0&&(U=i-1n);let k,D=!1;const N=es(async()=>{var _;if(!D){try{k=await W(e,Wp,"createContractEventFilter")({abi:n,address:r,args:s,eventName:o,strict:P,fromBlock:i})}catch{}D=!0;return}try{let h;if(k)h=await W(e,Uo,"getFilterChanges")({filter:k});else{const b=await W(e,ha,"getBlockNumber")({});U&&U<b?h=await W(e,O0,"getContractEvents")({abi:n,address:r,args:s,eventName:o,fromBlock:U+1n,toBlock:b,strict:P}):h=[],U=b}if(h.length===0)return;if(a)v.onLogs(h);else for(const b of h)v.onLogs([b])}catch(h){k&&h instanceof vn&&(D=!1),(_=v.onError)==null||_.call(v,h)}},{emitOnBegin:!0,interval:p});return async()=>{k&&await W(e,Io,"uninstallFilter")({filter:k}),N()}})})():(()=>{const P=f??!1,B=Ae(["watchContractEvent",r,s,a,e.uid,o,p,P]);let v=!0,U=()=>v=!1;return cn(B,{onLogs:l,onError:c},k=>((async()=>{try{const D=(()=>{if(e.transport.type==="fallback"){const h=e.transport.transports.find(b=>b.config.type==="webSocket"||b.config.type==="ipc");return h?h.value:e.transport}return e.transport})(),N=o?_s({abi:n,eventName:o,args:s}):[],{unsubscribe:_}=await D.subscribe({params:["logs",{address:r,topics:N}],onData(h){var x;if(!v)return;const b=h.result;try{const{eventName:C,args:E}=go({abi:n,data:b.data,topics:b.topics,strict:f}),T=Ht(b,{args:E,eventName:C});k.onLogs([T])}catch(C){let E,T;if(C instanceof so||C instanceof hc){if(f)return;E=C.abiItem.name,T=(x=C.abiItem.inputs)==null?void 0:x.some(w=>!("name"in w&&w.name))}const O=Ht(b,{args:T?[]:{},eventName:E});k.onLogs([O])}},onError(h){var b;(b=k.onError)==null||b.call(k,h)}});U=_,v||U()}catch(D){c==null||c(D)}})(),()=>U()))})()}class ln extends R{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(`
104
+ `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class pr extends R{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function vl({chain:e,currentChainId:t}){if(!e)throw new nx;if(t!==e.id)throw new tx({chain:e,currentChainId:t})}async function Al(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const Tl=new Lr(128);async function Fo(e,t){var v,U,k,D;const{account:n=e.account,chain:r=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:f,nonce:m,type:y,value:g,...P}=t;if(typeof n>"u")throw new ln({docsPath:"/docs/actions/wallet/sendTransaction"});const B=n?he(n):null;try{$t(t);const N=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await mo({authorization:a[0]}).catch(()=>{throw new R("`to` is required. Could not infer from `authorizationList`.")})})();if((B==null?void 0:B.type)==="json-rpc"||B===null){let _;r!==null&&(_=await W(e,Un,"getChainId")({}),vl({currentChainId:_,chain:r}));const h=(k=(U=(v=e.chain)==null?void 0:v.formatters)==null?void 0:U.transactionRequest)==null?void 0:k.format,x=(h||Pt)({...ar(P,{format:h}),accessList:s,account:B,authorizationList:a,blobs:o,chainId:_,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:f,nonce:m,to:N,type:y,value:g},"sendTransaction"),C=Tl.get(e.uid),E=C?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:E,params:[x]},{retryCount:0})}catch(T){if(C===!1)throw T;const O=T;if(O.name==="InvalidInputRpcError"||O.name==="InvalidParamsRpcError"||O.name==="MethodNotFoundRpcError"||O.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[x]},{retryCount:0}).then(w=>(Tl.set(e.uid,!0),w)).catch(w=>{const A=w;throw A.name==="MethodNotFoundRpcError"||A.name==="MethodNotSupportedRpcError"?(Tl.set(e.uid,!1),O):A});throw O}}if((B==null?void 0:B.type)==="local"){const _=await W(e,oa,"prepareTransactionRequest")({account:B,accessList:s,authorizationList:a,blobs:o,chain:r,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:f,nonce:m,nonceManager:B.nonceManager,parameters:[...tl,"sidecars"],type:y,value:g,...P,to:N}),h=(D=r==null?void 0:r.serializers)==null?void 0:D.transaction,b=await B.signTransaction(_,{serializer:h});return await W(e,Al,"sendRawTransaction")({serializedTransaction:b})}throw(B==null?void 0:B.type)==="smart"?new pr({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new pr({docsPath:"/docs/actions/wallet/sendTransaction",type:B==null?void 0:B.type})}catch(N){throw N instanceof pr?N:xo(N,{...t,account:B,chain:t.chain||void 0})}}async function ba(e,t){return ba.internal(e,Fo,"sendTransaction",t)}(function(e){async function t(n,r,s,a){const{abi:o,account:i=n.account,address:c,args:l,dataSuffix:d,functionName:p,...f}=a;if(typeof i>"u")throw new ln({docsPath:"/docs/contract/writeContract"});const m=i?he(i):null,y=dt({abi:o,args:l,functionName:p});try{return await W(n,r,s)({data:`${y}${d?d.replace("0x",""):""}`,to:c,account:m,...f})}catch(g){throw sr(g,{abi:o,address:c,args:l,docsPath:"/docs/contract/writeContract",functionName:p,sender:m==null?void 0:m.address})}}e.internal=t})(ba||(ba={}));class hx extends R{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}function Oo(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((s,a)=>{const o=async({count:i=0}={})=>{const c=async({error:l})=>{const d=typeof t=="function"?t({count:i,error:l}):t;d&&await Cl(d),o({count:i+1})};try{const l=await e();s(l)}catch(l){if(i<n&&await r({count:i,error:l}))return c({error:l});a(l)}};o()})}const hf={"0x0":"reverted","0x1":"success"};function Do(e,t){const n={...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(r=>Ht(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?it(e.transactionIndex):null,status:e.status?hf[e.status]:null,type:e.type?b0[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const Sl=bo("transactionReceipt",Do),bf="0x5792579257925792579257925792579257925792579257925792579257925792",yf=j(0,{size:32});async function xf(e,t){const{account:n=e.account,capabilities:r,chain:s=e.chain,experimental_fallback:a,experimental_fallbackDelay:o=32,forceAtomic:i=!1,id:c,version:l="2.0.0"}=t,d=n?he(n):null,p=t.calls.map(f=>{const m=f,y=m.abi?dt({abi:m.abi,functionName:m.functionName,args:m.args}):m.data;return{data:m.dataSuffix&&y?lt([y,m.dataSuffix]):y,to:m.to,value:m.value?j(m.value):void 0}});try{const f=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:i,calls:p,capabilities:r,chainId:j(s.id),from:d==null?void 0:d.address,id:c,version:l}]},{retryCount:0});return typeof f=="string"?{id:f}:f}catch(f){const m=f;if(a&&(m.name==="MethodNotFoundRpcError"||m.name==="MethodNotSupportedRpcError"||m.name==="UnknownRpcError"||m.details.toLowerCase().includes("does not exist / is not available")||m.details.toLowerCase().includes("missing or invalid. request()")||m.details.toLowerCase().includes("did not match any variant of untagged enum")||m.details.toLowerCase().includes("account upgraded to unsupported contract")||m.details.toLowerCase().includes("eip-7702 not supported")||m.details.toLowerCase().includes("unsupported wc_ method")||m.details.toLowerCase().includes("feature toggled misconfigured")||m.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(r&&Object.values(r).some(v=>!v.optional)){const v="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new jr(new R(v,{details:v}))}if(i&&p.length>1){const B="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new qr(new R(B,{details:B}))}const y=[];for(const B of p){const v=Fo(e,{account:d,chain:s,data:B.data,to:B.to,value:B.value?pe(B.value):void 0});y.push(v),o>0&&await new Promise(U=>setTimeout(U,o))}const g=await Promise.allSettled(y);if(g.every(B=>B.status==="rejected"))throw g[0].reason;const P=g.map(B=>B.status==="fulfilled"?B.value:yf);return{id:lt([...P,j(s.id,{size:32}),bf])}}throw xo(f,{...t,account:d,chain:t.chain})}}async function gf(e,t){async function n(d){if(d.endsWith(bf.slice(2))){const f=Qe(kc(d,-64,-32)),m=kc(d,0,-64).slice(2).match(/.{1,64}/g),y=await Promise.all(m.map(P=>yf.slice(2)!==P?e.request({method:"eth_getTransactionReceipt",params:[`0x${P}`]},{dedupe:!0}):void 0)),g=y.some(P=>P===null)?100:y.every(P=>(P==null?void 0:P.status)==="0x1")?200:y.every(P=>(P==null?void 0:P.status)==="0x0")?500:600;return{atomic:!1,chainId:it(f),receipts:y.filter(Boolean),status:g,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[d]})}const{atomic:r=!1,chainId:s,receipts:a,version:o="2.0.0",...i}=await n(t.id),[c,l]=(()=>{const d=i.status;return d>=100&&d<200?["pending",d]:d>=200&&d<300?["success",d]:d>=300&&d<700?["failure",d]:d==="CONFIRMED"?["success",200]:d==="PENDING"?["pending",100]:[void 0,d]})();return{...i,atomic:r,chainId:s?it(s):void 0,receipts:(a==null?void 0:a.map(d=>({...d,blockNumber:pe(d.blockNumber),gasUsed:pe(d.gasUsed),status:hf[d.status]})))??[],statusCode:l,status:c,version:o}}async function wf(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:s=({statusCode:g})=>g===200||g>=300,retryCount:a=4,retryDelay:o=({count:g})=>~~(1<<g)*200,timeout:i=6e4,throwOnFailure:c=!1}=t,l=Ae(["waitForCallsStatus",e.uid,n]),{promise:d,resolve:p,reject:f}=wl();let m;const y=cn(l,{resolve:p,reject:f},g=>{const P=es(async()=>{const B=v=>{clearTimeout(m),P(),v(),y()};try{const v=await Oo(async()=>{const U=await W(e,gf,"getCallsStatus")({id:n});if(c&&U.status==="failure")throw new hx(U);return U},{retryCount:a,delay:o});if(!s(v))return;B(()=>g.resolve(v))}catch(v){B(()=>g.reject(v))}},{interval:r,emitOnBegin:!0});return P});return m=i?setTimeout(()=>{y(),clearTimeout(m),f(new bx({id:n}))},i):void 0,await d}class bx extends R{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const Pl=256;let Mo=Pl,_o;function Ef(e=11){if(!_o||Mo+e>Pl*2){_o="",Mo=0;for(let t=0;t<Pl;t++)_o+=(256+Math.random()*256|0).toString(16).substring(1)}return _o.substring(Mo,Mo+++e)}function kf(e){const{batch:t,chain:n,ccipRead:r,key:s="base",name:a="Base Client",type:o="base"}=e,i=e.experimental_blockTag??(typeof(n==null?void 0:n.experimental_preconfirmationTime)=="number"?"pending":void 0),c=(n==null?void 0:n.blockTime)??12e3,l=Math.min(Math.max(Math.floor(c/2),500),4e3),d=e.pollingInterval??l,p=e.cacheTime??d,f=e.account?he(e.account):void 0,{config:m,request:y,value:g}=e.transport({account:f,chain:n,pollingInterval:d}),P={...m,...g},B={account:f,batch:t,cacheTime:p,ccipRead:r,chain:n,key:s,name:a,pollingInterval:d,request:y,transport:P,type:o,uid:Ef(),...i?{experimental_blockTag:i}:{}};function v(U){return k=>{const D=k(U);for(const _ in B)delete D[_];const N={...U,...D};return Object.assign(N,{extend:v(N)})}}return Object.assign(B,{extend:v(B)})}function Bl(e){var n,r,s,a,o,i;if(!(e instanceof R))return!1;const t=e.walk(c=>c instanceof Ic);return t instanceof Ic?((n=t.data)==null?void 0:n.errorName)==="HttpError"||((r=t.data)==null?void 0:r.errorName)==="ResolverError"||((s=t.data)==null?void 0:s.errorName)==="ResolverNotContract"||((a=t.data)==null?void 0:a.errorName)==="ResolverNotFound"||((o=t.data)==null?void 0:o.errorName)==="ReverseAddressMismatch"||((i=t.data)==null?void 0:i.errorName)==="UnsupportedResolverProfile":!1}function yx(e){const{abi:t,data:n}=e,r=Yn(n,0,4),s=t.find(a=>a.type==="function"&&r===Ms(At(a)));if(!s)throw new t6(r,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:s.name,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Ns(s.inputs,Yn(n,4)):void 0}}const Ul="/docs/contract/encodeErrorResult";function Cf(e){const{abi:t,errorName:n,args:r}=e;let s=t[0];if(n){const c=er({abi:t,args:r,name:n});if(!c)throw new bp(n,{docsPath:Ul});s=c}if(s.type!=="error")throw new bp(void 0,{docsPath:Ul});const a=At(s),o=Ms(a);let i="0x";if(r&&r.length>0){if(!s.inputs)throw new Jy(s.name,{docsPath:Ul});i=Cn(s.inputs,r)}return ut([o,i])}const Il="/docs/contract/encodeFunctionResult";function xx(e){const{abi:t,functionName:n,result:r}=e;let s=t[0];if(n){const o=er({abi:t,name:n});if(!o)throw new Dr(n,{docsPath:Il});s=o}if(s.type!=="function")throw new Dr(void 0,{docsPath:Il});if(!s.outputs)throw new gp(s.name,{docsPath:Il});const a=(()=>{if(s.outputs.length===0)return[];if(s.outputs.length===1)return[r];if(Array.isArray(r))return r;throw new wp(r)})();return Cn(s.outputs,a)}const ya="x-batch-gateway:true";async function vf(e){const{data:t,ccipRequest:n}=e,{args:[r]}=yx({abi:hl,data:t}),s=[],a=[];return await Promise.all(r.map(async(o,i)=>{try{a[i]=o.urls.includes(ya)?await vf({data:o.data,ccipRequest:n}):await n(o),s[i]=!1}catch(c){s[i]=!0,a[i]=gx(c)}})),xx({abi:hl,functionName:"query",result:[s,a]})}function gx(e){return e.name==="HttpRequestError"&&e.status?Cf({abi:hl,errorName:"HttpError",args:[e.status,e.shortMessage]}):Cf({abi:[Zp],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}function Af(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return Tt(t)?t:null}function Fl(e){let t=new Uint8Array(32).fill(0);if(!e)return Be(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const s=Af(n[r]),a=s?en(s):Re(Qn(n[r]),"bytes");t=Re(lt([t,a]),"bytes")}return Be(t)}function wx(e){return`[${e.slice(2)}]`}function Ex(e){const t=new Uint8Array(32).fill(0);return e?Af(e)||Re(Qn(e)):Be(t)}function Ol(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(Qn(t).byteLength+2);let r=0;const s=t.split(".");for(let a=0;a<s.length;a++){let o=Qn(s[a]);o.byteLength>255&&(o=Qn(wx(Ex(s[a])))),n[r]=o.length,n.set(o,r+1),r+=o.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}async function kx(e,t){const{blockNumber:n,blockTag:r,coinType:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Yr({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),d=c==null?void 0:c.ensTlds;if(d&&!d.some(f=>a.endsWith(f)))return null;const p=s!=null?[Fl(a),BigInt(s)]:[Fl(a)];try{const f=dt({abi:af,functionName:"addr",args:p}),m={address:l,abi:rf,functionName:"resolveWithGateways",args:[ue(Ol(a)),f,o??[ya]],blockNumber:n,blockTag:r},g=await W(e,It,"readContract")(m);if(g[0]==="0x")return null;const P=cr({abi:af,args:p,functionName:"addr",data:g[0]});return P==="0x"||Qe(P)==="0x00"?null:P}catch(f){if(i)throw f;if(Bl(f))return null;throw f}}class Cx extends R{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 xa extends R{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class Dl extends R{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 vx extends R{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const Ax=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,Tx=/^(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,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,Sx=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Px=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function Bx(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"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function Tf(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function Sf({uri:e,gatewayUrls:t}){const n=Sx.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=Tf(t==null?void 0:t.ipfs,"https://ipfs.io"),s=Tf(t==null?void 0:t.arweave,"https://arweave.net"),a=e.match(Ax),{protocol:o,subpath:i,target:c,subtarget:l=""}=(a==null?void 0:a.groups)||{},d=o==="ipns:/"||i==="ipns/",p=o==="ipfs:/"||i==="ipfs/"||Tx.test(e);if(e.startsWith("http")&&!d&&!p){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||p)&&c)return{uri:`${r}/${d?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${s}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(Px,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new Dl({uri:e})}function Pf(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new Cx({data:e});return e.image||e.image_url||e.image_data}async function Ux({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then(s=>s.json());return await Ml({gatewayUrls:e,uri:Pf(n)})}catch{throw new Dl({uri:t})}}async function Ml({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=Sf({uri:t,gatewayUrls:e});if(r||await Bx(n))return n;throw new Dl({uri:t})}function Ix(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,s]=t.split("/"),[a,o]=n.split(":"),[i,c]=r.split(":");if(!a||a.toLowerCase()!=="eip155")throw new xa({reason:"Only EIP-155 supported"});if(!o)throw new xa({reason:"Chain ID not found"});if(!c)throw new xa({reason:"Contract address not found"});if(!s)throw new xa({reason:"Token ID not found"});if(!i)throw new xa({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o,10),namespace:i.toLowerCase(),contractAddress:c,tokenID:s}}async function Fx(e,{nft:t}){if(t.namespace==="erc721")return It(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 It(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 vx({namespace:t.namespace})}async function Ox(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?Dx(e,{gatewayUrls:t,record:n}):Ml({uri:n,gatewayUrls:t})}async function Dx(e,{gatewayUrls:t,record:n}){const r=Ix(n),s=await Fx(e,{nft:r}),{uri:a,isOnChain:o,isEncoded:i}=Sf({uri:s,gatewayUrls:t});if(o&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){const l=i?atob(a.replace("data:application/json;base64,","")):a,d=JSON.parse(l);return Ml({uri:Pf(d),gatewayUrls:t})}let c=r.tokenID;return r.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),Ux({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}async function Bf(e,t){const{blockNumber:n,blockTag:r,key:s,name:a,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Yr({blockNumber:n,chain:c,contract:"ensUniversalResolver"})})(),d=c==null?void 0:c.ensTlds;if(d&&!d.some(p=>a.endsWith(p)))return null;try{const p={address:l,abi:rf,args:[ue(Ol(a)),dt({abi:sf,functionName:"text",args:[Fl(a),s]}),o??[ya]],functionName:"resolveWithGateways",blockNumber:n,blockTag:r},m=await W(e,It,"readContract")(p);if(m[0]==="0x")return null;const y=cr({abi:sf,functionName:"text",data:m[0]});return y===""?null:y}catch(p){if(i)throw p;if(Bl(p))return null;throw p}}async function Mx(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:s,gatewayUrls:a,strict:o,universalResolverAddress:i}){const c=await W(e,Bf,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:s,universalResolverAddress:i,gatewayUrls:a,strict:o});if(!c)return null;try{return await Ox(e,{record:c,gatewayUrls:r})}catch{return null}}async function _x(e,t){const{address:n,blockNumber:r,blockTag:s,coinType:a=60n,gatewayUrls:o,strict:i}=t,{chain:c}=e,l=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Yr({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})();try{const d={address:l,abi:Q5,args:[n,a,o??[ya]],functionName:"reverseWithGateways",blockNumber:r,blockTag:s},p=W(e,It,"readContract"),[f]=await p(d);return f||null}catch(d){if(i)throw d;if(Bl(d))return null;throw d}}async function Nx(e,t){const{blockNumber:n,blockTag:r,name:s}=t,{chain:a}=e,o=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!a)throw new Error("client chain not configured. universalResolverAddress is required.");return Yr({blockNumber:n,chain:a,contract:"ensUniversalResolver"})})(),i=a==null?void 0:a.ensTlds;if(i&&!i.some(l=>s.endsWith(l)))throw new Error(`${s} is not a valid ENS TLD (${i==null?void 0:i.join(", ")}) for chain "${a.name}" (id: ${a.id}).`);const[c]=await W(e,It,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[ue(Ol(s))],blockNumber:n,blockTag:r});return c}async function Uf(e,t){var P,B,v;const{account:n=e.account,blockNumber:r,blockTag:s="latest",blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:d,maxPriorityFeePerGas:p,to:f,value:m,...y}=t,g=n?he(n):void 0;try{$t(t);const k=(typeof r=="bigint"?j(r):void 0)||s,D=(v=(B=(P=e.chain)==null?void 0:P.formatters)==null?void 0:B.transactionRequest)==null?void 0:v.format,_=(D||Pt)({...ar(y,{format:D}),account:g,blobs:a,data:o,gas:i,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:d,maxPriorityFeePerGas:p,to:f,value:m},"createAccessList"),h=await e.request({method:"eth_createAccessList",params:[_,k]});return{accessList:h.accessList,gasUsed:BigInt(h.gasUsed)}}catch(U){throw gl(U,{...t,account:g,chain:e.chain})}}async function Rx(e){const t=po(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}async function If(e,{address:t,args:n,event:r,events:s,fromBlock:a,strict:o,toBlock:i}={}){const c=s??(r?[r]:void 0),l=po(e,{method:"eth_newFilter"});let d=[];c&&(d=[c.flatMap(m=>_s({abi:[m],eventName:m.name,args:n}))],r&&(d=d[0]));const p=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof a=="bigint"?j(a):a,toBlock:typeof i=="bigint"?j(i):i,...d.length?{topics:d}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:a,id:p,request:l(p),strict:!!o,toBlock:i,type:"event"}}async function Ff(e){const t=po(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}async function zx(e,{address:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest"}){const s=typeof n=="bigint"?j(n):void 0,a=await e.request({method:"eth_getBalance",params:[t,s||r]});return BigInt(a)}async function Lx(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function $x(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const s=n!==void 0?j(n):void 0;let a;return t?a=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):a=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||r]},{dedupe:!!s}),it(a)}async function No(e,{address:t,blockNumber:n,blockTag:r="latest"}){const s=n!==void 0?j(n):void 0,a=await e.request({method:"eth_getCode",params:[t,s||r]},{dedupe:!!s});if(a!=="0x")return a}class Hx extends R{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 Gx(e,t){const{address:n,factory:r,factoryData:s}=t;try{const[a,o,i,c,l,d,p]=await W(e,It,"readContract")({abi:jx,address:n,functionName:"eip712Domain",factory:r,factoryData:s});return{domain:{name:o,version:i,chainId:Number(c),verifyingContract:l,salt:d},extensions:p,fields:a}}catch(a){const o=a;throw o.name==="ContractFunctionExecutionError"&&o.cause.name==="ContractFunctionZeroDataError"?new Hx({address:n}):o}}const jx=[{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"}];function qx(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 Vx(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:s}){const a=typeof n=="bigint"?j(n):void 0,o=await e.request({method:"eth_feeHistory",params:[j(t),a||r,s]},{dedupe:!!a});return qx(o)}async function Kx(e,{filter:t}){const n=t.strict??!1,s=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(a=>Ht(a));return t.abi?sl({abi:t.abi,logs:s,strict:n}):s}function Wx(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:r}=n,s=n.address;if(!xe(s))throw new Oe({address:s});if(r<0)throw new Jr({chainId:r})}_l(e)}function Xx(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new B0;for(const n of t){const r=we(n),s=it(Yn(n,0,1));if(r!==32)throw new p5({hash:n,size:r});if(s!==P0)throw new f5({hash:n,version:s})}}_l(e)}function _l(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:s}=e;if(t<=0)throw new Jr({chainId:t});if(s&&!xe(s))throw new Oe({address:s});if(r&&r>or)throw new An({maxFeePerGas:r});if(n&&r&&n>r)throw new Kr({maxFeePerGas:r,maxPriorityFeePerGas:n})}function Zx(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:s,to:a}=e;if(t<=0)throw new Jr({chainId:t});if(a&&!xe(a))throw new Oe({address:a});if(n||s)throw new R("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>or)throw new An({maxFeePerGas:r})}function Qx(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:s,to:a}=e;if(a&&!xe(a))throw new Oe({address:a});if(typeof t<"u"&&t<=0)throw new Jr({chainId:t});if(n||s)throw new R("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>or)throw new An({maxFeePerGas:r})}function ga(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const{address:r,storageKeys:s}=e[n];for(let a=0;a<s.length;a++)if(s[a].length-2!==64)throw new U2({storageKey:s[a]});if(!xe(r,{strict:!1}))throw new Oe({address:r});t.push([r,s])}return t}function Ro(e,t){const n=Yc(e);return n==="eip1559"?e8(e,t):n==="eip2930"?t8(e,t):n==="eip4844"?Yx(e,t):n==="eip7702"?Jx(e,t):n8(e,t)}function Jx(e,t){const{authorizationList:n,chainId:r,gas:s,nonce:a,to:o,value:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:d,data:p}=e;Wx(e);const f=ga(d),m=r8(n);return ut(["0x04",Lt([j(r),a?j(a):"0x",l?j(l):"0x",c?j(c):"0x",s?j(s):"0x",o??"0x",i?j(i):"0x",p??"0x",f,m,...ts(e,t)])])}function Yx(e,t){const{chainId:n,gas:r,nonce:s,to:a,value:o,maxFeePerBlobGas:i,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:d,data:p}=e;Xx(e);let f=e.blobVersionedHashes,m=e.sidecars;if(e.blobs&&(typeof f>"u"||typeof m>"u")){const U=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(N=>Be(N)),k=e.kzg,D=Xc({blobs:U,kzg:k});if(typeof f>"u"&&(f=C0({commitments:D})),typeof m>"u"){const N=Zc({blobs:U,commitments:D,kzg:k});m=U0({blobs:U,commitments:D,proofs:N})}}const y=ga(d),g=[j(n),s?j(s):"0x",l?j(l):"0x",c?j(c):"0x",r?j(r):"0x",a??"0x",o?j(o):"0x",p??"0x",y,i?j(i):"0x",f??[],...ts(e,t)],P=[],B=[],v=[];if(m)for(let U=0;U<m.length;U++){const{blob:k,commitment:D,proof:N}=m[U];P.push(k),B.push(D),v.push(N)}return ut(["0x03",Lt(m?[g,P,B,v]:g)])}function e8(e,t){const{chainId:n,gas:r,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,data:d}=e;_l(e);const p=ga(l),f=[j(n),s?j(s):"0x",c?j(c):"0x",i?j(i):"0x",r?j(r):"0x",a??"0x",o?j(o):"0x",d??"0x",p,...ts(e,t)];return ut(["0x02",Lt(f)])}function t8(e,t){const{chainId:n,gas:r,data:s,nonce:a,to:o,value:i,accessList:c,gasPrice:l}=e;Zx(e);const d=ga(c),p=[j(n),a?j(a):"0x",l?j(l):"0x",r?j(r):"0x",o??"0x",i?j(i):"0x",s??"0x",d,...ts(e,t)];return ut(["0x01",Lt(p)])}function n8(e,t){const{chainId:n=0,gas:r,data:s,nonce:a,to:o,value:i,gasPrice:c}=e;Qx(e);let l=[a?j(a):"0x",c?j(c):"0x",r?j(r):"0x",o??"0x",i?j(i):"0x",s??"0x"];if(t){const d=(()=>{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 P2({v:t.v});return m})(),p=Qe(t.r),f=Qe(t.s);l=[...l,j(d),p==="0x00"?"0x":p,f==="0x00"?"0x":f]}else n>0&&(l=[...l,j(n),"0x","0x"]);return Lt(l)}function ts(e,t){const n=t??e,{v:r,yParity:s}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof r>"u"&&typeof s>"u")return[];const a=Qe(n.r),o=Qe(n.s);return[typeof s=="number"?s?j(1):"0x":r===0n?"0x":r===1n?j(1):r===27n?"0x":j(1),a==="0x00"?"0x":a,o==="0x00"?"0x":o]}function r8(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:r,nonce:s,...a}=n,o=n.address;t.push([r?ue(r):"0x",o,s?ue(s):"0x",...ts({},a)])}return t}async function s8({address:e,authorization:t,signature:n}){return Wr(wc(e),await mo({authorization:t,signature:n}))}const zo=new Lr(8192);function a8(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(zo.get(n))return zo.get(n);const r=e().finally(()=>zo.delete(n));return zo.set(n,r),r}function o8(e,t={}){return async(n,r={})=>{var p;const{dedupe:s=!1,methods:a,retryDelay:o=150,retryCount:i=3,uid:c}={...t,...r},{method:l}=n;if((p=a==null?void 0:a.exclude)!=null&&p.includes(l))throw new rr(new Error("method not supported"),{method:l});if(a!=null&&a.include&&!a.include.includes(l))throw new rr(new Error("method not supported"),{method:l});const d=s?Mr(`${c}.${Ae(n)}`):void 0;return a8(()=>Oo(async()=>{try{return await e(n)}catch(f){const m=f;switch(m.code){case $s.code:throw new $s(m);case Hs.code:throw new Hs(m);case Gs.code:throw new Gs(m,{method:n.method});case js.code:throw new js(m);case nr.code:throw new nr(m);case vn.code:throw new vn(m);case qs.code:throw new qs(m);case Vs.code:throw new Vs(m);case Ks.code:throw new Ks(m);case rr.code:throw new rr(m,{method:n.method});case Hr.code:throw new Hr(m);case Ws.code:throw new Ws(m);case Gr.code:throw new Gr(m);case Xs.code:throw new Xs(m);case Zs.code:throw new Zs(m);case Qs.code:throw new Qs(m);case Js.code:throw new Js(m);case Ys.code:throw new Ys(m);case jr.code:throw new jr(m);case ea.code:throw new ea(m);case ta.code:throw new ta(m);case na.code:throw new na(m);case ra.code:throw new ra(m);case sa.code:throw new sa(m);case qr.code:throw new qr(m);case 5e3:throw new Gr(m);default:throw f instanceof R?f:new N2(m)}}},{delay:({count:f,error:m})=>{var y;if(m&&m instanceof tr){const g=(y=m==null?void 0:m.headers)==null?void 0:y.get("Retry-After");if(g!=null&&g.match(/\d/))return Number.parseInt(g,10)*1e3}return~~(1<<f)*o},retryCount:i,shouldRetry:({error:f})=>i8(f)}),{enabled:s,id:d})}}function i8(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Hr.code||e.code===nr.code:e instanceof tr&&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}class c8 extends R{constructor({callbackSelector:t,cause:n,data:r,extraData:s,sender:a,urls:o}){var i;super(n.shortMessage||"An error occurred while fetching for an offchain result.",{cause:n,metaMessages:[...n.metaMessages||[],(i=n.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",o&&[" Gateway URL(s):",...o.map(c=>` ${Ls(c)}`)],` Sender: ${a}`,` Data: ${r}`,` Callback selector: ${t}`,` Extra data: ${s}`].flat(),name:"OffchainLookupError"})}}class l8 extends R{constructor({result:t,url:n}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Ls(n)}`,`Response: ${Ae(t)}`],name:"OffchainLookupResponseMalformedError"})}}class u8 extends R{constructor({sender:t,to:n}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${n}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"})}}const d8="0x556f1830",Of={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 p8(e,{blockNumber:t,blockTag:n,data:r,to:s}){const{args:a}=e0({data:r,abi:[Of]}),[o,i,c,l,d]=a,{ccipRead:p}=e,f=p&&typeof(p==null?void 0:p.request)=="function"?p.request:Df;try{if(!Wr(s,o))throw new u8({sender:o,to:s});const m=i.includes(ya)?await vf({data:c,ccipRequest:f}):await f({data:c,sender:o,urls:i}),{data:y}=await ma(e,{blockNumber:t,blockTag:n,data:lt([l,Cn([{type:"bytes"},{type:"bytes"}],[m,d])]),to:s});return y}catch(m){throw new c8({callbackSelector:l,cause:m,data:r,extraData:d,sender:o,urls:i})}}async function Df({data:e,sender:t,urls:n}){var s;let r=new Error("An unknown error occurred.");for(let a=0;a<n.length;a++){const o=n[a],i=o.includes("{data}")?"GET":"POST",c=i==="POST"?{data:e,sender:t}:void 0,l=i==="POST"?{"Content-Type":"application/json"}:{};try{const d=await fetch(o.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:l,method:i});let p;if((s=d.headers.get("Content-Type"))!=null&&s.startsWith("application/json")?p=(await d.json()).data:p=await d.text(),!d.ok){r=new tr({body:c,details:p!=null&&p.error?Ae(p.error):d.statusText,headers:d.headers,status:d.status,url:o});continue}if(!Tt(p)){r=new l8({result:p,url:o});continue}return p}catch(d){r=new tr({body:c,details:d.message,url:o})}}throw r}const f8=Object.freeze(Object.defineProperty({__proto__:null,ccipRequest:Df,offchainLookup:p8,offchainLookupAbiItem:Of,offchainLookupSignature:d8},Symbol.toStringTag,{value:"Module"}));function u(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(r){return s=>{const a=typeof s=="function"?s(r):s,o={...r,...a};return Object.assign(o,{extend:n(o)})}}return Object.assign(t,{extend:n(t)})}function m8(){return{}}function h8(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:r}){return new Promise((s,a)=>{(async()=>{let o;try{const i=new AbortController;n>0&&(o=setTimeout(()=>{r&&i.abort()},n)),s(await e({signal:(i==null?void 0:i.signal)||null}))}catch(i){(i==null?void 0:i.name)==="AbortError"&&a(t),a(i)}finally{clearTimeout(o)}})()})}function b8(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const Mf=b8();function y8(e,t={}){return{async request(n){var f;const{body:r,fetchFn:s=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:o=t.onResponse,timeout:i=t.timeout??1e4}=n,c={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:l,method:d,signal:p}=c;try{const m=await h8(async({signal:g})=>{const P={...c,body:Array.isArray(r)?Ae(r.map(k=>({jsonrpc:"2.0",id:k.id??Mf.take(),...k}))):Ae({jsonrpc:"2.0",id:r.id??Mf.take(),...r}),headers:{"Content-Type":"application/json",...l},method:d||"POST",signal:p||(i>0?g:null)},B=new Request(e,P),v=await(a==null?void 0:a(B,P))??{...P,url:e};return await s(v.url??e,v)},{errorInstance:new c0({body:r,url:e}),timeout:i,signal:!0});o&&await o(m);let y;if((f=m.headers.get("Content-Type"))!=null&&f.startsWith("application/json"))y=await m.json();else{y=await m.text();try{y=JSON.parse(y||"{}")}catch(g){if(m.ok)throw g;y={error:y}}}if(!m.ok)throw new tr({body:r,details:Ae(y.error)||m.statusText,headers:m.headers,status:m.status,url:e});return y}catch(m){throw m instanceof tr||m instanceof c0?m:new tr({body:r,cause:m,url:e})}}}}const x8=`Ethereum Signed Message:
105
+ `;function g8(e){const t=typeof e=="string"?Mr(e):typeof e.raw=="string"?e.raw:Be(e.raw),n=Mr(`${x8}${we(t)}`);return lt([n,t])}function _f(e,t){return Re(g8(e),t)}class w8 extends R{constructor({domain:t}){super(`Invalid domain "${Ae(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class E8 extends R{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class k8 extends R{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function C8(e){const{domain:t,message:n,primaryType:r,types:s}=e,a=(c,l)=>{const d={...l};for(const p of c){const{name:f,type:m}=p;m==="address"&&(d[f]=d[f].toLowerCase())}return d},o=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},i=(()=>{if(r!=="EIP712Domain")return a(s[r],n)})();return Ae({domain:o,message:i,primaryType:r,types:s})}function Nf(e){const{domain:t,message:n,primaryType:r,types:s}=e,a=(o,i)=>{for(const c of o){const{name:l,type:d}=c,p=i[l],f=d.match(jp);if(f&&(typeof p=="number"||typeof p=="bigint")){const[g,P,B]=f;j(p,{signed:P==="int",size:Number.parseInt(B,10)/8})}if(d==="address"&&typeof p=="string"&&!xe(p))throw new Oe({address:p});const m=d.match(Y6);if(m){const[g,P]=m;if(P&&we(p)!==Number.parseInt(P,10))throw new r6({expectedSize:Number.parseInt(P,10),givenSize:we(p)})}const y=s[d];y&&(v8(d),a(y,p))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new w8({domain:t});a(s.EIP712Domain,t)}if(r!=="EIP712Domain")if(s[r])a(s[r],n);else throw new E8({primaryType:r,types:s})}function Rf({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"||typeof(e==null?void 0:e.chainId)=="bigint")&&{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)}function v8(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new k8({type:e})}function A8(e){const{domain:t={},message:n,primaryType:r}=e,s={EIP712Domain:Rf({domain:t}),...e.types};Nf({domain:t,message:n,primaryType:r,types:s});const a=["0x1901"];return t&&a.push(T8({domain:t,types:s})),r!=="EIP712Domain"&&a.push(zf({data:n,primaryType:r,types:s})),Re(lt(a))}function T8({domain:e,types:t}){return zf({data:e,primaryType:"EIP712Domain",types:t})}function zf({data:e,primaryType:t,types:n}){const r=Lf({data:e,primaryType:t,types:n});return Re(r)}function Lf({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],s=[S8({primaryType:t,types:n})];for(const a of n[t]){const[o,i]=Hf({types:n,name:a.name,type:a.type,value:e[a.name]});r.push(o),s.push(i)}return Cn(r,s)}function S8({primaryType:e,types:t}){const n=ue(P8({primaryType:e,types:t}));return Re(n)}function P8({primaryType:e,types:t}){let n="";const r=$f({primaryType:e,types:t});r.delete(e);const s=[e,...Array.from(r).sort()];for(const a of s)n+=`${a}(${t[a].map(({name:o,type:i})=>`${i} ${o}`).join(",")})`;return n}function $f({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),s=r==null?void 0:r[0];if(n.has(s)||t[s]===void 0)return n;n.add(s);for(const a of t[s])$f({primaryType:a.type,types:t},n);return n}function Hf({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},Re(Lf({data:r,primaryType:n,types:e}))];if(n==="bytes")return[{type:"bytes32"},Re(r)];if(n==="string")return[{type:"bytes32"},Re(ue(r))];if(n.lastIndexOf("]")===n.length-1){const s=n.slice(0,n.lastIndexOf("[")),a=r.map(o=>Hf({name:t,type:s,types:e,value:o}));return[{type:"bytes32"},Re(Cn(a.map(([o])=>o),a.map(([,o])=>o)))]}return[{type:n},r]}class B8 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 Nl={checksum:new B8(8192)}.checksum;function wa(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=zp(fl(e));return n==="Bytes"?r:Me(r)}function U8(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=E0(fl(e));return n==="Bytes"?r:Me(r)}function I8(e){return Ut(e)&&Te(e)===32}function Gf(e,t={}){const{compressed:n}=t,{prefix:r,x:s,y:a}=e;if(n===!1||typeof s=="bigint"&&typeof a=="bigint"){if(r!==4)throw new qf({prefix:r,cause:new N8});return}if(n===!0||typeof s=="bigint"&&typeof a>"u"){if(r!==3&&r!==2)throw new qf({prefix:r,cause:new _8});return}throw new M8({publicKey:e})}function F8(e){const t=(()=>{if(Ut(e))return jf(e);if(L5(e))return O8(e);const{prefix:n,x:r,y:s}=e;return typeof r=="bigint"&&typeof s=="bigint"?{prefix:n??4,x:r,y:s}:{prefix:n,x:r}})();return Gf(t),t}function O8(e){return jf(Me(e))}function jf(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new R8({publicKey:e});if(e.length===130){const r=BigInt(ce(e,0,32)),s=BigInt(ce(e,32,64));return{prefix:4,x:r,y:s}}if(e.length===132){const r=Number(ce(e,0,1)),s=BigInt(ce(e,1,33)),a=BigInt(ce(e,33,65));return{prefix:r,x:s,y:a}}const t=Number(ce(e,0,1)),n=BigInt(ce(e,1,33));return{prefix:t,x:n}}function D8(e,t={}){return In(Rl(e,t))}function Rl(e,t={}){Gf(e);const{prefix:n,x:r,y:s}=e,{includePrefix:a=!0}=t;return ke(a?V(n,{size:1}):"0x",V(r,{size:32}),typeof s=="bigint"?V(s,{size:32}):"0x")}class M8 extends X{constructor({publicKey:t}){super(`Value \`${da(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class qf extends X{constructor({prefix:t,cause:n}){super(`Prefix "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class _8 extends X{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class N8 extends X{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let R8=class extends X{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${Te(So(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const z8=/^0x[a-fA-F0-9]{40}$/;function Ft(e,t={}){const{strict:n=!0}=t;if(!z8.test(e))throw new Vf({address:e,cause:new $8});if(n){if(e.toLowerCase()===e)return;if(zl(e)!==e)throw new Vf({address:e,cause:new H8})}}function zl(e){if(Nl.has(e))return Nl.get(e);Ft(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=wa(q0(t),{as:"Bytes"}),r=t.split("");for(let a=0;a<40;a+=2)n[a>>1]>>4>=8&&r[a]&&(r[a]=r[a].toUpperCase()),(n[a>>1]&15)>=8&&r[a+1]&&(r[a+1]=r[a+1].toUpperCase());const s=`0x${r.join("")}`;return Nl.set(e,s),s}function L8(e,t={}){const{checksum:n=!1}=t;return Ft(e),n?zl(e):e}function Lo(e,t={}){const n=wa(`0x${Rl(e).slice(4)}`).substring(26);return L8(`0x${n}`,t)}function Ll(e,t){return Ft(e,{strict:!1}),Ft(t,{strict:!1}),e.toLowerCase()===t.toLowerCase()}function $o(e,t={}){const{strict:n=!0}=t??{};try{return Ft(e,{strict:n}),!0}catch{return!1}}class Vf extends X{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class $8 extends X{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class H8 extends X{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const G8=/^(.*)\[([0-9]*)\]$/,j8=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Kf=/^(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)?$/,Wf=2n**256n-1n;function ns(e,t,n){const{checksumAddress:r,staticPosition:s}=n,a=jl(t.type);if(a){const[o,i]=a;return V8(e,{...t,type:i},{checksumAddress:r,length:o,staticPosition:s})}if(t.type==="tuple")return Z8(e,t,{checksumAddress:r,staticPosition:s});if(t.type==="address")return q8(e,{checksum:r});if(t.type==="bool")return K8(e);if(t.type.startsWith("bytes"))return W8(e,t,{staticPosition:s});if(t.type.startsWith("uint")||t.type.startsWith("int"))return X8(e,t);if(t.type==="string")return Q8(e,{staticPosition:s});throw new Wl(t.type)}const Xf=32,$l=32;function q8(e,t={}){const{checksum:n=!1}=t,r=e.readBytes(32);return[(a=>n?zl(a):a)(Me(_5(r,-20))),32]}function V8(e,t,n){const{checksumAddress:r,length:s,staticPosition:a}=n;if(!s){const c=on(e.readBytes($l)),l=a+c,d=l+Xf;e.setPosition(l);const p=on(e.readBytes(Xf)),f=Ea(t);let m=0;const y=[];for(let g=0;g<p;++g){e.setPosition(d+(f?g*32:m));const[P,B]=ns(e,t,{checksumAddress:r,staticPosition:d});m+=B,y.push(P)}return e.setPosition(a+32),[y,32]}if(Ea(t)){const c=on(e.readBytes($l)),l=a+c,d=[];for(let p=0;p<s;++p){e.setPosition(l+p*32);const[f]=ns(e,t,{checksumAddress:r,staticPosition:l});d.push(f)}return e.setPosition(a+32),[d,32]}let o=0;const i=[];for(let c=0;c<s;++c){const[l,d]=ns(e,t,{checksumAddress:r,staticPosition:a+o});o+=d,i.push(l)}return[i,o]}function K8(e){return[R5(e.readBytes(32),{size:32}),32]}function W8(e,t,{staticPosition:n}){const[r,s]=t.type.split("bytes");if(!s){const o=on(e.readBytes(32));e.setPosition(n+o);const i=on(e.readBytes(32));if(i===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(i);return e.setPosition(n+32),[Me(c),32]}return[Me(e.readBytes(Number.parseInt(s,10),32)),32]}function X8(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[r>48?N5(s,{signed:n}):on(s,{signed:n}),32]}function Z8(e,t,n){const{checksumAddress:r,staticPosition:s}=n,a=t.components.length===0||t.components.some(({name:c})=>!c),o=a?[]:{};let i=0;if(Ea(t)){const c=on(e.readBytes($l)),l=s+c;for(let d=0;d<t.components.length;++d){const p=t.components[d];e.setPosition(l+i);const[f,m]=ns(e,p,{checksumAddress:r,staticPosition:l});i+=m,o[a?d:p==null?void 0:p.name]=f}return e.setPosition(s+32),[o,32]}for(let c=0;c<t.components.length;++c){const l=t.components[c],[d,p]=ns(e,l,{checksumAddress:r,staticPosition:s});o[a?c:l==null?void 0:l.name]=d,i+=p}return[o,i]}function Q8(e,{staticPosition:t}){const n=on(e.readBytes(32)),r=t+n;e.setPosition(r);const s=on(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),o=z5(V0(a));return e.setPosition(t+32),[o,32]}function J8({checksumAddress:e,parameters:t,values:n}){const r=[];for(let s=0;s<t.length;s++)r.push(Hl({checksumAddress:e,parameter:t[s],value:n[s]}));return r}function Hl({checksumAddress:e=!1,parameter:t,value:n}){const r=t,s=jl(r.type);if(s){const[a,o]=s;return eg(n,{checksumAddress:e,length:a,parameter:{...r,type:o}})}if(r.type==="tuple")return ag(n,{checksumAddress:e,parameter:r});if(r.type==="address")return Y8(n,{checksum:e});if(r.type==="bool")return ng(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const a=r.type.startsWith("int"),[,,o="256"]=Kf.exec(r.type)??[];return rg(n,{signed:a,size:Number(o)})}if(r.type.startsWith("bytes"))return tg(n,{type:r.type});if(r.type==="string")return sg(n);throw new Wl(r.type)}function Gl(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?t+=32:t+=Te(i)}const n=[],r=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:o,encoded:i}=e[a];o?(n.push(V(t+s,{size:32})),r.push(i),s+=Te(i)):n.push(i)}return ke(...n,...r)}function Y8(e,t){const{checksum:n=!1}=t;return Ft(e,{strict:n}),{dynamic:!1,encoded:ur(e.toLowerCase())}}function eg(e,t){const{checksumAddress:n,length:r,parameter:s}=t,a=r===null;if(!Array.isArray(e))throw new fg(e);if(!a&&e.length!==r)throw new pg({expectedLength:r,givenLength:e.length,type:`${s.type}[${r}]`});let o=!1;const i=[];for(let c=0;c<e.length;c++){const l=Hl({checksumAddress:n,parameter:s,value:e[c]});l.dynamic&&(o=!0),i.push(l)}if(a||o){const c=Gl(i);if(a){const l=V(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?ke(l,c):l}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:ke(...i.map(({encoded:c})=>c))}}function tg(e,{type:t}){const[,n]=t.split("bytes"),r=Te(e);if(!n){let s=e;return r%32!==0&&(s=dr(s,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:ke(ur(V(r,{size:32})),s)}}if(r!==Number.parseInt(n,10))throw new Jf({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:dr(e)}}function ng(e){if(typeof e!="boolean")throw new X(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:ur(W0(e))}}function rg(e,{signed:t,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,s=t?-r-1n:0n;if(e>r||e<s)throw new Q0({max:r.toString(),min:s.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:V(e,{size:32,signed:t})}}function sg(e){const t=pa(e),n=Math.ceil(Te(t)/32),r=[];for(let s=0;s<n;s++)r.push(dr(ce(t,s*32,(s+1)*32)));return{dynamic:!0,encoded:ke(dr(V(Te(t),{size:32})),...r)}}function ag(e,t){const{checksumAddress:n,parameter:r}=t;let s=!1;const a=[];for(let o=0;o<r.components.length;o++){const i=r.components[o],c=Array.isArray(e)?o:i.name,l=Hl({checksumAddress:n,parameter:i,value:e[c]});a.push(l),l.dynamic&&(s=!0)}return{dynamic:s,encoded:s?Gl(a):ke(...a.map(({encoded:o})=>o))}}function jl(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Ea(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(Ea);const n=jl(e.type);return!!(n&&Ea({...e,type:n[1]}))}const og={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 cg({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new ig({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Zf({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 Zf({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 ql(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(og);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}class Zf extends X{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class ig extends X{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class cg extends X{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function lg(e,t,n={}){const{as:r="Array",checksumAddress:s=!1}=n,a=typeof t=="string"?In(t):t,o=ql(a);if(Qr(a)===0&&e.length>0)throw new dg;if(Qr(a)&&Qr(a)<32)throw new ug({data:typeof t=="string"?t:Me(t),parameters:e,size:Qr(a)});let i=0;const c=r==="Array"?[]:{};for(let l=0;l<e.length;++l){const d=e[l];o.setPosition(i);const[p,f]=ns(o,d,{checksumAddress:s,staticPosition:0});i+=f,r==="Array"?c.push(p):c[d.name??l]=p}return c}function Vl(e,t,n){const{checksumAddress:r=!1}={};if(e.length!==t.length)throw new Yf({expectedLength:e.length,givenLength:t.length});const s=J8({checksumAddress:r,parameters:e,values:t}),a=Gl(s);return a.length===0?"0x":a}function Kl(e,t){if(e.length!==t.length)throw new Yf({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const s=e[r],a=t[r];n.push(Kl.encode(s,a))}return ke(...n)}(function(e){function t(n,r,s=!1){if(n==="address"){const c=r;return Ft(c),ur(c.toLowerCase(),s?32:0)}if(n==="string")return pa(r);if(n==="bytes")return r;if(n==="bool")return ur(W0(r),s?32:1);const a=n.match(Kf);if(a){const[c,l,d="256"]=a,p=Number.parseInt(d,10)/8;return V(r,{size:s?32:p,signed:l==="int"})}const o=n.match(j8);if(o){const[c,l]=o;if(Number.parseInt(l,10)!==(r.length-2)/2)throw new Jf({expectedSize:Number.parseInt(l,10),value:r});return dr(r,s?32:0)}const i=n.match(G8);if(i&&Array.isArray(r)){const[c,l]=i,d=[];for(let p=0;p<r.length;p++)d.push(t(l,r[p],!0));return d.length===0?"0x":ke(...d)}throw new Wl(n)}e.encode=t})(Kl||(Kl={}));function Qf(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?dp(e):e}class ug extends X{constructor({data:t,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Fr(n)})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class dg extends X{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class pg extends X{constructor({expectedLength:t,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class Jf extends X{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Te(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Yf extends X{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
106
+ `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class fg extends X{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class Wl extends X{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function mg(e){return hg(e,"Hex")}function hg(e,t){const n=t,r=(()=>{if(typeof e=="string"){if(e.length>3&&e.length%2!==0)throw new K5(e);return In(e)}return e})(),s=ql(r,{recursiveReadLimit:Number.POSITIVE_INFINITY});return em(s,n)}function em(e,t="Hex"){if(e.bytes.length===0)return t==="Hex"?Me(e.bytes):e.bytes;const n=e.readByte();if(n<128&&e.decrementPosition(1),n<192){const s=tm(e,n,128),a=e.readBytes(s);return t==="Hex"?Me(a):a}const r=tm(e,n,192);return bg(e,r,t)}function tm(e,t,n){if(n===128&&t<128)return 1;if(t<=n+55)return t-n;if(t===n+55+1)return e.readUint8();if(t===n+55+2)return e.readUint16();if(t===n+55+3)return e.readUint24();if(t===n+55+4)return e.readUint32();throw new X("Invalid RLP prefix")}function bg(e,t,n){const r=e.position,s=[];for(;e.position-r<t;)s.push(em(e,n));return s}function yg(e,t){const{as:n}=t,r=nm(e),s=ql(new Uint8Array(r.length));return r.encode(s),n==="Hex"?Me(s.bytes):s.bytes}function xg(e,t={}){const{as:n="Hex"}=t;return yg(e,{as:n})}function nm(e){return Array.isArray(e)?gg(e.map(t=>nm(t))):wg(e)}function gg(e){const t=e.reduce((s,a)=>s+a.length,0),n=rm(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function wg(e){const t=typeof e=="string"?In(e):e,n=rm(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function rm(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new X("Length is too large.")}class sm extends yc{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,U6(t);const r=co(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 s=this.blockLen,a=new Uint8Array(s);a.set(r.length>s?t.create().update(r).digest():r);for(let o=0;o<a.length;o++)a[o]^=54;this.iHash.update(a),this.oHash=t.create();for(let o=0;o<a.length;o++)a[o]^=106;this.oHash.update(a),kn(a)}update(t){return zr(this),this.iHash.update(t),this}digestInto(t){zr(this),Jn(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:s,destroyed:a,blockLen:o,outputLen:i}=this;return t=t,t.finished=s,t.destroyed=a,t.blockLen=o,t.outputLen=i,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const am=(e,t,n)=>new sm(e,t).update(n).digest();am.create=(e,t)=>new sm(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const et=BigInt(0),Ve=BigInt(1),fr=BigInt(2),Eg=BigInt(3),om=BigInt(4),im=BigInt(5),cm=BigInt(8);function tt(e,t){const n=e%t;return n>=et?n:t+n}function wt(e,t,n){let r=e;for(;t-- >et;)r*=r,r%=n;return r}function Xl(e,t){if(e===et)throw new Error("invert: expected non-zero number");if(t<=et)throw new Error("invert: expected positive modulus, got "+t);let n=tt(e,t),r=t,s=et,a=Ve;for(;n!==et;){const i=r/n,c=r%n,l=s-a*i;r=n,n=c,s=a,a=l}if(r!==Ve)throw new Error("invert: does not exist");return tt(s,t)}function lm(e,t){const n=(e.ORDER+Ve)/om,r=e.pow(t,n);if(!e.eql(e.sqr(r),t))throw new Error("Cannot find square root");return r}function kg(e,t){const n=(e.ORDER-im)/cm,r=e.mul(t,fr),s=e.pow(r,n),a=e.mul(t,s),o=e.mul(e.mul(a,fr),s),i=e.mul(a,e.sub(o,e.ONE));if(!e.eql(e.sqr(i),t))throw new Error("Cannot find square root");return i}function Cg(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-Ve,n=0;for(;t%fr===et;)t/=fr,n++;let r=fr;const s=rs(e);for(;dm(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return lm;let a=s.pow(r,t);const o=(t+Ve)/fr;return function(c,l){if(c.is0(l))return l;if(dm(c,l)!==1)throw new Error("Cannot find square root");let d=n,p=c.mul(c.ONE,a),f=c.pow(l,t),m=c.pow(l,o);for(;!c.eql(f,c.ONE);){if(c.is0(f))return c.ZERO;let y=1,g=c.sqr(f);for(;!c.eql(g,c.ONE);)if(y++,g=c.sqr(g),y===d)throw new Error("Cannot find square root");const P=Ve<<BigInt(d-y-1),B=c.pow(p,P);d=y,p=c.sqr(B),f=c.mul(f,p),m=c.mul(m,B)}return m}}function vg(e){return e%om===Eg?lm:e%cm===im?kg:Cg(e)}const Ag=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Tg(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=Ag.reduce((r,s)=>(r[s]="function",r),t);return vo(e,n)}function Sg(e,t,n){if(n<et)throw new Error("invalid exponent, negatives unsupported");if(n===et)return e.ONE;if(n===Ve)return t;let r=e.ONE,s=t;for(;n>et;)n&Ve&&(r=e.mul(r,s)),s=e.sqr(s),n>>=Ve;return r}function um(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),s=t.reduce((o,i,c)=>e.is0(i)?o:(r[c]=o,e.mul(o,i)),e.ONE),a=e.inv(s);return t.reduceRight((o,i,c)=>e.is0(i)?o:(r[c]=e.mul(o,r[c]),e.mul(o,i)),a),r}function dm(e,t){const n=(e.ORDER-Ve)/fr,r=e.pow(t,n),s=e.eql(r,e.ONE),a=e.eql(r,e.ZERO),o=e.eql(r,e.neg(e.ONE));if(!s&&!a&&!o)throw new Error("invalid Legendre symbol result");return s?1:a?0:-1}function pm(e,t){t!==void 0&&Fs(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function rs(e,t,n=!1,r={}){if(e<=et)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:a}=pm(e,t);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let o;const i=Object.freeze({ORDER:e,isLE:n,BITS:s,BYTES:a,MASK:Co(s),ZERO:et,ONE:Ve,create:c=>tt(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return et<=c&&c<e},is0:c=>c===et,isOdd:c=>(c&Ve)===Ve,neg:c=>tt(-c,e),eql:(c,l)=>c===l,sqr:c=>tt(c*c,e),add:(c,l)=>tt(c+l,e),sub:(c,l)=>tt(c-l,e),mul:(c,l)=>tt(c*l,e),pow:(c,l)=>Sg(i,c,l),div:(c,l)=>tt(c*Xl(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Xl(c,e),sqrt:r.sqrt||(c=>(o||(o=vg(e)),o(i,c))),toBytes:c=>n?R0(c,a):ua(c,a),fromBytes:c=>{if(c.length!==a)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+c.length);return n?N0(c):lr(c)},invertBatch:c=>um(i,c),cmov:(c,l,d)=>d?l:c});return Object.freeze(i)}function fm(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 mm(e){const t=fm(e);return t+Math.ceil(t/2)}function Pg(e,t,n=!1){const r=e.length,s=fm(t),a=mm(t);if(r<16||r<a||r>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+r);const o=n?N0(e):lr(e),i=tt(o,t-Ve)+Ve;return n?R0(i,s):ua(i,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const hm=BigInt(0),Zl=BigInt(1);function Ql(e,t){const n=t.negate();return e?n:t}function bm(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Jl(e,t){bm(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),s=2**e,a=Co(e),o=BigInt(e);return{windows:n,windowSize:r,mask:a,maxNumber:s,shiftBy:o}}function ym(e,t,n){const{windowSize:r,mask:s,maxNumber:a,shiftBy:o}=n;let i=Number(e&s),c=e>>o;i>r&&(i-=a,c+=Zl);const l=t*r,d=l+Math.abs(i)-1,p=i===0,f=i<0,m=t%2!==0;return{nextN:c,offset:d,isZero:p,isNeg:f,isNegF:m,offsetF:l}}function Bg(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function Ug(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const Yl=new WeakMap,xm=new WeakMap;function eu(e){return xm.get(e)||1}function Ig(e,t){return{constTimeNegate:Ql,hasPrecomputes(n){return eu(n)!==1},unsafeLadder(n,r,s=e.ZERO){let a=n;for(;r>hm;)r&Zl&&(s=s.add(a)),a=a.double(),r>>=Zl;return s},precomputeWindow(n,r){const{windows:s,windowSize:a}=Jl(r,t),o=[];let i=n,c=i;for(let l=0;l<s;l++){c=i,o.push(c);for(let d=1;d<a;d++)c=c.add(i),o.push(c);i=c.double()}return o},wNAF(n,r,s){let a=e.ZERO,o=e.BASE;const i=Jl(n,t);for(let c=0;c<i.windows;c++){const{nextN:l,offset:d,isZero:p,isNeg:f,isNegF:m,offsetF:y}=ym(s,c,i);s=l,p?o=o.add(Ql(m,r[y])):a=a.add(Ql(f,r[d]))}return{p:a,f:o}},wNAFUnsafe(n,r,s,a=e.ZERO){const o=Jl(n,t);for(let i=0;i<o.windows&&s!==hm;i++){const{nextN:c,offset:l,isZero:d,isNeg:p}=ym(s,i,o);if(s=c,!d){const f=r[l];a=a.add(p?f.negate():f)}}return a},getPrecomputes(n,r,s){let a=Yl.get(r);return a||(a=this.precomputeWindow(r,n),n!==1&&Yl.set(r,s(a))),a},wNAFCached(n,r,s){const a=eu(n);return this.wNAF(a,this.getPrecomputes(a,n,s),r)},wNAFCachedUnsafe(n,r,s,a){const o=eu(n);return o===1?this.unsafeLadder(n,r,a):this.wNAFUnsafe(o,this.getPrecomputes(o,n,s),r,a)},setWindowSize(n,r){bm(r,t),xm.set(n,r),Yl.delete(n)}}}function Fg(e,t,n,r){Bg(n,e),Ug(r,t);const s=n.length,a=r.length;if(s!==a)throw new Error("arrays of points and scalars must have equal length");const o=e.ZERO,i=g5(BigInt(s));let c=1;i>12?c=i-3:i>4?c=i-2:i>0&&(c=2);const l=Co(c),d=new Array(Number(l)+1).fill(o),p=Math.floor((t.BITS-1)/c)*c;let f=o;for(let m=p;m>=0;m-=c){d.fill(o);for(let g=0;g<a;g++){const P=r[g],B=Number(P>>BigInt(m)&l);d[B]=d[B].add(n[g])}let y=o;for(let g=d.length-1,P=o;g>0;g--)P=P.add(d[g]),y=y.add(P);if(f=f.add(y),m!==0)for(let g=0;g<c;g++)f=f.double()}return f}function gm(e){return Tg(e.Fp),vo(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...pm(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function wm(e){e.lowS!==void 0&&ca("lowS",e.lowS),e.prehash!==void 0&&ca("prehash",e.prehash)}function Og(e){const t=gm(e);vo(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:r,a:s}=t;if(n){if(!r.eql(s,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class Dg extends Error{constructor(t=""){super(t)}}const un={Err:Dg,_tlv:{encode:(e,t)=>{const{Err:n}=un;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,s=wo(r);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const a=r>127?wo(s.length/2|128):"";return wo(e)+a+s+t},decode(e,t){const{Err:n}=un;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 s=t[r++],a=!!(s&128);let o=0;if(!a)o=s;else{const c=s&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const l=t.subarray(r,r+c);if(l.length!==c)throw new n("tlv.decode: length bytes not complete");if(l[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const d of l)o=o<<8|d;if(r+=c,o<128)throw new n("tlv.decode(long): not minimal encoding")}const i=t.subarray(r,r+o);if(i.length!==o)throw new n("tlv.decode: wrong value length");return{v:i,l:t.subarray(r+o)}}},_int:{encode(e){const{Err:t}=un;if(e<dn)throw new t("integer: negative integers are not allowed");let n=wo(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=un;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return lr(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=un,s=gt("signature",e),{v:a,l:o}=r.decode(48,s);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:i,l:c}=r.decode(2,a),{v:l,l:d}=r.decode(2,c);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(i),s:n.decode(l)}},hexFromSig(e){const{_tlv:t,_int:n}=un,r=t.encode(2,n.encode(e.r)),s=t.encode(2,n.encode(e.s)),a=r+s;return t.encode(48,a)}};function tu(e,t){return la(ua(e,t))}const dn=BigInt(0),_e=BigInt(1);BigInt(2);const nu=BigInt(3),Mg=BigInt(4);function _g(e){const t=Og(e),{Fp:n}=t,r=rs(t.n,t.nBitLength),s=t.toBytes||((U,k,D)=>{const N=k.toAffine();return ko(Uint8Array.from([4]),n.toBytes(N.x),n.toBytes(N.y))}),a=t.fromBytes||(U=>{const k=U.subarray(1),D=n.fromBytes(k.subarray(0,n.BYTES)),N=n.fromBytes(k.subarray(n.BYTES,2*n.BYTES));return{x:D,y:N}});function o(U){const{a:k,b:D}=t,N=n.sqr(U),_=n.mul(N,U);return n.add(n.add(_,n.mul(U,k)),D)}function i(U,k){const D=n.sqr(k),N=o(U);return n.eql(D,N)}if(!i(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const c=n.mul(n.pow(t.a,nu),Mg),l=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(c,l)))throw new Error("bad curve params: a or b");function d(U){return dl(U,_e,t.n)}function p(U){const{allowedPrivateKeyLengths:k,nByteLength:D,wrapPrivateKey:N,n:_}=t;if(k&&typeof U!="bigint"){if(ia(U)&&(U=la(U)),typeof U!="string"||!k.includes(U.length))throw new Error("invalid private key");U=U.padStart(D*2,"0")}let h;try{h=typeof U=="bigint"?U:lr(gt("private key",U,D))}catch{throw new Error("invalid private key, expected hex or "+D+" bytes, got "+typeof U)}return N&&(h=tt(h,_)),Xr("private key",h,_e,_),h}function f(U){if(!(U instanceof g))throw new Error("ProjectivePoint expected")}const m=L0((U,k)=>{const{px:D,py:N,pz:_}=U;if(n.eql(_,n.ONE))return{x:D,y:N};const h=U.is0();k==null&&(k=h?n.ONE:n.inv(_));const b=n.mul(D,k),x=n.mul(N,k),C=n.mul(_,k);if(h)return{x:n.ZERO,y:n.ZERO};if(!n.eql(C,n.ONE))throw new Error("invZ was invalid");return{x:b,y:x}}),y=L0(U=>{if(U.is0()){if(t.allowInfinityPoint&&!n.is0(U.py))return;throw new Error("bad point: ZERO")}const{x:k,y:D}=U.toAffine();if(!n.isValid(k)||!n.isValid(D))throw new Error("bad point: x or y not FE");if(!i(k,D))throw new Error("bad point: equation left != right");if(!U.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(k,D,N){if(k==null||!n.isValid(k))throw new Error("x required");if(D==null||!n.isValid(D)||n.is0(D))throw new Error("y required");if(N==null||!n.isValid(N))throw new Error("z required");this.px=k,this.py=D,this.pz=N,Object.freeze(this)}static fromAffine(k){const{x:D,y:N}=k||{};if(!k||!n.isValid(D)||!n.isValid(N))throw new Error("invalid affine point");if(k instanceof g)throw new Error("projective point not allowed");const _=h=>n.eql(h,n.ZERO);return _(D)&&_(N)?g.ZERO:new g(D,N,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(k){const D=um(n,k.map(N=>N.pz));return k.map((N,_)=>N.toAffine(D[_])).map(g.fromAffine)}static fromHex(k){const D=g.fromAffine(a(gt("pointHex",k)));return D.assertValidity(),D}static fromPrivateKey(k){return g.BASE.multiply(p(k))}static msm(k,D){return Fg(g,r,k,D)}_setWindowSize(k){v.setWindowSize(this,k)}assertValidity(){y(this)}hasEvenY(){const{y:k}=this.toAffine();if(n.isOdd)return!n.isOdd(k);throw new Error("Field doesn't support isOdd")}equals(k){f(k);const{px:D,py:N,pz:_}=this,{px:h,py:b,pz:x}=k,C=n.eql(n.mul(D,x),n.mul(h,_)),E=n.eql(n.mul(N,x),n.mul(b,_));return C&&E}negate(){return new g(this.px,n.neg(this.py),this.pz)}double(){const{a:k,b:D}=t,N=n.mul(D,nu),{px:_,py:h,pz:b}=this;let x=n.ZERO,C=n.ZERO,E=n.ZERO,T=n.mul(_,_),O=n.mul(h,h),w=n.mul(b,b),A=n.mul(_,h);return A=n.add(A,A),E=n.mul(_,b),E=n.add(E,E),x=n.mul(k,E),C=n.mul(N,w),C=n.add(x,C),x=n.sub(O,C),C=n.add(O,C),C=n.mul(x,C),x=n.mul(A,x),E=n.mul(N,E),w=n.mul(k,w),A=n.sub(T,w),A=n.mul(k,A),A=n.add(A,E),E=n.add(T,T),T=n.add(E,T),T=n.add(T,w),T=n.mul(T,A),C=n.add(C,T),w=n.mul(h,b),w=n.add(w,w),T=n.mul(w,A),x=n.sub(x,T),E=n.mul(w,O),E=n.add(E,E),E=n.add(E,E),new g(x,C,E)}add(k){f(k);const{px:D,py:N,pz:_}=this,{px:h,py:b,pz:x}=k;let C=n.ZERO,E=n.ZERO,T=n.ZERO;const O=t.a,w=n.mul(t.b,nu);let A=n.mul(D,h),F=n.mul(N,b),S=n.mul(_,x),M=n.add(D,N),$=n.add(h,b);M=n.mul(M,$),$=n.add(A,F),M=n.sub(M,$),$=n.add(D,_);let q=n.add(h,x);return $=n.mul($,q),q=n.add(A,S),$=n.sub($,q),q=n.add(N,_),C=n.add(b,x),q=n.mul(q,C),C=n.add(F,S),q=n.sub(q,C),T=n.mul(O,$),C=n.mul(w,S),T=n.add(C,T),C=n.sub(F,T),T=n.add(F,T),E=n.mul(C,T),F=n.add(A,A),F=n.add(F,A),S=n.mul(O,S),$=n.mul(w,$),F=n.add(F,S),S=n.sub(A,S),S=n.mul(O,S),$=n.add($,S),A=n.mul(F,$),E=n.add(E,A),A=n.mul(q,$),C=n.mul(M,C),C=n.sub(C,A),A=n.mul(M,F),T=n.mul(q,T),T=n.add(T,A),new g(C,E,T)}subtract(k){return this.add(k.negate())}is0(){return this.equals(g.ZERO)}wNAF(k){return v.wNAFCached(this,k,g.normalizeZ)}multiplyUnsafe(k){const{endo:D,n:N}=t;Xr("scalar",k,dn,N);const _=g.ZERO;if(k===dn)return _;if(this.is0()||k===_e)return this;if(!D||v.hasPrecomputes(this))return v.wNAFCachedUnsafe(this,k,g.normalizeZ);let{k1neg:h,k1:b,k2neg:x,k2:C}=D.splitScalar(k),E=_,T=_,O=this;for(;b>dn||C>dn;)b&_e&&(E=E.add(O)),C&_e&&(T=T.add(O)),O=O.double(),b>>=_e,C>>=_e;return h&&(E=E.negate()),x&&(T=T.negate()),T=new g(n.mul(T.px,D.beta),T.py,T.pz),E.add(T)}multiply(k){const{endo:D,n:N}=t;Xr("scalar",k,_e,N);let _,h;if(D){const{k1neg:b,k1:x,k2neg:C,k2:E}=D.splitScalar(k);let{p:T,f:O}=this.wNAF(x),{p:w,f:A}=this.wNAF(E);T=v.constTimeNegate(b,T),w=v.constTimeNegate(C,w),w=new g(n.mul(w.px,D.beta),w.py,w.pz),_=T.add(w),h=O.add(A)}else{const{p:b,f:x}=this.wNAF(k);_=b,h=x}return g.normalizeZ([_,h])[0]}multiplyAndAddUnsafe(k,D,N){const _=g.BASE,h=(x,C)=>C===dn||C===_e||!x.equals(_)?x.multiplyUnsafe(C):x.multiply(C),b=h(this,D).add(h(k,N));return b.is0()?void 0:b}toAffine(k){return m(this,k)}isTorsionFree(){const{h:k,isTorsionFree:D}=t;if(k===_e)return!0;if(D)return D(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:k,clearCofactor:D}=t;return k===_e?this:D?D(g,this):this.multiplyUnsafe(t.h)}toRawBytes(k=!0){return ca("isCompressed",k),this.assertValidity(),s(g,this,k)}toHex(k=!0){return ca("isCompressed",k),la(this.toRawBytes(k))}}g.BASE=new g(t.Gx,t.Gy,n.ONE),g.ZERO=new g(n.ZERO,n.ONE,n.ZERO);const{endo:P,nBitLength:B}=t,v=Ig(g,P?Math.ceil(B/2):B);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:p,weierstrassEquation:o,isWithinCurveOrder:d}}function Ng(e){const t=gm(e);return vo(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function Rg(e){const t=Ng(e),{Fp:n,n:r,nByteLength:s,nBitLength:a}=t,o=n.BYTES+1,i=2*n.BYTES+1;function c(w){return tt(w,r)}function l(w){return Xl(w,r)}const{ProjectivePoint:d,normPrivateKeyToScalar:p,weierstrassEquation:f,isWithinCurveOrder:m}=_g({...t,toBytes(w,A,F){const S=A.toAffine(),M=n.toBytes(S.x),$=ko;return ca("isCompressed",F),F?$(Uint8Array.from([A.hasEvenY()?2:3]),M):$(Uint8Array.from([4]),M,n.toBytes(S.y))},fromBytes(w){const A=w.length,F=w[0],S=w.subarray(1);if(A===o&&(F===2||F===3)){const M=lr(S);if(!dl(M,_e,n.ORDER))throw new Error("Point is not on curve");const $=f(M);let q;try{q=n.sqrt($)}catch(le){const Y=le instanceof Error?": "+le.message:"";throw new Error("Point is not on curve"+Y)}const J=(q&_e)===_e;return(F&1)===1!==J&&(q=n.neg(q)),{x:M,y:q}}else if(A===i&&F===4){const M=n.fromBytes(S.subarray(0,n.BYTES)),$=n.fromBytes(S.subarray(n.BYTES,2*n.BYTES));return{x:M,y:$}}else{const M=o,$=i;throw new Error("invalid Point, expected length of "+M+", or uncompressed "+$+", got "+A)}}});function y(w){const A=r>>_e;return w>A}function g(w){return y(w)?c(-w):w}const P=(w,A,F)=>lr(w.slice(A,F));class B{constructor(A,F,S){Xr("r",A,_e,r),Xr("s",F,_e,r),this.r=A,this.s=F,S!=null&&(this.recovery=S),Object.freeze(this)}static fromCompact(A){const F=s;return A=gt("compactSignature",A,F*2),new B(P(A,0,F),P(A,F,2*F))}static fromDER(A){const{r:F,s:S}=un.toSig(gt("DER",A));return new B(F,S)}assertValidity(){}addRecoveryBit(A){return new B(this.r,this.s,A)}recoverPublicKey(A){const{r:F,s:S,recovery:M}=this,$=_(gt("msgHash",A));if(M==null||![0,1,2,3].includes(M))throw new Error("recovery id invalid");const q=M===2||M===3?F+t.n:F;if(q>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const J=(M&1)===0?"02":"03",ie=d.fromHex(J+tu(q,n.BYTES)),le=l(q),Y=c(-$*le),ee=c(S*le),ye=d.BASE.multiplyAndAddUnsafe(ie,Y,ee);if(!ye)throw new Error("point at infinify");return ye.assertValidity(),ye}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new B(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Eo(this.toDERHex())}toDERHex(){return un.hexFromSig(this)}toCompactRawBytes(){return Eo(this.toCompactHex())}toCompactHex(){const A=s;return tu(this.r,A)+tu(this.s,A)}}const v={isValidPrivateKey(w){try{return p(w),!0}catch{return!1}},normPrivateKeyToScalar:p,randomPrivateKey:()=>{const w=mm(t.n);return Pg(t.randomBytes(w),t.n)},precompute(w=8,A=d.BASE){return A._setWindowSize(w),A.multiply(BigInt(3)),A}};function U(w,A=!0){return d.fromPrivateKey(w).toRawBytes(A)}function k(w){if(typeof w=="bigint")return!1;if(w instanceof d)return!0;const F=gt("key",w).length,S=n.BYTES,M=S+1,$=2*S+1;if(!(t.allowedPrivateKeyLengths||s===M))return F===M||F===$}function D(w,A,F=!0){if(k(w)===!0)throw new Error("first arg must be private key");if(k(A)===!1)throw new Error("second arg must be public key");return d.fromHex(A).multiply(p(w)).toRawBytes(F)}const N=t.bits2int||function(w){if(w.length>8192)throw new Error("input is too large");const A=lr(w),F=w.length*8-a;return F>0?A>>BigInt(F):A},_=t.bits2int_modN||function(w){return c(N(w))},h=Co(a);function b(w){return Xr("num < 2^"+a,w,dn,h),ua(w,s)}function x(w,A,F=C){if(["recovered","canonical"].some(_t=>_t in F))throw new Error("sign() legacy options not supported");const{hash:S,randomBytes:M}=t;let{lowS:$,prehash:q,extraEntropy:J}=F;$==null&&($=!0),w=gt("msgHash",w),wm(F),q&&(w=gt("prehashed msgHash",S(w)));const ie=_(w),le=p(A),Y=[b(le),b(ie)];if(J!=null&&J!==!1){const _t=J===!0?M(n.BYTES):J;Y.push(gt("extraEntropy",_t))}const ee=ko(...Y),ye=ie;function $n(_t){const Wt=N(_t);if(!m(Wt))return;const st=l(Wt),Nt=d.BASE.multiply(Wt).toAffine(),Ue=c(Nt.x);if(Ue===dn)return;const Pe=c(st*c(ye+Ue*le));if(Pe===dn)return;let me=(Nt.x===Ue?0:2)|Number(Nt.y&_e),vs=Pe;return $&&y(Pe)&&(vs=g(Pe),me^=1),new B(Ue,vs,me)}return{seed:ee,k2sig:$n}}const C={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};function T(w,A,F=C){const{seed:S,k2sig:M}=x(w,A,F),$=t;return w5($.hash.outputLen,$.nByteLength,$.hmac)(S,M)}d.BASE._setWindowSize(8);function O(w,A,F,S=E){var me;const M=w;A=gt("msgHash",A),F=gt("publicKey",F);const{lowS:$,prehash:q,format:J}=S;if(wm(S),"strict"in S)throw new Error("options.strict was renamed to lowS");if(J!==void 0&&J!=="compact"&&J!=="der")throw new Error("format must be compact or der");const ie=typeof M=="string"||ia(M),le=!ie&&!J&&typeof M=="object"&&M!==null&&typeof M.r=="bigint"&&typeof M.s=="bigint";if(!ie&&!le)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Y,ee;try{if(le&&(Y=new B(M.r,M.s)),ie){try{J!=="compact"&&(Y=B.fromDER(M))}catch(vs){if(!(vs instanceof un.Err))throw vs}!Y&&J!=="der"&&(Y=B.fromCompact(M))}ee=d.fromHex(F)}catch{return!1}if(!Y||$&&Y.hasHighS())return!1;q&&(A=t.hash(A));const{r:ye,s:$n}=Y,_t=_(A),Wt=l($n),st=c(_t*Wt),Nt=c(ye*Wt),Ue=(me=d.BASE.multiplyAndAddUnsafe(ee,st,Nt))==null?void 0:me.toAffine();return Ue?c(Ue.x)===ye:!1}return{CURVE:t,getPublicKey:U,getSharedSecret:D,sign:T,verify:O,ProjectivePoint:d,Signature:B,utils:v}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function zg(e){return{hash:e,hmac:(t,...n)=>am(e,t,_6(...n)),randomBytes:N6}}function Ho(e,t){const n=r=>Rg({...e,...zg(r)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Em=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),km=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Lg=BigInt(0),$g=BigInt(1),ru=BigInt(2),Cm=(e,t)=>(e+t/ru)/t;function Hg(e){const t=Em,n=BigInt(3),r=BigInt(6),s=BigInt(11),a=BigInt(22),o=BigInt(23),i=BigInt(44),c=BigInt(88),l=e*e*e%t,d=l*l*e%t,p=wt(d,n,t)*d%t,f=wt(p,n,t)*d%t,m=wt(f,ru,t)*l%t,y=wt(m,s,t)*m%t,g=wt(y,a,t)*y%t,P=wt(g,i,t)*g%t,B=wt(P,c,t)*P%t,v=wt(B,i,t)*g%t,U=wt(v,n,t)*d%t,k=wt(U,o,t)*y%t,D=wt(k,r,t)*l%t,N=wt(D,ru,t);if(!su.eql(su.sqr(N),e))throw new Error("Cannot find square root");return N}const su=rs(Em,void 0,void 0,{sqrt:Hg}),ka=Ho({a:Lg,b:BigInt(7),Fp:su,n:km,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=km,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-$g*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=n,o=BigInt("0x100000000000000000000000000000000"),i=Cm(a*e,t),c=Cm(-r*e,t);let l=tt(e-i*n-c*s,t),d=tt(-i*r-c*a,t);const p=l>o,f=d>o;if(p&&(l=t-l),f&&(d=t-d),l>o||d>o)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:l,k2neg:f,k2:d}}}},Qc),Gg=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:ka},Symbol.toStringTag,{value:"Module"}));function Go(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new lu({signature:e});if(typeof e.s>"u")throw new lu({signature:e});if(n&&typeof e.yParity>"u")throw new lu({signature:e});if(e.r<0n||e.r>Wf)throw new Zg({value:e.r});if(e.s<0n||e.s>Wf)throw new Qg({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new qo({value:e.yParity})}function jg(e){return au(Me(e))}function au(e){if(e.length!==130&&e.length!==132)throw new Xg({signature:e});const t=BigInt(ce(e,0,32)),n=BigInt(ce(e,32,64)),r=(()=>{const s=+`0x${e.slice(130)}`;if(!Number.isNaN(s))try{return iu(s)}catch{throw new qo({value:s})}})();return typeof r>"u"?{r:t,s:n}:{r:t,s:n,yParity:r}}function vm(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return jo(e)}function jo(e){const t=typeof e=="string"?au(e):e instanceof Uint8Array?jg(e):typeof e.r=="string"?ou(e):e.v?qg(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Go(t),t}function qg(e){return{r:e.r,s:e.s,yParity:iu(e.v)}}function ou(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=iu(n)),typeof r!="number")throw new qo({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function Vg(e){const[t,n,r]=e;return jo({r:n==="0x"?0n:BigInt(n),s:r==="0x"?0n:BigInt(r),yParity:t==="0x"?0:Number(t)})}function Kg(e){Go(e);const t=e.r,n=e.s;return ke(V(t,{size:32}),V(n,{size:32}),typeof e.yParity=="number"?V(cu(e.yParity),{size:1}):"0x")}function Am(e){const{r:t,s:n,yParity:r}=e;return{r:V(t,{size:32}),s:V(n,{size:32}),yParity:r===0?"0x0":"0x1"}}function Wg(e){const{r:t,s:n,yParity:r}=e;return[r?"0x01":"0x",t===0n?"0x":ml(V(t)),n===0n?"0x":ml(V(n))]}function iu(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new Jg({value:e})}function cu(e){if(e===0)return 27;if(e===1)return 28;throw new qo({value:e})}class Xg extends X{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${Te(So(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class lu extends X{constructor({signature:t}){super(`Signature \`${da(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class Zg extends X{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class Qg extends X{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class qo extends X{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class Jg extends X{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function Yg(e,t={}){return typeof e.chainId=="string"?Tm(e):{...e,...t.signature}}function Tm(e){const{address:t,chainId:n,nonce:r}=e,s=vm(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...s}}function e3(e){return e.map(Tm)}function t3(e){const{address:t,chainId:n,nonce:r,...s}=e;return{address:t,chainId:V(n),nonce:V(r),...Am(s)}}function n3(e){return e.map(t3)}function Sm(e){return Lo(r3(e))}function r3(e){const{payload:t,signature:n}=e,{r,s,yParity:a}=n,i=new ka.Signature(BigInt(r),BigInt(s)).addRecoveryBit(a).recoverPublicKey(So(t).substring(2));return F8(i)}function s3(e){const{address:t,hash:n,payload:r,publicKey:s,signature:a}=e;return t?Ll(t,Sm({payload:r,signature:a})):ka.verify(a,fl(r),D8(s),...n?[{prehash:!0,lowS:!0}]:[])}const a3="0x8010801080108010801080108010801080108010801080108010801080108010",o3=Qf("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Pm(e){if(typeof e=="string"){if(ce(e,-32)!==a3)throw new l3(e)}else Go(e.authorization)}function i3(e){Pm(e);const t=fa(ce(e,-64,-32)),n=ce(e,-t-64,-64),r=ce(e,0,-t-64),[s,a,o]=lg(o3,n);return{authorization:Yg({address:s.delegation,chainId:Number(s.chainId),nonce:s.nonce,yParity:s.yParity,r:s.r,s:s.s}),signature:r,...o&&o!=="0x"?{data:o,to:a}:{}}}function c3(e){try{return Pm(e),!0}catch{return!1}}let l3=class extends X{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};class u3 extends R{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function d3(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new u3({value:e});let[n,r="0"]=e.split(".");const s=n.startsWith("-");if(s&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),t===0)Math.round(+`.${r}`)===1&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[a,o,i]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],c=Math.round(+`${o}.${i}`);c>9?r=`${BigInt(a)+BigInt(1)}0`.padStart(a.length+1,"0"):r=`${a}${c}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${s?"-":""}${n}${r}`)}function p3(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function f3(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?it(e.nonce):void 0,storageProof:e.storageProof?p3(e.storageProof):void 0}}async function m3(e,{address:t,blockNumber:n,blockTag:r,storageKeys:s}){const a=r??"latest",o=n!==void 0?j(n):void 0,i=await e.request({method:"eth_getProof",params:[t,s,o||a]});return f3(i)}async function h3(e,{address:t,blockNumber:n,blockTag:r="latest",slot:s}){const a=n!==void 0?j(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,s,a||r]})}async function uu(e,{blockHash:t,blockNumber:n,blockTag:r,hash:s,index:a,sender:o,nonce:i}){var f,m,y;const c=r||"latest",l=n!==void 0?j(n):void 0;let d=null;if(s?d=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?d=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,j(a)]},{dedupe:!0}):typeof a=="number"?d=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,j(a)]},{dedupe:!!l}):o&&typeof i=="number"&&(d=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[o,j(i)]},{dedupe:!0})),!d)throw new r0({blockHash:t,blockNumber:n,blockTag:c,hash:s,index:a});return(((y=(m=(f=e.chain)==null?void 0:f.formatters)==null?void 0:m.transaction)==null?void 0:y.format)||ir)(d,"getTransaction")}async function b3(e,{hash:t,transactionReceipt:n}){const[r,s]=await Promise.all([W(e,ha,"getBlockNumber")({}),t?W(e,uu,"getTransaction")({hash:t}):void 0]),a=(n==null?void 0:n.blockNumber)||(s==null?void 0:s.blockNumber);return a?r-a+1n:0n}async function Vo(e,{hash:t}){var s,a,o;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new s0({hash:t});return(((o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionReceipt)==null?void 0:o.format)||Do)(n,"getTransactionReceipt")}async function y3(e,t){var v;const{account:n,authorizationList:r,allowFailure:s=!0,blockNumber:a,blockOverrides:o,blockTag:i,stateOverride:c}=t,l=t.contracts,{batchSize:d=t.batchSize??1024,deployless:p=t.deployless??!1}=typeof((v=e.batch)==null?void 0:v.multicall)=="object"?e.batch.multicall:{},f=(()=>{if(t.multicallAddress)return t.multicallAddress;if(p)return null;if(e.chain)return Yr({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),m=[[]];let y=0,g=0;for(let U=0;U<l.length;U++){const{abi:k,address:D,args:N,functionName:_}=l[U];try{const h=dt({abi:k,args:N,functionName:_});g+=(h.length-2)/2,d>0&&g>d&&m[y].length>0&&(y++,g=(h.length-2)/2,m[y]=[]),m[y]=[...m[y],{allowFailure:!0,callData:h,target:D}]}catch(h){const b=sr(h,{abi:k,address:D,args:N,docsPath:"/docs/contract/multicall",functionName:_,sender:n});if(!s)throw b;m[y]=[...m[y],{allowFailure:!0,callData:"0x",target:D}]}}const P=await Promise.allSettled(m.map(U=>W(e,It,"readContract")({...f===null?{code:bl}:{address:f},abi:Po,account:n,args:[U],authorizationList:r,blockNumber:a,blockOverrides:o,blockTag:i,functionName:"aggregate3",stateOverride:c}))),B=[];for(let U=0;U<P.length;U++){const k=P[U];if(k.status==="rejected"){if(!s)throw k.reason;for(let N=0;N<m[U].length;N++)B.push({status:"failure",error:k.reason,result:void 0});continue}const D=k.value;for(let N=0;N<D.length;N++){const{returnData:_,success:h}=D[N],{callData:b}=m[U][N],{abi:x,address:C,functionName:E,args:T}=l[B.length];try{if(b==="0x")throw new Is;if(!h)throw new fo({data:_});const O=cr({abi:x,args:T,data:_,functionName:E});B.push(s?{result:O,status:"success"}:O)}catch(O){const w=sr(O,{abi:x,address:C,args:T,docsPath:"/docs/contract/multicall",functionName:E});if(!s)throw w;B.push({error:w,result:void 0,status:"failure"})}}}if(B.length!==l.length)throw new R("multicall results mismatch");return B}async function du(e,t){const{blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",blocks:s,returnFullTransactions:a,traceTransfers:o,validation:i}=t;try{const c=[];for(const f of s){const m=f.blockOverrides?tf(f.blockOverrides):void 0,y=f.calls.map(P=>{const B=P,v=B.account?he(B.account):void 0,U=B.abi?dt(B):B.data,k={...B,account:v,data:B.dataSuffix?lt([U||"0x",B.dataSuffix]):U,from:B.from??(v==null?void 0:v.address)};return $t(k),Pt(k)}),g=f.stateOverrides?Hc(f.stateOverrides):void 0;c.push({blockOverrides:m,calls:y,stateOverrides:g})}const d=(typeof n=="bigint"?j(n):void 0)||r;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:a,traceTransfers:o,validation:i},d]})).map((f,m)=>({...jc(f),calls:f.calls.map((y,g)=>{var x,C;const{abi:P,args:B,functionName:v,to:U}=s[m].calls[g],k=((x=y.error)==null?void 0:x.data)??y.returnData,D=BigInt(y.gasUsed),N=(C=y.logs)==null?void 0:C.map(E=>Ht(E)),_=y.status==="0x1"?"success":"failure",h=P&&_==="success"&&k!=="0x"?cr({abi:P,data:k,functionName:v}):null,b=(()=>{var T;if(_==="success")return;let E;if(((T=y.error)==null?void 0:T.data)==="0x"?E=new Is:y.error&&(E=new fo(y.error)),!!E)return sr(E,{abi:P??[],address:U??"0x",args:B,functionName:v??"<unknown>"})})();return{data:k,gasUsed:D,logs:N,status:_,..._==="success"?{result:h}:{error:b}}})}))}catch(c){const l=c,d=ho(l,{});throw d instanceof aa?l:d}}function pu(e){let t=!0,n="",r=0,s="",a=!1;for(let o=0;o<e.length;o++){const i=e[o];if(["(",")",","].includes(i)&&(t=!0),i==="("&&r++,i===")"&&r--,!!t){if(r===0){if(i===" "&&["event","function","error",""].includes(s))s="";else if(s+=i,i===")"){a=!0;break}continue}if(i===" "){e[o-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}s+=i,n+=i}}if(!a)throw new X("Unable to normalize signature.");return s}function fu(e,t){const n=typeof e,r=t.type;switch(r){case"address":return $o(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((s,a)=>fu(Object.values(e)[a],s)):/^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(s=>fu(s,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Bm(e,t,n){for(const r in e){const s=e[r],a=t[r];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return Bm(s.components,a.components,n[r]);const o=[s.type,a.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?$o(n[r],{strict:!1}):o.includes("address")&&o.includes("bytes")?$o(n[r],{strict:!1}):!1)return o}}function Um(e,t={}){const{prepare:n=!0}=t,r=Array.isArray(e)||typeof e=="string"?up(e):e;return{...r,...n?{hash:ss(r)}:{}}}function Ko(e,t,n){const{args:r=[],prepare:s=!0}=n??{},a=Ut(t,{strict:!1}),o=e.filter(l=>a?l.type==="function"||l.type==="error"?Im(l)===ce(t,0,4):l.type==="event"?ss(l)===t:!1:"name"in l&&l.name===t);if(o.length===0)throw new Wo({name:t});if(o.length===1)return{...o[0],...s?{hash:ss(o[0])}:{}};let i;for(const l of o){if(!("inputs"in l))continue;if(!r||r.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...s?{hash:ss(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==r.length)continue;if(r.every((p,f)=>{const m="inputs"in l&&l.inputs[f];return m?fu(p,m):!1})){if(i&&"inputs"in i&&i.inputs){const p=Bm(l.inputs,i.inputs,r);if(p)throw new g3({abiItem:l,type:p[0]},{abiItem:i,type:p[1]})}i=l}}const c=(()=>{if(i)return i;const[l,...d]=o;return{...l,overloads:d}})();if(!c)throw new Wo({name:t});return{...c,...s?{hash:ss(c)}:{}}}function Im(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Ko(n,r)}return e[0]})();return ce(ss(t),0,4)}function x3(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,s]=e;return Ko(r,s)}return e[0]})(),n=typeof t=="string"?t:to(t);return pu(n)}function ss(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Ko(n,r)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:wa(pa(x3(t)))}class g3 extends X{constructor(t,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${pu(to(t.abiItem))}\`, and`,`\`${n.type}\` in \`${pu(to(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class Wo extends X{constructor({name:t,data:n,type:r="item"}){const s=t?` with name "${t}"`:n?` with data "${n}"`:"";super(`ABI ${r}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function w3(...e){var a;const[t,n]=(()=>{if(Array.isArray(e[0])){const[o,i]=e;return[k3(o),i]}return e})(),{bytecode:r,args:s}=n;return ke(r,(a=t.inputs)!=null&&a.length&&(s!=null&&s.length)?Vl(t.inputs,s):"0x")}function E3(e){return Um(e)}function k3(e){const t=e.find(n=>n.type==="constructor");if(!t)throw new Wo({name:"constructor"});return t}function C3(...e){const[t,n=[]]=(()=>{if(Array.isArray(e[0])){const[l,d,p]=e;return[Fm(l,d,{args:p}),p]}const[i,c]=e;return[i,c]})(),{overloads:r}=t,s=r?Fm([t,...r],t.name,{args:n}):t,a=v3(s),o=n.length>0?Vl(s.inputs,n):void 0;return o?ke(a,o):a}function as(e,t={}){return Um(e,t)}function Fm(e,t,n){const r=Ko(e,t,n);if(r.type!=="function")throw new Wo({name:t,type:"function"});return r}function v3(e){return Im(e)}const A3="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Gt="0x0000000000000000000000000000000000000000",T3="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function S3(e,t){const{blockNumber:n,blockTag:r,calls:s,stateOverrides:a,traceAssetChanges:o,traceTransfers:i,validation:c}=t,l=t.account?he(t.account):void 0;if(o&&!l)throw new R("`account` is required when `traceAssetChanges` is true");const d=l?w3(E3("constructor(bytes, bytes)"),{bytecode:uf,args:[T3,C3(as("function getBalance(address)"),[l.address])]}):void 0,p=o?await Promise.all(t.calls.map(async S=>{if(!S.data&&!S.abi)return;const{accessList:M}=await Uf(e,{account:l.address,...S,data:S.abi?dt(S):S.data});return M.map(({address:$,storageKeys:q})=>q.length>0?$:null)})).then(S=>S.flat().filter(Boolean)):[],f=await du(e,{blockNumber:n,blockTag:r,blocks:[...o?[{calls:[{data:d}],stateOverrides:a},{calls:p.map((S,M)=>({abi:[as("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:S,from:Gt,nonce:M})),stateOverrides:[{address:Gt,nonce:0}]}]:[],{calls:[...s,{}].map(S=>({...S,from:l==null?void 0:l.address})),stateOverrides:a},...o?[{calls:[{data:d}]},{calls:p.map((S,M)=>({abi:[as("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[l.address],to:S,from:Gt,nonce:M})),stateOverrides:[{address:Gt,nonce:0}]},{calls:p.map((S,M)=>({to:S,abi:[as("function decimals() returns (uint256)")],functionName:"decimals",from:Gt,nonce:M})),stateOverrides:[{address:Gt,nonce:0}]},{calls:p.map((S,M)=>({to:S,abi:[as("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:Gt,nonce:M})),stateOverrides:[{address:Gt,nonce:0}]},{calls:p.map((S,M)=>({to:S,abi:[as("function symbol() returns (string)")],functionName:"symbol",from:Gt,nonce:M})),stateOverrides:[{address:Gt,nonce:0}]}]:[]],traceTransfers:i,validation:c}),m=o?f[2]:f[0],[y,g,,P,B,v,U,k]=o?f:[],{calls:D,...N}=m,_=D.slice(0,-1)??[],h=(y==null?void 0:y.calls)??[],b=(g==null?void 0:g.calls)??[],x=[...h,...b].map(S=>S.status==="success"?pe(S.data):null),C=(P==null?void 0:P.calls)??[],E=(B==null?void 0:B.calls)??[],T=[...C,...E].map(S=>S.status==="success"?pe(S.data):null),O=((v==null?void 0:v.calls)??[]).map(S=>S.status==="success"?S.result:null),w=((k==null?void 0:k.calls)??[]).map(S=>S.status==="success"?S.result:null),A=((U==null?void 0:U.calls)??[]).map(S=>S.status==="success"?S.result:null),F=[];for(const[S,M]of T.entries()){const $=x[S];if(typeof M!="bigint"||typeof $!="bigint")continue;const q=O[S-1],J=w[S-1],ie=A[S-1],le=S===0?{address:A3,decimals:18,symbol:"ETH"}:{address:p[S-1],decimals:ie||q?Number(q??1):void 0,symbol:J??void 0};F.some(Y=>Y.token.address===le.address)||F.push({token:le,value:{pre:$,post:M,diff:M-$}})}return{assetChanges:F,block:N,results:_}}const Om="0x6492649264926492649264926492649264926492649264926492649264926492";function P3(e){if(ce(e,-32)!==Om)throw new I3(e)}function B3(e){const{data:t,signature:n,to:r}=e;return ke(Vl(Qf("address, bytes, bytes"),[r,t,n]),Om)}function U3(e){try{return P3(e),!0}catch{return!1}}class I3 extends X{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function F3({r:e,s:t,to:n="hex",v:r,yParity:s}){const a=(()=>{if(s===0||s===1)return s;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new ka.Signature(pe(e),pe(t)).toCompactHex()}${a===0?"1b":"1c"}`;return n==="hex"?o:ct(o)}async function Ca(e,t){var c,l,d,p;const{address:n,chain:r=e.chain,hash:s,erc6492VerifierAddress:a=t.universalSignatureVerifierAddress??((l=(c=r==null?void 0:r.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:l.address),multicallAddress:o=t.multicallAddress??((p=(d=r==null?void 0:r.contracts)==null?void 0:d.multicall3)==null?void 0:p.address)}=t;if(r!=null&&r.verifyHash)return await r.verifyHash(e,t);const i=(()=>{const f=t.signature;return Tt(f)?f:typeof f=="object"&&"r"in f&&"s"in f?F3(f):Be(f)})();try{return c3(i)?await O3(e,{...t,multicallAddress:o,signature:i}):await D3(e,{...t,verifierAddress:a,signature:i})}catch(f){try{if(Wr(wc(n),await u0({hash:s,signature:i})))return!0}catch{}if(f instanceof mr)return!1;throw f}}async function O3(e,t){var P;const{address:n,blockNumber:r,blockTag:s,hash:a,multicallAddress:o}=t,{authorization:i,data:c,signature:l,to:d}=i3(t.signature);if(await No(e,{address:n,blockNumber:r,blockTag:s})===ut(["0xef0100",i.address]))return await M3(e,{address:n,blockNumber:r,blockTag:s,hash:a,signature:l});const f={address:i.address,chainId:Number(i.chainId),nonce:Number(i.nonce),r:j(i.r,{size:32}),s:j(i.s,{size:32}),yParity:i.yParity};if(!await s8({address:n,authorization:f}))throw new mr;const y=await W(e,It,"readContract")({...o?{address:o}:{code:bl},authorizationList:[f],abi:Po,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:!0,target:d??n,callData:c}]:[],{allowFailure:!0,target:n,callData:dt({abi:of,functionName:"isValidSignature",args:[a,l]})}]]}),g=(P=y[y.length-1])==null?void 0:P.returnData;if(g!=null&&g.startsWith("0x1626ba7e"))return!0;throw new mr}async function D3(e,t){const{address:n,factory:r,factoryData:s,hash:a,signature:o,verifierAddress:i,...c}=t,l=await(async()=>!r&&!s||U3(o)?o:B3({data:s,signature:o,to:r}))(),d=i?{to:i,data:dt({abi:cf,functionName:"isValidSig",args:[n,a,l]}),...c}:{data:Bo({abi:cf,args:[n,a,l],bytecode:ex}),...c},{data:p}=await W(e,ma,"call")(d).catch(f=>{throw f instanceof o0?new mr:f});if(p6(p??"0x0"))return!0;throw new mr}async function M3(e,t){const{address:n,blockNumber:r,blockTag:s,hash:a,signature:o}=t;if((await W(e,It,"readContract")({address:n,abi:of,args:[a,o],blockNumber:r,blockTag:s,functionName:"isValidSignature"}).catch(c=>{throw c instanceof i0?new mr:c})).startsWith("0x1626ba7e"))return!0;throw new mr}let mr=class extends Error{};async function _3(e,{address:t,message:n,factory:r,factoryData:s,signature:a,...o}){const i=_f(n);return W(e,Ca,"verifyHash")({address:t,factory:r,factoryData:s,hash:i,signature:a,...o})}async function N3(e,t){const{address:n,factory:r,factoryData:s,signature:a,message:o,primaryType:i,types:c,domain:l,...d}=t,p=A8({message:o,primaryType:i,types:c,domain:l});return W(e,Ca,"verifyHash")({address:n,factory:r,factoryData:s,hash:p,signature:a,...d})}function Dm(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:s,poll:a,pollingInterval:o=e.pollingInterval}){const i=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let c;return i?(()=>{const p=Ae(["watchBlockNumber",e.uid,t,n,o]);return cn(p,{onBlockNumber:r,onError:s},f=>es(async()=>{var m;try{const y=await W(e,ha,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(y===c)return;if(y-c>1&&n)for(let g=c+1n;g<y;g++)f.onBlockNumber(g,c),c=g}(c===void 0||y>c)&&(f.onBlockNumber(y,c),c=y)}catch(y){(m=f.onError)==null||m.call(f,y)}},{emitOnBegin:t,interval:o}))})():(()=>{const p=Ae(["watchBlockNumber",e.uid,t,n]);return cn(p,{onBlockNumber:r,onError:s},f=>{let m=!0,y=()=>m=!1;return(async()=>{try{const g=(()=>{if(e.transport.type==="fallback"){const B=e.transport.transports.find(v=>v.config.type==="webSocket"||v.config.type==="ipc");return B?B.value:e.transport}return e.transport})(),{unsubscribe:P}=await g.subscribe({params:["newHeads"],onData(B){var U;if(!m)return;const v=pe((U=B.result)==null?void 0:U.number);f.onBlockNumber(v,c),c=v},onError(B){var v;(v=f.onError)==null||v.call(f,B)}});y=P,m||y()}catch(g){s==null||s(g)}})(),()=>y()})})()}async function Mm(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:s,onReplaced:a,retryCount:o=6,retryDelay:i=({count:D})=>~~(1<<D)*200,timeout:c=18e4}=t,l=Ae(["waitForTransactionReceipt",e.uid,s]),d=(()=>{var D;return t.pollingInterval?t.pollingInterval:(D=e.chain)!=null&&D.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let p,f,m,y=!1,g,P;const{promise:B,resolve:v,reject:U}=wl(),k=c?setTimeout(()=>{P==null||P(),g==null||g(),U(new F2({hash:s}))},c):void 0;return g=cn(l,{onReplaced:a,resolve:v,reject:U},async D=>{if(m=await W(e,Vo,"getTransactionReceipt")({hash:s}).catch(()=>{}),m&&r<=1){clearTimeout(k),D.resolve(m),g==null||g();return}P=W(e,Dm,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:d,async onBlockNumber(N){const _=b=>{clearTimeout(k),P==null||P(),b(),g==null||g()};let h=N;if(!y)try{if(m){if(r>1&&(!m.blockNumber||h-m.blockNumber+1n<r))return;_(()=>D.resolve(m));return}if(n&&!p&&(y=!0,await Oo(async()=>{p=await W(e,uu,"getTransaction")({hash:s}),p.blockNumber&&(h=p.blockNumber)},{delay:i,retryCount:o}),y=!1),m=await W(e,Vo,"getTransactionReceipt")({hash:s}),r>1&&(!m.blockNumber||h-m.blockNumber+1n<r))return;_(()=>D.resolve(m))}catch(b){if(b instanceof r0||b instanceof s0){if(!p){y=!1;return}try{f=p,y=!0;const x=await Oo(()=>W(e,Bt,"getBlock")({blockNumber:h,includeTransactions:!0}),{delay:i,retryCount:o,shouldRetry:({error:T})=>T instanceof h0});y=!1;const C=x.transactions.find(({from:T,nonce:O})=>T===f.from&&O===f.nonce);if(!C||(m=await W(e,Vo,"getTransactionReceipt")({hash:C.hash}),r>1&&(!m.blockNumber||h-m.blockNumber+1n<r)))return;let E="replaced";C.to===f.to&&C.value===f.value&&C.input===f.input?E="repriced":C.from===C.to&&C.value===0n&&(E="cancelled"),_(()=>{var T;(T=D.onReplaced)==null||T.call(D,{reason:E,replacedTransaction:f,transaction:C,transactionReceipt:m}),D.resolve(m)})}catch(x){_(()=>D.reject(x))}}else _(()=>D.reject(b))}}})}),B}function R3(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:s,onError:a,includeTransactions:o,poll:i,pollingInterval:c=e.pollingInterval}){const l=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),d=o??!1;let p;return l?(()=>{const y=Ae(["watchBlocks",e.uid,t,n,r,d,c]);return cn(y,{onBlock:s,onError:a},g=>es(async()=>{var P;try{const B=await W(e,Bt,"getBlock")({blockTag:t,includeTransactions:d});if(B.number!==null&&(p==null?void 0:p.number)!=null){if(B.number===p.number)return;if(B.number-p.number>1&&n)for(let v=(p==null?void 0:p.number)+1n;v<B.number;v++){const U=await W(e,Bt,"getBlock")({blockNumber:v,includeTransactions:d});g.onBlock(U,p),p=U}}((p==null?void 0:p.number)==null||t==="pending"&&(B==null?void 0:B.number)==null||B.number!==null&&B.number>p.number)&&(g.onBlock(B,p),p=B)}catch(B){(P=g.onError)==null||P.call(g,B)}},{emitOnBegin:r,interval:c}))})():(()=>{let y=!0,g=!0,P=()=>y=!1;return(async()=>{try{r&&W(e,Bt,"getBlock")({blockTag:t,includeTransactions:d}).then(U=>{y&&g&&(s(U,void 0),g=!1)}).catch(a);const B=(()=>{if(e.transport.type==="fallback"){const U=e.transport.transports.find(k=>k.config.type==="webSocket"||k.config.type==="ipc");return U?U.value:e.transport}return e.transport})(),{unsubscribe:v}=await B.subscribe({params:["newHeads"],async onData(U){var D;if(!y)return;const k=await W(e,Bt,"getBlock")({blockNumber:(D=U.result)==null?void 0:D.number,includeTransactions:d}).catch(()=>{});y&&(s(k,p),g=!1,p=k)},onError(U){a==null||a(U)}});P=v,y||P()}catch(B){a==null||a(B)}})(),()=>P()})()}function z3(e,{address:t,args:n,batch:r=!0,event:s,events:a,fromBlock:o,onError:i,onLogs:c,poll:l,pollingInterval:d=e.pollingInterval,strict:p}){const f=typeof l<"u"?l:typeof o=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),m=p??!1;return f?(()=>{const P=Ae(["watchEvent",t,n,r,e.uid,s,d,o]);return cn(P,{onLogs:c,onError:i},B=>{let v;o!==void 0&&(v=o-1n);let U,k=!1;const D=es(async()=>{var N;if(!k){try{U=await W(e,If,"createEventFilter")({address:t,args:n,event:s,events:a,strict:m,fromBlock:o})}catch{}k=!0;return}try{let _;if(U)_=await W(e,Uo,"getFilterChanges")({filter:U});else{const h=await W(e,ha,"getBlockNumber")({});v&&v!==h?_=await W(e,al,"getLogs")({address:t,args:n,event:s,events:a,fromBlock:v+1n,toBlock:h}):_=[],v=h}if(_.length===0)return;if(r)B.onLogs(_);else for(const h of _)B.onLogs([h])}catch(_){U&&_ instanceof vn&&(k=!1),(N=B.onError)==null||N.call(B,_)}},{emitOnBegin:!0,interval:d});return async()=>{U&&await W(e,Io,"uninstallFilter")({filter:U}),D()}})})():(()=>{let P=!0,B=()=>P=!1;return(async()=>{try{const v=(()=>{if(e.transport.type==="fallback"){const N=e.transport.transports.find(_=>_.config.type==="webSocket"||_.config.type==="ipc");return N?N.value:e.transport}return e.transport})(),U=a??(s?[s]:void 0);let k=[];U&&(k=[U.flatMap(_=>_s({abi:[_],eventName:_.name,args:n}))],s&&(k=k[0]));const{unsubscribe:D}=await v.subscribe({params:["logs",{address:t,topics:k}],onData(N){var h;if(!P)return;const _=N.result;try{const{eventName:b,args:x}=go({abi:U??[],data:_.data,topics:_.topics,strict:m}),C=Ht(_,{args:x,eventName:b});c([C])}catch(b){let x,C;if(b instanceof so||b instanceof hc){if(p)return;x=b.abiItem.name,C=(h=b.abiItem.inputs)==null?void 0:h.some(T=>!("name"in T&&T.name))}const E=Ht(_,{args:C?[]:{},eventName:x});c([E])}},onError(N){i==null||i(N)}});B=D,P||B()}catch(v){i==null||i(v)}})(),()=>B()})()}function L3(e,{batch:t=!0,onError:n,onTransactions:r,poll:s,pollingInterval:a=e.pollingInterval}){return(typeof s<"u"?s:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const l=Ae(["watchPendingTransactions",e.uid,t,a]);return cn(l,{onTransactions:r,onError:n},d=>{let p;const f=es(async()=>{var m;try{if(!p)try{p=await W(e,Ff,"createPendingTransactionFilter")({});return}catch(g){throw f(),g}const y=await W(e,Uo,"getFilterChanges")({filter:p});if(y.length===0)return;if(t)d.onTransactions(y);else for(const g of y)d.onTransactions([g])}catch(y){(m=d.onError)==null||m.call(d,y)}},{emitOnBegin:!0,interval:a});return async()=>{p&&await W(e,Io,"uninstallFilter")({filter:p}),f()}})})():(()=>{let l=!0,d=()=>l=!1;return(async()=>{try{const{unsubscribe:p}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!l)return;const m=f.result;r([m])},onError(f){n==null||n(f)}});d=p,l||d()}catch(p){n==null||n(p)}})(),()=>d()})()}function $3(e){var p,f,m;const{scheme:t,statement:n,...r}=((p=e.match(H3))==null?void 0:p.groups)??{},{chainId:s,expirationTime:a,issuedAt:o,notBefore:i,requestId:c,...l}=((f=e.match(G3))==null?void 0:f.groups)??{},d=(m=e.split("Resources:")[1])==null?void 0:m.split(`
107
+ - `).slice(1);return{...r,...l,...s?{chainId:Number(s)}:{},...a?{expirationTime:new Date(a)}:{},...o?{issuedAt:new Date(o)}:{},...i?{notBefore:new Date(i)}:{},...c?{requestId:c}:{},...d?{resources:d}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const H3=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,G3=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function j3(e){const{address:t,domain:n,message:r,nonce:s,scheme:a,time:o=new Date}=e;if(n&&r.domain!==n||s&&r.nonce!==s||a&&r.scheme!==a||r.expirationTime&&o>=r.expirationTime||r.notBefore&&o<r.notBefore)return!1;try{if(!r.address||!xe(r.address,{strict:!1})||t&&!Wr(r.address,t))return!1}catch{return!1}return!0}async function q3(e,t){const{address:n,domain:r,message:s,nonce:a,scheme:o,signature:i,time:c=new Date,...l}=t,d=$3(s);if(!d.address||!j3({address:n,domain:r,message:d,nonce:a,scheme:o,time:c}))return!1;const f=_f(s);return Ca(e,{address:d.address,hash:f,signature:i,...l})}async function mu(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:r}){var i,c,l;const s=await e.request({method:"eth_sendRawTransactionSync",params:r?[t,j(r)]:[t]},{retryCount:0}),o=(((l=(c=(i=e.chain)==null?void 0:i.formatters)==null?void 0:c.transactionReceipt)==null?void 0:l.format)||Do)(s);if(o.status==="reverted"&&n)throw new a0({receipt:o});return o}function V3(e){return{call:t=>ma(e,t),createAccessList:t=>Uf(e,t),createBlockFilter:()=>Rx(e),createContractEventFilter:t=>Wp(e,t),createEventFilter:t=>If(e,t),createPendingTransactionFilter:()=>Ff(e),estimateContractGas:t=>h5(e,t),estimateGas:t=>rl(e,t),getBalance:t=>zx(e,t),getBlobBaseFee:()=>Lx(e),getBlock:t=>Bt(e,t),getBlockNumber:t=>ha(e,t),getBlockTransactionCount:t=>$x(e,t),getBytecode:t=>No(e,t),getChainId:()=>Un(e),getCode:t=>No(e,t),getContractEvents:t=>O0(e,t),getEip712Domain:t=>Gx(e,t),getEnsAddress:t=>kx(e,t),getEnsAvatar:t=>Mx(e,t),getEnsName:t=>_x(e,t),getEnsResolver:t=>Nx(e,t),getEnsText:t=>Bf(e,t),getFeeHistory:t=>Vx(e,t),estimateFeesPerGas:t=>Y2(e,t),getFilterChanges:t=>Uo(e,t),getFilterLogs:t=>Kx(e,t),getGasPrice:()=>Vc(e),getLogs:t=>al(e,t),getProof:t=>m3(e,t),estimateMaxPriorityFeePerGas:t=>J2(e,t),fillTransaction:t=>el(e,t),getStorageAt:t=>h3(e,t),getTransaction:t=>uu(e,t),getTransactionConfirmations:t=>b3(e,t),getTransactionCount:t=>Wc(e,t),getTransactionReceipt:t=>Vo(e,t),multicall:t=>y3(e,t),prepareTransactionRequest:t=>oa(e,t),readContract:t=>It(e,t),sendRawTransaction:t=>Al(e,t),sendRawTransactionSync:t=>mu(e,t),simulate:t=>du(e,t),simulateBlocks:t=>du(e,t),simulateCalls:t=>S3(e,t),simulateContract:t=>ix(e,t),verifyHash:t=>Ca(e,t),verifyMessage:t=>_3(e,t),verifySiweMessage:t=>q3(e,t),verifyTypedData:t=>N3(e,t),uninstallFilter:t=>Io(e,t),waitForTransactionReceipt:t=>Mm(e,t),watchBlocks:t=>R3(e,t),watchBlockNumber:t=>Dm(e,t),watchContractEvent:t=>mx(e,t),watchEvent:t=>z3(e,t),watchPendingTransactions:t=>L3(e,t)}}function K3(e){const{key:t="public",name:n="Public Client"}=e;return kf({...e,key:t,name:n,type:"publicClient"}).extend(V3)}async function W3(e,{chain:t}){const{id:n,name:r,nativeCurrency:s,rpcUrls:a,blockExplorers:o}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:j(n),chainName:r,nativeCurrency:s,rpcUrls:a.default.http,blockExplorerUrls:o?Object.values(o).map(({url:i})=>i):void 0}]},{dedupe:!0,retryCount:0})}function X3(e,t){const{abi:n,args:r,bytecode:s,...a}=t,o=Bo({abi:n,args:r,bytecode:s});return Fo(e,{...a,...a.authorizationList?{to:null}:{},data:o})}async function Z3(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=>Ds(r))}async function Q3(e,t={}){const{account:n=e.account,chainId:r}=t,s=n?he(n):void 0,a=r?[s==null?void 0:s.address,[j(r)]]:[s==null?void 0:s.address],o=await e.request({method:"wallet_getCapabilities",params:a}),i={};for(const[c,l]of Object.entries(o)){i[Number(c)]={};for(let[d,p]of Object.entries(l))d==="addSubAccount"&&(d="unstable_addSubAccount"),i[Number(c)][d]=p}return typeof r=="number"?i[r]:i}async function J3(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function _m(e,t){var c;const{account:n=e.account,chainId:r,nonce:s}=t;if(!n)throw new ln({docsPath:"/docs/eip7702/prepareAuthorization"});const a=he(n),o=(()=>{if(t.executor)return t.executor==="self"?t.executor:he(t.executor)})(),i={address:t.contractAddress??t.address,chainId:r,nonce:s};return typeof i.chainId>"u"&&(i.chainId=((c=e.chain)==null?void 0:c.id)??await W(e,Un,"getChainId")({})),typeof i.nonce>"u"&&(i.nonce=await W(e,Wc,"getTransactionCount")({address:a.address,blockTag:"pending"}),(o==="self"||o!=null&&o.address&&Wr(o.address,a.address))&&(i.nonce+=1)),i}async function Y3(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>wc(n))}async function ew(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function tw(e,t){const{chain:n=e.chain}=t,r=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),s=await xf(e,t);return await wf(e,{...t,id:s.id,timeout:r})}const hu=new Lr(128);async function Nm(e,t){var D,N,_,h;const{account:n=e.account,chain:r=e.chain,accessList:s,authorizationList:a,blobs:o,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:f,nonce:m,pollingInterval:y,throwOnReceiptRevert:g,type:P,value:B,...v}=t,U=t.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3);if(typeof n>"u")throw new ln({docsPath:"/docs/actions/wallet/sendTransactionSync"});const k=n?he(n):null;try{$t(t);const b=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await mo({authorization:a[0]}).catch(()=>{throw new R("`to` is required. Could not infer from `authorizationList`.")})})();if((k==null?void 0:k.type)==="json-rpc"||k===null){let x;r!==null&&(x=await W(e,Un,"getChainId")({}),vl({currentChainId:x,chain:r}));const C=(_=(N=(D=e.chain)==null?void 0:D.formatters)==null?void 0:N.transactionRequest)==null?void 0:_.format,T=(C||Pt)({...ar(v,{format:C}),accessList:s,account:k,authorizationList:a,blobs:o,chainId:x,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:f,nonce:m,to:b,type:P,value:B},"sendTransaction"),O=hu.get(e.uid),w=O?"wallet_sendTransaction":"eth_sendTransaction",A=await(async()=>{try{return await e.request({method:w,params:[T]},{retryCount:0})}catch(S){if(O===!1)throw S;const M=S;if(M.name==="InvalidInputRpcError"||M.name==="InvalidParamsRpcError"||M.name==="MethodNotFoundRpcError"||M.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[T]},{retryCount:0}).then($=>(hu.set(e.uid,!0),$)).catch($=>{const q=$;throw q.name==="MethodNotFoundRpcError"||q.name==="MethodNotSupportedRpcError"?(hu.set(e.uid,!1),M):q});throw M}})(),F=await W(e,Mm,"waitForTransactionReceipt")({checkReplacement:!1,hash:A,pollingInterval:y,timeout:U});if(g&&F.status==="reverted")throw new a0({receipt:F});return F}if((k==null?void 0:k.type)==="local"){const x=await W(e,oa,"prepareTransactionRequest")({account:k,accessList:s,authorizationList:a,blobs:o,chain:r,data:i,gas:c,gasPrice:l,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:f,nonce:m,nonceManager:k.nonceManager,parameters:[...tl,"sidecars"],type:P,value:B,...v,to:b}),C=(h=r==null?void 0:r.serializers)==null?void 0:h.transaction,E=await k.signTransaction(x,{serializer:C});return await W(e,mu,"sendRawTransactionSync")({serializedTransaction:E,throwOnReceiptRevert:g})}throw(k==null?void 0:k.type)==="smart"?new pr({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new pr({docsPath:"/docs/actions/wallet/sendTransactionSync",type:k==null?void 0:k.type})}catch(b){throw b instanceof pr?b:xo(b,{...t,account:k,chain:t.chain||void 0})}}async function nw(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function rw(e,t){const{account:n=e.account}=t;if(!n)throw new ln({docsPath:"/docs/eip7702/signAuthorization"});const r=he(n);if(!r.signAuthorization)throw new pr({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:r.type});const s=await _m(e,t);return r.signAuthorization(s)}async function sw(e,{account:t=e.account,message:n}){if(!t)throw new ln({docsPath:"/docs/actions/wallet/signMessage"});const r=he(t);if(r.signMessage)return r.signMessage({message:n});const s=typeof n=="string"?Mr(n):n.raw instanceof Uint8Array?ue(n.raw):n.raw;return e.request({method:"personal_sign",params:[s,r.address]},{retryCount:0})}async function aw(e,t){var l,d,p,f;const{account:n=e.account,chain:r=e.chain,...s}=t;if(!n)throw new ln({docsPath:"/docs/actions/wallet/signTransaction"});const a=he(n);$t({account:a,...t});const o=await W(e,Un,"getChainId")({});r!==null&&vl({currentChainId:o,chain:r});const i=(r==null?void 0:r.formatters)||((l=e.chain)==null?void 0:l.formatters),c=((d=i==null?void 0:i.transactionRequest)==null?void 0:d.format)||Pt;return a.signTransaction?a.signTransaction({...s,chainId:o},{serializer:(f=(p=e.chain)==null?void 0:p.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...c({...s,account:a},"signTransaction"),chainId:j(o),from:a.address}]},{retryCount:0})}async function ow(e,t){const{account:n=e.account,domain:r,message:s,primaryType:a}=t;if(!n)throw new ln({docsPath:"/docs/actions/wallet/signTypedData"});const o=he(n),i={EIP712Domain:Rf({domain:r}),...t.types};if(Nf({domain:r,message:s,primaryType:a,types:i}),o.signTypedData)return o.signTypedData({domain:r,message:s,primaryType:a,types:i});const c=C8({domain:r,message:s,primaryType:a,types:i});return e.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function iw(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:j(t)}]},{retryCount:0})}async function cw(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function lw(e,t){return ba.internal(e,Nm,"sendTransactionSync",t)}function uw(e){return{addChain:t=>W3(e,t),deployContract:t=>X3(e,t),fillTransaction:t=>el(e,t),getAddresses:()=>Z3(e),getCallsStatus:t=>gf(e,t),getCapabilities:t=>Q3(e,t),getChainId:()=>Un(e),getPermissions:()=>J3(e),prepareAuthorization:t=>_m(e,t),prepareTransactionRequest:t=>oa(e,t),requestAddresses:()=>Y3(e),requestPermissions:t=>ew(e,t),sendCalls:t=>xf(e,t),sendCallsSync:t=>tw(e,t),sendRawTransaction:t=>Al(e,t),sendRawTransactionSync:t=>mu(e,t),sendTransaction:t=>Fo(e,t),sendTransactionSync:t=>Nm(e,t),showCallsStatus:t=>nw(e,t),signAuthorization:t=>rw(e,t),signMessage:t=>sw(e,t),signTransaction:t=>aw(e,t),signTypedData:t=>ow(e,t),switchChain:t=>iw(e,t),waitForCallsStatus:t=>wf(e,t),watchAsset:t=>cw(e,t),writeContract:t=>ba(e,t),writeContractSync:t=>lw(e,t)}}function dw(e){const{key:t="wallet",name:n="Wallet Client",transport:r}=e;return kf({...e,key:t,name:n,transport:r,type:"walletClient"}).extend(uw)}function Rm({key:e,methods:t,name:n,request:r,retryCount:s=3,retryDelay:a=150,timeout:o,type:i},c){const l=Ef();return{config:{key:e,methods:t,name:n,request:r,retryCount:s,retryDelay:a,timeout:o,type:i},request:o8(r,{methods:t,retryCount:s,retryDelay:a,uid:l}),value:c}}function pw(e,t={}){const{key:n="custom",methods:r,name:s="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>Rm({key:n,methods:r,name:s,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})}class fw extends R{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 mw(e,t={}){const{batch:n,fetchFn:r,fetchOptions:s,key:a="http",methods:o,name:i="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:d,raw:p}=t;return({chain:f,retryCount:m,timeout:y})=>{const{batchSize:g=1e3,wait:P=0}=typeof n=="object"?n:{},B=t.retryCount??m,v=y??t.timeout??1e4,U=f==null?void 0:f.rpcUrls.default.http[0];if(!U)throw new fw;const k=y8(U,{fetchFn:r,fetchOptions:s,onRequest:c,onResponse:l,timeout:v});return Rm({key:a,methods:o,name:i,async request({method:D,params:N}){const _={method:D,params:N},{schedule:h}=pf({id:U,wait:P,shouldSplitBatch(E){return E.length>g},fn:E=>k.request({body:E}),sort:(E,T)=>E.id-T.id}),b=async E=>n?h(E):[await k.request({body:E})],[{error:x,result:C}]=await b(_);if(p)return{error:x,result:C};if(x)throw new Fc({body:_,error:x,url:U});return C},retryCount:B,retryDelay:d,timeout:v,type:"http"},{fetchOptions:s,url:U})}}function hw(e){const{r:t,s:n}=ka.Signature.fromCompact(e.slice(2,130)),r=+`0x${e.slice(130)}`,[s,a]=(()=>{if(r===0||r===1)return[void 0,r];if(r===27)return[BigInt(r),0];if(r===28)return[BigInt(r),1];throw new Error("Invalid yParityOrV value")})();return typeof s<"u"?{r:j(t,{size:32}),s:j(n,{size:32}),v:s,yParity:a}:{r:j(t,{size:32}),s:j(n,{size:32}),yParity:a}}const os=(e,t)=>!t||!e||z(e).isNaN()?"":d3(e,t).toString(),ft=(e,t)=>{try{if(!t||!e||z(e).isNaN())return"";const n=z(e).toFixed();return Bc(BigInt(n),t)}catch(n){return console.error(n),""}},bw=e=>{const t="An error occurred.";if(!e||!e.message)return t;try{return e.message.toLowerCase().includes("rejected")?"Transaction Rejected":t}catch{return t}},bu=e=>{var t,n,r,s;if(e!=null&&e.message)return((n=(t=e.message)==null?void 0:t.toLowerCase())==null?void 0:n.includes("rejected"))||((s=(r=e.message)==null?void 0:r.toLowerCase())==null?void 0:s.includes("denied"))},zm=(e,t)=>{const n=Vn(t);return n&&Ur(e.address)?n.wToken:e};function Lm(e){return e?e/864e5:0}function yu(e){return e?e/6e4:0}const yw=(e,t)=>e?be.TWAP_MARKET:t===1?be.LIMIT:be.TWAP_LIMIT,xu=(e,t,n)=>{const r=Vn(n);return Ur((e==null?void 0:e.address)||"")&&jn((t==null?void 0:t.address)||"",(r==null?void 0:r.wToken.address)||"")},gu=(e,t,n)=>{const r=Vn(n);return jn((e==null?void 0:e.address)||"",(r==null?void 0:r.wToken.address)||"")&&Ur((t==null?void 0:t.address)||"")},is=(e,t)=>{if(!t)return"";const n=Vn(t);return`${n==null?void 0:n.explorer}/tx/${e}`},xw=u({id:16600,name:"0G Newton Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-newton.0g.ai"}},testnet:!0}),gw=u({id:16601,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),ww=u({id:16661,name:"0G Mainnet",nativeCurrency:{name:"0G",symbol:"0G",decimals:18},rpcUrls:{default:{http:["https://evmrpc.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan.0g.ai"}},testnet:!1}),Ew=u({id:16602,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),kw=u({id:995,name:"5ireChain",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Mainnet Explorer",url:"https://5irescan.io/"}},testnet:!1}),Cw=u({id:179,name:"ABEY Mainnet",nativeCurrency:{name:"ABEY",symbol:"ABEY",decimals:18},rpcUrls:{default:{http:["https://rpc.abeychain.com"]}},blockExplorers:{default:{name:"Abey Scan",url:"https://abeyscan.com"}},testnet:!1}),wu=50000n,$m=X2*32n,Hm={block:qc({format(e){var n;const t=(n=e.transactions)==null?void 0:n.map(r=>{var a;if(typeof r=="string")return r;const s=(a=Hm.transaction)==null?void 0:a.format(r);return s.typeHex==="0x71"?s.type="eip712":s.typeHex==="0xff"&&(s.type="priority"),s});return{l1BatchNumber:e.l1BatchNumber?pe(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?pe(e.l1BatchTimestamp):null,transactions:t}}}),transaction:yo({format(e){const t={};return e.type==="0x71"?t.type="eip712":e.type==="0xff"&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?pe(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?pe(e.l1BatchTxIndex):null}}}),transactionReceipt:Sl({format(e){return{l1BatchNumber:e.l1BatchNumber?pe(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?pe(e.l1BatchTxIndex):null,logs:e.logs.map(t=>({...Ht(t),l1BatchNumber:t.l1BatchNumber?pe(t.l1BatchNumber):null,transactionLogIndex:it(t.transactionLogIndex),logType:t.logType})),l2ToL1Logs:e.l2ToL1Logs.map(t=>({blockNumber:pe(t.blockHash),blockHash:t.blockHash,l1BatchNumber:t.l1BatchNumber?pe(t.l1BatchNumber):null,transactionIndex:pe(t.transactionIndex),shardId:pe(t.shardId),isService:t.isService,sender:t.sender,key:t.key,value:t.value,transactionHash:t.transactionHash,logIndex:pe(t.logIndex)}))}}}),transactionRequest:$c({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(e){return e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:ue(e.gasPerPubdata)}:{gasPerPubdata:ue(wu)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(ct(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(t=>Array.from(ct(t)))}:{},...e.customSignature?{customSignature:Array.from(ct(e.customSignature))}:{}},type:"0x71"}:{}}})};class vw extends R{constructor(){super(["Transaction is not an EIP712 transaction.","","Transaction must:",' - include `type: "eip712"`'," - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`"].join(`
108
+ `),{name:"InvalidEip712TransactionError"})}}function Gm(e){return!!(e.type==="eip712"||"customSignature"in e&&e.customSignature||"paymaster"in e&&e.paymaster||"paymasterInput"in e&&e.paymasterInput||"gasPerPubdata"in e&&typeof e.gasPerPubdata=="bigint"||"factoryDeps"in e&&e.factoryDeps)}function jm(e){const{chainId:t,to:n,from:r,paymaster:s,paymasterInput:a}=e;if(!Gm(e))throw new vw;if(!t||t<=0)throw new Jr({chainId:t});if(n&&!xe(n))throw new Oe({address:n});if(r&&!xe(r))throw new Oe({address:r});if(s&&!xe(s))throw new Oe({address:s});if(s&&!a)throw new R("`paymasterInput` must be provided when `paymaster` is defined");if(!s&&a)throw new R("`paymaster` must be provided when `paymasterInput` is defined")}function Aw(e,t){return Gm(e)?Sw(e):Ro(e,t)}const Tw={transaction:Aw};function Sw(e){const{chainId:t,gas:n,nonce:r,to:s,from:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,customSignature:l,factoryDeps:d,paymaster:p,paymasterInput:f,gasPerPubdata:m,data:y}=e;jm(e);const g=[r?ue(r):"0x",c?ue(c):"0x",i?ue(i):"0x",n?ue(n):"0x",s??"0x",o?ue(o):"0x",y??"0x",ue(t),ue(""),ue(""),ue(t),a??"0x",ue(m||wu),d??[],l??"0x",p&&f?[p,f]:[]];return ut(["0x71",Lt(g)])}class Pw extends R{constructor({givenLength:t,maxBytecodeSize:n}){super(`Bytecode cannot be longer than ${n} bytes. Given length: ${t}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class Bw extends R{constructor({givenLengthInWords:t}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${t}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class Uw extends R{constructor({givenLength:t}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${t}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function Iw(e){const t=en(e);if(t.length%32!==0)throw new Uw({givenLength:t.length});if(t.length>$m)throw new Pw({givenLength:t.length,maxBytecodeSize:$m});const n=k0(t),r=en(n),s=t.length/32;if(s%2===0)throw new Bw({givenLengthInWords:s});const a=en(s),o=Zn(a,{size:2}),i=new Uint8Array([1,0]);return r.set(i,0),r.set(o,2),r}const Fw=e=>{jm(e);const t=Ow(e);return{domain:{name:"zkSync",version:"2",chainId:e.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:t}};function Ow(e){const{gas:t,nonce:n,to:r,from:s,value:a,maxFeePerGas:o,maxPriorityFeePerGas:i,factoryDeps:c,paymaster:l,paymasterInput:d,gasPerPubdata:p,data:f}=e;return{txType:113n,from:BigInt(s),to:r?BigInt(r):0n,gasLimit:t??0n,gasPerPubdataByteLimit:p??wu,maxFeePerGas:o??0n,maxPriorityFeePerGas:i??0n,paymaster:l?BigInt(l):0n,nonce:n?BigInt(n):0n,value:a??0n,data:f??"0x",factoryDeps:(c==null?void 0:c.map(m=>ue(Iw(m))))??[],paymasterInput:d||"0x"}}const mt={blockTime:1e3,formatters:Hm,serializers:Tw,custom:{getEip712Domain:Fw}},Dw=u({...mt,blockTime:200,id:2741,name:"Abstract",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.mainnet.abs.xyz"],webSocket:["wss://api.mainnet.abs.xyz/ws"]}},blockExplorers:{default:{name:"Etherscan",url:"https://abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.mainnet.abs.xyz"}},contracts:{multicall3:{address:"0xAa4De41dba0Ca5dCBb288b7cC6b708F3aaC759E7",blockCreated:5288},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:5263}}}),Mw=u({...mt,blockTime:200,id:11124,name:"Abstract Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://api.testnet.abs.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.abscan.org"},native:{name:"Abstract Explorer",url:"https://explorer.testnet.abs.xyz"}},testnet:!0,contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:358349},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:431682}}}),_w=u({id:787,name:"Acala",network:"acala",nativeCurrency:{name:"Acala",symbol:"ACA",decimals:18},rpcUrls:{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}),Nw=u({id:47,name:"Acria IntelliChain",nativeCurrency:{decimals:18,name:"ACRIA",symbol:"ACRIA"},rpcUrls:{default:{http:["https://aic.acria.ai"]}},blockExplorers:{default:{name:"Acria Explorer",url:"https://explorer.acria.ai"}},testnet:!1}),Rw=u({id:1215,name:"ADF Chain",nativeCurrency:{name:"ADDFILL",symbol:"ADF",decimals:18},rpcUrls:{default:{http:["https://mainnet.adftechnology.com"]}},blockExplorers:{default:{name:"ADF Mainnet Explorer",url:"https://explorer.adftechnology.com"}},testnet:!1}),zw=u({id:9990,name:"Agung Network",nativeCurrency:{decimals:18,name:"Agung",symbol:"AGNG"},rpcUrls:{default:{http:["https://wss-async.agung.peaq.network"],webSocket:["wss://wss-async.agung.peaq.network"]}},blockExplorers:{default:{name:"Subscan",url:"https://agung-testnet.subscan.io"}},testnet:!0}),Lw=u({id:168,name:"AIOZ Network",nativeCurrency:{decimals:18,name:"AIOZ",symbol:"AIOZ"},rpcUrls:{default:{http:["https://eth-dataseed.aioz.network"]}},blockExplorers:{default:{name:"AIOZ Explorer",url:"https://explorer.aioz.network"}},testnet:!1}),$w=u({id:41455,name:"Aleph Zero",nativeCurrency:{name:"Aleph Zero",symbol:"AZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero.raas.gelato.cloud"]}},blockExplorers:{default:{name:"Aleph Zero EVM Explorer",url:"https://evm-explorer.alephzero.org",apiUrl:"https://evm-explorer.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4603377}}}),Hw=u({id:2039,name:"Aleph Zero Testnet",nativeCurrency:{name:"TZERO",symbol:"TZERO",decimals:18},rpcUrls:{default:{http:["https://rpc.alephzero-testnet.gelato.digital"],webSocket:["wss://ws.alephzero-testnet.gelato.digital"]}},blockExplorers:{default:{name:"Aleph Zero EVM Testnet explorer",url:"https://evm-explorer-testnet.alephzero.org",apiUrl:"https://evm-explorer-testnet.alephzero.org/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2861745}},testnet:!0}),Gw=u({id:10241024,name:"AlienX Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://explorer.alienxchain.io"}},testnet:!1}),jw=u({id:10241025,name:"ALIENX Hal Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://hal-rpc.alienxchain.io/http"]}},blockExplorers:{default:{name:"AlienX Explorer",url:"https://hal-explorer.alienxchain.io"}},testnet:!0}),qm={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},Eu={block:qc({format(e){var n;return{transactions:(n=e.transactions)==null?void 0:n.map(r=>{if(typeof r=="string")return r;const s=ir(r);return s.typeHex==="0x7e"&&(s.isSystemTx=r.isSystemTx,s.mint=r.mint?pe(r.mint):void 0,s.sourceHash=r.sourceHash,s.type="deposit"),s}),stateRoot:e.stateRoot}}}),transaction:yo({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?pe(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:Sl({format(e){return{l1GasPrice:e.l1GasPrice?pe(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?pe(e.l1GasUsed):null,l1Fee:e.l1Fee?pe(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function Vm(e,t){return Kw(e)?Vw(e):Ro(e,t)}const qw={transaction:Vm};function Vw(e){Ww(e);const{sourceHash:t,data:n,from:r,gas:s,isSystemTx:a,mint:o,to:i,value:c}=e,l=[t,r,i??"0x",o?ue(o):"0x",c?ue(c):"0x",s?ue(s):"0x",a?"0x1":"0x",n??"0x"];return ut(["0x7e",Lt(l)])}function Kw(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function Ww(e){const{from:t,to:n}=e;if(t&&!xe(t))throw new Oe({address:t});if(n&&!xe(n))throw new Oe({address:n})}const G={blockTime:2e3,contracts:qm,formatters:Eu,serializers:qw},Xo=1,Xw=u({...G,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:{...G.contracts,l2OutputOracle:{[Xo]:{address:"0xB09DC08428C8b4EFB4ff9C0827386CDF34277996"}},portal:{[Xo]:{address:"0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68",blockCreated:19070571}},l1StandardBridge:{[Xo]:{address:"0xd5e3eDf5b68135D559D572E26bF863FBC1950033",blockCreated:19070571}}},sourceId:Xo}),Zo=11155111,Zw=u({...G,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:{...G.contracts,l2OutputOracle:{[Zo]:{address:"0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB"}},portal:{[Zo]:{address:"0xfa1d9E26A6aCD7b22115D27572c1221B9803c960",blockCreated:4972908}},l1StandardBridge:{[Zo]:{address:"0xF6Bc0146d3c74D48306e79Ae134A260E418C9335",blockCreated:4972908}}},sourceId:Zo}),Qw=u({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"]}}}),Jw=u({id:33139,name:"ApeChain",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.apechain.com/http"],webSocket:["wss://rpc.apechain.com/ws"]}},blockExplorers:{default:{name:"Apescan",url:"https://apescan.io",apiUrl:"https://api.apescan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:20889}},sourceId:42161}),Yw=u({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}),eE=u({id:62606,name:"Apollo",nativeCurrency:{decimals:18,name:"Apollo",symbol:"APOLLO"},rpcUrls:{default:{http:["https://mainnet-rpc.apolloscan.io"]}},blockExplorers:{default:{name:"Apollo Explorer",url:"https://apolloscan.io"}}}),tE=u({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,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}}}),nE=u({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}),rE=u({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}}}),sE=u({id:421614,name:"Arbitrum Sepolia",blockTime:250,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}),aE=u({id:5042002,name:"Arc Testnet",nativeCurrency:{name:"USDC",symbol:"USDC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.arc.network","https://rpc.quicknode.testnet.arc.network","https://rpc.blockdaemon.testnet.arc.network"],webSocket:["wss://rpc.testnet.arc.network","wss://rpc.quicknode.testnet.arc.network"]}},blockExplorers:{default:{name:"ArcScan",url:"https://testnet.arcscan.app",apiUrl:"https://testnet.arcscan.app/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),oE=u({id:7897,name:"Arena-Z",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.arena-z.gg"]}},blockExplorers:{default:{name:"Arena-Z Explorer",url:"https://explorer.arena-z.gg",apiUrl:"https://explorer.arena-z.gg"}}}),iE=u({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),cE=u({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}),lE=u({id:463,name:"Areum",nativeCurrency:{decimals:18,name:"AREA",symbol:"AREA"},rpcUrls:{default:{http:["https://mainnet-rpc.areum.network"],webSocket:["wss://mainnet-ws.areum.network"]}},blockExplorers:{default:{name:"Areum Explorer",url:"https://explorer.areum.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:353286}},testnet:!1}),uE=u({id:11822,name:"Artela Testnet",nativeCurrency:{name:"ART",symbol:"ART",decimals:18},rpcUrls:{default:{http:["https://betanet-rpc1.artela.network"]}},blockExplorers:{default:{name:"Artela",url:"https://betanet-scan.artela.network",apiUrl:"https://betanet-scan.artela.network/api"}},contracts:{multicall3:{address:"0xd07c8635f76e8745Ee7092fbb6e8fbc5FeF09DD7",blockCreated:7001871}},testnet:!0}),dE=u({id:10242,name:"Arthera",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer.arthera.net",apiUrl:"https://explorer.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4502791}}}),pE=u({id:10243,name:"Arthera Testnet",nativeCurrency:{name:"Arthera",symbol:"AA",decimals:18},rpcUrls:{default:{http:["https://rpc-test.arthera.net"]}},blockExplorers:{default:{name:"Arthera EVM Explorer",url:"https://explorer-test.arthera.net",apiUrl:"https://explorer-test.arthera.net/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:22051}}}),fE=u({id:42420,name:"AssetChain Mainnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://mainnet-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Explorer",url:"https://scan.assetchain.org",apiUrl:"https://scan.assetchain.org/api"}},testnet:!1,contracts:{}}),mE=u({id:42421,name:"AssetChain Testnet",nativeCurrency:{decimals:18,name:"Real World Asset",symbol:"RWA"},rpcUrls:{default:{http:["https://enugu-rpc.assetchain.org"]}},blockExplorers:{default:{name:"Asset Chain Testnet Explorer",url:"https://scan-testnet.assetchain.org",apiUrl:"https://scan-testnet.assetchain.org/api"}},testnet:!0,contracts:{multicall3:{address:"0x989F832D35988cb5e3eB001Fa2Fe789469EC31Ea",blockCreated:17177}}}),hE=u({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}),bE=u({id:3776,name:"Astar zkEVM",network:"AstarZkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-zkevm.astar.network"]}},blockExplorers:{default:{name:"Astar zkEVM Explorer",url:"https://astar-zkevm.explorer.startale.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:93528}},testnet:!1}),yE=u({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}),xE=u({id:2340,name:"Atleta Olympia",nativeCurrency:{decimals:18,name:"Atla",symbol:"ATLA"},rpcUrls:{default:{http:["https://testnet-rpc.atleta.network:9944","https://testnet-rpc.atleta.network"],ws:["wss://testnet-rpc.atleta.network:9944"]}},blockExplorers:{default:{name:"Atleta Olympia Explorer",url:"https://blockscout.atleta.network",apiUrl:"https://blockscout.atleta.network/api"}},contracts:{multicall3:{address:"0x1472ec6392180fb84F345d2455bCC75B26577115",blockCreated:1076473}},testnet:!0}),gE=u({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}}}),wE=u({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}),EE=u({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}),kE=u({id:785,name:"Autheo Testnet",nativeCurrency:{decimals:18,name:"Autheo",symbol:"THEO"},rpcUrls:{default:{http:["https://testnet-rpc1.autheo.com","https://testnet-rpc2.autheo.com"]}},blockExplorers:{default:{name:"Autheo Testnet Block Explorer",url:"https://testnet-explorer.autheo.com/"}}}),CE=u({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),vE=u({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:"SnowTrace",url:"https://testnet.snowtrace.io",apiUrl:"https://api-testnet.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7096959}},testnet:!0}),AE=u({id:8333,name:"B3",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},sourceId:8453}),TE=u({id:1993,name:"B3 Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.b3.fun/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia.explorer.b3.fun"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}},testnet:!0,sourceId:168587773}),SE=u({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"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://www.ftnscan.com",apiUrl:"https://www.ftnscan.com/api"}}}),va=1,Km=u({...G,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:{...G.contracts,disputeGameFactory:{[va]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[va]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[va]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[va]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:va}),PE=u({...Km,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}}),BE=u({id:123420001114,name:"Basecamp Testnet",nativeCurrency:{decimals:18,name:"Camp",symbol:"CAMP"},rpcUrls:{default:{http:["https://rpc.basecamp.t.raas.gelato.cloud"]}},blockExplorers:{default:{name:"basecamp",url:"https://basecamp.cloud.blockscout.com"}},testnet:!0}),Qo=5,UE=u({...G,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:{...G.contracts,l2OutputOracle:{[Qo]:{address:"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1376988},portal:{[Qo]:{address:"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA"}},l1StandardBridge:{[Qo]:{address:"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a"}}},testnet:!0,sourceId:Qo}),Aa=11155111,Wm=u({...G,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:{...G.contracts,disputeGameFactory:{[Aa]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Aa]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Aa]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Aa]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:Aa}),IE=u({...Wm,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}}),FE=u({id:4337,name:"Beam",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{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}}}),OE=u({id:13337,name:"Beam Testnet",network:"beam",nativeCurrency:{decimals:18,name:"Beam",symbol:"BEAM"},rpcUrls:{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}),DE=u({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"}}}),ME=u({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}),_E=u({id:80094,name:"Berachain",blockTime:2e3,nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},ensRegistry:{address:"0x5b22280886a2f5e09a49bea7e320eab0e5320e28",blockCreated:877007},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:9310021}},rpcUrls:{default:{http:["https://rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://berascan.com"}},ensTlds:[".bera"],testnet:!1}),NE=u({id:80069,blockTime:2e3,name:"Berachain Bepolia",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},rpcUrls:{default:{http:["https://bepolia.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berascan",url:"https://bepolia.beratrail.io"}},testnet:!0}),RE=u({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:866924}},testnet:!0}),zE=u({id:80084,name:"Berachain bArtio",nativeCurrency:{decimals:18,name:"BERA Token",symbol:"BERA"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:109269},ensRegistry:{address:"0xB0eef18971290b333450586D33dcA6cE122651D2",blockCreated:7736794},ensUniversalResolver:{address:"0x41692Ef1EA0C79E6b73077E4A67572D2BDbD7057",blockCreated:7736795}},ensTlds:[".bera"],rpcUrls:{default:{http:["https://bartio.rpc.berachain.com"]}},blockExplorers:{default:{name:"Berachain bArtio Beratrail",url:"https://bartio.beratrail.io"}},testnet:!0}),LE=u({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"}}}),$E=u({id:3068,name:"Bifrost Mainnet",nativeCurrency:{name:"BFC",symbol:"BFC",decimals:18},rpcUrls:{default:{http:["https://public-01.mainnet.bifrostnetwork.com/rpc"]}},blockExplorers:{default:{name:"Bifrost Blockscout",url:"https://explorer.mainnet.bifrostnetwork.com"}},testnet:!1}),HE=u({id:53456,name:"BirdLayer",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.birdlayer.xyz","https://rpc1.birdlayer.xyz"],webSocket:["wss://rpc.birdlayer.xyz/ws"]}},blockExplorers:{default:{name:"BirdLayer Explorer",url:"https://scan.birdlayer.xyz"}}}),GE=u({id:32520,name:"Bitgert Mainnet",nativeCurrency:{decimals:18,name:"Brise",symbol:"Brise"},rpcUrls:{default:{http:["https://rpc-bitgert.icecreamswap.com"]}},blockExplorers:{default:{name:"Bitgert Scan",url:"https://brisescan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2118034}},testnet:!1}),jE=u({id:96,name:"KUB Mainnet",nativeCurrency:{name:"KUB Coin",symbol:"KUB",decimals:18},rpcUrls:{default:{http:["https://rpc.bitkubchain.io"]}},blockExplorers:{default:{name:"KUB Chain Mainnet Explorer",url:"https://www.bkcscan.com",apiUrl:"https://www.bkcscan.com/api"}}}),qE=u({id:25925,name:"Bitkub Testnet",network:"Bitkub Testnet",nativeCurrency:{name:"Bitkub Test",symbol:"tKUB",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.bitkubchain.io"]}},blockExplorers:{default:{name:"Bitkub Chain Testnet Explorer",url:"https://testnet.bkcscan.com",apiUrl:"https://testnet.bkcscan.com/api"}},testnet:!0}),VE=u({id:200901,name:"Bitlayer Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org"],webSocket:["wss://ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer mainnet scan",url:"https://www.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:2421963}}}),KE=u({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bitlayer.org"],webSocket:["wss://testnet-ws.bitlayer.org"]}},blockExplorers:{default:{name:"bitlayer testnet scan",url:"https://testnet.btrscan.com"}},contracts:{multicall3:{address:"0x5B256fE9e993902eCe49D138a5b1162cBb529474",blockCreated:4135671}},testnet:!0}),WE=u({id:7171,name:"Bitrock Mainnet",nativeCurrency:{name:"BROCK",symbol:"BROCK",decimals:18},rpcUrls:{default:{http:["https://brockrpc.io"]}},blockExplorers:{default:{name:"Bitrock Explorer",url:"https://explorer.bit-rock.io"}},testnet:!1}),XE=u({id:199,name:"BitTorrent",network:"bittorrent-chain-mainnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://rpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://bttcscan.com",apiUrl:"https://api.bttcscan.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:31078552}}}),ZE=u({id:1028,name:"BitTorrent Chain Testnet",network:"bittorrent-chain-testnet",nativeCurrency:{name:"BitTorrent",symbol:"BTT",decimals:18},rpcUrls:{default:{http:["https://testrpc.bittorrentchain.io"]}},blockExplorers:{default:{name:"Bttcscan",url:"https://testnet.bttcscan.com",apiUrl:"https://testnet.bttcscan.com/api"}},testnet:!0}),Jo=1,QE=u({...G,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:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:212929},l2OutputOracle:{[Jo]:{address:"0x826D1B0D4111Ad9146Eb8941D7Ca2B6a44215c76",blockCreated:19300358}},portal:{[Jo]:{address:"0x0Ec68c5B10F21EFFb74f2A5C61DFe6b08C0Db6Cb",blockCreated:19300357}},l1StandardBridge:{[Jo]:{address:"0x697402166Fbf2F22E970df8a6486Ef171dbfc524",blockCreated:19300360}}},sourceId:Jo}),JE=u({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:11155111}),ku=1,YE=u({...G,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:"BOB Explorer",url:"https://explorer.gobob.xyz"}},contracts:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:23131},l2OutputOracle:{[ku]:{address:"0xdDa53E23f8a32640b04D7256e651C1db98dB11C1",blockCreated:4462615}},portal:{[ku]:{address:"0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E",blockCreated:4462615}}},sourceId:ku}),e7=u({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}}}),t7=u({id:28882,name:"Boba Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.boba.network"]}},blockExplorers:{default:{name:"BOBAScan",url:"https://testnet.bobascan.com"}},testnet:!0}),Cu=11155111,n7=u({...G,id:808813,name:"BOB Sepolia",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://bob-sepolia.rpc.gobob.xyz"],webSocket:["wss://bob-sepolia.rpc.gobob.xyz"]}},blockExplorers:{default:{name:"BOB Sepolia Explorer",url:"https://bob-sepolia.explorer.gobob.xyz"}},contracts:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:35677},l2OutputOracle:{[Cu]:{address:"0x14D0069452b4AE2b250B395b8adAb771E4267d2f",blockCreated:4462615}},portal:{[Cu]:{address:"0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4",blockCreated:4462615}}},testnet:!0,sourceId:Cu}),r7=u({id:11100,name:"Bool Beta Mainnet",nativeCurrency:{decimals:18,name:"BOL",symbol:"BOL"},rpcUrls:{default:{http:["https://beta-rpc-node-http.bool.network"]}},blockExplorers:{default:{name:"BoolScan",url:"https://beta-mainnet.boolscan.com/"}},testnet:!1}),s7=u({id:3637,name:"Botanix",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.botanixlabs.com"],webSocket:["wss://rpc.botanixlabs.com/ws"]}},blockExplorers:{default:{name:"Botanixscan",url:"https://botanixscan.io"}}}),a7=u({id:3636,name:"Botanix Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://node.botanixlabs.dev"]}},blockExplorers:{default:{name:"Botanix Testnet Explorer",url:"https://testnet.botanixscan.io"}},testnet:!0}),o7=u({id:6001,name:"BounceBit Mainnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-mainnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://bbscan.io"}},testnet:!1}),i7=u({id:6e3,name:"BounceBit Testnet",nativeCurrency:{name:"BounceBit",symbol:"BB",decimals:18},rpcUrls:{default:{http:["https://fullnode-testnet.bouncebitapi.com"]}},blockExplorers:{default:{name:"BB Scan",url:"https://testnet.bbscan.io"}},testnet:!0}),c7=u({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"}}}),l7=u({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}),u7=u({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),d7=u({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}),p7=u({id:97,name:"BNB 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://api-testnet.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),f7=u({id:223,name:"B2",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.bsquared.network"}}}),m7=u({id:1123,name:"B2 Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.bsquared.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-explorer.bsquared.network"}},testnet:!0}),h7=u({id:200901,name:"Bitlayer",nativeCurrency:{name:"Bitcoin",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://rpc.bitlayer.org","https://rpc.bitlayer-rpc.com"],webSocket:["wss://ws.bitlayer.org","wss://ws.bitlayer-rpc.com"]}},blockExplorers:{default:{name:"Bitlayer(BTR) Scan",url:"https://www.btrscan.com"}}}),b7=u({id:200810,name:"Bitlayer Testnet",nativeCurrency:{name:"Bitcoin",symbol:"BTC",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:"Bitlayer(BTR) Scan",url:"https://testnet.btrscan.com"}},testnet:!0}),y7=u({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"}}}),x7=u({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}),g7=u({id:13370,name:"Cannon",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),w7=u({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}}}),E7={estimateFeesPerGas:async e=>{var s;if(!((s=e.request)!=null&&s.feeCurrency))return null;const[t,n]=await Promise.all([k7(e.client,e.request.feeCurrency),C7(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-n)+n,maxPriorityFeePerGas:n}}};async function k7(e,t){const n=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(n)}async function C7(e,t){const n=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(n)}function Xm(e){return e===0||e===0n||e===void 0||e===null||e==="0"||e===""||typeof e=="string"&&(Qe(e).toLowerCase()==="0x"||Qe(e).toLowerCase()==="0x00")}function Ta(e){return!Xm(e)}function v7(e){return typeof e.maxFeePerGas<"u"&&typeof e.maxPriorityFeePerGas<"u"}function Zm(e){return e.type==="cip64"?!0:v7(e)&&Ta(e.feeCurrency)}const A7={block:qc({format(e){var n;return{transactions:(n=e.transactions)==null?void 0:n.map(r=>typeof r=="string"?r:{...ir(r),...r.gatewayFee?{gatewayFee:pe(r.gatewayFee),gatewayFeeRecipient:r.gatewayFeeRecipient}:{},feeCurrency:r.feeCurrency})}}}),transaction:yo({format(e){if(e.type==="0x7e")return{isSystemTx:e.isSystemTx,mint:e.mint?pe(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};const t={feeCurrency:e.feeCurrency};return e.type==="0x7b"?t.type="cip64":(e.type==="0x7c"&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?pe(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:$c({format(e){const t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),Zm(e)&&(t.type="0x7b"),t}})};function T7(e,t){return Zm(e)?P7(e,t):Vm(e,t)}const S7={transaction:T7};function P7(e,t){U7(e);const{chainId:n,gas:r,nonce:s,to:a,value:o,maxFeePerGas:i,maxPriorityFeePerGas:c,accessList:l,feeCurrency:d,data:p}=e,f=[ue(n),s?ue(s):"0x",c?ue(c):"0x",i?ue(i):"0x",r?ue(r):"0x",a??"0x",o?ue(o):"0x",p??"0x",ga(l),d,...ts(e,t)];return ut(["0x7b",Lt(f)])}const B7=or;function U7(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:s,to:a,feeCurrency:o}=e;if(t<=0)throw new Jr({chainId:t});if(a&&!xe(a))throw new Oe({address:a});if(r)throw new R("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(Ta(s)&&s>B7)throw new An({maxFeePerGas:s});if(Ta(n)&&Ta(s)&&n>s)throw new Kr({maxFeePerGas:s,maxPriorityFeePerGas:n});if(Ta(o)&&!xe(o))throw new R("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(Xm(o))throw new R("`feeCurrency` must be provided for CIP-64 transactions.")}const Sa={blockTime:1e3,contracts:qm,formatters:A7,serializers:S7,fees:E7},I7=u({...Sa,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}),Yo=17e3,F7=u({...Sa,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 Alfajores Explorer",url:"https://celo-alfajores.blockscout.com",apiUrl:"https://celo-alfajores.blockscout.com/api"}},contracts:{...Sa.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001},portal:{[Yo]:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{[Yo]:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{[Yo]:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{[Yo]:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0}),vu=11155111,O7=u({...Sa,id:11142220,name:"Celo Sepolia Testnet",nativeCurrency:{decimals:18,name:"CELO",symbol:"S-CELO"},rpcUrls:{default:{http:["https://forno.celo-sepolia.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Sepolia Explorer",url:"https://celo-sepolia.blockscout.com/",apiUrl:"https://celo-sepolia.blockscout.com/api"}},contracts:{...Sa.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1},portal:{[vu]:{address:"0x44ae3d41a335a7d05eb533029917aad35662dcc2",blockCreated:8825790}},disputeGameFactory:{[vu]:{address:"0x57c45d82d1a995f1e135b8d7edc0a6bb5211cfaa",blockCreated:8825790}},l1StandardBridge:{[vu]:{address:"0xec18a3c30131a0db4246e785355fbc16e2eaf408",blockCreated:8825790}}},testnet:!0}),D7=u({id:5858,name:"Chang Chain Foundation Mainnet",nativeCurrency:{decimals:18,name:"CTH",symbol:"CTH"},rpcUrls:{default:{http:["https://rpc.cthscan.com"]}},blockExplorers:{default:{name:"Chang Chain explorer",url:"https://cthscan.com"}}}),M7=u({id:88888,name:"Chiliz Chain",network:"chiliz-chain",nativeCurrency:{decimals:18,name:"CHZ",symbol:"CHZ"},rpcUrls:{default:{http:["https://rpc.chiliz.com"]}},blockExplorers:{default:{name:"Chiliz Explorer",url:"https://scan.chiliz.com",apiUrl:"https://scan.chiliz.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8080847}}}),_7=u({id:2882,name:"Chips Network",network:"CHIPS",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://node.chips.ooo/wasp/api/v1/chains/iota1pp3d3mnap3ufmgqnjsnw344sqmf5svjh26y2khnmc89sv6788y3r207a8fn/evm"]}}}),N7=u({id:5115,name:"Citrea Testnet",nativeCurrency:{name:"cBTC",symbol:"cBTC",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.citrea.xyz"]}},blockExplorers:{default:{name:"Citrea Explorer",url:"https://explorer.testnet.citrea.xyz",apiUrl:"https://explorer.testnet.citrea.xyz/api"}},testnet:!0}),R7=u({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"}}}),z7=u({id:112,name:"Coinbit Mainnet",nativeCurrency:{name:"GIDR",symbol:"GIDR",decimals:18},rpcUrls:{default:{http:["https://coinbit-rpc-mainnet.chain.sbcrypto.app"]}},blockExplorers:{default:{name:"Coinbit Explorer",url:"https://coinbit-explorer.chain.sbcrypto.app"}},testnet:!1}),L7=u({id:52,name:"CoinEx Mainnet",nativeCurrency:{name:"cet",symbol:"cet",decimals:18},rpcUrls:{default:{http:["https://rpc.coinex.net"]}},blockExplorers:{default:{name:"CoinEx Explorer",url:"https://www.coinex.net"}},testnet:!1}),$7=u({id:1030,name:"Conflux eSpace",nativeCurrency:{name:"Conflux",symbol:"CFX",decimals:18},rpcUrls:{default:{http:["https://evm.confluxrpc.com"],webSocket:["wss://evm.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evm.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:68602935}}}),H7=u({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.com"],webSocket:["wss://evmtestnet.confluxrpc.com/ws"]}},blockExplorers:{default:{name:"ConfluxScan",url:"https://evmtestnet.confluxscan.org"}},contracts:{multicall3:{address:"0xEFf0078910f638cd81996cc117bccD3eDf2B072F",blockCreated:117499050}}}),G7=u({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}),j7=u({id:1115,name:"Core Testnet",nativeCurrency:{decimals:18,name:"tCore",symbol:"TCORE"},rpcUrls:{default:{http:["https://rpc.test.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet",url:"https://scan.test.btcs.network",apiUrl:"https://api.test.btcs.network/api"}},contracts:{multicall3:{address:"0xCcddF20A1932537123C2E48Bd8e00b108B8f7569",blockCreated:29350509}},testnet:!0}),q7=u({id:1114,name:"Core Testnet2",nativeCurrency:{decimals:18,name:"tCore2",symbol:"TCORE2"},rpcUrls:{default:{http:["https://rpc.test2.btcs.network"]}},blockExplorers:{default:{name:"Core Testnet2",url:"https://scan.test2.btcs.network",apiUrl:"https://api.test2.btcs.network/api"}},contracts:{multicall3:{address:"0x3CB285ff3Cd5C7C7e570b1E7DE3De17A0f985e56",blockCreated:3838600}},testnet:!0}),V7=u({id:21e6,name:"Corn",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Explorer",url:"https://cornscan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/21000000/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3228}},sourceId:1}),K7=u({id:21000001,name:"Corn Testnet",nativeCurrency:{decimals:18,name:"Bitcorn",symbol:"BTCN"},rpcUrls:{default:{http:["https://21000001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Corn Testnet Explorer",url:"https://testnet.cornscan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/21000001/etherscan/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:4886}},testnet:!0,sourceId:11155111}),W7=u({id:44,name:"Crab Network",nativeCurrency:{decimals:18,name:"Crab Network Native Token",symbol:"CRAB"},rpcUrls:{default:{http:["https://crab-rpc.darwinia.network"],webSocket:["wss://crab-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://crab-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3032593}}}),X7=u({id:66665,name:"Creator",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.creatorchain.io"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.creatorchain.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),Z7=u({id:102032,name:"Creditcoin Devnet",nativeCurrency:{name:"Devnet CTC",symbol:"devCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-devnet.creditcoin.network"],webSocket:["wss://rpc.cc3-devnet.creditcoin.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-devnet.blockscout.com",apiUrl:"https://creditcoin3-dev.subscan.io"}},testnet:!0}),Q7=u({id:102030,name:"Creditcoin",nativeCurrency:{name:"Creditcoin",symbol:"CTC",decimals:18},rpcUrls:{default:{http:["https://mainnet3.creditcoin.network"],webSocket:["wss://mainnet3.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin.blockscout.com",apiUrl:"https://creditcoin.blockscout.com/api"}},testnet:!1}),J7=u({id:102031,name:"Creditcoin Testnet",nativeCurrency:{name:"Creditcoin Testnet",symbol:"tCTC",decimals:18},rpcUrls:{default:{http:["https://rpc.cc3-testnet.creditcoin.network"],webSocket:["wss://rpc.cc3-testnet.creditcoin.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://creditcoin-testnet.blockscout.com",apiUrl:"https://creditcoin-testnet.blockscout.com/api"}},testnet:!0}),Y7=u({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}}}),e9=u({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 (Testnet)",url:"https://explorer.cronos.org/testnet"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:10191251}},testnet:!0}),t9=u({id:388,name:"Cronos zkEVM Mainnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM CRO",symbol:"zkCRO"},rpcUrls:{default:{http:["https://mainnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM (Mainnet) Chain Explorer",url:"https://explorer.zkevm.cronos.org"}},contracts:{multicall3:{address:"0x06f4487d7c4a5983d2660db965cc6d2565e4cfaa",blockCreated:72}}}),n9=u({id:282,name:"Cronos zkEVM Testnet",nativeCurrency:{decimals:18,name:"Cronos zkEVM Test Coin",symbol:"zkTCRO"},rpcUrls:{default:{http:["https://testnet.zkevm.cronos.org"]}},blockExplorers:{default:{name:"Cronos zkEVM Testnet Explorer",url:"https://explorer.zkevm.cronos.org/testnet"}},testnet:!0}),r9=u({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}}}),s9=u({id:4158,name:"CrossFi Mainnet",nativeCurrency:{decimals:18,name:"CrossFi",symbol:"XFI"},rpcUrls:{default:{http:["https://rpc.mainnet.ms"]}},blockExplorers:{default:{name:"CrossFi Blockchain Explorer",url:"https://xfiscan.com"}},testnet:!1}),a9=u({id:33111,name:"Curtis",nativeCurrency:{name:"ApeCoin",symbol:"APE",decimals:18},rpcUrls:{default:{http:["https://rpc.curtis.apechain.com"]}},blockExplorers:{default:{name:"Curtis Explorer",url:"https://explorer.curtis.apechain.com"}},testnet:!0}),o9=u({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}}}),i9=u({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}),c9=u({id:824,name:"Daily Network Mainnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.mainnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Mainnet Explorer",url:"https://explorer.mainnet.dailycrypto.net"}},testnet:!1}),l9=u({id:825,name:"Daily Network Testnet",nativeCurrency:{decimals:18,name:"Daily",symbol:"DLY"},rpcUrls:{default:{http:["https://rpc.testnet.dailycrypto.net"]}},blockExplorers:{default:{name:"Daily Testnet Explorer",url:"https://explorer.testnet.dailycrypto.net"}},testnet:!0}),u9=u({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://explorer.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69420}}}),d9=u({id:55931,name:"Datahaven Testnet",nativeCurrency:{decimals:18,name:"MOCK",symbol:"MOCK"},rpcUrls:{default:{http:["https://services.datahaven-testnet.network/testnet"],webSocket:["wss://services.datahaven-testnet.network/testnet"]}},blockExplorers:{default:{name:"DhScan",url:"https://testnet.dhscan.io/",apiUrl:"https://testnet.dhscan.io/api-docs"}},contracts:{},testnet:!0}),p9=u({id:20240603,name:"DBK chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.dbkchain.io"]}},blockExplorers:{default:{name:"DBK Chain Explorer",url:"https://scan.dbkchain.io"}},testnet:!1}),f9=u({...G,id:2716446429837e3,name:"Dchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchain-2716446429837000-1.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchain-2716446429837000-1.sagaexplorer.io",apiUrl:"https://api-dchain-2716446429837000-1.sagaexplorer.io/api"}},contracts:{...G.contracts}}),m9=u({...G,id:2713017997578e3,name:"Dchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://dchaintestnet-2713017997578000-1.jsonrpc.testnet.sagarpc.io"]}},blockExplorers:{default:{name:"Dchain Explorer",url:"https://dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io",apiUrl:"https://api-dchaintestnet-2713017997578000-1.testnet.sagaexplorer.io/api"}},contracts:{...G.contracts}}),h9=u({id:1130,network:"defichain-evm",name:"DeFiChain EVM Mainnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{http:["https://eth.mainnet.ocean.jellyfishsdk.com"]}},blockExplorers:{default:{name:"DeFiScan",url:"https://meta.defiscan.live"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:137852}}}),b9=u({id:1131,network:"defichain-evm-testnet",name:"DeFiChain EVM Testnet",nativeCurrency:{name:"DeFiChain",symbol:"DFI",decimals:18},rpcUrls:{default:{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}),y9=u({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"}}}),x9=u({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}}}),g9=u({id:15,name:"Diode Prenet",nativeCurrency:{decimals:18,name:"DIODE",symbol:"DIODE"},rpcUrls:{default:{http:["https://prenet.diode.io:8443"],webSocket:["wss://prenet.diode.io:8443/ws"]}},blockExplorers:{default:{name:"Diode Explorer",url:"https://diode.io/prenet"}},testnet:!1}),w9=u({id:513100,name:"DisChain",nativeCurrency:{decimals:18,name:"DIS",symbol:"DIS"},rpcUrls:{default:{http:["https://rpc.dischain.xyz"]}},blockExplorers:{default:{name:"DisChain Explorer",url:"https://www.oklink.com/dis"}}}),E9=u({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}),k9=u({id:2e3,name:"Dogechain",nativeCurrency:{decimals:18,name:"Wrapped Dogecoin",symbol:"WDOGE"},rpcUrls:{default:{http:["https://rpc.dogechain.dog"]}},blockExplorers:{default:{name:"DogeChainExplorer",url:"https://explorer.dogechain.dog",apiUrl:"https://explorer.dogechain.dog/api"}},contracts:{multicall3:{address:"0x68a8609a60a008EFA633dfdec592c03B030cC508",blockCreated:25384031}}}),C9=u({id:97476,name:"Doma Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc-testnet.doma.xyz"]}},blockExplorers:{default:{name:"Doma Testnet Explorer",url:"https://explorer-testnet.doma.xyz"}},testnet:!0}),v9=u({id:42026,name:"Donatuz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.donatuz.com"]}},blockExplorers:{default:{name:"Donatuz Explorer",url:"https://explorer.donatuz.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),A9=u({id:7979,name:"DOS Chain",nativeCurrency:{decimals:18,name:"DOS Chain",symbol:"DOS"},rpcUrls:{default:{http:["https://main.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Explorer",url:"https://doscan.io",apiUrl:"https://api.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:161908}}}),T9=u({id:3939,name:"DOS Chain Testnet",nativeCurrency:{decimals:18,name:"DOS Chain Testnet",symbol:"DOS"},rpcUrls:{default:{http:["https://test.doschain.com"]}},blockExplorers:{default:{name:"DOS Chain Testnet Explorer",url:"https://test.doscan.io",apiUrl:"https://api-test.doscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:69623}},testnet:!0}),S9=u({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"}}}),P9=u({id:23452,name:"DreyerX Testnet",nativeCurrency:{name:"DreyerX",symbol:"DRX",decimals:18},rpcUrls:{default:{http:["http://testnet-rpc.dreyerx.com"]}},blockExplorers:{default:{name:"DreyerX Testnet Scan",url:"https://testnet-scan.dreyerx.com"}},testnet:!0}),B9=u({id:555888,name:"DustBoy IoT",nativeCurrency:{name:"Ether",symbol:"DST",decimals:18},rpcUrls:{default:{http:["https://dustboy-rpc.jibl2.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://dustboy.jibl2.com",apiUrl:"https://dustboy.jibl2.com/api"}},contracts:{multicall3:{address:"0xFFD34aa2C62B2D52E00A361e466C229788f4eD6a",blockCreated:526569}},testnet:!1}),U9=u({id:1100,name:"Dymension",nativeCurrency:{name:"DYM",symbol:"DYM",decimals:18},rpcUrls:{default:{http:["https://dymension-evm-rpc.publicnode.com"],webSocket:["wss://dymension-evm-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Dym FYI",url:"https://dym.fyi"}},testnet:!1}),I9=u({id:5424,name:"edeXa",nativeCurrency:{name:"edeXa",symbol:"EDX",decimals:18},rpcUrls:{default:{http:["https://rpc.edexa.network"]}},blockExplorers:{default:{name:"edeXa Explorer",url:"https://explorer.edexa.network",apiUrl:"https://explorer.edexa.network/api/v2"}}}),F9=u({id:1995,name:"edeXa Testnet",nativeCurrency:{name:"edeXa",symbol:"tEDX",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.edexa.network"]}},blockExplorers:{default:{name:"edeXa Testnet Explorer",url:"https://explorer.testnet.edexa.network",apiUrl:"https://explorer.testnet.edexa.network/api/v2"}},testnet:!0}),O9=u({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"}}}),D9=u({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"}}}),M9=u({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}}}),_9=u({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"}}}),N9=u({id:41923,name:"EDU Chain",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.edu-chain.raas.gelato.cloud"]}},blockExplorers:{default:{name:"EDU Chain Explorer",url:"https://educhain.blockscout.com/"}},testnet:!1}),R9=u({id:656476,name:"EDU Chain Testnet",nativeCurrency:{decimals:18,name:"EDU",symbol:"EDU"},rpcUrls:{default:{http:["https://rpc.open-campus-codex.gelato.digital/"],webSocket:["wss://ws.open-campus-codex.gelato.digital"]}},blockExplorers:{default:{name:"EDU Chain Testnet Explorer",url:"https://opencampus-codex.blockscout.com",apiUrl:"https://opencampus-codex.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15514133}},testnet:!0}),z9=u({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"}}}),L9=u({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}),$9=u({id:20,name:"Elastos Smart Chain",nativeCurrency:{name:"ELA",symbol:"ELA",decimals:18},rpcUrls:{default:{http:["https://api2.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc.elastos.io"}},testnet:!1}),H9=u({id:21,name:"Elastos Smart Chain Testnet",nativeCurrency:{name:"tELA",symbol:"tELA",decimals:18},rpcUrls:{default:{http:["https://api-testnet.elastos.io/eth"]}},blockExplorers:{default:{name:"Elastos Explorer",url:"https://esc-testnet.elastos.io"}},testnet:!0}),G9=u({id:52014,name:"Electroneum Mainnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.electroneum.com"}},testnet:!1}),j9=u({id:5201420,name:"Electroneum Testnet",nativeCurrency:{name:"ETN",symbol:"ETN",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.electroneum.com"]}},blockExplorers:{default:{name:"Electroneum Block Explorer",url:"https://blockexplorer.thesecurityteam.rocks"}},testnet:!0}),q9=u({...G,id:1338,name:"Elysium Testnet",nativeCurrency:{decimals:18,name:"LAVA",symbol:"LAVA"},rpcUrls:{default:{http:["https://elysium-test-rpc.vulcanforged.com"]}},blockExplorers:{default:{name:"Elysium testnet explorer",url:"https://elysium-explorer.vulcanforged.com"}},testnet:!0}),V9=u({id:246,name:"Energy Mainnet",nativeCurrency:{name:"EWT",symbol:"EWT",decimals:18},rpcUrls:{default:{http:["https://rpc.energyweb.org"]}},blockExplorers:{default:{name:"EnergyWeb Explorer",url:"https://explorer.energyweb.org"}},testnet:!1}),K9=u({id:173,name:"ENI Mainnet",nativeCurrency:{decimals:18,name:"ENI",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc.eniac.network"]}},blockExplorers:{default:{name:"ENI Explorer",url:"https://scan.eniac.network"}},testnet:!1}),W9=u({id:6912115,name:"ENI Testnet",nativeCurrency:{decimals:18,name:"ENI Testnet Token",symbol:"ENI"},rpcUrls:{default:{http:["https://rpc-testnet.eniac.network"]}},blockExplorers:{default:{name:"ENI Testnet Explorer",url:"https://scan-testnet.eniac.network"}},testnet:!0}),X9=u({id:119,name:"ENULS Mainnet",nativeCurrency:{decimals:18,name:"NULS",symbol:"NULS"},rpcUrls:{default:{http:["https://evmapi2.nuls.io"]}},blockExplorers:{default:{name:"ENULS Explorer",url:"https://evmscan.nuls.io"}},testnet:!1}),Z9=u({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:{}}),Q9=u({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}}}),J9=u({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}),Y9=u({id:140,name:"Eteria",nativeCurrency:{name:"Eteria",symbol:"ERA",decimals:18},rpcUrls:{default:{http:["https://mainnet.eteria.io/v1"]}},blockExplorers:{default:{name:"Eteria Explorer",url:"https://explorer.eteria.io",apiUrl:"https://explorer.eteria.io/api"}}}),ek=u({id:42793,name:"Etherlink",blockTime:4830,nativeCurrency:{decimals:18,name:"Tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.mainnet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink",url:"https://explorer.etherlink.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:33899}}}),tk=u({id:127823,name:"Etherlink Shadownet Testnet",nativeCurrency:{decimals:18,name:"tez",symbol:"XTZ"},rpcUrls:{default:{http:["https://node.shadownet.etherlink.com"]}},blockExplorers:{default:{name:"Etherlink Shadownet Testnet Explorer",url:"https://shadownet.explorer.etherlink.com"}},testnet:!0}),nk=u({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}),rk=u({id:183,name:"Ethernity",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.ethernitychain.io"]}},blockExplorers:{default:{name:"Ethernity Explorer",url:"https://ernscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),sk=u({id:20256789,name:"ETP Mainnet",nativeCurrency:{decimals:18,name:"ETP Chain Native Token",symbol:"ETP"},rpcUrls:{default:{http:["https://rpc.etpscan.xyz"]}},blockExplorers:{default:{name:"ETP Scan",url:"https://etpscan.xyz"}}}),ak=u({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"}}}),ok=u({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/"}}}),ik=u({id:22052002,name:"Excelon Mainnet",network:"XLON",nativeCurrency:{decimals:18,name:"Excelon",symbol:"xlon"},rpcUrls:{default:{http:["https://edgewallet1.xlon.org"]}},blockExplorers:{default:{name:"Excelon explorer",url:"https://explorer.excelon.io"}}}),ck=u({id:2,name:"Expanse Network",nativeCurrency:{decimals:18,name:"EXP",symbol:"EXP"},rpcUrls:{default:{http:["https://node.expanse.tech"]}},blockExplorers:{default:{name:"Expanse Explorer",url:"https://explorer.expanse.tech"}},testnet:!1}),lk=u({id:7200,name:"exSat Network",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan.exsat.network",apiUrl:"https://scan.exsat.network/api"}}}),uk=u({id:839999,name:"exSat Testnet",nativeCurrency:{decimals:18,name:"BTC",symbol:"BTC"},rpcUrls:{default:{http:["https://evm-tst3.exsat.network"]}},blockExplorers:{default:{name:"exSat Explorer",url:"https://scan-testnet.exsat.network",apiUrl:"https://scan-testnet.exsat.network/api"}}}),dk=u({id:250,name:"Fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://250.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"FTMScan",url:"https://ftmscan.com",apiUrl:"https://api.ftmscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),pk=u({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}),fk=u({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}},testnet:!0}),mk=u({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"}}}),hk=u({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}}}),bk=u({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}),yk=u({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}),xk=u({id:253368190,name:"Flame",network:"flame",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.flame.astria.org"],webSocket:["wss://ws.flame.astria.org"]}},blockExplorers:{default:{name:"Flame Explorer",url:"https://explorer.flame.astria.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6829148}}}),gk=u({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3002461}}}),wk=u({id:114,name:"Flare Testnet Coston2",nativeCurrency:{decimals:18,name:"Coston2 Flare",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}),Ek=u({id:747,name:"Flow EVM Mainnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://mainnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Mainnet Explorer",url:"https://evm.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6205}},blockTime:800}),kk=u({id:646,name:"Flow EVM 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}}}),Ck=u({id:545,name:"Flow EVM Testnet",nativeCurrency:{decimals:18,name:"Flow",symbol:"FLOW"},rpcUrls:{default:{http:["https://testnet.evm.nodes.onflow.org"]}},blockExplorers:{default:{name:"Flow Diver",url:"https://evm-testnet.flowscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:137518}},testnet:!0,blockTime:800}),vk=u({id:9999999,name:"Fluence",nativeCurrency:{name:"FLT",symbol:"FLT",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.fluence.dev"],webSocket:["wss://ws.mainnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.mainnet.fluence.dev",apiUrl:"https://blockscout.mainnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:207583}}}),Ak=u({id:123420000220,name:"Fluence Stage",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.stage.fluence.dev"],webSocket:["wss://ws.stage.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.stage.fluence.dev",apiUrl:"https://blockscout.stage.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83227}},testnet:!0}),Tk=u({id:52164803,name:"Fluence Testnet",nativeCurrency:{name:"tFLT",symbol:"tFLT",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.fluence.dev"],webSocket:["wss://ws.testnet.fluence.dev"]}},blockExplorers:{default:{name:"Blockscout",url:"https://blockscout.testnet.fluence.dev",apiUrl:"https://blockscout.testnet.fluence.dev/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96424}},testnet:!0}),Sk=u({id:20993,name:"Fluent Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.dev.gblend.xyz"]}},blockExplorers:{default:{name:"Fluent Explorer",url:"https://blockscout.dev.gblend.xyz"}},testnet:!0}),cs=1,Pk=u({id:478,name:"Form Network",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.form.network/http"],webSocket:["wss://rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Explorer",url:"https://explorer.form.network"}},contracts:{...G.contracts,addressManager:{[cs]:{address:"0x15c249E46A2F924C2dB3A1560CF86729bAD1f07B"}},l1CrossDomainMessenger:{[cs]:{address:"0xF333158DCCad1dF6C3F0a3aEe8BC31fA94d9eD5c"}},l2OutputOracle:{[cs]:{address:"0x4ccAAF69F41c5810cA875183648B577CaCf1F67E"}},portal:{[cs]:{address:"0x4E259Ee5F4136408908160dD32295A5031Fa426F"}},l1StandardBridge:{[cs]:{address:"0xdc20aA63D3DE59574E065957190D8f24e0F7B8Ba"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:cs}),Bk=u({id:984122,name:"Forma",network:"forma",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.forma.art"],webSocket:["wss://ws.forma.art"]}},blockExplorers:{default:{name:"Forma Explorer",url:"https://explorer.forma.art"}},contracts:{multicall3:{address:"0xd53C6FFB123F7349A32980F87faeD8FfDc9ef079",blockCreated:252705}}}),ls=11155111,Uk=u({id:132902,name:"Form Testnet",nativeCurrency:{decimals:18,name:"Ethereum",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia-rpc.form.network/http"],webSocket:["wss://sepolia-rpc.form.network/ws"]}},blockExplorers:{default:{name:"Form Testnet Explorer",url:"https://sepolia-explorer.form.network"}},contracts:{...G.contracts,addressManager:{[ls]:{address:"0xd5C38fa934f7fd7477D4800F4f38a1c5BFdF1373"}},l1CrossDomainMessenger:{[ls]:{address:"0x37A68565c4BE9700b3E3Ec60cC4416cAC3052FAa"}},l2OutputOracle:{[ls]:{address:"0x9eA2239E65a59EC9C7F1ED4C116dD58Da71Fc1e2"}},portal:{[ls]:{address:"0x60377e3cE15dF4CCA24c4beF076b60314240b032"}},l1StandardBridge:{[ls]:{address:"0xD4531f633942b2725896F47cD2aFd260b44Ab1F7"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0,sourceId:ls}),Ik=u({id:80931,name:"Forta Chain",nativeCurrency:{symbol:"FORT",name:"FORT",decimals:18},rpcUrls:{default:{http:["https://rpc-forta-chain-8gj1qndmfc.t.conduit.xyz"]}},blockExplorers:{default:{name:"Forta Explorer",url:"https://explorer.forta.org"}}}),Fk=u({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"]}}}),ei=1,Ok=u({...G,id:252,name:"Fraxtal",nativeCurrency:{name:"Frax",symbol:"FRAX",decimals:18},rpcUrls:{default:{http:["https://rpc.frax.com"]}},blockExplorers:{default:{name:"fraxscan",url:"https://fraxscan.com",apiUrl:"https://api.fraxscan.com/api"}},contracts:{...G.contracts,l2OutputOracle:{[ei]:{address:"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[ei]:{address:"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D",blockCreated:19135323}},l1StandardBridge:{[ei]:{address:"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2",blockCreated:19135323}}},sourceId:ei}),ti=17e3,Dk=u({...G,id:2522,name:"Fraxtal Testnet",nativeCurrency:{name:"Frax",symbol:"FRAX",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:{...G.contracts,l2OutputOracle:{[ti]:{address:"0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[ti]:{address:"0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d",blockCreated:318416}},l1StandardBridge:{[ti]:{address:"0x0BaafC217162f64930909aD9f2B27125121d6332",blockCreated:318416}}},sourceId:ti}),Mk=u({...G,id:33979,name:"Funki",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.funkichain.com"]}},blockExplorers:{default:{name:"Funki Mainnet Explorer",url:"https://funkiscan.io"}},contracts:{...G.contracts},sourceId:1}),_k=u({...G,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:{...G.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},sourceId:11155111}),Nk=u({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}}}),Rk=u({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"}}}),zk=u({id:32659,name:"Fusion Mainnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://mainnet.fusionnetwork.io"],webSocket:["wss://mainnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10441605}},testnet:!1}),Lk=u({id:46688,name:"Fusion Testnet",nativeCurrency:{name:"Fusion",symbol:"FSN",decimals:18},rpcUrls:{default:{http:["https://testnet.fusionnetwork.io"],webSocket:["wss://testnet.fusionnetwork.io"]}},blockExplorers:{default:{name:"FSNscan",url:"https://testnet.fsnscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:10428309}},testnet:!0}),ni=17e3,$k=u({...G,name:"Garnet Testnet",testnet:!0,id:17069,sourceId:ni,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"],webSocket:["wss://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}},contracts:{...G.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[ni]:{address:"0x57ee40586fbE286AfC75E67cb69511A6D9aF5909",blockCreated:1274684}},l2OutputOracle:{[ni]:{address:"0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B",blockCreated:1274684}},l1StandardBridge:{[ni]:{address:"0x09bcDd311FE398F80a78BE37E489f5D440DB95DE",blockCreated:1274684}}}}),Hk=u({id:86,name:"GateChain Mainnet",nativeCurrency:{name:"GateChainToken",symbol:"GT",decimals:18},rpcUrls:{default:{http:["https://evm.nodeinfo.cc"],webSocket:["wss://evm-ws.gatenode.cc"]}},blockExplorers:{default:{name:"Gate Scan",url:"https://www.gatescan.org",apiUrl:"https://gatescan.org/api"}},testnet:!1}),Gk=u({id:63157,name:"Geist Mainnet",nativeCurrency:{decimals:18,name:"Aavegotchi GHST Token",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://geist-mainnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:660735}}}),jk=u({id:16507,name:"Genesys Mainnet",nativeCurrency:{decimals:18,name:"GSYS",symbol:"GSYS"},rpcUrls:{default:{http:["https://rpc.genesys.network"]}},blockExplorers:{default:{name:"Genesys Explorer",url:"https://gchainexplorer.genesys.network"}},testnet:!1}),ri=11155111,Qm=u({...G,id:91342,network:"giwa-sepolia",name:"GIWA Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia-rpc.giwa.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.giwa.io",apiUrl:"https://sepolia-explorer.giwa.io/api"}},contracts:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[ri]:{address:"0x37347caB2afaa49B776372279143D71ad1f354F6"}},portal:{[ri]:{address:"0x956962C34687A954e611A83619ABaA37Ce6bC78A"}},l1StandardBridge:{[ri]:{address:"0x77b2ffc0F57598cAe1DB76cb398059cF5d10A7E7"}}},testnet:!0,sourceId:ri}),qk=u({...Qm,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-rpc-flashblocks.giwa.io"]}}}),Vk=u({id:251,name:"Glide L1 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l1-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l1-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),Kk=u({id:253,name:"Glide L2 Protocol XP",nativeCurrency:{name:"GLXP",symbol:"GLXP",decimals:18},rpcUrls:{default:{http:["https://rpc-api.glideprotocol.xyz/l2-rpc"],webSocket:["wss://rpc-api.glideprotocol.xyz/l2-rpc"]}},blockExplorers:{default:{name:"Glide Protocol Explore",url:"https://blockchain-explorer.glideprotocol.xyz"}},testnet:!1}),Wk=u({id:100,name:"Gnosis",nativeCurrency:{decimals:18,name:"xDAI",symbol:"XDAI"},blockTime:5e3,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}}}),Xk=u({id:10200,name:"Gnosis Chiado",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},blockTime:5e3,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}),Zk=u({id:2345,name:"GOAT",nativeCurrency:{decimals:18,name:"Bitcoin",symbol:"BTC"},rpcUrls:{default:{http:["https://rpc.goat.network"]}},blockExplorers:{default:{name:"Goat Explorer",url:"https://explorer.goat.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),Qk=u({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}),Jk=u({id:60,name:"GoChain",nativeCurrency:{decimals:18,name:"GO",symbol:"GO"},rpcUrls:{default:{http:["https://rpc.gochain.io"]}},blockExplorers:{default:{name:"GoChain Explorer",url:"https://explorer.gochain.io"}},testnet:!1}),Yk=u({id:71402,name:"Godwoken Mainnet",nativeCurrency:{decimals:18,name:"pCKB",symbol:"pCKB"},rpcUrls:{default:{http:["https://v1.mainnet.godwoken.io/rpc"]}},blockExplorers:{default:{name:"GW Scan",url:"https://v1.gwscan.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:15034}},testnet:!1}),eC=u({id:5,name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://5.rpc.thirdweb.com"]}},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}),tC=u({id:440017,name:"Graphite Network",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Spectre",url:"https://main.atgraphite.com",apiUrl:"https://api.main.atgraphite.com/api"}},testnet:!1}),nC=u({id:54170,name:"Graphite Network Testnet",nativeCurrency:{name:"Graphite",symbol:"@G",decimals:18},rpcUrls:{default:{http:["https://anon-entrypoint-test-1.atgraphite.com"],webSocket:["wss://ws-anon-entrypoint-test-1.atgraphite.com"]}},blockExplorers:{default:{name:"Graphite Testnet Spectre",url:"https://test.atgraphite.com",apiUrl:"https://api.test.atgraphite.com/api"}},testnet:!0}),rC=u({id:1625,name:"Gravity Alpha Mainnet",nativeCurrency:{name:"G",symbol:"G",decimals:18},rpcUrls:{default:{http:["https://rpc.gravity.xyz"]}},blockExplorers:{default:{name:"Gravity Explorer",url:"https://explorer.gravity.xyz",apiUrl:"https://explorer.gravity.xyz/api"}},contracts:{multicall3:{address:"0xf8ac4BEB2F75d2cFFb588c63251347fdD629B92c",blockCreated:16851}}}),sC=u({id:43419,name:"Gunz Mainnet",nativeCurrency:{name:"GUN",symbol:"GUN",decimals:18},rpcUrls:{default:{http:["https://rpc.gunzchain.io/ext/bc/2M47TxWHGnhNtq6pM5zPXdATBtuqubxn5EPFgFmEawCQr9WFML/rpc"]}},blockExplorers:{default:{name:"Gunz Explorer",url:"https://gunzscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:70502}}}),aC=u({id:260,name:"Guru Network Mainnet",nativeCurrency:{name:"GURU Token",symbol:"GURU",decimals:18},rpcUrls:{default:{http:["https://rpc-main.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/260"]}},blockExplorers:{default:{name:"Guruscan",url:"https://scan.gurunetwork.ai"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:271691}},testnet:!1}),oC=u({id:261,name:"Guru Network Testnet",nativeCurrency:{name:"tGURU Token",symbol:"tGURU",decimals:18},rpcUrls:{default:{http:["https://rpc-test.gurunetwork.ai","https://rpc.gurunetwork.ai/archive/261"]}},blockExplorers:{default:{name:"Guruscan",url:"https://sepolia.gurunetwork.ai"}},testnet:!0}),iC=u({id:5112,name:"Ham",nativeCurrency:{decimals:18,name:"Ham",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.ham.fun"],webSocket:["wss://rpc.ham.fun"]}},blockExplorers:{default:{name:"Ham Chain Explorer",url:"https://explorer.ham.fun",apiUrl:"https://explorer.ham.fun/api/v2"}}}),cC=u({id:216,name:"Happychain Testnet",nativeCurrency:{symbol:"HAPPY",name:"HAPPY",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.happy.tech/http"],webSocket:["wss://rpc.testnet.happy.tech/ws"]}},blockExplorers:{default:{name:"Happy Chain Testnet Explorer",url:"https://explorer.testnet.happy.tech"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0}),lC=u({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"}}}),uC=u({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"}}}),dC=u({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),pC=u({id:16666e5,name:"Harmony One",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{default:{http:["https://1666600000.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),fC=u({id:177,name:"HashKey Chain",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://mainnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Explorer",url:"https://hashkey.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),mC=u({id:133,name:"HashKey Chain Testnet",nativeCurrency:{decimals:18,name:"HashKey EcoPoints",symbol:"HSK"},rpcUrls:{default:{http:["https://testnet.hsk.xyz"]}},blockExplorers:{default:{name:"HashKey Chain Testnet explorer",url:"https://testnet-explorer.hsk.xyz"}},testnet:!0}),hC=u({id:1523903251,name:"Haust Network Testnet",nativeCurrency:{decimals:18,name:"HAUST",symbol:"HAUST"},rpcUrls:{default:{http:["https://rpc-testnet.haust.app"]}},blockExplorers:{default:{name:"Haust Network Testnet Explorer",url:"https://explorer-testnet.haust.app"}},testnet:!0}),bC=u({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}),yC=u({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}),xC=u({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}),gC=u({id:8668,name:"Hela Mainnet",nativeCurrency:{name:"HLUSD",symbol:"HLUSD",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.helachain.com"]}},blockExplorers:{default:{name:"Hela explorer",url:"https://mainnet-blockexplorer.helachain.com"}},testnet:!1}),wC=u({id:42e3,name:"Helios Testnet",network:"helios-testnet",nativeCurrency:{symbol:"HLS",name:"Helios",decimals:18},rpcUrls:{default:{http:["https://testnet1.helioschainlabs.org"]}},blockExplorers:{default:{name:"Helios Testnet Explorer",url:"https://explorer.helioschainlabs.org/"}},testnet:!0}),EC=u({id:43111,name:"Hemi",network:"Hemi",blockTime:12e3,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.hemi.xyz"}},testnet:!1}),kC=u({id:743111,name:"Hemi Sepolia",network:"Hemi Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.hemi.network/rpc"]}},blockExplorers:{default:{name:"Hemi Sepolia explorer",url:"https://testnet.explorer.hemi.xyz"}},testnet:!0}),CC=u({id:68414,name:"Henesys",nativeCurrency:{name:"NEXPACE",symbol:"NXPC",decimals:18},rpcUrls:{default:{http:["https://henesys-rpc.msu.io"]}},blockExplorers:{default:{name:"Avalanche Explorer",url:"https://subnets.avax.network/henesys"}}}),vC=u({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",apiUrl:"https://api-holesky.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:4295055}},testnet:!0}),AC=u({id:560048,name:"Hoodi",nativeCurrency:{name:"Hoodi Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.ethpandaops.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.etherscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2589}},testnet:!0}),TC=u({id:269,name:"High Performance Blockchain",nativeCurrency:{name:"HPB",symbol:"HPB",decimals:18},rpcUrls:{default:{http:["https://hpbnode.com"]}},blockExplorers:{default:{name:"hpbScan",url:"https://hscan.org"}},testnet:!1}),SC=u({id:190415,name:"HPP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.hpp.io"],webSocket:["wss://mainnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Mainnet Explorer",url:"https://explorer.hpp.io"}},testnet:!1}),PC=u({id:181228,name:"HPP Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.hpp.io"],webSocket:["wss://testnet.hpp.io"]}},blockExplorers:{default:{name:"HPP Sepolia Explorer",url:"https://sepolia-explorer.hpp.io"}},testnet:!0}),BC=u({id:12323,name:"Huddle01 dRTC Chain",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle01.calderachain.xyz/http"],webSocket:["wss://huddle01.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle01.calderaexplorer.xyz",apiUrl:"https://huddle01.calderaexplorer.xyz/api"}},sourceId:42161}),UC=u({id:2524852,name:"Huddle01 dRTC Chain Testnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://huddle-testnet.rpc.caldera.xyz/http"],webSocket:["wss://huddle-testnet.rpc.caldera.xyz/ws"]}},blockExplorers:{default:{name:"Huddle01 Caldera Explorer",url:"https://huddle-testnet.explorer.caldera.xyz",apiUrl:"https://huddle-testnet.explorer.caldera.xyz/api"}},sourceId:421614}),IC=u({id:6985385,name:"Humanity",nativeCurrency:{name:"H",symbol:"H",decimals:18},rpcUrls:{default:{http:["https://humanity-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Humanity Mainnet Explorer",url:"https://humanity-mainnet.explorer.alchemy.com",apiUrl:"https://humanity-mainnet.explorer.alchemy.com/api"}},testnet:!1}),FC=u({id:7080969,name:"Humanity Testnet",nativeCurrency:{name:"tHP",symbol:"tHP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.humanity.org"]}},blockExplorers:{default:{name:"Humanity Testnet Explorer",url:"https://humanity-testnet.explorer.alchemy.com",apiUrl:"https://humanity-testnet.explorer.alchemy.com/api"}},testnet:!0}),OC=u({id:5234,name:"Humanode",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.mainnet.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.mainnet.stages.humanode.io"]}},blockExplorers:{default:{name:"Subscan",url:"https://humanode.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4413097}}}),DC=u({id:14853,name:"Humanode Testnet 5",nativeCurrency:{name:"HMND",symbol:"HMND",decimals:18},rpcUrls:{default:{http:["https://explorer-rpc-http.testnet5.stages.humanode.io"],webSocket:["wss://explorer-rpc-ws.testnet5.stages.humanode.io"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),MC=u({id:2911,name:"HYCHAIN",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://explorer.hychain.com"}},testnet:!1}),_C=u({id:29112,name:"HYCHAIN Testnet",nativeCurrency:{name:"HYTOPIA",symbol:"TOPIA",decimals:18},rpcUrls:{default:{http:["https://rpc.hychain.com/http"]}},blockExplorers:{default:{name:"HYCHAIN Explorer",url:"https://testnet-rpc.hychain.com/http"}},testnet:!0}),Jm=u({id:999,name:"HyperEVM",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},blockExplorers:{default:{name:"HyperEVMScan",url:"https://hyperevmscan.io"}},rpcUrls:{default:{http:["https://rpc.hyperliquid.xyz/evm"]}},testnet:!1}),NC=u({id:998,name:"Hyperliquid EVM Testnet",nativeCurrency:{name:"HYPE",symbol:"HYPE",decimals:18},rpcUrls:{default:{http:["https://rpc.hyperliquid-testnet.xyz/evm"]}},testnet:!0}),RC=u({id:73115,name:"ICB Network",nativeCurrency:{decimals:18,name:"ICB Native Token",symbol:"ICBX"},rpcUrls:{default:{http:["https://rpc1-mainnet.icbnetwork.info"]}},blockExplorers:{default:{name:"ICB Explorer",url:"https://icbscan.io",apiUrl:"https://icbscan.io/api"}},testnet:!1}),zC=u({id:74,name:"IDChain Mainnet",nativeCurrency:{decimals:18,name:"EIDI",symbol:"EIDI"},rpcUrls:{default:{http:["https://idchain.one/rpc"],webSocket:["wss://idchain.one/ws"]}},blockExplorers:{default:{name:"IDChain Explorer",url:"https://explorer.idchain.one"}},testnet:!1}),LC=u({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",apiUrl:"https://explorer.immutable.com/api"}},contracts:{multicall3:{address:"0x236bdA4589e44e6850f5aC6a74BfCa398a86c6c0",blockCreated:4335972}}}),$C=u({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}),HC=u({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}}}),GC=u({id:7233,name:"InitVerse Mainnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-mainnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseScan",url:"https://www.iniscan.com",apiUrl:"https://explorer-api.inichain.com/api"}},contracts:{multicall3:{address:"0x83466BE48A067115FFF91f7b892Ed1726d032e47",blockCreated:2318}}}),jC=u({id:7234,name:"InitVerse Genesis Testnet",nativeCurrency:{decimals:18,name:"InitVerse",symbol:"INI"},rpcUrls:{default:{http:["https://rpc-testnet.inichain.com"]}},blockExplorers:{default:{name:"InitVerseGenesisScan",url:"https://genesis-testnet.iniscan.com",apiUrl:"https://explorer-testnet-api.inichain.com/api"}},contracts:{multicall3:{address:"0x0cF32CBDd6c437331EA4f85ed2d881A5379B5a6F",blockCreated:16361}},testnet:!0}),qC=u({id:1776,name:"Injective",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://sentry.evm-rpc.injective.network"],webSocket:["wss://sentry.evm-ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://blockscout.injective.network",apiUrl:"https://blockscout.injective.network/api"}},testnet:!1}),VC=u({id:1439,name:"Injective Testnet",nativeCurrency:{decimals:18,name:"Injective",symbol:"INJ"},rpcUrls:{default:{http:["https://k8s.testnet.json-rpc.injective.network"],webSocket:["wss://k8s.testnet.ws.injective.network"]}},blockExplorers:{default:{name:"Injective Explorer",url:"https://testnet.blockscout.injective.network",apiUrl:"https://testnet.blockscout.injective.network/api"}},testnet:!0}),si=1,KC=u({...G,id:57073,name:"Ink",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel.inkonchain.com","https://rpc-qnd.inkonchain.com"],webSocket:["wss://rpc-gel.inkonchain.com","wss://rpc-qnd.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.inkonchain.com",apiUrl:"https://explorer.inkonchain.com/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},...G.contracts,disputeGameFactory:{[si]:{address:"0x10d7b35078d3baabb96dd45a9143b94be65b12cd"}},portal:{[si]:{address:"0x5d66c1782664115999c47c9fa5cd031f495d3e4f"}},l1StandardBridge:{[si]:{address:"0x88ff1e5b602916615391f55854588efcbb7663f0"}}},testnet:!1,sourceId:si}),ai=11155111,WC=u({...G,id:763373,name:"Ink Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-gel-sepolia.inkonchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer-sepolia.inkonchain.com/",apiUrl:"https://explorer-sepolia.inkonchain.com/api/v2"}},contracts:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},disputeGameFactory:{[ai]:{address:"0x860e626c700af381133d9f4af31412a2d1db3d5d"}},portal:{[ai]:{address:"0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7"}},l1StandardBridge:{[ai]:{address:"0x33f60714bbd74d62b66d79213c348614de51901c"}}},testnet:!0,sourceId:ai}),XC=u({id:8822,name:"IOTA EVM",network:"iotaevm",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.iota.org",apiUrl:"https://explorer.evm.iota.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25022}}}),ZC=u({id:1075,name:"IOTA EVM Testnet",network:"iotaevm-testnet",nativeCurrency:{decimals:18,name:"IOTA",symbol:"IOTA"},rpcUrls:{default:{http:["https://json-rpc.evm.testnet.iotaledger.net"],webSocket:["wss://ws.json-rpc.evm.testnet.iotaledger.net"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.evm.testnet.iotaledger.net",apiUrl:"https://explorer.evm.testnet.iotaledger.net/api"}},testnet:!0}),QC=u({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}}}),JC=u({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"}},contracts:{multicall3:{address:"0xb5cecD6894c6f473Ec726A176f1512399A2e355d",blockCreated:24347592}},testnet:!0}),YC=u({id:8017,name:"iSunCoin Mainnet",nativeCurrency:{decimals:18,name:"ISC",symbol:"ISC"},rpcUrls:{default:{http:["https://mainnet.isuncoin.com"]}},blockExplorers:{default:{name:"iSunCoin Explorer",url:"https://baifa.io/app/chains/8017"}}}),ev=u({id:680,name:"Jasmy Chain",network:"jasmyChain",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc.jasmychain.io"],webSocket:["wss://rpc.jasmychain.io"]}},testnet:!1}),tv=u({id:681,name:"Jasmy Chain Testnet",network:"jasmyChainTestnet",nativeCurrency:{name:"JasmyCoin",symbol:"JASMY",decimals:18},rpcUrls:{default:{http:["https://rpc_testnet.jasmychain.io"],webSocket:["wss://rpc_testnet.jasmychain.io"]}},testnet:!0}),nv=u({id:8899,name:"JB Chain",network:"jbc",nativeCurrency:{name:"JBC",symbol:"JBC",decimals:18},rpcUrls:{default:{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}),rv=u({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}),sv=u({id:81,name:"Japan Open Chain Mainnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Token",symbol:"JOC"},rpcUrls:{default:{http:["https://rpc-1.japanopenchain.org:8545","https://rpc-2.japanopenchain.org:8545","https://rpc-3.japanopenchain.org"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.japanopenchain.org"}},testnet:!1}),av=u({id:10081,name:"Japan Open Chain Testnet",nativeCurrency:{decimals:18,name:"Japan Open Chain Testnet Token",symbol:"JOCT"},rpcUrls:{default:{http:["https://rpc-1.testnet.japanopenchain.org:8545","https://rpc-2.testnet.japanopenchain.org:8545","https://rpc-3.testnet.japanopenchain.org"]}},blockExplorers:{default:{name:"Testnet Block Explorer",url:"https://explorer.testnet.japanopenchain.org"}},testnet:!0}),ov=u({id:5734951,name:"Jovay Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.jovay.io"]}},blockExplorers:{default:{name:"Jovay Explorer",url:"https://explorer.jovay.io/l2"}},testnet:!1}),iv=u({id:2019775,name:"Jovay Sepolia Testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://api.zan.top/public/jovay-testnet"]}},blockExplorers:{default:{name:"Jovay Testnet Explorer",url:"https://sepolia-explorer.jovay.io/l2"}},testnet:!0}),cv=u({id:45003,name:"Juneo JUNE-Chain",nativeCurrency:{decimals:18,name:"JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/2",apiUrl:"https://juneoscan.io/chain/2/api"}}}),lv=u({id:45013,name:"Juneo BCH1-Chain",nativeCurrency:{decimals:18,name:"Juneo BCH1-Chain",symbol:"BCH1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/BCH1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/12",apiUrl:"https://juneoscan.io/chain/12/api"}}}),uv=u({id:45004,name:"Juneo DAI1-Chain",nativeCurrency:{decimals:18,name:"Juneo DAI1-Chain",symbol:"DAI1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DAI1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/5",apiUrl:"https://juneoscan.io/chain/5/api"}}}),dv=u({id:45010,name:"Juneo DOGE1-Chain",nativeCurrency:{decimals:18,name:"Juneo DOGE1-Chain",symbol:"DOGE1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/DOGE1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/10",apiUrl:"https://juneoscan.io/chain/10/api"}}}),pv=u({id:45011,name:"Juneo EUR1-Chain",nativeCurrency:{decimals:18,name:"Juneo EUR1-Chain",symbol:"EUR1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/EUR1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/6",apiUrl:"https://juneoscan.io/chain/6/api"}}}),fv=u({id:45008,name:"Juneo GLD1-Chain",nativeCurrency:{decimals:18,name:"Juneo GLD1-Chain",symbol:"GLD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/GLD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/8",apiUrl:"https://juneoscan.io/chain/8/api"}}}),mv=u({id:45014,name:"Juneo LINK1-Chain",nativeCurrency:{decimals:18,name:"Juneo LINK1-Chain",symbol:"LINK1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LINK1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/13",apiUrl:"https://juneoscan.io/chain/13/api"}}}),hv=u({id:45009,name:"Juneo LTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo LTC1-Chain",symbol:"LTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/LTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/11",apiUrl:"https://juneoscan.io/chain/11/api"}}}),bv=u({id:45007,name:"Juneo mBTC1-Chain",nativeCurrency:{decimals:18,name:"Juneo mBTC1-Chain",symbol:"mBTC1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/mBTC1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/9",apiUrl:"https://juneoscan.io/chain/9/api"}}}),yv=u({id:45012,name:"Juneo SGD1-Chain",nativeCurrency:{decimals:18,name:"Juneo SGD1-Chain",symbol:"SGD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/SGD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/7",apiUrl:"https://juneoscan.io/chain/7/api"}}}),xv=u({id:101003,name:"Socotra JUNE-Chain",nativeCurrency:{decimals:18,name:"Socotra JUNE-Chain",symbol:"JUNE"},rpcUrls:{default:{http:["https://rpc.socotra-testnet.network/ext/bc/JUNE/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://socotra.juneoscan.io/chain/2",apiUrl:"https://socotra.juneoscan.io/chain/2/api"}},testnet:!0}),gv=u({id:45006,name:"Juneo USD1-Chain",nativeCurrency:{decimals:18,name:"Juneo USD1-Chain",symbol:"USD1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USD1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/4",apiUrl:"https://juneoscan.io/chain/4/api"}}}),wv=u({id:45005,name:"Juneo USDT1-Chain",nativeCurrency:{decimals:18,name:"Juneo USDT1-Chain",symbol:"USDT1"},rpcUrls:{default:{http:["https://rpc.juneo-mainnet.network/ext/bc/USDT1/rpc"]}},blockExplorers:{default:{name:"Juneo Scan",url:"https://juneoscan.io/chain/3",apiUrl:"https://juneoscan.io/chain/3/api"}}}),Ev=u({id:8217,name:"Kaia",nativeCurrency:{decimals:18,name:"Kaia",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kaiascan.io",apiUrl:"https://api-cypress.klaytnscope.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:96002415}}}),kv=u({id:1001,name:"Kairos Testnet",network:"kairos",nativeCurrency:{decimals:18,name:"Kairos KAIA",symbol:"KAIA"},rpcUrls:{default:{http:["https://public-en-kairos.node.kaia.io"]}},blockExplorers:{default:{name:"KaiaScan",url:"https://kairos.kaiascan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:123390593}},testnet:!0}),Cv=u({id:1802203764,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}),vv=u({id:920637907288165,name:"Kakarot Starknet 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}),Av=u({id:24,name:"KardiaChain Mainnet",nativeCurrency:{name:"KAI",symbol:"KAI",decimals:18},rpcUrls:{default:{http:["https://rpc.kardiachain.io"]}},blockExplorers:{default:{name:"KardiaChain Explorer",url:"https://explorer.kardiachain.io"}},testnet:!1}),Tv=u({id:686,name:"Karura",network:"karura",nativeCurrency:{name:"Karura",symbol:"KAR",decimals:18},rpcUrls:{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}),Sv=u({id:747474,name:"Katana",network:"katana",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.katana.network"]}},blockExplorers:{default:{name:"katana explorer",url:"https://katanascan.com"}},testnet:!1}),Pv=u({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}),Bv=u({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}),Uv=u({id:321,name:"KCC Mainnet",network:"KCC Mainnet",nativeCurrency:{decimals:18,name:"KCS",symbol:"KCS"},rpcUrls:{default:{http:["https://kcc-rpc.com"]}},blockExplorers:{default:{name:"KCC Explorer",url:"https://explorer.kcc.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11760430}},testnet:!1}),Iv=u({id:1336,name:"Kii Testnet Oro",network:"kii-testnet-oro",nativeCurrency:{name:"Kii",symbol:"KII",decimals:18},rpcUrls:{default:{http:["https://json-rpc.uno.sentry.testnet.v3.kiivalidator.com"]}},blockExplorers:{default:{name:"KiiExplorer",url:"https://explorer.kiichain.io/testnet"}},testnet:!0}),Fv=u({id:7887,name:"Kinto Mainnet",network:"Kinto Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.kinto.xyz/http"]}},blockExplorers:{default:{name:"Kinto Explorer",url:"https://explorer.kinto.xyz"}},testnet:!1}),Ov=u({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}}}),Dv=u({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}),Mv=u({id:701,name:"Koi Network",nativeCurrency:{decimals:18,name:"Koi Network Native Token",symbol:"KRING"},rpcUrls:{default:{http:["https://koi-rpc.darwinia.network"],webSocket:["wss://koi-rpc.darwinia.network"]}},blockExplorers:{default:{name:"Blockscout",url:"https://koi-scan.darwinia.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:180001}},testnet:!0}),_v=u({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:16054868}},testnet:!1}),Nv=u({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:8900914}},testnet:!0}),Rv=u({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}),zv=u({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}),Lv=u({id:360890,name:"LAVITA Mainnet",nativeCurrency:{name:"vTFUEL",symbol:"vTFUEL",decimals:18},rpcUrls:{default:{http:["https://tsub360890-eth-rpc.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"LAVITA Explorer",url:"https://tsub360890-explorer.thetatoken.org"}},testnet:!1}),$v=u({id:232,name:"Lens",nativeCurrency:{name:"GHO",symbol:"GHO",decimals:18},rpcUrls:{default:{http:["https://rpc.lens.xyz"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://explorer.lens.xyz",apiUrl:"https://explorer.lens.xyz/api"}}}),Hv=u({id:37111,name:"Lens Testnet",nativeCurrency:{name:"GRASS",symbol:"GRASS",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.lens.dev"],webSocket:["wss://rpc.testnet.lens.dev/ws"]}},blockExplorers:{default:{name:"Lens Block Explorer",url:"https://block-explorer.testnet.lens.dev",apiUrl:"https://block-explorer-api.staging.lens.dev/api"}},testnet:!0}),Gv=u({id:21363,name:"Lestnet",nativeCurrency:{name:"Lestnet Ether",symbol:"LETH",decimals:18},rpcUrls:{default:{http:["https://service.lestnet.org"]}},blockExplorers:{default:{name:"Lestnet Explorer",url:"https://explore.lestnet.org"}},testnet:!0}),jv=u({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"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:127188532}},testnet:!0}),qv=u({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"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:125499184}},testnet:!1});async function Vv(e,t){var s,a,o;const{account:n=e.account}=t;if(!n)throw new ln;const r=he(n);try{const{accessList:i,blockNumber:c,blockTag:l,data:d,gas:p,gasPrice:f,maxFeePerGas:m,maxPriorityFeePerGas:y,nonce:g,to:P,value:B,...v}=t,k=(typeof c=="bigint"?j(c):void 0)||l;$t(t);const D=(o=(a=(s=e.chain)==null?void 0:s.formatters)==null?void 0:a.transactionRequest)==null?void 0:o.format,_=(D||Pt)({...ar(v,{format:D}),account:r,accessList:i,data:d,gas:p,gasPrice:f,maxFeePerGas:m,maxPriorityFeePerGas:y,nonce:g,to:P,value:B},"estimateGas"),{baseFeePerGas:h,gasLimit:b,priorityFeePerGas:x}=await e.request({method:"linea_estimateGas",params:k?[_,k]:[_]});return{baseFeePerGas:BigInt(h),gasLimit:BigInt(b),priorityFeePerGas:BigInt(x)}}catch(i){throw gl(i,{...t,account:r,chain:e.chain})}}const Au={fees:{estimateFeesPerGas:Ym,async maxPriorityFeePerGas({block:e,client:t,request:n}){const r=await Ym({block:e,client:t,multiply:s=>s,request:n,type:"eip1559"});return r!=null&&r.maxPriorityFeePerGas?r.maxPriorityFeePerGas:null}}};async function Ym({client:e,multiply:t,request:n,type:r}){try{const s=await Vv(e,{...n,account:n==null?void 0:n.account}),{priorityFeePerGas:a}=s,i=t(BigInt(s.baseFeePerGas))+a;return r==="legacy"?{gasPrice:i}:{maxFeePerGas:i,maxPriorityFeePerGas:a}}catch{return null}}const Kv=u({...Au,id:59144,name:"Linea Mainnet",blockTime:2e3,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},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),Wv=u({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}),Xv=u({...Au,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},ensRegistry:{address:"0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7",blockCreated:2395094},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:17168484}},ensTlds:[".linea.eth"],testnet:!0}),Zv=u({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}),oi=1,Qv=u({...G,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:{...G.contracts,multicall3:{address:"0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0"},l2OutputOracle:{[oi]:{address:"0x113cB99283AF242Da0A0C54347667edF531Aa7d6"}},portal:{[oi]:{address:"0x26dB93F8b8b4f7016240af62F7730979d353f9A7"}},l1StandardBridge:{[oi]:{address:"0x2658723Bf70c7667De6B25F99fcce13A16D25d08"}}},sourceId:oi}),ii=11155111,Jv=u({...G,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:{...G.contracts,l2OutputOracle:{[ii]:{address:"0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[ii]:{address:"0xe3d90F21490686Ec7eF37BE788E02dfC12787264"}},l1StandardBridge:{[ii]:{address:"0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5"}}},testnet:!0,sourceId:ii}),Yv=u({id:9496,name:"Load Alphanet",nativeCurrency:{name:"Testnet LOAD",symbol:"tLOAD",decimals:18},rpcUrls:{default:{http:["https://alphanet.load.network"]}},blockExplorers:{default:{name:"Load Alphanet Explorer",url:"https://explorer.load.network"}},testnet:!0}),e4=u({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),t4=u({id:15551,name:"LoopNetwork Mainnet",nativeCurrency:{name:"LOOP",symbol:"LOOP",decimals:18},rpcUrls:{default:{http:["https://api.mainnetloop.com"]}},blockExplorers:{default:{name:"LoopNetwork Blockchain Explorer",url:"https://explorer.mainnetloop.com/"}},testnet:!1}),n4=u({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}}}),r4=u({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}),s4=u({id:994873017,name:"Lumia Mainnet",network:"LumiaMainnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Explorer",url:"https://explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3975939}},testnet:!1}),a4=u({id:1952959480,name:"Lumia Testnet",network:"LumiaTestnet",nativeCurrency:{name:"Lumia",symbol:"LUMIA",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.lumia.org"]}},blockExplorers:{default:{name:"Lumia Testnet Explorer",url:"https://testnet-explorer.lumia.org/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2235063}},testnet:!0}),o4=u({id:96370,name:"Lumoz",nativeCurrency:{decimals:18,name:"Lumoz Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://rpc.lumoz.org"]}},blockExplorers:{default:{name:"Lumoz Scan",url:"https://scan.lumoz.info"}},testnet:!1}),i4=u({id:105363,name:"Lumoz Testnet",nativeCurrency:{decimals:18,name:"Lumoz Testnet Token",symbol:"MOZ"},rpcUrls:{default:{http:["https://testnet-rpc.lumoz.org"]}},testnet:!0}),c4=u({id:721,name:"Lycan",nativeCurrency:{decimals:18,name:"Lycan",symbol:"LYC"},rpcUrls:{default:{http:["https://rpc.lycanchain.com","https://us-east.lycanchain.com","https://us-west.lycanchain.com","https://eu-north.lycanchain.com","https://eu-west.lycanchain.com","https://asia-southeast.lycanchain.com"],webSocket:["wss://rpc.lycanchain.com","wss://us-east.lycanchain.com","wss://us-west.lycanchain.com","wss://eu-north.lycanchain.com","wss://eu-west.lycanchain.com","wss://asia-southeast.lycanchain.com"]}},blockExplorers:{default:{name:"Lycan Explorer",url:"https://explorer.lycanchain.com"}}}),l4=u({id:957,name:"Lyra Chain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.lyra.finance"]}},blockExplorers:{default:{name:"Lyra Explorer",url:"https://explorer.lyra.finance",apiUrl:"https://explorer.lyra.finance/api/v2"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1935198}}}),u4=u({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),d4=u({id:595,name:"Mandala TC9",network:"mandala",nativeCurrency:{name:"Mandala",symbol:"mACA",decimals:18},rpcUrls:{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}),p4=u({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}}}),f4=u({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}),m4=u({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}),h4=u({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}}}),b4=u({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}),y4=u({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}),x4=u({id:5887,name:"MANTRA DuKong EVM Testnet",nativeCurrency:{decimals:18,name:"MANTRA",symbol:"MANTRA"},rpcUrls:{default:{http:["https://evm.dukong.mantrachain.io"]}},blockExplorers:{default:{name:"MANTRAScan",url:"https://mantrascan.io/dukong"}},testnet:!0}),g4=u({id:5888,name:"MANTRA EVM",nativeCurrency:{decimals:18,name:"OM",symbol:"OM"},rpcUrls:{default:{http:["https://evm.mantrachain.io"],webSocket:["https://evm.mantrachain.io/ws"]}},blockExplorers:{default:{name:"MANTRA Scan",url:"https://mantrascan.io/mainnet"}}}),w4=u({id:22776,name:"MAP Protocol",nativeCurrency:{decimals:18,name:"MAPO",symbol:"MAPO"},rpcUrls:{default:{http:["https://rpc.maplabs.io"]}},blockExplorers:{default:{name:"MAPO Scan",url:"https://maposcan.io"}},testnet:!1}),E4=u({id:698,name:"Matchain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://matchscan.io"}}}),k4=u({id:699,name:"Matchain Testnet",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.matchain.io"]}},blockExplorers:{default:{name:"Matchain Scan",url:"https://testnet.matchscan.io"}},testnet:!0}),C4=u({id:29548,name:"MCH Verse",nativeCurrency:{name:"Oasys",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.oasys.mycryptoheroes.net"]}},blockExplorers:{default:{name:"MCH Verse Explorer",url:"https://explorer.oasys.mycryptoheroes.net",apiUrl:"https://explorer.oasys.mycryptoheroes.net/api"}},testnet:!1}),v4=u({id:6342,blockTime:1e3,name:"MegaETH Testnet",nativeCurrency:{name:"MegaETH Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://carrot.megaeth.com/rpc"],webSocket:["wss://carrot.megaeth.com/ws"]}},blockExplorers:{default:{name:"MegaETH Testnet Explorer",url:"https://www.megaexplorer.xyz/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},testnet:!0}),A4=u({id:7078815900,name:"Mekong Pectra Devnet",nativeCurrency:{name:"eth",symbol:"eth",decimals:18},rpcUrls:{default:{http:["https://rpc.mekong.ethpandaops.io"]}},blockExplorers:{default:{name:"Block Explorer",url:"https://explorer.mekong.ethpandaops.io"}},testnet:!0}),T4=u({id:333000333,name:"Meld",nativeCurrency:{decimals:18,name:"Meld",symbol:"MELD"},rpcUrls:{default:{http:["https://rpc-1.meld.com"]}},blockExplorers:{default:{name:"MELDscan",url:"https://meldscan.io"}},contracts:{multicall3:{address:"0x769ee5a8e82c15c1b6e358f62ac8eb6e3abe8dc5",blockCreated:360069}}}),S4=u({id:4352,name:"MemeCore",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.memecore.net"],webSocket:["wss://ws.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Explorer",url:"https://memecorescan.io",apiUrl:"https://api.memecorescan.io/api"},okx:{name:"MemeCore Explorer",url:"https://web3.okx.com/explorer/memecore"},memecore:{name:"MemeCore Explorer",url:"https://blockscout.memecore.com",apiUrl:"https://blockscout.memecore.com/api"}}}),P4=u({id:43521,name:"Formicarium",nativeCurrency:{decimals:18,name:"M",symbol:"M"},rpcUrls:{default:{http:["https://rpc.formicarium.memecore.net"],webSocket:["wss://ws.formicarium.memecore.net"]}},blockExplorers:{default:{name:"MemeCore Testnet Explorer",url:"https://formicarium.memecorescan.io"},okx:{name:"MemeCore Testnet Explorer",url:"https://web3.okx.com/explorer/formicarium-testnet"},memecore:{name:"MemeCore Testnet Explorer",url:"https://formicarium.blockscout.memecore.com",apiUrl:"https://formicarium.blockscout.memecore.com/api"}},testnet:!0}),B4=u({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"}}}),U4=u({id:4203,name:"Merlin Erigon Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://testnet-erigon-rpc.merlinchain.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet-erigon-scan.merlinchain.io",apiUrl:"https://testnet-erigon-scan.merlinchain.io/api"}},testnet:!0}),I4=u({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}}}),F4=u({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}),O4=u({id:11,name:"Metadium Network",nativeCurrency:{decimals:18,name:"META",symbol:"META"},rpcUrls:{default:{http:["https://api.metadium.com/prod"]}},blockExplorers:{default:{name:"Metadium Explorer",url:"https://explorer.metadium.com"}},testnet:!1}),ci=1,D4=u({...G,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:{...G.contracts,l2OutputOracle:{[ci]:{address:"0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0},portal:{[ci]:{address:"0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956"}},l1StandardBridge:{[ci]:{address:"0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3"}}},sourceId:ci}),M4=u({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"}}}),_4=u({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"}}}),N4=u({id:1088,name:"Metis",nativeCurrency:{decimals:18,name:"Metis",symbol:"METIS"},rpcUrls:{default:{http:["https://metis.rpc.hypersync.xyz","https://metis-pokt.nodies.app","https://api.blockeden.xyz/metis/67nCBdZQSH9z3YqDDjdm","https://metis-andromeda.rpc.thirdweb.com","https://metis-andromeda.gateway.tenderly.co","https://metis.api.onfinality.io/public","https://andromeda.metis.io/?owner=1088","https://metis-mainnet.public.blastapi.io"],webSocket:["wss://metis-rpc.publicnode.com","wss://metis.drpc.org"]}},blockExplorers:{default:{name:"Metis Explorer",url:"https://explorer.metis.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2338552}}}),R4=u({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}}}),z4=u({id:59902,name:"Metis Sepolia",nativeCurrency:{decimals:18,name:"Test Metis",symbol:"tMETIS"},rpcUrls:{default:{http:["https://sepolia.metisdevops.link","https://metis-sepolia-rpc.publicnode.com","https://metis-sepolia.gateway.tenderly.co"],webSocket:["wss://metis-sepolia-rpc.publicnode.com"]}},blockExplorers:{default:{name:"Metis Sepolia Explorer",url:"https://sepolia-explorer.metisdevops.link",apiUrl:"https://sepolia-explorer.metisdevops.link/api-docs"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:224185}}}),L4=u({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}}}),$4=u({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}),H4=u({id:185,name:"Mint Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.mintchain.io"]}},blockExplorers:{default:{name:"Mintchain explorer",url:"https://explorer.mintchain.io"}},testnet:!1}),G4=u({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}),j4=u({id:124832,name:"Mitosis Testnet",nativeCurrency:{name:"MITO",symbol:"MITO",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.mitosis.org"]}},blockExplorers:{default:{name:"Mitosis testnet explorer",url:"https://testnet.mitosiscan.xyz"}},testnet:!0}),li=1,q4=u({...G,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:{...G.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:2465882},l2OutputOracle:{[li]:{address:"0x4317ba146D4933D889518a3e5E11Fe7a53199b04"}},portal:{[li]:{address:"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07"}},l1StandardBridge:{[li]:{address:"0x735aDBbE72226BD52e818E7181953f42E3b0FF21"}}},sourceId:li}),ui=11155111,V4=u({...G,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:{...G.contracts,l2OutputOracle:{[ui]:{address:"0x2634BD65ba27AB63811c74A63118ACb312701Bfa",blockCreated:3778393}},portal:{[ui]:{address:"0x320e1580effF37E008F1C92700d1eBa47c1B23fD",blockCreated:3778395}},l1StandardBridge:{[ui]:{address:"0xbC5C679879B2965296756CD959C3C739769995E2",blockCreated:3778392}},multicall3:{address:"0xBAba8373113Fb7a68f195deF18732e01aF8eDfCF",blockCreated:3019007}},testnet:!0,sourceId:ui}),K4=u({id:143,name:"Monad",blockTime:400,nativeCurrency:{name:"Monad",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://rpc.monad.xyz","https://rpc1.monad.xyz"],webSocket:["wss://rpc.monad.xyz","wss://rpc1.monad.xyz"]}},blockExplorers:{default:{name:"MonadVision",url:"https://monadvision.com"},monadscan:{name:"Monadscan",url:"https://monadscan.com",apiUrl:"https://api.monadscan.com/api"}},testnet:!1,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:9248132}}}),W4=u({id:10143,name:"Monad Testnet",blockTime:400,nativeCurrency:{name:"Testnet MON Token",symbol:"MON",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.monad.xyz"]}},blockExplorers:{default:{name:"Monad Testnet explorer",url:"https://testnet.monadexplorer.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:251449}},testnet:!0}),X4=u({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}),Z4=u({id:1284,name:"Moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{default:{http:["https://rpc.api.moonbeam.network"],webSocket:["wss://wss.api.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io",apiUrl:"https://api-moonbeam.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1}),Q4=u({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"]}}}),J4=u({id:1285,name:"Moonriver",nativeCurrency:{decimals:18,name:"MOVR",symbol:"MOVR"},rpcUrls:{default:{http:["https://rpc.api.moonriver.moonbeam.network"],webSocket:["wss://wss.api.moonriver.moonbeam.network"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonriver.moonscan.io",apiUrl:"https://api-moonriver.moonscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1597904}},testnet:!1}),Y4=u({id:2818,name:"Morph",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.morphl2.io"],webSocket:["wss://rpc.morphl2.io:8443"]}},blockExplorers:{default:{name:"Morph Explorer",url:"https://explorer.morphl2.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3654913}},testnet:!1}),eA=u({id:2810,name:"Morph Holesky",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-quicknode-holesky.morphl2.io"],webSocket:["wss://rpc-quicknode-holesky.morphl2.io"]}},blockExplorers:{default:{name:"Morph Holesky Explorer",url:"https://explorer-holesky.morphl2.io",apiUrl:"https://explorer-api-holesky.morphl2.io/api?"}},testnet:!0}),tA=u({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}),nA=u({id:5551,name:"Nahmii 2 Mainnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://l2.nahmii.io"]}},blockExplorers:{default:{name:"Nahmii 2 Explorer",url:"https://explorer.n2.nahmii.io"}},testnet:!1}),rA=u({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"}}}),sA=u({id:397,name:"NEAR Protocol",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.mainnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer.near.org"}},testnet:!1}),aA=u({id:398,name:"NEAR Protocol Testnet",nativeCurrency:{decimals:18,name:"NEAR",symbol:"NEAR"},rpcUrls:{default:{http:["https://eth-rpc.testnet.near.org"]}},blockExplorers:{default:{name:"NEAR Explorer",url:"https://eth-explorer-testnet.near.org"}},testnet:!0}),oA=u({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}),iA=u({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}),cA=u({id:47763,name:"Neo X Mainnet",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://mainnet-1.rpc.banelabs.org","https://mainnet-2.rpc.banelabs.org"]}},blockExplorers:{default:{name:"Neo X - Explorer",url:"https://xexplorer.neo.org"}},testnet:!1}),lA=u({id:12227332,name:"Neo X Testnet T4",nativeCurrency:{name:"Gas",symbol:"GAS",decimals:18},rpcUrls:{default:{http:["https://testnet.rpc.banelabs.org/"]}},blockExplorers:{default:{name:"neox-scan",url:"https://xt4scan.ngd.network"}},testnet:!0}),uA=u({id:1012,name:"Newton",nativeCurrency:{name:"Newton",symbol:"NEW",decimals:18},rpcUrls:{default:{http:["https://global.rpc.mainnet.newtonproject.org"]}},blockExplorers:{default:{name:"NewFi explorer",url:"https://explorer.newtonproject.org/"}},testnet:!1}),dA=u({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}}}),pA=u({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}}}),fA=u({id:6900,name:"Nibiru",nativeCurrency:{decimals:18,name:"NIBI",symbol:"NIBI"},rpcUrls:{default:{http:["https://evm-rpc.nibiru.fi"]}},blockExplorers:{default:{name:"NibiScan",url:"https://nibiscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:19587573}}}),mA=u({id:200024,name:"Nitrograph Testnet",testnet:!0,rpcUrls:{default:{http:["https://rpc-testnet.nitrograph.foundation"]}},nativeCurrency:{name:"Nitro",symbol:"NOS",decimals:18},blockExplorers:{default:{url:"https://explorer-testnet.nitrograph.foundation",name:"Nitrograph Explorer"}}}),hA=u({id:166,name:"Nomina",nativeCurrency:{name:"Nomina",symbol:"NOM",decimals:18},rpcUrls:{default:{http:["https://mainnet.nomina.io"],webSocket:["wss://mainnet.nomina.io"]}},blockExplorers:{default:{name:"Nomina Explorer",url:"https://nomscan.io"}},testnet:!1}),bA=u({id:4090,network:"oasis-testnet",name:"Oasis Testnet",nativeCurrency:{name:"Fasttoken",symbol:"FTN",decimals:18},rpcUrls:{default:{http:["https://rpc1.oasis.bahamutchain.com"]}},blockExplorers:{default:{name:"Ftnscan",url:"https://oasis.ftnscan.com",apiUrl:"https://oasis.ftnscan.com/api"}},testnet:!0}),yA=u({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"}}}),xA=u({id:911867,name:"Odyssey Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://odyssey.ithaca.xyz"]}},blockExplorers:{default:{name:"Odyssey Explorer",url:"https://odyssey-explorer.ithaca.xyz",apiUrl:"https://odyssey-explorer.ithaca.xyz/api"}},testnet:!0}),gA=u({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}}}),wA=u({id:311,name:"Omax Mainnet",nativeCurrency:{decimals:18,name:"OMAX",symbol:"OMAX"},rpcUrls:{default:{http:["https://mainapi.omaxray.com"]}},blockExplorers:{default:{name:"Omax Explorer",url:"https://omaxscan.com"}},testnet:!1}),EA=u({id:166,name:"Omni",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://mainnet.omni.network"],webSocket:["wss://mainnet.omni.network"]}},blockExplorers:{default:{name:"OmniScan",url:"https://omniscan.network"}},testnet:!1}),kA=u({id:164,name:"Omni Omega",nativeCurrency:{name:"Omni",symbol:"OMNI",decimals:18},rpcUrls:{default:{http:["https://omega.omni.network"],webSocket:["wss://omega.omni.network"]}},blockExplorers:{default:{name:"Omega OmniScan",url:"https://omega.omniscan.network/"}},testnet:!0}),CA=u({id:309075,name:"One World Chain Mainnet",nativeCurrency:{decimals:18,name:"OWCT",symbol:"OWCT"},rpcUrls:{default:{http:["https://mainnet-rpc.oneworldchain.org"]}},blockExplorers:{default:{name:"One World Explorer",url:"https://mainnet.oneworldchain.org"}},testnet:!1}),vA=u({id:9700,name:"OORT MainnetDev",nativeCurrency:{decimals:18,name:"OORT",symbol:"OORT"},rpcUrls:{default:{http:["https://dev-rpc.oortech.com"]}},blockExplorers:{default:{name:"OORT MainnetDev Explorer",url:"https://dev-scan.oortech.com"}}}),di=56,AA=u({id:204,name:"opBNB",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:{default:{http:["https://opbnb-mainnet-rpc.bnbchain.org"]}},blockExplorers:{default:{name:"opBNB (BSCScan)",url:"https://opbnb.bscscan.com",apiUrl:"https://api-opbnb.bscscan.com/api"}},contracts:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:512881},l2OutputOracle:{[di]:{address:"0x153CAB79f4767E2ff862C94aa49573294B13D169"}},portal:{[di]:{address:"0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519"}},l1StandardBridge:{[di]:{address:"0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea"}}},sourceId:di}),pi=97,TA=u({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:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3705108},l2OutputOracle:{[pi]:{address:"0xFf2394Bb843012562f4349C6632a0EcB92fC8810"}},portal:{[pi]:{address:"0x4386C8ABf2009aC0c263462Da568DD9d46e52a31"}},l1StandardBridge:{[pi]:{address:"0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840"}}},testnet:!0,sourceId:pi}),SA=u({id:1612,name:"OpenLedger",nativeCurrency:{name:"Open",symbol:"OPEN",decimals:18},rpcUrls:{default:{http:["https://rpc.openledger.xyz"]}},blockExplorers:{default:{name:"OpenLedger Explorer",url:"https://scan.openledger.xyz"}},testnet:!1}),Pa=1,PA=u({...G,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:{...G.contracts,disputeGameFactory:{[Pa]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Pa]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Pa]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Pa]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:Pa}),fi=5,BA=u({...G,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:{...G.contracts,l2OutputOracle:{[fi]:{address:"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461},portal:{[fi]:{address:"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383"}},l1StandardBridge:{[fi]:{address:"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8"}}},testnet:!0,sourceId:fi}),Ba=11155111,UA=u({...G,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:{...G.contracts,disputeGameFactory:{[Ba]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[Ba]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[Ba]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[Ba]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:Ba}),IA=u({id:62050,name:"Optopia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan.optopia.ai"}},testnet:!1}),FA=u({id:62049,name:"Optopia Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.optopia.ai"]}},blockExplorers:{default:{name:"Optopia Explorer",url:"https://scan-testnet.optopia.ai"}},testnet:!0}),OA=u({id:291,name:"Orderly",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.orderly.network"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorer.orderly.network"}},testnet:!1}),DA=u({id:4460,name:"Orderly Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"]}},blockExplorers:{default:{name:"Orderly Explorer",url:"https://explorerl2new-orderly-l2-4460-sepolia-8tc3sd7dvy.t.conduit.xyz"}},testnet:!0}),MA=u({id:41144114,name:"Otim Devnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["http://devnet.otim.xyz"]}},contracts:{batchInvoker:{address:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}}}),_A=u({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}}}),NA=u({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}),RA=u({id:3338,name:"Peaq",nativeCurrency:{decimals:18,name:"peaq",symbol:"PEAQ"},rpcUrls:{default:{http:["https://quicknode1.peaq.xyz","https://quicknode2.peaq.xyz","https://quicknode3.peaq.xyz"],webSocket:["wss://quicknode1.peaq.xyz","wss://quicknode2.peaq.xyz","wss://quicknode3.peaq.xyz"]}},blockExplorers:{default:{name:"Subscan",url:"https://peaq.subscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3566354}}}),mi=1,zA=u({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"}},contracts:{l2OutputOracle:{[mi]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3380209},portal:{[mi]:{address:"0xb26Fd985c5959bBB382BAFdD0b879E149e48116c"}},l1StandardBridge:{[mi]:{address:"0xD0204B9527C1bA7bD765Fa5CCD9355d38338272b"}}},formatters:Eu,sourceId:mi}),hi=11155111,LA=u({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"}},contracts:{l2OutputOracle:{[hi]:{address:"0xD5bAc3152ffC25318F848B3DD5dA6C85171BaEEe"}},portal:{[hi]:{address:"0xF04BdD5353Bb0EFF6CA60CfcC78594278eBfE179"}},l1StandardBridge:{[hi]:{address:"0xFaE6abCAF30D23e233AC7faF747F2fC3a5a6Bfa3"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:3754925}},formatters:Eu,sourceId:hi,testnet:!0}),$A=u({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}}}),HA=u({id:7070,name:"Planq Mainnet",nativeCurrency:{decimals:18,name:"PLQ",symbol:"PLQ"},rpcUrls:{default:{http:["https://planq-rpc.nodies.app","https://evm-rpc.planq.network","https://jsonrpc.planq.nodestake.top"]}},blockExplorers:{default:{name:"Planq Explorer",url:"https://evm.planq.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:8470015}},testnet:!1}),GA=u({id:9745,name:"Plasma",blockTime:1e3,nativeCurrency:{name:"Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://rpc.plasma.to"]}},blockExplorers:{default:{name:"PlasmaScan",url:"https://plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),jA=u({id:9747,name:"Plasma Devnet",nativeCurrency:{name:"Devnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://devnet-rpc.plasma.to"]}},testnet:!0,contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}}}),qA=u({id:9746,name:"Plasma Testnet",nativeCurrency:{name:"Testnet Plasma",symbol:"XPL",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plasma.to"]}},blockExplorers:{default:{name:"RouteScan",url:"https://testnet.plasmascan.to"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!0}),VA=u({...mt,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}),KA=u({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}}}),WA=u({id:98865,name:"Plume (Legacy)",nativeCurrency:{name:"Plume Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.plumenetwork.xyz"],webSocket:["wss://rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plumenetwork.xyz",apiUrl:"https://explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:48577}},sourceId:1}),XA=u({id:98864,name:"Plume Devnet (Legacy)",nativeCurrency:{name:"Plume Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://test-rpc.plumenetwork.xyz"],webSocket:["wss://test-rpc.plumenetwork.xyz"]}},blockExplorers:{default:{name:"Blockscout",url:"https://test-explorer.plumenetwork.xyz",apiUrl:"https://test-explorer.plumenetwork.xyz/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:481948}},testnet:!0,sourceId:11155111}),ZA=u({id:98866,name:"Plume",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://rpc.plume.org"],webSocket:["wss://rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.plume.org",apiUrl:"https://explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39679}},sourceId:1}),QA=u({id:98867,name:"Plume Testnet",nativeCurrency:{name:"Plume",symbol:"PLUME",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.plume.org"],webSocket:["wss://testnet-rpc.plume.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer.plume.org",apiUrl:"https://testnet-explorer.plume.org/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:199712}},testnet:!0,sourceId:11155111}),JA=u({id:161221135,name:"Plume Testnet (Legacy)",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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6022332}},testnet:!0,sourceId:11155111}),YA=u({id:631571,name:"Polter Testnet",nativeCurrency:{decimals:18,name:"Polter GHST",symbol:"GHST"},rpcUrls:{default:{http:["https://geist-polter.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Blockscout",url:"https://polter-testnet.explorer.alchemy.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11245}},testnet:!0}),eT=u({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),tT=u({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),nT=u({id:80001,name:"Polygon Mumbai",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://80001.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com",apiUrl:"https://api-testnet.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),rT=u({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}}}),sT=u({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}}}),aT=u({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}}}),oT=u({id:8008,name:"Polynomial",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://polynomialscan.io"}},testnet:!1,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),iT=u({id:80008,name:"Polynomia Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sepolia.polynomial.fi"]}},blockExplorers:{default:{name:"Polynomial Scan",url:"https://sepolia.polynomialscan.io"}},testnet:!0,contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}}}),cT=u({id:60603,name:"POTOS Mainnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc.potos.hk"]}},blockExplorers:{default:{name:"POTOS Mainnet explorer",url:"https://scan.potos.hk"}},testnet:!1}),lT=u({id:60600,name:"POTOS Testnet",nativeCurrency:{decimals:18,name:"POTOS Token",symbol:"POT"},rpcUrls:{default:{http:["https://rpc-testnet.potos.hk"]}},blockExplorers:{default:{name:"POTOS Testnet explorer",url:"https://scan-testnet.potos.hk"}},testnet:!0}),uT=u({id:23023,name:"PremiumBlock Testnet",nativeCurrency:{name:"Premium Block",symbol:"PBLK",decimals:18},rpcUrls:{default:{http:["https://rpc.premiumblock.org"]}},blockExplorers:{default:{name:"PremiumBlocks Explorer",url:"https://scan.premiumblock.org"}},testnet:!0}),dT=u({id:369,name:"PulseChain",nativeCurrency:{name:"Pulse",symbol:"PLS",decimals:18},testnet:!1,blockTime:1e4,rpcUrls:{default:{http:["https://rpc.pulsechain.com"],webSocket:["wss://ws.pulsechain.com"]}},blockExplorers:{default:{name:"PulseScan",url:"https://ipfs.scan.pulsechain.com",apiUrl:"https://api.scan.pulsechain.com/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),pT=u({id:943,name:"PulseChain V4",testnet:!0,nativeCurrency:{name:"V4 Pulse",symbol:"v4PLS",decimals:18},blockTime:1e4,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}}}),fT=u({id:490092,name:"Pumpfi Testnet",nativeCurrency:{decimals:18,name:"PMPT",symbol:"PMPT"},rpcUrls:{default:{http:["https://rpc1testnet.pumpfi.me"]}},blockExplorers:{default:{name:"Pumpfi Testnet Scan",url:"https://testnetscan.pumpfi.me"}},testnet:!0}),eh=11155111,mT=u({...G,name:"Pyrope Testnet",testnet:!0,id:695569,sourceId:eh,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.pyropechain.com"],webSocket:["wss://rpc.pyropechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://pyrope.blockscout.com"}},contracts:{...G.contracts,l1StandardBridge:{[eh]:{address:"0xC24932c31D9621aE9e792576152B7ef010cFC2F8"}}}}),hT=u({id:766,name:"QL1",nativeCurrency:{decimals:18,name:"QOM",symbol:"QOM"},rpcUrls:{default:{http:["https://rpc.qom.one"]}},blockExplorers:{default:{name:"Ql1 Explorer",url:"https://scan.qom.one"}},contracts:{multicall3:{address:"0x7A52370716ea730585884F5BDB0f6E60C39b8C64"}},testnet:!1}),bT=u({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"}}}),yT=u({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}),xT=u({id:9,name:"Quai Network Mainnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Quaiscan",url:"https://quaiscan.io",apiUrl:"https://quaiscan.io/api"}},testnet:!1}),gT=u({id:15e3,name:"Quai Network Testnet",nativeCurrency:{decimals:18,name:"Quai",symbol:"QUAI"},rpcUrls:{default:{http:["https://orchard.rpc.quai.network/cyprus1"]}},blockExplorers:{default:{name:"Orchard Quaiscan",url:"https://orchard.quaiscan.io",apiUrl:"https://orchard.quaiscan.io/api"}},testnet:!0}),wT=u({id:5318007,name:"Reactive Lasna Testnet",nativeCurrency:{decimals:18,name:"Lasna React",symbol:"lREACT"},rpcUrls:{default:{http:["https://lasna-rpc.rnk.dev"]}},blockExplorers:{default:{name:"Reactscan",url:"https://lasna.reactscan.net"}},testnet:!0}),ET=u({id:111188,name:"re.al",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.realforreal.gelato.digital"]}},blockExplorers:{default:{name:"re.al Explorer",url:"https://explorer.re.al",apiUrl:"https://explorer.re.al/api/v2"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:695}}}),kT=u({id:151,name:"Redbelly Network Mainnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.mainnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.routescan.io",apiUrl:"https://api.routescan.io/v2/network/mainnet/evm/151/etherscan/api"}},testnet:!1}),CT=u({id:153,name:"Redbelly Network Testnet",nativeCurrency:{name:"Redbelly Native Coin",symbol:"RBNT",decimals:18},rpcUrls:{default:{http:["https://governors.testnet.redbelly.network"]}},blockExplorers:{default:{name:"Routescan",url:"https://redbelly.testnet.routescan.io",apiUrl:"https://api.routescan.io/v2/network/testnet/evm/153_2/etherscan/api"}},testnet:!0}),vT=u({id:50342,name:"Reddio",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://mainnet.reddio.com/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://reddio.cloud.blockscout.com",apiUrl:"https://reddio.cloud.blockscout.com/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:848849}},testnet:!1}),AT=u({id:50341,name:"Reddio Sepolia",nativeCurrency:{name:"Reddio",symbol:"RED",decimals:18},rpcUrls:{default:{http:["https://reddio-dev.reddio.com"]}},blockExplorers:{default:{name:"Reddioscan",url:"https://reddio-devnet.l2scan.co",apiUrl:"https://reddio-devnet.l2scan.co/api"}},testnet:!0}),bi=1,TT=u({...G,name:"Redstone",id:690,sourceId:bi,nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.redstonechain.com"],webSocket:["wss://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz"}},contracts:{...G.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[bi]:{address:"0xC7bCb0e8839a28A1cFadd1CF716de9016CdA51ae",blockCreated:19578329}},l2OutputOracle:{[bi]:{address:"0xa426A052f657AEEefc298b3B5c35a470e4739d69",blockCreated:19578337}},l1StandardBridge:{[bi]:{address:"0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69",blockCreated:19578331}}}}),ST=u({id:47805,name:"REI Mainnet",nativeCurrency:{decimals:18,name:"REI",symbol:"REI"},rpcUrls:{default:{http:["https://rpc.rei.network"],webSocket:["wss://rpc.rei.network"]}},blockExplorers:{default:{name:"REI Scan",url:"https://scan.rei.network"}},testnet:!1}),PT=u({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}),BT=u({id:11155931,name:"RISE Testnet",nativeCurrency:{name:"RISE Testnet Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.riselabs.xyz"],webSocket:["wss://testnet.riselabs.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.testnet.riselabs.xyz/",apiUrl:"https://explorer.testnet.riselabs.xyz/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"}},testnet:!0}),UT=u({id:753,name:"Rivalz",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rivalz.calderachain.xyz/http"]}},blockExplorers:{default:{name:"Rivalz Caldera Explorer",url:"https://rivalz.calderaexplorer.xyz"}},testnet:!1}),IT=u({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}}}),FT=u({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}}}),OT=u({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}}}),DT=u({id:7668,name:"The Root Network",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://root.rootnet.live/archive"],webSocket:["wss://root.rootnet.live/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:9218338}}}),MT=u({id:7672,name:"The Root Network - Porcini",nativeCurrency:{decimals:18,name:"XRP",symbol:"XRP"},rpcUrls:{default:{http:["https://porcini.rootnet.app/archive"],webSocket:["wss://porcini.rootnet.app/archive/ws"]}},blockExplorers:{default:{name:"Rootscan",url:"https://porcini.rootscan.io"}},contracts:{multicall3:{address:"0xc9C2E2429AeC354916c476B30d729deDdC94988d",blockCreated:10555692}},testnet:!0}),_T=u({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}}}),NT=u({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2771150}},testnet:!0}),yi=1,RT=u({...G,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:{...G.contracts,l2OutputOracle:{[yi]:{address:"0xE6f24d2C32B3109B18ed33cF08eFb490b1e09C10"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14193},portal:{[yi]:{address:"0x6A12432491bbbE8d3babf75F759766774C778Db4",blockCreated:19387057}},l1StandardBridge:{[yi]:{address:"0x4cbab69108Aa72151EDa5A3c164eA86845f18438"}}},sourceId:yi}),xi=11155111,zT=u({...G,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:{...G.contracts,l2OutputOracle:{[xi]:{address:"0xDb5c46C3Eaa6Ed6aE8b2379785DF7dd029C0dC81"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:55697},portal:{[xi]:{address:"0xcBD77E8E1E7F06B25baDe67142cdE82652Da7b57",blockCreated:5345035}},l1StandardBridge:{[xi]:{address:"0xdDD29bb63B0839FB1cE0eE439Ff027738595D07B"}}},testnet:!0,sourceId:xi}),LT=u({id:7225878,name:"Saakuru Mainnet",nativeCurrency:{name:"OAS",symbol:"OAS",decimals:18},rpcUrls:{default:{http:["https://rpc.saakuru.network"]}},blockExplorers:{default:{name:"Saakuru Explorer",url:"https://explorer.saakuru.network"}},testnet:!1}),$T=u({id:5464,name:"Saga",network:"saga",nativeCurrency:{decimals:18,name:"gas",symbol:"GAS"},rpcUrls:{default:{http:["https://sagaevm.jsonrpc.sagarpc.io"]}},blockExplorers:{default:{name:"Saga Explorer",url:"https://sagaevm.sagaexplorer.io"}},contracts:{multicall3:{address:"0x864DDc9B50B9A0dF676d826c9B9EDe9F8913a160",blockCreated:467530}}}),HT=u({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}),GT=u({id:1996,name:"Sanko",nativeCurrency:{name:"DMT",symbol:"DMT",decimals:18},rpcUrls:{default:{http:["https://mainnet.sanko.xyz"]}},blockExplorers:{default:{name:"Sanko Explorer",url:"https://explorer.sanko.xyz"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:37}},testnet:!1}),jT=u({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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:734531}}}),qT=u({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"}},testnet:!0}),VT=u({id:3109,name:"SatoshiVM Alpha Mainnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://alpha-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://svmscan.io",apiUrl:"https://svmscan.io/api"}}}),KT=u({id:3110,name:"SatoshiVM Testnet",nativeCurrency:{name:"BTC",symbol:"BTC",decimals:18},rpcUrls:{default:{http:["https://test-rpc-node-http.svmscan.io"]}},blockExplorers:{default:{name:"blockscout",url:"https://testnet.svmscan.io",apiUrl:"https://testnet.svmscan.io/api"}},testnet:!0}),WT=u({id:534352,name:"Scroll",blockTime:3e3,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}),XT=u({id:534351,name:"Scroll Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rpc.scroll.io"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://sepolia.scrollscan.com",apiUrl:"https://api-sepolia.scrollscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:9473}},testnet:!0}),ZT=u({id:1329,name:"Sei Network",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc.sei-apis.com/"],webSocket:["wss://evm-ws.sei-apis.com/"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com",apiUrl:"https://seitrace.com/pacific-1/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}}}),QT=u({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}),JT=u({id:5124,name:"Seismic Devnet",nativeCurrency:{name:"Seismic Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://node-2.seismicdev.net/rpc"]}},blockExplorers:{default:{name:"Seismic Devnet Explorer",url:"https://explorer-2.seismicdev.net"}},testnet:!0}),YT=u({id:1328,name:"Sei Testnet",nativeCurrency:{name:"Sei",symbol:"SEI",decimals:18},rpcUrls:{default:{http:["https://evm-rpc-testnet.sei-apis.com"],webSocket:["wss://evm-ws-testnet.sei-apis.com"]}},blockExplorers:{default:{name:"Seitrace",url:"https://seitrace.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:98697651}},testnet:!0}),eS=u({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0}),gi=1,tS=u({...G,id:360,name:"Shape",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.shape.network"]}},blockExplorers:{default:{name:"shapescan",url:"https://shapescan.xyz",apiUrl:"https://shapescan.xyz/api"}},contracts:{...G.contracts,l2OutputOracle:{[gi]:{address:"0x6Ef8c69CfE4635d866e3E02732068022c06e724D",blockCreated:20369940}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1},portal:{[gi]:{address:"0xEB06fFa16011B5628BaB98E29776361c83741dd3",blockCreated:20369933}},l1StandardBridge:{[gi]:{address:"0x62Edd5f4930Ea92dCa3fB81689bDD9b9d076b57B",blockCreated:20369935}}},sourceId:gi}),nS=u({...G,id:11011,name:"Shape Sepolia Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.shape.network"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer-sepolia.shape.network/",apiUrl:"https://explorer-sepolia.shape.network/api/v2"}},contracts:{...G.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1}},testnet:!0,sourceId:11155111}),rS=u({id:8118,name:"Shardeum",nativeCurrency:{name:"Shardeum",symbol:"SHM",decimals:18},rpcUrls:{default:{http:["https://api.shardeum.org"]}},blockExplorers:{default:{name:"Shardeum Explorer",url:"https://explorer.shardeum.org"}},testnet:!1}),sS=u({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}),aS=u({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}}}),oS=u({id:157,name:"Puppynet Shibarium",nativeCurrency:{decimals:18,name:"Bone",symbol:"BONE"},rpcUrls:{default:{http:["https://puppynet.shibrpc.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://puppyscan.shib.io",apiUrl:"https://puppyscan.shib.io/api"}},contracts:{multicall3:{address:"0xA4029b74FBA366c926eDFA7Dd10B21C621170a4c",blockCreated:3035769}},testnet:!0}),iS=u({id:336,name:"Shiden",nativeCurrency:{decimals:18,name:"SDN",symbol:"SDN"},rpcUrls:{default:{http:["https://shiden.public.blastapi.io"],webSocket:["wss://shiden-rpc.dwellir.com"]}},blockExplorers:{default:{name:"Shiden Scan",url:"https://shiden.subscan.io"}},testnet:!1}),cS=u({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"}}}),lS=u({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}),uS=u({id:97453,name:"Sidra Chain",nativeCurrency:{decimals:18,name:"Sidra Digital Asset",symbol:"SDA"},rpcUrls:{default:{http:["https://node.sidrachain.com"]}},blockExplorers:{default:{name:"Sidra Chain Explorer",url:"https://ledger.sidrachain.com"}}}),dS=u({id:380929,name:"Silent Data Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.silentdata.com"]}},blockExplorers:{default:{name:"Silent Data Mainnet Explorer",url:"https://explorer-mainnet.rollup.silentdata.com"}},testnet:!1}),pS=u({id:2355,name:"Silicon zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.silicon.network","https://silicon-mainnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconScope",url:"https://scope.silicon.network"}}}),fS=u({id:1722641160,name:"Silicon Sepolia zkEVM",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc-sepolia.silicon.network","https://silicon-testnet.nodeinfra.com"]}},blockExplorers:{default:{name:"SiliconSepoliaScope",url:"https://scope-sepolia.silicon.network"}},testnet:!0}),mS=u({id:98,name:"Six Protocol",nativeCurrency:{decimals:18,name:"SIX",symbol:"SIX"},rpcUrls:{default:{http:["https://sixnet-rpc-evm.sixprotocol.net"]}},blockExplorers:{default:{name:"Six Protocol Scan",url:"https://sixscan.io/sixnet"}},testnet:!1}),hS=u({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:{}}),bS=u({id:1564830818,name:"SKALE Calypso 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}}}),yS=u({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}),xS=u({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:{}}),gS=u({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:{}}),wS=u({id:2046399126,name:"SKALE Europa 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}}}),ES=u({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}),kS=u({id:2139927552,name:"Exorde Network",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:{}}),CS=u({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:{}}),vS=u({id:1482601649,name:"SKALE Nebula 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}}}),AS=u({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}),TS=u({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:{}}),SS=u({id:1187947933,name:"SKALE Base",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://skale-base.skalenodes.com/v1/base"],webSocket:["wss://skale-base.skalenodes.com/v1/ws/base"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://skale-base-explorer.skalenodes.com/"}},testnet:!0}),PS=u({id:324705682,name:"SKALE Base Sepolia Testnet",nativeCurrency:{name:"Credits",symbol:"CREDIT",decimals:18},rpcUrls:{default:{http:["https://base-sepolia-testnet.skalenodes.com/v1/base-testnet"],webSocket:["wss://base-sepolia-testnet.skalenodes.com/v1/ws/base-testnet"]}},blockExplorers:{default:{name:"SKALE Explorer",url:"https://base-sepolia-testnet-explorer.skalenodes.com/"}},testnet:!0}),BS=u({id:1350216234,name:"SKALE Titan 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}}}),US=u({id:1020352220,name:"SKALE Titan Testnet",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}),IS=u({id:984123,name:"Forma Sketchpad",network:"sketchpad",nativeCurrency:{symbol:"TIA",name:"TIA",decimals:18},rpcUrls:{default:{http:["https://rpc.sketchpad-1.forma.art"],webSocket:["wss://ws.sketchpad-1.forma.art"]}},blockExplorers:{default:{name:"Sketchpad Explorer",url:"https://explorer.sketchpad-1.forma.art"}},testnet:!0}),Ua=1,FS=u({...G,id:2192,network:"snaxchain-mainnet",name:"SnaxChain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://explorer.snaxchain.io",apiUrl:"https://explorer.snaxchain.io/api"}},contracts:{...G.contracts,disputeGameFactory:{[Ua]:{address:"0x472562Fcf26D6b2793f8E0b0fB660ba0E5e08A46"}},l2OutputOracle:{[Ua]:{address:"0x2172e492Fc807F5d5645D0E3543f139ECF539294"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Ua]:{address:"0x79f446D024d74D0Bb6E699C131c703463c5D65E9"}},l1StandardBridge:{[Ua]:{address:"0x6534Bdb6b5c060d3e6aa833433333135eFE8E0aA"}}},sourceId:Ua}),Ia=11155111,OS=u({...G,id:13001,network:"snaxchain-testnet",name:"SnaxChain Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.snaxchain.io"]}},blockExplorers:{default:{name:"Snax Explorer",url:"https://testnet-explorer.snaxchain.io",apiUrl:"https://testnet-explorer.snaxchain.io/api"}},contracts:{...G.contracts,disputeGameFactory:{[Ia]:{address:"0x206a75d89d45F146C54020F132FF93bEDD09f55E"}},l2OutputOracle:{[Ia]:{address:"0x60e3A368a4cdCEf85ffB964e372726F56A46221e"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11"},portal:{[Ia]:{address:"0xb5afdd0E8dDF081Ef90e8A3e0c7b5798e66E954E"}},l1StandardBridge:{[Ia]:{address:"0xbd37E1a59D4C00C9A46F75018dffd84061bC5f74"}}},testnet:!0,sourceId:Ia}),DS=u({id:5031,name:"Somnia",nativeCurrency:{name:"Somnia",symbol:"SOMI",decimals:18},rpcUrls:{default:{http:["https://api.infra.mainnet.somnia.network"]}},blockExplorers:{default:{name:"Somnia Explorer",url:"https://explorer.somnia.network",apiUrl:"https://explorer.somnia.network/api"}},testnet:!1}),MS=u({id:50312,name:"Somnia Testnet",nativeCurrency:{name:"STT",symbol:"STT",decimals:18},rpcUrls:{default:{http:["https://dream-rpc.somnia.network"]}},blockExplorers:{default:{name:"Somnia Testnet Explorer",url:"https://shannon-explorer.somnia.network/",apiUrl:"https://shannon-explorer.somnia.network/api"}},contracts:{multicall3:{address:"0x841b8199E6d3Db3C6f264f6C2bd8848b3cA64223",blockCreated:71314235}},testnet:!0}),Fa=1,_S=u({...G,id:1868,name:"Soneium Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium.blockscout.com",apiUrl:"https://soneium.blockscout.com/api"}},contracts:{...G.contracts,disputeGameFactory:{[Fa]:{address:"0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0"}},l2OutputOracle:{[Fa]:{address:"0x0000000000000000000000000000000000000000"}},portal:{[Fa]:{address:"0x88e529a6ccd302c948689cd5156c83d4614fae92",blockCreated:7061266}},l1StandardBridge:{[Fa]:{address:"0xeb9bf100225c214efc3e7c651ebbadcf85177607",blockCreated:7061266}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},sourceId:Fa}),Oa=11155111,NS=u({...G,id:1946,name:"Soneium Minato Testnet",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.minato.soneium.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://soneium-minato.blockscout.com",apiUrl:"https://soneium-minato.blockscout.com/api"}},contracts:{...G.contracts,disputeGameFactory:{[Oa]:{address:"0xB3Ad2c38E6e0640d7ce6aA952AB3A60E81bf7a01"}},l2OutputOracle:{[Oa]:{address:"0x710e5286C746eC38beeB7538d0146f60D27be343"}},portal:{[Oa]:{address:"0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3",blockCreated:6466136}},l1StandardBridge:{[Oa]:{address:"0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2",blockCreated:6466136}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}},testnet:!0,sourceId:Oa}),RS=u({id:19,name:"Songbird Canary-Network",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"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13382504}}}),zS=u({id:16,name:"Songbird Testnet Coston",nativeCurrency:{decimals:18,name:"Coston Flare",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}),LS=u({id:146,name:"Sonic",blockTime:630,nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Explorer",url:"https://sonicscan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:60}},testnet:!1}),$S=u({id:57054,name:"Sonic Blaze Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.blaze.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Blaze Testnet Explorer",url:"https://testnet.sonicscan.org"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1100}},testnet:!0}),HS=u({id:64165,name:"Sonic Testnet",nativeCurrency:{decimals:18,name:"Sonic",symbol:"S"},rpcUrls:{default:{http:["https://rpc.testnet.soniclabs.com"]}},blockExplorers:{default:{name:"Sonic Testnet Explorer",url:"https://testnet.soniclabs.com/"}},testnet:!0}),GS=u({...mt,blockTime:200,id:50104,name:"Sophon",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.sophon.xyz"],webSocket:["wss://rpc.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.sophon.xyz"}},contracts:{multicall3:{address:"0x5f4867441d2416cA88B1b3fd38f21811680CD2C8",blockCreated:116}},testnet:!1}),jS=u({...mt,blockTime:200,id:531050104,name:"Sophon Testnet",nativeCurrency:{decimals:18,name:"Sophon",symbol:"SOPH"},rpcUrls:{default:{http:["https://rpc.testnet.sophon.xyz"],webSocket:["wss://rpc.testnet.sophon.xyz/ws"]}},blockExplorers:{default:{name:"Sophon Block Explorer",url:"https://explorer.testnet.sophon.xyz"}},contracts:{multicall3:{address:"0x83c04d112adedA2C6D9037bb6ecb42E7f0b108Af",blockCreated:15642}},testnet:!0}),qS=u({id:100021,name:"Sova",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.sova.io"]}},blockExplorers:{default:{name:"Sova Block Explorer",url:"hhttps://explorer.sova.io"}},testnet:!1}),VS=u({id:120893,name:"Sova Network Sepolia",nativeCurrency:{decimals:18,name:"Sepolia Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.testnet.sova.io"]}},blockExplorers:{default:{name:"Sova Sepolia Explorer",url:"https://explorer.testnet.sova.io"}},testnet:!0}),KS=u({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}),WS=u({id:2201,name:"Stable Testnet",nativeCurrency:{decimals:18,name:"gUSDT",symbol:"gUSDT"},rpcUrls:{default:{http:["https://rpc.testnet.stable.xyz"],webSocket:["wss://rpc.testnet.stable.xyz"]}},blockExplorers:{default:{name:"Stablescan",url:"https://testnet.stablescan.xyz",apiUrl:"https://testnet.stablescan.xyz/api"}},testnet:!0}),th=u({...Au,id:1660990954,name:"Status Network Sepolia",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://public.sepolia.rpc.status.network"],webSocket:["wss://public.sepolia.rpc.status.network/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepoliascan.status.network"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1578364}},testnet:!0}),XS=u({id:1234,name:"Step Network",nativeCurrency:{name:"FITFI",symbol:"FITFI",decimals:18},rpcUrls:{default:{http:["https://rpc.step.network"]}},blockExplorers:{default:{name:"Step Scan",url:"https://stepscan.io"}},testnet:!1}),ZS=u({id:1514,name:"Story",nativeCurrency:{decimals:18,name:"IP Token",symbol:"IP"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:340998},ensRegistry:{address:"0x5dc881dda4e4a8d312be3544ad13118d1a04cb17",blockCreated:648924},ensUniversalResolver:{address:"0xddfb18888a9466688235887dec2a10c4f5effee9",blockCreated:649114}},rpcUrls:{default:{http:["https://mainnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story explorer",url:"https://storyscan.io",apiUrl:"https://storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!1}),QS=u({id:1315,name:"Story Aeneid",network:"story-aeneid",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1792},ensRegistry:{address:"0x5dC881dDA4e4a8d312be3544AD13118D1a04Cb17",blockCreated:1322033},ensUniversalResolver:{address:"0x6D3B3F99177FB2A5de7F9E928a9BD807bF7b5BAD",blockCreated:1322097}},rpcUrls:{default:{http:["https://aeneid.storyrpc.io"]}},blockExplorers:{default:{name:"Story Aeneid Explorer",url:"https://aeneid.storyscan.io",apiUrl:"https://aeneid.storyscan.io/api/v2"}},ensTlds:[".ip"],testnet:!0}),JS=u({id:1516,name:"Story Odyssey",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://rpc.odyssey.storyrpc.io"]}},blockExplorers:{default:{name:"Story Odyssey Explorer",url:"https://odyssey.storyscan.xyz"}},testnet:!0}),YS=u({id:1513,name:"Story Testnet",nativeCurrency:{decimals:18,name:"IP",symbol:"IP"},rpcUrls:{default:{http:["https://testnet.storyrpc.io"]}},blockExplorers:{default:{name:"Story Testnet Explorer",url:"https://testnet.storyscan.xyz"}},testnet:!0}),eP=u({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"}}}),tP=u({id:8866,name:"SuperLumio",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.lumio.io"]}},blockExplorers:{default:{name:"Lumio explorer",url:"https://explorer.lumio.io"}},testnet:!1}),nP=u({id:55244,name:"Superposition",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.superposition.so"]}},blockExplorers:{default:{name:"Superposition Explorer",url:"https://explorer.superposition.so"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:39}},testnet:!1}),Da=1,rP=u({...G,id:5330,name:"Superseed",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Explorer",url:"https://explorer.superseed.xyz",apiUrl:"https://explorer.superseed.xyz/api/v2"}},contracts:{...G.contracts,disputeGameFactory:{[Da]:{address:"0x8b097CF1f9BbD9cbFD0DD561858a1FCbC8857Be0",blockCreated:20737481}},l2OutputOracle:{[Da]:{address:"0x693A0F8854F458D282DE3C5b69E8eE5EEE8aA949",blockCreated:20737481}},portal:{[Da]:{address:"0x2c2150aa5c75A24fB93d4fD2F2a895D618054f07",blockCreated:20737481}},l1StandardBridge:{[Da]:{address:"0x8b0576E39F1233679109F9b40cFcC2a7E0901Ede",blockCreated:20737481}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"}},sourceId:Da}),Tu=11155111,sP=u({...G,id:53302,name:"Superseed Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.superseed.xyz"]}},blockExplorers:{default:{name:"Superseed Sepolia Explorer",url:"https://sepolia-explorer.superseed.xyz",apiUrl:"https://sepolia-explorer.superseed.xyz/api/v2"}},contracts:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},portal:{[Tu]:{address:"0x7A0db8C51432d2C3eb4e8f360a2EeB26FF2809fB",blockCreated:5523438}},l1StandardBridge:{[Tu]:{address:"0x2B227A603fAAdB3De0ED050b63ADD232B5f2c28C",blockCreated:5523442}}},testnet:!0,sourceId:Tu}),aP=u({id:763375,name:"Surge Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://l2-rpc.hoodi.surge.wtf"],webSocket:["wss://l2-ws.hoodi.surge.wtf"]}},blockExplorers:{default:{name:"Surge Testnet Blockscout",url:"https://explorer.hoodi.surge.wtf"}},testnet:!0}),oP=u({id:254,name:"Swan Chain Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.swanchain.org"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://swanscan.io"}},testnet:!1}),iP=u({id:20241133,name:"Swan Proxima Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://rpc-proxima.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://proxima-explorer.swanchain.io"}},testnet:!0}),cP=u({id:2024,name:"Swan Saturn Testnet",nativeCurrency:{name:"Swan Ether",symbol:"sETH",decimals:18},rpcUrls:{default:{http:["https://saturn-rpc.swanchain.io"]}},blockExplorers:{default:{name:"Swan Explorer",url:"https://saturn-explorer.swanchain.io"}},testnet:!0}),lP=u({...G,id:1923,name:"Swellchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-mainnet.alt.technology"]}},blockExplorers:{default:{name:"Swell Explorer",url:"https://explorer.swellnetwork.io",apiUrl:"https://explorer.swellnetwork.io/api"}},contracts:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),uP=u({...G,id:1924,name:"Swellchain Testnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://swell-testnet.alt.technology"]}},blockExplorers:{default:{name:"Swellchain Testnet Explorer",url:"https://swell-testnet-explorer.alt.technology",apiUrl:"https://swell-testnet-explorer.alt.technology/api"}},contracts:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1}}}),dP=u({id:94,name:"SwissDLT Mainnet",nativeCurrency:{decimals:18,name:"BCTS",symbol:"BCTS"},rpcUrls:{default:{http:["https://rpc.swissdlt.ch"]}},blockExplorers:{default:{name:"SwissDLT Explorer",url:"https://explorer.swissdlt.ch"}},testnet:!1}),pP=u({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}}}),fP=u({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}}}),mP=u({id:239,name:"TAC",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://rpc.ankr.com/tac"]}},blockExplorers:{default:{name:"Blockscout",url:"https://tac.blockscout.com",apiUrl:"https://tac.blockscout.com/api"},native:{name:"TAC Explorer",url:"https://explorer.tac.build",apiUrl:"https://explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0}}}),hP=u({id:2391,name:"TAC SPB Testnet",nativeCurrency:{name:"TAC",symbol:"TAC",decimals:18},rpcUrls:{default:{http:["https://spb.rpc.tac.build"]}},blockExplorers:{default:{name:"TAC",url:"https://spb.explorer.tac.build",apiUrl:"https://spb.explorer.tac.build/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:471429}},testnet:!0}),bP=u({id:167e3,name:"Taiko Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.mainnet.taiko.xyz"],webSocket:["wss://ws.mainnet.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://taikoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:11269}}}),yP=u({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"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59757}},testnet:!0}),xP=u({id:167013,name:"Taiko Hoodi",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.hoodi.taiko.xyz"],webSocket:["wss://ws.hoodi.taiko.xyz"]}},blockExplorers:{default:{name:"Etherscan",url:"https://hoodi.taikoscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:581116}},testnet:!0}),gP=u({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}),wP=u({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"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.katla.taiko.xyz"}}}),EP=u({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"}}}),kP=u({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"}}}),CP=u({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}),vP=u({id:10218,name:"Tea Sepolia",nativeCurrency:{name:"Sepolia Tea",symbol:"TEA",decimals:18},rpcUrls:{default:{http:["https://tea-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Tea Sepolia Explorer",url:"https://sepolia.tea.xyz"}},testnet:!0}),AP=u({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}),TP=u({id:40,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.telos.net"]}},blockExplorers:{default:{name:"Teloscan",url:"https://www.teloscan.io/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:246530709}}}),SP=u({id:41,name:"Telos",nativeCurrency:{decimals:18,name:"Telos",symbol:"TLOS"},rpcUrls:{default:{http:["https://rpc.testnet.telos.net"]}},blockExplorers:{default:{name:"Teloscan (testnet)",url:"https://testnet.teloscan.io/"}},testnet:!0});/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const nh=rs(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),PP=nh.create(BigInt("-3")),BP=BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),UP=Ho({a:PP,b:BP,Fp:nh,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},Qc),rh=rs(BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff")),IP=rh.create(BigInt("-3")),FP=BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef");Ho({a:IP,b:FP,Fp:rh,n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),h:BigInt(1),lowS:!1},l5);const sh=rs(BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")),OP=sh.create(BigInt("-3")),DP=BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00");Ho({a:OP,b:DP,Fp:sh,n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"),h:BigInt(1),lowS:!1,allowedPrivateKeyLengths:[130,131,132]},c5);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const MP=UP;function ah(e){const{hash:t,payload:n,publicKey:r,signature:s}=e;return MP.verify(s,n instanceof Uint8Array?n:In(n),Rl(r).substring(2),...t?[{prehash:!0,lowS:!0}]:[])}const _P=new TextEncoder;Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]);const wi={...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63};function NP(e){const t=e.replace(/=+$/,""),n=t.length,r=new Uint8Array(n+3);_P.encodeInto(t+"===",r);for(let a=0,o=0;a<t.length;a+=4,o+=3){const i=(wi[r[a]]<<18)+(wi[r[a+1]]<<12)+(wi[r[a+2]]<<6)+wi[r[a+3]];r[o]=i>>16,r[o+1]=i>>8&255,r[o+2]=i&255}const s=(n>>2)*3+(n%4&&n%4-1);return new Uint8Array(r.buffer,0,s)}Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]);function RP(e){const{challenge:t,hash:n=!0,metadata:r,publicKey:s,signature:a}=e,{authenticatorData:o,challengeIndex:i,clientDataJSON:c,typeIndex:l,userVerificationRequired:d}=r,p=In(o);if(p.length<37)return!1;const f=p[32];if((f&1)!==1||d&&(f&4)!==4||(f&8)!==8&&(f&16)===16)return!1;if(l!==void 0){const v='"type":"webauthn.get"';if(v!==c.slice(Number(l),v.length+1))return!1}const m=i!==void 0?c.slice(Number(i)).match(/^"challenge":"(.*?)"/):c.match(/"challenge":"(.*?)"/);if(!m)return!1;const[y,g]=m;if(Me(NP(g))!==t)return!1;const P=U8(q0(c),{as:"Bytes"}),B=F5(p,P);return ah({hash:n,payload:B,publicKey:s,signature:a})}const Su="0x01",Pu="0x02",oh="0x03",hr="0x7777777777777777777777777777777777777777777777777777777777777777";function us(e){const t=e.endsWith(hr.slice(2))?ce(e,0,-Te(hr)):e;if(Te(t)===65){const o=au(t);return Go(o),{signature:o,type:"secp256k1"}}const r=ce(t,0,1),s=ce(t,1),a=Te(s);if(r===Su){if(a!==129)throw new Na({reason:`Invalid P256 signature envelope size: expected 129 bytes, got ${a} bytes`,serialized:t});return{publicKey:{prefix:4,x:Se(ce(s,64,96)),y:Se(ce(s,96,128))},prehash:fa(ce(s,128,129))!==0,signature:{r:Se(ce(s,0,32)),s:Se(ce(s,32,64))},type:"p256"}}if(r===Pu){if(a<128)throw new Na({reason:`Invalid WebAuthn signature envelope size: expected at least 128 bytes, got ${a} bytes`,serialized:t});const o=a-128,i=ce(s,0,o);let c,l;for(let d=37;d<o;d++){const p=Z0(ce(i,d));if(p.startsWith("{")&&p.endsWith("}"))try{JSON.parse(p),c=ce(i,0,d),l=p;break}catch{}}if(!c||!l)throw new Na({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{publicKey:{prefix:4,x:Se(ce(s,o+64,o+96)),y:Se(ce(s,o+96,o+128))},metadata:{authenticatorData:c,clientDataJSON:l},signature:{r:Se(ce(s,o,o+32)),s:Se(ce(s,o+32,o+64))},type:"webAuthn"}}if(r===oh){const o=ce(s,0,20),i=us(ce(s,20));return{userAddress:o,inner:i,type:"keychain"}}throw new Na({reason:`Unknown signature type identifier: ${r}. Expected ${Su} (P256) or ${Pu} (WebAuthn)`,serialized:t})}function Ma(e){if(typeof e=="string")return us(e);if(typeof e=="object"&&e!==null&&"r"in e&&"s"in e&&"yParity"in e)return{signature:e,type:"secp256k1"};const t=Bu(e);return{...e,...t==="p256"?{prehash:e.prehash}:{},type:t}}function Ei(e){if(e.type==="secp256k1")return{signature:ou(e),type:"secp256k1"};if(e.type==="p256")return{prehash:e.preHash,publicKey:{prefix:4,x:Se(e.pubKeyX),y:Se(e.pubKeyY)},signature:{r:Se(e.r),s:Se(e.s)},type:"p256"};if(e.type==="webAuthn"){const t=e.webauthnData,n=Te(t);let r,s;for(let a=37;a<n;a++){const o=Z0(ce(t,a));if(o.startsWith("{")&&o.endsWith("}"))try{JSON.parse(o),r=ce(t,0,a),s=o;break}catch{}}if(!r||!s)throw new Na({reason:"Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON",serialized:t});return{metadata:{authenticatorData:r,clientDataJSON:s},publicKey:{prefix:4,x:Se(e.pubKeyX),y:Se(e.pubKeyY)},signature:{r:Se(e.r),s:Se(e.s)},type:"webAuthn"}}if(e.type==="keychain"||"userAddress"in e&&"signature"in e)return{type:"keychain",userAddress:e.userAddress,inner:Ei(e.signature)};throw new _a({envelope:e})}function Bu(e){if(typeof e!="object"||e===null)throw new _a({envelope:e});if("type"in e&&e.type)return e.type;if("signature"in e&&!("publicKey"in e)&&typeof e.signature=="object"&&e.signature!==null&&"r"in e.signature&&"s"in e.signature&&"yParity"in e.signature||"r"in e&&"s"in e&&"yParity"in e)return"secp256k1";if("signature"in e&&"prehash"in e&&"publicKey"in e&&typeof e.prehash=="boolean")return"p256";if("signature"in e&&"metadata"in e&&"publicKey"in e)return"webAuthn";if("userAddress"in e&&"inner"in e)return"keychain";throw new _a({envelope:e})}function ki(e,t={}){const n=Bu(e);if(n==="secp256k1")return ke(Kg(e.signature),t.magic?hr:"0x");if(n==="p256"){const r=e;return ke(Su,V(r.signature.r,{size:32}),V(r.signature.s,{size:32}),V(r.publicKey.x,{size:32}),V(r.publicKey.y,{size:32}),V(r.prehash?1:0,{size:1}),t.magic?hr:"0x")}if(n==="webAuthn"){const r=e,s=ke(r.metadata.authenticatorData,pa(r.metadata.clientDataJSON));return ke(Pu,s,V(r.signature.r,{size:32}),V(r.signature.s,{size:32}),V(r.publicKey.x,{size:32}),V(r.publicKey.y,{size:32}),t.magic?hr:"0x")}if(n==="keychain"){const r=e;return ke(oh,r.userAddress,ki(r.inner),t.magic?hr:"0x")}throw new _a({envelope:e})}function Uu(e){const t=Bu(e);if(t==="secp256k1")return{...Am(e.signature),type:"secp256k1"};if(t==="p256"){const n=e;return{preHash:n.prehash,pubKeyX:V(n.publicKey.x,{size:32}),pubKeyY:V(n.publicKey.y,{size:32}),r:V(n.signature.r,{size:32}),s:V(n.signature.s,{size:32}),type:"p256"}}if(t==="webAuthn"){const n=e,r=ke(n.metadata.authenticatorData,pa(n.metadata.clientDataJSON));return{pubKeyX:V(n.publicKey.x,{size:32}),pubKeyY:V(n.publicKey.y,{size:32}),r:V(n.signature.r,{size:32}),s:V(n.signature.s,{size:32}),type:"webAuthn",webauthnData:r}}if(t==="keychain"){const n=e;return{type:"keychain",userAddress:n.userAddress,signature:Uu(n.inner)}}throw new _a({envelope:e})}function zP(e,t){const{payload:n}=t,r=(()=>{if(t.address)return t.address;if(t.publicKey)return Lo(t.publicKey)})();if(!r)return!1;const s=Ma(e);if(s.type==="secp256k1")return r?s3({address:r,payload:n,signature:s.signature}):!1;if(s.type==="p256"){const a=Lo(s.publicKey);return Ll(a,r)?ah({hash:s.prehash,publicKey:s.publicKey,payload:n,signature:s.signature}):!1}if(s.type==="webAuthn"){const a=Lo(s.publicKey);return Ll(a,r)?RP({challenge:So(n),metadata:s.metadata,publicKey:s.publicKey,signature:s.signature}):!1}throw new LP(`Unable to verify signature envelope of type "${s.type}".`)}class _a extends X{constructor({envelope:t}){super(`Unable to coerce value (\`${da(t)}\`) to a valid signature envelope.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.CoercionError"})}}let Na=class extends X{constructor({reason:t,serialized:n}){super(`Unable to deserialize signature envelope: ${t}`,{metaMessages:[`Serialized: ${n}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.InvalidSerializedError"})}};class LP extends X{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureEnvelope.VerificationError"})}}function $P(e,t={}){return typeof e.chainId=="string"?ih(e):t.signature?{...e,signature:t.signature}:e}function ih(e){const{address:t,chainId:n,nonce:r}=e,s=Ei(e.signature);return{address:t,chainId:Number(n),nonce:BigInt(r),signature:s}}function HP(e){return e.map(t=>ih(t))}function GP(e){const[t,n,r,s]=e,a={address:n,chainId:t==="0x"?0:Number(t),nonce:r==="0x"?0n:BigInt(r)};return s&&(a.signature=us(s)),$P(a)}function jP(e){const t=[];for(const n of e)t.push(GP(n));return t}function qP(e){const{address:t,chainId:n,nonce:r,signature:s}=e;return{address:t,chainId:V(n),nonce:V(r),signature:Uu(s)}}function VP(e){return e.map(t=>qP(t))}function KP(e){const{address:t,chainId:n,nonce:r}=e,s=e.signature?ki(e.signature):void 0;return[n?V(n):"0x",t,r?V(r):"0x",...s?[s]:[]]}function WP(e){if(!e||e.length===0)return[];const t=[];for(const n of e)t.push(KP(n));return t}function XP(e,t={}){return typeof e.expiry=="string"?ch(e):t.signature?{...e,signature:Ma(t.signature)}:e}function ch(e){const{chainId:t="0x0",keyId:n,expiry:r=0,limits:s,keyType:a}=e,o=Ei(e.signature);return{address:n,chainId:t==="0x"?0n:Se(t),expiry:Number(r),limits:s==null?void 0:s.map(i=>({token:i.token,limit:BigInt(i.limit)})),signature:o,type:a}}function ZP(e){const[t,n]=e,[r,s,a,o,i]=t,c=(()=>{switch(s){case"0x":case"0x00":return"secp256k1";case"0x01":return"p256";case"0x02":return"webAuthn";default:throw new Error(`Invalid key type: ${s}`)}})(),l={address:a,expiry:typeof o<"u"?fa(o):void 0,type:c,...r!=="0x"?{chainId:Se(r)}:{},...typeof o<"u"?{expiry:fa(o)}:{},...typeof i<"u"?{limits:i.map(([d,p])=>({token:d,limit:BigInt(p)}))}:{}};return n&&(l.signature=us(n)),XP(l)}function QP(e){const{address:t,chainId:n=0n,expiry:r,limits:s,type:a,signature:o}=e;return{chainId:n===0n?"0x":V(n),expiry:typeof r=="number"?V(r):null,limits:s==null?void 0:s.map(({token:i,limit:c})=>({token:i,limit:V(c)})),keyId:t,signature:Uu(o),keyType:a}}function JP(e){const{address:t,chainId:n=0n,expiry:r,limits:s}=e,a=e.signature?ki(e.signature):void 0,o=(()=>{switch(e.type){case"secp256k1":return"0x";case"p256":return"0x01";case"webAuthn":return"0x02";default:throw new Error(`Invalid key type: ${e.type}`)}})();return[[n===0n?"0x":V(n),o,t,typeof r=="number"?V(r):void 0,(s==null?void 0:s.map(c=>[c.token,V(c.limit)]))??void 0].filter(Boolean),...a?[a]:[]]}const YP="0x20c0";function lh(e){if(typeof e=="string")return Ft(e),e;const t=V(e,{size:18});return ke(YP,t)}const uh={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},dh={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function eB(e,t={}){if(!e)return null;const n=vm(e),r={...e,...n};return r.blockNumber=e.blockNumber?BigInt(e.blockNumber):null,r.data=e.input,r.gas=BigInt(e.gas??0n),r.nonce=BigInt(e.nonce??0n),r.transactionIndex=e.transactionIndex?Number(e.transactionIndex):null,r.value=BigInt(e.value??0n),e.authorizationList&&(r.authorizationList=e3(e.authorizationList)),e.chainId&&(r.chainId=Number(e.chainId)),e.gasPrice&&(r.gasPrice=BigInt(e.gasPrice)),e.maxFeePerBlobGas&&(r.maxFeePerBlobGas=BigInt(e.maxFeePerBlobGas)),e.maxFeePerGas&&(r.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.type&&(r.type=dh[e.type]??e.type),n&&(r.v=cu(n.yParity)),r}const ph={...uh,tempo:"0x76"},tB={...dh,"0x76":"tempo"};function nB(e,t={}){if(!e)return null;const n=eB(e);return n.type=tB[e.type],e.aaAuthorizationList&&(n.authorizationList=HP(e.aaAuthorizationList),delete n.aaAuthorizationList),e.calls&&(n.calls=e.calls.map(r=>({to:r.to,value:r.value&&r.value!=="0x"?BigInt(r.value):void 0,data:r.input||r.data||"0x"}))),e.feeToken&&(n.feeToken=e.feeToken),e.nonceKey&&(n.nonceKey=BigInt(e.nonceKey)),e.signature&&(n.signature=Ei(e.signature)),e.validAfter&&(n.validAfter=Number(e.validAfter)),e.validBefore&&(n.validBefore=Number(e.validBefore)),e.keyAuthorization&&(n.keyAuthorization=ch(e.keyAuthorization)),e.feePayerSignature&&(n.feePayerSignature=ou(e.feePayerSignature),n.feePayerSignature.v=cu(n.feePayerSignature.yParity)),n}function rB(e){const t={};return typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.authorizationList<"u"&&(t.authorizationList=n3(e.authorizationList)),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(t.blobs=e.blobs),typeof e.chainId<"u"&&(t.chainId=V(e.chainId)),typeof e.data<"u"?(t.data=e.data,t.input=e.data):typeof e.input<"u"&&(t.data=e.input,t.input=e.input),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=V(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=V(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=V(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=V(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=V(e.maxPriorityFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=V(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=V(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=uh[e.type]||e.type),typeof e.value<"u"&&(t.value=V(e.value)),t}function sB(e){const t=rB({...e,authorizationList:void 0});e.authorizationList&&(t.authorizationList=VP(e.authorizationList)),e.calls&&(t.calls=e.calls.map(r=>({to:r.to,value:r.value?V(r.value):"0x",data:r.data??"0x"}))),typeof e.feeToken<"u"&&(t.feeToken=lh(e.feeToken)),e.keyAuthorization&&(t.keyAuthorization=QP(e.keyAuthorization)),typeof e.validBefore<"u"&&(t.validBefore=V(e.validBefore)),typeof e.validAfter<"u"&&(t.validAfter=V(e.validAfter));const n=(()=>{if(e.nonceKey==="random")return X0(6);if(typeof e.nonceKey=="bigint")return V(e.nonceKey)})();return n&&(t.nonceKey=n),(typeof e.calls<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"||e.type==="tempo")&&(t.type=ph.tempo,delete t.data,delete t.input,delete t.to,delete t.value),t}function aB(e){const t=[];for(let n=0;n<e.length;n++){const[r,s]=e[n];r&&Ft(r,{strict:!1}),t.push({address:r,storageKeys:s.map(a=>I8(a)?a:ml(a))})}return t}function oB(e){if(!e||e.length===0)return[];const t=[];for(const{address:n,storageKeys:r}of e){for(let s=0;s<r.length;s++)if(Te(r[s])!==32)throw new iB({storageKey:r[s]});n&&Ft(n,{strict:!1}),t.push([n,r])}return t}class iB extends X{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Te(t)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccessList.InvalidStorageKeySizeError"})}}const fh={wei:0,gwei:9,szabo:12,finney:15,ether:18};function cB(e,t=0){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[s,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${s||"0"}${a?`.${a}`:""}`}function Iu(e,t="wei"){return cB(e,fh.gwei-fh[t])}class lB extends X{constructor({feeCap:t}={}){super(`The fee cap (\`maxFeePerGas\`/\`maxPriorityFeePerGas\`${t?` = ${Iu(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.FeeCapTooHighError"})}}class uB extends X{constructor({chainId:t}){super(typeof t<"u"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidChainIdError"})}}class dB extends X{constructor({attributes:t,serialized:n,type:r}){const s=Object.entries(t).map(([a,o])=>typeof o>"u"?a:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${r}" was provided.`,{metaMessages:[`Serialized Transaction: "${n}"`,s.length>0?`Missing Attributes: ${s.join(", ")}`:""].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.InvalidSerializedError"})}}class pB extends X{constructor({maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${Iu(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Iu(n)} gwei`:""}).`].join(`
109
+ `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionEnvelope.TipAboveFeeCapError"})}}const fB="0x78",mB="0x76",mh="tempo";function Fu(e){const{calls:t,chainId:n,maxFeePerGas:r,maxPriorityFeePerGas:s,validBefore:a,validAfter:o}=e;if(!t||t.length===0)throw new wB;if(typeof a=="number"&&typeof o=="number"&&a<=o)throw new EB({validBefore:a,validAfter:o});if(t)for(const i of t)i.to&&Ft(i.to,{strict:!1});if(n<=0)throw new uB({chainId:n});if(r&&BigInt(r)>2n**256n-1n)throw new lB({feeCap:r});if(s&&r&&s>r)throw new pB({maxFeePerGas:r,maxPriorityFeePerGas:s})}function hB(e){const t=mg(ce(e,1)),[n,r,s,a,o,i,c,l,d,p,f,m,y,g,P]=t,B=Array.isArray(g)?g:void 0,v=B?P:g;if(!(t.length===13||t.length===14||t.length===15))throw new dB({attributes:{authorizationList:y,chainId:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:a,calls:o,accessList:i,keyAuthorization:B,nonceKey:c,nonce:l,validBefore:d,validAfter:p,feeToken:f,feePayerSignatureOrSender:m,...t.length>12?{signature:v}:{}},serialized:e,type:mh});let U={chainId:Number(n),type:mh};if(Ut(a)&&a!=="0x"&&(U.gas=BigInt(a)),Ut(l)&&(U.nonce=l==="0x"?0n:BigInt(l)),Ut(s)&&s!=="0x"&&(U.maxFeePerGas=BigInt(s)),Ut(r)&&r!=="0x"&&(U.maxPriorityFeePerGas=BigInt(r)),Ut(c)&&(U.nonceKey=c==="0x"?0n:BigInt(c)),Ut(d)&&d!=="0x"&&(U.validBefore=Number(d)),Ut(p)&&p!=="0x"&&(U.validAfter=Number(p)),Ut(f)&&f!=="0x"&&(U.feeToken=f),o&&o!=="0x"){const D=o;U.calls=D.map(N=>{const[_,h,b]=N,x={};return _&&_!=="0x"&&(x.to=_),h&&h!=="0x"&&(x.value=BigInt(h)),b&&b!=="0x"&&(x.data=b),x})}(i==null?void 0:i.length)!==0&&i!=="0x"&&(U.accessList=aB(i)),(y==null?void 0:y.length)!==0&&y!=="0x"&&(U.authorizationList=jP(y)),m!=="0x"&&m!==void 0&&(m==="0x00"||$o(m)?U.feePayerSignature=null:U.feePayerSignature=Vg(m)),B&&(U.keyAuthorization=ZP(B));const k=v?us(v):void 0;return k&&(U={...U,signature:k}),Fu(U),U}function bB(e,t={}){const{feePayerSignature:n,signature:r}=t,s=typeof e=="string"?hB(e):e;return Fu(s),{...s,...r?{signature:Ma(r)}:{},...n?{feePayerSignature:jo(n)}:{},type:"tempo"}}function Ra(e,t={}){const{accessList:n,authorizationList:r,calls:s,chainId:a,feeToken:o,gas:i,keyAuthorization:c,nonce:l,nonceKey:d,maxFeePerGas:p,maxPriorityFeePerGas:f,validBefore:m,validAfter:y}=e;Fu(e);const g=oB(n),P=t.signature||e.signature,B=WP(r),v=s.map(D=>[D.to??"0x",D.value?V(D.value):"0x",D.data??"0x"]),U=(()=>{if(t.sender)return t.sender;const D=typeof t.feePayerSignature<"u"?t.feePayerSignature:e.feePayerSignature;return D===null?"0x00":D?Wg(D):"0x"})(),k=[V(a),f?V(f):"0x",p?V(p):"0x",i?V(i):"0x",v,g,d?V(d):"0x",l?V(l):"0x",typeof m=="number"?V(m):"0x",typeof y=="number"?V(y):"0x",typeof o=="bigint"||typeof o=="string"?lh(o):"0x",U,B,...c?[JP(c)]:[],...P?[ki(Ma(P))]:[]];return ke(t.format==="feePayer"?fB:mB,xg(k))}function yB(e){return xB(e,{presign:!0})}function xB(e,t={}){const n=Ra({...e,...t.presign?{signature:void 0}:{}});return wa(n)}function gB(e,t){const{sender:n}=t,r=Ra({...e,signature:void 0},{sender:n,format:"feePayer"});return wa(r)}class wB extends X{constructor(){super("Calls list cannot be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.CallsEmptyError"})}}class EB extends X{constructor({validBefore:t,validAfter:n}){super(`validBefore (${t}) must be greater than validAfter (${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TxEnvelopeTempo.InvalidValidityWindowError"})}}function hh(e){const t=e.account;return t!=null&&t.keyType&&t.keyType!=="secp256k1"||typeof e.calls<"u"||typeof e.feePayer<"u"||typeof e.feeToken<"u"||typeof e.keyAuthorization<"u"||typeof e.nonceKey<"u"||typeof e.signature<"u"||typeof e.validBefore<"u"||typeof e.validAfter<"u"?"tempo":e.type?e.type:Yc(e)}function Ou(e){try{return hh(e)==="tempo"}catch{return!1}}async function kB(e,t){if(!Ou(e)){if(t&&"type"in t&&t.type!=="secp256k1")throw new Error("Unsupported signature type. Expected `secp256k1` but got `"+t.type+"`.");if(t&&"type"in t){const{r,s,yParity:a}=t==null?void 0:t.signature;return Ro(e,{r:V(r,{size:32}),s:V(s,{size:32}),yParity:a})}return Ro(e,t)}if(hh(e)==="tempo")return CB(e,t);throw new Error("Unsupported transaction type")}async function CB(e,t){var l;const n=(()=>{if(e.signature)return e.signature;if(t&&"type"in t)return t;if(t)return Ma({r:BigInt(t.r),s:BigInt(t.s),yParity:Number(t.yParity)})})(),{chainId:r,feePayer:s,feePayerSignature:a,nonce:o,...i}=e,c={...i,calls:(l=i.calls)!=null&&l.length?i.calls:[{to:i.to||(!i.data||i.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:i.value,data:i.data}],chainId:Number(r),feePayerSignature:a?{r:BigInt(a.r),s:BigInt(a.s),yParity:Number(a.yParity)}:s?null:void 0,type:"tempo",...o?{nonce:BigInt(o)}:{}};if(s===!0&&delete c.feeToken,n&&typeof e.feePayer=="object"){const d=bB(c,{signature:n}),p=(()=>{if(e.from)return e.from;if(n.type==="secp256k1")return Sm({payload:yB(d),signature:n.signature});throw new Error("Unable to extract sender from transaction or signature.")})(),f=gB(d,{sender:p}),m=await e.feePayer.sign({hash:f});return Ra(d,{feePayerSignature:jo(m)})}if(s===!0){const d=Ra(c,{feePayerSignature:null,signature:n});return e.from&&n?ke(d,e.from,"0xfeefeefeefee"):d}return Ra({...c,...s?{feeToken:void 0}:{}},{feePayerSignature:void 0,signature:n})}function vB(e){if(!Ou(e))return ir(e);const{feePayerSignature:t,gasPrice:n,nonce:r,...s}=nB(e);return{...s,accessList:s.accessList,feePayerSignature:t?{r:V(t.r,{size:32}),s:V(t.s,{size:32}),v:BigInt(t.v??27),yParity:t.yParity}:void 0,nonce:Number(r),typeHex:ph[s.type],type:s.type}}function AB(e){return Do(e)}function TB(e,t){const n=e,r=n.account?he(n.account):void 0;if(!Ou(n))return Pt(e);t&&(n.calls=n.calls??[{to:e.to||(!e.data||e.data==="0x"?"0x0000000000000000000000000000000000000000":void 0),value:e.value,data:e.data}]),n.feePayer===!0&&delete n.feeToken;const s=sB({...n,type:"tempo"});t==="estimateGas"&&(s.maxFeePerGas=void 0,s.maxPriorityFeePerGas=void 0),s.to=void 0,s.data=void 0,s.value=void 0;const[a,o]=(()=>{const c=r&&"keyType"in r?r.keyType:r==null?void 0:r.source;return c?c==="webAuthn"?["webAuthn",`0x${"ff".repeat(1400)}`]:["p256","secp256k1"].includes(c)?[c,void 0]:[void 0,void 0]:[void 0,void 0]})(),i=r&&"accessKeyAddress"in r?r.accessKeyAddress:void 0;return{...s,...o?{keyData:o}:{},...i?{keyId:i}:{},...a?{keyType:a}:{},...n.feePayer?{feePayer:typeof n.feePayer=="object"?he(n.feePayer):n.feePayer}:{}}}const SB=PB();function PB(){return new Map}function BB(e){return`${e.address.toLowerCase()}-${e.chainId}`}function bh(e,t){const n=BB(t);let r=e.get(n);return r||(r={counter:0,resetScheduled:!1},e.set(n,r)),r}function UB(e,t){const n=bh(e,t);n.counter=0,n.resetScheduled=!1}function IB(e,t){const n=bh(e,t);n.resetScheduled||(n.resetScheduled=!0,queueMicrotask(()=>UB(e,t)));const r=n.counter;return n.counter++,r===0?0n:Se(X0(6))}const Du={blockTime:1e3,extendSchema:m8(),formatters:{transaction:yo({exclude:["aaAuthorizationList"],format:vB}),transactionReceipt:Sl({format:AB}),transactionRequest:$c({format:TB})},prepareTransactionRequest:[async(e,{phase:t})=>{var r;const n=e;return t==="afterFillParameters"?(typeof n.nonceKey=="bigint"&&n.nonceKey>0n&&(n.gas=(n.gas??0n)+40000n),n):(n.nonceKey=(()=>{var o;if(typeof n.nonceKey<"u"&&n.nonceKey!=="random")return n.nonceKey;const s=((o=n.account)==null?void 0:o.address)??n.from;if(!s||!n.chain)return;const a=IB(SB,{address:s,chainId:n.chain.id});if(a!==0n)return a})(),n.nonce=(()=>{if(typeof n.nonce=="number")return n.nonce;if(n.nonceKey)return 0})(),!n.feeToken&&((r=n.chain)!=null&&r.feeToken)&&(n.feeToken=n.chain.feeToken),n)},{runAt:["beforeFillTransaction","afterFillParameters"]}],serializers:{transaction:((e,t)=>kB(e,t))},async verifyHash(e,t){const{address:n,hash:r,signature:s}=t;if(typeof s=="string"&&s.endsWith(hr.slice(2))){const a=us(s);if(a.type!=="keychain"){const o=await No(e,{address:n,blockNumber:t.blockNumber,blockTag:t.blockTag});if(!o||o==="0xef01007702c00000000000000000000000000000000000")return zP(a,{address:n,payload:r})}}return await W(e,Ca,"verifyHash")({...t,chain:null})}},FB=u({...Du,id:42429,name:"Tempo Devnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.devnet.tempoxyz.dev"],webSocket:["wss://rpc.devnet.tempoxyz.dev"]}}}),OB=u({...Du,id:1337,name:"Tempo",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["http://localhost:8545"]}}}),DB=u({...Du,id:42429,blockExplorers:{default:{name:"Tempo Explorer",url:"https://explore.tempo.xyz"}},name:"Tempo Testnet",nativeCurrency:{name:"USD",symbol:"USD",decimals:6},rpcUrls:{default:{http:["https://rpc.testnet.tempo.xyz"],webSocket:["wss://rpc.testnet.tempo.xyz"]}}}),MB=u({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}),_B=u({id:752025,name:"Ternoa",nativeCurrency:{name:"Capsule Coin",symbol:"CAPS",decimals:18},rpcUrls:{default:{http:["https://rpc-mainnet.zkevm.ternoa.network"]}},blockExplorers:{default:{name:"Ternoa Explorer",url:"https://explorer-mainnet.zkevm.ternoa.network"}},testnet:!1}),NB=u({id:7,name:"ThaiChain",nativeCurrency:{name:"TCH",symbol:"TCH",decimals:18},rpcUrls:{default:{http:["https://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}),RB=u({id:8428,name:"THAT Mainnet",nativeCurrency:{name:"THAT",symbol:"THAT",decimals:18},rpcUrls:{default:{http:["https://api.thatchain.io/mainnet"]}},blockExplorers:{default:{name:"Blockscout",url:"https://that.blockscout.com"}},testnet:!1}),zB=u({id:361,name:"Theta Mainnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://explorer.thetatoken.org"}},testnet:!1}),LB=u({id:365,name:"Theta Testnet",nativeCurrency:{name:"TFUEL",symbol:"TFUEL",decimals:18},rpcUrls:{default:{http:["https://eth-rpc-api-testnet.thetatoken.org/rpc"]}},blockExplorers:{default:{name:"Theta Explorer",url:"https://testnet-explorer.thetatoken.org"}},testnet:!0}),$B=u({id:108,name:"ThunderCore Mainnet",nativeCurrency:{name:"TT",symbol:"TT",decimals:18},rpcUrls:{default:{http:["https://mainnet-rpc.thundercore.com"]}},blockExplorers:{default:{name:"ThunderCore Explorer",url:"https://explorer-mainnet.thundercore.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:0}},testnet:!1}),HB=u({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 Thunder Explorer",url:"https://testnet.5irescan.io/"}},testnet:!0}),GB=u({id:62092,name:"TikTrix Testnet",nativeCurrency:{name:"tTTX",symbol:"tTTX",decimals:18},rpcUrls:{default:{http:["https://tiktrix-rpc.xyz"]}},blockExplorers:{default:{name:"TikTrix Testnet Explorer",url:"https://tiktrix.xyz"}},testnet:!0}),jB=u({id:6969,name:"Tomb Mainnet",nativeCurrency:{name:"TOMB",symbol:"TOMB",decimals:18},rpcUrls:{default:{http:["https://rpc.tombchain.com"]}},blockExplorers:{default:{name:"Tomb Explorer",url:"https://tombscout.com"}},testnet:!1}),qB=u({...mt,id:61166,name:"Treasure",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.treasure.lol"],webSocket:["wss://rpc.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Block Explorer",url:"https://treasurescan.io"}},contracts:{multicall3:{address:"0x2e29fe39496a56856D8698bD43e1dF4D0CE6266a",blockCreated:101}},testnet:!1}),VB=u({...mt,id:978658,name:"Treasure Topaz Testnet",nativeCurrency:{decimals:18,name:"MAGIC",symbol:"MAGIC"},rpcUrls:{default:{http:["https://rpc.topaz.treasure.lol"],webSocket:["wss://rpc.topaz.treasure.lol/ws"]}},blockExplorers:{default:{name:"Treasure Topaz Block Explorer",url:"https://topaz.treasurescan.io"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963",blockCreated:108112}},testnet:!0}),KB=u({id:728126428,name:"Tron",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://tronscan.org",apiUrl:"https://apilist.tronscanapi.com/api"}}}),WB=u({id:3448148188,name:"Tron Nile",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://nile.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://nile.tronscan.org"}},testnet:!0}),XB=u({id:2494104990,name:"Tron Shasta",nativeCurrency:{name:"TRON",symbol:"TRX",decimals:6},rpcUrls:{default:{http:["https://api.shasta.trongrid.io/jsonrpc"]}},blockExplorers:{default:{name:"Tronscan",url:"https://shasta.tronscan.org"}},testnet:!0}),ZB=u({id:8,name:"Ubiq Mainnet",nativeCurrency:{name:"UBQ",symbol:"UBQ",decimals:18},rpcUrls:{default:{http:["https://pyrus2.ubiqscan.io"]}},blockExplorers:{default:{name:"Ubiq Scan",url:"https://ubiqscan.io"}},testnet:!1}),QB=u({id:19991,name:"Ultra EVM",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Explorer",url:"https://evmexplorer.ultra.io"}}}),JB=u({id:18881,name:"Ultra EVM Testnet",nativeCurrency:{decimals:18,name:"Ultra Token",symbol:"UOS"},rpcUrls:{default:{http:["https://evm.test.ultra.eosusa.io"]}},blockExplorers:{default:{name:"Ultra EVM Testnet Explorer",url:"https://evmexplorer.testnet.ultra.io"}},testnet:!0}),YB=u({id:1231,name:"Ultron Mainnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-rpc.net"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://ulxscan.com"}},testnet:!1}),eU=u({id:1230,name:"Ultron Testnet",nativeCurrency:{name:"ULX",symbol:"ULX",decimals:18},rpcUrls:{default:{http:["https://ultron-dev.io"]}},blockExplorers:{default:{name:"Ultron Scan",url:"https://explorer.ultron-dev.io"}},testnet:!0}),Ci=1,tU=u({...G,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...G.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Ci]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[Ci]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[Ci]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:Ci}),vi=11155111,nU=u({...G,id:1301,name:"Unichain Sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://sepolia.unichain.org"]}},blockExplorers:{default:{name:"Uniscan",url:"https://sepolia.uniscan.xyz",apiUrl:"https://api-sepolia.uniscan.xyz/api"}},contracts:{...G.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},portal:{[vi]:{address:"0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD"}},l1StandardBridge:{[vi]:{address:"0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2"}},disputeGameFactory:{[vi]:{address:"0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b"}}},testnet:!0,sourceId:vi}),rU=u({id:8880,name:"Unique Mainnet",nativeCurrency:{decimals:18,name:"UNQ",symbol:"UNQ"},rpcUrls:{default:{http:["https://rpc.unique.network"]}},blockExplorers:{default:{name:"Unique Subscan",url:"https://unique.subscan.io/"}}}),sU=u({id:8882,name:"Opal Testnet",nativeCurrency:{decimals:18,name:"OPL",symbol:"OPL"},rpcUrls:{default:{http:["https://rpc-opal.unique.network"]}},blockExplorers:{default:{name:"Opal Subscan",url:"https://opal.subscan.io/"}},testnet:!0}),aU=u({id:8881,name:"Quartz Mainnet",nativeCurrency:{decimals:18,name:"QTZ",symbol:"QTZ"},rpcUrls:{default:{http:["https://rpc-quartz.unique.network"]}},blockExplorers:{default:{name:"Quartz Subscan",url:"https://quartz.subscan.io/"}}}),oU=u({id:18233,name:"Unreal",nativeCurrency:{name:"reETH",decimals:18,symbol:"reETH"},rpcUrls:{default:{http:["https://rpc.unreal-orbit.gelato.digital"]}},blockExplorers:{default:{name:"Unreal Explorer",url:"https://unreal.blockscout.com",apiUrl:"https://unreal.blockscout.com/api/v2"}},testnet:!0,contracts:{multicall3:{address:"0x8b6B0e60D8CD84898Ea8b981065A12F876eA5677",blockCreated:1745}}}),iU=u({id:1480,name:"Vana",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.vana.org/"]}},blockExplorers:{default:{name:"Vana Block Explorer",url:"https://vanascan.io",apiUrl:"https://vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:716763}}}),cU=u({id:14800,name:"Vana Moksha Testnet",blockTime:6e3,nativeCurrency:{decimals:18,name:"Vana",symbol:"VANA"},rpcUrls:{default:{http:["https://rpc.moksha.vana.org"]}},blockExplorers:{default:{name:"Vana Moksha Testnet",url:"https://moksha.vanascan.io",apiUrl:"https://moksha.vanascan.io/api"}},contracts:{multicall3:{address:"0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",blockCreated:732283}},testnet:!0}),lU=u({id:2040,name:"Vanar Mainnet",nativeCurrency:{name:"VANRY",symbol:"VANRY",decimals:18},rpcUrls:{default:{http:["https://rpc.vanarchain.com"]}},blockExplorers:{default:{name:"Vanar Mainnet Explorer",url:"https://explorer.vanarchain.com/"}},testnet:!1}),uU=u({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"}}}),dU=u({id:106,name:"Velas EVM Mainnet",nativeCurrency:{name:"VLX",symbol:"VLX",decimals:18},rpcUrls:{default:{http:["https://evmexplorer.velas.com/rpc"]}},blockExplorers:{default:{name:"Velas Explorer",url:"https://evmexplorer.velas.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:55883577}},testnet:!1}),pU=u({id:88,name:"Viction",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://vicscan.xyz"}},testnet:!1}),fU=u({id:89,name:"Viction Testnet",nativeCurrency:{name:"Viction",symbol:"VIC",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet.viction.xyz"]}},blockExplorers:{default:{name:"VIC Scan",url:"https://testnet.vicscan.xyz"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:12170179}},testnet:!0}),mU=u({id:888888,name:"Vision",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org"}},testnet:!1}),hU=u({id:666666,name:"Vision Testnet",nativeCurrency:{name:"VISION",symbol:"VS",decimals:18},rpcUrls:{default:{http:["https://vpioneer.infragrid.v.network/ethereum/compatible"]}},blockExplorers:{default:{name:"Vision Scan",url:"https://visionscan.org/?chain=vpioneer"}},testnet:!0}),bU=u({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}}}),yU=u({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}),xU=u({id:9496,name:"WeaveVM Alphanet",nativeCurrency:{name:"Testnet WeaveVM",symbol:"tWVM",decimals:18},rpcUrls:{default:{http:["https://testnet-rpc.wvm.dev"]}},blockExplorers:{default:{name:"WeaveVM Alphanet Explorer",url:"https://explorer.wvm.dev"}},testnet:!0}),gU=u({id:1111,name:"WEMIX",network:"wemix-mainnet",nativeCurrency:{name:"WEMIX",symbol:"WEMIX",decimals:18},rpcUrls:{default:{http:["https://api.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://explorer.wemix.com"}}}),wU=u({id:1112,name:"WEMIX Testnet",network:"wemix-testnet",nativeCurrency:{name:"WEMIX",symbol:"tWEMIX",decimals:18},rpcUrls:{default:{http:["https://api.test.wemix.com"]}},blockExplorers:{default:{name:"wemixExplorer",url:"https://testnet.wemixscan.com",apiUrl:"https://testnet.wemixscan.com/api"}},testnet:!0}),EU=u({id:420420421,name:"Westend Asset Hub",nativeCurrency:{decimals:18,name:"Westies",symbol:"WND"},rpcUrls:{default:{http:["https://westend-asset-hub-eth-rpc.polkadot.io"]}},blockExplorers:{default:{name:"subscan",url:"https://westend-asset-hub-eth-explorer.parity.io"}},testnet:!0}),kU=u({testnet:!1,name:"Whitechain",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://explorer.whitechain.io"}},id:1875,rpcUrls:{default:{http:["https://rpc.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:25212237}}}),CU=u({testnet:!0,name:"Whitechain Testnet",blockExplorers:{default:{name:"Whitechain Explorer",url:"https://testnet.whitechain.io"}},id:2625,rpcUrls:{default:{http:["https://rpc-testnet.whitechain.io"]}},nativeCurrency:{decimals:18,name:"WhiteBIT Coin",symbol:"WBT"}}),vU=u({id:42070,name:"WMC Testnet",nativeCurrency:{name:"WMTx",symbol:"WMTx",decimals:18},rpcUrls:{default:{http:["https://rpc-testnet-base.worldmobile.net"]}},blockExplorers:{default:{name:"WMC Explorer",url:"https://explorer2-base-testnet.worldmobile.net"}},testnet:!0}),za=1,AU=u({...G,id:480,name:"World Chain",network:"worldchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-mainnet.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan",url:"https://worldscan.org",apiUrl:"https://api.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-mainnet.explorer.alchemy.com",apiUrl:"https://worldchain-mainnet.explorer.alchemy.com/api"}},contracts:{...G.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[za]:{address:"0x069c4c579671f8c120b1327a73217D01Ea2EC5ea"}},l2OutputOracle:{[za]:{address:"0x19A6d1E9034596196295CF148509796978343c5D"}},portal:{[za]:{address:"0xd5ec14a83B7d95BE1E2Ac12523e2dEE12Cbeea6C"}},l1StandardBridge:{[za]:{address:"0x470458C91978D2d929704489Ad730DC3E3001113"}}},testnet:!1,sourceId:za}),La=11155111,TU=u({...G,id:4801,name:"World Chain Sepolia",network:"worldchain-sepolia",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://worldchain-sepolia.g.alchemy.com/public"]}},blockExplorers:{default:{name:"Worldscan Sepolia",url:"https://sepolia.worldscan.org",apiUrl:"https://api-sepolia.worldscan.org/api"},blockscout:{name:"Blockscout",url:"https://worldchain-sepolia.explorer.alchemy.com",apiUrl:"https://worldchain-sepolia.explorer.alchemy.com/api"}},contracts:{...G.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[La]:{address:"0x8Ec1111f67Dad6b6A93B3F42DfBC92D81c98449A"}},l2OutputOracle:{[La]:{address:"0xc8886f8BAb6Eaeb215aDB5f1c686BF699248300e"}},portal:{[La]:{address:"0xFf6EBa109271fe6d4237EeeD4bAb1dD9A77dD1A4"}},l1StandardBridge:{[La]:{address:"0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE"}}},testnet:!0,sourceId:La}),SU=u({id:103,name:"WorldLand Mainnet",nativeCurrency:{decimals:18,name:"WLC",symbol:"WLC"},rpcUrls:{default:{http:["https://seoul.worldland.foundation"]}},blockExplorers:{default:{name:"WorldLand Scan",url:"https://scan.worldland.foundation"}},testnet:!1}),PU=u({id:660279,name:"Xai Mainnet",nativeCurrency:{name:"Xai",symbol:"XAI",decimals:18},rpcUrls:{default:{http:["https://xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.xai-chain.net"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:222549}},testnet:!1}),BU=u({id:37714555429,name:"Xai Testnet",nativeCurrency:{name:"sXai",symbol:"sXAI",decimals:18},rpcUrls:{default:{http:["https://testnet-v2.xai-chain.net/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://testnet-explorer-v2.xai-chain.net"}},testnet:!0}),UU=u({id:50,name:"XDC Network",nativeCurrency:{decimals:18,name:"XDC",symbol:"XDC"},rpcUrls:{default:{http:["https://rpc.xdcrpc.com"]}},blockExplorers:{default:{name:"XDCScan",url:"https://xdcscan.com"}},contracts:{multicall3:{address:"0x0B1795ccA8E4eC4df02346a082df54D437F8D9aF",blockCreated:75884020}}}),IU=u({id:51,name:"Apothem Network",nativeCurrency:{decimals:18,name:"TXDC",symbol:"TXDC"},rpcUrls:{default:{http:["https://erpc.apothem.network"]}},blockExplorers:{default:{name:"XDCScan",url:"https://testnet.xdcscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:59765389}}}),FU=u({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",apiUrl:"https://www.oklink.com/api/v5/explorer/xlayer/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:47416}}}),yh=u({id:195,name:"X1 Testnet",nativeCurrency:{decimals:18,name:"OKB",symbol:"OKB"},rpcUrls:{default:{http:["https://xlayertestrpc.okx.com"]}},blockExplorers:{default:{name:"OKLink",url:"https://www.oklink.com/xlayer-test"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:624344}},testnet:!0}),OU=u({id:3721,name:"Xone Chain Mainnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc.xone.org"]}},blockExplorers:{default:{name:"Xone Mainnet Explorer",url:"https://xonescan.com",apiUrl:"http://api.xonescan.com/api"}},testnet:!1}),DU=u({id:33772211,name:"Xone Chain Testnet",nativeCurrency:{decimals:18,name:"XOC",symbol:"XOC"},rpcUrls:{default:{http:["https://rpc-testnet.xone.org","https://rpc-testnet.xone.plus","https://rpc-testnet.knight.center"]}},blockExplorers:{default:{name:"Xone Testnet Explorer",url:"https://testnet.xonescan.com",apiUrl:"http://api.testnet.xonescan.com/api"}},testnet:!0}),MU=u({id:20250217,name:"Xphere Mainnet",nativeCurrency:{decimals:18,name:"XP",symbol:"XP"},rpcUrls:{default:{http:["https://en-bkk.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xp.tamsa.io"}},testnet:!1}),_U=u({id:1998991,name:"Xphere Testnet",nativeCurrency:{decimals:18,name:"XPT",symbol:"XPT"},rpcUrls:{default:{http:["http://testnet.x-phere.com"]}},blockExplorers:{default:{name:"Xphere Tamsa Explorer",url:"https://xpt.tamsa.io"}},testnet:!0}),NU=u({id:273,name:"XR One",nativeCurrency:{decimals:18,name:"XR1",symbol:"XR1"},rpcUrls:{default:{http:["https://xr1.calderachain.xyz/http"],webSocket:["wss://xr1.calderachain.xyz/ws"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr1.calderaexplorer.xyz"}},testnet:!1}),RU=u({id:144e4,name:"XRPL EVM",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.xrplevm.org",apiUrl:"https://explorer.xrplevm.org/api/v2"}},testnet:!1}),zU=u({id:1440002,name:"XRPL EVM Devnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.xrplevm.org/"]},public:{http:["https://rpc.xrplevm.org/"]}},blockExplorers:{default:{name:"XRPLEVM Devnet Explorer",url:"https://explorer.xrplevm.org/"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:15237286}},testnet:!0}),LU=u({id:1449e3,name:"XRPL EVM Testnet",nativeCurrency:{name:"XRP",symbol:"XRP",decimals:18},rpcUrls:{default:{http:["https://rpc.testnet.xrplevm.org"]}},blockExplorers:{default:{name:"blockscout",url:"https://explorer.testnet.xrplevm.org",apiUrl:"https://explorer.testnet.xrplevm.org/api/v2"}},contracts:{multicall3:{address:"0x82Cc144D7d0AD4B1c27cb41420e82b82Ad6e9B31",blockCreated:492302}},testnet:!0}),$U=u({id:2730,name:"XR Sepolia",nativeCurrency:{decimals:18,name:"tXR",symbol:"tXR"},rpcUrls:{default:{http:["https://xr-sepolia-testnet.rpc.caldera.xyz/http"]}},blockExplorers:{default:{name:"Blockscout",url:"https://xr-sepolia-testnet.explorer.caldera.xyz"}},testnet:!0}),HU=u({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"}}}),GU=u({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}),jU=u({id:8408,name:"ZenChain Testnet",nativeCurrency:{decimals:18,name:"ZTC",symbol:"ZTC"},rpcUrls:{default:{http:["https://zenchain-testnet.api.onfinality.io/public"],webSocket:["wss://zenchain-testnet.api.onfinality.io/public-ws"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:230019}},blockExplorers:{default:{name:"Zentrace",url:"https://zentrace.io"}},testnet:!0}),qU=u({id:383414847825,name:"Zeniq Mainnet",nativeCurrency:{name:"ZENIQ",symbol:"ZENIQ",decimals:18},rpcUrls:{default:{http:["https://api.zeniq.network"]}},blockExplorers:{default:{name:"Zeniq Explorer",url:"https://zeniqscan.com"}},testnet:!1}),VU=u({id:543210,name:"Zero Network",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.zerion.io/v1/zero"]}},blockExplorers:{default:{name:"Zero Network Explorer",url:"https://explorer.zero.network"}},testnet:!1}),KU=u({id:7e3,name:"ZetaChain",nativeCurrency:{decimals:18,name:"Zeta",symbol:"ZETA"},rpcUrls:{default:{http:["https://zetachain-evm.blockpi.network/v1/rpc/public"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:1632781}},blockExplorers:{default:{name:"ZetaScan",url:"https://zetascan.com"}},testnet:!1}),WU=u({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"]}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:2715217}},blockExplorers:{default:{name:"ZetaScan",url:"https://testnet.zetascan.com"}},testnet:!0}),XU=u({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}),ZU=u({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}),QU=u({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}),Mu=1,JU=u({...G,id:48900,name:"Zircuit Mainnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://mainnet.zircuit.com","https://zircuit1-mainnet.liquify.com","https://zircuit1-mainnet.p2pify.com","https://zircuit-mainnet.drpc.org"]}},blockExplorers:{default:{name:"Zircuit Explorer",url:"https://explorer.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[Mu]:{address:"0x92Ef6Af472b39F1b363da45E35530c24619245A4"}},portal:{[Mu]:{address:"0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1"}},l1StandardBridge:{[Mu]:{address:"0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8"}}},testnet:!1}),_u=11155111,YU=u({...G,id:48898,name:"Zircuit Garfield Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://garfield-testnet.zircuit.com/"]}},blockExplorers:{default:{name:"Zircuit Garfield Testnet Explorer",url:"https://explorer.garfield-testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11"},l2OutputOracle:{[_u]:{address:"0xd69D3AC5CA686cCF94b258291772bc520FEAf211"}},portal:{[_u]:{address:"0x4E21A71Ac3F7607Da5c06153A17B1DD20E702c21"}},l1StandardBridge:{[_u]:{address:"0x87a7E2bCA9E35BA49282E832a28A6023904460D8"}}},testnet:!0}),Nu=11155111,eI=u({...G,id:48899,name:"Zircuit Testnet",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://testnet.zircuit.com","https://zircuit1-testnet.p2pify.com","https://zircuit1-testnet.liquify.com"]}},blockExplorers:{default:{name:"Zircuit Testnet Explorer",url:"https://explorer.testnet.zircuit.com"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:6040287},l2OutputOracle:{[Nu]:{address:"0x740C2dac453aEf7140809F80b72bf0e647af8148"}},portal:{[Nu]:{address:"0x787f1C8c5924178689E0560a43D848bF8E54b23e"}},l1StandardBridge:{[Nu]:{address:"0x0545c5fe980098C16fcD0eCB5E79753afa6d9af9"}}},testnet:!0}),tI=u({id:42766,name:"ZKFair Mainnet",network:"zkfair-mainnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{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}),nI=u({id:43851,name:"ZKFair Testnet",network:"zkfair-testnet",nativeCurrency:{decimals:18,name:"USD Coin",symbol:"USDC"},rpcUrls:{default:{http:["https://testnet-rpc.zkfair.io"]}},blockExplorers:{default:{name:"zkFair Explorer",url:"https://testnet-scan.zkfair.io"}},testnet:!0}),rI=u({id:810180,name:"zkLink Nova",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://explorer.zklink.io"}}}),sI=u({id:810181,name:"zkLink Nova Sepolia Testnet",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zklink.io"]}},blockExplorers:{default:{name:"zkLink Nova Block Explorer",url:"https://sepolia.explorer.zklink.io"}}}),xh=u({...mt,blockTime:200,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"},native:{name:"ZKsync Explorer",url:"https://explorer.zksync.io/",apiUrl:"https://block-explorer-api.mainnet.zksync.io/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:45659388}}}),gh=u({...mt,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}),aI=u({...mt,id:272,name:"ZKsync CLI Local Custom Hyperchain",nativeCurrency:{name:"BAT",symbol:"BAT",decimals:18},rpcUrls:{default:{http:["http://localhost:15200"],webSocket:["ws://localhost:15201"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),oI=u({...mt,id:270,name:"ZKsync CLI Local Hyperchain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15100"],webSocket:["ws://localhost:15101"]}},blockExplorers:{default:{name:"ZKsync explorer",url:"http://localhost:15005/",apiUrl:"http://localhost:15005/api"}},testnet:!0}),iI=u({id:9,name:"ZKsync CLI Local Hyperchain L1",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["http://localhost:15045"]}},blockExplorers:{default:{name:"Blockscout",url:"http://localhost:15001/",apiUrl:"http://localhost:15001/api/v2"}},testnet:!0}),wh=u({...mt,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}),Eh=u({...mt,blockTime:200,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:"Etherscan",url:"https://sepolia-era.zksync.network/",apiUrl:"https://api-sepolia-era.zksync.network/api"},native:{name:"ZKsync Explorer",url:"https://sepolia.explorer.zksync.io/",blockExplorerApi:"https://block-explorer-api.sepolia.zksync.dev/api"}},contracts:{multicall3:{address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},erc6492Verifier:{address:"0xfB688330379976DA81eB64Fe4BF50d7401763B9C",blockCreated:3855712}},testnet:!0}),Ai=1,cI=u({...G,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:{...G.contracts,l2OutputOracle:{[Ai]:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{[Ai]:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{[Ai]:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:Ai}),Ti=11155111,lI=u({...G,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:{...G.contracts,l2OutputOracle:{[Ti]:{address:"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160},portal:{[Ti]:{address:"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f"}},l1StandardBridge:{[Ti]:{address:"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB"}}},sourceId:Ti,testnet:!0}),kh=5,uI=u({...G,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:{...G.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123},portal:{[kh]:{address:"0xDb9F51790365e7dc196e7D072728df39Be958ACe"}}},sourceId:kh,testnet:!0}),dI=Object.freeze(Object.defineProperty({__proto__:null,abey:Cw,abstract:Dw,abstractTestnet:Mw,acala:_w,acria:Nw,adf:Rw,agungTestnet:zw,aioz:Lw,alephZero:$w,alephZeroTestnet:Hw,alienx:Gw,alienxHalTestnet:jw,ancient8:Xw,ancient8Sepolia:Zw,anvil:Qw,apeChain:Jw,apexTestnet:Yw,apollo:eE,arbitrum:tE,arbitrumGoerli:nE,arbitrumNova:rE,arbitrumSepolia:sE,arcTestnet:aE,arenaz:oE,areonNetwork:iE,areonNetworkTestnet:cE,areum:lE,artelaTestnet:uE,arthera:dE,artheraTestnet:pE,assetChain:fE,assetChainTestnet:mE,astar:hE,astarZkEVM:bE,astarZkyoto:yE,atletaOlympia:xE,aurora:gE,auroraTestnet:wE,auroria:EE,autheoTestnet:kE,avalanche:CE,avalancheFuji:vE,b3:AE,b3Sepolia:TE,bahamut:SE,base:Km,baseGoerli:UE,basePreconf:PE,baseSepolia:Wm,baseSepoliaPreconf:IE,basecampTestnet:BE,beam:FE,beamTestnet:OE,bearNetworkChainMainnet:DE,bearNetworkChainTestnet:ME,berachain:_E,berachainBepolia:NE,berachainTestnet:RE,berachainTestnetbArtio:zE,bevmMainnet:LE,bifrost:$E,birdlayer:HE,bitTorrent:XE,bitTorrentTestnet:ZE,bitgert:GE,bitkub:jE,bitkubTestnet:qE,bitlayer:VE,bitlayerTestnet:KE,bitrock:WE,blast:QE,blastSepolia:JE,bob:YE,bobSepolia:n7,boba:e7,bobaSepolia:t7,boolBetaMainnet:r7,botanix:s7,botanixTestnet:a7,bounceBit:o7,bounceBitTestnet:i7,bronos:c7,bronosTestnet:l7,bsc:u7,bscGreenfield:d7,bscTestnet:p7,bsquared:f7,bsquaredTestnet:m7,btr:h7,btrTestnet:b7,bxn:y7,bxnTestnet:x7,cannon:g7,canto:w7,celo:I7,celoAlfajores:F7,celoSepolia:O7,chang:D7,chiliz:M7,chips:_7,citreaTestnet:N7,classic:R7,coinbit:z7,coinex:L7,confluxESpace:$7,confluxESpaceTestnet:H7,coreDao:G7,coreTestnet1:j7,coreTestnet2:q7,corn:V7,cornTestnet:K7,crab:W7,creatorTestnet:X7,creditCoin3Devnet:Z7,creditCoin3Mainnet:Q7,creditCoin3Testnet:J7,cronos:Y7,cronosTestnet:e9,cronoszkEVM:t9,cronoszkEVMTestnet:n9,crossbell:r9,crossfi:s9,curtis:a9,cyber:o9,cyberTestnet:i9,dailyNetwork:c9,dailyNetworkTestnet:l9,darwinia:u9,datahavenTestnet:d9,dbkchain:p9,dchain:f9,dchainTestnet:m9,defichainEvm:h9,defichainEvmTestnet:b9,degen:y9,dfk:x9,diode:g9,disChain:w9,dodochainTestnet:E9,dogechain:k9,domaTestnet:C9,donatuz:v9,dosChain:A9,dosChainTestnet:T9,dreyerxMainnet:S9,dreyerxTestnet:P9,dustboyIoT:B9,dymension:U9,edexa:I9,edexaTestnet:F9,edgeless:O9,edgelessTestnet:D9,edgeware:M9,edgewareTestnet:_9,eduChain:N9,eduChainTestnet:R9,ekta:z9,ektaTestnet:L9,elastos:$9,elastosTestnet:H9,electroneum:G9,electroneumTestnet:j9,elysiumTestnet:q9,energy:V9,eni:K9,eniTestnet:W9,enuls:X9,eon:Z9,eos:Q9,eosTestnet:J9,eteria:Y9,etherlink:ek,etherlinkShadownetTestnet:tk,etherlinkTestnet:nk,ethernity:rk,etp:sk,evmos:ak,evmosTestnet:ok,excelonMainnet:ik,expanse:ck,exsat:lk,exsatTestnet:uk,fantom:dk,fantomSonicTestnet:pk,fantomTestnet:fk,fibo:mk,filecoin:hk,filecoinCalibration:bk,filecoinHyperspace:yk,fireChain:kw,flame:xk,flare:gk,flareTestnet:wk,flowMainnet:Ek,flowPreviewnet:kk,flowTestnet:Ck,fluence:vk,fluenceStage:Ak,fluenceTestnet:Tk,fluentTestnet:Sk,form:Pk,formTestnet:Uk,forma:Bk,formicarium:P4,forta:Ik,foundry:Fk,fraxtal:Ok,fraxtalTestnet:Dk,funkiMainnet:Mk,funkiSepolia:_k,fuse:Nk,fuseSparknet:Rk,fusion:zk,fusionTestnet:Lk,garnet:$k,gatechain:Hk,geist:Gk,genesys:jk,giwaSepolia:Qm,giwaSepoliaPreconf:qk,glideL1Protocol:Vk,glideL2Protocol:Kk,gnosis:Wk,gnosisChiado:Xk,goChain:Jk,goat:Zk,gobi:Qk,godwoken:Yk,goerli:eC,graphite:tC,graphiteTestnet:nC,gravity:rC,gunz:sC,guruNetwork:aC,guruTestnet:oC,ham:iC,happychainTestnet:cC,haqqMainnet:lC,haqqTestedge2:uC,hardhat:dC,harmonyOne:pC,hashkey:fC,hashkeyTestnet:mC,haustTestnet:hC,hedera:bC,hederaPreviewnet:yC,hederaTestnet:xC,hela:gC,heliosTestnet:wC,hemi:EC,hemiSepolia:kC,henesys:CC,holesky:vC,hoodi:AC,hpb:TC,hpp:SC,hppSepolia:PC,huddle01Mainnet:BC,huddle01Testnet:UC,humanity:IC,humanityTestnet:FC,humanode:OC,humanodeTestnet5:DC,hychain:MC,hychainTestnet:_C,hyperEvm:Jm,hyperliquid:Jm,hyperliquidEvmTestnet:NC,iSunCoin:YC,icbNetwork:RC,idchain:zC,immutableZkEvm:LC,immutableZkEvmTestnet:$C,inEVM:HC,initVerse:GC,initVerseGenesis:jC,injective:qC,injectiveTestnet:VC,ink:KC,inkSepolia:WC,iota:XC,iotaTestnet:ZC,iotex:QC,iotexTestnet:JC,jasmyChain:ev,jasmyChainTestnet:tv,jbc:nv,jbcTestnet:rv,jocMainnet:sv,jocTestnet:av,jovay:ov,jovaySepolia:iv,juneo:cv,juneoBCH1Chain:lv,juneoDAI1Chain:uv,juneoDOGE1Chain:dv,juneoEUR1Chain:pv,juneoGLD1Chain:fv,juneoLINK1Chain:mv,juneoLTC1Chain:hv,juneoSGD1Chain:yv,juneoSocotraTestnet:xv,juneoUSD1Chain:gv,juneoUSDT1Chain:wv,juneomBTC1Chain:bv,kaia:Ev,kairos:kv,kakarotSepolia:Cv,kakarotStarknetSepolia:vv,kardiaChain:Av,karura:Tv,katana:Sv,kava:Pv,kavaTestnet:Bv,kcc:Uv,kiiTestnetOro:Iv,kinto:Fv,klaytn:Ov,klaytnBaobab:Dv,koi:Mv,kroma:_v,kromaSepolia:Nv,l3x:Rv,l3xTestnet:zv,lavita:Lv,lens:$v,lensTestnet:Hv,lestnet:Gv,lightlinkPegasus:jv,lightlinkPhoenix:qv,linea:Kv,lineaGoerli:Wv,lineaSepolia:Xv,lineaTestnet:Zv,lisk:Qv,liskSepolia:Jv,loadAlphanet:Yv,localhost:e4,loop:t4,lukso:n4,luksoTestnet:r4,lumiaMainnet:s4,lumiaTestnet:a4,lumoz:o4,lumozTestnet:i4,lycan:c4,lyra:l4,mainnet:u4,mandala:d4,manta:p4,mantaSepoliaTestnet:f4,mantaTestnet:m4,mantle:h4,mantleSepoliaTestnet:b4,mantleTestnet:y4,mantraDuKongEVMTestnet:x4,mantraEVM:g4,mapProtocol:w4,matchain:E4,matchainTestnet:k4,mchVerse:C4,megaethTestnet:v4,mekong:A4,meld:T4,memecore:S4,merlin:B4,merlinErigonTestnet:U4,metachain:I4,metachainIstanbul:F4,metadium:O4,metalL2:D4,meter:M4,meterTestnet:_4,metis:N4,metisGoerli:R4,metisSepolia:z4,mev:L4,mevTestnet:$4,mint:H4,mintSepoliaTestnet:G4,mitosisTestnet:j4,mode:q4,modeTestnet:V4,monad:K4,monadTestnet:W4,moonbaseAlpha:X4,moonbeam:Z4,moonbeamDev:Q4,moonriver:J4,morph:Y4,morphHolesky:eA,morphSepolia:tA,nahmii:nA,nautilus:rA,near:sA,nearTestnet:aA,neonDevnet:oA,neonMainnet:iA,neoxMainnet:cA,neoxT4:lA,newton:uA,nexi:dA,nexilix:pA,nibiru:fA,nitrographTestnet:mA,nomina:hA,oasisTestnet:bA,oasys:yA,odysseyTestnet:xA,okc:gA,omax:wA,omni:EA,omniOmega:kA,oneWorld:CA,oortMainnetDev:vA,opBNB:AA,opBNBTestnet:TA,openledger:SA,optimism:PA,optimismGoerli:BA,optimismSepolia:UA,optopia:IA,optopiaTestnet:FA,orderly:OA,orderlySepolia:DA,otimDevnet:MA,palm:_A,palmTestnet:NA,peaq:RA,pgn:zA,pgnTestnet:LA,phoenix:$A,planq:HA,plasma:GA,plasmaDevnet:jA,plasmaTestnet:qA,playfiAlbireo:VA,plinga:KA,plume:WA,plumeDevnet:XA,plumeMainnet:ZA,plumeSepolia:QA,plumeTestnet:JA,polterTestnet:YA,polygon:eT,polygonAmoy:tT,polygonMumbai:nT,polygonZkEvm:rT,polygonZkEvmCardona:sT,polygonZkEvmTestnet:aT,polynomial:oT,polynomialSepolia:iT,potos:cT,potosTestnet:lT,premiumBlockTestnet:uT,pulsechain:dT,pulsechainV4:pT,pumpfiTestnet:fT,pyrope:mT,qMainnet:bT,qTestnet:yT,ql1:hT,quai:xT,quaiTestnet:gT,reactiveTestnet:wT,real:ET,redbellyMainnet:kT,redbellyTestnet:CT,reddio:vT,reddioSepolia:AT,redstone:TT,rei:ST,reyaNetwork:PT,riseTestnet:BT,rivalz:UT,rollux:IT,rolluxTestnet:FT,ronin:OT,root:DT,rootPorcini:MT,rootstock:_T,rootstockTestnet:NT,rss3:RT,rss3Sepolia:zT,saakuru:LT,saga:$T,saigon:HT,sanko:GT,sapphire:jT,sapphireTestnet:qT,satoshiVM:VT,satoshiVMTestnet:KT,scroll:WT,scrollSepolia:XT,sei:ZT,seiDevnet:QT,seiTestnet:YT,seismicDevnet:JT,sepolia:eS,shape:tS,shapeSepolia:nS,shardeum:rS,shardeumSphinx:sS,shibarium:aS,shibariumTestnet:oS,shiden:iS,shimmer:cS,shimmerTestnet:lS,sidraChain:uS,silentData:dS,silicon:pS,siliconSepolia:fS,sixProtocol:mS,skaleBase:SS,skaleBaseSepoliaTestnet:PS,skaleBlockBrawlers:hS,skaleCalypso:bS,skaleCalypsoTestnet:yS,skaleCryptoBlades:xS,skaleCryptoColosseum:gS,skaleEuropa:wS,skaleEuropaTestnet:ES,skaleExorde:kS,skaleHumanProtocol:CS,skaleNebula:vS,skaleNebulaTestnet:AS,skaleRazor:TS,skaleTitan:BS,skaleTitanTestnet:US,sketchpad:IS,snax:FS,snaxTestnet:OS,somnia:DS,somniaTestnet:MS,soneium:_S,soneiumMinato:NS,songbird:RS,songbirdTestnet:zS,sonic:LS,sonicBlazeTestnet:$S,sonicTestnet:HS,sophon:GS,sophonTestnet:jS,sova:qS,sovaSepolia:VS,spicy:KS,stableTestnet:WS,statusNetworkSepolia:th,statusSepolia:th,step:XS,story:ZS,storyAeneid:QS,storyOdyssey:JS,storyTestnet:YS,stratis:eP,superlumio:tP,superposition:nP,superseed:rP,superseedSepolia:sP,surgeTestnet:aP,swan:oP,swanProximaTestnet:iP,swanSaturnTestnet:cP,swellchain:lP,swellchainTestnet:uP,swissdlt:dP,syscoin:pP,syscoinTestnet:fP,tac:mP,tacSPB:hP,taiko:bP,taikoHekla:yP,taikoHoodi:xP,taikoJolnir:gP,taikoKatla:wP,taikoTestnetSepolia:EP,taraxa:kP,taraxaTestnet:CP,teaSepolia:vP,telcoinTestnet:AP,telos:TP,telosTestnet:SP,tempoDevnet:FB,tempoLocalnet:OB,tempoTestnet:DB,tenet:MB,ternoa:_B,thaiChain:NB,that:RB,theta:zB,thetaTestnet:LB,thunderCore:$B,thunderTestnet:HB,tiktrixTestnet:GB,tomb:jB,treasure:qB,treasureTopaz:VB,tron:KB,tronNile:WB,tronShasta:XB,ubiq:ZB,ultra:QB,ultraTestnet:JB,ultron:YB,ultronTestnet:eU,unichain:tU,unichainSepolia:nU,unique:rU,uniqueOpal:sU,uniqueQuartz:aU,unreal:oU,vana:iU,vanaMoksha:cU,vanar:lU,vechain:uU,velas:dU,viction:pU,victionTestnet:fU,vision:mU,visionTestnet:hU,wanchain:bU,wanchainTestnet:yU,weaveVMAlphanet:xU,wemix:gU,wemixTestnet:wU,westendAssetHub:EU,whitechain:kU,whitechainTestnet:CU,wmcTestnet:vU,worldLand:SU,worldchain:AU,worldchainSepolia:TU,x1Testnet:yh,xLayer:FU,xLayerTestnet:yh,xai:PU,xaiTestnet:BU,xdc:UU,xdcTestnet:IU,xoneMainnet:OU,xoneTestnet:DU,xphereMainnet:MU,xphereTestnet:_U,xrOne:NU,xrSepolia:$U,xrplevm:RU,xrplevmDevnet:zU,xrplevmTestnet:LU,yooldoVerse:HU,yooldoVerseTestnet:GU,zenchainTestnet:jU,zeniq:qU,zeroG:xw,zeroGGalileoTestnet:gw,zeroGMainnet:ww,zeroGTestnet:Ew,zeroNetwork:VU,zetachain:KU,zetachainAthensTestnet:WU,zhejiang:XU,zilliqa:ZU,zilliqaTestnet:QU,zircuit:JU,zircuitGarfieldTestnet:YU,zircuitTestnet:eI,zkFair:tI,zkFairTestnet:nI,zkLinkNova:rI,zkLinkNovaSepoliaTestnet:sI,zkSync:xh,zkSyncInMemoryNode:gh,zkSyncLocalNode:wh,zkSyncSepoliaTestnet:Eh,zksync:xh,zksyncInMemoryNode:gh,zksyncLocalCustomHyperchain:aI,zksyncLocalHyperchain:oI,zksyncLocalHyperchainL1:iI,zksyncLocalNode:wh,zksyncSepoliaTestnet:Eh,zora:cI,zoraSepolia:lI,zoraTestnet:uI},Symbol.toStringTag,{value:"Module"})),pI=(e,t)=>{const n=Object.values(dI).find(o=>o.id===e);if(!n)return{walletClient:void 0,publicClient:void 0};const r=t?pw(t):void 0,s=r?dw({chain:n,transport:r}):void 0,a=K3({chain:n,transport:r||mw()});return{walletClient:s,publicClient:a}},fI=()=>re.jsx("div",{className:"twap-error-fallback",children:re.jsx("p",{style:{fontSize:20,fontWeight:600,textAlign:"center",width:"100%",marginTop:40},children:"Something went wrong"})});function mI({children:e}){return re.jsx(ey,{FallbackComponent:fI,onError:t=>ve.onCrash(t),children:re.jsx(re.Fragment,{children:e})})}const Ch=L.createContext(null),hI=new zb({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),bI=e=>{var r,s,a;const t=se(o=>o.updateState),n=se(o=>o.state.isMarketOrder);return L.useEffect(()=>{const o=setInterval(()=>{t({currentTime:Date.now()})},6e4);return()=>clearInterval(o)},[t]),L.useEffect(()=>{var o,i,c,l,d,p,f,m,y,g,P,B;t({isMarketOrder:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.isMarketOrder,typedChunks:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.chunks,typedFillDelay:(p=(d=e.overrides)==null?void 0:d.state)==null?void 0:p.fillDelay,typedDuration:(m=(f=e.overrides)==null?void 0:f.state)==null?void 0:m.duration,typedLimitPrice:(g=(y=e.overrides)==null?void 0:y.state)==null?void 0:g.limitPrice,typedTriggerPrice:(B=(P=e.overrides)==null?void 0:P.state)==null?void 0:B.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(r=e.overrides)==null?void 0:r.state,e.module]),L.useEffect(()=>{var o,i,c,l;t({typedLimitPrice:(i=(o=e.overrides)==null?void 0:o.state)==null?void 0:i.limitPrice,typedTriggerPrice:(l=(c=e.overrides)==null?void 0:c.state)==null?void 0:l.triggerPrice,triggerPricePercent:void 0,limitPricePercent:void 0})},[(s=e.srcToken)==null?void 0:s.address,(a=e.dstToken)==null?void 0:a.address]),L.useEffect(()=>{e.module===te.LIMIT&&t({isMarketOrder:!1}),Number(As)<=2&&e.module===te.TAKE_PROFIT&&t({isMarketOrder:!0})},[e.module]),L.useEffect(()=>{n&&t({isInvertedTrade:!1})},[n]),null},yI=({marketReferencePrice:e,srcToken:t,dstToken:n,chainId:r,typedInputAmount:s})=>L.useMemo(()=>{if(xu(t,n,r)||gu(t,n,r))return{isLoading:!1,noLiquidity:!1,value:os(s||"0",t==null?void 0:t.decimals)};if(z(e.value||0).isZero()||z(s||0).isZero())return e;const a=z(e.value||0).dividedBy(s||0).toFixed();return{...e,value:a}},[e,s,t,n,r]),xI=e=>{const t=Ps(),{walletClient:n,publicClient:r}=L.useMemo(()=>pI(e.chainId,e.provider),[e.chainId,e.provider]),s=L.useMemo(()=>fd(e.partner),[e.partner]),a=L.useMemo(()=>{const l=s[0];return e.chainId&&s.includes(e.chainId)?e.chainId:l},[e.chainId,s]),o=L.useMemo(()=>qi(e.partner,a),[e.partner,a]),i=yI(e),c=L.useMemo(()=>yd(e.minChunkSizeUsd),[e.minChunkSizeUsd]);return L.useEffect(()=>{ve.init(o,c,a)},[o,a,c]),re.jsxs(Ch.Provider,{value:{typedInputAmount:e.typedInputAmount,minChunkSizeUsd:c,account:e.account,walletClient:n,publicClient:r,marketPrice:t.marketPrice||i.value,marketPriceLoading:!t.marketPrice&&i.isLoading,noLiquidity:!t.marketPrice&&i.noLiquidity,config:o,slippage:e.priceProtection,supportedChains:s,chainId:a,partner:e.partner,module:e.module,fees:e.fees||0,overrides:e.overrides,callbacks:e.callbacks,srcUsd1Token:e.srcUsd1Token,dstUsd1Token:e.dstUsd1Token,srcBalance:e.srcBalance,dstBalance:e.dstBalance,srcToken:t.srcToken||e.srcToken,dstToken:t.dstToken||e.dstToken,isDev:e.isDev},children:[re.jsx(bI,{...e}),re.jsx(mI,{children:e.children})]})},gI=e=>re.jsx(Lb,{client:hI,children:re.jsx(xI,{...e})}),Q=()=>{const e=L.useContext(Ch);if(e===null)throw new Error("useSpotContext must be used within SpotProvider");return e},wI=2e4,EI=[{text:"Minutes",value:Ge.Minutes},{text:"Hours",value:Ge.Hours},{text:"Days",value:Ge.Days}],kI=e=>{const{marketPrice:t,typedInputAmount:n}=Q();return L.useMemo(()=>{const{isError:s,value:a}=R1(e);if(!(!s||z(n||"0").isZero()||!t))return{type:ze.MIN_FILL_DELAY,value:a,message:"minFillDelayError",args:{fillDelay:`${yu(a)} minutes`}}},[e,n,t])},br=()=>{const{callbacks:e}=Q(),t=se(a=>a.state.typedFillDelay),n=se(a=>a.updateState),r=L.useMemo(()=>t||a1,[t]),s=kI(r);return{fillDelay:r,onChange:L.useCallback(a=>{var o;n({typedFillDelay:a}),(o=e==null?void 0:e.onFillDelayChange)==null||o.call(e,a)},[n,e]),error:s,milliseconds:r.unit*r.value}},CI=()=>{const{onChange:e,fillDelay:t,error:n}=br(),r=L.useCallback(a=>e({unit:t.unit,value:Number(a)}),[e,t]),s=L.useCallback(a=>e({unit:a,value:t.value}),[e,t]);return{onInputChange:r,onUnitSelect:s,onChange:e,milliseconds:t.unit*t.value,fillDelay:t,error:n}};function vI(e,t=6,n=8){try{if(!e)return"";const r=e.startsWith("-")?"-":"",s=r?e.slice(1):e,[a,o=""]=s.split(".");if(!o||Number(o)===0)return r+a;if(a!=="0"){const m=o.slice(0,t).replace(/0+$/,""),y=m?"."+m:"";return r+a+y}const i=o.search(/[^0]/);if(i===-1||i+1>n)return r+"0";const c=o.slice(0,i),l=Math.max(0,n-i),p=o.slice(i).slice(0,Math.min(t,l)).replace(/0+$/,"");return p?r+"0."+c+p:r+"0"}catch{return e||""}}const vh=(e,t)=>L.useMemo(()=>os(t,e),[e,t]),$a=(e,t)=>L.useMemo(()=>ft(t,e),[e,t]),Si=()=>{const{chainId:e}=Q();return L.useMemo(()=>Vn(e),[e])},AI=e=>{const t=Si();return L.useMemo(()=>{if(!(!e||!t))return is(e,t.id)},[e,t])},Fn=(e,t)=>L.useMemo(()=>!e||!t||z(e||"0").isZero()||z(t||"0").isZero()?"":z(e||"0").times(t).toFixed(),[e,t]),TI=()=>{const{srcToken:e,dstToken:t,chainId:n}=Q();return L.useMemo(()=>xu(e,t,n),[e,t,n])},SI=()=>{const{srcToken:e,dstToken:t,chainId:n}=Q();return L.useMemo(()=>gu(e,t,n),[e,t,n])},PI=()=>{const e=TI(),t=SI();return e||t},BI=e=>{const{overrides:t}=Q();return L.useMemo(()=>{if(t!=null&&t.dateFormat)return t.dateFormat(e||0);if(!e)return"";const n=new Date(e),r=String(n.getDate()).padStart(2,"0"),s=String(n.getMonth()+1).padStart(2,"0"),a=n.getFullYear(),o=String(n.getHours()).padStart(2,"0"),i=String(n.getMinutes()).padStart(2,"0");return`${r}/${s}/${a} ${o}:${i}`},[e,t==null?void 0:t.dateFormat])};function UI(){const{callbacks:e}=Q();return L.useCallback(async t=>{var n;try{await navigator.clipboard.writeText(t),(n=e==null?void 0:e.onCopy)==null||n.call(e)}catch(r){console.error("Copy failed:",r)}},[e==null?void 0:e.onCopy])}const II=(e,t)=>L.useMemo(()=>vI(e==null?void 0:e.toString(),t),[e,t]),Ru=({value:e,decimalScale:t=3,prefix:n,suffix:r})=>{const s=II(e,t),{overrides:a}=Q(),o=a==null?void 0:a.numberFormat;return o?o(e||""):L.useMemo(()=>{const c=s||"";if(!c)return"";const[l="",d]=c.split("."),p=l.replace(/\B(?=(\d{3})+(?!\d))/g,","),f=d!==void 0?`${p}.${d}`:p;return`${n||""}${f}${r||""}`},[s,n,r])},pn=()=>{const{srcToken:e,typedInputAmount:t}=Q();return{amountWei:vh(e==null?void 0:e.decimals,t),amountUI:t,error:z(t||0).isZero()?"enterAmount":void 0}},FI=(e,t)=>{const{module:n,srcUsd1Token:r,marketPrice:s,minChunkSizeUsd:a,typedInputAmount:o}=Q();return L.useMemo(()=>{if(z(o||"0").isZero()||!s||z(r||"0").isZero())return;if(!e)return{type:ze.MIN_CHUNKS,value:1,message:"minChunksError",args:{minChunks:"1"}};const{isError:i}=L1(e,t,n);if(i)return{type:ze.MAX_CHUNKS,value:t,message:"maxChunksError",args:{maxChunks:`${t}`}};const{isError:c,value:l}=z1(o||"",r||"",a||0);if(c)return{type:ze.MIN_TRADE_SIZE,value:l,message:"minTradeSizeError",args:{minTradeSize:`${l}`}}},[e,t,n,o,r,a,s])},Ot=()=>{const{srcToken:e,srcUsd1Token:t,module:n,minChunkSizeUsd:r}=Q(),s=se(g=>g.state.typedChunks),a=br().fillDelay,o=se(g=>g.updateState),{amountWei:i,amountUI:c}=pn(),l=L.useMemo(()=>P1(a,c||"",t||"",r||0),[c,t,r,a]),d=L.useMemo(()=>S1(l,n,s),[l,s,n]),p=L.useCallback(g=>o({typedChunks:g}),[o]),f=L.useMemo(()=>I1(i||"",d),[i,d]),m=$a(e==null?void 0:e.decimals,f),y=L.useMemo(()=>t?z(m||"0").times(t||0).toString():"0",[m,t]);return{totalTrades:d,maxTrades:l,amountPerTradeUI:m,amountPerTradeWei:f,amountPerTradeUsd:y,onChange:p,error:FI(d,l)}},OI=()=>{const{srcToken:e,dstToken:t}=Q(),{onChange:n,totalTrades:r,amountPerTradeUsd:s,amountPerTradeUI:a,error:o,maxTrades:i,amountPerTradeWei:c}=Ot(),l=Ru({value:a}),d=Ru({value:s});return{error:o,maxTrades:i,totalTrades:r,amountPerTrade:l,amountPerTradeWei:c,onChange:n,amountPerTradeUsd:d,fromToken:e,toToken:t}},DI=e=>{const{module:t,marketPrice:n}=Q();return L.useMemo(()=>{const r=_1(t,e),s=N1(e);if(n){if(r.isError)return{type:ze.MAX_ORDER_DURATION,value:r.value,message:"maxDurationError",args:{duration:`${Math.floor(Lm(r.value)).toFixed(0)} days`}};if(s.isError)return{type:ze.MIN_ORDER_DURATION,value:s.value,message:"minDurationError",args:{duration:`${Math.floor(yu(s.value)).toFixed(0)} minutes`}}}},[e,t,n])},zu=()=>{const{module:e,callbacks:t}=Q(),n=se(c=>c.state.typedDuration),r=se(c=>c.updateState),s=Ot().totalTrades,a=br().fillDelay,o=L.useMemo(()=>T1(e,s,a,n),[s,a,n,e]),i=DI(o);return{duration:o,setDuration:L.useCallback(c=>{var l;r({typedDuration:c}),(l=t==null?void 0:t.onDurationChange)==null||l.call(t,c)},[r,t]),error:i}},MI=()=>{const{duration:e,setDuration:t,error:n}=zu(),r=L.useCallback(a=>{t({unit:e.unit,value:Number(a)})},[t,e]),s=L.useCallback(a=>{t({unit:a,value:e.value})},[t,e]);return{duration:e,onChange:t,milliseconds:e.unit*e.value,onInputChange:r,onUnitSelect:s,error:n}},_I=()=>{const e=se(s=>s.state.isMarketOrder),{module:t}=Q(),n=L.useMemo(()=>{if(e&&t===te.STOP_LOSS)return{text:"triggerMarketPriceDisclaimer",url:cd}},[e,t]),r=L.useMemo(()=>{if(!(t!==te.LIMIT&&t!==te.TWAP))return{text:e?"marketOrderWarning":"limitPriceMessage",url:"https://www.orbs.com/dtwap-and-dlimit-faq/"}},[e,t]);return n||r},Pi=()=>{const{srcToken:e,dstToken:t,marketPriceLoading:n}=Q(),r=se(l=>l.updateState),s=se(l=>l.state.isInvertedTrade),a=se(l=>l.state.typedTriggerPrice),o=se(l=>l.state.typedLimitPrice),i=se(l=>l.state.isMarketOrder);return{onInvert:L.useCallback(()=>{a!==void 0&&r({typedTriggerPrice:z(1).div(a).toFixed()}),o!==void 0&&r({typedLimitPrice:z(1).div(o).toFixed()}),r({isInvertedTrade:!s})},[r,s,a,o,n]),isInverted:s,fromToken:s?t:e,toToken:s?e:t,isMarketPrice:i}},Ah=({typedValue:e,tokenDecimals:t=18,initialPrice:n="0",percentage:r,setValue:s,setPercentage:a})=>{const{srcUsd1Token:o,dstUsd1Token:i}=Q(),{isInverted:c}=Pi(),l=L.useMemo(()=>z((()=>{if(e!==void 0){const P=c?z(e).isZero()?z(0):z(1).div(e):z(e);return os(P.toFixed(),t)}if(r!==void 0&&z(n||"0").gt(0)&&!z(n||"0").isNaN()){const P=z(n||"0"),B=z(r||0).div(100);return P.plus(P.multipliedBy(B)).decimalPlaces(0).toFixed()}return z(n).gt(0)?n:""})()).decimalPlaces(0).toFixed(),[e,r,t,n,c]),d=L.useCallback(g=>{s(g),a(null)},[s,a]),p=L.useCallback(g=>{s(void 0),a(g)},[s,a]),f=L.useMemo(()=>{if(!n||z(n).isZero())return"";if(r!=null)return r;if(l){const g=z(n),B=z(l).minus(g).div(g).multipliedBy(100).decimalPlaces(2).toString();return z(B||"0").isZero()?"":B}return""},[l,n,r]),m=L.useMemo(()=>{let g="";if(e!==void 0)g=e;else{const P=ft(l,t);if(z(P||"0").isZero())return"";g=c?z(1).div(P).toFixed():P}return g},[e,t,l,c]),y=Fn(c?o:i,m||"0");return{amountWei:z(l).isNaN()?"":l,amountUI:z(m).isNaN()?"":m,selectedPercentage:f,onChange:d,onPercentageChange:p,isInverted:c,usd:z(y).isNaN()?"":y,isTypedValue:e!==void 0}},NI=()=>{const{module:e}=Q();return L.useMemo(()=>e===te.STOP_LOSS?p1:f1,[e])},Lu=()=>{const{module:e}=Q(),t=se(n=>n.state.isMarketOrder);return L.useMemo(()=>e!==te.STOP_LOSS&&e!==te.TAKE_PROFIT||t?void 0:e===te.STOP_LOSS?m1:h1,[e,t])},RI=(e="")=>{const{module:t,marketPrice:n,typedInputAmount:r}=Q();return L.useMemo(()=>{if(z(r||"0").isZero()||!n||t!==te.STOP_LOSS&&t!==te.TAKE_PROFIT)return;const s=F1(n||"",e||"",t);if(s!=null&&s.isError)return{type:ze.STOP_LOSS_TRIGGER_PRICE_GREATER_THAN_MARKET_PRICE,value:s.value,message:"StopLossTriggerPriceError"};const a=O1(n||"",e||"",t);if(a!=null&&a.isError)return{type:ze.TAKE_PROFIT_TRIGGER_PRICE_LESS_THAN_MARKET_PRICE,value:a.value,message:"TakeProfitTriggerPriceError"};if(!e||z(e||0).isZero())return{type:ze.EMPTY_TRIGGER_PRICE,value:e,message:"emptyTriggerPrice"}},[n,e,t,r])},zI=e=>{const{srcToken:t,dstToken:n,module:r,dstUsd1Token:s}=Q(),a=Ot().amountPerTradeWei,o=se(l=>l.state.isMarketOrder),i=L.useMemo(()=>A1(r,a,e,(t==null?void 0:t.decimals)||0),[e,a,o,t==null?void 0:t.decimals,r]),c=$a((n==null?void 0:n.decimals)||0,i);return{amountWei:i,amountUI:c,usd:Fn(c,s)}},yr=()=>{const{dstToken:e,marketPrice:t,module:n,callbacks:r}=Q(),s=se(y=>y.updateState),a=NI(),o=se(y=>y.state.triggerPricePercent),i=o===void 0?a:o,c=n===te.STOP_LOSS||n===te.TAKE_PROFIT,l=Ah({typedValue:se(y=>y.state.typedTriggerPrice),percentage:i,tokenDecimals:(e==null?void 0:e.decimals)||18,initialPrice:c?t:void 0,setValue:L.useCallback(y=>{var g;s({typedTriggerPrice:y}),(g=r==null?void 0:r.onTriggerPriceChange)==null||g.call(r,y||"")},[s,r]),setPercentage:L.useCallback(y=>{var g;s({triggerPricePercent:y}),(g=r==null?void 0:r.onTriggerPricePercentChange)==null||g.call(r,y||"")},[s,r])}),d=RI(l.amountWei),{amountWei:p,amountUI:f,usd:m}=zI(l.amountWei);return L.useMemo(()=>({...l,error:d,pricePerChunkWei:p,pricePerChunkUI:f,pricePerChunkUsd:m}),[l,d,p,f,m])},LI=()=>{const{module:e,marketPrice:t,marketPriceLoading:n}=Q(),{amountUI:r,onChange:s,onPercentageChange:a,usd:o,selectedPercentage:i,error:c,pricePerChunkUI:l,pricePerChunkUsd:d,isTypedValue:p}=yr(),f=se(k=>k.state.isMarketOrder),m=se(k=>k.updateState),{isInverted:y,onInvert:g,fromToken:P,toToken:B}=Pi(),v=L.useCallback(()=>{m({triggerPricePercent:void 0,typedTriggerPrice:void 0})},[m]),U=e!==te.STOP_LOSS&&e!==te.TAKE_PROFIT;return{price:r,amountPerChunk:l,amountPerChunkUsd:d,error:c,onChange:s,onPercentageChange:a,percentage:i,isActive:!f,onReset:v,usd:o,fromToken:P,toToken:B,prefix:"",isLoading:n||!t,isInverted:y,hide:U,onInvert:g,totalTrades:Ot().totalTrades,isTypedValue:p}},$I=()=>{const{module:e}=Q(),t=se(n=>n.state.isMarketOrder);return L.useMemo(()=>e===te.TWAP?t?be.TWAP_MARKET:be.TWAP_LIMIT:e===te.LIMIT?be.LIMIT:e===te.STOP_LOSS?t?be.STOP_LOSS_MARKET:be.STOP_LOSS_LIMIT:e===te.TAKE_PROFIT?be.TAKE_PROFIT:be.TWAP_MARKET,[e,t])},Th=()=>{const{account:e,config:t,chainId:n,isDev:r}=Q();return L.useMemo(()=>["useTwapOrderHistoryManager",e,t==null?void 0:t.adapter,n,r],[e,t,n,r])},HI=()=>{const{callbacks:e}=Q(),t=ic(),n=Th();return L.useCallback(r=>{var i;const s=t.getQueryData(n);let a=!1;const o=[];s&&s.filter(c=>c.version===2).forEach(c=>{var d;const l=r.find(p=>p.id===c.id);l&&l.progress!==c.progress&&(a=!0,o.push(l),l.status===at.Completed&&((d=e==null?void 0:e.onOrderFilled)==null||d.call(e,l)))}),a&&((i=e==null?void 0:e.onOrdersProgressUpdate)==null||i.call(e,o))},[t,n,e])},$u=()=>{const{account:e,config:t,chainId:n,isDev:r}=Q(),s=Th(),a=HI();return Jb({refetchInterval:wI,refetchOnWindowFocus:!0,retry:!1,staleTime:1/0,queryKey:s,queryFn:async({signal:i})=>{if(!e||!n||!t)return[];const c=await hb({signal:i,chainId:n,config:t,account:e,isDev:r});return a(c),c.map(l=>t!=null&&t.twapConfig?{...l,fillDelayMillis:Gi(l,t.twapConfig)}:l)}})},GI=(e,t,n)=>L.useMemo(()=>{if(!(!e||!t||!n||n!=null&&n.isMarketPrice))return md(n,e==null?void 0:e.decimals,t==null?void 0:t.decimals)},[n,e,t]),jI=(e,t,n)=>L.useMemo(()=>{if(!(!e||!t||!n))return hd(n,e.decimals,t.decimals)},[n,e,t]),qI=(e,t,n)=>L.useMemo(()=>{if(!(!e||!t||!n))return ji(n.srcAmountFilled,n.dstAmountFilled,e.decimals,t.decimals)},[n,e,t]),VI=()=>{const{data:e,isLoading:t,refetch:n,isRefetching:r}=$u(),s=L.useCallback(()=>n().then(a=>a.data),[n]);return{orders:e??[],isLoading:t,isRefetching:r,refetchOrders:s}},KI=(e,t,n)=>{const r=Si();return L.useMemo(()=>e==null?void 0:e.map(s=>({srcToken:t,dstToken:n,srcAmount:ft(s.inAmount,t==null?void 0:t.decimals),dstAmount:ft(s.outAmount,n==null?void 0:n.decimals),timestamp:s.timestamp,txHash:s.txHash,explorerUrl:is(s.txHash,r==null?void 0:r.id),executionRate:ji(s.inAmount,s.outAmount,t==null?void 0:t.decimals,n==null?void 0:n.decimals)})).filter(s=>s.srcToken!==void 0&&s.dstToken!==void 0),[e,t,n,r])},WI=(e,t,n)=>{const{config:r}=Q(),s=GI(t,n,e),a=jI(t,n,e),o=qI(t,n,e),i=L.useMemo(()=>e?e.version===2?e.fillDelay:r.twapConfig?Gi(e,r.twapConfig):0:0,[e,r]),c=KI(e==null?void 0:e.fills,t,n)??[];return L.useMemo(()=>{if(e!=null&&e.id)return{original:e,fills:c,srcToken:t,dstToken:n,orderType:e.type,createdAt:e.createdAt,deadline:e.deadline||0,totalTrades:e.totalTradesAmount||0,tradeInterval:i,recipient:e.maker||"",srcAmount:e.srcAmount||"",srcAmountUI:ft(e.srcAmount,t==null?void 0:t.decimals),srcAmountUsd:"",dstAmount:"",dstAmountUI:"",dstAmountUsd:"",limitPrice:os(s,n==null?void 0:n.decimals),limitPriceUI:s||"",limitPriceUsd:"",sizePerTrade:e.srcAmountPerTrade||"",sizePerTradeUI:ft(e.srcAmountPerTrade,t==null?void 0:t.decimals),minDestAmountPerTrade:e.dstMinAmountPerTrade||"",minDestAmountPerTradeUI:ft(e.dstMinAmountPerTrade,n==null?void 0:n.decimals),dstMinAmount:e.dstMinAmountTotal,dstMinAmountUI:ft(e.dstMinAmountTotal,n==null?void 0:n.decimals),dstMinAmountUsd:"",triggerPrice:os(a,n==null?void 0:n.decimals),triggerPriceUI:a||"",id:e.id,amountInFilled:ft(e.srcAmountFilled,t==null?void 0:t.decimals),amountOutFilled:ft(e.dstAmountFilled,n==null?void 0:n.decimals),amountOutFilledToken:n,progress:e.progress,executionPrice:o,version:e.version}},[e,c,t,n,i,s,a,o])},XI=e=>{const{module:t,marketPrice:n,typedInputAmount:r}=Q(),{amountWei:s}=yr(),a=se(o=>o.state.isMarketOrder);return L.useMemo(()=>{if(z(r||"0").isZero()||!s||!n)return;const o=D1(s,e,a,t),i=M1(s,e,a,t);if(o!=null&&o.isError)return{type:ze.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:"triggerLimitPriceError",value:o.value};if(i!=null&&i.isError)return{type:ze.TRIGGER_LIMIT_PRICE_GREATER_THAN_TRIGGER_PRICE,message:"triggerLimitPriceError",value:i.value};if(e&&z(e||0).isZero())return{type:ze.MISSING_LIMIT_PRICE,message:"emptyLimitPrice",value:e||""}},[e,s,t,a,r,n])},Bi=()=>{const{dstToken:e,marketPrice:t,callbacks:n}=Q(),r=se(l=>l.updateState),s=Lu(),a=se(l=>l.state.limitPricePercent),o=a===void 0?s:a,i=Ah({typedValue:se(l=>l.state.typedLimitPrice),percentage:o,tokenDecimals:(e==null?void 0:e.decimals)||18,initialPrice:t,setValue:L.useCallback(l=>{var d;r({typedLimitPrice:l}),(d=n==null?void 0:n.onLimitPriceChange)==null||d.call(n,l||"")},[r,n]),setPercentage:L.useCallback(l=>{var d;r({limitPricePercent:l}),(d=n==null?void 0:n.onLimitPricePercentChange)==null||d.call(n,l||"")},[r,n])}),c=XI(i.amountWei);return L.useMemo(()=>({...i,error:c}),[i,c])},ZI=()=>{const{module:e}=Q(),t=se(i=>i.updateState),n=se(i=>i.state.isMarketOrder),r=Lu(),s=se(i=>i.state.triggerPricePercent)||0,a=e===te.LIMIT,o=L.useCallback(()=>{!n&&e===te.STOP_LOSS&&t({limitPricePercent:r}),t({isMarketOrder:!n})},[t,s,e,n,r]);return{isLimitPrice:!n,toggleLimitPrice:o,hide:a}},Sh=()=>{const{module:e,marketPrice:t}=Q(),n=Bi().amountWei,r=yr().amountWei,s=se(a=>a.state.isMarketOrder);return e===te.LIMIT||!s?n||"":e===te.STOP_LOSS||e===te.TAKE_PROFIT?r||"":t||""},ds=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:n}=Q(),r=Sh(),s=pn().amountWei,a=L.useMemo(()=>C1(s||"",r,(e==null?void 0:e.decimals)||0),[s,r,e==null?void 0:e.decimals]),o=$a(t==null?void 0:t.decimals,a);return{amountWei:a,amountUI:o,usd:Fn(o,n)}},Ui=()=>{const{srcToken:e,dstToken:t,dstUsd1Token:n}=Q(),r=Sh(),s=Ot().amountPerTradeWei,a=se(c=>c.state.isMarketOrder),o=L.useMemo(()=>v1(s,r,!!a,(e==null?void 0:e.decimals)||0),[s,r,a,e==null?void 0:e.decimals]),i=$a(t==null?void 0:t.decimals,o);return{amountWei:o,amountUI:i,usd:Fn(i,n)}},QI=()=>{const{typedInputAmount:e,marketPriceLoading:t,dstToken:n}=Q(),{amountUI:r,usd:s}=ds(),o=PI()?e:r;return{value:o,valueWei:vh(n==null?void 0:n.decimals,o),isLoading:t,usd:s}},JI=()=>{const{module:e,marketPriceLoading:t}=Q(),{amountUI:n,onChange:r,onPercentageChange:s,usd:a,selectedPercentage:o,error:i,isTypedValue:c}=Bi(),{amountUI:l,usd:d}=Ui(),p=se(k=>k.updateState),f=Lu(),{isLimitPrice:m,toggleLimitPrice:y}=ZI(),{isInverted:g,onInvert:P,fromToken:B,toToken:v}=Pi(),U=L.useCallback(()=>{p({typedLimitPrice:void 0}),p({limitPricePercent:f})},[p,e,f]);return{price:n,amountPerChunk:l,amountPerChunkUsd:d,error:i,onChange:r,onPercentageChange:s,onReset:U,usd:a,fromToken:B,tradesAmount:Ot().totalTrades,toToken:v,percentage:o,isInverted:g,isLoading:t,isLimitPrice:m,toggleLimitPrice:y,onInvert:P,isTypedValue:c}},YI=()=>{const{minChunkSizeUsd:e,typedInputAmount:t,srcUsd1Token:n}=Q(),r=Fn(t,n);return L.useMemo(()=>z(e).gt(z(r||"0"))?{type:ze.MIN_TRADE_SIZE_ERROR,value:e,message:"minTradeSizeError",args:{minTradeSize:`${e}`}}:void 0,[e,r])};function Ph(){const{marketPrice:e,marketPriceLoading:t,typedInputAmount:n,srcUsd1Token:r,srcBalance:s,chainId:a}=Q(),{error:o}=yr(),{error:i}=Bi(),{error:c}=Ot(),{error:l}=br(),{error:d}=zu(),p=YI(),f=pn().amountWei,m=L.useMemo(()=>{if(s&&z(f).gt(s))return{type:ze.INSUFFICIENT_BALANCE,message:"insufficientFunds",value:s||""}},[s,f,a]);return L.useMemo(()=>H1({marketPrice:e,typedInputAmount:n,srcUsd1Token:r,marketPriceLoading:t,triggerPriceError:o,limitPriceError:i,tradesError:c,fillDelayError:l,durationError:d,balanceError:m,minTradeSizeError:p}),[e,t,n,o,i,c,l,d,m,r,p])}const eF=()=>{const{supportedChains:e}=Q();return L.useMemo(()=>e,[e])},tF=()=>{const{config:e}=Q();return L.useMemo(()=>({spender:e.repermit}),[e])},Hu=()=>{const{publicClient:e}=Q();return Qt({mutationFn:async t=>{if(!e)throw new Error("publicClient is not defined");const n=10;let r=0,s=1e3;for(;r<n;)try{return await e.waitForTransactionReceipt({hash:t,confirmations:2,retryDelay:s})}catch(a){if(r++,r>=n)throw new Error(`Failed after ${n} attempts: ${a}`);await new Promise(o=>setTimeout(o,s)),s*=2}}}).mutateAsync},Gu=()=>{const e=se(n=>n.state.currentTime),t=zu().duration;return L.useMemo(()=>B1(e,t),[e,t])},nF=()=>{const{srcUsd1Token:e,dstUsd1Token:t}=Q(),n=pn().amountUI,r=ds().amountUI,s=Fn(n,e),a=Fn(r,t);return{srcAmountUsd:s,dstAmountUsd:a}},rF=()=>{const{fees:e,dstUsd1Token:t}=Q(),{amountUI:n}=ds(),r=L.useMemo(()=>!e||!n?"":z(n).multipliedBy(e).dividedBy(100).toFixed(),[n,e]);return{amount:r,percent:e,usd:Fn(r,t)}},sF=e=>{const t=L.useMemo(()=>!e.minDestAmountPerTrade||!e.totalTrades?"":z(e.minDestAmountPerTrade).multipliedBy(e.totalTrades).decimalPlaces(0).toFixed(),[e.minDestAmountPerTrade,e.totalTrades]),n=L.useMemo(()=>!e.minDestAmountPerTradeUI||!e.totalTrades?"":z(e.minDestAmountPerTradeUI).multipliedBy(e.totalTrades).toFixed(),[e.minDestAmountPerTradeUI,e.totalTrades]),r=L.useMemo(()=>!e.minDestAmountPerTradeUsd||!e.totalTrades?"":z(e.minDestAmountPerTradeUsd).multipliedBy(e.totalTrades).decimalPlaces(2).toFixed(),[e.minDestAmountPerTradeUsd,e.totalTrades]);return L.useMemo(()=>({srcToken:e.srcToken,dstToken:e.dstToken,orderType:e.orderType,createdAt:e.createdAt||0,deadline:e.deadline||0,totalTrades:e.totalTrades||0,tradeInterval:e.tradeInterval||0,recipient:e.account||"",srcAmount:e.srcAmount||"",srcAmountUI:e.srcAmountUI||"",srcAmountUsd:e.srcAmountUsd||"",dstAmount:e.dstAmount||"",dstAmountUI:e.dstAmountUI||"",dstAmountUsd:e.dstAmountUsd||"",limitPrice:e.limitPrice||"",limitPriceUI:e.limitPriceUI||"",limitPriceUsd:e.limitPriceUsd||"",sizePerTrade:e.srcAmountPerTrade||"",sizePerTradeUI:e.srcAmountPerTradeUI||"",sizePerTradeUsd:e.srcAmountPerTradeUsd,minDestAmountPerTrade:e.minDestAmountPerTrade||"",minDestAmountPerTradeUI:e.minDestAmountPerTradeUI||"",minDestAmountPerTradeUsd:e.minDestAmountPerTradeUsd,dstMinAmount:t,dstMinAmountUI:n,dstMinAmountUsd:r,triggerPrice:e.triggerPrice||"",triggerPriceUI:e.triggerPriceUI||"",triggerPriceUsd:e.triggerPriceUsd}),[e.srcToken,e.dstToken,e.orderType,e.createdAt,e.deadline,e.totalTrades,e.tradeInterval,e.account,e.srcAmount,e.srcAmountUI,e.srcAmountUsd,e.dstAmount,e.dstAmountUI,e.dstAmountUsd,e.limitPrice,e.limitPriceUI,e.limitPriceUsd,e.srcAmountPerTrade,e.srcAmountPerTradeUI,e.srcAmountPerTradeUsd,e.minDestAmountPerTrade,e.minDestAmountPerTradeUI,e.minDestAmountPerTradeUsd,t,n,r,e.triggerPrice,e.triggerPriceUI,e.triggerPriceUsd])},aF=()=>{const{srcToken:e,dstToken:t,account:n,chainId:r,slippage:s,config:a,module:o,fees:i}=Q(),{amountWei:c}=pn(),{amountPerTradeWei:l,totalTrades:d}=Ot(),p=Gu(),{amountWei:f}=Ui(),{pricePerChunkWei:m}=yr(),{milliseconds:y}=br();return L.useMemo(()=>{var g;return gd({chainId:r,srcToken:Ur((e==null?void 0:e.address)||"")?((g=Vn(r))==null?void 0:g.wToken.address)||"":(e==null?void 0:e.address)||"",dstToken:(t==null?void 0:t.address)||"",srcAmount:c,deadlineMillis:p,fillDelayMillis:!d||d===1?0:y,slippage:s*100,account:n,srcAmountPerTrade:l,dstMinAmountPerTrade:f,triggerAmountPerTrade:m,config:a,module:o})},[e,t,n,r,s,a,o,c,l,d,y,f,m,i])},Bh=()=>{const{srcToken:e,dstToken:t,account:n}=Q(),{amountWei:r,amountUI:s}=pn(),{amountWei:a,amountUI:o,usd:i}=Bi(),{amountPerTradeWei:c,amountPerTradeUI:l,amountPerTradeUsd:d,totalTrades:p}=Ot(),f=Gu(),{amountWei:m,amountUI:y,usd:g}=Ui(),{pricePerChunkWei:P,amountUI:B,usd:v}=yr(),{milliseconds:U}=br(),{amountWei:k,amountUI:D}=ds(),{srcAmountUsd:N,dstAmountUsd:_}=nF(),{amount:h,percent:b,usd:x}=rF(),C=aF(),E=se(A=>A.state.isMarketOrder),T=se(A=>A.state.currentTime),O=Ps(),w=sF({srcToken:O.srcToken||e,dstToken:O.dstToken||t,account:n,orderType:$I(),createdAt:T,deadline:f,totalTrades:p,tradeInterval:U,srcAmount:r,srcAmountUI:s,srcAmountUsd:N,dstAmount:k,dstAmountUI:D,dstAmountUsd:_,limitPrice:E?void 0:a,limitPriceUI:E?void 0:o,limitPriceUsd:E?void 0:i,srcAmountPerTrade:c,srcAmountPerTradeUI:l,srcAmountPerTradeUsd:d,minDestAmountPerTrade:m,minDestAmountPerTradeUI:y,minDestAmountPerTradeUsd:g,triggerPrice:P,triggerPriceUI:B,triggerPriceUsd:v});return L.useMemo(()=>({...w,feesAmount:h,feesUsd:x||"",feesPercentage:b,rePermitData:C}),[w,C,h,x,b])},oF=()=>{var i;const{account:e,walletClient:t,overrides:n,callbacks:r,chainId:s}=Q(),a=(i=Si())==null?void 0:i.wToken,o=Hu();return Qt({mutationFn:async({onHash:c,srcAmountWei:l})=>{var f,m;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!a)throw new Error("tokenAddress is not defined");let d;ve.onWrapRequest(),n!=null&&n.wrap?d=await n.wrap(l):d=await t.writeContract({abi:td,functionName:"deposit",account:e,address:a.address,value:BigInt(l),chain:t.chain}),(f=r==null?void 0:r.onWrapRequest)==null||f.call(r),c==null||c(d);const p=await o(d);if(!p)throw new Error("failed to get transaction receipt");if(p.status==="reverted")throw new Error("failed to wrap token");return ve.onWrapSuccess(d),(m=r==null?void 0:r.onWrapSuccess)==null||m.call(r,{txHash:p.transactionHash,explorerUrl:is(p.transactionHash,s),amount:ft(l,a.decimals)}),p},onError:c=>{throw ve.onWrapError(c),c}})},Uh=()=>{const{account:e,walletClient:t,chainId:n,callbacks:r}=Q(),{rePermitData:s}=Bh(),{refetch:a}=$u();return Qt({mutationFn:async()=>{var y,g,P,B;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!n)throw new Error("missing chainId");const{order:o,domain:i,types:c,primaryType:l}=s;ve.onSignOrderRequest(o);let d;try{d=await(t==null?void 0:t.signTypedData({domain:i,types:c,primaryType:l,message:o,account:e}))}catch(v){throw(y=r==null?void 0:r.onSignOrderError)==null||y.call(r,v),ve.onSignOrderError(v),v}ve.onSignOrderSuccess(d),(g=r==null?void 0:r.onSignOrderSuccess)==null||g.call(r,d);const p=hw(d),f={v:j(p.v||0),r:p.r,s:p.s};(P=r==null?void 0:r.onSignOrderRequest)==null||P.call(r);const m=await kd(o,f);return(B=r==null?void 0:r.onOrderCreated)==null||B.call(r,m),await a(),m}})},Ih=()=>{const{account:e,publicClient:t,config:n}=Q();return Qt({mutationFn:async({tokenAddress:r,srcAmountWei:s})=>{if(!t)throw new Error("missing publicClient");if(!e)throw new Error("missing account");if(!n)throw new Error("missing config");const a=await t.readContract({address:r,abi:lf,functionName:"allowance",args:[e,n.repermit]}).then(i=>i.toString()),o=z(a||"0").lt(z(s).toString());return{allowance:a,approvalRequired:o}}})},iF=()=>{const{account:e,walletClient:t,overrides:n,config:r,chainId:s,callbacks:a}=Q(),o=Hu(),{mutateAsync:i}=Ih();return Qt({onError:c=>{ve.onApproveError(c)},mutationFn:async({token:c,onHash:l,srcAmountWei:d})=>{var y,g;if(!e)throw new Error("missing account");if(!t)throw new Error("missing walletClient");if(!r)throw new Error("missing config");ve.onApproveRequest();let p;if(n!=null&&n.approveOrder?p=await n.approveOrder({tokenAddress:c.address,spenderAddress:r.repermit,amount:or}):p=await t.writeContract({abi:lf,functionName:"approve",account:e,address:c.address,args:[r.repermit,or],chain:t.chain}),!p)throw new Error("failed to approve token");(y=a==null?void 0:a.onApproveRequest)==null||y.call(a),l(p);const f=await o(p);if(!f)throw new Error("failed to get transaction receipt");if(f.status==="reverted")throw new Error("failed to approve token");let m=!1;for(let P=0;P<3;P++){const{approvalRequired:B}=await i({tokenAddress:c.address,srcAmountWei:d});if(!B){m=!0;break}P<2&&await new Promise(v=>setTimeout(v,3e3))}if(!m)throw new Error(`Insufficient ${c.symbol} allowance to perform the swap. Please approve the token first.`);return ve.onApproveSuccess(f.transactionHash),(g=a==null?void 0:a.onApproveSuccess)==null||g.call(a,{txHash:f.transactionHash,explorerUrl:is(f.transactionHash,s),token:c,amount:ft(d,c.decimals)}),f}})},cF=()=>{const{account:e,chainId:t,srcToken:n,dstToken:r,module:s,slippage:a}=Q(),o=yr(),i=pn().amountWei,c=Ot().amountPerTradeWei,l=Gu(),d=Ot().totalTrades,p=br().fillDelay,f=Ui().amountWei,m=se(y=>y.state.isMarketOrder);return Qt({mutationFn:async()=>{ve.onRequestOrder({account:e,chainId:t,module:s,srcToken:n,dstToken:r,fromTokenAmount:i,srcChunkAmount:c,triggerPricePerTrade:o.pricePerChunkWei,deadline:l,fillDelay:p.unit*p.value,minDstAmountOutPerTrade:f,slippage:a,isMarketOrder:m||!1,chunksAmount:d})}})};function lF(e){const t=e.message,n=t.match(/,\s*code\s*:\s*(\d+)/i);return{message:t.replace(/^error\s*:/i,"").replace(/,\s*code\s*:\s*\d+/i,"").trim()||"",code:n?Number(n[1]):0}}const Fh=()=>{const{srcToken:e,dstToken:t,chainId:n,callbacks:r,marketPrice:s}=Q(),a=iF().mutateAsync,o=oF().mutateAsync,i=Uh().mutateAsync,{mutateAsync:c}=Ih(),{update:l}=Ps(),{amountWei:d,amountUI:p}=pn(),{amountUI:f}=ds(),m=cF().mutate;return Qt({mutationFn:async()=>{var g,P;const y=Ur((e==null?void 0:e.address)||" ");try{if(!e)throw new Error("missing srcToken");if(!t)throw new Error("missing dstToken");if(!n)throw new Error("missing chainId");const B=zm(e,n);l({allowanceLoading:!0,wrapTxHash:void 0,approveTxHash:void 0,marketPrice:s,srcAmount:p,dstAmount:f,srcToken:e,dstToken:t});const{approvalRequired:v}=await c({tokenAddress:B.address,srcAmountWei:d});let U=0,k=1;y&&k++,v&&k++,l({totalSteps:k,stepIndex:U,allowanceLoading:!1,hasApproval:!v,status:vt.LOADING}),m(),y&&(l({step:Bs.WRAP}),await o({onHash:N=>l({wrapTxHash:N}),srcAmountWei:d}),U++,l({stepIndex:U})),v&&(l({step:Bs.APPROVE}),await a({token:B,onHash:N=>l({approveTxHash:N}),srcAmountWei:d}),U++,l({stepIndex:U})),l({step:Bs.CREATE});const D=await i();return l({status:vt.SUCCESS,orderId:D.id}),D}catch(B){if(bu(B))(g=r==null?void 0:r.onSubmitOrderRejected)==null||g.call(r),l({step:void 0,status:void 0,stepIndex:void 0,error:B});else{const v=lF(B);(P=r==null?void 0:r.onSubmitOrderFailed)==null||P.call(r,v),l({status:vt.FAILED,parsedError:v,error:B})}throw B}}})},uF=()=>{const e=Ps(),{amountUI:t}=pn(),{amountUI:n}=ds(),{srcToken:r,dstToken:s}=Q(),a=Fh(),o=se(c=>c.resetState),i=L.useCallback(()=>a.mutateAsync(),[a]);return L.useMemo(()=>({...e,srcToken:r,dstToken:s,srcAmount:e.srcAmount||t,dstAmount:e.dstAmount||n,onSubmit:i,resetState:o,isLoading:(e==null?void 0:e.status)===vt.LOADING,isSuccess:(e==null?void 0:e.status)===vt.SUCCESS,isFailed:(e==null?void 0:e.status)===vt.FAILED}),[i,e,r,s,o])},dF=()=>{const{marketPrice:e,srcToken:t,dstToken:n,marketPriceLoading:r,srcBalance:s,srcUsd1Token:a,noLiquidity:o,typedInputAmount:i}=Q(),c=r||z(a||"0").isZero()||s===void 0||z(e||"0").isZero(),l=!!(t&&n&&i&&c),d=Ph(),p=L.useMemo(()=>o?"noLiquidity":z(i||"0").isZero()?"enterAmount":"placeOrder",[d,i,o]),f=!!(d||o||l||z(i||"0").isZero()||!t||!n);return L.useMemo(()=>({disabled:f,text:p,loading:l}),[f,p,l])},pF=60,Oh=()=>{const{refetch:e}=$u();return Qt({mutationFn:async t=>{var n;for(let r=0;r<pF;r++){const s=(n=await e())==null?void 0:n.data;if(!s)throw new Error("orders not found");if(t.every(o=>{const i=s.find(c=>c.id===o);return(i==null?void 0:i.status)===at.Cancelled}))return;await new Promise(o=>setTimeout(o,1e3))}throw new Error("Timed out waiting for order cancellation to be confirmed")}})},fF=()=>{const{account:e,walletClient:t,publicClient:n,config:r,callbacks:s,chainId:a}=Q(),o=Hu(),i=Oh().mutateAsync,c=se(p=>p.updateState),l=async p=>{ve.onCancelOrderRequest(p.map(f=>f.id.toString()),1);try{return(await Promise.all(p.map(m=>t.writeContract({account:e,address:m.twapAddress,abi:rd,functionName:"cancel",args:[m.id],chain:t.chain}))))[0]}catch(f){throw ve.onCancelOrderError(f),f}},d=async p=>{var f;try{ve.onCancelOrderRequest(p.map(g=>g.hash),2);const m=await t.writeContract({account:e,address:r.repermit,abi:nd,functionName:"cancel",args:[p.map(g=>g.hash)],chain:t.chain}),y=await o(m);if(!y)throw new Error("failed to get transaction receipt");if(y.status==="reverted")throw new Error("failed to cancel order");return ve.onCancelOrderSuccess(m),(f=s==null?void 0:s.onCancelOrderSuccess)==null||f.call(s,{orders:p,txHash:m,explorerUrl:is(m,a)}),y.transactionHash}catch(m){throw ve.onCancelOrderError(m),m}};return Qt({mutationFn:async({orders:p})=>{var f,m;if(!e||!t||!n||!r)throw new Error("missing required parameters");try{(f=s==null?void 0:s.onCancelOrderRequest)==null||f.call(s,p),c({cancelOrderStatus:vt.LOADING,cancelOrderTxHash:void 0,cancelOrderError:void 0});const y=p.filter(v=>v.version===1),g=p.filter(v=>v.version===2),[P,B]=await Promise.all([y.length?l(y):Promise.resolve(""),g.length?d(g):Promise.resolve("")]);return await i(p.map(v=>v.id)),c({cancelOrderStatus:vt.SUCCESS}),[P,B].filter(Boolean)}catch(y){console.error("cancel order error",y),(m=s==null?void 0:s.onCancelOrderFailed)==null||m.call(s,y),bu(y)?c({cancelOrderStatus:void 0}):(c({cancelOrderStatus:vt.FAILED}),ve.onCancelOrderError(y))}}})};V1(bb.version),H.DEFAULT_DURATIONS=EI,H.DISCLAIMER_URL=d1,H.ERC20_ABI=Qh,H.IWETH_ABI=td,H.InputErrors=ze,H.Module=te,H.ORBS_LOGO=l1,H.ORBS_SLTP_FAQ_URL=c1,H.ORBS_TWAP_FAQ_URL=cd,H.ORBS_WEBSITE_URL=u1,H.OrderFilter=sd,H.OrderStatus=at,H.OrderType=be,H.Partners=Rt,H.REPERMIT_ABI=nd,H.SPOT_VERSION=As,H.SpotProvider=gI,H.Steps=Bs,H.SwapStatus=vt,H.TWAP_ABI=rd,H.TimeUnit=Ge,H.buildRePermitOrderData=gd,H.ensureWrappedToken=zm,H.eqIgnoreCase=jn,H.getConfig=qi,H.getExplorerUrl=is,H.getMinChunkSizeUsd=yd,H.getNetwork=Vn,H.getOrderExecutionRate=ji,H.getOrderFillDelayMillis=Gi,H.getOrderLimitPriceRate=md,H.getOrderType=yw,H.getPartnerChains=fd,H.getPartners=bd,H.getTriggerPricePerTrade=hd,H.isNativeAddress=Ur,H.isTxRejected=bu,H.millisToDays=Lm,H.millisToMinutes=yu,H.networks=Le,H.parseError=bw,H.shouldUnwrapOnly=gu,H.shouldWrapOnly=xu,H.submitOrder=kd,H.toAmountUi=ft,H.toAmountWei=os,H.useAddresses=tF,H.useAmountUi=$a,H.useCancelOrderMutation=fF,H.useCancelOrderRefetchUntilStatusSynced=Oh,H.useCopyToClipboard=UI,H.useDateFormat=BI,H.useDerivedHistoryOrder=WI,H.useDerivedOrder=Bh,H.useDisclaimerPanel=_I,H.useDstTokenPanel=QI,H.useDurationPanel=MI,H.useExplorerLink=AI,H.useFillDelayPanel=CI,H.useFormatNumber=Ru,H.useInputErrors=Ph,H.useInvertTradePanel=Pi,H.useLimitPricePanel=JI,H.useNetwork=Si,H.useOrderHistoryPanel=VI,H.usePartnerChains=eF,H.useSignOrder=Uh,H.useSubmitOrderButton=dF,H.useSubmitOrderMutation=Fh,H.useSubmitOrderPanel=uF,H.useSwapExecution=Ps,H.useTradesPanel=OI,H.useTriggerPricePanel=LI,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})}));