@dodoex/wallet-web3 0.0.55-beta-entry.2 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{alchemy-provider-5870b6fa-c3458ce0.js → alchemy-provider-5870b6fa-13b8091b.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-b76aadd7.js → alchemy-websocket-provider-213da986-092050ee.js} +1 -1
- package/dist/{blocto-8dcd5378.js → blocto-f6fc9aea.js} +1 -1
- package/dist/{ccip-2cdc0e6e.js → ccip-84b0dbe4.js} +1 -1
- package/dist/cjs/{alchemy-provider-5870b6fa-22229235.cjs → alchemy-provider-5870b6fa-64336a96.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-d0bd62ee.cjs → alchemy-websocket-provider-213da986-a3b55d08.cjs} +1 -1
- package/dist/cjs/{blocto-9189db02.cjs → blocto-ac41246e.cjs} +1 -1
- package/dist/cjs/{ccip-cf4c8958.cjs → ccip-50cb6906.cjs} +1 -1
- package/dist/cjs/controllers/ConnectController.d.ts +6 -11
- package/dist/cjs/core/index.d.ts +2 -4
- package/dist/cjs/{draggabilly-4a795874.cjs → draggabilly-e7ced507.cjs} +1 -1
- package/dist/cjs/hash-808c8802.cjs +1 -0
- package/dist/cjs/id-9a0a1e7a.cjs +1 -0
- package/dist/cjs/index-187635d5.cjs +72 -0
- package/dist/cjs/index-1ed42dfb.cjs +1 -0
- package/dist/cjs/{index-8df03db9.cjs → index-2116322f.cjs} +2 -2
- package/dist/cjs/{index-63281f6f.cjs → index-431eafaf.cjs} +1 -1
- package/dist/cjs/{index-1d309dce.cjs → index-6311dfd3.cjs} +1 -1
- package/dist/cjs/{index-458ec813.cjs → index-797e10d2.cjs} +1 -1
- package/dist/cjs/index-8ff359b4.cjs +6 -0
- package/dist/cjs/{index-b289395f.cjs → index-bc5b594f.cjs} +1 -1
- package/dist/cjs/index-cdc94a75.cjs +28 -0
- package/dist/cjs/{index-d229b8b4.cjs → index-ee4bfece.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-f9414662.cjs → index.es-405d08ac.cjs} +1 -1
- package/dist/cjs/inherits_browser-38fa9d17.cjs +1 -0
- package/dist/cjs/{interface-af41c890.cjs → interface-f3e26846.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-b768ceaf.cjs → lib-typedarrays-73e8b914.cjs} +1 -1
- package/dist/cjs/{portis-e8a9cfb5.cjs → portis-61c3d3b4.cjs} +1 -1
- package/dist/cjs/{provider-bc656af9.cjs → provider-9eb163e3.cjs} +1 -1
- package/dist/cjs/providers/connector/alchemy/index.d.ts +12 -8
- package/dist/cjs/providers/connector/alchemy/provider.d.ts +12 -8
- package/dist/cjs/providers/connector/index.d.ts +12 -8
- package/dist/cjs/providers/wallets/index.d.ts +1 -3
- package/dist/cjs/providers/wallets/types.d.ts +0 -2
- package/dist/cjs/{rainbow-3b59bcb8.cjs → rainbow-33ee3015.cjs} +1 -1
- package/dist/cjs/sha224-7b52a06c.cjs +1 -0
- package/dist/cjs/{sha256-56f21b8c.cjs → sha256-05927a0c.cjs} +1 -1
- package/dist/cjs/{typed-data-a777dbe1.cjs → typed-data-757a1f81.cjs} +1 -1
- package/dist/cjs/uAuth-6fb05f6c.cjs +1 -0
- package/dist/cjs/{walletConnect-59deaaa7.cjs → walletConnect-25b4005b.cjs} +1 -1
- package/dist/cjs/walletLink-00ebda9a.cjs +3 -0
- package/dist/controllers/ConnectController.d.ts +6 -11
- package/dist/core/index.d.ts +2 -4
- package/dist/{draggabilly-36d7b3a5.js → draggabilly-0d779ed7.js} +1 -1
- package/dist/hash-92ae3757.js +1 -0
- package/dist/id-e3e24f85.js +1 -0
- package/dist/{index-0a7c220d.js → index-0d9deec3.js} +1 -1
- package/dist/index-2c8fd538.js +28 -0
- package/dist/{index-3e23698a.js → index-35578e2d.js} +1 -1
- package/dist/index-3ab5d29e.js +6 -0
- package/dist/index-44de3ecf.js +72 -0
- package/dist/{index-7e946bf1.js → index-745cc73f.js} +1 -1
- package/dist/index-8fd2e408.js +1 -0
- package/dist/{index-b967e22c.js → index-9c4f1453.js} +1 -1
- package/dist/{index-b6011204.js → index-aa945484.js} +2 -2
- package/dist/index-f20d44fd.js +1 -0
- package/dist/{index.es-68fc128f.js → index.es-b1d1827b.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/inherits_browser-76e61e9e.js +1 -0
- package/dist/{interface-746c1865.js → interface-36186c54.js} +1 -1
- package/dist/{lib-typedarrays-5c5921fd.js → lib-typedarrays-ed0a9813.js} +1 -1
- package/dist/{portis-00d754f6.js → portis-63bd0722.js} +1 -1
- package/dist/{provider-4fe47dba.js → provider-d2bfbaca.js} +1 -1
- package/dist/providers/connector/alchemy/index.d.ts +12 -8
- package/dist/providers/connector/alchemy/provider.d.ts +12 -8
- package/dist/providers/connector/index.d.ts +12 -8
- package/dist/providers/wallets/index.d.ts +1 -3
- package/dist/providers/wallets/types.d.ts +0 -2
- package/dist/{rainbow-ba579cad.js → rainbow-41587daa.js} +1 -1
- package/dist/{sha224-ee67389b.js → sha224-b6089413.js} +1 -1
- package/dist/{sha256-6b5b8897.js → sha256-5f9a69f1.js} +1 -1
- package/dist/{typed-data-a96333aa.js → typed-data-4f5fbd06.js} +1 -1
- package/dist/uAuth-b64c1eab.js +1 -0
- package/dist/{walletConnect-6b2a7a4e.js → walletConnect-12293a0d.js} +1 -1
- package/dist/walletLink-66dc8df8.js +3 -0
- package/package.json +1 -1
- package/dist/cjs/id-5a06c725.cjs +0 -1
- package/dist/cjs/index-0d59d3a4.cjs +0 -37
- package/dist/cjs/index-2b5e634c.cjs +0 -1
- package/dist/cjs/index-32e6540a.cjs +0 -28
- package/dist/cjs/index-f92b0bd8.cjs +0 -6
- package/dist/cjs/sha224-542ed113.cjs +0 -1
- package/dist/cjs/uAuth-977cd558.cjs +0 -1
- package/dist/cjs/walletLink-8c611440.cjs +0 -3
- package/dist/id-cb48006b.js +0 -1
- package/dist/index-36aa5fe1.js +0 -37
- package/dist/index-7646623f.js +0 -1
- package/dist/index-8af79cad.js +0 -6
- package/dist/index-8c308a55.js +0 -1
- package/dist/index-98d378b6.js +0 -28
- package/dist/uAuth-6ea836c7.js +0 -1
- package/dist/walletLink-8d027247.js +0 -3
package/dist/index-7646623f.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e,e as t,t as r,b as n,f as i,U as s,g as a,L as o,k as f,h as d,i as c,B as u,c as l,j as h,l as p,m as g,p as A,n as m,o as y,q as v,s as b,u as w,v as S,w as E,x as C,F as I,E as T,y as B,z as M,_ as P,A as D,C as R}from"./index-98d378b6.js";import{BaseContract as x,Contract as _,ContractFactory as O}from"@ethersproject/contracts";import{Signer as N,VoidSigner as k}from"@ethersproject/abstract-signer";import{getAddress as F,getIcapAddress as L,getContractAddress as H,getCreate2Address as q,isAddress as G}from"@ethersproject/address";import{Provider as U}from"@ethersproject/abstract-provider";import{hexlify as K,concat as j,arrayify as Q,hexDataLength as W,splitSignature as z,hexZeroPad as J,hexDataSlice as Y,joinSignature as V,isHexString as X,zeroPad as Z,stripZeros as $,isBytes as ee,isBytesLike as te,hexConcat as re,hexStripZeros as ne,hexValue as ie}from"@ethersproject/bytes";import{v as se,T as ae}from"./typed-data-a96333aa.js";import{defineReadOnly as oe,resolveProperties as fe,checkProperties as de,deepCopy as ce,getStatic as ue,shallowCopy as le}from"@ethersproject/properties";import{computeAddress as he,serialize as pe,recoverAddress as ge,accessListify as Ae,parse as me,TransactionTypes as ye}from"@ethersproject/transactions";import{i as ve}from"./id-cb48006b.js";import{encryptKeystore as be,decryptJsonWallet as we,decryptJsonWalletSync as Se,getJsonWalletAddress as Ee}from"@ethersproject/json-wallets";import*as Ce from"@ethersproject/constants";import{HashZero as Ie}from"@ethersproject/constants";import*as Te from"@ethersproject/providers";import{getDefaultProvider as Be}from"@ethersproject/providers";import{A as Me,d as Pe,F as De,C as Re,E as xe,a as _e,b as Oe,P as Ne,c as ke,e as Fe,I as Le,L as He,T as qe,f as Ge}from"./interface-746c1865.js";import{i as Ue}from"./index-3e23698a.js";import Ke from"events";import"zustand";import"buffer";var je=Object.freeze({__proto__:null,decode:e,encode:t});function Qe(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function We(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function ze(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n];if(r+=i.l,e>=r&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const Je=We("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Ye="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),Ve=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Xe=Qe("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Ze=Qe("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),$e=Qe("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let t=[];for(let r=0;r<e.length;r+=4)t.push(parseInt(e.substring(r,r+4),16));return t})),et=We("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function tt(e,t){null==t&&(t=1);const r=[],n=r.forEach,i=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function rt(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,s=[0,1];for(let e=1;e<n;e++)s.push(i+=r());let a=r(),o=t;t+=a;let f=0,d=0;function c(){return 0==f&&(d=d<<8|e[t++],f=8),d>>--f&1}const u=Math.pow(2,31),l=u>>>1,h=l>>1,p=u-1;let g=0;for(let e=0;e<31;e++)g=g<<1|c();let A=[],m=0,y=u;for(;;){let e=Math.floor(((g-m+1)*i-1)/y),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<s[n]?r=n:t=n}if(0==t)break;A.push(t);let a=m+Math.floor(y*s[t]/i),o=m+Math.floor(y*s[t+1]/i)-1;for(;0==((a^o)&l);)g=g<<1&p|c(),a=a<<1&p,o=o<<1&p|1;for(;a&~o&h;)g=g&l|g<<1&p>>>1|c(),a=a<<1^l,o=(o^l)<<1|l|1;m=a,y=1+o-a}let v=n-4;return A.map((t=>{switch(t-v){case 3:return v+65792+(e[o++]<<16|e[o++]<<8|e[o++]);case 2:return v+256+(e[o++]<<8|e[o++]);case 1:return v+e[o++];default:return t-1}}))}(e))}function nt(e){return 1&e?~e>>1:e>>1}function it(e,t){let r=Array(e);for(let n=0,i=-1;n<e;n++)r[n]=i+=1+t();return r}function st(e,t){let r=Array(e);for(let n=0,i=0;n<e;n++)r[n]=i+=nt(t());return r}function at(e,t){let r=it(e(),e),n=e(),i=it(n,e),s=function(e,t){let r=Array(e);for(let n=0;n<e;n++)r[n]=1+t();return r}(n,e);for(let e=0;e<n;e++)for(let t=0;t<s[e];t++)r.push(i[e]+t);return t?r.map((e=>t[e])):r}function ot(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;i<t;i++)st(e,r).forEach(((e,t)=>n[t].push(e)));return n}function ft(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return tt(ot(i.length,1+e,t).map(((e,t)=>{const s=e[0],a=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[s+t*r,a.map((e=>e+i))]}))})))}function dt(e,t){return ot(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const ct=rt(e("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")),ut=new Set(at(ct)),lt=new Set(at(ct)),ht=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(ft(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(dt(r,e))}return function(e){const t={};for(let r=0;r<e.length;r++){const n=e[r];t[n[0]]=n[1]}return t}(tt(t))}(ct),pt=function(e){let t=at(e).sort(((e,t)=>e-t));return function r(){let n=[];for(;;){let i=at(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),s=i%3;i=i/3|0;let a=!!(1&i);return i>>=1,{branches:n,valid:s,fe0f:a,save:1==i,check:2==i}}()}(ct),gt=45,At=95;function mt(e){return i(e)}function yt(e){return e.filter((e=>65039!=e))}function vt(e){for(let t of e.split(".")){let e=mt(t);try{for(let t=e.lastIndexOf(At)-1;t>=0;t--)if(e[t]!==At)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===gt&&e[3]===gt)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function bt(e){return vt(function(e,t){let r=mt(e).reverse(),n=[];for(;r.length;){let e=wt(r);if(e){n.push(...t(e));continue}let i=r.pop();if(ut.has(i)){n.push(i);continue}if(lt.has(i))continue;let s=ht[i];if(!s)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...s)}return vt((i=String.fromCodePoint(...n),i.normalize("NFC")));var i}(e,yt))}function wt(e,t){var r;let n,i,s=pt,a=[],o=e.length;for(t&&(t.length=0);o;){let f=e[--o];if(s=null===(r=s.branches.find((e=>e.set.has(f))))||void 0===r?void 0:r.node,!s)break;if(s.save)i=f;else if(s.check&&f===i)break;a.push(f),s.fe0f&&(a.push(65039),o>0&&65039==e[o-1]&&o--),s.valid&&(n=a.slice(),2==s.valid&&n.splice(1,1),t&&t.push(...e.slice(o).reverse()),e.length=o)}return n}const St=new o(se),Et=new Uint8Array(32);function Ct(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function It(e){const t=r(bt(e)),n=[];if(0===e.length)return n;let i=0;for(let e=0;e<t.length;e++){46===t[e]&&(n.push(Ct(t.slice(i,e))),i=e+1)}if(i>=t.length)throw new Error("invalid ENS name; empty component");return n.push(Ct(t.slice(i))),n}Et.fill(0);const Tt="Ethereum Signed Message:\n";function Bt(e){return"string"==typeof e&&(e=r(e)),f(j([r(Tt),r(String(e.length)),e]))}class Mt{constructor(e){oe(this,"alphabet",e),oe(this,"base",e.length),oe(this,"_alphabetMap",{}),oe(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=Q(e);if(0===t.length)return"";let r=[0];for(let e=0;e<t.length;++e){let n=t[e];for(let e=0;e<r.length;++e)n+=r[e]<<8,r[e]=n%this.base,n=n/this.base|0;for(;n>0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e<t.length-1;++e)n+=this._leader;for(let e=r.length-1;e>=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let n=this._alphabetMap[e[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let i=n;for(let e=0;e<t.length;++e)i+=t[e]*this.base,t[e]=255&i,i>>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return Q(new Uint8Array(t.reverse()))}}new Mt("abcdefghijklmnopqrstuvwxyz234567");const Pt=new Mt("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var Dt;!function(e){e.sha256="sha256",e.sha512="sha512"}(Dt||(Dt={}));const Rt=new o("sha2/5.7.0");function xt(e){return"0x"+d.ripemd160().update(Q(e)).digest("hex")}function _t(e){return"0x"+d.sha256().update(Q(e)).digest("hex")}function Ot(e,t,r){return Dt[e]||Rt.throwError("unsupported algorithm "+e,o.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+d.hmac(d[e],Q(t)).update(Q(r)).digest("hex")}function Nt(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var kt=Ft;function Ft(e,t){if(!e)throw new Error(t||"Assertion failed")}Ft.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Lt=Nt((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),s=i>>8,a=255&i;s?r.push(s,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),Ht=Nt((function(e,t){var r=t;r.assert=kt,r.toArray=Lt.toArray,r.zero2=Lt.zero2,r.toHex=Lt.toHex,r.encode=Lt.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,s=e.clone(),a=0;a<n.length;a++){var o,f=s.andln(i-1);s.isOdd()?(o=f>(i>>1)-1?(i>>1)-f:f,s.isubn(o)):o=0,n[a]=o,s.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,s=0;e.cmpn(-i)>0||t.cmpn(-s)>0;){var a,o,f=e.andln(3)+i&3,d=t.andln(3)+s&3;3===f&&(f=-1),3===d&&(d=-1),a=0==(1&f)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==d?f:-f,r[0].push(a),o=0==(1&d)?0:3!==(n=t.andln(7)+s&7)&&5!==n||2!==f?d:-d,r[1].push(o),2*i===a+1&&(i=1-i),2*s===o+1&&(s=1-s),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new c(e,"hex","le")}})),qt=Ht.getNAF,Gt=Ht.getJSF,Ut=Ht.assert;function Kt(e,t){this.type=e,this.p=new c(t.p,16),this.red=t.prime?c.red(t.prime):c.mont(this.p),this.zero=new c(0).toRed(this.red),this.one=new c(1).toRed(this.red),this.two=new c(2).toRed(this.red),this.n=t.n&&new c(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var jt=Kt;function Qt(e,t){this.curve=e,this.type=t,this.precomputed=null}Kt.prototype.point=function(){throw new Error("Not implemented")},Kt.prototype.validate=function(){throw new Error("Not implemented")},Kt.prototype._fixedNafMul=function(e,t){Ut(e.precomputed);var r=e._getDoubles(),n=qt(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,a,o=[];for(s=0;s<n.length;s+=r.step){a=0;for(var f=s+r.step-1;f>=s;f--)a=(a<<1)+n[f];o.push(a)}for(var d=this.jpoint(null,null,null),c=this.jpoint(null,null,null),u=i;u>0;u--){for(s=0;s<o.length;s++)(a=o[s])===u?c=c.mixedAdd(r.points[s]):a===-u&&(c=c.mixedAdd(r.points[s].neg()));d=d.add(c)}return d.toP()},Kt.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=qt(t,r,this._bitLength),a=this.jpoint(null,null,null),o=s.length-1;o>=0;o--){for(var f=0;o>=0&&0===s[o];o--)f++;if(o>=0&&f++,a=a.dblp(f),o<0)break;var d=s[o];Ut(0!==d),a="affine"===e.type?d>0?a.mixedAdd(i[d-1>>1]):a.mixedAdd(i[-d-1>>1].neg()):d>0?a.add(i[d-1>>1]):a.add(i[-d-1>>1].neg())}return"affine"===e.type?a.toP():a},Kt.prototype._wnafMulAdd=function(e,t,r,n,i){var s,a,o,f=this._wnafT1,d=this._wnafT2,c=this._wnafT3,u=0;for(s=0;s<n;s++){var l=(o=t[s])._getNAFPoints(e);f[s]=l.wnd,d[s]=l.points}for(s=n-1;s>=1;s-=2){var h=s-1,p=s;if(1===f[h]&&1===f[p]){var g=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(g[1]=t[h].add(t[p]),g[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(g[1]=t[h].toJ().mixedAdd(t[p]),g[2]=t[h].add(t[p].neg())):(g[1]=t[h].toJ().mixedAdd(t[p]),g[2]=t[h].toJ().mixedAdd(t[p].neg()));var A=[-3,-1,-5,-7,0,7,5,1,3],m=Gt(r[h],r[p]);for(u=Math.max(m[0].length,u),c[h]=new Array(u),c[p]=new Array(u),a=0;a<u;a++){var y=0|m[0][a],v=0|m[1][a];c[h][a]=A[3*(y+1)+(v+1)],c[p][a]=0,d[h]=g}}else c[h]=qt(r[h],f[h],this._bitLength),c[p]=qt(r[p],f[p],this._bitLength),u=Math.max(c[h].length,u),u=Math.max(c[p].length,u)}var b=this.jpoint(null,null,null),w=this._wnafT4;for(s=u;s>=0;s--){for(var S=0;s>=0;){var E=!0;for(a=0;a<n;a++)w[a]=0|c[a][s],0!==w[a]&&(E=!1);if(!E)break;S++,s--}if(s>=0&&S++,b=b.dblp(S),s<0)break;for(a=0;a<n;a++){var C=w[a];0!==C&&(C>0?o=d[a][C-1>>1]:C<0&&(o=d[a][-C-1>>1].neg()),b="affine"===o.type?b.mixedAdd(o):b.add(o))}}for(s=0;s<n;s++)d[s]=null;return i?b:b.toP()},Kt.BasePoint=Qt,Qt.prototype.eq=function(){throw new Error("Not implemented")},Qt.prototype.validate=function(){return this.curve.validate(this)},Kt.prototype.decodePoint=function(e,t){e=Ht.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?Ut(e[e.length-1]%2==0):7===e[0]&&Ut(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},Qt.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Qt.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},Qt.prototype.encode=function(e,t){return Ht.encode(this._encode(t),e)},Qt.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Qt.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Qt.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var s=0;s<e;s++)n=n.dbl();r.push(n)}return{step:e,points:r}},Qt.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},Qt.prototype._getBeta=function(){return null},Qt.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var Wt=Nt((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),zt=Ht.assert;function Jt(e){jt.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Wt(Jt,jt);var Yt=Jt;function Vt(e,t,r,n){jt.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Xt(e,t,r,n){jt.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(r,16),this.z=new c(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Jt.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new c(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],zt(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new c(e.a,16),b:new c(e.b,16)}})):this._getEndoBasis(r)}}},Jt.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),r=new c(2).toRed(t).redInvm(),n=r.redNeg(),i=new c(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},Jt.prototype._getEndoBasis=function(e){for(var t,r,n,i,s,a,o,f,d,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new c(1),g=new c(0),A=new c(0),m=new c(1),y=0;0!==l.cmpn(0);){var v=h.div(l);f=h.sub(v.mul(l)),d=A.sub(v.mul(p));var b=m.sub(v.mul(g));if(!n&&f.cmp(u)<0)t=o.neg(),r=p,n=f.neg(),i=d;else if(n&&2==++y)break;o=f,h=l,l=f,A=p,p=d,m=g,g=b}s=f.neg(),a=d;var w=n.sqr().add(i.sqr());return s.sqr().add(a.sqr()).cmp(w)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:i},{a:s,b:a}]},Jt.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),s=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),o=s.mul(n.a),f=i.mul(r.b),d=s.mul(n.b);return{k1:e.sub(a).sub(o),k2:f.add(d).neg()}},Jt.prototype.pointFromX=function(e,t){(e=new c(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},Jt.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},Jt.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var a=this._endoSplit(t[s]),o=e[s],f=o._getBeta();a.k1.negative&&(a.k1.ineg(),o=o.neg(!0)),a.k2.negative&&(a.k2.ineg(),f=f.neg(!0)),n[2*s]=o,n[2*s+1]=f,i[2*s]=a.k1,i[2*s+1]=a.k2}for(var d=this._wnafMulAdd(1,n,i,2*s,r),c=0;c<2*s;c++)n[c]=null,i[c]=null;return d},Wt(Vt,jt.BasePoint),Jt.prototype.point=function(e,t,r){return new Vt(this,e,t,r)},Jt.prototype.pointFromJSON=function(e,t){return Vt.fromJSON(this,e,t)},Vt.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},Vt.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Vt.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var s=t[2];return n.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[n].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[n].concat(s.naf.points.map(i))}},n},Vt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Vt.prototype.isInfinity=function(){return this.inf},Vt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},Vt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),s=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},Vt.prototype.getX=function(){return this.x.fromRed()},Vt.prototype.getY=function(){return this.y.fromRed()},Vt.prototype.mul=function(e){return e=new c(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Vt.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Vt.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Vt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Vt.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},Vt.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Wt(Xt,jt.BasePoint),Jt.prototype.jpoint=function(e,t,r){return new Xt(this,e,t,r)},Xt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},Xt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Xt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),s=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),o=n.redSub(i),f=s.redSub(a);if(0===o.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=o.redSqr(),c=d.redMul(o),u=n.redMul(d),l=f.redSqr().redIAdd(c).redISub(u).redISub(u),h=f.redMul(u.redISub(l)).redISub(s.redMul(c)),p=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(l,h,p)},Xt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),a=r.redSub(n),o=i.redSub(s);if(0===a.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),d=f.redMul(a),c=r.redMul(f),u=o.redSqr().redIAdd(d).redISub(c).redISub(c),l=o.redMul(c.redISub(u)).redISub(i.redMul(d)),h=this.z.redMul(a);return this.curve.jpoint(u,l,h)},Xt.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,s=this.x,a=this.y,o=this.z,f=o.redSqr().redSqr(),d=a.redAdd(a);for(t=0;t<e;t++){var c=s.redSqr(),u=d.redSqr(),l=u.redSqr(),h=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(f)),p=s.redMul(u),g=h.redSqr().redISub(p.redAdd(p)),A=p.redISub(g),m=h.redMul(A);m=m.redIAdd(m).redISub(l);var y=d.redMul(o);t+1<e&&(f=f.redMul(l)),s=g,o=y,d=m}return this.curve.jpoint(s,d.redMul(i),o)},Xt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Xt.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(s);a=a.redIAdd(a);var o=n.redAdd(n).redIAdd(n),f=o.redSqr().redISub(a).redISub(a),d=s.redIAdd(s);d=(d=d.redIAdd(d)).redIAdd(d),e=f,t=o.redMul(a.redISub(f)).redISub(d),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),u=this.y.redSqr(),l=u.redSqr(),h=this.x.redAdd(u).redSqr().redISub(c).redISub(l);h=h.redIAdd(h);var p=c.redAdd(c).redIAdd(c),g=p.redSqr(),A=l.redIAdd(l);A=(A=A.redIAdd(A)).redIAdd(A),e=g.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(A),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},Xt.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(s);a=a.redIAdd(a);var o=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),f=o.redSqr().redISub(a).redISub(a);e=f;var d=s.redIAdd(s);d=(d=d.redIAdd(d)).redIAdd(d),t=o.redMul(a.redISub(f)).redISub(d),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),u=this.y.redSqr(),l=this.x.redMul(u),h=this.x.redSub(c).redMul(this.x.redAdd(c));h=h.redAdd(h).redIAdd(h);var p=l.redIAdd(l),g=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(u).redISub(c);var A=u.redSqr();A=(A=(A=A.redIAdd(A)).redIAdd(A)).redIAdd(A),t=h.redMul(p.redISub(e)).redISub(A)}return this.curve.jpoint(e,t,r)},Xt.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),s=t.redSqr(),a=r.redSqr(),o=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),f=t.redAdd(t),d=(f=f.redIAdd(f)).redMul(a),c=o.redSqr().redISub(d.redAdd(d)),u=d.redISub(c),l=a.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=o.redMul(u).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(c,h,p)},Xt.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),o=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(s)).redSqr(),f=n.redIAdd(n);f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var d=i.redIAdd(a).redSqr().redISub(s).redISub(o).redISub(f),c=t.redMul(d);c=(c=c.redIAdd(c)).redIAdd(c);var u=this.x.redMul(o).redISub(c);u=(u=u.redIAdd(u)).redIAdd(u);var l=this.y.redMul(d.redMul(f.redISub(d)).redISub(a.redMul(o)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=this.z.redAdd(a).redSqr().redISub(r).redISub(o);return this.curve.jpoint(u,l,h)},Xt.prototype.mul=function(e,t){return e=new c(e,t),this.curve._wnafMul(this,e)},Xt.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},Xt.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},Xt.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Xt.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Zt=Nt((function(e,t){var r=t;r.base=jt,r.short=Yt,r.mont=null,r.edwards=null})),$t=Nt((function(e,t){var r,n=t,i=Ht.assert;function s(e){"short"===e.type?this.curve=new Zt.short(e):"edwards"===e.type?this.curve=new Zt.edwards(e):this.curve=new Zt.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new s(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=s,a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:d.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:d.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:d.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:d.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:d.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:d.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:d.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:d.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function er(e){if(!(this instanceof er))return new er(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Lt.toArray(e.entropy,e.entropyEnc||"hex"),r=Lt.toArray(e.nonce,e.nonceEnc||"hex"),n=Lt.toArray(e.pers,e.persEnc||"hex");kt(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var tr=er;er.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},er.prototype._hmac=function(){return new d.hmac(this.hash,this.K)},er.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},er.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=Lt.toArray(e,t),r=Lt.toArray(r,n),kt(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},er.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=Lt.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var s=i.slice(0,e);return this._update(r),this._reseed++,Lt.encode(s,t)};var rr=Ht.assert;function nr(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var ir=nr;nr.fromPublic=function(e,t,r){return t instanceof nr?t:new nr(e,{pub:t,pubEnc:r})},nr.fromPrivate=function(e,t,r){return t instanceof nr?t:new nr(e,{priv:t,privEnc:r})},nr.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},nr.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},nr.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},nr.prototype._importPrivate=function(e,t){this.priv=new c(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},nr.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?rr(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||rr(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},nr.prototype.derive=function(e){return e.validate()||rr(e.validate(),"public point not validated"),e.mul(this.priv).getX()},nr.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},nr.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},nr.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var sr=Ht.assert;function ar(e,t){if(e instanceof ar)return e;this._importDER(e,t)||(sr(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var or=ar;function fr(){this.place=0}function dr(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,s=0,a=t.place;s<n;s++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function cr(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function ur(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}ar.prototype._importDER=function(e,t){e=Ht.toArray(e,t);var r=new fr;if(48!==e[r.place++])return!1;var n=dr(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=dr(e,r);if(!1===i)return!1;var s=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=dr(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var o=e.slice(r.place,a+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}return this.r=new c(s),this.s=new c(o),this.recoveryParam=null,!0},ar.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=cr(t),r=cr(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];ur(n,t.length),(n=n.concat(t)).push(2),ur(n,r.length);var i=n.concat(r),s=[48];return ur(s,i.length),s=s.concat(i),Ht.encode(s,e)};var lr=function(){throw new Error("unsupported")},hr=Ht.assert;function pr(e){if(!(this instanceof pr))return new pr(e);"string"==typeof e&&(hr(Object.prototype.hasOwnProperty.call($t,e),"Unknown curve "+e),e=$t[e]),e instanceof $t.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var gr=pr;pr.prototype.keyPair=function(e){return new ir(this,e)},pr.prototype.keyFromPrivate=function(e,t){return ir.fromPrivate(this,e,t)},pr.prototype.keyFromPublic=function(e,t){return ir.fromPublic(this,e,t)},pr.prototype.genKeyPair=function(e){e||(e={});for(var t=new tr({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||lr(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new c(2));;){var i=new c(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},pr.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},pr.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new c(e,16));for(var i=this.n.byteLength(),s=t.getPrivate().toArray("be",i),a=e.toArray("be",i),o=new tr({hash:this.hash,entropy:s,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),f=this.n.sub(new c(1)),d=0;;d++){var u=n.k?n.k(d):new c(o.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(f)>=0)){var l=this.g.mul(u);if(!l.isInfinity()){var h=l.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var g=u.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var A=(l.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return n.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),A^=1),new or({r:p,s:g,recoveryParam:A})}}}}}},pr.prototype.verify=function(e,t,r,n){e=this._truncateToN(new c(e,16)),r=this.keyFromPublic(r,n);var i=(t=new or(t,"hex")).r,s=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,o=s.invm(this.n),f=o.mul(e).umod(this.n),d=o.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),d)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(f,r.getPublic(),d)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},pr.prototype.recoverPubKey=function(e,t,r,n){hr((3&r)===r,"The recovery param is more than two bits"),t=new or(t,n);var i=this.n,s=new c(e),a=t.r,o=t.s,f=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),f):this.curve.pointFromX(a,f);var u=t.r.invm(i),l=i.sub(s).mul(u).umod(i),h=o.mul(u).umod(i);return this.g.mulAdd(l,a,h)},pr.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new or(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch(e){continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Ar=Nt((function(e,t){var r=t;r.version="6.5.4",r.utils=Ht,r.rand=function(){throw new Error("unsupported")},r.curve=Zt,r.curves=$t,r.ec=gr,r.eddsa=null})),mr=Ar.ec;const yr=new o("signing-key/5.7.0");let vr=null;function br(){return vr||(vr=new mr("secp256k1")),vr}class wr{constructor(e){oe(this,"curve","secp256k1"),oe(this,"privateKey",K(e)),32!==W(this.privateKey)&&yr.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=br().keyFromPrivate(Q(this.privateKey));oe(this,"publicKey","0x"+t.getPublic(!1,"hex")),oe(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),oe(this,"_isSigningKey",!0)}_addPoint(e){const t=br().keyFromPublic(Q(this.publicKey)),r=br().keyFromPublic(Q(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=br().keyFromPrivate(Q(this.privateKey)),r=Q(e);32!==r.length&&yr.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return z({recoveryParam:n.recoveryParam,r:J("0x"+n.r.toString(16),32),s:J("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=br().keyFromPrivate(Q(this.privateKey)),r=br().keyFromPublic(Q(Sr(e)));return J("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function Sr(e,t){const r=Q(e);if(32===r.length){const e=new wr(r);return t?"0x"+br().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?K(r):"0x"+br().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+br().keyFromPublic(r).getPublic(!0,"hex"):K(r):yr.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Er=new o("wordlists/5.7.0");class Cr{constructor(e){Er.checkAbstract(new.target,Cr),oe(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return ve(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}let Ir=null;function Tr(e){if(null==Ir&&(Ir="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==Cr.check(e)))throw Ir=null,new Error("BIP39 Wordlist for en (English) FAILED")}const Br=new class extends Cr{constructor(){super("en")}getWord(e){return Tr(this),Ir[e]}getWordIndex(e){return Tr(this),Ir.indexOf(e)}};Cr.register(Br);const Mr={en:Br},Pr=new o("hdnode/5.7.0"),Dr=u.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Rr=r("Bitcoin seed"),xr=2147483648;function _r(e){return(1<<e)-1<<8-e}function Or(e){return J(K(e),32)}function Nr(e){return Pt.encode(j([e,Y(_t(_t(e)),0,4)]))}function kr(e){if(null==e)return Mr.en;if("string"==typeof e){const t=Mr[e];return null==t&&Pr.throwArgumentError("unknown locale","wordlist",e),t}return e}const Fr={},Lr="m/44'/60'/0'/0/0";class Hr{constructor(e,t,r,n,i,s,a,o){if(e!==Fr)throw new Error("HDNode constructor cannot be called directly");if(t){const e=new wr(t);oe(this,"privateKey",e.privateKey),oe(this,"publicKey",e.compressedPublicKey)}else oe(this,"privateKey",null),oe(this,"publicKey",K(r));oe(this,"parentFingerprint",n),oe(this,"fingerprint",Y(xt(_t(this.publicKey)),0,4)),oe(this,"address",he(this.publicKey)),oe(this,"chainCode",i),oe(this,"index",s),oe(this,"depth",a),null==o?(oe(this,"mnemonic",null),oe(this,"path",null)):"string"==typeof o?(oe(this,"mnemonic",null),oe(this,"path",o)):(oe(this,"mnemonic",o),oe(this,"path",o.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return Nr(j([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",K(this.depth),this.parentFingerprint,J(K(this.index),4),this.chainCode,null!=this.privateKey?j(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Hr(Fr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(2147483647&e));const r=new Uint8Array(37);if(e&xr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(Q(this.privateKey),1),t&&(t+="'")}else r.set(Q(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=Q(Ot(Dt.sha512,this.chainCode,r)),i=n.slice(0,32),s=n.slice(32);let a=null,o=null;if(this.privateKey)a=Or(u.from(i).add(this.privateKey).mod(Dr));else{o=new wr(K(i))._addPoint(this.publicKey)}let f=t;const d=this.mnemonic;return d&&(f=Object.freeze({phrase:d.phrase,path:t,locale:d.locale||"en"})),new Hr(Fr,a,o,this.fingerprint,Or(s),e,this.depth+1,f)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let e=0;e<t.length;e++){const n=t[e];if(n.match(/^[0-9]+'$/)){const e=parseInt(n.substring(0,n.length-1));if(e>=xr)throw new Error("invalid path index - "+n);r=r._derive(xr+e)}else{if(!n.match(/^[0-9]+$/))throw new Error("invalid path component - "+n);{const e=parseInt(n);if(e>=xr)throw new Error("invalid path index - "+n);r=r._derive(e)}}}return r}static _fromSeed(e,t){const r=Q(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=Q(Ot(Dt.sha512,Rr,r));return new Hr(Fr,Or(n.slice(0,32)),null,"0x00000000",Or(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=Ur(Gr(e,r=kr(r)),r),Hr._fromSeed(qr(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return Hr._fromSeed(e,null)}static fromExtendedKey(e){const t=Pt.decode(e);82===t.length&&Nr(t.slice(0,78))===e||Pr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],n=K(t.slice(5,9)),i=parseInt(K(t.slice(9,13)).substring(2),16),s=K(t.slice(13,45)),a=t.slice(45,78);switch(K(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Hr(Fr,null,K(a),n,s,i,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==a[0])break;return new Hr(Fr,K(a.slice(1)),null,n,s,i,r,null)}return Pr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function qr(e,t){t||(t="");const n=r("mnemonic"+t,s.NFKD);return function(e,t,r,n,i){let s;e=Q(e),t=Q(t);let a=1;const o=new Uint8Array(n),f=new Uint8Array(t.length+4);let d,c;f.set(t);for(let u=1;u<=a;u++){f[t.length]=u>>24&255,f[t.length+1]=u>>16&255,f[t.length+2]=u>>8&255,f[t.length+3]=255&u;let l=Q(Ot(i,e,f));s||(s=l.length,c=new Uint8Array(s),a=Math.ceil(n/s),d=n-(a-1)*s),c.set(l);for(let t=1;t<r;t++){l=Q(Ot(i,e,l));for(let e=0;e<s;e++)c[e]^=l[e]}const h=(u-1)*s,p=u===a?d:s;o.set(Q(c).slice(0,p),h)}return K(o)}(r(e,s.NFKD),n,2048,64,"sha512")}function Gr(e,t){t=kr(t),Pr.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=Q(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let e=0;e<r.length;e++){let s=t.getWordIndex(r[e].normalize("NFKD"));if(-1===s)throw new Error("invalid mnemonic");for(let e=0;e<11;e++)s&1<<10-e&&(n[i>>3]|=1<<7-i%8),i++}const s=32*r.length/3,a=_r(r.length/3);if((Q(_t(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return K(n.slice(0,s/8))}function Ur(e,t){if(t=kr(t),(e=Q(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let t=0;t<e.length;t++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const i=e.length/4,s=Q(_t(e))[0]&_r(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,t.join(r.map((e=>t.getWord(e))))}const Kr=new o("random/5.7.0");const jr=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();let Qr=jr.crypto||jr.msCrypto;function Wr(e){(e<=0||e>1024||e%1||e!=e)&&Kr.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return Qr.getRandomValues(t),Q(t)}Qr&&Qr.getRandomValues||(Kr.warn("WARNING: Missing strong random number source"),Qr={getRandomValues:function(e){return Kr.throwError("no secure random source avaialble",o.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var zr=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function a(e){try{f(n.next(e))}catch(e){s(e)}}function o(e){try{f(n.throw(e))}catch(e){s(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}f((n=n.apply(e,t||[])).next())}))};const Jr=new o("wallet/5.7.0");class Yr extends N{constructor(e,t){if(super(),null!=(r=e)&&X(r.privateKey,32)&&null!=r.address){const t=new wr(e.privateKey);if(oe(this,"_signingKey",(()=>t)),oe(this,"address",he(this.publicKey)),this.address!==F(e.address)&&Jr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;oe(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||Lr,locale:t.locale||"en"})));const r=this.mnemonic,n=Hr.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);he(n.privateKey)!==this.address&&Jr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else oe(this,"_mnemonic",(()=>null))}else{if(wr.isSigningKey(e))"secp256k1"!==e.curve&&Jr.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),oe(this,"_signingKey",(()=>e));else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new wr(e);oe(this,"_signingKey",(()=>t))}oe(this,"_mnemonic",(()=>null)),oe(this,"address",he(this.publicKey))}var r;t&&!U.isProvider(t)&&Jr.throwArgumentError("invalid provider","provider",t),oe(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Yr(this,e)}signTransaction(e){return fe(e).then((t=>{null!=t.from&&(F(t.from)!==this.address&&Jr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest(f(pe(t)));return pe(t,r)}))}signMessage(e){return zr(this,void 0,void 0,(function*(){return V(this._signingKey().signDigest(Bt(e)))}))}_signTypedData(e,t,r){return zr(this,void 0,void 0,(function*(){const n=yield ae.resolveNames(e,t,r,(e=>(null==this.provider&&Jr.throwError("cannot resolve ENS names without a provider",o.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return V(this._signingKey().signDigest(ae.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback");return t||(t={}),be(this,e,t,r)}static createRandom(e){let t=Wr(16);e||(e={}),e.extraEntropy&&(t=Q(Y(f(j([t,e.extraEntropy])),0,16)));const r=Ur(t,e.locale);return Yr.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return we(e,t,r).then((e=>new Yr(e)))}static fromEncryptedJsonSync(e,t){return new Yr(Se(e,t))}static fromMnemonic(e,t,r){return t||(t=Lr),new Yr(Hr.fromMnemonic(e,null,r).derivePath(t))}}var Vr={},Xr={},Zr={},$r={},en={},tn={name:"@safe-global/safe-apps-sdk",version:"7.10.1",description:"SDK developed to integrate third-party apps with Safe app.",main:"dist/src/index.js",typings:"dist/src/index.d.ts",_files:["dist/**/*","src/**/*","CHANGELOG.md","README.md"],keywords:["Safe","sdk","apps"],scripts:{test:"jest","format-dist":"sed -i '' 's/\"files\":/\"_files\":/' dist/package.json",build:"yarn rimraf dist && tsc && yarn format-dist"},author:"Safe (https://safe.global)",license:"MIT",dependencies:{"@safe-global/safe-gateway-typescript-sdk":"^3.5.3",ethers:"^5.7.2"},devDependencies:{rimraf:"^3.0.2"},repository:{type:"git",url:"git+https://github.com/safe-global/safe-apps-sdk.git"},bugs:{url:"https://github.com/safe-global/safe-apps-sdk/issues"},homepage:"https://github.com/safe-global/safe-apps-sdk#readme",publishConfig:{access:"public"}},rn=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(en,"__esModule",{value:!0}),en.getSDKVersion=void 0;const nn=rn(tn);en.getSDKVersion=()=>nn.default.version.split("-")[0];var sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.generateRequestId=void 0;const an=e=>e.toString(16).padStart(2,"0");sn.generateRequestId=()=>"undefined"!=typeof window?(e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,an).join("")})(10):(new Date).getTime().toString(36),Object.defineProperty($r,"__esModule",{value:!0}),$r.MessageFormatter=void 0;const on=en,fn=sn;class dn{}$r.MessageFormatter=dn,dn.makeRequest=(e,t)=>({id:(0,fn.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,on.getSDKVersion)()}}),dn.makeResponse=(e,t,r)=>({id:e,success:!0,version:r,data:t}),dn.makeErrorResponse=(e,t,r)=>({id:e,success:!1,error:t,version:r});var cn,un,ln={};cn=ln,Object.defineProperty(cn,"__esModule",{value:!0}),cn.RestrictedMethods=cn.Methods=void 0,(un=cn.Methods||(cn.Methods={})).sendTransactions="sendTransactions",un.rpcCall="rpcCall",un.getChainInfo="getChainInfo",un.getSafeInfo="getSafeInfo",un.getTxBySafeTxHash="getTxBySafeTxHash",un.getSafeBalances="getSafeBalances",un.signMessage="signMessage",un.signTypedMessage="signTypedMessage",un.getEnvironmentInfo="getEnvironmentInfo",un.getOffChainSignature="getOffChainSignature",un.requestAddressBook="requestAddressBook",un.wallet_getPermissions="wallet_getPermissions",un.wallet_requestPermissions="wallet_requestPermissions",(cn.RestrictedMethods||(cn.RestrictedMethods={})).requestAddressBook="requestAddressBook",function(e){var t=l&&l.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=l&&l.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0});const n=$r;e.default=class{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer="undefined"==typeof window,this.isValidMessage=({origin:e,data:t,source:r})=>{const n=!t,i=!this.isServer&&r===window.parent,s=(void 0!==t.version&&parseInt(t.version.split(".")[0]))>=1;let a=!0;return Array.isArray(this.allowedOrigins)&&(a=void 0!==this.allowedOrigins.find((t=>t.test(e)))),!n&&i&&s&&a},this.logIncomingMessage=e=>{console.info(`Safe Apps SDK v1: A message was received from origin ${e.origin}. `,e.data)},this.onParentMessage=e=>{this.isValidMessage(e)&&(this.debugMode&&this.logIncomingMessage(e),this.handleIncomingMessage(e.data))},this.handleIncomingMessage=e=>{const{id:t}=e,r=this.callbacks.get(t);r&&(r(e),this.callbacks.delete(t))},this.send=(e,t)=>{const r=n.MessageFormatter.makeRequest(e,t);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(r,"*"),new Promise(((e,t)=>{this.callbacks.set(r.id,(r=>{r.success?e(r):t(new Error(r.error))}))}))},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}},r(ln,e)}(Zr);var hn={},pn={},gn={};Object.defineProperty(gn,"__esModule",{value:!0}),gn.isObjectEIP712TypedData=void 0;gn.isObjectEIP712TypedData=e=>"object"==typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e;var An={};Object.defineProperty(An,"__esModule",{value:!0});var mn={},yn={},vn={},bn={},wn=l&&l.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function a(e){try{f(n.next(e))}catch(e){s(e)}}function o(e){try{f(n.throw(e))}catch(e){s(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}f((n=n.apply(e,t||[])).next())}))},Sn=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bn,"__esModule",{value:!0}),bn.fetchData=bn.stringifyQuery=bn.insertParams=void 0;const En=Sn(h.exports);bn.insertParams=function(e,t){return t?Object.keys(t).reduce(((e,r)=>function(e,t,r){return e.replace(new RegExp(`\\{${t}\\}`,"g"),r)}(e,r,String(t[r]))),e):e},bn.stringifyQuery=function(e){if(!e)return"";const t=new URLSearchParams;Object.keys(e).forEach((r=>{null!=e[r]&&t.append(r,String(e[r]))}));const r=t.toString();return r?`?${r}`:""},bn.fetchData=function(e,t){return wn(this,void 0,void 0,(function*(){let r;null!=t&&(r={method:"POST",body:"string"==typeof t?t:JSON.stringify(t),headers:{"Content-Type":"application/json"}});const n=yield(0,En.default)(e,r);let i;try{i=yield n.json()}catch(e){if(n.headers&&"0"!==n.headers.get("content-length"))throw new Error(`Invalid response content: ${n.statusText}`)}if(!n.ok){const e="object"==typeof(s=i)&&null!==s&&"code"in s&&"message"in s?`${i.code}: ${i.message}`:n.statusText;throw new Error(e)}var s;return i}))},Object.defineProperty(vn,"__esModule",{value:!0}),vn.getEndpoint=vn.postEndpoint=void 0;const Cn=bn;function In(e,t,r,n){return`${e}${(0,Cn.insertParams)(t,r)}${(0,Cn.stringifyQuery)(n)}`}vn.postEndpoint=function(e,t,r){const n=In(e,t,null==r?void 0:r.path,null==r?void 0:r.query);return(0,Cn.fetchData)(n,null==r?void 0:r.body)},vn.getEndpoint=function(e,t,r,n){if(n)return(0,Cn.fetchData)(n);const i=In(e,t,null==r?void 0:r.path,null==r?void 0:r.query);return(0,Cn.fetchData)(i)};var Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.DEFAULT_BASE_URL=void 0,Tn.DEFAULT_BASE_URL="https://safe-client.safe.global";var Bn={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationVersionState=void 0,(t=e.ImplementationVersionState||(e.ImplementationVersionState={})).UP_TO_DATE="UP_TO_DATE",t.OUTDATED="OUTDATED",t.UNKNOWN="UNKNOWN"}(Bn);var Mn={};!function(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppSocialPlatforms=e.SafeAppFeatures=e.SafeAppAccessPolicyTypes=void 0,(t=e.SafeAppAccessPolicyTypes||(e.SafeAppAccessPolicyTypes={})).NoRestrictions="NO_RESTRICTIONS",t.DomainAllowlist="DOMAIN_ALLOWLIST",(e.SafeAppFeatures||(e.SafeAppFeatures={})).BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS",(r=e.SafeAppSocialPlatforms||(e.SafeAppSocialPlatforms={})).TWITTER="TWITTER",r.GITHUB="GITHUB",r.DISCORD="DISCORD"}(Mn);var Pn={};!function(e){var t,r,n,i,s,a,o,f,d,c;Object.defineProperty(e,"__esModule",{value:!0}),e.LabelValue=e.DetailedExecutionInfoType=e.TransactionListItemType=e.ConflictType=e.TransactionInfoType=e.SettingsInfoType=e.TransactionTokenType=e.TransferDirection=e.TransactionStatus=e.Operation=void 0,(t=e.Operation||(e.Operation={}))[t.CALL=0]="CALL",t[t.DELEGATE=1]="DELEGATE",(r=e.TransactionStatus||(e.TransactionStatus={})).AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",r.AWAITING_EXECUTION="AWAITING_EXECUTION",r.CANCELLED="CANCELLED",r.FAILED="FAILED",r.SUCCESS="SUCCESS",(n=e.TransferDirection||(e.TransferDirection={})).INCOMING="INCOMING",n.OUTGOING="OUTGOING",n.UNKNOWN="UNKNOWN",(i=e.TransactionTokenType||(e.TransactionTokenType={})).ERC20="ERC20",i.ERC721="ERC721",i.NATIVE_COIN="NATIVE_COIN",(s=e.SettingsInfoType||(e.SettingsInfoType={})).SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",s.ADD_OWNER="ADD_OWNER",s.REMOVE_OWNER="REMOVE_OWNER",s.SWAP_OWNER="SWAP_OWNER",s.CHANGE_THRESHOLD="CHANGE_THRESHOLD",s.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",s.ENABLE_MODULE="ENABLE_MODULE",s.DISABLE_MODULE="DISABLE_MODULE",s.SET_GUARD="SET_GUARD",s.DELETE_GUARD="DELETE_GUARD",(a=e.TransactionInfoType||(e.TransactionInfoType={})).TRANSFER="Transfer",a.SETTINGS_CHANGE="SettingsChange",a.CUSTOM="Custom",a.CREATION="Creation",(o=e.ConflictType||(e.ConflictType={})).NONE="None",o.HAS_NEXT="HasNext",o.END="End",(f=e.TransactionListItemType||(e.TransactionListItemType={})).TRANSACTION="TRANSACTION",f.LABEL="LABEL",f.CONFLICT_HEADER="CONFLICT_HEADER",f.DATE_LABEL="DATE_LABEL",(d=e.DetailedExecutionInfoType||(e.DetailedExecutionInfoType={})).MULTISIG="MULTISIG",d.MODULE="MODULE",(c=e.LabelValue||(e.LabelValue={})).Queued="Queued",c.Next="Next"}(Pn);var Dn={};!function(e){var t,r,n;Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURES=e.GAS_PRICE_TYPE=e.RPC_AUTHENTICATION=void 0,(t=e.RPC_AUTHENTICATION||(e.RPC_AUTHENTICATION={})).API_KEY_PATH="API_KEY_PATH",t.NO_AUTHENTICATION="NO_AUTHENTICATION",t.UNKNOWN="UNKNOWN",(r=e.GAS_PRICE_TYPE||(e.GAS_PRICE_TYPE={})).ORACLE="ORACLE",r.FIXED="FIXED",r.UNKNOWN="UNKNOWN",(n=e.FEATURES||(e.FEATURES={})).ERC721="ERC721",n.SAFE_APPS="SAFE_APPS",n.CONTRACT_INTERACTION="CONTRACT_INTERACTION",n.DOMAIN_LOOKUP="DOMAIN_LOOKUP",n.SPENDING_LIMIT="SPENDING_LIMIT",n.EIP1559="EIP1559",n.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",n.TX_SIMULATION="TX_SIMULATION",n.EIP1271="EIP1271"}(Dn);var Rn={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TokenType=void 0,(t=e.TokenType||(e.TokenType={})).ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_TOKEN="NATIVE_TOKEN"}(Rn);var xn={};Object.defineProperty(xn,"__esModule",{value:!0});var _n={};Object.defineProperty(_n,"__esModule",{value:!0});var On={};!function(e){var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.SafeMessageStatus=e.SafeMessageListItemType=void 0,(t=e.SafeMessageListItemType||(e.SafeMessageListItemType={})).DATE_LABEL="DATE_LABEL",t.MESSAGE="MESSAGE",(r=e.SafeMessageStatus||(e.SafeMessageStatus={})).NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",r.CONFIRMED="CONFIRMED"}(On),function(e){var t=l&&l.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=l&&l.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.confirmSafeMessage=e.proposeSafeMessage=e.getSafeMessage=e.getSafeMessages=e.getDecodedData=e.getMasterCopies=e.getSafeApps=e.getChainConfig=e.getChainsConfig=e.proposeTransaction=e.postSafeGasEstimation=e.getTransactionDetails=e.getTransactionQueue=e.getTransactionHistory=e.getCollectiblesPage=e.getCollectibles=e.getOwnedSafes=e.getFiatCurrencies=e.getBalances=e.getMultisigTransactions=e.getModuleTransactions=e.getIncomingTransfers=e.getSafeInfo=e.setBaseUrl=void 0;const n=vn,i=Tn;r(Bn,e),r(Mn,e),r(Pn,e),r(Dn,e),r(Rn,e),r(xn,e),r(_n,e),r(On,e);let s=i.DEFAULT_BASE_URL;e.setBaseUrl=e=>{s=e},e.getSafeInfo=function(e,t){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:e,address:t}})},e.getIncomingTransfers=function(e,t,r,i){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:e,address:t},query:r},i)},e.getModuleTransactions=function(e,t,r,i){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:e,address:t},query:r},i)},e.getMultisigTransactions=function(e,t,r,i){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:e,address:t},query:r},i)},e.getBalances=function(e,t,r="usd",i={}){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:e,address:t,currency:r},query:i})},e.getFiatCurrencies=function(){return(0,n.getEndpoint)(s,"/v1/balances/supported-fiat-codes")},e.getOwnedSafes=function(e,t){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:e,address:t}})},e.getCollectibles=function(e,t,r={}){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:r})},e.getCollectiblesPage=function(e,t,r={},i){return(0,n.getEndpoint)(s,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:r},i)},e.getTransactionHistory=function(e,t,r){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:e,safe_address:t},query:{}},r)},e.getTransactionQueue=function(e,t,r,i){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:e,safe_address:t},query:{trusted:i}},r)},e.getTransactionDetails=function(e,t){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:e,transactionId:t}})},e.postSafeGasEstimation=function(e,t,r){return(0,n.postEndpoint)(s,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:e,safe_address:t},body:r})},e.proposeTransaction=function(e,t,r){return(0,n.postEndpoint)(s,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:e,safe_address:t},body:r})},e.getChainsConfig=function(e){return(0,n.getEndpoint)(s,"/v1/chains",{query:e})},e.getChainConfig=function(e){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}",{path:{chainId:e}})},e.getSafeApps=function(e,t={}){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safe-apps",{path:{chainId:e},query:t})},e.getMasterCopies=function(e){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:e}})},e.getDecodedData=function(e,t){return(0,n.postEndpoint)(s,"/v1/chains/{chainId}/data-decoder",{path:{chainId:e},body:{data:t}})},e.getSafeMessages=function(e,t,r){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},query:{}},r)},e.getSafeMessage=function(e,t){return(0,n.getEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:e,message_hash:t}})},e.proposeSafeMessage=function(e,t,r){return(0,n.postEndpoint)(s,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},body:r})},e.confirmSafeMessage=function(e,t,r){return(0,n.postEndpoint)(s,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:e,message_hash:t},body:r})}}(yn),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var t=yn;Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return t.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return t.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return t.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return t.TransferDirection}})}(mn);var Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),function(e){var t=l&&l.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=l&&l.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(gn,e),r(An,e),r(mn,e),r(Nn,e)}(pn),Object.defineProperty(hn,"__esModule",{value:!0}),hn.TXs=void 0;const kn=ln,Fn=pn;hn.TXs=class{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(kn.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const t={message:e};return(await this.communicator.send(kn.Methods.signMessage,t)).data}async signTypedMessage(e){if(!(0,Fn.isObjectEIP712TypedData)(e))throw new Error("Invalid typed data");return(await this.communicator.send(kn.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:t}){if(!e||!e.length)throw new Error("No transactions were passed");const r={txs:e,params:t};return(await this.communicator.send(kn.Methods.sendTransactions,r)).data}};var Ln={},Hn={};Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.RPC_CALLS=void 0,Hn.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Eth=void 0;const qn=Hn,Gn=ln,Un={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};Ln.Eth=class{constructor(e){this.communicator=e,this.call=this.buildRequest({call:qn.RPC_CALLS.eth_call,formatters:[null,Un.defaultBlockParam]}),this.getBalance=this.buildRequest({call:qn.RPC_CALLS.eth_getBalance,formatters:[null,Un.defaultBlockParam]}),this.getCode=this.buildRequest({call:qn.RPC_CALLS.eth_getCode,formatters:[null,Un.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:qn.RPC_CALLS.eth_getStorageAt,formatters:[null,Un.blockNumberToHex,Un.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:qn.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:qn.RPC_CALLS.eth_getBlockByHash,formatters:[null,Un.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:qn.RPC_CALLS.eth_getBlockByNumber,formatters:[Un.blockNumberToHex,Un.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:qn.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:qn.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:qn.RPC_CALLS.eth_getTransactionCount,formatters:[null,Un.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:qn.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=e=>this.buildRequest({call:qn.RPC_CALLS.eth_estimateGas})([e]),this.setSafeSettings=this.buildRequest({call:qn.RPC_CALLS.safe_setSettings})}buildRequest(e){const{call:t,formatters:r}=e;return async e=>{r&&Array.isArray(e)&&r.forEach(((t,r)=>{t&&(e[r]=t(e[r]))}));const n={call:t,params:e||[]};return(await this.communicator.send(Gn.Methods.rpcCall,n)).data}}};var Kn={};const jn=new RegExp("^bytes([0-9]+)$"),Qn=new RegExp("^(u?int)([0-9]*)$"),Wn=new RegExp("^(.*)\\[([0-9]*)\\]$"),zn="0000000000000000000000000000000000000000000000000000000000000000",Jn=new o("solidity/5.7.0");function Yn(e,t,n){switch(e){case"address":return n?Z(t,32):Q(t);case"string":return r(t);case"bytes":return Q(t);case"bool":return t=t?"0x01":"0x00",n?Z(t,32):Q(t)}let i=e.match(Qn);if(i){let r=parseInt(i[2]||"256");return(i[2]&&String(r)!==i[2]||r%8!=0||0===r||r>256)&&Jn.throwArgumentError("invalid number type","type",e),n&&(r=256),t=u.from(t).toTwos(r),Z(t,r/8)}if(i=e.match(jn),i){const r=parseInt(i[1]);return(String(r)!==i[1]||0===r||r>32)&&Jn.throwArgumentError("invalid bytes type","type",e),Q(t).byteLength!==r&&Jn.throwArgumentError(`invalid value for ${e}`,"value",t),n?Q((t+zn).substring(0,66)):t}if(i=e.match(Wn),i&&Array.isArray(t)){const r=i[1];parseInt(i[2]||String(t.length))!=t.length&&Jn.throwArgumentError(`invalid array length for ${e}`,"value",t);const n=[];return t.forEach((function(e){n.push(Yn(r,e,!0))})),j(n)}return Jn.throwArgumentError("invalid type","type",e)}function Vn(e,t){e.length!=t.length&&Jn.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(Yn(e,t[n]))})),K(j(r))}var Xn=Object.freeze({__proto__:null,AbiCoder:Me,defaultAbiCoder:Pe,Fragment:De,ConstructorFragment:Re,ErrorFragment:xe,EventFragment:_e,FunctionFragment:Oe,ParamType:Ne,FormatTypes:ke,checkResultErrors:Fe,Logger:o,RLP:Ue,_fetchData:p,fetchJson:g,poll:A,checkProperties:de,deepCopy:ce,defineReadOnly:oe,getStatic:ue,resolveProperties:fe,shallowCopy:le,arrayify:Q,concat:j,stripZeros:$,zeroPad:Z,isBytes:ee,isBytesLike:te,defaultPath:Lr,HDNode:Hr,SigningKey:wr,Interface:Le,LogDescription:He,TransactionDescription:qe,base58:Pt,base64:je,hexlify:K,isHexString:X,hexConcat:re,hexStripZeros:ne,hexValue:ie,hexZeroPad:J,hexDataLength:W,hexDataSlice:Y,nameprep:function(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();let t=i(e);var r;r=t.map((e=>{if(Ye.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=ze(e,Ve);if(t)return[e+t.s];let r=Xe[e];if(r)return r;let n=Ze[e];return n?[e+n[0]]:$e[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=i(a(t),s.NFKC),t.forEach((e=>{if(ze(e,et))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(ze(e,Je))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=a(t);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n},_toEscapedUtf8String:m,toUtf8Bytes:r,toUtf8CodePoints:i,toUtf8String:n,Utf8ErrorFuncs:y,formatBytes32String:function(e){const t=r(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(j([t,Ie]).slice(0,32))},parseBytes32String:function(e){const t=Q(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return n(t.slice(0,r))},dnsEncode:function(e){return K(j(It(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"},hashMessage:Bt,namehash:function(e){"string"!=typeof e&&St.throwArgumentError("invalid ENS name; not a string","name",e);let t=Et;const r=It(e);for(;r.length;)t=f(j([t,f(r.pop())]));return K(t)},isValidName:function(e){try{return 0!==It(e).length}catch(e){}return!1},id:ve,_TypedDataEncoder:ae,getAddress:F,getIcapAddress:L,getContractAddress:H,getCreate2Address:q,isAddress:G,formatEther:v,parseEther:b,formatUnits:w,parseUnits:S,commify:E,computeHmac:Ot,keccak256:f,ripemd160:xt,sha256:_t,sha512:function(e){return"0x"+d.sha512().update(Q(e)).digest("hex")},randomBytes:Wr,shuffled:function(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e},solidityPack:Vn,solidityKeccak256:function(e,t){return f(Vn(e,t))},soliditySha256:function(e,t){return _t(Vn(e,t))},splitSignature:z,joinSignature:V,accessListify:Ae,parseTransaction:me,serializeTransaction:pe,TransactionTypes:ye,getJsonWalletAddress:Ee,computeAddress:he,recoverAddress:ge,computePublicKey:Sr,recoverPublicKey:function(e,t){const r=z(t),n={r:Q(r.r),s:Q(r.s)};return"0x"+br().recoverPubKey(Q(e),n,r.recoveryParam).encode("hex",!1)},verifyMessage:function(e,t){return ge(Bt(e),t)},verifyTypedData:function(e,t,r,n){return ge(ae.hash(e,t,r),n)},getAccountPath:function(e){return("number"!=typeof e||e<0||e>=xr||e%1)&&Pr.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`},mnemonicToEntropy:Gr,entropyToMnemonic:Ur,isValidMnemonic:function(e,t){try{return Gr(e,t),!0}catch(e){}return!1},mnemonicToSeed:qr,get SupportedAlgorithm(){return Dt},get UnicodeNormalizationForm(){return s},get Utf8ErrorReason(){return C},Indexed:Ge});const Zn="ethers/5.7.2",$n=new o(Zn);var ei=Object.freeze({__proto__:null,Signer:N,Wallet:Yr,VoidSigner:k,getDefaultProvider:Be,providers:Te,BaseContract:x,Contract:_,ContractFactory:O,BigNumber:u,FixedNumber:I,constants:Ce,get errors(){return T},logger:$n,utils:Xn,wordlists:Mr,version:Zn,Wordlist:Cr});try{const e=window;null==e._ethers&&(e._ethers=ei)}catch(e){}var ti=B(Object.freeze({__proto__:null,ethers:ei,Signer:N,Wallet:Yr,VoidSigner:k,getDefaultProvider:Be,providers:Te,BaseContract:x,Contract:_,ContractFactory:O,BigNumber:u,FixedNumber:I,constants:Ce,get errors(){return T},logger:$n,utils:Xn,wordlists:Mr,version:Zn,Wordlist:Cr})),ri={};Object.defineProperty(ri,"__esModule",{value:!0}),ri.MAGIC_VALUE_BYTES=ri.MAGIC_VALUE=ri.EIP_1271_BYTES_INTERFACE=ri.EIP_1271_INTERFACE=void 0;const ni=ti;ri.MAGIC_VALUE="0x1626ba7e";ri.MAGIC_VALUE_BYTES="0x20c13b0b";const ii=new ni.ethers.utils.Interface(["function isValidSignature(bytes32 _dataHash, bytes calldata _signature) external view"]);ri.EIP_1271_INTERFACE=ii;const si=new ni.ethers.utils.Interface(["function isValidSignature(bytes calldata _data, bytes calldata _signature) public view"]);ri.EIP_1271_BYTES_INTERFACE=si;var ai={},oi={},fi={};Object.defineProperty(fi,"__esModule",{value:!0}),fi.PermissionsError=fi.PERMISSIONS_REQUEST_REJECTED=void 0,fi.PERMISSIONS_REQUEST_REJECTED=4001;class di extends Error{constructor(e,t,r){super(e),this.code=t,this.data=r,Object.setPrototypeOf(this,di.prototype)}}fi.PermissionsError=di,Object.defineProperty(oi,"__esModule",{value:!0}),oi.Wallet=void 0;const ci=ln,ui=fi;oi.Wallet=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(ci.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new ui.PermissionsError("Permissions request is invalid",ui.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(ci.Methods.wallet_requestPermissions,e)).data}catch(e){throw new ui.PermissionsError("Permissions rejected",ui.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every((e=>"object"==typeof e&&Object.keys(e).every((e=>!!Object.values(ci.RestrictedMethods).includes(e)))))}},Object.defineProperty(ai,"__esModule",{value:!0});const li=oi,hi=fi,pi=(e,t)=>t.some((t=>t.parentCapability===e));ai.default=()=>(e,t,r)=>{const n=r.value;return r.value=async function(){const e=new li.Wallet(this.communicator);let r=await e.getPermissions();if(pi(t,r)||(r=await e.requestPermissions([{[t]:{}}])),!pi(t,r))throw new hi.PermissionsError("Permissions rejected",hi.PERMISSIONS_REQUEST_REJECTED);return n.apply(this)},r};var gi=l&&l.__decorate||function(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a},Ai=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.Safe=void 0;const mi=ti,yi=ri,vi=ln,bi=Hn,wi=pn,Si=Ai(ai);class Ei{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(vi.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(vi.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(vi.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,t="0x"){const r=await this.getInfo(),n=yi.EIP_1271_INTERFACE.encodeFunctionData("isValidSignature",[e,t]),i={call:bi.RPC_CALLS.eth_call,params:[{to:r.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(vi.Methods.rpcCall,i)).data.slice(0,10).toLowerCase()===yi.MAGIC_VALUE}catch(e){return!1}}async check1271SignatureBytes(e,t="0x"){const r=await this.getInfo(),n=mi.ethers.utils.arrayify(e),i=yi.EIP_1271_BYTES_INTERFACE.encodeFunctionData("isValidSignature",[n,t]),s={call:bi.RPC_CALLS.eth_call,params:[{to:r.safeAddress,data:i},"latest"]};try{return(await this.communicator.send(vi.Methods.rpcCall,s)).data.slice(0,10).toLowerCase()===yi.MAGIC_VALUE_BYTES}catch(e){return!1}}calculateMessageHash(e){return mi.ethers.utils.hashMessage(e)}calculateTypedMessageHash(e){return mi.ethers.utils._TypedDataEncoder.hash(e.domain,e.types,e.message)}async getOffChainSignature(e){return(await this.communicator.send(vi.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,t="0x"){let r;if("string"==typeof e&&(r=async()=>{const r=this.calculateMessageHash(e);return await this.isMessageHashSigned(r,t)}),(0,wi.isObjectEIP712TypedData)(e)&&(r=async()=>{const r=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(r,t)}),r){return await r()}throw new Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){const r=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const n of r){if(await n(e,t))return!0}return!1}async getEnvironmentInfo(){return(await this.communicator.send(vi.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(vi.Methods.requestAddressBook,void 0)).data}}gi([(0,Si.default)()],Ei.prototype,"requestAddressBook",null),Kn.Safe=Ei;var Ci=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xr,"__esModule",{value:!0});const Ii=Ci(Zr),Ti=hn,Bi=Ln,Mi=Kn,Pi=oi;Xr.default=class{constructor(e={}){const{allowedDomains:t=null,debug:r=!1}=e;this.communicator=new Ii.default(t,r),this.eth=new Bi.Eth(this.communicator),this.txs=new Ti.TXs(this.communicator),this.safe=new Mi.Safe(this.communicator),this.wallet=new Pi.Wallet(this.communicator)}},function(e){var t=l&&l.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=l&&l.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)},n=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;const i=n(Xr);e.default=i.default,r(Xr,e),r(pn,e),r(ln,e),r($r,e);var s=en;Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}})}(Vr);var Di=M(Vr),Ri={},xi={},_i={};Object.defineProperty(_i,"__esModule",{value:!0}),_i.getLowerCase=void 0,_i.getLowerCase=function(e){return e?e.toLowerCase():e},Object.defineProperty(xi,"__esModule",{value:!0}),xi.SafeAppProvider=void 0;const Oi=Ke,Ni=_i;class ki extends Oi.EventEmitter{constructor(e,t){super(),this.submittedTxs=new Map,this.safe=e,this.sdk=t}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(e){const{method:t,params:r=[]}=e;switch(t){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{const[e,t]=r;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw new Error("The address or message hash is invalid");return await this.sdk.txs.signMessage(e),"0x"}case"eth_sign":{const[e,t]=r;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase()||!t.startsWith("0x"))throw new Error("The address or message hash is invalid");return await this.sdk.txs.signMessage(t),"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[e,t]=r,n="string"==typeof t?JSON.parse(t):t;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase())throw new Error("The address is invalid");return await this.sdk.txs.signTypedMessage(n),"0x"}case"eth_sendTransaction":const t=Object.assign({value:"0",data:"0x"},r[0]);"string"==typeof t.gas&&t.gas.startsWith("0x")&&(t.gas=parseInt(t.gas,16));const n=await this.sdk.txs.send({txs:[t],params:{safeTxGas:t.gas}});return this.submittedTxs.set(n.safeTxHash,{from:this.safe.safeAddress,hash:n.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:t.data,value:t.value,to:t.to,blockHash:null,blockNumber:null,transactionIndex:null}),n.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,Ni.getLowerCase)(r[0]),r[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,Ni.getLowerCase)(r[0]),r[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,Ni.getLowerCase)(r[0]),r[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,Ni.getLowerCase)(r[0]),r[1],r[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([r[0],r[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([r[0],r[1]]);case"eth_getTransactionByHash":let i=r[0];try{i=(await this.sdk.txs.getBySafeTxHash(i)).txHash||i}catch(e){}return this.submittedTxs.has(i)?this.submittedTxs.get(i):this.sdk.eth.getTransactionByHash([i]).then((e=>(e&&(e.hash=r[0]),e)));case"eth_getTransactionReceipt":{let e=r[0];try{e=(await this.sdk.txs.getBySafeTxHash(e)).txHash||e}catch(e){}return this.sdk.eth.getTransactionReceipt([e]).then((e=>(e&&(e.transactionHash=r[0]),e)))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(r[0]);case"eth_call":return this.sdk.eth.call([r[0],r[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([r[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(r[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([r[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,t){e||t("Undefined request"),this.request(e).then((r=>t(null,{jsonrpc:"2.0",id:e.id,result:r}))).catch((e=>t(e,null)))}}let Fi,Li;function Hi(){return P(this,void 0,void 0,(function*(){return Li||(Li=new Di),void 0===Fi&&(Fi=yield Promise.race([Li.safe.getInfo(),new Promise((e=>setTimeout(e,200)))])),Fi}))}function qi(){return P(this,void 0,void 0,(function*(){return!!(yield Hi())}))}function Gi(e){return P(this,void 0,void 0,(function*(){const t=yield Hi();if(!t)throw Error("Could not load Safe information");const r=new Ri.SafeAppProvider(t,Li);return r.on("connect",e.connect),r.on("disconnect",e.disconnect),r.on("accountsChanged",e.accountsChanged),r.on("chainChanged",e.chainChanged),r.on("message",e.message),D(r)}))}xi.SafeAppProvider=ki,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var t=xi;Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return t.SafeAppProvider}})}(Ri);var Ui={},Ki={},ji={};Object.defineProperty(ji,"__esModule",{value:!0}),ji.getTxServiceBaseUrl=void 0,ji.getTxServiceBaseUrl=function(e){return`${e}/api`};var Qi={},Wi={exports:{}};!function(e,t){var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==l)return l;throw new Error("unable to locate global object")}();e.exports=t=r.fetch,r.fetch&&(t.default=r.fetch.bind(r)),t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response}(Wi,Wi.exports),function(e){var t=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.sendRequest=e.HttpMethod=void 0;const r=t(Wi.exports);var n;(n=e.HttpMethod||(e.HttpMethod={})).Get="get",n.Post="post",n.Delete="delete",e.sendRequest=async function({url:e,method:t,body:n}){const i=await(0,r.default)(e,{method:t,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)});let s;try{s=await i.json()}catch(e){if(!i.ok)throw new Error(i.statusText)}if(i.ok)return s;if(s.data)throw new Error(s.data);if(s.detail)throw new Error(s.detail);if(s.message)throw new Error(s.message);if(s.nonFieldErrors)throw new Error(s.nonFieldErrors);if(s.delegate)throw new Error(s.delegate);if(s.safe)throw new Error(s.safe);if(s.delegator)throw new Error(s.delegator);throw new Error(i.statusText)}}(Qi);var zi,Ji,Yi=l&&l.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},Vi=l&&l.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(Ki,"__esModule",{value:!0});const Xi=ji,Zi=Qi;zi=new WeakMap,Ji=new WeakMap,Ki.default=class{constructor({txServiceUrl:e,ethAdapter:t}){zi.set(this,void 0),Ji.set(this,void 0),Yi(this,zi,(0,Xi.getTxServiceBaseUrl)(e),"f"),Yi(this,Ji,t,"f")}async getServiceInfo(){return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/about`,method:Zi.HttpMethod.Get})}async getServiceMasterCopiesInfo(){return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/about/master-copies`,method:Zi.HttpMethod.Get})}async decodeData(e){if(""===e)throw new Error("Invalid data");return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/data-decoder/`,method:Zi.HttpMethod.Post,body:{data:e}})}async getSafesByOwner(e){if(""===e)throw new Error("Invalid owner address");const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/owners/${t}/safes/`,method:Zi.HttpMethod.Get})}async getSafesByModule(e){if(""===e)throw new Error("Invalid module address");const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/modules/${t}/safes/`,method:Zi.HttpMethod.Get})}async getTransaction(e){if(""===e)throw new Error("Invalid safeTxHash");return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/multisig-transactions/${e}/`,method:Zi.HttpMethod.Get})}async getTransactionConfirmations(e){if(""===e)throw new Error("Invalid safeTxHash");return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/multisig-transactions/${e}/confirmations/`,method:Zi.HttpMethod.Get})}async confirmTransaction(e,t){if(""===e)throw new Error("Invalid safeTxHash");if(""===t)throw new Error("Invalid signature");return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/multisig-transactions/${e}/confirmations/`,method:Zi.HttpMethod.Post,body:{signature:t}})}async getSafeInfo(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/safes/${t}/`,method:Zi.HttpMethod.Get})}async getSafeDelegates({safeAddress:e,delegateAddress:t,delegatorAddress:r,label:n,limit:i,offset:s}){const a=new URL(`${Vi(this,zi,"f")}/v1/delegates`);if(e){const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e);a.searchParams.set("safe",t)}if(t){const{address:e}=await Vi(this,Ji,"f").getEip3770Address(t);a.searchParams.set("delegate",e)}if(r){const{address:e}=await Vi(this,Ji,"f").getEip3770Address(r);a.searchParams.set("delegator",e)}return n&&a.searchParams.set("label",n),i&&a.searchParams.set("limit",i),s&&a.searchParams.set("offset",s),(0,Zi.sendRequest)({url:a.toString(),method:Zi.HttpMethod.Get})}async addSafeDelegate({safeAddress:e,delegateAddress:t,delegatorAddress:r,label:n,signer:i}){if(""===t)throw new Error("Invalid Safe delegate address");if(""===r)throw new Error("Invalid Safe delegator address");if(""===n)throw new Error("Invalid label");const{address:s}=await Vi(this,Ji,"f").getEip3770Address(t),{address:a}=await Vi(this,Ji,"f").getEip3770Address(r),o=s+Math.floor(Date.now()/1e3/3600),f=await i.signMessage(o),d={safe:e?(await Vi(this,Ji,"f").getEip3770Address(e)).address:null,delegate:s,delegator:a,label:n,signature:f};return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/delegates/`,method:Zi.HttpMethod.Post,body:d})}async removeSafeDelegate({delegateAddress:e,delegatorAddress:t,signer:r}){if(""===e)throw new Error("Invalid Safe delegate address");if(""===t)throw new Error("Invalid Safe delegator address");const{address:n}=await Vi(this,Ji,"f").getEip3770Address(e),{address:i}=await Vi(this,Ji,"f").getEip3770Address(t),s=n+Math.floor(Date.now()/1e3/3600),a=await r.signMessage(s);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/delegates/${n}`,method:Zi.HttpMethod.Delete,body:{delegate:n,delegator:i,signature:a}})}async getSafeCreationInfo(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/safes/${t}/creation/`,method:Zi.HttpMethod.Get})}async estimateSafeTransaction(e,t){if(""===e)throw new Error("Invalid Safe address");const{address:r}=await Vi(this,Ji,"f").getEip3770Address(e);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/safes/${r}/multisig-transactions/estimations/`,method:Zi.HttpMethod.Post,body:t})}async proposeTransaction({safeAddress:e,safeTransactionData:t,safeTxHash:r,senderAddress:n,senderSignature:i,origin:s}){if(""===e)throw new Error("Invalid Safe address");const{address:a}=await Vi(this,Ji,"f").getEip3770Address(e),{address:o}=await Vi(this,Ji,"f").getEip3770Address(n);if(""===r)throw new Error("Invalid safeTxHash");return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/safes/${a}/multisig-transactions/`,method:Zi.HttpMethod.Post,body:{...t,contractTransactionHash:r,sender:o,signature:i,origin:s}})}async getIncomingTransactions(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/safes/${t}/incoming-transfers?executed=true`,method:Zi.HttpMethod.Get})}async getModuleTransactions(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/safes/${t}/module-transactions/`,method:Zi.HttpMethod.Get})}async getMultisigTransactions(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/safes/${t}/multisig-transactions/`,method:Zi.HttpMethod.Get})}async getPendingTransactions(e,t){if(""===e)throw new Error("Invalid Safe address");const{address:r}=await Vi(this,Ji,"f").getEip3770Address(e),n=t||(await this.getSafeInfo(r)).nonce;return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/safes/${r}/multisig-transactions/?executed=false&nonce__gte=${n}`,method:Zi.HttpMethod.Get})}async getAllTransactions(e,t){var r,n,i;if(""===e)throw new Error("Invalid Safe address");const{address:s}=await Vi(this,Ji,"f").getEip3770Address(e),a=new URL(`${Vi(this,zi,"f")}/v1/safes/${s}/all-transactions/`),o=(null===(r=null==t?void 0:t.trusted)||void 0===r?void 0:r.toString())||"true";a.searchParams.set("trusted",o);const f=(null===(n=null==t?void 0:t.queued)||void 0===n?void 0:n.toString())||"true";a.searchParams.set("queued",f);const d=(null===(i=null==t?void 0:t.executed)||void 0===i?void 0:i.toString())||"false";return a.searchParams.set("executed",d),(0,Zi.sendRequest)({url:a.toString(),method:Zi.HttpMethod.Get})}async getNextNonce(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e),r=await this.getPendingTransactions(t);if(r.results.length>0){const e=r.results.map((e=>e.nonce));return Math.max(...e)+1}return(await this.getSafeInfo(t)).nonce}async getTokenList(){return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/tokens/`,method:Zi.HttpMethod.Get})}async getToken(e){if(""===e)throw new Error("Invalid token address");const{address:t}=await Vi(this,Ji,"f").getEip3770Address(e);return(0,Zi.sendRequest)({url:`${Vi(this,zi,"f")}/v1/tokens/${t}/`,method:Zi.HttpMethod.Get})}};var $i={};Object.defineProperty($i,"__esModule",{value:!0}),function(e){var t=l&&l.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=l&&l.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)},n=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(Ki);r($i,e),e.default=i.default}(Ui);var es=M(Ui);const ts={1:"https://safe-transaction-mainnet.safe.global/",5:"https://safe-transaction-goerli.safe.global/",42161:"https://safe-transaction-arbitrum.safe.global/",43114:"https://safe-transaction-avalanche.safe.global/",1313161554:"https://safe-transaction-aurora.safe.global/",56:"https://safe-transaction-bsc.safe.global/",10:"https://safe-transaction-optimism.safe.global/",137:"https://safe-transaction-polygon.safe.global/"};let rs;function ns(e){return P(this,void 0,void 0,(function*(){if((null==rs?void 0:rs.chainId)===e)return rs.safeService;if(!R.getState().provider)throw new Error("provider is undefined");const t=function(){return{getEip3770Address:e=>P(this,void 0,void 0,(function*(){const{address:t,prefix:r}=function(e){const t=e.split(":"),r=t.length>1?t[1]:t[0];return{prefix:t.length>1?t[0]:"",address:r}}(e);return{address:t,prefix:r}}))}}(),r=ts[e];if(!r)return;const n=new es({txServiceUrl:r,ethAdapter:t});return rs={safeService:n,chainId:e},rs.safeService}))}function is(e,t){return P(this,void 0,void 0,(function*(){if(!t)return!1;const r=yield ns(e);if(!r)return!1;try{return!!(yield r.getSafeInfo(t))}catch(e){return console.error(e),!1}}))}function ss(e,t,r){return P(this,void 0,void 0,(function*(){const n=yield ns(e);if(!n)return console.error(`chainId: ${e} is not supported safe`),r;if(r!==t)return r;const i=yield n.getMultisigTransactions(r),[s]=i.results;return s.safeTxHash}))}function as(e,t,r){return P(this,void 0,void 0,(function*(){const n=yield ns(e);if(!n)throw new Error(`chainId: ${e} is not supported safe`);try{const{results:e}=yield n.getMultisigTransactions(r),i=e.find((e=>e.safeTxHash.toLocaleLowerCase()===t.toLocaleLowerCase()));if(!i)return null;if(e.some((e=>!(e.nonce!==i.nonce||e.safeTxHash.toLocaleLowerCase()===t.toLocaleLowerCase()||!e.isExecuted||!e.isSuccessful))))return"rejected";if(null===i.isExecuted||null===i.isSuccessful)return null;return{status:i.isExecuted&&i.isSuccessful||!1,transactionHash:i.transactionHash,blockNumber:i.blockNumber||null}}catch(e){throw console.error(e),new Error(`safeTxHash: ${t} is not valid.`)}}))}function os(e,t,r){const n={1:"eth",5:"gor",137:"matic",56:"bnb",42161:"arb1",10:"oeth",43114:"avax",1313161554:"aurora"}[t];if(!n)throw new Error(`Not Supported network: ${t}`);return`https://app.safe.global/transactions/tx?id=multisig_${r}_${e}&safe=${n}%3A${r}`}export{Gi as default,is as getAccountIsSafe,Hi as getConnectedSafe,qi as getIsSafe,os as getSafeHashDetailUrl,ss as getSafeTxHash,as as getSafeTxStatus};
|
package/dist/index-8af79cad.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a1 as e,a2 as t,a3 as n,a4 as s,Q as i,a5 as o,a6 as r,a7 as a,a8 as c,a9 as l,aa as d,ab as u,ac as h,ad as p,ae as m,af as f,ag as g,ah as w,ai as k,aj as y,ak as b,al as E,am as C,an as v,ao as S,ap as A,aq as I,ar as x,as as O,at as R,au as N,av as T,aw as M,ax as _,ay as B,az as P,aA as D,_ as j,A as L}from"./index-98d378b6.js";export{ax as isInBinance}from"./index-98d378b6.js";import*as F from"react";import z,{createContext as U,useState as H,useEffect as q,useCallback as V,useContext as W}from"react";import $ from"react-dom";import{I as J}from"./interface-746c1865.js";import"@ethersproject/address";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"@ethersproject/properties";import"@ethersproject/abstract-signer";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"events";import"@ethersproject/constants";import"@ethersproject/transactions";import"./id-cb48006b.js";var Q,K={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},G=$;if("production"===process.env.NODE_ENV)Q=G.createRoot,G.hydrateRoot;else{var Z=G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Q=function(e,t){Z.usingClientEntryPoint=!0;try{return G.createRoot(e,t)}finally{Z.usingClientEntryPoint=!1}}}var Y,X,ee=Object.defineProperty,te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ie=(e,t,n)=>t in e?ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))ne.call(t,n)&&ie(e,n,t[n]);if(te)for(var n of te(t))se.call(t,n)&&ie(e,n,t[n]);return e},re=(e,t)=>{var n={};for(var s in e)ne.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&te)for(var s of te(e))t.indexOf(s)<0&&se.call(e,s)&&(n[s]=e[s]);return n};(e=>{const t=class{constructor(e,n,s,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let r=[];for(let e=0;e<this.size;e++)r.push(!1);for(let e=0;e<this.size;e++)this.modules.push(r.slice()),this.isFunction.push(r.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(s);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,s){const i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,s)}static encodeBinary(n,s){const i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],s)}static encodeSegments(e,n,i=1,r=40,c=-1,l=!0){if(!(t.MIN_VERSION<=i&&i<=r&&r<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let d,u;for(d=i;;d++){const s=8*t.getNumDataCodewords(d,n),i=a.getTotalBits(e,d);if(i<=s){u=i;break}if(d>=r)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&u<=8*t.getNumDataCodewords(d,e)&&(n=e);let h=[];for(const t of e){s(t.mode.modeBits,4,h),s(t.numChars,t.mode.numCharCountBits(d),h);for(const e of t.getData())h.push(e)}o(h.length==u);const p=8*t.getNumDataCodewords(d,n);o(h.length<=p),s(0,Math.min(4,p-h.length),h),s(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<p;e^=253)s(e,8,h);let m=[];for(;8*m.length<h.length;)m.push(0);return h.forEach(((e,t)=>m[t>>>3]|=e<<7-(7&t))),new t(d,n,m,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let s=0;s<t;s++)0==n&&0==s||0==n&&s==t-1||n==t-1&&0==s||this.drawAlignmentPattern(e[n],e[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const s=21522^(t<<10|n);o(s>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,i(s,e));this.setFunctionModule(8,7,i(s,6)),this.setFunctionModule(8,8,i(s,7)),this.setFunctionModule(7,8,i(s,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,i(s,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,i(s,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,i(s,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const n=i(t,e),s=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(s,o,n),this.setFunctionModule(o,s,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let s=-4;s<=4;s++){const i=Math.max(Math.abs(s),Math.abs(n)),o=e+s,r=t+n;0<=o&&o<this.size&&0<=r&&r<this.size&&this.setFunctionModule(o,r,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let s=-2;s<=2;s++)this.setFunctionModule(e+s,t+n,1!=Math.max(Math.abs(s),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,s=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,s))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][n],r=t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][n],a=Math.floor(t.getNumRawDataModules(n)/8),c=i-a%i,l=Math.floor(a/i);let d=[];const u=t.reedSolomonComputeDivisor(r);for(let n=0,s=0;n<i;n++){let i=e.slice(s,s+l-r+(n<c?0:1));s+=i.length;const o=t.reedSolomonComputeRemainder(i,u);n<c&&i.push(0),d.push(i.concat(o))}let h=[];for(let e=0;e<d[0].length;e++)d.forEach(((t,n)=>{(e!=l-r||n>=c)&&h.push(t[e])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let s=0;s<this.size;s++)for(let o=0;o<2;o++){const r=t-o,a=0==(t+1&2)?this.size-1-s:s;!this.isFunction[a][r]&&n<8*e.length&&(this.modules[a][r]=i(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let s;switch(e){case 0:s=(n+t)%2==0;break;case 1:s=t%2==0;break;case 2:s=n%3==0;break;case 3:s=(n+t)%3==0;break;case 4:s=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:s=n*t%2+n*t%3==0;break;case 6:s=(n*t%2+n*t%3)%2==0;break;case 7:s=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&s&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let s=!1,i=0,o=[0,0,0,0,0,0,0];for(let r=0;r<this.size;r++)this.modules[n][r]==s?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),s||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),s=this.modules[n][r],i=1);e+=this.finderPenaltyTerminateAndCount(s,i,o)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let s=!1,i=0,o=[0,0,0,0,0,0,0];for(let r=0;r<this.size;r++)this.modules[r][n]==s?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),s||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),s=this.modules[r][n],i=1);e+=this.finderPenaltyTerminateAndCount(s,i,o)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let s=0;s<this.size-1;s++){const i=this.modules[n][s];i==this.modules[n][s+1]&&i==this.modules[n+1][s]&&i==this.modules[n+1][s+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const s=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*s)/s)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let s=this.size-7;n.length<e;s-=t)n.splice(1,0,s);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let s=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],s),e+1<n.length&&(n[e]^=n[e+1]);s=t.reedSolomonMultiply(s,2)}return n}static reedSolomonComputeRemainder(e,n){let s=n.map((e=>0));for(const i of e){const e=i^s.shift();s.push(0),n.forEach(((n,i)=>s[i]^=t.reedSolomonMultiply(n,e)))}return s}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let s=7;s>=0;s--)n=n<<1^285*(n>>>7),n^=(t>>>s&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function s(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let s=t-1;s>=0;s--)n.push(e>>>s&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const r=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)s(n,8,t);return new r(r.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!r.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const i=Math.min(e.length-n,3);s(parseInt(e.substr(n,i),10),3*i+1,t),n+=i}return new r(r.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!r.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let i=45*r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),s(i,11,n)}return t<e.length&&s(r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new r(r.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:r.isNumeric(e)?[r.makeNumeric(e)]:r.isAlphanumeric(e)?[r.makeAlphanumeric(e)]:[r.makeBytes(r.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)s(e,8,t);else if(e<16384)s(2,2,t),s(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");s(6,3,t),s(e,21,t)}return new r(r.Mode.ECI,0,t)}static isNumeric(e){return r.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return r.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const s of e){const e=s.mode.numCharCountBits(t);if(s.numChars>=1<<e)return 1/0;n+=4+e+s.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let a=r;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(Y||(Y={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})((X=Y||(Y={})).QrCode||(X.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Y||(Y={}));var ae=Y,ce={L:ae.QrCode.Ecc.LOW,M:ae.QrCode.Ecc.MEDIUM,Q:ae.QrCode.Ecc.QUARTILE,H:ae.QrCode.Ecc.HIGH},le=128,de="L",ue="#FFFFFF",he="#000000",pe=!1,me=4,fe=.1;
|
|
2
|
-
/**
|
|
3
|
-
* @license qrcode.react
|
|
4
|
-
* Copyright (c) Paul O'Shannessy
|
|
5
|
-
* SPDX-License-Identifier: ISC
|
|
6
|
-
*/function ge(e){const t=e,{value:n,size:s=le,level:i=de,bgColor:o=ue,fgColor:r=he,includeMargin:a=pe,imageSettings:c}=t,l=re(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let d=ae.QrCode.encodeText(n,ce[i]).getModules();const u=a?me:0,h=d.length+2*u,p=function(e,t,n,s){if(null==s)return null;const i=n?me:0,o=e.length+2*i,r=Math.floor(t*fe),a=o/t,c=(s.width||r)*a,l=(s.height||r)*a,d=null==s.x?e.length/2-c/2:s.x*a,u=null==s.y?e.length/2-l/2:s.y*a;let h=null;if(s.excavate){let e=Math.floor(d),t=Math.floor(u);h={x:e,y:t,w:Math.ceil(c+d-e),h:Math.ceil(l+u-t)}}return{x:d,y:u,h:l,w:c,excavation:h}}(d,s,a,c);let m=null;var f,g;null!=c&&null!=p&&(null!=p.excavation&&(f=d,g=p.excavation,d=f.slice().map(((e,t)=>t<g.y||t>=g.y+g.h?e:e.map(((e,t)=>(t<g.x||t>=g.x+g.w)&&e))))),m=z.createElement("image",{xlinkHref:c.src,height:p.h,width:p.w,x:p.x+u,y:p.y+u,preserveAspectRatio:"none"}));const w=function(e,t=0){const n=[];return e.forEach((function(e,s){let i=null;e.forEach((function(o,r){if(!o&&null!==i)return n.push(`M${i+t} ${s+t}h${r-i}v1H${i+t}z`),void(i=null);if(r!==e.length-1)o&&null===i&&(i=r);else{if(!o)return;null===i?n.push(`M${r+t},${s+t} h1v1H${r+t}z`):n.push(`M${i+t},${s+t} h${r+1-i}v1H${i+t}z`)}}))})),n.join("")}(d,u);return z.createElement("svg",oe({height:s,width:s,viewBox:`0 0 ${h} ${h}`},l),z.createElement("path",{fill:o,d:`M0,0 h${h}v${h}H0z`,shapeRendering:"crispEdges"}),z.createElement("path",{fill:r,d:w,shapeRendering:"crispEdges"}),m)}!function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}}();var we="\n.pointer-events-auto {\n pointer-events: auto;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.bottom-0 {\n bottom: 0px;\n}\n\n.left-0 {\n left: 0px;\n}\n\n.top-0 {\n top: 0px;\n}\n\n.top-2\\/4 {\n top: 50%;\n}\n\n.m-auto {\n margin: auto;\n}\n\n.mx-\\[4px\\] {\n margin-left: 4px;\n margin-right: 4px;\n}\n\n.mb-4 {\n margin-bottom: 1rem;\n}\n\n.mb-6 {\n margin-bottom: 1.5rem;\n}\n\n.ml-1 {\n margin-left: 0.25rem;\n}\n\n.mt-6 {\n margin-top: 1.5rem;\n}\n\n.mt-\\[35px\\] {\n margin-top: 35px;\n}\n\n.flex {\n display: flex;\n}\n\n.grid {\n display: grid;\n}\n\n.h-\\[200px\\] {\n height: 200px;\n}\n\n.h-\\[24px\\] {\n height: 24px;\n}\n\n.h-\\[40px\\] {\n height: 40px;\n}\n\n.h-\\[52px\\] {\n height: 52px;\n}\n\n.h-full {\n height: 100%;\n}\n\n.w-\\[150px\\] {\n width: 150px;\n}\n\n.w-\\[200px\\] {\n width: 200px;\n}\n\n.w-\\[20px\\] {\n width: 20px;\n}\n\n.w-\\[24px\\] {\n width: 24px;\n}\n\n.w-\\[343px\\] {\n width: 343px;\n}\n\n.w-\\[60px\\] {\n width: 60px;\n}\n\n.w-\\[75px\\] {\n width: 75px;\n}\n\n.w-full {\n width: 100%;\n}\n\n.translate-y-\\[-50\\%\\] {\n --tw-translate-y: -50%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.grid-flow-col {\n grid-auto-flow: column;\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-x-4 {\n -moz-column-gap: 1rem;\n column-gap: 1rem;\n}\n\n.gap-y-2 {\n row-gap: 0.5rem;\n}\n\n.rounded {\n border-radius: 0.25rem;\n}\n\n.rounded-2xl {\n border-radius: 1rem;\n}\n\n.rounded-lg {\n border-radius: 0.5rem;\n}\n\n.rounded-t-2xl {\n border-top-left-radius: 1rem;\n border-top-right-radius: 1rem;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-b {\n border-bottom-width: 1px;\n}\n\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n\n.bg-black\\/\\[\\.80\\] {\n background-color: rgb(0 0 0 / .80);\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.p-\\[12px\\] {\n padding: 12px;\n}\n\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n\n.py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\n.pb-6 {\n padding-bottom: 1.5rem;\n}\n\n.pt-\\[20px\\] {\n padding-top: 20px;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.text-\\[\\#1E2329\\] {\n --tw-text-opacity: 1;\n color: rgb(30 35 41 / var(--tw-text-opacity));\n}\n\n.text-\\[\\#929AA5\\] {\n --tw-text-opacity: 1;\n color: rgb(146 154 165 / var(--tw-text-opacity));\n}\n\n.shadow-inner {\n --tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.duration-300 {\n transition-duration: 300ms;\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.will-change-auto {\n will-change: auto;\n}\n\n.will-change-transform {\n will-change: transform;\n}\n\n.body3 {\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n}\n\n.subtitle1 {\n font-size: 20px;\n font-style: normal;\n font-weight: 600;\n line-height: 28px;\n}\n\n.subtitle3 {\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px;\n /* 150% */\n}\n\n.caption2 {\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n}\n\n.t-black {\n color: #0b0e11;\n}\n\n.t-brand {\n color: #c99400;\n}\n\n.t-primary {\n color: #202630;\n}\n\n.t-secondary {\n color: #474d57;\n}\n\n.bg-primary {\n background: #fcd535;\n}\n\n@media (min-width: 768px) {\n .md\\:subtitle1 {\n font-size: 20px;\n font-style: normal;\n font-weight: 600;\n line-height: 28px;\n }\n\n .md\\:w-\\[400px\\] {\n width: 400px;\n }\n\n .md\\:font-semibold {\n font-weight: 600;\n }\n}\n\n@media (min-width: 1024px) {\n .lg\\:p-8 {\n padding: 2rem;\n }\n\n .lg\\:pt-6 {\n padding-top: 1.5rem;\n }\n\n .lg\\:text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n }\n}\n\n*, :before, :after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / .5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n:root {\n --animation-duration: 300ms;\n}\n\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#binanceW3W-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n",ke=U({}),ye="binanceW3W-wrapper",be="binanceW3W-style-sheet",Ee="binanceW3W-qrcode-modal",Ce="https://app.appsflyer.com/com.binance.dev?pid=https%3A%2F%2Fwww.binance.com%2Fen&c=https%3A%2F%2Fwww.binance.com%2Fen",ve="https://app.appsflyer.com/id1436799971?pid=https%3A%2F%2Fwww.binance.com%2Fen&c=https%3A%2F%2Fwww.binance.com%2Fen",Se="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNTYiIHZpZXdCb3g9IjAgMCA1NiA1NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMiIgeT0iMiIgd2lkdGg9IjUyIiBoZWlnaHQ9IjUyIiByeD0iMTAiIGZpbGw9IiMxNDE1MUEiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iNCIvPgo8cGF0aCBkPSJNMTIgMjhMMTUuNjEyOSAyNC4zODcxTDE5LjIyNTggMjhMMTUuNjEyOSAzMS42MTI5TDEyIDI4WiIgZmlsbD0iI0YwQjkwQiIvPgo8cGF0aCBkPSJNMTguMTkzNSAyMS44MDY1TDI4IDEyTDM3LjgwNjUgMjEuODA2NUwzNC4xOTM2IDI1LjQxOTRMMjggMTkuMjI1OEwyMS44MDY1IDI1LjQxOTRMMTguMTkzNSAyMS44MDY1WiIgZmlsbD0iI0YwQjkwQiIvPgo8cGF0aCBkPSJNMjQuMzg3MSAyOEwyOCAyNC4zODcxTDMxLjYxMjkgMjhMMjggMzEuNjEyOUwyNC4zODcxIDI4WiIgZmlsbD0iI0YwQjkwQiIvPgo8cGF0aCBkPSJNMjEuODA2NSAzMC41ODA2TDE4LjE5MzUgMzQuMTkzNUwyOCA0NEwzNy44MDY1IDM0LjE5MzVMMzQuMTkzNiAzMC41ODA2TDI4IDM2Ljc3NDJMMjEuODA2NSAzMC41ODA2WiIgZmlsbD0iI0YwQjkwQiIvPgo8cGF0aCBkPSJNMzYuNzc0MiAyOEw0MC4zODcxIDI0LjM4NzFMNDQgMjhMNDAuMzg3MSAzMS42MTI5TDM2Ljc3NDIgMjhaIiBmaWxsPSIjRjBCOTBCIi8+Cjwvc3ZnPgo=",Ae=()=>{let[e,t]=H(),[n,s]=H(!1);return q((()=>{let e=l(),n=d();t(e),s(n)}),[]),{isMobile:e,isAndroid:n}},Ie={en:{"sdk-download-android":"Download for Android","sdk-connect":"Connect","sdk-download-ios":"Download for iOS","sdk-install":"Install","sdk-modal-instruct-1":"1. Open Binance app","sdk-modal-instruct-2":"2. Tap {{icon}} on Home Screen","sdk-modal-title":"Connect With Binance","sdk-no-app":"Don’t have the Binance app yet?"},ar:{"sdk-download-android":"تنزيل لنظام Android","sdk-connect":"اتصال","sdk-download-ios":"تنزيل لنظام iOS","sdk-install":"تثبيت","sdk-modal-instruct-1":"1. افتح تطبيق Binance","sdk-modal-instruct-2":"2. اضغط {{icon}} على الشاشة الرئيسية","sdk-modal-title":"الربط مع Binance (بينانس)","sdk-no-app":"ليس لديك تطبيق Binance حتّى الآن؟"},"bg-BG":{"sdk-download-android":"Изтегляне за Android","sdk-connect":"Свържи","sdk-download-ios":"Изтегляне за iOS","sdk-install":"Инсталиране","sdk-modal-instruct-1":"1. Отворете приложението Binance","sdk-modal-instruct-2":"2. Докоснете {{icon}} на началния екран","sdk-modal-title":"Свържете се с Binance","sdk-no-app":"Все още нямате приложението Binance?"},"zh-CN":{"sdk-download-android":"下载安卓版","sdk-connect":"关联","sdk-download-ios":"下载iOS版","sdk-install":"安装","sdk-modal-instruct-1":"1.打开币安App","sdk-modal-instruct-2":"2.点击主屏幕的{{icon}}","sdk-modal-title":"关联币安","sdk-no-app":"尚未安装币安App?"},"zh-TW":{"sdk-download-android":"Android 下載","sdk-connect":"連接","sdk-download-ios":"iOS 下載","sdk-install":"安裝","sdk-modal-instruct-1":"1. 開啟幣安 App","sdk-modal-instruct-2":"2. 在首頁畫面上點擊 {{icon}}","sdk-modal-title":"與幣安連接","sdk-no-app":"還沒有幣安 App 嗎?"},"cs-CZ":{"sdk-download-android":"Stáhnout pro Android","sdk-connect":"Připojit","sdk-download-ios":"Stáhnout pro iOS","sdk-install":"Instalovat","sdk-modal-instruct-1":"1. Otevřete aplikaci Binance","sdk-modal-instruct-2":"2. Klepněte na {{icon}} na domovské obrazovce","sdk-modal-title":"Připojit platformu Binance","sdk-no-app":"Ještě nemáte aplikaci Binance?"},"fr-FR":{"sdk-download-android":"Télécharger pour Android","sdk-connect":"Se connecter","sdk-download-ios":"Télécharger pour iOS","sdk-install":"Installer","sdk-modal-instruct-1":"1. Ouvrez l’application de Binance","sdk-modal-instruct-2":"2. Appuyez sur {{icon}} sur l’écran d’accueil","sdk-modal-title":"Se connecter à Binance","sdk-no-app":"Vous n’avez pas encore l’application de Binance ?"},"de-DE":{"sdk-download-android":"Für Android herunterladen","sdk-connect":"Verbinden","sdk-download-ios":"Für iOS herunterladen","sdk-install":"Installieren","sdk-modal-instruct-1":"1. Binance-App öffnen","sdk-modal-instruct-2":"2. Tippe auf dem Startbildschirm auf {{icon}}","sdk-modal-title":"Mit Binance verknüpfen","sdk-no-app":"Du hast die Binance-App noch nicht?"},"el-GR":{"sdk-download-android":"Λήψη για Android","sdk-connect":"Συνδεθείτε","sdk-download-ios":"Λήψη για iOS","sdk-install":"Εγκατάσταση","sdk-modal-instruct-1":"1. Ανοίξτε την εφαρμογή Binance","sdk-modal-instruct-2":"2. Πατήστε {{icon}} στην αρχική οθόνη","sdk-modal-title":"Συνδεθείτε με την Binance","sdk-no-app":"Δεν έχετε ακόμα την εφαρμογή Binance;"},"id-ID":{"sdk-download-android":"Unduh untuk Android","sdk-connect":"Terhubung","sdk-download-ios":"Unduh untuk iOS","sdk-install":"Instal","sdk-modal-instruct-1":"1. Buka aplikasi Binance","sdk-modal-instruct-2":"2. Ketuk {{icon}} di Layar Beranda","sdk-modal-title":"Hubungkan dengan Binance","sdk-no-app":"Belum punya aplikasi Binance?"},"it-IT":{"sdk-download-android":"Scarica per Android","sdk-connect":"Collega","sdk-download-ios":"Scarica per iOS","sdk-install":"Installa","sdk-modal-instruct-1":"1. Apri l'app Binance","sdk-modal-instruct-2":"2. Tocca {{icon}} nella homepage","sdk-modal-title":"Collega con Binance","sdk-no-app":"Non hai ancora l'app Binance?"},"kk-KZ":{"sdk-download-android":"Android үшін жүктеп алу","sdk-connect":"Қосылу","sdk-download-ios":"iOS үшін жүктеп алу","sdk-install":"Орнату","sdk-modal-instruct-1":"1. Binance қолданбасын ашыңыз","sdk-modal-instruct-2":"2. Басты экрандағы {{icon}} белгішесін түртіңіз","sdk-modal-title":"Binance платформасымен байланыстыру","sdk-no-app":"Сізде әлі Binance қолданбасы жоқ па?"},"lv-LV":{"sdk-download-android":"Lejupielādēt Android ierīcei","sdk-connect":"Savienot","sdk-download-ios":"Lejupielādēt iOS ierīcei","sdk-install":"Instalēt","sdk-modal-instruct-1":"1. Atver Binance lietotni","sdk-modal-instruct-2":"2. Pieskaries pie {{icon}} sākuma ekrānā","sdk-modal-title":"Savieno ar Binance","sdk-no-app":"Vai tev vēl nav Binance lietotnes?"},"pl-PL":{"sdk-download-android":"Pobierz na Androida","sdk-connect":"Połącz","sdk-download-ios":"Pobierz na iOS","sdk-install":"Zainstaluj","sdk-modal-instruct-1":"1. Otwórz Aplikację Binance","sdk-modal-instruct-2":"2. Kliknij {{icon}} na ekranie głównym","sdk-modal-title":"Połącz z Binance","sdk-no-app":"Nie masz jeszcze aplikacji Binance?"},"pt-BR":{"sdk-download-android":"Baixar para Android","sdk-connect":"Conecte","sdk-download-ios":"Baixar para iOS","sdk-install":"Instalar","sdk-modal-instruct-1":"1. Abra o Aplicativo da Binance","sdk-modal-instruct-2":"2. Toque em {{icon}} na Tela Inicial","sdk-modal-title":"Conectar com a Binance","sdk-no-app":"Ainda não tem o aplicativo da Binance?"},"pt-PT":{"sdk-download-android":"Transferir para Android","sdk-connect":"Associar","sdk-download-ios":"Transferir para iOS","sdk-install":"Instalar","sdk-modal-instruct-1":"1. Abre a aplicação Binance","sdk-modal-instruct-2":"2. Toca em {{icon}} no Ecrã Inicial","sdk-modal-title":"Associa com a Binance","sdk-no-app":"Ainda não tens a aplicação Binance?"},"ro-RO":{"sdk-download-android":"Descărcați pentru Android","sdk-connect":"Conectare","sdk-download-ios":"Descărcați pentru iOS","sdk-install":"Instalați","sdk-modal-instruct-1":"1. Deschideți aplicația Binance","sdk-modal-instruct-2":"2. Atingeți {{icon}} pe ecranul de pornire","sdk-modal-title":"Conectați-vă cu Binance","sdk-no-app":"Nu aveți încă aplicația Binance?"},"ru-RU":{"sdk-download-android":"Скачать для Android","sdk-connect":"Подключить","sdk-download-ios":"Скачать для iOS","sdk-install":"Установить","sdk-modal-instruct-1":"1. Откройте приложение Binance","sdk-modal-instruct-2":"2. Нажмите {{icon}} на главном экране","sdk-modal-title":"Подключить кошелек Binance","sdk-no-app":"У вас еще нет приложения Binance?"},"sk-SK":{"sdk-download-android":"Stiahnuť pre Android","sdk-connect":"Pripojiť","sdk-download-ios":"Stiahnuť pre iOS","sdk-install":"Nainštalovať","sdk-modal-instruct-1":"1. Otvorte aplikáciu Binance","sdk-modal-instruct-2":"2. Klepnite na ikonu {{icon}} na domovskej obrazovke","sdk-modal-title":"Spojte sa s Binance","sdk-no-app":"Ešte nemáte aplikáciu Binance?"},"sl-SI":{"sdk-download-android":"Prenos za Android","sdk-connect":"Poveži","sdk-download-ios":"Prenos za iOS","sdk-install":"Namesti","sdk-modal-instruct-1":"1. Odprite aplikacijo Binance","sdk-modal-instruct-2":"2. Tapnite {{icon}} na začetnem zaslonu","sdk-modal-title":"Povežite se s platformo Binance","sdk-no-app":"Še nimate aplikacije Binance?"},"es-LA":{"sdk-download-android":"Descargar para Android","sdk-connect":"Conecta","sdk-download-ios":"Descargar para iOS","sdk-install":"Instala","sdk-modal-instruct-1":"1. Abre la aplicación de Binance","sdk-modal-instruct-2":"2. Toca {{icon}} en la pantalla de inicio","sdk-modal-title":"Conectar con Binance","sdk-no-app":"¿Aún no tienes la aplicación de Binance?"},"es-ES":{"sdk-download-android":"Descargar para Android","sdk-connect":"Conectar","sdk-download-ios":"Descargar para iOS","sdk-install":"Instalar","sdk-modal-instruct-1":"1. Open Binance app","sdk-modal-instruct-2":"2. Pulsa en {{icon}} en la página principal","sdk-modal-title":"Connect With Binance","sdk-no-app":"¿Aún no tienes la aplicación de Binance?"},"sv-SE":{"sdk-download-android":"Ladda ned för Android","sdk-connect":"Anslut","sdk-download-ios":"Ladda ned för iOS","sdk-install":"Installera","sdk-modal-instruct-1":"1. Öppna Binance-appen","sdk-modal-instruct-2":"2. Tryck på {{icon}} på startskärmen","sdk-modal-title":"Anslut med Binance","sdk-no-app":"Har du inte Binance-appen ännu?"},"tr-TR":{"sdk-download-android":"Android için indir","sdk-connect":"Bağlan","sdk-download-ios":"iOS için indir","sdk-install":"Yükle","sdk-modal-instruct-1":"1. Binance Uygulamasını Açın","sdk-modal-instruct-2":"2. Ana Ekranda {{icon}} simgesine dokunun","sdk-modal-title":"Binance ile Bağlanın","sdk-no-app":"Henüz Binance uygulamanız yok mu?"},"uk-UA":{"sdk-download-android":"Завантажити для Android","sdk-connect":"Підключитись","sdk-download-ios":"Завантажити для iOS","sdk-install":"Встановити","sdk-modal-instruct-1":"1. Відкрийте застосунок Binance","sdk-modal-instruct-2":"2. Торкніться {{icon}} на головному екрані","sdk-modal-title":"Підключіться до Binance","sdk-no-app":"Ще не маєте застосунку Binance?"},"vi-VN":{"sdk-download-android":"Tải xuống cho Android","sdk-connect":"Kết nối","sdk-download-ios":"Tải xuống cho iOS","sdk-install":"Cài đặt","sdk-modal-instruct-1":"1. Mở ứng dụng Binance","sdk-modal-instruct-2":"2. Nhấn vào {{icon}} trên Màn hình chính","sdk-modal-title":"Kết nối với Binance","sdk-no-app":"Bạn chưa có ứng dụng Binance?"},"da-DK":{"sdk-download-android":"Download til Android","sdk-connect":"Forbind","sdk-download-ios":"Download til iOS","sdk-install":"Installer","sdk-modal-instruct-1":"1. Åbn Binance-appen","sdk-modal-instruct-2":"2. Tryk på {{icon}} på startskærmen","sdk-modal-title":"Forbind til Binance","sdk-no-app":"Har du ikke Binance-appen endnu?"},"my-MM":{"sdk-download-android":"အန်းဒရွိုက်အတွက် ဒေါင်းလုဒ်လုပ်မည်","sdk-connect":"ချိတ်ဆက်မည်","sdk-download-ios":"iOS အတွက် ဒေါင်းလုဒ်လုပ်မည်","sdk-install":"ထည့်သွင်းမည်","sdk-modal-instruct-1":"1. Open Binance app","sdk-modal-instruct-2":"ပင်မမျက်နှာပြင်မှ {{icon}} ကိုနှိပ်ပါ။","sdk-modal-title":"Connect With Binance","sdk-no-app":"Binance App မရှိသေးဘူးလား။"},"lo-LA":{"sdk-download-android":"ດາວໂຫຼດສໍາລັບ Android","sdk-connect":"ເຊື່ອມຕໍ່","sdk-download-ios":"ດາວໂຫຼດສໍາລັບ iOS","sdk-install":"ຕິດຕັ້ງ","sdk-modal-instruct-1":"1. ເປີດແອັບ Binance","sdk-modal-instruct-2":"2. ແຕະ {{icon}} ໃນໜ້າຈໍຫຼັກ","sdk-modal-title":"ເຊື່ອມຕໍ່ກັບ Binance","sdk-no-app":"ຍັງບໍ່ມີແອັບ Binance ເທື່ອບໍ?"},"si-LK":{"sdk-download-android":"Android සඳහා බාගත කරන්න","sdk-connect":"සම්බන්ධ කරන්න","sdk-download-ios":"iOS සඳහා බාගත කරන්න","sdk-install":"ස්ථාපනය කරන්න","sdk-modal-instruct-1":"1. Binance යෙදුම විවෘත කරන්න","sdk-modal-instruct-2":"2. මුල් තිරයේ {{icon}} මත තට්ටු කරන්න","sdk-modal-title":"Binance සමග සම්බන්ධ වන්න","sdk-no-app":"තවමත් Binance යෙදුම නැති ද?"}},xe=["en","ar","bg-BG","zh-CN","zh-TW","cs-CZ","fr-FR","de-DE","el-GR","id-ID","it-IT","kk-KZ","lv-LV","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","es-LA","es-ES","sv-SE","tr-TR","uk-UA","vi-VN","da-DK","my-MM","lo-LA","si-LK"].reduce(((e,t)=>(e[t]=Ie[t],e)),{}),Oe=xe,Re=()=>{let{lng:e}=W(ke);return V(((t,n)=>Oe?.[e]?.[t]||Oe?.en?.[t]||n?.default||t),[e])},Ne=({size:e=24,color:t="currentColor",className:n,children:s,...i})=>z.createElement("svg",{width:e,height:e,fill:t,className:n,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...i},s),Te=e=>z.createElement(Ne,{size:24,...e},z.createElement("path",{d:"M21.7725 18.7033C21.4062 19.5418 20.9727 20.3136 20.4704 21.0232C19.7857 21.9906 19.2251 22.6602 18.7931 23.032C18.1233 23.6424 17.4058 23.955 16.6374 23.9728C16.0857 23.9728 15.4205 23.8172 14.6461 23.5017C13.8692 23.1876 13.1552 23.032 12.5024 23.032C11.8177 23.032 11.0834 23.1876 10.2979 23.5017C9.51127 23.8172 8.87756 23.9816 8.39305 23.9979C7.65619 24.0291 6.92173 23.7076 6.1886 23.032C5.72069 22.6276 5.13542 21.9343 4.43429 20.9521C3.68203 19.9033 3.06358 18.687 2.57906 17.3004C2.06017 15.8026 1.80005 14.3523 1.80005 12.9482C1.80005 11.3398 2.15076 9.95259 2.85324 8.79011C3.40532 7.85636 4.13979 7.11979 5.05903 6.57906C5.97827 6.03834 6.97151 5.76279 8.04114 5.74516C8.62641 5.74516 9.39391 5.92456 10.3477 6.27715C11.2988 6.63091 11.9095 6.81032 12.1772 6.81032C12.3774 6.81032 13.0558 6.60054 14.2058 6.18233C15.2934 5.79449 16.2113 5.63391 16.9633 5.69716C19.0009 5.86012 20.5317 6.6561 21.5497 8.09013C19.7274 9.18432 18.826 10.7169 18.8439 12.6829C18.8603 14.2142 19.4209 15.4886 20.5227 16.5004C21.022 16.97 21.5796 17.333 22.2001 17.5907C22.0655 17.9774 21.9235 18.3477 21.7725 18.7033ZM17.0993 0.480137C17.0993 1.68041 16.6568 2.8011 15.7748 3.8384C14.7104 5.07155 13.4229 5.78412 12.0268 5.67168C12.009 5.52769 11.9987 5.37614 11.9987 5.21688C11.9987 4.06462 12.5049 2.83147 13.4038 1.82321C13.8526 1.3127 14.4234 0.888228 15.1155 0.549615C15.8062 0.216055 16.4595 0.031589 17.0739 0C17.0918 0.160458 17.0993 0.320926 17.0993 0.480121V0.480137Z",fill:"#1E2329"})),Me=e=>z.createElement(Ne,{size:24,...e},z.createElement("path",{d:"M13.5589 11.0874L4.08203 1.59644H4.17441C4.98558 1.59644 5.68614 1.89129 6.81073 2.4993L16.7488 7.88083L13.5589 11.0874Z",fill:"#202630"}),z.createElement("path",{d:"M12.6373 12.008L2.90218 21.7203C2.66236 21.3329 2.49658 20.7063 2.49658 19.8034V4.19354C2.49658 3.29078 2.66236 2.66403 2.90218 2.2771L12.6373 12.008Z",fill:"#202630"}),z.createElement("path",{d:"M13.5589 12.9124L16.7488 16.1187L6.81073 21.5001C5.68614 22.1083 4.98548 22.4036 4.17441 22.4036H4.08203L13.5589 12.9124Z",fill:"#202630"}),z.createElement("path",{d:"M17.9437 8.52563L14.4775 12.0091L17.9437 15.4738L20.0456 14.3309C20.8199 13.9069 22 13.1329 22 12.0091C22 10.8662 20.8199 10.0922 20.0456 9.66821L17.9437 8.52563Z",fill:"#202630"})),_e=e=>z.createElement(Ne,{size:24,...e},z.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5 4H10.5V7H7.5V10H4.5V7V4H7.5ZM14.5 4H17.5H20.5V7V10H17.5V7H14.5V4ZM10.5 20V17H7.5V14H4.5V17V20H7.5H10.5ZM17.5 20H14.5V17H17.5V14H20.5V17V20H17.5ZM16.5 10.5H8.5V13.5H16.5V10.5Z",fill:"#202630"})),Be=({value:e,...t})=>{let n=Pe(e).map((e=>"string"==typeof e?e:z.cloneElement(t[e.key],{key:e.key})));return z.createElement(z.Fragment,null,n)},Pe=e=>{let t,n=/{{(.*?)}}/g,s=0,i=[];for(;null!==(t=n.exec(e));)t.index!==s&&i.push(e.substring(s,t.index)),i.push({key:t[1]}),s=n.lastIndex;return s!==e.length&&i.push(e.substring(s)),i},De=()=>{let e=Re();return z.createElement(z.Fragment,null,z.createElement(je,{t:e}),z.createElement(Le,{t:e}),z.createElement(Fe,null))},je=({t:e})=>z.createElement("div",{style:{borderBottom:"1px solid #EAECEF"},className:"grid justify-center gap-y-2 pb-6 body3 t-black border-b border-gray-300"},z.createElement("div",null,e("sdk-modal-instruct-1",{default:"1. Open Binance app"})),z.createElement("div",{className:"flex items-center"},z.createElement(Be,{value:e("sdk-modal-instruct-2",{default:"2. Tap {{icon}} on Home"}),icon:z.createElement(_e,{className:"w-[24px] h-[24px] mx-[4px]"})}))),Le=({t:e})=>z.createElement("div",{className:"py-4 body3 t-secondary text-center"},e("sdk-no-app",{default:"Don't have Binance app yet?"})),Fe=()=>z.createElement("div",{className:"grid grid-cols-2 gap-x-4"},z.createElement(ze,{type:"iOS"}),z.createElement(ze,{type:"Android"})),ze=({type:e})=>{let t=Re();return z.createElement("div",{style:{border:"1px solid #EAECEF"},className:"p-[12px] rounded-lg grid cursor-pointer t-secondary grid-flow-col items-center gap-x-4 w-[150px]",onClick:()=>{window.open("Android"===e?Ce:ve,"_blank")}},"Android"===e?z.createElement(Me,{className:"w-[24px] h-[24px] m-auto"}):z.createElement(Te,{className:"w-[24px] h-[24px] m-auto"}),z.createElement("div",{className:"w-[75px] caption2 t-secondary"},t(`sdk-download-${e.toLowerCase()}`,{default:`Download for ${e}`})))},Ue=e=>z.createElement(Ne,{...e},z.createElement("path",{d:"M6.69708 4.57538L4.57576 6.6967L9.87906 12L4.57576 17.3033L6.69708 19.4246L12.0004 14.1213L17.3037 19.4246L19.425 17.3033L14.1217 12L19.425 6.6967L17.3037 4.57538L12.0004 9.87868L6.69708 4.57538Z",fill:"currentColor"})),He=({onClose:e})=>{let t=Re();return z.createElement("div",{className:"flex items-center justify-between"},z.createElement("p",{className:"text-base font-medium text-[#1E2329] lg:text-xl md:font-semibold md:subtitle1"},t("sdk-modal-title",{default:"Connect with Binance"})),z.createElement("div",{className:"cursor-pointer text-[#929AA5]",onClick:e},z.createElement(Ue,null)))},qe=({id:e,onClose:t,onConnect:n})=>{let s=Re();return z.createElement("div",{id:e,className:"animated fadeIn pointer-events-auto fixed top-0 left-0 h-full w-full bg-black/[.80] duration-300 ease-in-out will-change-auto"},z.createElement("div",{className:"absolute bottom-0 m-auto w-full rounded-t-2xl bg-white px-4 pb-6 shadow-inner duration-300 ease-in-out will-change-transform md:w-[400px]"},z.createElement(Ve,{onClose:t}),z.createElement("div",{className:"mt-6 mb-4 flex justify-center"},z.createElement("img",{className:"w-[60px]",src:Se})),z.createElement("div",{className:"subtitle1 text-center mb-6 t-primary"},s("sdk-modal-title",{default:"Connect with Binance"})),z.createElement("button",{onClick:n,style:{borderColor:"transparent"},className:"w-full rounded h-[40px] flex justify-center items-center bg-primary t-primary subtitle3 mb-4"},s("sdk-connect",{default:"Connect"})),z.createElement("div",{className:"text-center py-3"},z.createElement("span",null,s("sdk-no-app",{default:"Don’t have Binance app yet?"})),z.createElement("a",{target:"_blank",href:"https://www.binance.com/en/download",className:"t-brand ml-1"},s("sdk-install",{default:"Install"})))))},Ve=({onClose:e})=>z.createElement("div",{className:"flex items-center justify-end h-[52px]"},z.createElement("div",{className:"cursor-pointer text-[#929AA5]",onClick:e},z.createElement(Ue,{className:"w-[20px]"}))),We=e=>{let t=document.createElement("a");t.href=e,document.body.appendChild(t),((e,t)=>{let n="visibilitychange",s=setTimeout((()=>{document.hidden||e()}),t),i=()=>{document.hidden&&(clearTimeout(s),document.removeEventListener(n,i))};document.addEventListener(n,i,!1)})((()=>{window.location.href="https://www.binance.com/en/download"}),1e3),t.click(),document.body.removeChild(t)};var $e=function(e){let{toBinance:t}=(e=>{let{isAndroid:t,isMobile:n}=Ae();return{toBinance:()=>{let s=h(t,e);if(n){if(!t){let e=document.createElement("a");e.href=s,document.body.appendChild(e),e.click(),document.body.removeChild(e)}t&&We(s)}}}})(e.url);return z.createElement("div",null,z.createElement("div",{className:"mt-[35px] flex justify-center"},z.createElement("div",{className:"w-[200px] h-[200px] mb-4",onClick:t},e.url&&z.createElement(ge,{value:e.url,width:"100%",height:"100%",level:"M",imageSettings:{src:Se,height:32,width:32,excavate:!1}}))))},Je=({onClose:e,isReady:t})=>{let{isMobile:n}=Ae(),[s,i]=H(""),[o,r]=H(!1);q((()=>{t.then(i).catch((()=>r(!0)))}),[t]);let a={url:s,error:o};return!1===n?z.createElement("div",{id:Ee,className:"animated fadeIn pointer-events-auto fixed top-0 left-0 h-full w-full bg-black/[.80] duration-300 ease-in-out will-change-auto"},z.createElement("div",{className:"relative top-2/4 m-auto w-[343px] translate-y-[-50%] rounded-2xl bg-white px-6 pt-[20px] pb-6 shadow-inner duration-300 ease-in-out will-change-transform md:w-[400px] lg:p-8 lg:pt-6"},z.createElement(He,{onClose:e}),z.createElement($e,{...a}),z.createElement(De,null))):n?z.createElement(qe,{onConnect:()=>{u(s)},onClose:e,id:Ee}):void 0},Qe={order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag","path","subdomain"],lookupQuerystring:function(){let e=window.location.search.match(/lng=([^&]*)/);return e&&e[1]},lookupCookie:function(){let e=document.cookie.match(/i18next=([^;]*)/);return e&&e[1]},lookupLocalStorage:function(){return localStorage.getItem("i18nextLng")},lookupSessionStorage:function(){return sessionStorage.getItem("i18nextLng")},lookupFromNavigator:function(){return navigator.language},lookupFromHtmlTag:function(){return document.documentElement.lang},lookupFromPath:function(){let e=window.location.pathname.match(/\/([^/]*)/);return e&&e[1]},lookupFromSubdomain:function(){let e=window.location.hostname.match(/^(.+)\./);return e&&e[1]}},Ke=()=>{for(let e of Qe.order)try{let t=Qe["lookup"+e.charAt(0).toUpperCase()+e.slice(1)]();if(t)return t}catch(t){console.error(`Error detecting language with method: ${e}`,t);continue}return"en"};function Ge(){let e=window.document,t=e.getElementById(Ee);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout((()=>{let t=e.getElementById(ye);t&&e.body.removeChild(t)}),300))}function Ze(e){return()=>{Ge(),e&&e()}}async function Ye({isReady:e,cb:t,lng:n}){!function(){let e=window.document,t=e.getElementById(be);t&&e.head.removeChild(t);let n=e.createElement("style");n.setAttribute("id",be),n.innerHTML=we,e.head.appendChild(n)}();let s=function(){let e=window.document,t=e.createElement("div");return t.setAttribute("id",ye),e.body.appendChild(t),t}(),i=Q(s);await e;let o=n??Ke();i.render(F.createElement(ke.Provider,{value:{lng:o}},F.createElement(Je,{isReady:e,onClose:Ze(t)})))}var Xe=e=>{},et=()=>{};var tt={open:function({cb:e,lng:t}){let n=new Promise(((e,t)=>{Xe=e,et=t}));c()||Ye({isReady:n,cb:e,lng:t})},close:function(){c()||Ge()},ready:function(e){Xe(e)},fail:function(){console.log("relay failed...."),et()}},nt=tt,st=typeof window<"u"?window.WebSocket:function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")},it=class extends p{constructor(e){super(),this.opts=e,this.socket=null,this.nextSocket=null,this.subscriptions=e.subscriptions||[],this.qs=`env=browser&protocol=wc&version=${e.version}`}qs;urls=[];socket;nextSocket;queue=[];subscriptions=[];retryIndex=0;set readyState(e){}get readyState(){return this.socket?this.socket.readyState:-1}set connecting(e){}get connecting(){return 0===this.readyState}set connected(e){}get connected(){return 1===this.readyState}set retryFailed(e){}get retryFailed(){return this.retryIndex>0&&this.retryIndex>=this.urls.length}open(e){if(!Array.isArray(e)||0===e.length)throw new Error("Missing or invalid WebSocket url");this.urls=e,this.retryIndex=0,this.socketCreate()}close(){this._socketClose()}send(e,t,n){if(!t||"string"!=typeof t)throw new Error("Missing or invalid topic field");this.socketSend({topic:t,type:"pub",payload:e,silent:!!n})}subscribe(e){this.socketSend({topic:e,type:"sub",payload:"",silent:!0})}socketCreate(){if(this.nextSocket)return;let e=this.getWsUrl();if(!e)return this.events.emit("error",new Error("Retry limit reached. Can't connect to any url."),e);if(this.nextSocket=new st(e),!this.nextSocket)throw new Error("Failed to create socket");this.nextSocket.onmessage=e=>this.socketReceive(e),this.nextSocket.onopen=()=>this.socketOpen(),this.nextSocket.onerror=t=>this.socketError(t,e),this.nextSocket.onclose=e=>{this.nextSocket=null,this.socketCreate()}}getWsUrl(){return this.retryIndex>=this.urls.length?"":`${this.urls[this.retryIndex++]}?${this.qs}`}socketOpen(){this._socketClose(),this.socket=this.nextSocket,this.nextSocket=null,this.queueSubscriptions(),this.pushQueue(),this.events.emit("open",this.urls[this.retryIndex-1])}_socketClose(){this.socket&&(this.socket.onclose=()=>{},this.socket.close(),this.events.emit("close"))}socketSend(e){let t=JSON.stringify(e);this.socket&&1===this.socket.readyState?this.socket.send(t):this.setToQueue(e)}socketReceive(e){let t;try{t=JSON.parse(e.data)}catch{return}this.socketSend({topic:t.topic,type:"ack",payload:"",silent:!0}),this.socket&&1===this.socket.readyState&&this.events.emit("message",t)}socketError(e,t){this.events.emit("error",e,t)}queueSubscriptions(){this.subscriptions.forEach((e=>this.queue.push({topic:e,type:"sub",payload:"",silent:!0}))),this.subscriptions=this.opts.subscriptions||[]}setToQueue(e){this.queue.push(e)}pushQueue(){this.queue.forEach((e=>this.socketSend(e))),this.queue=[]}};function ot(e){let t=Date.now();return new Promise(((n,s)=>{try{let s=new st(e);s.onopen=()=>{s.close(),n({ttl:Date.now()-t,url:e})},s.onerror=()=>{n({ttl:0,url:e})}}catch{s({ttl:0,url:e})}}))}var rt=(e=>(e[e.DisconnectAtWallet=0]="DisconnectAtWallet",e[e.DisconnectAtClient=1]="DisconnectAtClient",e[e.NetworkError=2]="NetworkError",e))(rt||{});function at(e,t){return function(){return e.apply(t,arguments)}}const{toString:ct}=Object.prototype,{getPrototypeOf:lt}=Object,dt=(ut=Object.create(null),e=>{const t=ct.call(e);return ut[t]||(ut[t]=t.slice(8,-1).toLowerCase())});var ut;const ht=e=>(e=e.toLowerCase(),t=>dt(t)===e),pt=e=>t=>typeof t===e,{isArray:mt}=Array,ft=pt("undefined");const gt=ht("ArrayBuffer");const wt=pt("string"),kt=pt("function"),yt=pt("number"),bt=e=>null!==e&&"object"==typeof e,Et=e=>{if("object"!==dt(e))return!1;const t=lt(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Ct=ht("Date"),vt=ht("File"),St=ht("Blob"),At=ht("FileList"),It=ht("URLSearchParams");function xt(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let s,i;if("object"!=typeof e&&(e=[e]),mt(e))for(s=0,i=e.length;s<i;s++)t.call(null,e[s],s,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let r;for(s=0;s<o;s++)r=i[s],t.call(null,e[r],r,e)}}function Ot(e,t){t=t.toLowerCase();const n=Object.keys(e);let s,i=n.length;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const Rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Nt=e=>!ft(e)&&e!==Rt;const Tt=(Mt="undefined"!=typeof Uint8Array&<(Uint8Array),e=>Mt&&e instanceof Mt);var Mt;const _t=ht("HTMLFormElement"),Bt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pt=ht("RegExp"),Dt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};xt(n,((n,i)=>{let o;!1!==(o=t(n,i,e))&&(s[i]=o||n)})),Object.defineProperties(e,s)},jt="abcdefghijklmnopqrstuvwxyz",Lt="0123456789",Ft={DIGIT:Lt,ALPHA:jt,ALPHA_DIGIT:jt+jt.toUpperCase()+Lt};const zt=ht("AsyncFunction");var Ut={isArray:mt,isArrayBuffer:gt,isBuffer:function(e){return null!==e&&!ft(e)&&null!==e.constructor&&!ft(e.constructor)&&kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||kt(e.append)&&("formdata"===(t=dt(e))||"object"===t&&kt(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&>(e.buffer),t},isString:wt,isNumber:yt,isBoolean:e=>!0===e||!1===e,isObject:bt,isPlainObject:Et,isUndefined:ft,isDate:Ct,isFile:vt,isBlob:St,isRegExp:Pt,isFunction:kt,isStream:e=>bt(e)&&kt(e.pipe),isURLSearchParams:It,isTypedArray:Tt,isFileList:At,forEach:xt,merge:function e(){const{caseless:t}=Nt(this)&&this||{},n={},s=(s,i)=>{const o=t&&Ot(n,i)||i;Et(n[o])&&Et(s)?n[o]=e(n[o],s):Et(s)?n[o]=e({},s):mt(s)?n[o]=s.slice():n[o]=s};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&xt(arguments[e],s);return n},extend:(e,t,n,{allOwnKeys:s}={})=>(xt(t,((t,s)=>{n&&kt(t)?e[s]=at(t,n):e[s]=t}),{allOwnKeys:s}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,s)=>{let i,o,r;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)r=i[o],s&&!s(r,e,t)||a[r]||(t[r]=e[r],a[r]=!0);e=!1!==n&<(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:dt,kindOfTest:ht,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return-1!==s&&s===n},toArray:e=>{if(!e)return null;if(mt(e))return e;let t=e.length;if(!yt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=n.next())&&!s.done;){const n=s.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const s=[];for(;null!==(n=e.exec(t));)s.push(n);return s},isHTMLForm:_t,hasOwnProperty:Bt,hasOwnProp:Bt,reduceDescriptors:Dt,freezeMethods:e=>{Dt(e,((t,n)=>{if(kt(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const s=e[n];kt(s)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},s=e=>{e.forEach((e=>{n[e]=!0}))};return mt(e)?s(e):s(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Ot,global:Rt,isContextDefined:Nt,ALPHABET:Ft,generateString:(e=16,t=Ft.ALPHA_DIGIT)=>{let n="";const{length:s}=t;for(;e--;)n+=t[Math.random()*s|0];return n},isSpecCompliantForm:function(e){return!!(e&&kt(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,s)=>{if(bt(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[s]=e;const i=mt(e)?[]:{};return xt(e,((e,t)=>{const o=n(e,s+1);!ft(o)&&(i[t]=o)})),t[s]=void 0,i}}return e};return n(e,0)},isAsyncFn:zt,isThenable:e=>e&&(bt(e)||kt(e))&&kt(e.then)&&kt(e.catch)};function Ht(e,t,n,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i)}Ut.inherits(Ht,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ut.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const qt=Ht.prototype,Vt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Vt[e]={value:e}})),Object.defineProperties(Ht,Vt),Object.defineProperty(qt,"isAxiosError",{value:!0}),Ht.from=(e,t,n,s,i,o)=>{const r=Object.create(qt);return Ut.toFlatObject(e,r,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Ht.call(r,e.message,t,n,s,i),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};function Wt(e){return Ut.isPlainObject(e)||Ut.isArray(e)}function $t(e){return Ut.endsWith(e,"[]")?e.slice(0,-2):e}function Jt(e,t,n){return e?e.concat(t).map((function(e,t){return e=$t(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Qt=Ut.toFlatObject(Ut,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Kt(e,t,n){if(!Ut.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const s=(n=Ut.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ut.isUndefined(t[e])}))).metaTokens,i=n.visitor||l,o=n.dots,r=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ut.isSpecCompliantForm(t);if(!Ut.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Ut.isDate(e))return e.toISOString();if(!a&&Ut.isBlob(e))throw new Ht("Blob is not supported. Use a Buffer instead.");return Ut.isArrayBuffer(e)||Ut.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let a=e;if(e&&!i&&"object"==typeof e)if(Ut.endsWith(n,"{}"))n=s?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ut.isArray(e)&&function(e){return Ut.isArray(e)&&!e.some(Wt)}(e)||(Ut.isFileList(e)||Ut.endsWith(n,"[]"))&&(a=Ut.toArray(e)))return n=$t(n),a.forEach((function(e,s){!Ut.isUndefined(e)&&null!==e&&t.append(!0===r?Jt([n],s,o):null===r?n:n+"[]",c(e))})),!1;return!!Wt(e)||(t.append(Jt(i,n,o),c(e)),!1)}const d=[],u=Object.assign(Qt,{defaultVisitor:l,convertValue:c,isVisitable:Wt});if(!Ut.isObject(e))throw new TypeError("data must be an object");return function e(n,s){if(!Ut.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+s.join("."));d.push(n),Ut.forEach(n,(function(n,o){!0===(!(Ut.isUndefined(n)||null===n)&&i.call(t,n,Ut.isString(o)?o.trim():o,s,u))&&e(n,s?s.concat(o):[o])})),d.pop()}}(e),t}function Gt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Zt(e,t){this._pairs=[],e&&Kt(e,this,t)}const Yt=Zt.prototype;function Xt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function en(e,t,n){if(!t)return e;const s=n&&n.encode||Xt,i=n&&n.serialize;let o;if(o=i?i(t,n):Ut.isURLSearchParams(t)?t.toString():new Zt(t,n).toString(s),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Yt.append=function(e,t){this._pairs.push([e,t])},Yt.toString=function(e){const t=e?function(t){return e.call(this,t,Gt)}:Gt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var tn=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ut.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sn={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Zt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const on="undefined"!=typeof window&&"undefined"!=typeof document,rn=(an="undefined"!=typeof navigator&&navigator.product,on&&["ReactNative","NativeScript","NS"].indexOf(an)<0);var an;const cn="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ln={...Object.freeze({__proto__:null,hasBrowserEnv:on,hasStandardBrowserWebWorkerEnv:cn,hasStandardBrowserEnv:rn}),...sn};function dn(e){function t(e,n,s,i){let o=e[i++];const r=Number.isFinite(+o),a=i>=e.length;if(o=!o&&Ut.isArray(s)?s.length:o,a)return Ut.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!r;s[o]&&Ut.isObject(s[o])||(s[o]=[]);return t(e,n,s[o],i)&&Ut.isArray(s[o])&&(s[o]=function(e){const t={},n=Object.keys(e);let s;const i=n.length;let o;for(s=0;s<i;s++)o=n[s],t[o]=e[o];return t}(s[o])),!r}if(Ut.isFormData(e)&&Ut.isFunction(e.entries)){const n={};return Ut.forEachEntry(e,((e,s)=>{t(function(e){return Ut.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),s,n,0)})),n}return null}const un={transitional:nn,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=Ut.isObject(e);i&&Ut.isHTMLForm(e)&&(e=new FormData(e));if(Ut.isFormData(e))return s&&s?JSON.stringify(dn(e)):e;if(Ut.isArrayBuffer(e)||Ut.isBuffer(e)||Ut.isStream(e)||Ut.isFile(e)||Ut.isBlob(e))return e;if(Ut.isArrayBufferView(e))return e.buffer;if(Ut.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Kt(e,new ln.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,s){return ln.isNode&&Ut.isBuffer(e)?(this.append(t,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Ut.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Kt(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),function(e,t,n){if(Ut.isString(e))try{return(t||JSON.parse)(e),Ut.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||un.transitional,n=t&&t.forcedJSONParsing,s="json"===this.responseType;if(e&&Ut.isString(e)&&(n&&!this.responseType||s)){const n=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Ht.from(e,Ht.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ln.classes.FormData,Blob:ln.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ut.forEach(["delete","get","head","post","put","patch"],(e=>{un.headers[e]={}}));var hn=un;const pn=Ut.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const mn=Symbol("internals");function fn(e){return e&&String(e).trim().toLowerCase()}function gn(e){return!1===e||null==e?e:Ut.isArray(e)?e.map(gn):String(e)}function wn(e,t,n,s,i){return Ut.isFunction(s)?s.call(this,t,n):(i&&(t=n),Ut.isString(t)?Ut.isString(s)?-1!==t.indexOf(s):Ut.isRegExp(s)?s.test(t):void 0:void 0)}class kn{constructor(e){e&&this.set(e)}set(e,t,n){const s=this;function i(e,t,n){const i=fn(t);if(!i)throw new Error("header name must be a non-empty string");const o=Ut.findKey(s,i);(!o||void 0===s[o]||!0===n||void 0===n&&!1!==s[o])&&(s[o||t]=gn(e))}const o=(e,t)=>Ut.forEach(e,((e,n)=>i(e,n,t)));return Ut.isPlainObject(e)||e instanceof this.constructor?o(e,t):Ut.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,s,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),s=e.substring(i+1).trim(),!n||t[n]&&pn[n]||("set-cookie"===n?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=fn(e)){const n=Ut.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}(e);if(Ut.isFunction(t))return t.call(this,e,n);if(Ut.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=fn(e)){const n=Ut.findKey(this,e);return!(!n||void 0===this[n]||t&&!wn(0,this[n],n,t))}return!1}delete(e,t){const n=this;let s=!1;function i(e){if(e=fn(e)){const i=Ut.findKey(n,e);!i||t&&!wn(0,n[i],i,t)||(delete n[i],s=!0)}}return Ut.isArray(e)?e.forEach(i):i(e),s}clear(e){const t=Object.keys(this);let n=t.length,s=!1;for(;n--;){const i=t[n];e&&!wn(0,this[i],i,e,!0)||(delete this[i],s=!0)}return s}normalize(e){const t=this,n={};return Ut.forEach(this,((s,i)=>{const o=Ut.findKey(n,i);if(o)return t[o]=gn(s),void delete t[i];const r=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(i):String(i).trim();r!==i&&delete t[i],t[r]=gn(s),n[r]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ut.forEach(this,((n,s)=>{null!=n&&!1!==n&&(t[s]=e&&Ut.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[mn]=this[mn]={accessors:{}}).accessors,n=this.prototype;function s(e){const s=fn(e);t[s]||(!function(e,t){const n=Ut.toCamelCase(" "+t);["get","set","has"].forEach((s=>{Object.defineProperty(e,s+n,{value:function(e,n,i){return this[s].call(this,t,e,n,i)},configurable:!0})}))}(n,e),t[s]=!0)}return Ut.isArray(e)?e.forEach(s):s(e),this}}kn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ut.reduceDescriptors(kn.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Ut.freezeMethods(kn);var yn=kn;function bn(e,t){const n=this||hn,s=t||n,i=yn.from(s.headers);let o=s.data;return Ut.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function En(e){return!(!e||!e.__CANCEL__)}function Cn(e,t,n){Ht.call(this,null==e?"canceled":e,Ht.ERR_CANCELED,t,n),this.name="CanceledError"}Ut.inherits(Cn,Ht,{__CANCEL__:!0});var vn=ln.hasStandardBrowserEnv?{write(e,t,n,s,i,o){const r=[e+"="+encodeURIComponent(t)];Ut.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),Ut.isString(s)&&r.push("path="+s),Ut.isString(i)&&r.push("domain="+i),!0===o&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Sn(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var An=ln.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function s(n){let s=n;return e&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=s(window.location.href),function(e){const t=Ut.isString(e)?s(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function In(e,t){let n=0;const s=function(e,t){e=e||10;const n=new Array(e),s=new Array(e);let i,o=0,r=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=s[r];i||(i=c),n[o]=a,s[o]=c;let d=r,u=0;for(;d!==o;)u+=n[d++],d%=e;if(o=(o+1)%e,o===r&&(r=(r+1)%e),c-i<t)return;const h=l&&c-l;return h?Math.round(1e3*u/h):void 0}}(50,250);return i=>{const o=i.loaded,r=i.lengthComputable?i.total:void 0,a=o-n,c=s(a);n=o;const l={loaded:o,total:r,progress:r?o/r:void 0,bytes:a,rate:c||void 0,estimated:c&&r&&o<=r?(r-o)/c:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}const xn={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let s=e.data;const i=yn.from(e.headers).normalize();let o,r,{responseType:a,withXSRFToken:c}=e;function l(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(Ut.isFormData(s))if(ln.hasStandardBrowserEnv||ln.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(r=i.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let d=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const u=Sn(e.baseURL,e.url);function h(){if(!d)return;const s=yn.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders());!function(e,t,n){const s=n.config.validateStatus;n.status&&s&&!s(n.status)?t(new Ht("Request failed with status code "+n.status,[Ht.ERR_BAD_REQUEST,Ht.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),l()}),(function(e){n(e),l()}),{data:a&&"text"!==a&&"json"!==a?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:s,config:e,request:d}),d=null}if(d.open(e.method.toUpperCase(),en(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(h)},d.onabort=function(){d&&(n(new Ht("Request aborted",Ht.ECONNABORTED,e,d)),d=null)},d.onerror=function(){n(new Ht("Network Error",Ht.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const s=e.transitional||nn;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Ht(t,s.clarifyTimeoutError?Ht.ETIMEDOUT:Ht.ECONNABORTED,e,d)),d=null},ln.hasStandardBrowserEnv&&(c&&Ut.isFunction(c)&&(c=c(e)),c||!1!==c&&An(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&vn.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===s&&i.setContentType(null),"setRequestHeader"in d&&Ut.forEach(i.toJSON(),(function(e,t){d.setRequestHeader(t,e)})),Ut.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),a&&"json"!==a&&(d.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",In(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",In(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{d&&(n(!t||t.type?new Cn(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);p&&-1===ln.protocols.indexOf(p)?n(new Ht("Unsupported protocol "+p+":",Ht.ERR_BAD_REQUEST,e)):d.send(s||null)}))}};Ut.forEach(xn,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const On=e=>`- ${e}`,Rn=e=>Ut.isFunction(e)||null===e||!1===e;var Nn={getAdapter:e=>{e=Ut.isArray(e)?e:[e];const{length:t}=e;let n,s;const i={};for(let o=0;o<t;o++){let t;if(n=e[o],s=n,!Rn(n)&&(s=xn[(t=String(n)).toLowerCase()],void 0===s))throw new Ht(`Unknown adapter '${t}'`);if(s)break;i[t||"#"+o]=s}if(!s){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new Ht("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(On).join("\n"):" "+On(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return s},adapters:xn};function Tn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Cn(null,e)}function Mn(e){Tn(e),e.headers=yn.from(e.headers),e.data=bn.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Nn.getAdapter(e.adapter||hn.adapter)(e).then((function(t){return Tn(e),t.data=bn.call(e,e.transformResponse,t),t.headers=yn.from(t.headers),t}),(function(t){return En(t)||(Tn(e),t&&t.response&&(t.response.data=bn.call(e,e.transformResponse,t.response),t.response.headers=yn.from(t.response.headers))),Promise.reject(t)}))}const _n=e=>e instanceof yn?e.toJSON():e;function Bn(e,t){t=t||{};const n={};function s(e,t,n){return Ut.isPlainObject(e)&&Ut.isPlainObject(t)?Ut.merge.call({caseless:n},e,t):Ut.isPlainObject(t)?Ut.merge({},t):Ut.isArray(t)?t.slice():t}function i(e,t,n){return Ut.isUndefined(t)?Ut.isUndefined(e)?void 0:s(void 0,e,n):s(e,t,n)}function o(e,t){if(!Ut.isUndefined(t))return s(void 0,t)}function r(e,t){return Ut.isUndefined(t)?Ut.isUndefined(e)?void 0:s(void 0,e):s(void 0,t)}function a(n,i,o){return o in t?s(n,i):o in e?s(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(e,t)=>i(_n(e),_n(t),!0)};return Ut.forEach(Object.keys(Object.assign({},e,t)),(function(s){const o=c[s]||i,r=o(e[s],t[s],s);Ut.isUndefined(r)&&o!==a||(n[s]=r)})),n}const Pn="1.6.2",Dn={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Dn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const jn={};Dn.transitional=function(e,t,n){function s(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new Ht(s(i," has been removed"+(t?" in "+t:"")),Ht.ERR_DEPRECATED);return t&&!jn[i]&&(jn[i]=!0,console.warn(s(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};var Ln={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ht("options must be an object",Ht.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const o=s[i],r=t[o];if(r){const t=e[o],n=void 0===t||r(t,o,e);if(!0!==n)throw new Ht("option "+o+" must be "+n,Ht.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ht("Unknown option "+o,Ht.ERR_BAD_OPTION)}},validators:Dn};const Fn=Ln.validators;class zn{constructor(e){this.defaults=e,this.interceptors={request:new tn,response:new tn}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Bn(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:i}=t;void 0!==n&&Ln.assertOptions(n,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean)},!1),null!=s&&(Ut.isFunction(s)?t.paramsSerializer={serialize:s}:Ln.assertOptions(s,{encode:Fn.function,serialize:Fn.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Ut.merge(i.common,i[t.method]);i&&Ut.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=yn.concat(o,i);const r=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[Mn.bind(this),void 0];for(e.unshift.apply(e,r),e.push.apply(e,c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=r.length;let h=t;for(u=0;u<d;){const e=r[u++],t=r[u++];try{h=e(h)}catch(e){t.call(this,e);break}}try{l=Mn.call(this,h)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return en(Sn((e=Bn(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Ut.forEach(["delete","get","head","options"],(function(e){zn.prototype[e]=function(t,n){return this.request(Bn(n||{},{method:e,url:t,data:(n||{}).data}))}})),Ut.forEach(["post","put","patch"],(function(e){function t(t){return function(n,s,i){return this.request(Bn(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}zn.prototype[e]=t(),zn.prototype[e+"Form"]=t(!0)}));var Un=zn;class Hn{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const s=new Promise((e=>{n.subscribe(e),t=e})).then(e);return s.cancel=function(){n.unsubscribe(t)},s},e((function(e,s,i){n.reason||(n.reason=new Cn(e,s,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Hn((function(t){e=t}));return{token:t,cancel:e}}}var qn=Hn;const Vn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vn).forEach((([e,t])=>{Vn[t]=e}));var Wn=Vn;const $n=function e(t){const n=new Un(t),s=at(Un.prototype.request,n);return Ut.extend(s,Un.prototype,n,{allOwnKeys:!0}),Ut.extend(s,n,null,{allOwnKeys:!0}),s.create=function(n){return e(Bn(t,n))},s}(hn);$n.Axios=Un,$n.CanceledError=Cn,$n.CancelToken=qn,$n.isCancel=En,$n.VERSION=Pn,$n.toFormData=Kt,$n.AxiosError=Ht,$n.Cancel=$n.CanceledError,$n.all=function(e){return Promise.all(e)},$n.spread=function(e){return function(t){return e.apply(null,t)}},$n.isAxiosError=function(e){return Ut.isObject(e)&&!0===e.isAxiosError},$n.mergeConfig=Bn,$n.AxiosHeaders=yn,$n.formToJSON=e=>dn(Ut.isHTMLForm(e)?new FormData(e):e),$n.getAdapter=Nn.getAdapter,$n.HttpStatusCode=Wn,$n.default=$n;var Jn=$n,Qn="connect-session",Kn="connect-domains",Gn=["https://rpc.ankr.com/bsc","https://binance.nodereal.io","https://bscrpc.com","https://bsc-dataseed2.ninicoin.io"],Zn=class extends p{pending=!1;callbacks=new Map;clientMeta;relay;_key=null;_clientId="";_peerId="";_peerMeta=null;_handshakeId=0;_handshakeTopic="";_connected=!1;_accounts=[];_chainId="0x0";set key(e){if(!e)return;let t=T(e);this._key=t}get key(){return this._key?M(this._key,!0):""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=A()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return`wc:${this.handshakeTopic}@1?bridge=${this.relay}&key=${this.key}&scene=bid`}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set connected(e){}get connected(){return this._connected}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,relay:this.relay,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.relay=e.relay,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}},Yn=class extends Zn{getStorageSession(){try{return m(Qn)}catch{}return null}setStorageSession(){f(Qn,this.session)}removeStorageSession(){N(Qn)}manageStorageSession(){this._connected?this.setStorageSession():this.removeStorageSession()}};var Xn=Promise.resolve([]);if(!c()){let e=m(Kn);Xn=Promise.resolve(e),(!e||0===e.length)&&(Xn=async function(){let e=await async function(){let e=await Promise.race(Gn.map((e=>Jn.request({url:e,method:"POST",data:{jsonrpc:"2.0",id:Date.now(),method:"eth_call",params:[{to:"0x76054B318785b588A3164B2A6eA5476F7cBA51e0",data:"0x97b5f450"},"latest"]}})))),t=new J(["function apiDomains() view returns (string)"]);return g(t.decodeFunctionResult("apiDomains",e.data.result)[0]).split(",")}(),t=await Promise.all(e.map((e=>ot(`wss://nbstream.${e.split(".").slice(1).join(".")}/wallet-connector`))));return function(e){return e.filter((e=>e.ttl>0)).sort(((e,t)=>e.ttl-t.ttl)).map((e=>e.url))}(t)}().then((e=>(console.log("🚀 ~ file: relay.ts:63 ~ .then ~ domains:",e),f(Kn,e),e))).catch((()=>[])))}function es(){N(Kn)}var ts=class extends Yn{transport;lng;constructor(){super(),this.clientMeta=w();let e=this.getStorageSession();e&&(this.session=e),this.handshakeId&&this.subscribeToSessionResponse(this.handshakeId),this.initTransport(),this.subscribeInternalEvent()}async request(e){if(!this.connected)throw new k(y.PROVIDER_NOT_READY.code,y.PROVIDER_NOT_READY.message);if(b.indexOf(e.method)<0)throw new k(E.METHOD_NOT_SUPPORT.code,E.METHOD_NOT_SUPPORT.message);switch(e.method){case"eth_requestAccounts":case"eth_accounts":return this.accounts;case"eth_chainId":return v(this.chainId);case"eth_signTransaction":case"eth_sendTransaction":case"eth_sign":case"personal_sign":case"eth_signTypedData":case"eth_signTypedData_v1":case"eth_signTypedData_v2":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"wallet_switchEthereumChain":case"wallet_watchAsset":return new Promise(((t,n)=>{e.id||(e.id=C()),this.callbacks.set(`response-${e.id}`,((e,s)=>{e?n(function(e){return-32050===e.code||-32e3===e.code||1e3===e.code?new k(E.REJECT_ERR.code,E.REJECT_ERR.message):-32603===e.code?new k(I.INTERNAL_ERR.code,I.INTERNAL_ERR.message):-32600===e.code||-32602===e.code?new k(E.INVALID_PARAM.code,E.INVALID_PARAM.message):e}(e)):s?t(s.result):n(new k(E.MISSING_RESPONSE.code,E.MISSING_RESPONSE.message))})),this.sendRequest(e),this.events.emit("call_request_sent")}))}}killSession(){if(!this.connected)return;let e={id:C(),method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]};this.sendRequest(e),this.handleSessionDisconnect(rt.DisconnectAtClient)}async connect({chainId:e,lng:t}={}){return this.lng=t,this.connected?{chainId:this.chainId,accounts:this.accounts}:new Promise(((t,n)=>{this.on("modal_closed",(e=>{n(e)})),this.on("session_error",(e=>{n(e)})),this.on("connect",(e=>{t(e)})),this.createSession(e)}))}createSession(e){try{if(this.connected)throw new k(y.CONNECTED.code,y.CONNECTED.message);if(this.pending||this._handshakeTopic)throw new k(y.CONNECTING.code,y.CONNECTING.message);this.pending=!0,this._key=S(),this.handshakeId=C(),this.handshakeTopic=A();let t={id:this.handshakeId,method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e?Number(e):null}]};this.sendRequest(t,this.handshakeTopic),this.subscribeToSessionResponse(this.handshakeId),this.events.emit("display_uri")}catch(e){this.pending=!1;let t=`response-${this.handshakeId}`;this.callbacks.get(t)&&this.callbacks.delete(t);let s=e.message,i=e instanceof k?e:new k(I.INTERNAL_ERR.code,`${I.INTERNAL_ERR.message}: ${s}`);throw this.handleRejectSessionConnection(i),n.error(`[binance-w3w] create connection failed: ${s}`),i}}async initTransport(){this.transport=new it({version:1,subscriptions:[this.clientId]}),this.transport.on("message",(e=>this.setIncomingMessages(e))),this.transport.on("open",(e=>{this.events.emit("transport_open",e)})),this.transport.on("close",(()=>{this.events.emit("transport_close")})),this.transport.on("error",((e,t)=>{this.events.emit("transport_error",e,t)}));try{if(this.session.relay)this.transport.open([this.session.relay]);else{let e=await async function(){let e=await Xn;return 0===e.length&&e.push("wss://nbstream.binance.com/wallet-connector"),e}();this.transport.open(e)}}catch(e){es();let t=e.message,n=new k(I.INTERNAL_ERR.code,`${I.INTERNAL_ERR.message}: ${t}`);throw this.handleRejectSessionConnection(n),n}}setIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let t;try{t=JSON.parse(e.payload)}catch{return}let s=this.decrypt(t);if(!s)return;if("method"in s&&s.method)return void this.events.emit(s.method,null,s);let i=s.id,o=`response-${i}`,r=this.callbacks.get(o);if(r){if("error"in s&&s.error){r(new k(s.error.code,s.error.message),null)}else"result"in s&&s.result&&r(null,s);this.callbacks.delete(o)}else n.error(`[binance-w3w] callback id: ${i} not found`)}encrypt(e){let t=this._key;return t?x(e,t):null}decrypt(e){let t=this._key;return t?O(e,t):null}sendRequest(e,t){let n=R(e.method,e.params,e.id),s=this.encrypt(n),i=t||this.peerId,o=JSON.stringify(s);this.transport.send(o,i,!0)}subscribeInternalEvent(){this.on("display_uri",(()=>{nt.open({cb:()=>{this.events.emit("modal_closed",new k(y.CLOSE_MODAL.code,y.CLOSE_MODAL.message))},lng:this.lng}),this.transport.connected?nt.ready(this.uri):this.transport.retryFailed&&nt.fail()})),this.on("transport_open",(e=>{this.relay=e,nt.ready(this.uri)})),this.on("transport_error",((e,t)=>{t?function(e){let t=m(Kn);if(!t)return;let n=t.filter((t=>t!==e));f(Kn,n)}(function(e){let t=e.indexOf("?");return t>-1?e.slice(0,t):e}(t)):(es(),nt.fail())})),this.on("modal_closed",(()=>{let e=`response-${this.handshakeId}`;this.callbacks.get(e)&&this.callbacks.delete(e),this.clearConnectionStatus()})),this.on("connect",(()=>{this.pending=!1,nt.close()})),this.on("call_request_sent",(()=>{u()})),this.on("wc_sessionUpdate",((e,t)=>{e?this.handleSessionResponse():t.params&&Array.isArray(t.params)?this.handleSessionResponse(t.params[0]):t.error&&this.handleSessionResponse()}))}subscribeToSessionResponse(e){this.callbacks.set(`response-${e}`,((e,t)=>{e?this.handleSessionResponse():t&&(t.result?this.handleSessionResponse(t.result):(t.error&&t.error.message,this.handleSessionResponse()))}))}handleSessionResponse(e){e?e.approved?(this._connected?(e.chainId&&this.setChainId(e.chainId),e.accounts&&this.setAddress(e.accounts)):(this._connected=!0,e.chainId&&this.setChainId(e.chainId),e.accounts&&this.setAddress(e.accounts),e.peerId&&!this.peerId&&(this.peerId=e.peerId),e.peerMeta&&!this.peerMeta&&(this.peerMeta=e.peerMeta),this.events.emit("connect",{chainId:this.chainId,accounts:this.accounts})),this.manageStorageSession()):this.connected?this.handleSessionDisconnect(rt.DisconnectAtWallet):this.handleRejectSessionConnection(new k(y.REJECT_SESSION.code,y.REJECT_SESSION.message)):this.handleRejectSessionConnection(new k(y.REJECT_SESSION.code,y.REJECT_SESSION.message))}handleRejectSessionConnection(e){nt.close(),this.clearConnectionStatus(),this.events.emit("session_error",e)}handleSessionDisconnect(e){this._connected||nt.close(),this.events.emit("disconnect",e),this.clearConnectionStatus()}clearConnectionStatus(){this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._clientId&&(this._clientId=""),this.pending&&(this.pending=!1),this.callbacks.clear(),this._peerMeta=null,this._accounts=[],this._chainId="0x0",this.offConnectEvents(),this.removeStorageSession(),this.transport.close()}offConnectEvents(){this.removeListener("connect")}setChainId(e){let t=v(e);"0x0"!==t?(typeof this.chainId<"u"&&this.chainId!==t&&this.events.emit("chainChanged",t),this.chainId=t):this.chainId=t}setAddress(e=[]){let t=e.filter((e=>"string"==typeof e)).map((e=>e.toLowerCase())).filter(Boolean);JSON.stringify(this.accounts)!==JSON.stringify(t)&&this.events.emit("accountsChanged",t),this.accounts=t}},ns=class extends p{accounts=[];coreConnection;constructor(){super(),this.register()}get chainId(){return this.coreConnection?this.coreConnection.chainId:"0x0"}get connected(){return!!this.coreConnection&&this.coreConnection.connected}get connecting(){return!!this.coreConnection&&this.coreConnection.pending}async open({requestChainId:e,lng:t}){if(this.register(),this.coreConnection.connected)return;let{accounts:n}=await this.coreConnection.connect({chainId:e,lng:t});this.accounts=n}async request(e){return this.connected||await this.open({}),this.coreConnection.request(e)}disconnect(){this.connected&&(this.coreConnection.killSession(),this.onClose(rt.DisconnectAtClient))}register(){if(this.coreConnection)return this.coreConnection;this.coreConnection=new ts,this.accounts=this.coreConnection.accounts,this.subscribeEvents()}subscribeEvents(){this.coreConnection.on("chainChanged",(e=>{this.events.emit("chainChanged",e)})),this.coreConnection.on("accountsChanged",(e=>{this.accounts=e,this.events.emit("accountsChanged",e)})),this.coreConnection.on("disconnect",(e=>{this.onClose(e)}))}onClose(e){this.coreConnection=null,this.events.emit("disconnect",e)}},ss=c=>{if(_()){let e=typeof window<"u"?window.ethereum:void 0;if(e)return e.setLng=()=>{},e.disconnect=()=>{},e}return new class{events=new t;signClient;rpc;httpClient;optsChainId;lng;constructor(e){this.rpc={infuraId:e?.infuraId,custom:e?.rpc},this.optsChainId=e?.chainId||56,this.lng=e?.lng||"en",this.signClient=new ns,this.registerEventListeners(),this.httpClient=this.setHttpProvider(this.optsChainId)}get connected(){return this.signClient.connected}get connector(){return this.signClient}get accounts(){return this.signClient.accounts}get chainId(){return n.debug("provider get chainId",this.signClient.chainId),this.signClient.chainId}get rpcUrl(){return this.httpClient.url||""}async request(e){switch(n.debug("ethereum-provider request",e),e.method){case"eth_requestAccounts":return await this.connect(),this.accounts;case"eth_chainId":return this.chainId;case"eth_accounts":return this.accounts}let t=R(e.method,e.params||[]);if(b.includes(e.method))return this.signClient.request(t);if(typeof this.httpClient>"u")throw new Error(`Cannot request JSON-RPC method (${e.method}) without provided rpc url`);let s=await this.httpClient.request(t);if(B(s))return s.result;throw new Error(s.error.message)}async signMessage(e){return n.debug("signMessage",e),this.accounts.length||await this.enable(),await this.request({method:"personal_sign",params:[P(e),this.accounts[0]]})}sendAsync(e,t){this.request(e).then((e=>t(null,e))).catch((e=>t(e,void 0)))}setLng(e){this.lng=e}async enable(e){return await this.connect(e),this.accounts}async connect(e){this.connected?n.info("already connected"):await this.signClient.open({requestChainId:e?.toString()??this.optsChainId.toString(),lng:this.lng})}disconnect(){this.connected&&this.signClient.disconnect()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}registerEventListeners(){this.signClient.on("accountsChanged",(e=>{this.events.emit("accountsChanged",e)})),this.signClient.on("chainChanged",(e=>{this.httpClient=this.setHttpProvider(e),this.events.emit("chainChanged",e)})),this.signClient.on("disconnect",(()=>{this.events.emit("disconnect")}))}setHttpProvider(c){let l=D(c,this.rpc);if(!(typeof l>"u"))return new class{constructor(t){if(this.url=t,!e(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);this.url=t}events=new t;isAvailable=!1;registering=!1;get connected(){return this.isAvailable}get connecting(){return this.registering}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async request(e){n.debug("HttpClient ~ request ~ payload:",e),this.isAvailable||await this.register();try{let t=s(e),r=await(await i(this.url,{...K,body:t})).json(),a="string"==typeof r?o(r):r;return n.debug("HttpClient ~ request ~ result:",a),a}catch(t){return this.formatError(e.id,t)}}formatError(e,t){let n=this.parseError(t),s=n.message||n.toString();return r(e,s)}async register(t=this.url){if(!e(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);if(this.registering)return new Promise(((e,t)=>{this.events.once("register_error",(e=>{t(e)})),this.events.once("open",(()=>{if(typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}));this.url=t,this.registering=!0;try{let e=s({id:1,jsonrpc:"2.0",method:"test",params:[]});await i(t,{...K,body:e}),this.onOpen()}catch(e){let t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("open")}parseError(e,t=this.url){return a(e,t,"HTTP")}}(l)}}(c)};function is(e,t){return j(this,void 0,void 0,(function*(){const n=yield ss({chainId:e.chainId,rpc:e.rpc});yield n.enable(),n.on("connect",t.connect),n.on("disconnect",t.disconnect),n.on("accountsChanged",t.accountsChanged),n.on("chainChanged",t.chainChanged),n.on("message",t.message);return L(n)}))}export{is as default};
|