-
Notifications
You must be signed in to change notification settings - Fork 0
/
4428.727fbb5b7c0f22e52b52.js
189 lines (173 loc) · 896 KB
/
4428.727fbb5b7c0f22e52b52.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
(self.webpackChunktimeless_frontend=self.webpackChunktimeless_frontend||[]).push([[4428],{24428:function(Gk,g3,s_){var ue=s_(31325).default;!function(Yi){"use strict";let zp=!1;const Wa=_=>(m,...h)=>{zp&&console.debug(`[${_}] ${m}`,...h)},a_=_=>(m,...h)=>{console.error(`[${_}] ${m}`,...h)};class y3 extends Error{constructor(){super(),this.name=this.constructor.name,this.message="The Ledger Extension was not found."}}class m3 extends Error{constructor(){super(),this.name=this.constructor.name,this.message="The specified provider is not supported."}}class u_ extends Error{constructor(){super(),this.name=this.constructor.name,this.code=4001,this.message="User rejected request"}}class v3 extends Error{constructor(){super(),this.message="Connect Kit does not support server side."}}function Bi(_,m,h,c){return new(h||(h=Promise))(function(f,v){function y(p){try{R(c.next(p))}catch(d){v(d)}}function E(p){try{R(c.throw(p))}catch(d){v(d)}}function R(p){var d;p.done?f(p.value):(d=p.value,d instanceof h?d:new h(function(O){O(d)})).then(y,E)}R((c=c.apply(_,m||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;var wr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function J1(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}function c_(_){var m=_.default;if("function"==typeof m){var h=function(){return m.apply(this,arguments)};h.prototype=m.prototype}else h={};return Object.defineProperty(h,"__esModule",{value:!0}),Object.keys(_).forEach(function(c){var f=Object.getOwnPropertyDescriptor(_,c);Object.defineProperty(h,c,f.get?f:{enumerable:!0,get:function(){return _[c]}})}),h}var l_={exports:{}};l_.exports=function(h){var c={};function f(v){if(c[v])return c[v].exports;var y=c[v]={i:v,l:!1,exports:{}};return h[v].call(y.exports,y,y.exports,f),y.l=!0,y.exports}return f.m=h,f.c=c,f.d=function(v,y,E){f.o(v,y)||Object.defineProperty(v,y,{enumerable:!0,get:E})},f.r=function(v){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})},f.t=function(v,y){if(1&y&&(v=f(v)),8&y||4&y&&"object"==typeof v&&v&&v.__esModule)return v;var E=Object.create(null);if(f.r(E),Object.defineProperty(E,"default",{enumerable:!0,value:v}),2&y&&"string"!=typeof v)for(var R in v)f.d(E,R,function(p){return v[p]}.bind(null,R));return E},f.n=function(v){var y=v&&v.__esModule?function(){return v.default}:function(){return v};return f.d(y,"a",y),y},f.o=function(v,y){return Object.prototype.hasOwnProperty.call(v,y)},f.p="",f(f.s=63)}([function(h,c,f){(function(v){f.d(c,"f",function(){return d}),f.d(c,"g",function(){return O}),f.d(c,"i",function(){return L}),f.d(c,"h",function(){return P}),f.d(c,"b",function(){return N}),f.d(c,"c",function(){return M}),f.d(c,"e",function(){return V}),f.d(c,"d",function(){return Z}),f.d(c,"o",function(){return x}),f.d(c,"n",function(){return W}),f.d(c,"q",function(){return H}),f.d(c,"p",function(){return J}),f.d(c,"D",function(){return K}),f.d(c,"C",function(){return le}),f.d(c,"E",function(){return z}),f.d(c,"F",function(){return B}),f.d(c,"w",function(){return ie}),f.d(c,"v",function(){return xe}),f.d(c,"x",function(){return Me}),f.d(c,"y",function(){return Oe}),f.d(c,"t",function(){return ne}),f.d(c,"s",function(){return de}),f.d(c,"u",function(){return ve}),f.d(c,"r",function(){return Re}),f.d(c,"m",function(){return Se}),f.d(c,"l",function(){return Fe}),f.d(c,"k",function(){return $e}),f.d(c,"j",function(){return ke}),f.d(c,"A",function(){return gt}),f.d(c,"a",function(){return It}),f.d(c,"B",function(){return Bt}),f.d(c,"z",function(){return D});var y=f(22),E=f.n(y),R=f(58),p=f.n(R);function d(q){return new Uint8Array(q)}function O(q,Ee=!1){const Le=q.toString("hex");return Ee?It(Le):Le}function L(q){return q.toString("utf8")}function P(q){return q.readUIntBE(0,q.length)}function N(q){return p()(q)}function M(q,Ee=!1){return O(N(q),Ee)}function V(q){return L(N(q))}function Z(q){return P(N(q))}function x(q){return v.from(gt(q),"hex")}function W(q){return d(x(q))}function H(q){return L(x(q))}function J(q){return Z(W(q))}function K(q){return v.from(q,"utf8")}function le(q){return d(K(q))}function z(q,Ee=!1){return O(K(q),Ee)}function B(q){const Ee=parseInt(q,10);return function(Le,je){if(!Le)throw new Error("Number can only safely store up to 53 bits")}(!(void 0===Ee)),Ee}function ie(q){return N(oe(we(q)))}function xe(q){return oe(we(q))}function Me(q,Ee){return function(q,Ee){return M(oe(q),Ee)}(we(q),Ee)}function Oe(q){return""+q}function we(q){return Ve((q>>>0).toString(2))}function oe(q){return new Uint8Array(function(q,Ee=8){const Le=Ve(q).match(new RegExp(`.{${Ee}}`,"gi"));return Array.from(Le||[])}(q).map(Ee=>parseInt(Ee,2)))}function ne(q,Ee){return!("string"!=typeof q||!q.match(/^0x[0-9A-Fa-f]*$/)||Ee&&q.length!==2+2*Ee)}function de(q){return v.isBuffer(q)}function ve(q){return E.a.strict(q)&&!de(q)}function Re(q){return!ve(q)&&!de(q)&&void 0!==q.byteLength}function Se(q){return de(q)?"buffer":ve(q)?"typed-array":Re(q)?"array-buffer":Array.isArray(q)?"array":typeof q}function Fe(q){return"string"==typeof(Ee=q)&&new RegExp(/^[01]+$/).test(Ee)&&Ee.length%8==0?"binary":ne(q)?"hex":"utf8";var Ee}function $e(...q){return v.concat(q)}function ke(...q){let Ee=[];return q.forEach(Le=>Ee=Ee.concat(Array.from(Le))),new Uint8Array([...Ee])}function Ve(q,Ee=8,Le="0"){return function(je,ft,_t="0"){return function(q,Ee,Le,je="0"){const ft=Ee-q.length;let _t=q;if(ft>0){const Tt=je.repeat(ft);_t=Le?Tt+q:q+Tt}return _t}(je,ft,!0,_t)}(q,function(je,ft=8){const _t=je%ft;return _t?(je-_t)/ft*ft+ft:je}(q.length,Ee),Le)}function gt(q){return q.replace(/^0x/,"")}function It(q){return q.startsWith("0x")?q:"0x"+q}function Bt(q){return(q=Ve(q=gt(q),2))&&(q=It(q)),q}function D(q){const Ee=q.startsWith("0x");return q=(q=gt(q)).startsWith("0")?q.substring(1):q,Ee?It(q):q}}).call(this,f(44).Buffer)},function(h,c,f){f.r(c),f.d(c,"convertArrayBufferToBuffer",function(){return y}),f.d(c,"convertArrayBufferToUtf8",function(){return E}),f.d(c,"convertArrayBufferToHex",function(){return R}),f.d(c,"convertArrayBufferToNumber",function(){return p}),f.d(c,"concatArrayBuffers",function(){return d}),f.d(c,"convertBufferToArrayBuffer",function(){return O}),f.d(c,"convertBufferToUtf8",function(){return L}),f.d(c,"convertBufferToHex",function(){return P}),f.d(c,"convertBufferToNumber",function(){return N}),f.d(c,"concatBuffers",function(){return M}),f.d(c,"convertUtf8ToArrayBuffer",function(){return V}),f.d(c,"convertUtf8ToBuffer",function(){return Z}),f.d(c,"convertUtf8ToHex",function(){return x}),f.d(c,"convertUtf8ToNumber",function(){return W}),f.d(c,"convertHexToBuffer",function(){return H}),f.d(c,"convertHexToArrayBuffer",function(){return J}),f.d(c,"convertHexToUtf8",function(){return K}),f.d(c,"convertHexToNumber",function(){return le}),f.d(c,"convertNumberToBuffer",function(){return z}),f.d(c,"convertNumberToArrayBuffer",function(){return B}),f.d(c,"convertNumberToUtf8",function(){return ie}),f.d(c,"convertNumberToHex",function(){return xe}),f.d(c,"detectEnv",function(){return Ve}),f.d(c,"detectOS",function(){return gt}),f.d(c,"isAndroid",function(){return It}),f.d(c,"isIOS",function(){return Bt}),f.d(c,"isMobile",function(){return D}),f.d(c,"isNode",function(){return $}),f.d(c,"isBrowser",function(){return q}),f.d(c,"safeJsonParse",function(){return Le}),f.d(c,"safeJsonStringify",function(){return je}),f.d(c,"setLocal",function(){return ft}),f.d(c,"getLocal",function(){return _t}),f.d(c,"removeLocal",function(){return Tt}),f.d(c,"getClientMeta",function(){return Mt}),f.d(c,"sanitizeHex",function(){return At}),f.d(c,"addHexPrefix",function(){return Xt}),f.d(c,"removeHexPrefix",function(){return Kn}),f.d(c,"removeHexLeadingZeros",function(){return dr}),f.d(c,"payloadId",function(){return Vn}),f.d(c,"uuid",function(){return Qn}),f.d(c,"logDeprecationWarning",function(){return Br}),f.d(c,"getInfuraRpcUrl",function(){return Er}),f.d(c,"getRpcUrl",function(){return Ga}),f.d(c,"formatIOSMobile",function(){return Bu}),f.d(c,"saveMobileLinkInfo",function(){return pa}),f.d(c,"getMobileRegistryEntry",function(){return cs}),f.d(c,"getMobileLinkRegistry",function(){return $o}),f.d(c,"promisify",function(){return Ya}),f.d(c,"formatRpcError",function(){return ga}),f.d(c,"getWalletRegistryUrl",function(){return Ji}),f.d(c,"getDappRegistryUrl",function(){return ya}),f.d(c,"formatMobileRegistryEntry",function(){return Ds}),f.d(c,"formatMobileRegistry",function(){return Qa}),f.d(c,"isWalletConnectSession",function(){return ma}),f.d(c,"parseWalletConnectUri",function(){return Bs}),f.d(c,"getQueryString",function(){return js}),f.d(c,"appendToQueryString",function(){return zs}),f.d(c,"parseQueryString",function(){return fo}),f.d(c,"formatQueryString",function(){return Wo}),f.d(c,"isEmptyString",function(){return Fu}),f.d(c,"isEmptyArray",function(){return ls}),f.d(c,"isBuffer",function(){return Fs}),f.d(c,"isTypedArray",function(){return va}),f.d(c,"isArrayBuffer",function(){return _a}),f.d(c,"getType",function(){return Ko}),f.d(c,"getEncoding",function(){return Ja}),f.d(c,"isHexString",function(){return No}),f.d(c,"isJsonRpcSubscription",function(){return Go}),f.d(c,"isJsonRpcRequest",function(){return Yo}),f.d(c,"isJsonRpcResponseSuccess",function(){return Hu}),f.d(c,"isJsonRpcResponseError",function(){return qu}),f.d(c,"isInternalEvent",function(){return Xa}),f.d(c,"isReservedEvent",function(){return Za}),f.d(c,"isSilentPayload",function(){return el}),f.d(c,"getFromWindow",function(){return we}),f.d(c,"getFromWindowOrThrow",function(){return oe}),f.d(c,"getDocumentOrThrow",function(){return pe}),f.d(c,"getDocument",function(){return ne}),f.d(c,"getNavigatorOrThrow",function(){return de}),f.d(c,"getNavigator",function(){return ve}),f.d(c,"getLocationOrThrow",function(){return Re}),f.d(c,"getLocation",function(){return Se}),f.d(c,"getCryptoOrThrow",function(){return Fe}),f.d(c,"getCrypto",function(){return $e}),f.d(c,"getLocalStorageOrThrow",function(){return ke}),f.d(c,"getLocalStorage",function(){return at});var v=f(0);function y(Ye){return v.b(new Uint8Array(Ye))}function E(Ye){return v.e(new Uint8Array(Ye))}function R(Ye,kt){return v.c(new Uint8Array(Ye),!kt)}function p(Ye){return v.d(new Uint8Array(Ye))}function d(...Ye){return v.n(Ye.map(kt=>v.c(new Uint8Array(kt))).join("")).buffer}function O(Ye){return v.f(Ye).buffer}function L(Ye){return v.i(Ye)}function P(Ye,kt){return v.g(Ye,!kt)}function N(Ye){return v.h(Ye)}function M(...Ye){return v.k(...Ye)}function V(Ye){return v.C(Ye).buffer}function Z(Ye){return v.D(Ye)}function x(Ye,kt){return v.E(Ye,!kt)}function W(Ye){return v.F(Ye)}function H(Ye){return v.o(Ye)}function J(Ye){return v.n(Ye).buffer}function K(Ye){return v.q(Ye)}function le(Ye){return v.p(Ye)}function z(Ye){return v.w(Ye)}function B(Ye){return v.v(Ye).buffer}function ie(Ye){return v.y(Ye)}function xe(Ye,kt){return v.x(Number(Ye),!kt)}var Me=f(59),Oe=f(6);const we=Oe.getFromWindow,oe=Oe.getFromWindowOrThrow,pe=Oe.getDocumentOrThrow,ne=Oe.getDocument,de=Oe.getNavigatorOrThrow,ve=Oe.getNavigator,Re=Oe.getLocationOrThrow,Se=Oe.getLocation,Fe=Oe.getCryptoOrThrow,$e=Oe.getCrypto,ke=Oe.getLocalStorageOrThrow,at=Oe.getLocalStorage;function Ve(Ye){return Object(Me.a)(Ye)}function gt(){const Ye=Ve();return Ye&&Ye.os?Ye.os:void 0}function It(){const Ye=gt();return!!Ye&&Ye.toLowerCase().includes("android")}function Bt(){const Ye=gt();return!!Ye&&(Ye.toLowerCase().includes("ios")||Ye.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function D(){return!!gt()&&(It()||Bt())}function $(){const Ye=Ve();return!(!Ye||!Ye.name)&&"node"===Ye.name.toLowerCase()}function q(){return!$()&&!!ve()}var Ee=f(12);const Le=Ee.a,je=Ee.b;function ft(Ye,kt){const an=je(kt),ur=at();ur&&ur.setItem(Ye,an)}function _t(Ye){let kt=null,an=null;const ur=at();return ur&&(an=ur.getItem(Ye)),kt=an&&Le(an),kt}function Tt(Ye){const kt=at();kt&&kt.removeItem(Ye)}var tn=f(60);function Mt(){return tn.getWindowMetadata()}var Cn=f(7),vn=f(2);function At(Ye){return v.B(Ye)}function Xt(Ye){return v.a(Ye)}function Kn(Ye){return v.A(Ye)}function dr(Ye){return v.z(v.a(Ye))}const Vn=Cn.payloadId;function Qn(){return((Ye,kt)=>{for(kt=Ye="";Ye++<36;kt+=51*Ye&52?(15^Ye?8^Math.random()*(20^Ye?16:4):4).toString(16):"-");return kt})()}function Br(){console.warn("DEPRECATION WARNING: This WalletConnect client library will be deprecated in favor of @walletconnect/client. Please check docs.walletconnect.org to learn more about this migration!")}function Er(Ye,kt){let an;const ur=vn.INFURA_NETWORKS[Ye];return ur&&(an=`https://${ur}.infura.io/v3/${kt}`),an}function Ga(Ye,kt){let an;const ur=Er(Ye,kt.infuraId);return kt.custom&&kt.custom[Ye]?an=kt.custom[Ye]:ur&&(an=ur),an}function Bu(Ye,kt){const an=encodeURIComponent(Ye);return kt.universalLink?`${kt.universalLink}/wc?uri=${an}`:kt.deepLink?`${kt.deepLink}${kt.deepLink.endsWith(":")?"//":"/"}wc?uri=${an}`:""}function pa(Ye){const kt=Ye.href.split("?")[0];ft(vn.MOBILE_LINK_CHOICE_KEY,Object.assign(Object.assign({},Ye),{href:kt}))}function cs(Ye,kt){return Ye.filter(an=>an.name.toLowerCase().includes(kt.toLowerCase()))[0]}function $o(Ye,kt){let an=Ye;return kt&&(an=kt.map(ur=>cs(Ye,ur)).filter(Boolean)),an}function Ya(Ye,kt){return ue(function*(...an){return new Promise((ur,ho)=>{Ye.apply(kt,[...an,(Gt,fs)=>{null==Gt&&ho(Gt),ur(fs)}])})})}function ga(Ye){const kt=Ye.message||"Failed or Rejected Request";let an=-32e3;if(Ye&&!Ye.code)switch(kt){case"Parse error":an=-32700;break;case"Invalid request":an=-32600;break;case"Method not found":an=-32601;break;case"Invalid params":an=-32602;break;case"Internal error":an=-32603;break;default:an=-32e3}const ur={code:an,message:kt};return Ye.data&&(ur.data=Ye.data),ur}const Vo="https://registry.walletconnect.com";function Ji(){return Vo+"/api/v2/wallets"}function ya(){return Vo+"/api/v2/dapps"}function Ds(Ye,kt="mobile"){var an;return{name:Ye.name||"",shortName:Ye.metadata.shortName||"",color:Ye.metadata.colors.primary||"",logo:null!==(an=Ye.image_url.sm)&&void 0!==an?an:"",universalLink:Ye[kt].universal||"",deepLink:Ye[kt].native||""}}function Qa(Ye,kt="mobile"){return Object.values(Ye).filter(an=>!!an[kt].universal||!!an[kt].native).map(an=>Ds(an,kt))}var lo=f(24);function js(Ye){const kt=-1!==Ye.indexOf("?")?Ye.indexOf("?"):void 0;return void 0!==kt?Ye.substr(kt):""}function zs(Ye,kt){let an=fo(Ye);return an=Object.assign(Object.assign({},an),kt),Wo(an)}function fo(Ye){return lo.parse(Ye)}function Wo(Ye){return lo.stringify(Ye)}function ma(Ye){return void 0!==Ye.bridge}function Bs(Ye){const kt=Ye.indexOf(":"),an=-1!==Ye.indexOf("?")?Ye.indexOf("?"):void 0,ur=Ye.substring(0,kt),ho=function(fs){const ds=fs.split("@");return{handshakeTopic:ds[0],version:parseInt(ds[1],10)}}(Ye.substring(kt+1,an)),Gt=function(fs){const ds=fo(fs);return{key:ds.key||"",bridge:ds.bridge||""}}(void 0!==an?Ye.substr(an):"");return Object.assign(Object.assign({protocol:ur},ho),Gt)}function Fu(Ye){return""===Ye||"string"==typeof Ye&&""===Ye.trim()}function ls(Ye){return!(Ye&&Ye.length)}function Fs(Ye){return v.s(Ye)}function va(Ye){return v.u(Ye)}function _a(Ye){return v.r(Ye)}function Ko(Ye){return v.m(Ye)}function Ja(Ye){return v.l(Ye)}function No(Ye,kt){return v.t(Ye,kt)}function Go(Ye){return"object"==typeof Ye.params}function Yo(Ye){return void 0!==Ye.method}function Hu(Ye){return void 0!==Ye.result}function qu(Ye){return void 0!==Ye.error}function Xa(Ye){return void 0!==Ye.event}function Za(Ye){return vn.RESERVED_EVENTS.includes(Ye)||Ye.startsWith("wc_")}function el(Ye){return!!Ye.method.startsWith("wc_")||!vn.SIGNING_METHODS.includes(Ye.method)}},function(h,c,f){f.r(c);var v=f(34);for(var y in v)["default"].indexOf(y)<0&&function(Z){f.d(c,Z,function(){return v[Z]})}(y);var E=f(57);f.d(c,"ERROR_SESSION_CONNECTED",function(){return E.k}),f.d(c,"ERROR_SESSION_DISCONNECTED",function(){return E.l}),f.d(c,"ERROR_SESSION_REJECTED",function(){return E.m}),f.d(c,"ERROR_MISSING_JSON_RPC",function(){return E.e}),f.d(c,"ERROR_MISSING_RESULT",function(){return E.h}),f.d(c,"ERROR_MISSING_ERROR",function(){return E.c}),f.d(c,"ERROR_MISSING_METHOD",function(){return E.f}),f.d(c,"ERROR_MISSING_ID",function(){return E.d}),f.d(c,"ERROR_MISSING_REQUIRED",function(){return E.g}),f.d(c,"ERROR_INVALID_RESPONSE",function(){return E.a}),f.d(c,"ERROR_INVALID_URI",function(){return E.b}),f.d(c,"ERROR_QRCODE_MODAL_NOT_PROVIDED",function(){return E.i}),f.d(c,"ERROR_QRCODE_MODAL_USER_CLOSED",function(){return E.j}),f.d(c,"RESERVED_EVENTS",function(){return E.p}),f.d(c,"reservedEvents",function(){return E.v}),f.d(c,"WALLET_METHODS",function(){return E.s}),f.d(c,"SIGNING_METHODS",function(){return E.q}),f.d(c,"STATE_METHODS",function(){return E.r}),f.d(c,"signingMethods",function(){return E.w}),f.d(c,"stateMethods",function(){return E.x}),f.d(c,"MOBILE_LINK_CHOICE_KEY",function(){return E.o}),f.d(c,"mobileLinkChoiceKey",function(){return E.u}),f.d(c,"INFURA_NETWORKS",function(){return E.n}),f.d(c,"infuraNetworks",function(){return E.t});var R=f(35);for(var y in R)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks"].indexOf(y)<0&&function(x){f.d(c,x,function(){return R[x]})}(y);var p=f(36);f.d(c,"IEvents",function(){return p.a});var d=f(37);for(var y in d)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(y)<0&&function(x){f.d(c,x,function(){return d[x]})}(y);var O=f(38);for(var y in O)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(y)<0&&function(x){f.d(c,x,function(){return O[x]})}(y);var L=f(39);for(var y in L)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(y)<0&&function(x){f.d(c,x,function(){return L[x]})}(y);var P=f(40);for(var y in P)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(y)<0&&function(x){f.d(c,x,function(){return P[x]})}(y);var N=f(41);for(var y in N)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(y)<0&&function(x){f.d(c,x,function(){return N[x]})}(y);var M=f(42);for(var y in M)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(y)<0&&function(x){f.d(c,x,function(){return M[x]})}(y);var V=f(43);for(var y in V)["default","ERROR_SESSION_CONNECTED","ERROR_SESSION_DISCONNECTED","ERROR_SESSION_REJECTED","ERROR_MISSING_JSON_RPC","ERROR_MISSING_RESULT","ERROR_MISSING_ERROR","ERROR_MISSING_METHOD","ERROR_MISSING_ID","ERROR_MISSING_REQUIRED","ERROR_INVALID_RESPONSE","ERROR_INVALID_URI","ERROR_QRCODE_MODAL_NOT_PROVIDED","ERROR_QRCODE_MODAL_USER_CLOSED","RESERVED_EVENTS","reservedEvents","WALLET_METHODS","SIGNING_METHODS","STATE_METHODS","signingMethods","stateMethods","MOBILE_LINK_CHOICE_KEY","mobileLinkChoiceKey","INFURA_NETWORKS","infuraNetworks","IEvents"].indexOf(y)<0&&function(x){f.d(c,x,function(){return V[x]})}(y)},function(h,c,f){f.d(c,"b",function(){return y}),f.d(c,"g",function(){return E}),f.d(c,"a",function(){return R}),f.d(c,"f",function(){return p}),f.d(c,"e",function(){return d}),f.d(c,"i",function(){return O}),f.d(c,"j",function(){return L}),f.d(c,"h",function(){return v}),f.d(c,"d",function(){return P}),f.d(c,"c",function(){return N}),f.d(c,"k",function(){return M}),f.d(c,"l",function(){return V});const v=512,y=256,E=256,R="AES-CBC",p="SHA-"+y,d="HMAC",O="SHA-256",L="SHA-512",P="encrypt",N="decrypt",M="sign",V="verify"},function(h,c,f){f.d(c,"f",function(){return v}),f.d(c,"d",function(){return y}),f.d(c,"e",function(){return E}),f.d(c,"c",function(){return R}),f.d(c,"b",function(){return p}),f.d(c,"h",function(){return d}),f.d(c,"g",function(){return O}),f.d(c,"i",function(){return L}),f.d(c,"j",function(){return P}),f.d(c,"a",function(){return N});const v="PARSE_ERROR",y="INVALID_REQUEST",E="METHOD_NOT_FOUND",R="INVALID_PARAMS",p="INTERNAL_ERROR",d="SERVER_ERROR",O=[-32700,-32600,-32601,-32602,-32603],L=[-32e3,-32099],P={[v]:{code:-32700,message:"Parse error"},[y]:{code:-32600,message:"Invalid Request"},[E]:{code:-32601,message:"Method not found"},[R]:{code:-32602,message:"Invalid params"},[p]:{code:-32603,message:"Internal error"},[d]:{code:-32e3,message:"Server error"}},N=d},function(h,c,f){Object.defineProperty(c,"__esModule",{value:!0});const v=f(17);v.__exportStar(f(64),c),v.__exportStar(f(65),c)},function(h,c,f){function v(E){let R;return"undefined"!=typeof window&&void 0!==window[E]&&(R=window[E]),R}function y(E){const R=v(E);if(!R)throw new Error(E+" is not defined in Window");return R}Object.defineProperty(c,"__esModule",{value:!0}),c.getLocalStorage=c.getLocalStorageOrThrow=c.getCrypto=c.getCryptoOrThrow=c.getLocation=c.getLocationOrThrow=c.getNavigator=c.getNavigatorOrThrow=c.getDocument=c.getDocumentOrThrow=c.getFromWindowOrThrow=c.getFromWindow=void 0,c.getFromWindow=v,c.getFromWindowOrThrow=y,c.getDocumentOrThrow=function(){return y("document")},c.getDocument=function(){return v("document")},c.getNavigatorOrThrow=function(){return y("navigator")},c.getNavigator=function(){return v("navigator")},c.getLocationOrThrow=function(){return y("location")},c.getLocation=function(){return v("location")},c.getCryptoOrThrow=function(){return y("crypto")},c.getCrypto=function(){return v("crypto")},c.getLocalStorageOrThrow=function(){return y("localStorage")},c.getLocalStorage=function(){return v("localStorage")}},function(h,c,f){f.r(c);var v=f(4);f.d(c,"PARSE_ERROR",function(){return v.f}),f.d(c,"INVALID_REQUEST",function(){return v.d}),f.d(c,"METHOD_NOT_FOUND",function(){return v.e}),f.d(c,"INVALID_PARAMS",function(){return v.c}),f.d(c,"INTERNAL_ERROR",function(){return v.b}),f.d(c,"SERVER_ERROR",function(){return v.h}),f.d(c,"RESERVED_ERROR_CODES",function(){return v.g}),f.d(c,"SERVER_ERROR_CODE_RANGE",function(){return v.i}),f.d(c,"STANDARD_ERROR_MAP",function(){return v.j}),f.d(c,"DEFAULT_ERROR",function(){return v.a});var y=f(11);f.d(c,"isServerErrorCode",function(){return y.d}),f.d(c,"isReservedErrorCode",function(){return y.c}),f.d(c,"isValidErrorCode",function(){return y.e}),f.d(c,"getError",function(){return y.a}),f.d(c,"getErrorByCode",function(){return y.b}),f.d(c,"validateJsonRpcError",function(){return y.g}),f.d(c,"parseConnectionError",function(){return y.f});var E=f(25);for(var R in E)["default","PARSE_ERROR","INVALID_REQUEST","METHOD_NOT_FOUND","INVALID_PARAMS","INTERNAL_ERROR","SERVER_ERROR","RESERVED_ERROR_CODES","SERVER_ERROR_CODE_RANGE","STANDARD_ERROR_MAP","DEFAULT_ERROR","isServerErrorCode","isReservedErrorCode","isValidErrorCode","getError","getErrorByCode","validateJsonRpcError","parseConnectionError"].indexOf(R)<0&&function(N){f.d(c,N,function(){return E[N]})}(R);var p=f(26);f.d(c,"payloadId",function(){return p.e}),f.d(c,"formatJsonRpcRequest",function(){return p.c}),f.d(c,"formatJsonRpcResult",function(){return p.d}),f.d(c,"formatJsonRpcError",function(){return p.b}),f.d(c,"formatErrorMessage",function(){return p.a});var d=f(27);f.d(c,"isValidRoute",function(){return d.c}),f.d(c,"isValidDefaultRoute",function(){return d.a}),f.d(c,"isValidWildcardRoute",function(){return d.e}),f.d(c,"isValidLeadingWildcardRoute",function(){return d.b}),f.d(c,"isValidTrailingWildcardRoute",function(){return d.d});var O=f(28);for(var R in O)["default","PARSE_ERROR","INVALID_REQUEST","METHOD_NOT_FOUND","INVALID_PARAMS","INTERNAL_ERROR","SERVER_ERROR","RESERVED_ERROR_CODES","SERVER_ERROR_CODE_RANGE","STANDARD_ERROR_MAP","DEFAULT_ERROR","isServerErrorCode","isReservedErrorCode","isValidErrorCode","getError","getErrorByCode","validateJsonRpcError","parseConnectionError","payloadId","formatJsonRpcRequest","formatJsonRpcResult","formatJsonRpcError","formatErrorMessage","isValidRoute","isValidDefaultRoute","isValidWildcardRoute","isValidLeadingWildcardRoute","isValidTrailingWildcardRoute"].indexOf(R)<0&&function(M){f.d(c,M,function(){return O[M]})}(R);var L=f(32);f.d(c,"isHttpUrl",function(){return L.a}),f.d(c,"isWsUrl",function(){return L.c}),f.d(c,"isLocalhostUrl",function(){return L.b});var P=f(33);f.d(c,"isJsonRpcPayload",function(){return P.b}),f.d(c,"isJsonRpcRequest",function(){return P.c}),f.d(c,"isJsonRpcResponse",function(){return P.d}),f.d(c,"isJsonRpcResult",function(){return P.e}),f.d(c,"isJsonRpcError",function(){return P.a}),f.d(c,"isJsonRpcValidationInvalid",function(){return P.f})},function(h,c,f){f.d(c,"b",function(){return p}),f.d(c,"a",function(){return O}),f.d(c,"c",function(){return P}),f.d(c,"d",function(){return M}),f.d(c,"e",function(){return Z}),f.d(c,"f",function(){return W});var v=f(5),y=f(3);function E(J){return R.apply(this,arguments)}function R(){return(R=ue(function*(J,K=y.a){return v.getSubtleCrypto().importKey("raw",J,K===y.a?{length:y.b,name:y.a}:{hash:{name:y.f},name:y.e},!0,K===y.a?[y.d,y.c]:[y.k,y.l])})).apply(this,arguments)}function p(J,K,le){return d.apply(this,arguments)}function d(){return(d=ue(function*(J,K,le){const z=v.getSubtleCrypto(),B=yield E(K,y.a),ie=yield z.encrypt({iv:J,name:y.a},B,le);return new Uint8Array(ie)})).apply(this,arguments)}function O(J,K,le){return L.apply(this,arguments)}function L(){return(L=ue(function*(J,K,le){const z=v.getSubtleCrypto(),B=yield E(K,y.a),ie=yield z.decrypt({iv:J,name:y.a},B,le);return new Uint8Array(ie)})).apply(this,arguments)}function P(J,K){return N.apply(this,arguments)}function N(){return(N=ue(function*(J,K){const le=v.getSubtleCrypto(),z=yield E(J,y.e),B=yield le.sign({length:y.g,name:y.e},z,K);return new Uint8Array(B)})).apply(this,arguments)}function M(J,K){return V.apply(this,arguments)}function V(){return(V=ue(function*(J,K){const le=v.getSubtleCrypto(),z=yield E(J,y.e),B=yield le.sign({length:y.h,name:y.e},z,K);return new Uint8Array(B)})).apply(this,arguments)}function Z(J){return x.apply(this,arguments)}function x(){return(x=ue(function*(J){const K=v.getSubtleCrypto(),le=yield K.digest({name:y.i},J);return new Uint8Array(le)})).apply(this,arguments)}function W(J){return H.apply(this,arguments)}function H(){return(H=ue(function*(J){const K=v.getSubtleCrypto(),le=yield K.digest({name:y.j},J);return new Uint8Array(le)})).apply(this,arguments)}},function(h,c){let f;const v=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];c.getSymbolSize=function(y){if(!y)throw new Error('"version" cannot be null or undefined');if(y<1||y>40)throw new Error('"version" should be in range from 1 to 40');return 4*y+17},c.getSymbolTotalCodewords=function(y){return v[y]},c.getBCHDigit=function(y){let E=0;for(;0!==y;)E++,y>>>=1;return E},c.setToSJISFunction=function(y){if("function"!=typeof y)throw new Error('"toSJISFunc" is not a valid function.');f=y},c.isKanjiModeEnabled=function(){return void 0!==f},c.toSJIS=function(y){return f(y)}},function(h,c,f){const v=f(54),y=f(55);c.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},c.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},c.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},c.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},c.MIXED={bit:-1},c.getCharCountIndicator=function(E,R){if(!E.ccBits)throw new Error("Invalid mode: "+E);if(!v.isValid(R))throw new Error("Invalid version: "+R);return R>=1&&R<10?E.ccBits[0]:R<27?E.ccBits[1]:E.ccBits[2]},c.getBestModeForData=function(E){return y.testNumeric(E)?c.NUMERIC:y.testAlphanumeric(E)?c.ALPHANUMERIC:y.testKanji(E)?c.KANJI:c.BYTE},c.toString=function(E){if(E&&E.id)return E.id;throw new Error("Invalid mode")},c.isValid=function(E){return E&&E.bit&&E.ccBits},c.from=function(E,R){if(c.isValid(E))return E;try{return function(p){if("string"!=typeof p)throw new Error("Param is not a string");switch(p.toLowerCase()){case"numeric":return c.NUMERIC;case"alphanumeric":return c.ALPHANUMERIC;case"kanji":return c.KANJI;case"byte":return c.BYTE;default:throw new Error("Unknown mode: "+p)}}(E)}catch{return R}}},function(h,c,f){f.d(c,"d",function(){return y}),f.d(c,"c",function(){return E}),f.d(c,"e",function(){return R}),f.d(c,"a",function(){return p}),f.d(c,"b",function(){return d}),f.d(c,"g",function(){return O}),f.d(c,"f",function(){return L});var v=f(4);function y(P){return P<=v.i[0]&&P>=v.i[1]}function E(P){return v.g.includes(P)}function R(P){return"number"==typeof P}function p(P){return Object.keys(v.j).includes(P)?v.j[P]:v.j[v.a]}function d(P){return Object.values(v.j).find(N=>N.code===P)||v.j[v.a]}function O(P){if(void 0===P.error.code)return{valid:!1,error:"Missing code for JSON-RPC error"};if(void 0===P.error.message)return{valid:!1,error:"Missing message for JSON-RPC error"};if(!R(P.error.code))return{valid:!1,error:"Invalid error code type for JSON-RPC: "+P.error.code};if(E(P.error.code)){const N=d(P.error.code);if(N.message!==v.j[v.a].message&&P.error.message===N.message)return{valid:!1,error:"Invalid error code message for JSON-RPC: "+P.error.code}}return{valid:!0}}function L(P,N,M){return P.message.includes("getaddrinfo ENOTFOUND")||P.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${M} RPC url at ${N}`):P}},function(h,c,f){function v(E){if("string"!=typeof E)throw new Error("Cannot safe json parse value of type "+typeof E);try{return JSON.parse(E)}catch{return E}}function y(E){return"string"==typeof E?E:JSON.stringify(E)}f.d(c,"a",function(){return v}),f.d(c,"b",function(){return y})},function(h,c,f){var v,y="object"==typeof Reflect?Reflect:null,E=y&&"function"==typeof y.apply?y.apply:function(H,J,K){return Function.prototype.apply.call(H,J,K)};v=y&&"function"==typeof y.ownKeys?y.ownKeys:Object.getOwnPropertySymbols?function(H){return Object.getOwnPropertyNames(H).concat(Object.getOwnPropertySymbols(H))}:function(H){return Object.getOwnPropertyNames(H)};var R=Number.isNaN||function(H){return H!=H};function p(){p.init.call(this)}h.exports=p,h.exports.once=function(H,J){return new Promise(function(K,le){function z(ie){H.removeListener(J,B),le(ie)}function B(){"function"==typeof H.removeListener&&H.removeListener("error",z),K([].slice.call(arguments))}var ie;W(H,J,B,{once:!0}),"error"!==J&&("function"==typeof(ie=H).on&&W(ie,"error",z,{once:!0}))})},p.EventEmitter=p,p.prototype._events=void 0,p.prototype._eventsCount=0,p.prototype._maxListeners=void 0;var d=10;function O(H){if("function"!=typeof H)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof H)}function L(H){return void 0===H._maxListeners?p.defaultMaxListeners:H._maxListeners}function P(H,J,K,le){var z,B,ie;if(O(K),void 0===(B=H._events)?(B=H._events=Object.create(null),H._eventsCount=0):(void 0!==B.newListener&&(H.emit("newListener",J,K.listener?K.listener:K),B=H._events),ie=B[J]),void 0===ie)ie=B[J]=K,++H._eventsCount;else if("function"==typeof ie?ie=B[J]=le?[K,ie]:[ie,K]:le?ie.unshift(K):ie.push(K),(z=L(H))>0&&ie.length>z&&!ie.warned){ie.warned=!0;var Me=new Error("Possible EventEmitter memory leak detected. "+ie.length+" "+String(J)+" listeners added. Use emitter.setMaxListeners() to increase limit");Me.name="MaxListenersExceededWarning",Me.emitter=H,Me.type=J,Me.count=ie.length,console&&console.warn&&console.warn(Me)}return H}function N(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function M(H,J,K){var le={fired:!1,wrapFn:void 0,target:H,type:J,listener:K},z=N.bind(le);return z.listener=K,le.wrapFn=z,z}function V(H,J,K){var le=H._events;if(void 0===le)return[];var z=le[J];return void 0===z?[]:"function"==typeof z?K?[z.listener||z]:[z]:K?function(B){for(var ie=new Array(B.length),xe=0;xe<ie.length;++xe)ie[xe]=B[xe].listener||B[xe];return ie}(z):x(z,z.length)}function Z(H){var J=this._events;if(void 0!==J){var K=J[H];if("function"==typeof K)return 1;if(void 0!==K)return K.length}return 0}function x(H,J){for(var K=new Array(J),le=0;le<J;++le)K[le]=H[le];return K}function W(H,J,K,le){if("function"==typeof H.on)le.once?H.once(J,K):H.on(J,K);else{if("function"!=typeof H.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof H);H.addEventListener(J,function z(B){le.once&&H.removeEventListener(J,z),K(B)})}}Object.defineProperty(p,"defaultMaxListeners",{enumerable:!0,get:function(){return d},set:function(H){if("number"!=typeof H||H<0||R(H))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+H+".");d=H}}),p.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},p.prototype.setMaxListeners=function(H){if("number"!=typeof H||H<0||R(H))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+H+".");return this._maxListeners=H,this},p.prototype.getMaxListeners=function(){return L(this)},p.prototype.emit=function(H){for(var J=[],K=1;K<arguments.length;K++)J.push(arguments[K]);var le="error"===H,z=this._events;if(void 0!==z)le=le&&void 0===z.error;else if(!le)return!1;if(le){var B;if(J.length>0&&(B=J[0]),B instanceof Error)throw B;var ie=new Error("Unhandled error."+(B?" ("+B.message+")":""));throw ie.context=B,ie}var xe=z[H];if(void 0===xe)return!1;if("function"==typeof xe)E(xe,this,J);else{var Me=xe.length,Oe=x(xe,Me);for(K=0;K<Me;++K)E(Oe[K],this,J)}return!0},p.prototype.on=p.prototype.addListener=function(H,J){return P(this,H,J,!1)},p.prototype.prependListener=function(H,J){return P(this,H,J,!0)},p.prototype.once=function(H,J){return O(J),this.on(H,M(this,H,J)),this},p.prototype.prependOnceListener=function(H,J){return O(J),this.prependListener(H,M(this,H,J)),this},p.prototype.off=p.prototype.removeListener=function(H,J){var K,le,z,B,ie;if(O(J),void 0===(le=this._events))return this;if(void 0===(K=le[H]))return this;if(K===J||K.listener===J)0==--this._eventsCount?this._events=Object.create(null):(delete le[H],le.removeListener&&this.emit("removeListener",H,K.listener||J));else if("function"!=typeof K){for(z=-1,B=K.length-1;B>=0;B--)if(K[B]===J||K[B].listener===J){ie=K[B].listener,z=B;break}if(z<0)return this;0===z?K.shift():function(xe,Me){for(;Me+1<xe.length;Me++)xe[Me]=xe[Me+1];xe.pop()}(K,z),1===K.length&&(le[H]=K[0]),void 0!==le.removeListener&&this.emit("removeListener",H,ie||J)}return this},p.prototype.removeAllListeners=function(H){var J,K,le;if(void 0===(K=this._events))return this;if(void 0===K.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==K[H]&&(0==--this._eventsCount?this._events=Object.create(null):delete K[H]),this;if(0===arguments.length){var z,B=Object.keys(K);for(le=0;le<B.length;++le)"removeListener"!==(z=B[le])&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(J=K[H]))this.removeListener(H,J);else if(void 0!==J)for(le=J.length-1;le>=0;le--)this.removeListener(H,J[le]);return this},p.prototype.listeners=function(H){return V(this,H,!0)},p.prototype.rawListeners=function(H){return V(this,H,!1)},p.listenerCount=function(H,J){return"function"==typeof H.listenerCount?H.listenerCount(J):Z.call(H,J)},p.prototype.listenerCount=Z,p.prototype.eventNames=function(){return this._eventsCount>0?v(this._events):[]}},function(h,c,f){var v=f(45);f.d(c,"randomBytes",function(){return v.a});var y=f(46);f.d(c,"aesCbcDecrypt",function(){return y.a}),f.d(c,"aesCbcEncrypt",function(){return y.b});var E=f(47);f.d(c,"hmacSha256Sign",function(){return E.a}),f(52),f(16),f(3)},function(h,c,f){f.d(c,"a",function(){return v});class v{}},function(h,c,f){var v=f(48);f.o(v,"isConstantTime")&&f.d(c,"isConstantTime",function(){return v.isConstantTime}),f(49);var y=f(50);f.o(y,"isConstantTime")&&f.d(c,"isConstantTime",function(){return y.isConstantTime});var E=f(51);f.d(c,"isConstantTime",function(){return E.a})},function(h,c,f){f.r(c),f.d(c,"__extends",function(){return y}),f.d(c,"__assign",function(){return E}),f.d(c,"__rest",function(){return R}),f.d(c,"__decorate",function(){return p}),f.d(c,"__param",function(){return d}),f.d(c,"__metadata",function(){return O}),f.d(c,"__awaiter",function(){return L}),f.d(c,"__generator",function(){return P}),f.d(c,"__createBinding",function(){return N}),f.d(c,"__exportStar",function(){return M}),f.d(c,"__values",function(){return V}),f.d(c,"__read",function(){return Z}),f.d(c,"__spread",function(){return x}),f.d(c,"__spreadArrays",function(){return W}),f.d(c,"__await",function(){return H}),f.d(c,"__asyncGenerator",function(){return J}),f.d(c,"__asyncDelegator",function(){return K}),f.d(c,"__asyncValues",function(){return le}),f.d(c,"__makeTemplateObject",function(){return z}),f.d(c,"__importStar",function(){return B}),f.d(c,"__importDefault",function(){return ie}),f.d(c,"__classPrivateFieldGet",function(){return xe}),f.d(c,"__classPrivateFieldSet",function(){return Me});var v=function(Oe,we){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,pe){oe.__proto__=pe}||function(oe,pe){for(var ne in pe)pe.hasOwnProperty(ne)&&(oe[ne]=pe[ne])})(Oe,we)};function y(Oe,we){function oe(){this.constructor=Oe}v(Oe,we),Oe.prototype=null===we?Object.create(we):(oe.prototype=we.prototype,new oe)}var E=function(){return(E=Object.assign||function(Oe){for(var we,oe=1,pe=arguments.length;oe<pe;oe++)for(var ne in we=arguments[oe])Object.prototype.hasOwnProperty.call(we,ne)&&(Oe[ne]=we[ne]);return Oe}).apply(this,arguments)};function R(Oe,we){var oe={};for(var pe in Oe)Object.prototype.hasOwnProperty.call(Oe,pe)&&we.indexOf(pe)<0&&(oe[pe]=Oe[pe]);if(null!=Oe&&"function"==typeof Object.getOwnPropertySymbols){var ne=0;for(pe=Object.getOwnPropertySymbols(Oe);ne<pe.length;ne++)we.indexOf(pe[ne])<0&&Object.prototype.propertyIsEnumerable.call(Oe,pe[ne])&&(oe[pe[ne]]=Oe[pe[ne]])}return oe}function p(Oe,we,oe,pe){var ne,de=arguments.length,ve=de<3?we:null===pe?pe=Object.getOwnPropertyDescriptor(we,oe):pe;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)ve=Reflect.decorate(Oe,we,oe,pe);else for(var Re=Oe.length-1;Re>=0;Re--)(ne=Oe[Re])&&(ve=(de<3?ne(ve):de>3?ne(we,oe,ve):ne(we,oe))||ve);return de>3&&ve&&Object.defineProperty(we,oe,ve),ve}function d(Oe,we){return function(oe,pe){we(oe,pe,Oe)}}function O(Oe,we){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(Oe,we)}function L(Oe,we,oe,pe){return new(oe||(oe=Promise))(function(ne,de){function ve(Fe){try{Se(pe.next(Fe))}catch($e){de($e)}}function Re(Fe){try{Se(pe.throw(Fe))}catch($e){de($e)}}function Se(Fe){var $e;Fe.done?ne(Fe.value):($e=Fe.value,$e instanceof oe?$e:new oe(function(ke){ke($e)})).then(ve,Re)}Se((pe=pe.apply(Oe,we||[])).next())})}function P(Oe,we){var oe,pe,ne,de,ve={label:0,sent:function(){if(1&ne[0])throw ne[1];return ne[1]},trys:[],ops:[]};return de={next:Re(0),throw:Re(1),return:Re(2)},"function"==typeof Symbol&&(de[Symbol.iterator]=function(){return this}),de;function Re(Se){return function(Fe){return function($e){if(oe)throw new TypeError("Generator is already executing.");for(;ve;)try{if(oe=1,pe&&(ne=2&$e[0]?pe.return:$e[0]?pe.throw||((ne=pe.return)&&ne.call(pe),0):pe.next)&&!(ne=ne.call(pe,$e[1])).done)return ne;switch(pe=0,ne&&($e=[2&$e[0],ne.value]),$e[0]){case 0:case 1:ne=$e;break;case 4:return ve.label++,{value:$e[1],done:!1};case 5:ve.label++,pe=$e[1],$e=[0];continue;case 7:$e=ve.ops.pop(),ve.trys.pop();continue;default:if(!((ne=(ne=ve.trys).length>0&&ne[ne.length-1])||6!==$e[0]&&2!==$e[0])){ve=0;continue}if(3===$e[0]&&(!ne||$e[1]>ne[0]&&$e[1]<ne[3])){ve.label=$e[1];break}if(6===$e[0]&&ve.label<ne[1]){ve.label=ne[1],ne=$e;break}if(ne&&ve.label<ne[2]){ve.label=ne[2],ve.ops.push($e);break}ne[2]&&ve.ops.pop(),ve.trys.pop();continue}$e=we.call(Oe,ve)}catch(ke){$e=[6,ke],pe=0}finally{oe=ne=0}if(5&$e[0])throw $e[1];return{value:$e[0]?$e[1]:void 0,done:!0}}([Se,Fe])}}}function N(Oe,we,oe,pe){void 0===pe&&(pe=oe),Oe[pe]=we[oe]}function M(Oe,we){for(var oe in Oe)"default"===oe||we.hasOwnProperty(oe)||(we[oe]=Oe[oe])}function V(Oe){var we="function"==typeof Symbol&&Symbol.iterator,oe=we&&Oe[we],pe=0;if(oe)return oe.call(Oe);if(Oe&&"number"==typeof Oe.length)return{next:function(){return Oe&&pe>=Oe.length&&(Oe=void 0),{value:Oe&&Oe[pe++],done:!Oe}}};throw new TypeError(we?"Object is not iterable.":"Symbol.iterator is not defined.")}function Z(Oe,we){var oe="function"==typeof Symbol&&Oe[Symbol.iterator];if(!oe)return Oe;var pe,ne,de=oe.call(Oe),ve=[];try{for(;(void 0===we||we-- >0)&&!(pe=de.next()).done;)ve.push(pe.value)}catch(Re){ne={error:Re}}finally{try{pe&&!pe.done&&(oe=de.return)&&oe.call(de)}finally{if(ne)throw ne.error}}return ve}function x(){for(var Oe=[],we=0;we<arguments.length;we++)Oe=Oe.concat(Z(arguments[we]));return Oe}function W(){for(var Oe=0,we=0,oe=arguments.length;we<oe;we++)Oe+=arguments[we].length;var pe=Array(Oe),ne=0;for(we=0;we<oe;we++)for(var de=arguments[we],ve=0,Re=de.length;ve<Re;ve++,ne++)pe[ne]=de[ve];return pe}function H(Oe){return this instanceof H?(this.v=Oe,this):new H(Oe)}function J(Oe,we,oe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var pe,ne=oe.apply(Oe,we||[]),de=[];return pe={},ve("next"),ve("throw"),ve("return"),pe[Symbol.asyncIterator]=function(){return this},pe;function ve(ke){ne[ke]&&(pe[ke]=function(at){return new Promise(function(Ve,gt){de.push([ke,at,Ve,gt])>1||Re(ke,at)})})}function Re(ke,at){try{(Ve=ne[ke](at)).value instanceof H?Promise.resolve(Ve.value.v).then(Se,Fe):$e(de[0][2],Ve)}catch(gt){$e(de[0][3],gt)}var Ve}function Se(ke){Re("next",ke)}function Fe(ke){Re("throw",ke)}function $e(ke,at){ke(at),de.shift(),de.length&&Re(de[0][0],de[0][1])}}function K(Oe){var we,oe;return we={},pe("next"),pe("throw",function(ne){throw ne}),pe("return"),we[Symbol.iterator]=function(){return this},we;function pe(ne,de){we[ne]=Oe[ne]?function(ve){return(oe=!oe)?{value:H(Oe[ne](ve)),done:"return"===ne}:de?de(ve):ve}:de}}function le(Oe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var we,oe=Oe[Symbol.asyncIterator];return oe?oe.call(Oe):(Oe=V(Oe),we={},pe("next"),pe("throw"),pe("return"),we[Symbol.asyncIterator]=function(){return this},we);function pe(ne){we[ne]=Oe[ne]&&function(de){return new Promise(function(ve,Re){var Se,Fe,$e;Se=ve,Fe=Re,$e=(de=Oe[ne](de)).done,Promise.resolve(de.value).then(function(at){Se({value:at,done:$e})},Fe)})}}}function z(Oe,we){return Object.defineProperty?Object.defineProperty(Oe,"raw",{value:we}):Oe.raw=we,Oe}function B(Oe){if(Oe&&Oe.__esModule)return Oe;var we={};if(null!=Oe)for(var oe in Oe)Object.hasOwnProperty.call(Oe,oe)&&(we[oe]=Oe[oe]);return we.default=Oe,we}function ie(Oe){return Oe&&Oe.__esModule?Oe:{default:Oe}}function xe(Oe,we){if(!we.has(Oe))throw new TypeError("attempted to get private field on non-instance");return we.get(Oe)}function Me(Oe,we,oe){if(!we.has(Oe))throw new TypeError("attempted to set private field on non-instance");return we.set(Oe,oe),oe}},function(h,c){var f;f=function(){return this}();try{f=f||new Function("return this")()}catch{"object"==typeof window&&(f=window)}h.exports=f},function(h,c){var f,v,y=h.exports={};function E(){throw new Error("setTimeout has not been defined")}function R(){throw new Error("clearTimeout has not been defined")}function p(x){if(f===setTimeout)return setTimeout(x,0);if((f===E||!f)&&setTimeout)return f=setTimeout,setTimeout(x,0);try{return f(x,0)}catch{try{return f.call(null,x,0)}catch{return f.call(this,x,0)}}}!function(){try{f="function"==typeof setTimeout?setTimeout:E}catch{f=E}try{v="function"==typeof clearTimeout?clearTimeout:R}catch{v=R}}();var d,O=[],L=!1,P=-1;function N(){L&&d&&(L=!1,d.length?O=d.concat(O):P=-1,O.length&&M())}function M(){if(!L){var x=p(N);L=!0;for(var W=O.length;W;){for(d=O,O=[];++P<W;)d&&d[P].run();P=-1,W=O.length}d=null,L=!1,function(H){if(v===clearTimeout)return clearTimeout(H);if((v===R||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(H);try{v(H)}catch{try{return v.call(null,H)}catch{return v.call(this,H)}}}(x)}}function V(x,W){this.fun=x,this.array=W}function Z(){}y.nextTick=function(x){var W=new Array(arguments.length-1);if(arguments.length>1)for(var H=1;H<arguments.length;H++)W[H-1]=arguments[H];O.push(new V(x,W)),1!==O.length||L||p(M)},V.prototype.run=function(){this.fun.apply(null,this.array)},y.title="browser",y.browser=!0,y.env={},y.argv=[],y.version="",y.versions={},y.on=Z,y.addListener=Z,y.once=Z,y.off=Z,y.removeListener=Z,y.removeAllListeners=Z,y.emit=Z,y.prependListener=Z,y.prependOnceListener=Z,y.listeners=function(x){return[]},y.binding=function(x){throw new Error("process.binding is not supported")},y.cwd=function(){return"/"},y.chdir=function(x){throw new Error("process.chdir is not supported")},y.umask=function(){return 0}},function(h,c,f){f.r(c);var v=f(29);for(var y in v)["default"].indexOf(y)<0&&function(d){f.d(c,d,function(){return v[d]})}(y);var E=f(15);f.d(c,"IEvents",function(){return E.a});var R=f(30);f.d(c,"IJsonRpcConnection",function(){return R.b}),f.d(c,"IBaseJsonRpcProvider",function(){return R.a}),f.d(c,"IJsonRpcProvider",function(){return R.c});var p=f(31);for(var y in p)["default","IEvents","IJsonRpcConnection","IBaseJsonRpcProvider","IJsonRpcProvider"].indexOf(y)<0&&function(O){f.d(c,O,function(){return p[O]})}(y)},function(h,c){c.L={bit:1},c.M={bit:0},c.Q={bit:3},c.H={bit:2},c.isValid=function(f){return f&&void 0!==f.bit&&f.bit>=0&&f.bit<4},c.from=function(f,v){if(c.isValid(f))return f;try{return function(y){if("string"!=typeof y)throw new Error("Param is not a string");switch(y.toLowerCase()){case"l":case"low":return c.L;case"m":case"medium":return c.M;case"q":case"quartile":return c.Q;case"h":case"high":return c.H;default:throw new Error("Unknown EC Level: "+y)}}(f)}catch{return v}}},function(h,c){h.exports=y,y.strict=E,y.loose=R;var f=Object.prototype.toString,v={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function y(p){return E(p)||R(p)}function E(p){return p instanceof Int8Array||p instanceof Int16Array||p instanceof Int32Array||p instanceof Uint8Array||p instanceof Uint8ClampedArray||p instanceof Uint16Array||p instanceof Uint32Array||p instanceof Float32Array||p instanceof Float64Array}function R(p){return v[f.call(p)]}},function(h,c){var E,f="undefined"!=typeof self?self:this,v=function(){function E(){this.fetch=!1,this.DOMException=f.DOMException}return E.prototype=f,new E}();E=v,function(R){var p="URLSearchParams"in E,d="Symbol"in E&&"iterator"in Symbol,O="FileReader"in E&&"Blob"in E&&function(){try{return new Blob,!0}catch{return!1}}(),L="FormData"in E,P="ArrayBuffer"in E;if(P)var N=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],M=ArrayBuffer.isView||function(oe){return oe&&N.indexOf(Object.prototype.toString.call(oe))>-1};function V(oe){if("string"!=typeof oe&&(oe=String(oe)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(oe))throw new TypeError("Invalid character in header field name");return oe.toLowerCase()}function Z(oe){return"string"!=typeof oe&&(oe=String(oe)),oe}function x(oe){var pe={next:function(){var ne=oe.shift();return{done:void 0===ne,value:ne}}};return d&&(pe[Symbol.iterator]=function(){return pe}),pe}function W(oe){this.map={},oe instanceof W?oe.forEach(function(pe,ne){this.append(ne,pe)},this):Array.isArray(oe)?oe.forEach(function(pe){this.append(pe[0],pe[1])},this):oe&&Object.getOwnPropertyNames(oe).forEach(function(pe){this.append(pe,oe[pe])},this)}function H(oe){if(oe.bodyUsed)return Promise.reject(new TypeError("Already read"));oe.bodyUsed=!0}function J(oe){return new Promise(function(pe,ne){oe.onload=function(){pe(oe.result)},oe.onerror=function(){ne(oe.error)}})}function K(oe){var pe=new FileReader,ne=J(pe);return pe.readAsArrayBuffer(oe),ne}function le(oe){if(oe.slice)return oe.slice(0);var pe=new Uint8Array(oe.byteLength);return pe.set(new Uint8Array(oe)),pe.buffer}function z(){return this.bodyUsed=!1,this._initBody=function(oe){var pe;this._bodyInit=oe,oe?"string"==typeof oe?this._bodyText=oe:O&&Blob.prototype.isPrototypeOf(oe)?this._bodyBlob=oe:L&&FormData.prototype.isPrototypeOf(oe)?this._bodyFormData=oe:p&&URLSearchParams.prototype.isPrototypeOf(oe)?this._bodyText=oe.toString():P&&O&&(pe=oe)&&DataView.prototype.isPrototypeOf(pe)?(this._bodyArrayBuffer=le(oe.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):P&&(ArrayBuffer.prototype.isPrototypeOf(oe)||M(oe))?this._bodyArrayBuffer=le(oe):this._bodyText=oe=Object.prototype.toString.call(oe):this._bodyText="",this.headers.get("content-type")||("string"==typeof oe?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):p&&URLSearchParams.prototype.isPrototypeOf(oe)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},O&&(this.blob=function(){var oe=H(this);if(oe)return oe;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?H(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(K)}),this.text=function(){var oe,pe,ne,de=H(this);if(de)return de;if(this._bodyBlob)return oe=this._bodyBlob,ne=J(pe=new FileReader),pe.readAsText(oe),ne;if(this._bodyArrayBuffer)return Promise.resolve(function(ve){for(var Re=new Uint8Array(ve),Se=new Array(Re.length),Fe=0;Fe<Re.length;Fe++)Se[Fe]=String.fromCharCode(Re[Fe]);return Se.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},L&&(this.formData=function(){return this.text().then(xe)}),this.json=function(){return this.text().then(JSON.parse)},this}W.prototype.append=function(oe,pe){oe=V(oe),pe=Z(pe);var ne=this.map[oe];this.map[oe]=ne?ne+", "+pe:pe},W.prototype.delete=function(oe){delete this.map[V(oe)]},W.prototype.get=function(oe){return oe=V(oe),this.has(oe)?this.map[oe]:null},W.prototype.has=function(oe){return this.map.hasOwnProperty(V(oe))},W.prototype.set=function(oe,pe){this.map[V(oe)]=Z(pe)},W.prototype.forEach=function(oe,pe){for(var ne in this.map)this.map.hasOwnProperty(ne)&&oe.call(pe,this.map[ne],ne,this)},W.prototype.keys=function(){var oe=[];return this.forEach(function(pe,ne){oe.push(ne)}),x(oe)},W.prototype.values=function(){var oe=[];return this.forEach(function(pe){oe.push(pe)}),x(oe)},W.prototype.entries=function(){var oe=[];return this.forEach(function(pe,ne){oe.push([ne,pe])}),x(oe)},d&&(W.prototype[Symbol.iterator]=W.prototype.entries);var B=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ie(oe,pe){var ne,de,ve=(pe=pe||{}).body;if(oe instanceof ie){if(oe.bodyUsed)throw new TypeError("Already read");this.url=oe.url,this.credentials=oe.credentials,pe.headers||(this.headers=new W(oe.headers)),this.method=oe.method,this.mode=oe.mode,this.signal=oe.signal,ve||null==oe._bodyInit||(ve=oe._bodyInit,oe.bodyUsed=!0)}else this.url=String(oe);if(this.credentials=pe.credentials||this.credentials||"same-origin",!pe.headers&&this.headers||(this.headers=new W(pe.headers)),this.method=(de=(ne=pe.method||this.method||"GET").toUpperCase(),B.indexOf(de)>-1?de:ne),this.mode=pe.mode||this.mode||null,this.signal=pe.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&ve)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(ve)}function xe(oe){var pe=new FormData;return oe.trim().split("&").forEach(function(ne){if(ne){var de=ne.split("="),ve=de.shift().replace(/\+/g," "),Re=de.join("=").replace(/\+/g," ");pe.append(decodeURIComponent(ve),decodeURIComponent(Re))}}),pe}function Me(oe,pe){pe||(pe={}),this.type="default",this.status=void 0===pe.status?200:pe.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in pe?pe.statusText:"OK",this.headers=new W(pe.headers),this.url=pe.url||"",this._initBody(oe)}ie.prototype.clone=function(){return new ie(this,{body:this._bodyInit})},z.call(ie.prototype),z.call(Me.prototype),Me.prototype.clone=function(){return new Me(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new W(this.headers),url:this.url})},Me.error=function(){var oe=new Me(null,{status:0,statusText:""});return oe.type="error",oe};var Oe=[301,302,303,307,308];Me.redirect=function(oe,pe){if(-1===Oe.indexOf(pe))throw new RangeError("Invalid status code");return new Me(null,{status:pe,headers:{location:oe}})},R.DOMException=E.DOMException;try{new R.DOMException}catch{R.DOMException=function(pe,ne){this.message=pe,this.name=ne;var de=Error(pe);this.stack=de.stack},R.DOMException.prototype=Object.create(Error.prototype),R.DOMException.prototype.constructor=R.DOMException}function we(oe,pe){return new Promise(function(ne,de){var ve=new ie(oe,pe);if(ve.signal&&ve.signal.aborted)return de(new R.DOMException("Aborted","AbortError"));var Re=new XMLHttpRequest;function Se(){Re.abort()}Re.onload=function(){var Fe,$e,ke={status:Re.status,statusText:Re.statusText,headers:(Fe=Re.getAllResponseHeaders()||"",$e=new W,Fe.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(Ve){var gt=Ve.split(":"),It=gt.shift().trim();if(It){var Bt=gt.join(":").trim();$e.append(It,Bt)}}),$e)};ke.url="responseURL"in Re?Re.responseURL:ke.headers.get("X-Request-URL"),ne(new Me("response"in Re?Re.response:Re.responseText,ke))},Re.onerror=function(){de(new TypeError("Network request failed"))},Re.ontimeout=function(){de(new TypeError("Network request failed"))},Re.onabort=function(){de(new R.DOMException("Aborted","AbortError"))},Re.open(ve.method,ve.url,!0),"include"===ve.credentials?Re.withCredentials=!0:"omit"===ve.credentials&&(Re.withCredentials=!1),"responseType"in Re&&O&&(Re.responseType="blob"),ve.headers.forEach(function(Fe,$e){Re.setRequestHeader($e,Fe)}),ve.signal&&(ve.signal.addEventListener("abort",Se),Re.onreadystatechange=function(){4===Re.readyState&&ve.signal.removeEventListener("abort",Se)}),Re.send(void 0===ve._bodyInit?null:ve._bodyInit)})}we.polyfill=!0,E.fetch||(E.fetch=we,E.Headers=W,E.Request=ie,E.Response=Me),R.Headers=W,R.Request=ie,R.Response=Me,R.fetch=we,Object.defineProperty(R,"__esModule",{value:!0})}({}),v.fetch.ponyfill=!0,delete v.fetch.polyfill;var y=v;(c=y.fetch).default=y.fetch,c.fetch=y.fetch,c.Headers=y.Headers,c.Request=y.Request,c.Response=y.Response,h.exports=c},function(h,c,f){const v=f(69),y=f(70),E=f(71),R=f(72);function p(V){if("string"!=typeof V||1!==V.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(V,Z){return Z.encode?Z.strict?v(V):encodeURIComponent(V):V}function O(V,Z){return Z.decode?y(V):V}function L(V){const Z=V.indexOf("#");return-1!==Z&&(V=V.slice(0,Z)),V}function P(V){const Z=(V=L(V)).indexOf("?");return-1===Z?"":V.slice(Z+1)}function N(V,Z){return Z.parseNumbers&&!Number.isNaN(Number(V))&&"string"==typeof V&&""!==V.trim()?V=Number(V):!Z.parseBooleans||null===V||"true"!==V.toLowerCase()&&"false"!==V.toLowerCase()||(V="true"===V.toLowerCase()),V}function M(V,Z){p((Z=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},Z)).arrayFormatSeparator);const x=function(H){let J;switch(H.arrayFormat){case"index":return(K,le,z)=>{J=/\[(\d*)\]$/.exec(K),K=K.replace(/\[\d*\]$/,""),J?(void 0===z[K]&&(z[K]={}),z[K][J[1]]=le):z[K]=le};case"bracket":return(K,le,z)=>{J=/(\[\])$/.exec(K),z[K=K.replace(/\[\]$/,"")]=J?void 0!==z[K]?[].concat(z[K],le):[le]:le};case"comma":case"separator":return(K,le,z)=>{const B="string"==typeof le&&le.includes(H.arrayFormatSeparator),ie="string"==typeof le&&!B&&O(le,H).includes(H.arrayFormatSeparator);le=ie?O(le,H):le;const xe=B||ie?le.split(H.arrayFormatSeparator).map(Me=>O(Me,H)):null===le?le:O(le,H);z[K]=xe};default:return(K,le,z)=>{z[K]=void 0!==z[K]?[].concat(z[K],le):le}}}(Z),W=Object.create(null);if("string"!=typeof V||!(V=V.trim().replace(/^[?#&]/,"")))return W;for(const H of V.split("&")){if(""===H)continue;let[J,K]=E(Z.decode?H.replace(/\+/g," "):H,"=");K=void 0===K?null:["comma","separator"].includes(Z.arrayFormat)?K:O(K,Z),x(O(J,Z),K,W)}for(const H of Object.keys(W)){const J=W[H];if("object"==typeof J&&null!==J)for(const K of Object.keys(J))J[K]=N(J[K],Z);else W[H]=N(J,Z)}return!1===Z.sort?W:(!0===Z.sort?Object.keys(W).sort():Object.keys(W).sort(Z.sort)).reduce((H,J)=>{const K=W[J];return H[J]=Boolean(K)&&"object"==typeof K&&!Array.isArray(K)?function le(z){return Array.isArray(z)?z.sort():"object"==typeof z?le(Object.keys(z)).sort((B,ie)=>Number(B)-Number(ie)).map(B=>z[B]):z}(K):K,H},Object.create(null))}c.extract=P,c.parse=M,c.stringify=(V,Z)=>{if(!V)return"";p((Z=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},Z)).arrayFormatSeparator);const x=K=>Z.skipNull&&null==V[K]||Z.skipEmptyString&&""===V[K],W=function(K){switch(K.arrayFormat){case"index":return le=>(z,B)=>{const ie=z.length;return void 0===B||K.skipNull&&null===B||K.skipEmptyString&&""===B?z:null===B?[...z,[d(le,K),"[",ie,"]"].join("")]:[...z,[d(le,K),"[",d(ie,K),"]=",d(B,K)].join("")]};case"bracket":return le=>(z,B)=>void 0===B||K.skipNull&&null===B||K.skipEmptyString&&""===B?z:null===B?[...z,[d(le,K),"[]"].join("")]:[...z,[d(le,K),"[]=",d(B,K)].join("")];case"comma":case"separator":return le=>(z,B)=>null==B||0===B.length?z:0===z.length?[[d(le,K),"=",d(B,K)].join("")]:[[z,d(B,K)].join(K.arrayFormatSeparator)];default:return le=>(z,B)=>void 0===B||K.skipNull&&null===B||K.skipEmptyString&&""===B?z:null===B?[...z,d(le,K)]:[...z,[d(le,K),"=",d(B,K)].join("")]}}(Z),H={};for(const K of Object.keys(V))x(K)||(H[K]=V[K]);const J=Object.keys(H);return!1!==Z.sort&&J.sort(Z.sort),J.map(K=>{const le=V[K];return void 0===le?"":null===le?d(K,Z):Array.isArray(le)?le.reduce(W(K),[]).join("&"):d(K,Z)+"="+d(le,Z)}).filter(K=>K.length>0).join("&")},c.parseUrl=(V,Z)=>{Z=Object.assign({decode:!0},Z);const[x,W]=E(V,"#");return Object.assign({url:x.split("?")[0]||"",query:M(P(V),Z)},Z&&Z.parseFragmentIdentifier&&W?{fragmentIdentifier:O(W,Z)}:{})},c.stringifyUrl=(V,Z)=>{Z=Object.assign({encode:!0,strict:!0},Z);const x=L(V.url).split("?")[0]||"",W=c.extract(V.url),H=c.parse(W,{sort:!1}),J=Object.assign(H,V.query);let K=c.stringify(J,Z);K&&(K="?"+K);let le=function(z){let B="";const ie=z.indexOf("#");return-1!==ie&&(B=z.slice(ie)),B}(V.url);return V.fragmentIdentifier&&(le="#"+d(V.fragmentIdentifier,Z)),`${x}${K}${le}`},c.pick=(V,Z,x)=>{x=Object.assign({parseFragmentIdentifier:!0},x);const{url:W,query:H,fragmentIdentifier:J}=c.parseUrl(V,x);return c.stringifyUrl({url:W,query:R(H,Z),fragmentIdentifier:J},x)},c.exclude=(V,Z,x)=>{const W=Array.isArray(Z)?H=>!Z.includes(H):(H,J)=>!Z(H,J);return c.pick(V,W,x)}},function(h,c,f){f.r(c),f.d(c,"isNodeJs",function(){return E});var v=f(5);for(var y in v)["default","isNodeJs"].indexOf(y)<0&&function(R){f.d(c,R,function(){return v[R]})}(y);const E=v.isNode},function(h,c,f){f.d(c,"e",function(){return E}),f.d(c,"c",function(){return R}),f.d(c,"d",function(){return p}),f.d(c,"b",function(){return d}),f.d(c,"a",function(){return O});var v=f(11),y=f(4);function E(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}function R(L,P,N){return{id:N||E(),jsonrpc:"2.0",method:L,params:P}}function p(L,P){return{id:L,jsonrpc:"2.0",result:P}}function d(L,P,N){return{id:L,jsonrpc:"2.0",error:O(P,N)}}function O(L,P){return void 0===L?Object(v.a)(y.b):("string"==typeof L&&(L=Object.assign(Object.assign({},Object(v.a)(y.h)),{message:L})),void 0!==P&&(L.data=P),Object(v.c)(L.code)&&(L=Object(v.b)(L.code)),L)}},function(h,c,f){function v(d){return d.includes("*")?E(d):!/\W/g.test(d)}function y(d){return"*"===d}function E(d){return!!y(d)||!!d.includes("*")&&2===d.split("*").length&&1===d.split("*").filter(O=>""===O.trim()).length}function R(d){return!y(d)&&E(d)&&!d.split("*")[0].trim()}function p(d){return!y(d)&&E(d)&&!d.split("*")[1].trim()}f.d(c,"c",function(){return v}),f.d(c,"a",function(){return y}),f.d(c,"e",function(){return E}),f.d(c,"b",function(){return R}),f.d(c,"d",function(){return p})},function(h,c,f){f.r(c);var v=f(20);for(var y in v)["default"].indexOf(y)<0&&function(E){f.d(c,E,function(){return v[E]})}(y)},function(h,c){},function(h,c,f){f.d(c,"b",function(){return y}),f.d(c,"a",function(){return E}),f.d(c,"c",function(){return R});var v=f(15);class y extends v.a{constructor(d){super()}}class E extends v.a{constructor(){super()}}class R extends E{constructor(d){super()}}},function(h,c){},function(h,c,f){function v(p,d){const O=function(L){const P=L.match(new RegExp(/^\w+:/,"gi"));if(P&&P.length)return P[0]}(p);return void 0!==O&&new RegExp(d).test(O)}function y(p){return v(p,"^https?:")}function E(p){return v(p,"^wss?:")}function R(p){return new RegExp("wss?://localhost(:d{2,5})?").test(p)}f.d(c,"a",function(){return y}),f.d(c,"c",function(){return E}),f.d(c,"b",function(){return R})},function(h,c,f){function v(O){return"object"==typeof O&&"id"in O&&"jsonrpc"in O&&"2.0"===O.jsonrpc}function y(O){return v(O)&&"method"in O}function E(O){return v(O)&&(R(O)||p(O))}function R(O){return"result"in O}function p(O){return"error"in O}function d(O){return"error"in O&&!1===O.valid}f.d(c,"b",function(){return v}),f.d(c,"c",function(){return y}),f.d(c,"d",function(){return E}),f.d(c,"e",function(){return R}),f.d(c,"a",function(){return p}),f.d(c,"f",function(){return d})},function(h,c){},function(h,c){},function(h,c,f){f.d(c,"a",function(){return v});class v{}},function(h,c){},function(h,c){},function(h,c){},function(h,c){},function(h,c){},function(h,c){},function(h,c){},function(h,c,f){(function(v){var y=f(66),E=f(67),R=f(68);function p(){return O.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(D,$){if(p()<$)throw new RangeError("Invalid typed array length");return O.TYPED_ARRAY_SUPPORT?(D=new Uint8Array($)).__proto__=O.prototype:(null===D&&(D=new O($)),D.length=$),D}function O(D,$,q){if(!(O.TYPED_ARRAY_SUPPORT||this instanceof O))return new O(D,$,q);if("number"==typeof D){if("string"==typeof $)throw new Error("If encoding is specified then the first argument must be a string");return N(this,D)}return L(this,D,$,q)}function L(D,$,q,Ee){if("number"==typeof $)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&$ instanceof ArrayBuffer?function(Le,je,ft,_t){if(ft<0||je.byteLength<ft)throw new RangeError("'offset' is out of bounds");if(je.byteLength<ft+(_t||0))throw new RangeError("'length' is out of bounds");return je=void 0===ft&&void 0===_t?new Uint8Array(je):void 0===_t?new Uint8Array(je,ft):new Uint8Array(je,ft,_t),O.TYPED_ARRAY_SUPPORT?(Le=je).__proto__=O.prototype:Le=M(Le,je),Le}(D,$,q,Ee):"string"==typeof $?function(Le,je,ft){if("string"==typeof ft&&""!==ft||(ft="utf8"),!O.isEncoding(ft))throw new TypeError('"encoding" must be a valid string encoding');var _t=0|Z(je,ft),Tt=(Le=d(Le,_t)).write(je,ft);return Tt!==_t&&(Le=Le.slice(0,Tt)),Le}(D,$,q):function(Le,je){if(O.isBuffer(je)){var ft=0|V(je.length);return 0===(Le=d(Le,ft)).length||je.copy(Le,0,0,ft),Le}if(je){if("undefined"!=typeof ArrayBuffer&&je.buffer instanceof ArrayBuffer||"length"in je)return"number"!=typeof je.length||(_t=je.length)!=_t?d(Le,0):M(Le,je);if("Buffer"===je.type&&R(je.data))return M(Le,je.data)}var _t;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(D,$)}function P(D){if("number"!=typeof D)throw new TypeError('"size" argument must be a number');if(D<0)throw new RangeError('"size" argument must not be negative')}function N(D,$){if(P($),D=d(D,$<0?0:0|V($)),!O.TYPED_ARRAY_SUPPORT)for(var q=0;q<$;++q)D[q]=0;return D}function M(D,$){var q=$.length<0?0:0|V($.length);D=d(D,q);for(var Ee=0;Ee<q;Ee+=1)D[Ee]=255&$[Ee];return D}function V(D){if(D>=p())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p().toString(16)+" bytes");return 0|D}function Z(D,$){if(O.isBuffer(D))return D.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(D)||D instanceof ArrayBuffer))return D.byteLength;"string"!=typeof D&&(D=""+D);var q=D.length;if(0===q)return 0;for(var Ee=!1;;)switch($){case"ascii":case"latin1":case"binary":return q;case"utf8":case"utf-8":case void 0:return gt(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*q;case"hex":return q>>>1;case"base64":return It(D).length;default:if(Ee)return gt(D).length;$=(""+$).toLowerCase(),Ee=!0}}function x(D,$,q){var Ee=!1;if((void 0===$||$<0)&&($=0),$>this.length||((void 0===q||q>this.length)&&(q=this.length),q<=0)||(q>>>=0)<=($>>>=0))return"";for(D||(D="utf8");;)switch(D){case"hex":return pe(this,$,q);case"utf8":case"utf-8":return Oe(this,$,q);case"ascii":return we(this,$,q);case"latin1":case"binary":return oe(this,$,q);case"base64":return Me(this,$,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,$,q);default:if(Ee)throw new TypeError("Unknown encoding: "+D);D=(D+"").toLowerCase(),Ee=!0}}function W(D,$,q){var Ee=D[$];D[$]=D[q],D[q]=Ee}function H(D,$,q,Ee,Le){if(0===D.length)return-1;if("string"==typeof q?(Ee=q,q=0):q>2147483647?q=2147483647:q<-2147483648&&(q=-2147483648),q=+q,isNaN(q)&&(q=Le?0:D.length-1),q<0&&(q=D.length+q),q>=D.length){if(Le)return-1;q=D.length-1}else if(q<0){if(!Le)return-1;q=0}if("string"==typeof $&&($=O.from($,Ee)),O.isBuffer($))return 0===$.length?-1:J(D,$,q,Ee,Le);if("number"==typeof $)return $&=255,O.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?Le?Uint8Array.prototype.indexOf.call(D,$,q):Uint8Array.prototype.lastIndexOf.call(D,$,q):J(D,[$],q,Ee,Le);throw new TypeError("val must be string, number or Buffer")}function J(D,$,q,Ee,Le){var je,ft=1,_t=D.length,Tt=$.length;if(void 0!==Ee&&("ucs2"===(Ee=String(Ee).toLowerCase())||"ucs-2"===Ee||"utf16le"===Ee||"utf-16le"===Ee)){if(D.length<2||$.length<2)return-1;ft=2,_t/=2,Tt/=2,q/=2}function tn(At,Xt){return 1===ft?At[Xt]:At.readUInt16BE(Xt*ft)}if(Le){var Mt=-1;for(je=q;je<_t;je++)if(tn(D,je)===tn($,-1===Mt?0:je-Mt)){if(-1===Mt&&(Mt=je),je-Mt+1===Tt)return Mt*ft}else-1!==Mt&&(je-=je-Mt),Mt=-1}else for(q+Tt>_t&&(q=_t-Tt),je=q;je>=0;je--){for(var Cn=!0,vn=0;vn<Tt;vn++)if(tn(D,je+vn)!==tn($,vn)){Cn=!1;break}if(Cn)return je}return-1}function K(D,$,q,Ee){q=Number(q)||0;var Le=D.length-q;Ee?(Ee=Number(Ee))>Le&&(Ee=Le):Ee=Le;var je=$.length;if(je%2!=0)throw new TypeError("Invalid hex string");Ee>je/2&&(Ee=je/2);for(var ft=0;ft<Ee;++ft){var _t=parseInt($.substr(2*ft,2),16);if(isNaN(_t))return ft;D[q+ft]=_t}return ft}function le(D,$,q,Ee){return Bt(gt($,D.length-q),D,q,Ee)}function z(D,$,q,Ee){return Bt(function(Le){for(var je=[],ft=0;ft<Le.length;++ft)je.push(255&Le.charCodeAt(ft));return je}($),D,q,Ee)}function B(D,$,q,Ee){return z(D,$,q,Ee)}function ie(D,$,q,Ee){return Bt(It($),D,q,Ee)}function xe(D,$,q,Ee){return Bt(function(Le,je){for(var ft,_t,tn=[],Mt=0;Mt<Le.length&&!((je-=2)<0);++Mt)_t=(ft=Le.charCodeAt(Mt))>>8,tn.push(ft%256),tn.push(_t);return tn}($,D.length-q),D,q,Ee)}function Me(D,$,q){return y.fromByteArray(0===$&&q===D.length?D:D.slice($,q))}function Oe(D,$,q){q=Math.min(D.length,q);for(var Ee=[],Le=$;Le<q;){var je,ft,_t,Tt,tn=D[Le],Mt=null,Cn=tn>239?4:tn>223?3:tn>191?2:1;if(Le+Cn<=q)switch(Cn){case 1:tn<128&&(Mt=tn);break;case 2:128==(192&(je=D[Le+1]))&&(Tt=(31&tn)<<6|63&je)>127&&(Mt=Tt);break;case 3:ft=D[Le+2],128==(192&(je=D[Le+1]))&&128==(192&ft)&&(Tt=(15&tn)<<12|(63&je)<<6|63&ft)>2047&&(Tt<55296||Tt>57343)&&(Mt=Tt);break;case 4:ft=D[Le+2],_t=D[Le+3],128==(192&(je=D[Le+1]))&&128==(192&ft)&&128==(192&_t)&&(Tt=(15&tn)<<18|(63&je)<<12|(63&ft)<<6|63&_t)>65535&&Tt<1114112&&(Mt=Tt)}null===Mt?(Mt=65533,Cn=1):Mt>65535&&(Ee.push((Mt-=65536)>>>10&1023|55296),Mt=56320|1023&Mt),Ee.push(Mt),Le+=Cn}return function(vn){var At=vn.length;if(At<=4096)return String.fromCharCode.apply(String,vn);for(var Xt="",Kn=0;Kn<At;)Xt+=String.fromCharCode.apply(String,vn.slice(Kn,Kn+=4096));return Xt}(Ee)}function we(D,$,q){var Ee="";q=Math.min(D.length,q);for(var Le=$;Le<q;++Le)Ee+=String.fromCharCode(127&D[Le]);return Ee}function oe(D,$,q){var Ee="";q=Math.min(D.length,q);for(var Le=$;Le<q;++Le)Ee+=String.fromCharCode(D[Le]);return Ee}function pe(D,$,q){var Ee=D.length;(!$||$<0)&&($=0),(!q||q<0||q>Ee)&&(q=Ee);for(var Le="",je=$;je<q;++je)Le+=Ve(D[je]);return Le}function ne(D,$,q){for(var Ee=D.slice($,q),Le="",je=0;je<Ee.length;je+=2)Le+=String.fromCharCode(Ee[je]+256*Ee[je+1]);return Le}function de(D,$,q){if(D%1!=0||D<0)throw new RangeError("offset is not uint");if(D+$>q)throw new RangeError("Trying to access beyond buffer length")}function ve(D,$,q,Ee,Le,je){if(!O.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if($>Le||$<je)throw new RangeError('"value" argument is out of bounds');if(q+Ee>D.length)throw new RangeError("Index out of range")}function Re(D,$,q,Ee){$<0&&($=65535+$+1);for(var Le=0,je=Math.min(D.length-q,2);Le<je;++Le)D[q+Le]=($&255<<8*(Ee?Le:1-Le))>>>8*(Ee?Le:1-Le)}function Se(D,$,q,Ee){$<0&&($=4294967295+$+1);for(var Le=0,je=Math.min(D.length-q,4);Le<je;++Le)D[q+Le]=$>>>8*(Ee?Le:3-Le)&255}function Fe(D,$,q,Ee,Le,je){if(q+Ee>D.length)throw new RangeError("Index out of range");if(q<0)throw new RangeError("Index out of range")}function $e(D,$,q,Ee,Le){return Le||Fe(D,0,q,4),E.write(D,$,q,Ee,23,4),q+4}function ke(D,$,q,Ee,Le){return Le||Fe(D,0,q,8),E.write(D,$,q,Ee,52,8),q+8}c.Buffer=O,c.SlowBuffer=function(D){return+D!=D&&(D=0),O.alloc(+D)},c.INSPECT_MAX_BYTES=50,O.TYPED_ARRAY_SUPPORT=void 0!==v.TYPED_ARRAY_SUPPORT?v.TYPED_ARRAY_SUPPORT:function(){try{var D=new Uint8Array(1);return D.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===D.foo()&&"function"==typeof D.subarray&&0===D.subarray(1,1).byteLength}catch{return!1}}(),c.kMaxLength=p(),O.poolSize=8192,O._augment=function(D){return D.__proto__=O.prototype,D},O.from=function(D,$,q){return L(null,D,$,q)},O.TYPED_ARRAY_SUPPORT&&(O.prototype.__proto__=Uint8Array.prototype,O.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&O[Symbol.species]===O&&Object.defineProperty(O,Symbol.species,{value:null,configurable:!0})),O.alloc=function(D,$,q){return null,je=$,ft=q,P(Le=D),Le<=0?d(null,Le):void 0!==je?"string"==typeof ft?d(null,Le).fill(je,ft):d(null,Le).fill(je):d(null,Le);var Le,je,ft},O.allocUnsafe=function(D){return N(null,D)},O.allocUnsafeSlow=function(D){return N(null,D)},O.isBuffer=function(D){return!(null==D||!D._isBuffer)},O.compare=function(D,$){if(!O.isBuffer(D)||!O.isBuffer($))throw new TypeError("Arguments must be Buffers");if(D===$)return 0;for(var q=D.length,Ee=$.length,Le=0,je=Math.min(q,Ee);Le<je;++Le)if(D[Le]!==$[Le]){q=D[Le],Ee=$[Le];break}return q<Ee?-1:Ee<q?1:0},O.isEncoding=function(D){switch(String(D).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},O.concat=function(D,$){if(!R(D))throw new TypeError('"list" argument must be an Array of Buffers');if(0===D.length)return O.alloc(0);var q;if(void 0===$)for($=0,q=0;q<D.length;++q)$+=D[q].length;var Ee=O.allocUnsafe($),Le=0;for(q=0;q<D.length;++q){var je=D[q];if(!O.isBuffer(je))throw new TypeError('"list" argument must be an Array of Buffers');je.copy(Ee,Le),Le+=je.length}return Ee},O.byteLength=Z,O.prototype._isBuffer=!0,O.prototype.swap16=function(){var D=this.length;if(D%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var $=0;$<D;$+=2)W(this,$,$+1);return this},O.prototype.swap32=function(){var D=this.length;if(D%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var $=0;$<D;$+=4)W(this,$,$+3),W(this,$+1,$+2);return this},O.prototype.swap64=function(){var D=this.length;if(D%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var $=0;$<D;$+=8)W(this,$,$+7),W(this,$+1,$+6),W(this,$+2,$+5),W(this,$+3,$+4);return this},O.prototype.toString=function(){var D=0|this.length;return 0===D?"":0===arguments.length?Oe(this,0,D):x.apply(this,arguments)},O.prototype.equals=function(D){if(!O.isBuffer(D))throw new TypeError("Argument must be a Buffer");return this===D||0===O.compare(this,D)},O.prototype.inspect=function(){var D="",$=c.INSPECT_MAX_BYTES;return this.length>0&&(D=this.toString("hex",0,$).match(/.{2}/g).join(" "),this.length>$&&(D+=" ... ")),"<Buffer "+D+">"},O.prototype.compare=function(D,$,q,Ee,Le){if(!O.isBuffer(D))throw new TypeError("Argument must be a Buffer");if(void 0===$&&($=0),void 0===q&&(q=D?D.length:0),void 0===Ee&&(Ee=0),void 0===Le&&(Le=this.length),$<0||q>D.length||Ee<0||Le>this.length)throw new RangeError("out of range index");if(Ee>=Le&&$>=q)return 0;if(Ee>=Le)return-1;if($>=q)return 1;if(this===D)return 0;for(var je=(Le>>>=0)-(Ee>>>=0),ft=(q>>>=0)-($>>>=0),_t=Math.min(je,ft),Tt=this.slice(Ee,Le),tn=D.slice($,q),Mt=0;Mt<_t;++Mt)if(Tt[Mt]!==tn[Mt]){je=Tt[Mt],ft=tn[Mt];break}return je<ft?-1:ft<je?1:0},O.prototype.includes=function(D,$,q){return-1!==this.indexOf(D,$,q)},O.prototype.indexOf=function(D,$,q){return H(this,D,$,q,!0)},O.prototype.lastIndexOf=function(D,$,q){return H(this,D,$,q,!1)},O.prototype.write=function(D,$,q,Ee){if(void 0===$)Ee="utf8",q=this.length,$=0;else if(void 0===q&&"string"==typeof $)Ee=$,q=this.length,$=0;else{if(!isFinite($))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");$|=0,isFinite(q)?(q|=0,void 0===Ee&&(Ee="utf8")):(Ee=q,q=void 0)}var Le=this.length-$;if((void 0===q||q>Le)&&(q=Le),D.length>0&&(q<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ee||(Ee="utf8");for(var je=!1;;)switch(Ee){case"hex":return K(this,D,$,q);case"utf8":case"utf-8":return le(this,D,$,q);case"ascii":return z(this,D,$,q);case"latin1":case"binary":return B(this,D,$,q);case"base64":return ie(this,D,$,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xe(this,D,$,q);default:if(je)throw new TypeError("Unknown encoding: "+Ee);Ee=(""+Ee).toLowerCase(),je=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},O.prototype.slice=function(D,$){var q,Ee=this.length;if((D=~~D)<0?(D+=Ee)<0&&(D=0):D>Ee&&(D=Ee),($=void 0===$?Ee:~~$)<0?($+=Ee)<0&&($=0):$>Ee&&($=Ee),$<D&&($=D),O.TYPED_ARRAY_SUPPORT)(q=this.subarray(D,$)).__proto__=O.prototype;else{var Le=$-D;q=new O(Le,void 0);for(var je=0;je<Le;++je)q[je]=this[je+D]}return q},O.prototype.readUIntLE=function(D,$,q){D|=0,$|=0,q||de(D,$,this.length);for(var Ee=this[D],Le=1,je=0;++je<$&&(Le*=256);)Ee+=this[D+je]*Le;return Ee},O.prototype.readUIntBE=function(D,$,q){D|=0,$|=0,q||de(D,$,this.length);for(var Ee=this[D+--$],Le=1;$>0&&(Le*=256);)Ee+=this[D+--$]*Le;return Ee},O.prototype.readUInt8=function(D,$){return $||de(D,1,this.length),this[D]},O.prototype.readUInt16LE=function(D,$){return $||de(D,2,this.length),this[D]|this[D+1]<<8},O.prototype.readUInt16BE=function(D,$){return $||de(D,2,this.length),this[D]<<8|this[D+1]},O.prototype.readUInt32LE=function(D,$){return $||de(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+16777216*this[D+3]},O.prototype.readUInt32BE=function(D,$){return $||de(D,4,this.length),16777216*this[D]+(this[D+1]<<16|this[D+2]<<8|this[D+3])},O.prototype.readIntLE=function(D,$,q){D|=0,$|=0,q||de(D,$,this.length);for(var Ee=this[D],Le=1,je=0;++je<$&&(Le*=256);)Ee+=this[D+je]*Le;return Ee>=(Le*=128)&&(Ee-=Math.pow(2,8*$)),Ee},O.prototype.readIntBE=function(D,$,q){D|=0,$|=0,q||de(D,$,this.length);for(var Ee=$,Le=1,je=this[D+--Ee];Ee>0&&(Le*=256);)je+=this[D+--Ee]*Le;return je>=(Le*=128)&&(je-=Math.pow(2,8*$)),je},O.prototype.readInt8=function(D,$){return $||de(D,1,this.length),128&this[D]?-1*(255-this[D]+1):this[D]},O.prototype.readInt16LE=function(D,$){$||de(D,2,this.length);var q=this[D]|this[D+1]<<8;return 32768&q?4294901760|q:q},O.prototype.readInt16BE=function(D,$){$||de(D,2,this.length);var q=this[D+1]|this[D]<<8;return 32768&q?4294901760|q:q},O.prototype.readInt32LE=function(D,$){return $||de(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},O.prototype.readInt32BE=function(D,$){return $||de(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},O.prototype.readFloatLE=function(D,$){return $||de(D,4,this.length),E.read(this,D,!0,23,4)},O.prototype.readFloatBE=function(D,$){return $||de(D,4,this.length),E.read(this,D,!1,23,4)},O.prototype.readDoubleLE=function(D,$){return $||de(D,8,this.length),E.read(this,D,!0,52,8)},O.prototype.readDoubleBE=function(D,$){return $||de(D,8,this.length),E.read(this,D,!1,52,8)},O.prototype.writeUIntLE=function(D,$,q,Ee){D=+D,$|=0,q|=0,Ee||ve(this,D,$,q,Math.pow(2,8*q)-1,0);var Le=1,je=0;for(this[$]=255&D;++je<q&&(Le*=256);)this[$+je]=D/Le&255;return $+q},O.prototype.writeUIntBE=function(D,$,q,Ee){D=+D,$|=0,q|=0,Ee||ve(this,D,$,q,Math.pow(2,8*q)-1,0);var Le=q-1,je=1;for(this[$+Le]=255&D;--Le>=0&&(je*=256);)this[$+Le]=D/je&255;return $+q},O.prototype.writeUInt8=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,1,255,0),O.TYPED_ARRAY_SUPPORT||(D=Math.floor(D)),this[$]=255&D,$+1},O.prototype.writeUInt16LE=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,2,65535,0),O.TYPED_ARRAY_SUPPORT?(this[$]=255&D,this[$+1]=D>>>8):Re(this,D,$,!0),$+2},O.prototype.writeUInt16BE=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,2,65535,0),O.TYPED_ARRAY_SUPPORT?(this[$]=D>>>8,this[$+1]=255&D):Re(this,D,$,!1),$+2},O.prototype.writeUInt32LE=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,4,4294967295,0),O.TYPED_ARRAY_SUPPORT?(this[$+3]=D>>>24,this[$+2]=D>>>16,this[$+1]=D>>>8,this[$]=255&D):Se(this,D,$,!0),$+4},O.prototype.writeUInt32BE=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,4,4294967295,0),O.TYPED_ARRAY_SUPPORT?(this[$]=D>>>24,this[$+1]=D>>>16,this[$+2]=D>>>8,this[$+3]=255&D):Se(this,D,$,!1),$+4},O.prototype.writeIntLE=function(D,$,q,Ee){if(D=+D,$|=0,!Ee){var Le=Math.pow(2,8*q-1);ve(this,D,$,q,Le-1,-Le)}var je=0,ft=1,_t=0;for(this[$]=255&D;++je<q&&(ft*=256);)D<0&&0===_t&&0!==this[$+je-1]&&(_t=1),this[$+je]=(D/ft>>0)-_t&255;return $+q},O.prototype.writeIntBE=function(D,$,q,Ee){if(D=+D,$|=0,!Ee){var Le=Math.pow(2,8*q-1);ve(this,D,$,q,Le-1,-Le)}var je=q-1,ft=1,_t=0;for(this[$+je]=255&D;--je>=0&&(ft*=256);)D<0&&0===_t&&0!==this[$+je+1]&&(_t=1),this[$+je]=(D/ft>>0)-_t&255;return $+q},O.prototype.writeInt8=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,1,127,-128),O.TYPED_ARRAY_SUPPORT||(D=Math.floor(D)),D<0&&(D=255+D+1),this[$]=255&D,$+1},O.prototype.writeInt16LE=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,2,32767,-32768),O.TYPED_ARRAY_SUPPORT?(this[$]=255&D,this[$+1]=D>>>8):Re(this,D,$,!0),$+2},O.prototype.writeInt16BE=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,2,32767,-32768),O.TYPED_ARRAY_SUPPORT?(this[$]=D>>>8,this[$+1]=255&D):Re(this,D,$,!1),$+2},O.prototype.writeInt32LE=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,4,2147483647,-2147483648),O.TYPED_ARRAY_SUPPORT?(this[$]=255&D,this[$+1]=D>>>8,this[$+2]=D>>>16,this[$+3]=D>>>24):Se(this,D,$,!0),$+4},O.prototype.writeInt32BE=function(D,$,q){return D=+D,$|=0,q||ve(this,D,$,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),O.TYPED_ARRAY_SUPPORT?(this[$]=D>>>24,this[$+1]=D>>>16,this[$+2]=D>>>8,this[$+3]=255&D):Se(this,D,$,!1),$+4},O.prototype.writeFloatLE=function(D,$,q){return $e(this,D,$,!0,q)},O.prototype.writeFloatBE=function(D,$,q){return $e(this,D,$,!1,q)},O.prototype.writeDoubleLE=function(D,$,q){return ke(this,D,$,!0,q)},O.prototype.writeDoubleBE=function(D,$,q){return ke(this,D,$,!1,q)},O.prototype.copy=function(D,$,q,Ee){if(q||(q=0),Ee||0===Ee||(Ee=this.length),$>=D.length&&($=D.length),$||($=0),Ee>0&&Ee<q&&(Ee=q),Ee===q||0===D.length||0===this.length)return 0;if($<0)throw new RangeError("targetStart out of bounds");if(q<0||q>=this.length)throw new RangeError("sourceStart out of bounds");if(Ee<0)throw new RangeError("sourceEnd out of bounds");Ee>this.length&&(Ee=this.length),D.length-$<Ee-q&&(Ee=D.length-$+q);var Le,je=Ee-q;if(this===D&&q<$&&$<Ee)for(Le=je-1;Le>=0;--Le)D[Le+$]=this[Le+q];else if(je<1e3||!O.TYPED_ARRAY_SUPPORT)for(Le=0;Le<je;++Le)D[Le+$]=this[Le+q];else Uint8Array.prototype.set.call(D,this.subarray(q,q+je),$);return je},O.prototype.fill=function(D,$,q,Ee){if("string"==typeof D){if("string"==typeof $?(Ee=$,$=0,q=this.length):"string"==typeof q&&(Ee=q,q=this.length),1===D.length){var Le=D.charCodeAt(0);Le<256&&(D=Le)}if(void 0!==Ee&&"string"!=typeof Ee)throw new TypeError("encoding must be a string");if("string"==typeof Ee&&!O.isEncoding(Ee))throw new TypeError("Unknown encoding: "+Ee)}else"number"==typeof D&&(D&=255);if($<0||this.length<$||this.length<q)throw new RangeError("Out of range index");if(q<=$)return this;var je;if($>>>=0,q=void 0===q?this.length:q>>>0,D||(D=0),"number"==typeof D)for(je=$;je<q;++je)this[je]=D;else{var ft=O.isBuffer(D)?D:gt(new O(D,Ee).toString()),_t=ft.length;for(je=0;je<q-$;++je)this[je+$]=ft[je%_t]}return this};var at=/[^+\/0-9A-Za-z-_]/g;function Ve(D){return D<16?"0"+D.toString(16):D.toString(16)}function gt(D,$){var q;$=$||1/0;for(var Ee=D.length,Le=null,je=[],ft=0;ft<Ee;++ft){if((q=D.charCodeAt(ft))>55295&&q<57344){if(!Le){if(q>56319){($-=3)>-1&&je.push(239,191,189);continue}if(ft+1===Ee){($-=3)>-1&&je.push(239,191,189);continue}Le=q;continue}if(q<56320){($-=3)>-1&&je.push(239,191,189),Le=q;continue}q=65536+(Le-55296<<10|q-56320)}else Le&&($-=3)>-1&&je.push(239,191,189);if(Le=null,q<128){if(($-=1)<0)break;je.push(q)}else if(q<2048){if(($-=2)<0)break;je.push(q>>6|192,63&q|128)}else if(q<65536){if(($-=3)<0)break;je.push(q>>12|224,q>>6&63|128,63&q|128)}else{if(!(q<1114112))throw new Error("Invalid code point");if(($-=4)<0)break;je.push(q>>18|240,q>>12&63|128,q>>6&63|128,63&q|128)}}return je}function It(D){return y.toByteArray(function($){if(($=(q=$,q.trim?q.trim():q.replace(/^\s+|\s+$/g,"")).replace(at,"")).length<2)return"";for(var q;$.length%4!=0;)$+="=";return $}(D))}function Bt(D,$,q,Ee){for(var Le=0;Le<Ee&&!(Le+q>=$.length||Le>=D.length);++Le)$[Le+q]=D[Le];return Le}}).call(this,f(18))},function(h,c,f){f.d(c,"a",function(){return y});var v=f(5);function y(E){return v.getBrowerCrypto().getRandomValues(new Uint8Array(E))}},function(h,c,f){f.d(c,"b",function(){return y}),f.d(c,"a",function(){return E});var v=f(8);function y(R,p,d){return Object(v.b)(R,p,d)}function E(R,p,d){return Object(v.a)(R,p,d)}},function(h,c,f){f.d(c,"a",function(){return y});var v=f(8);function y(R,p){return E.apply(this,arguments)}function E(){return(E=ue(function*(R,p){return yield Object(v.c)(R,p)})).apply(this,arguments)}f(16)},function(h,c,f){var v=f(5);f.o(v,"isConstantTime")&&f.d(c,"isConstantTime",function(){return v.isConstantTime})},function(h,c,f){},function(h,c){},function(h,c,f){function v(y,E){if(y.length!==E.length)return!1;let R=0;for(let p=0;p<y.length;p++)R|=y[p]^E[p];return 0===R}f.d(c,"a",function(){return v})},function(h,c,f){f(8)},function(h,c,f){const v=f(21),y=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],E=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];c.getBlocksCount=function(R,p){switch(p){case v.L:return y[4*(R-1)+0];case v.M:return y[4*(R-1)+1];case v.Q:return y[4*(R-1)+2];case v.H:return y[4*(R-1)+3];default:return}},c.getTotalCodewordsCount=function(R,p){switch(p){case v.L:return E[4*(R-1)+0];case v.M:return E[4*(R-1)+1];case v.Q:return E[4*(R-1)+2];case v.H:return E[4*(R-1)+3];default:return}}},function(h,c){c.isValid=function(f){return!isNaN(f)&&f>=1&&f<=40}},function(h,c){let f="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";f=f.replace(/u/g,"\\u");const v="(?:(?![A-Z0-9 $%*+\\-./:]|"+f+")(?:.|[\r\n]))+";c.KANJI=new RegExp(f,"g"),c.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),c.BYTE=new RegExp(v,"g"),c.NUMERIC=new RegExp("[0-9]+","g"),c.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const y=new RegExp("^"+f+"$"),E=new RegExp("^[0-9]+$"),R=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");c.testKanji=function(p){return y.test(p)},c.testNumeric=function(p){return E.test(p)},c.testAlphanumeric=function(p){return R.test(p)}},function(h,c){function f(v){if("number"==typeof v&&(v=v.toString()),"string"!=typeof v)throw new Error("Color should be defined as hex string");let y=v.slice().replace("#","").split("");if(y.length<3||5===y.length||y.length>8)throw new Error("Invalid hex color: "+v);3!==y.length&&4!==y.length||(y=Array.prototype.concat.apply([],y.map(function(R){return[R,R]}))),6===y.length&&y.push("F","F");const E=parseInt(y.join(""),16);return{r:E>>24&255,g:E>>16&255,b:E>>8&255,a:255&E,hex:"#"+y.slice(0,6).join("")}}c.getOptions=function(v){v||(v={}),v.color||(v.color={});const E=v.width&&v.width>=21?v.width:void 0;return{width:E,scale:E?4:v.scale||4,margin:null==v.margin||v.margin<0?4:v.margin,color:{dark:f(v.color.dark||"#000000ff"),light:f(v.color.light||"#ffffffff")},type:v.type,rendererOpts:v.rendererOpts||{}}},c.getScale=function(v,y){return y.width&&y.width>=v+2*y.margin?y.width/(v+2*y.margin):y.scale},c.getImageWidth=function(v,y){const E=c.getScale(v,y);return Math.floor((v+2*y.margin)*E)},c.qrToImageData=function(v,y,E){const R=y.modules.size,p=y.modules.data,d=c.getScale(R,E),O=Math.floor((R+2*E.margin)*d),L=E.margin*d,P=[E.color.light,E.color.dark];for(let N=0;N<O;N++)for(let M=0;M<O;M++){let V=4*(N*O+M),Z=E.color.light;N>=L&&M>=L&&N<O-L&&M<O-L&&(Z=P[p[Math.floor((N-L)/d)*R+Math.floor((M-L)/d)]?1:0]),v[V++]=Z.r,v[V++]=Z.g,v[V++]=Z.b,v[V]=Z.a}}},function(h,c,f){f.d(c,"k",function(){return v}),f.d(c,"l",function(){return y}),f.d(c,"m",function(){return E}),f.d(c,"e",function(){return R}),f.d(c,"h",function(){return p}),f.d(c,"c",function(){return d}),f.d(c,"f",function(){return O}),f.d(c,"d",function(){return L}),f.d(c,"g",function(){return P}),f.d(c,"a",function(){return N}),f.d(c,"b",function(){return M}),f.d(c,"i",function(){return V}),f.d(c,"j",function(){return Z}),f.d(c,"p",function(){return x}),f.d(c,"v",function(){return W}),f.d(c,"s",function(){return H}),f.d(c,"q",function(){return J}),f.d(c,"r",function(){return K}),f.d(c,"w",function(){return le}),f.d(c,"x",function(){return z}),f.d(c,"o",function(){return B}),f.d(c,"u",function(){return ie}),f.d(c,"n",function(){return xe}),f.d(c,"t",function(){return Me});const v="Session currently connected",y="Session currently disconnected",E="Session Rejected",R="Missing JSON RPC response",p='JSON-RPC success response must include "result" field',d='JSON-RPC error response must include "error" field',O='JSON RPC request must have valid "method" value',L='JSON RPC request must have valid "id" value',P="Missing one of the required parameters: bridge / uri / session",N="JSON RPC response format is invalid",M="URI format is invalid",V="QRCode Modal not provided",Z="User close QRCode Modal",x=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],W=x,H=["wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],J=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign",...H],K=["eth_accounts","eth_chainId","net_version"],le=J,z=K,B="WALLETCONNECT_DEEPLINK_CHOICE",ie=B,xe={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"},Me=xe},function(h,c,f){(function(v){var y=f(22).strict;h.exports=function(E){if(y(E)){var R=v.from(E.buffer);return E.byteLength!==E.buffer.byteLength&&(R=R.slice(E.byteOffset,E.byteOffset+E.byteLength)),R}return v.from(E)}}).call(this,f(44).Buffer)},function(h,c,f){(function(v){f.d(c,"a",function(){return M});var y=function(x,W,H){if(H||2===arguments.length)for(var J,K=0,le=W.length;K<le;K++)!J&&K in W||(J||(J=Array.prototype.slice.call(W,0,K)),J[K]=W[K]);return x.concat(J||Array.prototype.slice.call(W))},E=function(x,W,H){this.name=x,this.version=W,this.os=H,this.type="browser"},R=function(x){this.version=x,this.type="node",this.name="node",this.os=v.platform},p=function(x,W,H,J){this.name=x,this.version=W,this.os=H,this.bot=J,this.type="bot-device"},d=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},O=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},L=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,P=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],N=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function M(x){return x?Z(x):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new O:"undefined"!=typeof navigator?Z(navigator.userAgent):void 0!==v&&v.version?new R(v.version.slice(1)):null}function Z(x){var W=function(x){return""!==x&&P.reduce(function(W,H){var J=H[0];if(W)return W;var le=H[1].exec(x);return!!le&&[J,le]},!1)}(x);if(!W)return null;var H=W[0],J=W[1];if("searchbot"===H)return new d;var K=J[1]&&J[1].split(".").join("_").split("_").slice(0,3);K?K.length<3&&(K=y(y([],K,!0),function(ie){for(var xe=[],Me=0;Me<ie;Me++)xe.push("0");return xe}(3-K.length),!0)):K=[];var le=K.join("."),z=function(ie){for(var xe=0,Me=N.length;xe<Me;xe++){var Oe=N[xe],we=Oe[0];if(Oe[1].exec(ie))return we}return null}(x),B=L.exec(x);return B&&B[1]?new p(H,le,z,B[1]):new E(H,le,z)}}).call(this,f(19))},function(h,c,f){Object.defineProperty(c,"__esModule",{value:!0}),c.getWindowMetadata=void 0;const v=f(6);c.getWindowMetadata=function(){let y,E;try{y=v.getDocumentOrThrow(),E=v.getLocationOrThrow()}catch{return null}function R(...d){const O=y.getElementsByTagName("meta");for(let L=0;L<O.length;L++){const P=O[L],N=["itemprop","property","name"].map(M=>P.getAttribute(M)).filter(M=>!!M&&d.includes(M));if(N.length&&N){const M=P.getAttribute("content");if(M)return M}}return""}const p=function(){let d=R("name","og:site_name","og:title","twitter:title");return d||(d=y.title),d}();return{description:R("description","og:description","twitter:description","keywords"),url:E.origin,icons:function(){const d=y.getElementsByTagName("link"),O=[];for(let L=0;L<d.length;L++){const P=d[L],N=P.getAttribute("rel");if(N&&N.toLowerCase().indexOf("icon")>-1){const M=P.getAttribute("href");if(M)if(-1===M.toLowerCase().indexOf("https:")&&-1===M.toLowerCase().indexOf("http:")&&0!==M.indexOf("//")){let V=E.protocol+"//"+E.host;if(0===M.indexOf("/"))V+=M;else{const Z=E.pathname.split("/");Z.pop(),V+=Z.join("/")+"/"+M}O.push(V)}else 0===M.indexOf("//")?O.push(E.protocol+M):O.push(M)}}return O}(),name:p}}},function(h,c,f){(function(v){var y=f(1),E=f(62);const R=void 0!==v.WebSocket?v.WebSocket:f(74);c.a=class{constructor(p){if(this.opts=p,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=p.protocol,this._version=p.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=p.subscriptions||[],this._netMonitor=p.netMonitor||new E.a,!p.url||"string"!=typeof p.url)throw new Error("Missing or invalid WebSocket url");this._url=p.url,this._netMonitor.on("online",()=>this._socketCreate())}set readyState(p){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(p){}get connecting(){return 0===this.readyState}set connected(p){}get connected(){return 1===this.readyState}set closing(p){}get closing(){return 2===this.readyState}set closed(p){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(p,d,O){if(!d||"string"!=typeof d)throw new Error("Missing or invalid topic field");this._socketSend({topic:d,type:"pub",payload:p,silent:!!O})}subscribe(p){this._socketSend({topic:p,type:"sub",payload:"",silent:!0})}on(p,d){this._events.push({event:p,callback:d})}_socketCreate(){if(this._nextSocket)return;const p=function(d,O,L){var P,N;const M=(d.startsWith("https")?d.replace("https","wss"):d.startsWith("http")?d.replace("http","ws"):d).split("?"),V=Object(y.isBrowser)()?{protocol:O,version:L,env:"browser",host:(null===(P=Object(y.getLocation)())||void 0===P?void 0:P.host)||""}:{protocol:O,version:L,env:(null===(N=Object(y.detectEnv)())||void 0===N?void 0:N.name)||""},Z=Object(y.appendToQueryString)(Object(y.getQueryString)(M[1]||""),V);return M[0]+"?"+Z}(this._url,this._protocol,this._version);if(this._nextSocket=new R(p),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=d=>this._socketReceive(d),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=d=>this._socketError(d),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate()},1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(p){const d=JSON.stringify(p);this._socket&&1===this._socket.readyState?this._socket.send(d):(this._setToQueue(p),this._socketCreate())}_socketReceive(p){var d=this;return ue(function*(){let O;try{O=JSON.parse(p.data)}catch{return}if(d._socketSend({topic:O.topic,type:"ack",payload:"",silent:!0}),d._socket&&1===d._socket.readyState){const L=d._events.filter(P=>"message"===P.event);L&&L.length&&L.forEach(P=>P.callback(O))}})()}_socketError(p){const d=this._events.filter(O=>"error"===O.event);d&&d.length&&d.forEach(O=>O.callback(p))}_queueSubscriptions(){this._subscriptions.forEach(p=>this._queue.push({topic:p,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(p){this._queue.push(p)}_pushQueue(){this._queue.forEach(p=>this._socketSend(p)),this._queue=[]}}}).call(this,f(18))},function(h,c,f){c.a=class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(v,y){this._eventEmitters.push({event:v,callback:y})}trigger(v){let y=[];v&&(y=this._eventEmitters.filter(E=>E.event===v)),y.forEach(E=>{E.callback()})}}},function(h,c,f){Object.defineProperty(c,"__esModule",{value:!0});const v=f(17),y=v.__importDefault(f(13)),E=f(102),R=f(103),p=f(2),d=f(1),O=f(73);c.default=class{constructor(L){this.events=new y.default,this.rpc={infuraId:null==L?void 0:L.infuraId,custom:null==L?void 0:L.rpc},this.signer=new E.JsonRpcProvider(new O.SignerConnection(L)),this.http=this.setHttpProvider(this.signer.connection.chainId||(null==L?void 0:L.chainId)||1),this.registerEventListeners()}get connected(){return this.signer.connection.connected}get connector(){return this.signer.connection.connector}get accounts(){return this.signer.connection.accounts}get chainId(){return this.signer.connection.chainId}get rpcUrl(){var L;return(null===(L=this.http)||void 0===L?void 0:L.connection).url||""}request(L){return v.__awaiter(this,void 0,void 0,function*(){switch(L.method){case"eth_requestAccounts":return yield this.connect(),this.signer.connection.accounts;case"eth_accounts":return this.signer.connection.accounts;case"eth_chainId":return this.signer.connection.chainId}if(p.SIGNING_METHODS.includes(L.method))return this.signer.request(L);if(void 0===this.http)throw new Error(`Cannot request JSON-RPC method (${L.method}) without provided rpc url`);return this.http.request(L)})}sendAsync(L,P){this.request(L).then(N=>P(null,N)).catch(N=>P(N,void 0))}enable(){return v.__awaiter(this,void 0,void 0,function*(){return yield this.request({method:"eth_requestAccounts"})})}connect(){return v.__awaiter(this,void 0,void 0,function*(){this.signer.connection.connected||(yield this.signer.connect())})}disconnect(){return v.__awaiter(this,void 0,void 0,function*(){this.signer.connection.connected&&(yield this.signer.disconnect())})}on(L,P){this.events.on(L,P)}once(L,P){this.events.once(L,P)}removeListener(L,P){this.events.removeListener(L,P)}off(L,P){this.events.off(L,P)}get isWalletConnect(){return!0}registerEventListeners(){this.signer.connection.on("accountsChanged",L=>{this.events.emit("accountsChanged",L)}),this.signer.connection.on("chainChanged",L=>{this.http=this.setHttpProvider(L),this.events.emit("chainChanged",L)}),this.signer.on("disconnect",()=>{this.events.emit("disconnect")})}setHttpProvider(L){const P=d.getRpcUrl(L,this.rpc);if(void 0!==P)return new E.JsonRpcProvider(new R.HttpConnection(P))}}},function(h,c,f){(function(v){function y(){return(null==v?void 0:v.crypto)||(null==v?void 0:v.msCrypto)||{}}function E(){const R=y();return R.subtle||R.webkitSubtle}Object.defineProperty(c,"__esModule",{value:!0}),c.isBrowserCryptoAvailable=c.getSubtleCrypto=c.getBrowerCrypto=void 0,c.getBrowerCrypto=y,c.getSubtleCrypto=E,c.isBrowserCryptoAvailable=function(){return!!y()&&!!E()}}).call(this,f(18))},function(h,c,f){(function(v){function y(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function E(){return void 0!==v&&void 0!==v.versions&&void 0!==v.versions.node}Object.defineProperty(c,"__esModule",{value:!0}),c.isBrowser=c.isNode=c.isReactNative=void 0,c.isReactNative=y,c.isNode=E,c.isBrowser=function(){return!y()&&!E()}}).call(this,f(19))},function(h,c,f){c.byteLength=function(P){var N=O(P),V=N[1];return 3*(N[0]+V)/4-V},c.toByteArray=function(P){var N,M,z,V=O(P),Z=V[0],x=V[1],W=new E(3*(Z+(z=x))/4-z),H=0,J=x>0?Z-4:Z;for(M=0;M<J;M+=4)N=y[P.charCodeAt(M)]<<18|y[P.charCodeAt(M+1)]<<12|y[P.charCodeAt(M+2)]<<6|y[P.charCodeAt(M+3)],W[H++]=N>>16&255,W[H++]=N>>8&255,W[H++]=255&N;return 2===x&&(N=y[P.charCodeAt(M)]<<2|y[P.charCodeAt(M+1)]>>4,W[H++]=255&N),1===x&&(N=y[P.charCodeAt(M)]<<10|y[P.charCodeAt(M+1)]<<4|y[P.charCodeAt(M+2)]>>2,W[H++]=N>>8&255,W[H++]=255&N),W},c.fromByteArray=function(P){for(var N,M=P.length,V=M%3,Z=[],x=0,W=M-V;x<W;x+=16383)Z.push(L(P,x,x+16383>W?W:x+16383));return 1===V?Z.push(v[(N=P[M-1])>>2]+v[N<<4&63]+"=="):2===V&&Z.push(v[(N=(P[M-2]<<8)+P[M-1])>>10]+v[N>>4&63]+v[N<<2&63]+"="),Z.join("")};for(var v=[],y=[],E="undefined"!=typeof Uint8Array?Uint8Array:Array,R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=R.length;p<d;++p)v[p]=R[p],y[R.charCodeAt(p)]=p;function O(P){var N=P.length;if(N%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var M=P.indexOf("=");return-1===M&&(M=N),[M,M===N?0:4-M%4]}function L(P,N,M){for(var Z,x=[],W=N;W<M;W+=3)x.push(v[(Z=(P[W]<<16&16711680)+(P[W+1]<<8&65280)+(255&P[W+2]))>>18&63]+v[Z>>12&63]+v[Z>>6&63]+v[63&Z]);return x.join("")}y["-".charCodeAt(0)]=62,y["_".charCodeAt(0)]=63},function(h,c){c.read=function(f,v,y,E,R){var p,d,O=8*R-E-1,L=(1<<O)-1,P=L>>1,N=-7,M=y?R-1:0,V=y?-1:1,Z=f[v+M];for(M+=V,p=Z&(1<<-N)-1,Z>>=-N,N+=O;N>0;p=256*p+f[v+M],M+=V,N-=8);for(d=p&(1<<-N)-1,p>>=-N,N+=E;N>0;d=256*d+f[v+M],M+=V,N-=8);if(0===p)p=1-P;else{if(p===L)return d?NaN:1/0*(Z?-1:1);d+=Math.pow(2,E),p-=P}return(Z?-1:1)*d*Math.pow(2,p-E)},c.write=function(f,v,y,E,R,p){var d,O,L,P=8*p-R-1,N=(1<<P)-1,M=N>>1,V=23===R?Math.pow(2,-24)-Math.pow(2,-77):0,Z=E?0:p-1,x=E?1:-1,W=v<0||0===v&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(O=isNaN(v)?1:0,d=N):(d=Math.floor(Math.log(v)/Math.LN2),v*(L=Math.pow(2,-d))<1&&(d--,L*=2),(v+=d+M>=1?V/L:V*Math.pow(2,1-M))*L>=2&&(d++,L/=2),d+M>=N?(O=0,d=N):d+M>=1?(O=(v*L-1)*Math.pow(2,R),d+=M):(O=v*Math.pow(2,M-1)*Math.pow(2,R),d=0));R>=8;f[y+Z]=255&O,Z+=x,O/=256,R-=8);for(d=d<<R|O,P+=R;P>0;f[y+Z]=255&d,Z+=x,d/=256,P-=8);f[y+Z-x]|=128*W}},function(h,c){var f={}.toString;h.exports=Array.isArray||function(v){return"[object Array]"==f.call(v)}},function(h,c,f){h.exports=v=>encodeURIComponent(v).replace(/[!'()*]/g,y=>"%"+y.charCodeAt(0).toString(16).toUpperCase())},function(h,c,f){var v=new RegExp("(%[a-f0-9]{2})|([^%]+?)","gi"),y=new RegExp("(%[a-f0-9]{2})+","gi");function E(p,d){try{return[decodeURIComponent(p.join(""))]}catch{}if(1===p.length)return p;var O=p.slice(0,d=d||1),L=p.slice(d);return Array.prototype.concat.call([],E(O),E(L))}function R(p){try{return decodeURIComponent(p)}catch{for(var d=p.match(v)||[],O=1;O<d.length;O++)d=(p=E(d,O).join("")).match(v)||[];return p}}h.exports=function(p){if("string"!=typeof p)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof p+"`");try{return p=p.replace(/\+/g," "),decodeURIComponent(p)}catch{return function(O){for(var L={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},P=y.exec(O);P;){try{L[P[0]]=decodeURIComponent(P[0])}catch{var N=R(P[0]);N!==P[0]&&(L[P[0]]=N)}P=y.exec(O)}L["%C2"]="\ufffd";for(var M=Object.keys(L),V=0;V<M.length;V++){var Z=M[V];O=O.replace(new RegExp(Z,"g"),L[Z])}return O}(p)}}},function(h,c,f){h.exports=(v,y)=>{if("string"!=typeof v||"string"!=typeof y)throw new TypeError("Expected the arguments to be of type `string`");if(""===y)return[v];const E=v.indexOf(y);return-1===E?[v]:[v.slice(0,E),v.slice(E+y.length)]}},function(h,c,f){h.exports=function(v,y){for(var E={},R=Object.keys(v),p=Array.isArray(y),d=0;d<R.length;d++){var O=R[d],L=v[O];(p?-1!==y.indexOf(O):y(O,L,v))&&(E[O]=L)}return E}},function(h,c,f){Object.defineProperty(c,"__esModule",{value:!0}),c.SignerConnection=void 0;const v=f(17),y=v.__importDefault(f(13)),E=v.__importDefault(f(100)),R=v.__importDefault(f(75)),p=f(20),d=f(7);class O extends p.IJsonRpcConnection{constructor(P){super(),this.events=new y.default,this.accounts=[],this.chainId=1,this.pending=!1,this.bridge="https://bridge.walletconnect.org",this.qrcode=!0,this.qrcodeModalOptions=void 0,this.opts=P,this.chainId=(null==P?void 0:P.chainId)||this.chainId,this.wc=this.register(P)}get connected(){return void 0!==this.wc&&this.wc.connected}get connecting(){return this.pending}get connector(){return this.wc=this.register(this.opts),this.wc}on(P,N){this.events.on(P,N)}once(P,N){this.events.once(P,N)}off(P,N){this.events.off(P,N)}removeListener(P,N){this.events.removeListener(P,N)}open(P){return v.__awaiter(this,void 0,void 0,function*(){if(!this.connected)return new Promise((N,M)=>{this.on("error",V=>{M(V)}),this.on("open",()=>{N()}),this.create(P)});this.onOpen()})}close(){return v.__awaiter(this,void 0,void 0,function*(){void 0!==this.wc&&(this.wc.connected&&this.wc.killSession(),this.onClose())})}send(P){return v.__awaiter(this,void 0,void 0,function*(){this.wc=this.register(this.opts),this.connected||(yield this.open()),this.sendPayload(P).then(N=>this.events.emit("payload",N)).catch(N=>this.events.emit("payload",d.formatJsonRpcError(P.id,N.message)))})}register(P){if(this.wc)return this.wc;if(this.opts=P||this.opts,this.bridge=(null==P?void 0:P.connector)?P.connector.bridge:(null==P?void 0:P.bridge)||"https://bridge.walletconnect.org",this.qrcode=void 0===(null==P?void 0:P.qrcode)||!1!==P.qrcode,this.chainId=void 0!==(null==P?void 0:P.chainId)?P.chainId:this.chainId,this.qrcodeModalOptions=null==P?void 0:P.qrcodeModalOptions,this.wc=void 0!==(null==P?void 0:P.connector)?P.connector:new E.default({bridge:this.bridge,qrcodeModal:this.qrcode?R.default:void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:null==P?void 0:P.storageId,signingMethods:null==P?void 0:P.signingMethods,clientMeta:null==P?void 0:P.clientMeta}),void 0===this.wc)throw new Error("Failed to register WalletConnect connector");return this.wc.accounts.length&&(this.accounts=this.wc.accounts),this.wc.chainId&&(this.chainId=this.wc.chainId),this.registerConnectorEvents(),this.wc}onOpen(P){this.pending=!1,P&&(this.wc=P),this.events.emit("open")}onClose(){this.pending=!1,this.wc&&(this.wc=void 0),this.events.emit("close")}onError(P,N="Failed or Rejected Request",M=-32e3){const V={id:P.id,jsonrpc:P.jsonrpc,error:{code:M,message:N}};return this.events.emit("payload",V),V}create(P){this.wc=this.register(this.opts),this.chainId=P||this.chainId,this.connected||this.pending||(this.pending=!0,this.registerConnectorEvents(),this.wc.createSession({chainId:this.chainId}).then(()=>this.events.emit("created")).catch(N=>this.events.emit("error",N)))}registerConnectorEvents(){this.wc=this.register(this.opts),this.wc.on("connect",P=>{var N,M;P?this.events.emit("error",P):(this.accounts=(null===(N=this.wc)||void 0===N?void 0:N.accounts)||[],this.chainId=(null===(M=this.wc)||void 0===M?void 0:M.chainId)||this.chainId,this.onOpen())}),this.wc.on("disconnect",P=>{P?this.events.emit("error",P):this.onClose()}),this.wc.on("modal_closed",()=>{this.events.emit("error",new Error("User closed modal"))}),this.wc.on("session_update",(P,N)=>{const{accounts:M,chainId:V}=N.params[0];(!this.accounts||M&&this.accounts!==M)&&(this.accounts=M,this.events.emit("accountsChanged",M)),(!this.chainId||V&&this.chainId!==V)&&(this.chainId=V,this.events.emit("chainChanged",V))})}sendPayload(P){return v.__awaiter(this,void 0,void 0,function*(){this.wc=this.register(this.opts);try{const N=yield this.wc.unsafeSend(P);return this.sanitizeResponse(N)}catch(N){return this.onError(P,N.message)}})}sanitizeResponse(P){return void 0!==P.error&&void 0===P.error.code?d.formatJsonRpcError(P.id,P.error.message,P.error.data):P}}c.SignerConnection=O,c.default=O},function(h,c,f){h.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(h,c,f){(function(v){function y(B){return B&&"object"==typeof B&&"default"in B?B.default:B}var E=f(1),R=y(f(76)),p=y(f(98)),d=f(101);function O(B){return d.createElement("div",{className:"walletconnect-modal__header"},d.createElement("img",{src:"data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='300px' height='185px' viewBox='0 0 300 185' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch --%3E %3Ctitle%3EWalletConnect%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cdefs%3E%3C/defs%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='walletconnect-logo-alt' fill='%233B99FC' fill-rule='nonzero'%3E %3Cpath d='M61.4385429,36.2562612 C110.349767,-11.6319051 189.65053,-11.6319051 238.561752,36.2562612 L244.448297,42.0196786 C246.893858,44.4140867 246.893858,48.2961898 244.448297,50.690599 L224.311602,70.406102 C223.088821,71.6033071 221.106302,71.6033071 219.883521,70.406102 L211.782937,62.4749541 C177.661245,29.0669724 122.339051,29.0669724 88.2173582,62.4749541 L79.542302,70.9685592 C78.3195204,72.1657633 76.337001,72.1657633 75.1142214,70.9685592 L54.9775265,51.2530561 C52.5319653,48.8586469 52.5319653,44.9765439 54.9775265,42.5821357 L61.4385429,36.2562612 Z M280.206339,77.0300061 L298.128036,94.5769031 C300.573585,96.9713 300.573599,100.85338 298.128067,103.247793 L217.317896,182.368927 C214.872352,184.763353 210.907314,184.76338 208.461736,182.368989 C208.461726,182.368979 208.461714,182.368967 208.461704,182.368957 L151.107561,126.214385 C150.496171,125.615783 149.504911,125.615783 148.893521,126.214385 C148.893517,126.214389 148.893514,126.214393 148.89351,126.214396 L91.5405888,182.368927 C89.095052,184.763359 85.1300133,184.763399 82.6844276,182.369014 C82.6844133,182.369 82.684398,182.368986 82.6843827,182.36897 L1.87196327,103.246785 C-0.573596939,100.852377 -0.573596939,96.9702735 1.87196327,94.5758653 L19.7936929,77.028998 C22.2392531,74.6345898 26.2042918,74.6345898 28.6498531,77.028998 L86.0048306,133.184355 C86.6162214,133.782957 87.6074796,133.782957 88.2188704,133.184355 C88.2188796,133.184346 88.2188878,133.184338 88.2188969,133.184331 L145.571,77.028998 C148.016505,74.6345347 151.981544,74.6344449 154.427161,77.028798 C154.427195,77.0288316 154.427229,77.0288653 154.427262,77.028899 L211.782164,133.184331 C212.393554,133.782932 213.384814,133.782932 213.996204,133.184331 L271.350179,77.0300061 C273.79574,74.6355969 277.760778,74.6355969 280.206339,77.0300061 Z' id='WalletConnect'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E",className:"walletconnect-modal__headerLogo"}),d.createElement("p",null,"WalletConnect"),d.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:B.onClose},d.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},d.createElement("div",{className:"walletconnect-modal__close__line1"}),d.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function L(B){return d.createElement("a",{className:"walletconnect-connect__button",href:B.href,id:"walletconnect-connect-button-"+B.name,onClick:B.onClick,rel:"noopener noreferrer",style:{backgroundColor:B.color},target:"_blank"},B.name)}function P(B){var ie=B.color,Oe=B.logo;return d.createElement("a",{className:"walletconnect-modal__base__row",href:B.href,onClick:B.onClick,rel:"noopener noreferrer",target:"_blank"},d.createElement("h3",{className:"walletconnect-modal__base__row__h3"},B.name),d.createElement("div",{className:"walletconnect-modal__base__row__right"},d.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+Oe+"') "+ie,backgroundSize:"100%"}}),d.createElement("img",{src:"data:image/svg+xml,%3Csvg width='8' height='18' viewBox='0 0 8 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.586301 0.213898C0.150354 0.552968 0.0718197 1.18124 0.41089 1.61719L5.2892 7.88931C5.57007 8.25042 5.57007 8.75608 5.2892 9.11719L0.410889 15.3893C0.071819 15.8253 0.150353 16.4535 0.586301 16.7926C1.02225 17.1317 1.65052 17.0531 1.98959 16.6172L6.86791 10.3451C7.7105 9.26174 7.7105 7.74476 6.86791 6.66143L1.98959 0.38931C1.65052 -0.0466374 1.02225 -0.125172 0.586301 0.213898Z' fill='%233C4252'/%3E %3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function N(B){var Me=B.name,oe=window.innerWidth<768?(Me.length>8?2.5:2.7)+"vw":"inherit";return d.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:B.href,onClick:B.onClick,rel:"noopener noreferrer",target:"_blank"},d.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+B.logo+"') "+B.color,backgroundSize:"100%"}}),d.createElement("div",{style:{fontSize:oe},className:"walletconnect-connect__button__text"},Me))}function M(B){var ie=E.isAndroid(),xe=d.useState(""),Me=xe[0],Oe=xe[1],we=d.useState(""),oe=we[0],pe=we[1],ne=d.useState(1),de=ne[0],ve=ne[1],Re=oe?B.links.filter(function(It){return It.name.toLowerCase().includes(oe.toLowerCase())}):B.links,Se=B.errorMessage,Fe=oe||Re.length>5,$e=Math.ceil(Re.length/12),ke=[12*(de-1)+1,12*de],at=Re.length?Re.filter(function(It,Bt){return Bt+1>=ke[0]&&Bt+1<=ke[1]}):[],Ve=!(ie||!($e>1)),gt=void 0;return d.createElement("div",null,d.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},ie?B.text.connect_mobile_wallet:B.text.choose_preferred_wallet),!ie&&d.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:Me,onChange:function(It){Oe(It.target.value),clearTimeout(gt),It.target.value?gt=setTimeout(function(){pe(It.target.value),ve(1)},1e3):(Oe(""),pe(""),ve(1))}}),d.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(ie?"__android":Fe&&Re.length?"__wrap":"")},ie?d.createElement(L,{name:B.text.connect,color:"rgb(64, 153, 255)",href:B.uri,onClick:d.useCallback(function(){E.saveMobileLinkInfo({name:"Unknown",href:B.uri})},[])}):at.length?at.map(function(It){var Bt=It.color,D=It.name,$=It.shortName,q=It.logo,Ee=E.formatIOSMobile(B.uri,It),Le=d.useCallback(function(){E.saveMobileLinkInfo({name:D,href:Ee})},[at]);return Fe?d.createElement(N,{color:Bt,href:Ee,name:$||D,logo:q,onClick:Le}):d.createElement(P,{color:Bt,href:Ee,name:D,logo:q,onClick:Le})}):d.createElement(d.Fragment,null,d.createElement("p",null,Se.length?B.errorMessage:B.links.length&&!Re.length?B.text.no_wallets_found:B.text.loading))),Ve&&d.createElement("div",{className:"walletconnect-modal__footer"},Array($e).fill(0).map(function(It,Bt){var D=Bt+1;return d.createElement("a",{style:{margin:"auto 10px",fontWeight:de===D?"bold":"normal"},onClick:function(){return ve(D)}},D)})))}function V(B){var ie=!!B.message.trim();return d.createElement("div",{className:"walletconnect-qrcode__notification"+(ie?" notification__show":"")},B.message)}function Z(B){var ie=d.useState(""),xe=ie[0],Me=ie[1],Oe=d.useState(""),we=Oe[0],oe=Oe[1];return d.useEffect(function(){try{return Promise.resolve(function(pe){try{var ne="";return Promise.resolve(R.toString(pe,{margin:0,type:"svg"})).then(function(de){return"string"==typeof de&&(ne=de.replace("<svg",'<svg class="walletconnect-qrcode__image"')),ne})}catch(de){return Promise.reject(de)}}(B.uri)).then(function(pe){oe(pe)})}catch(pe){Promise.reject(pe)}},[]),d.createElement("div",null,d.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},B.text.scan_qrcode_with_wallet),d.createElement("div",{dangerouslySetInnerHTML:{__html:we}}),d.createElement("div",{className:"walletconnect-modal__footer"},d.createElement("a",{onClick:function(){p(B.uri)?(Me(B.text.copied_to_clipboard),setInterval(function(){return Me("")},1200)):(Me("Error"),setInterval(function(){return Me("")},1200))}},B.text.copy_to_clipboard)),d.createElement(V,{message:xe}))}function x(B){var ie=E.isAndroid(),xe=E.isMobile(),Me=xe?B.qrcodeModalOptions&&B.qrcodeModalOptions.mobileLinks?B.qrcodeModalOptions.mobileLinks:void 0:B.qrcodeModalOptions&&B.qrcodeModalOptions.desktopLinks?B.qrcodeModalOptions.desktopLinks:void 0,Oe=d.useState(!1),we=Oe[0],oe=Oe[1],pe=d.useState(!1),ne=pe[0],de=pe[1],ve=d.useState(!xe),Re=ve[0],Se=ve[1],Fe={mobile:xe,text:B.text,uri:B.uri,qrcodeModalOptions:B.qrcodeModalOptions},$e=d.useState(""),ke=$e[0],at=$e[1],Ve=d.useState(!1),gt=Ve[0],It=Ve[1],Bt=d.useState([]),D=Bt[0],$=Bt[1],q=d.useState(""),Ee=q[0],Le=q[1],je=function(){ne||we||Me&&!Me.length||D.length>0||d.useEffect(function(){!function(){try{if(ie)return Promise.resolve();oe(!0);var _t=function(Tt,tn){try{var Mt=function(){var Tt=B.qrcodeModalOptions&&B.qrcodeModalOptions.registryUrl?B.qrcodeModalOptions.registryUrl:E.getWalletRegistryUrl();return Promise.resolve(fetch(Tt)).then(function(tn){return Promise.resolve(tn.json()).then(function(Mt){var At=E.getMobileLinkRegistry(E.formatMobileRegistry(Mt.listings,xe?"mobile":"desktop"),Me);oe(!1),de(!0),Le(At.length?"":B.text.no_supported_wallets),$(At);var Xt=1===At.length;Xt&&(at(E.formatIOSMobile(B.uri,At[0])),Se(!0)),It(Xt)})})}()}catch(Cn){return tn(Cn)}return Mt&&Mt.then?Mt.then(void 0,tn):Mt}(0,function(Tt){oe(!1),de(!0),Le(B.text.something_went_wrong),console.error(Tt)});Promise.resolve(_t&&_t.then?_t.then(function(){}):void 0)}catch(Tt){return Promise.reject(Tt)}}()})};je();var ft=xe?Re:!Re;return d.createElement("div",{id:"walletconnect-qrcode-modal",className:"walletconnect-qrcode__base animated fadeIn"},d.createElement("div",{className:"walletconnect-modal__base"},d.createElement(O,{onClose:B.onClose}),gt&&Re?d.createElement("div",{className:"walletconnect-modal__single_wallet"},d.createElement("a",{onClick:function(){return E.saveMobileLinkInfo({name:D[0].name,href:ke})},href:ke,rel:"noopener noreferrer",target:"_blank"},B.text.connect_with+" "+(gt?D[0].name:"")+" \u203a")):ie||we||!we&&D.length?d.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(ft?" right__selected":"")},d.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),xe?d.createElement(d.Fragment,null,d.createElement("a",{onClick:function(){return Se(!1),je()}},B.text.mobile),d.createElement("a",{onClick:function(){return Se(!0)}},B.text.qrcode)):d.createElement(d.Fragment,null,d.createElement("a",{onClick:function(){return Se(!0)}},B.text.qrcode),d.createElement("a",{onClick:function(){return Se(!1),je()}},B.text.desktop))):null,d.createElement("div",null,Re||!ie&&!we&&!D.length?d.createElement(Z,Object.assign({},Fe)):d.createElement(M,Object.assign({},Fe,{links:D,errorMessage:Ee})))))}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var W={de:{choose_preferred_wallet:"W\xe4hle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterst\xfctzten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera m\xf3vil",scan_qrcode_with_wallet:"Escanea el c\xf3digo QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo sali\xf3 mal",no_supported_wallets:"Todav\xeda no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille pr\xe9f\xe9r\xe9",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copi\xe9!",connect_with:"Connectez-vous \xe0 l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourn\xe9",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouv\xe9"},ko:{choose_preferred_wallet:"\uc6d0\ud558\ub294 \uc9c0\uac11\uc744 \uc120\ud0dd\ud558\uc138\uc694",connect_mobile_wallet:"\ubaa8\ubc14\uc77c \uc9c0\uac11\uacfc \uc5f0\uacb0",scan_qrcode_with_wallet:"WalletConnect \uc9c0\uc6d0 \uc9c0\uac11\uc5d0\uc11c QR\ucf54\ub4dc\ub97c \uc2a4\uce94\ud558\uc138\uc694",connect:"\uc5f0\uacb0",qrcode:"QR \ucf54\ub4dc",mobile:"\ubaa8\ubc14\uc77c",desktop:"\ub370\uc2a4\ud06c\ud0d1",copy_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac",copied_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",connect_with:"\uc640 \uc5f0\uacb0\ud558\ub2e4",loading:"\ub85c\ub4dc \uc911...",something_went_wrong:"\ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.",no_supported_wallets:"\uc544\uc9c1 \uc9c0\uc6d0\ub418\ub294 \uc9c0\uac11\uc774 \uc5c6\uc2b5\ub2c8\ub2e4",no_wallets_found:"\uc9c0\uac11\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se \xe0 carteira m\xf3vel",scan_qrcode_with_wallet:"Ler o c\xf3digo QR com uma carteira compat\xedvel com WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda n\xe3o h\xe1 carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"\u9009\u62e9\u4f60\u7684\u94b1\u5305",connect_mobile_wallet:"\u8fde\u63a5\u81f3\u79fb\u52a8\u7aef\u94b1\u5305",scan_qrcode_with_wallet:"\u4f7f\u7528\u517c\u5bb9 WalletConnect \u7684\u94b1\u5305\u626b\u63cf\u4e8c\u7ef4\u7801",connect:"\u8fde\u63a5",qrcode:"\u4e8c\u7ef4\u7801",mobile:"\u79fb\u52a8",desktop:"\u684c\u9762",copy_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f",copied_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f\u6210\u529f\uff01",connect_with:"\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fde\u63a5",loading:"\u6b63\u5728\u52a0\u8f7d...",something_went_wrong:"\u51fa\u4e86\u95ee\u9898",no_supported_wallets:"\u76ee\u524d\u8fd8\u6ca1\u6709\u652f\u6301\u7684\u94b1\u5305",no_wallets_found:"\u6ca1\u6709\u627e\u5230\u94b1\u5305"},fa:{choose_preferred_wallet:"\u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",connect_mobile_wallet:"\u0628\u0647 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0648\u0635\u0644 \u0634\u0648\u06cc\u062f",scan_qrcode_with_wallet:"\u06a9\u062f QR \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627 WalletConnect \u0627\u0633\u06a9\u0646 \u06a9\u0646\u06cc\u062f",connect:"\u0627\u062a\u0635\u0627\u0644",qrcode:"\u06a9\u062f QR",mobile:"\u0633\u06cc\u0627\u0631",desktop:"\u062f\u0633\u06a9\u062a\u0627\u067e",copy_to_clipboard:"\u06a9\u067e\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f",copied_to_clipboard:"\u062f\u0631 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f \u06a9\u067e\u06cc \u0634\u062f!",connect_with:"\u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627",loading:"...\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc",something_went_wrong:"\u0645\u0634\u06a9\u0644\u06cc \u067e\u06cc\u0634 \u0622\u0645\u062f",no_supported_wallets:"\u0647\u0646\u0648\u0632 \u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f",no_wallets_found:"\u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644\u06cc \u067e\u06cc\u062f\u0627 \u0646\u0634\u062f"}};function H(){var B=E.getDocumentOrThrow(),ie=B.getElementById("walletconnect-qrcode-modal");ie&&(ie.className=ie.className.replace("fadeIn","fadeOut"),setTimeout(function(){var xe=B.getElementById("walletconnect-wrapper");xe&&B.body.removeChild(xe)},300))}function J(B){return function(){H(),B&&B()}}var le=function(){return void 0!==v&&void 0!==v.versions&&void 0!==v.versions.node};h.exports={open:function(B,ie,xe){console.log(B),le()?R.toString(B,{type:"terminal"}).then(console.log):function(B,ie,xe){!function(){var we=E.getDocumentOrThrow(),oe=we.getElementById("walletconnect-style-sheet");oe&&we.head.removeChild(oe);var pe=we.createElement("style");pe.setAttribute("id","walletconnect-style-sheet"),pe.innerText=':root {\n --animation-duration: 300ms;\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#walletconnect-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\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n',we.head.appendChild(pe)}();var Me,we,oe,Oe=((oe=(we=E.getDocumentOrThrow()).createElement("div")).setAttribute("id","walletconnect-wrapper"),we.body.appendChild(oe),oe);d.render(d.createElement(x,{text:(Me=E.getNavigatorOrThrow().language.split("-")[0]||"en",W[Me]||W.en),uri:B,onClose:J(ie),qrcodeModalOptions:xe}),Oe)}(B,ie,xe)},close:function(){le()||H()}}}).call(this,f(19))},function(h,c,f){const v=f(77),y=f(78),E=f(96),R=f(97);function p(d,O,L,P,N){const M=[].slice.call(arguments,1),V=M.length,Z="function"==typeof M[V-1];if(!Z&&!v())throw new Error("Callback required as last argument");if(!Z){if(V<1)throw new Error("Too few arguments provided");return 1===V?(L=O,O=P=void 0):2!==V||O.getContext||(P=L,L=O,O=void 0),new Promise(function(x,W){try{const H=y.create(L,P);x(d(H,O,P))}catch(H){W(H)}})}if(V<2)throw new Error("Too few arguments provided");2===V?(N=L,L=O,O=P=void 0):3===V&&(O.getContext&&void 0===N?(N=P,P=void 0):(N=P,P=L,L=O,O=void 0));try{const x=y.create(L,P);N(null,d(x,O,P))}catch(x){N(x)}}c.create=y.create,c.toCanvas=p.bind(null,E.render),c.toDataURL=p.bind(null,E.renderToDataURL),c.toString=p.bind(null,function(d,O,L){return R.render(d,L)})},function(h,c){h.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},function(h,c,f){const v=f(9),y=f(21),E=f(79),R=f(80),p=f(81),d=f(82),O=f(83),L=f(53),P=f(84),N=f(87),M=f(88),V=f(10),Z=f(89);function x(J,K,le){const z=J.size,B=M.getEncodedBits(K,le);let ie,xe;for(ie=0;ie<15;ie++)xe=1==(B>>ie&1),J.set(ie<6?ie:ie<8?ie+1:z-15+ie,8,xe,!0),J.set(8,ie<8?z-ie-1:ie<9?15-ie-1+1:15-ie-1,xe,!0);J.set(z-8,8,1,!0)}function H(J,K,le,z){let B;if(Array.isArray(J))B=Z.fromArray(J);else{if("string"!=typeof J)throw new Error("Invalid data");{let we=K;if(!we){const oe=Z.rawSplit(J);we=N.getBestVersionForData(oe,le)}B=Z.fromString(J,we||40)}}const ie=N.getBestVersionForData(B,le);if(!ie)throw new Error("The amount of data is too big to be stored in a QR Code");if(K){if(K<ie)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+ie+".\n")}else K=ie;const xe=function(J,K,le){const z=new E;le.forEach(function(xe){z.put(xe.mode.bit,4),z.put(xe.getLength(),V.getCharCountIndicator(xe.mode,J)),xe.write(z)});const B=8*(v.getSymbolTotalCodewords(J)-L.getTotalCodewordsCount(J,K));for(z.getLengthInBits()+4<=B&&z.put(0,4);z.getLengthInBits()%8!=0;)z.putBit(0);const ie=(B-z.getLengthInBits())/8;for(let xe=0;xe<ie;xe++)z.put(xe%2?17:236,8);return function(xe,Me,Oe){const we=v.getSymbolTotalCodewords(Me),oe=we-L.getTotalCodewordsCount(Me,Oe),pe=L.getBlocksCount(Me,Oe),ne=pe-we%pe,de=Math.floor(we/pe),ve=Math.floor(oe/pe),Re=ve+1,Se=de-ve,Fe=new P(Se);let $e=0;const ke=new Array(pe),at=new Array(pe);let Ve=0;const gt=new Uint8Array(xe.buffer);for(let q=0;q<pe;q++){const Ee=q<ne?ve:Re;ke[q]=gt.slice($e,$e+Ee),at[q]=Fe.encode(ke[q]),$e+=Ee,Ve=Math.max(Ve,Ee)}const It=new Uint8Array(we);let Bt,D,$=0;for(Bt=0;Bt<Ve;Bt++)for(D=0;D<pe;D++)Bt<ke[D].length&&(It[$++]=ke[D][Bt]);for(Bt=0;Bt<Se;Bt++)for(D=0;D<pe;D++)It[$++]=at[D][Bt];return It}(z,J,K)}(K,le,B),Me=v.getSymbolSize(K),Oe=new R(Me);return function(we,oe){const pe=we.size,ne=d.getPositions(oe);for(let de=0;de<ne.length;de++){const ve=ne[de][0],Re=ne[de][1];for(let Se=-1;Se<=7;Se++)if(!(ve+Se<=-1||pe<=ve+Se))for(let Fe=-1;Fe<=7;Fe++)Re+Fe<=-1||pe<=Re+Fe||we.set(ve+Se,Re+Fe,Se>=0&&Se<=6&&(0===Fe||6===Fe)||Fe>=0&&Fe<=6&&(0===Se||6===Se)||Se>=2&&Se<=4&&Fe>=2&&Fe<=4,!0)}}(Oe,K),function(we){const oe=we.size;for(let pe=8;pe<oe-8;pe++){const ne=pe%2==0;we.set(pe,6,ne,!0),we.set(6,pe,ne,!0)}}(Oe),function(we,oe){const pe=p.getPositions(oe);for(let ne=0;ne<pe.length;ne++){const de=pe[ne][0],ve=pe[ne][1];for(let Re=-2;Re<=2;Re++)for(let Se=-2;Se<=2;Se++)we.set(de+Re,ve+Se,-2===Re||2===Re||-2===Se||2===Se||0===Re&&0===Se,!0)}}(Oe,K),x(Oe,le,0),K>=7&&function(we,oe){const pe=we.size,ne=N.getEncodedBits(oe);let de,ve,Re;for(let Se=0;Se<18;Se++)de=Math.floor(Se/3),ve=Se%3+pe-8-3,Re=1==(ne>>Se&1),we.set(de,ve,Re,!0),we.set(ve,de,Re,!0)}(Oe,K),function(we,oe){const pe=we.size;let ne=-1,de=pe-1,ve=7,Re=0;for(let Se=pe-1;Se>0;Se-=2)for(6===Se&&Se--;;){for(let Fe=0;Fe<2;Fe++)if(!we.isReserved(de,Se-Fe)){let $e=!1;Re<oe.length&&($e=1==(oe[Re]>>>ve&1)),we.set(de,Se-Fe,$e),ve--,-1===ve&&(Re++,ve=7)}if(de+=ne,de<0||pe<=de){de-=ne,ne=-ne;break}}}(Oe,xe),isNaN(z)&&(z=O.getBestMask(Oe,x.bind(null,Oe,le))),O.applyMask(z,Oe),x(Oe,le,z),{modules:Oe,version:K,errorCorrectionLevel:le,maskPattern:z,segments:B}}c.create=function(J,K){if(void 0===J||""===J)throw new Error("No input text");let le,z,B=y.M;return void 0!==K&&(B=y.from(K.errorCorrectionLevel,y.M),le=N.from(K.version),z=O.from(K.maskPattern),K.toSJISFunc&&v.setToSJISFunction(K.toSJISFunc)),H(J,le,B,z)}},function(h,c){function f(){this.buffer=[],this.length=0}f.prototype={get:function(v){const y=Math.floor(v/8);return 1==(this.buffer[y]>>>7-v%8&1)},put:function(v,y){for(let E=0;E<y;E++)this.putBit(1==(v>>>y-E-1&1))},getLengthInBits:function(){return this.length},putBit:function(v){const y=Math.floor(this.length/8);this.buffer.length<=y&&this.buffer.push(0),v&&(this.buffer[y]|=128>>>this.length%8),this.length++}},h.exports=f},function(h,c){function f(v){if(!v||v<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=v,this.data=new Uint8Array(v*v),this.reservedBit=new Uint8Array(v*v)}f.prototype.set=function(v,y,E,R){const p=v*this.size+y;this.data[p]=E,R&&(this.reservedBit[p]=!0)},f.prototype.get=function(v,y){return this.data[v*this.size+y]},f.prototype.xor=function(v,y,E){this.data[v*this.size+y]^=E},f.prototype.isReserved=function(v,y){return this.reservedBit[v*this.size+y]},h.exports=f},function(h,c,f){const v=f(9).getSymbolSize;c.getRowColCoords=function(y){if(1===y)return[];const E=Math.floor(y/7)+2,R=v(y),p=145===R?26:2*Math.ceil((R-13)/(2*E-2)),d=[R-7];for(let O=1;O<E-1;O++)d[O]=d[O-1]-p;return d.push(6),d.reverse()},c.getPositions=function(y){const E=[],R=c.getRowColCoords(y),p=R.length;for(let d=0;d<p;d++)for(let O=0;O<p;O++)0===d&&0===O||0===d&&O===p-1||d===p-1&&0===O||E.push([R[d],R[O]]);return E}},function(h,c,f){const v=f(9).getSymbolSize;c.getPositions=function(y){const E=v(y);return[[0,0],[E-7,0],[0,E-7]]}},function(h,c){c.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function R(p,d,O){switch(p){case c.Patterns.PATTERN000:return(d+O)%2==0;case c.Patterns.PATTERN001:return d%2==0;case c.Patterns.PATTERN010:return O%3==0;case c.Patterns.PATTERN011:return(d+O)%3==0;case c.Patterns.PATTERN100:return(Math.floor(d/2)+Math.floor(O/3))%2==0;case c.Patterns.PATTERN101:return d*O%2+d*O%3==0;case c.Patterns.PATTERN110:return(d*O%2+d*O%3)%2==0;case c.Patterns.PATTERN111:return(d*O%3+(d+O)%2)%2==0;default:throw new Error("bad maskPattern:"+p)}}c.isValid=function(p){return null!=p&&""!==p&&!isNaN(p)&&p>=0&&p<=7},c.from=function(p){return c.isValid(p)?parseInt(p,10):void 0},c.getPenaltyN1=function(p){const d=p.size;let O=0,L=0,P=0,N=null,M=null;for(let V=0;V<d;V++){L=P=0,N=M=null;for(let Z=0;Z<d;Z++){let x=p.get(V,Z);x===N?L++:(L>=5&&(O+=L-5+3),N=x,L=1),x=p.get(Z,V),x===M?P++:(P>=5&&(O+=P-5+3),M=x,P=1)}L>=5&&(O+=L-5+3),P>=5&&(O+=P-5+3)}return O},c.getPenaltyN2=function(p){const d=p.size;let O=0;for(let L=0;L<d-1;L++)for(let P=0;P<d-1;P++){const N=p.get(L,P)+p.get(L,P+1)+p.get(L+1,P)+p.get(L+1,P+1);4!==N&&0!==N||O++}return 3*O},c.getPenaltyN3=function(p){const d=p.size;let O=0,L=0,P=0;for(let N=0;N<d;N++){L=P=0;for(let M=0;M<d;M++)L=L<<1&2047|p.get(N,M),M>=10&&(1488===L||93===L)&&O++,P=P<<1&2047|p.get(M,N),M>=10&&(1488===P||93===P)&&O++}return 40*O},c.getPenaltyN4=function(p){let d=0;const O=p.data.length;for(let L=0;L<O;L++)d+=p.data[L];return 10*Math.abs(Math.ceil(100*d/O/5)-10)},c.applyMask=function(p,d){const O=d.size;for(let L=0;L<O;L++)for(let P=0;P<O;P++)d.isReserved(P,L)||d.xor(P,L,R(p,P,L))},c.getBestMask=function(p,d){const O=Object.keys(c.Patterns).length;let L=0,P=1/0;for(let N=0;N<O;N++){d(N),c.applyMask(N,p);const M=c.getPenaltyN1(p)+c.getPenaltyN2(p)+c.getPenaltyN3(p)+c.getPenaltyN4(p);c.applyMask(N,p),M<P&&(P=M,L=N)}return L}},function(h,c,f){const v=f(85);function y(E){this.genPoly=void 0,this.degree=E,this.degree&&this.initialize(this.degree)}y.prototype.initialize=function(E){this.degree=E,this.genPoly=v.generateECPolynomial(this.degree)},y.prototype.encode=function(E){if(!this.genPoly)throw new Error("Encoder not initialized");const R=new Uint8Array(E.length+this.degree);R.set(E);const p=v.mod(R,this.genPoly),d=this.degree-p.length;if(d>0){const O=new Uint8Array(this.degree);return O.set(p,d),O}return p},h.exports=y},function(h,c,f){const v=f(86);c.mul=function(y,E){const R=new Uint8Array(y.length+E.length-1);for(let p=0;p<y.length;p++)for(let d=0;d<E.length;d++)R[p+d]^=v.mul(y[p],E[d]);return R},c.mod=function(y,E){let R=new Uint8Array(y);for(;R.length-E.length>=0;){const p=R[0];for(let O=0;O<E.length;O++)R[O]^=v.mul(E[O],p);let d=0;for(;d<R.length&&0===R[d];)d++;R=R.slice(d)}return R},c.generateECPolynomial=function(y){let E=new Uint8Array([1]);for(let R=0;R<y;R++)E=c.mul(E,new Uint8Array([1,v.exp(R)]));return E}},function(h,c){const f=new Uint8Array(512),v=new Uint8Array(256);(function(){let y=1;for(let E=0;E<255;E++)f[E]=y,v[y]=E,y<<=1,256&y&&(y^=285);for(let E=255;E<512;E++)f[E]=f[E-255]})(),c.log=function(y){if(y<1)throw new Error("log("+y+")");return v[y]},c.exp=function(y){return f[y]},c.mul=function(y,E){return 0===y||0===E?0:f[v[y]+v[E]]}},function(h,c,f){const v=f(9),y=f(53),E=f(21),R=f(10),p=f(54),d=v.getBCHDigit(7973);function O(P,N){return R.getCharCountIndicator(P,N)+4}function L(P,N){let M=0;return P.forEach(function(V){M+=O(V.mode,N)+V.getBitsLength()}),M}c.from=function(P,N){return p.isValid(P)?parseInt(P,10):N},c.getCapacity=function(P,N,M){if(!p.isValid(P))throw new Error("Invalid QR Code version");void 0===M&&(M=R.BYTE);const V=8*(v.getSymbolTotalCodewords(P)-y.getTotalCodewordsCount(P,N));if(M===R.MIXED)return V;const Z=V-O(M,P);switch(M){case R.NUMERIC:return Math.floor(Z/10*3);case R.ALPHANUMERIC:return Math.floor(Z/11*2);case R.KANJI:return Math.floor(Z/13);default:return Math.floor(Z/8)}},c.getBestVersionForData=function(P,N){let M;const V=E.from(N,E.M);if(Array.isArray(P)){if(P.length>1)return function(Z,x){for(let W=1;W<=40;W++)if(L(Z,W)<=c.getCapacity(W,x,R.MIXED))return W}(P,V);if(0===P.length)return 1;M=P[0]}else M=P;return function(Z,x,W){for(let H=1;H<=40;H++)if(x<=c.getCapacity(H,W,Z))return H}(M.mode,M.getLength(),V)},c.getEncodedBits=function(P){if(!p.isValid(P)||P<7)throw new Error("Invalid QR Code version");let N=P<<12;for(;v.getBCHDigit(N)-d>=0;)N^=7973<<v.getBCHDigit(N)-d;return P<<12|N}},function(h,c,f){const v=f(9),y=v.getBCHDigit(1335);c.getEncodedBits=function(E,R){const p=E.bit<<3|R;let d=p<<10;for(;v.getBCHDigit(d)-y>=0;)d^=1335<<v.getBCHDigit(d)-y;return 21522^(p<<10|d)}},function(h,c,f){const v=f(10),y=f(90),E=f(91),R=f(92),p=f(94),d=f(55),O=f(9),L=f(95);function P(x){return unescape(encodeURIComponent(x)).length}function N(x,W,H){const J=[];let K;for(;null!==(K=x.exec(H));)J.push({data:K[0],index:K.index,mode:W,length:K[0].length});return J}function M(x){const W=N(d.NUMERIC,v.NUMERIC,x),H=N(d.ALPHANUMERIC,v.ALPHANUMERIC,x);let J,K;return O.isKanjiModeEnabled()?(J=N(d.BYTE,v.BYTE,x),K=N(d.KANJI,v.KANJI,x)):(J=N(d.BYTE_KANJI,v.BYTE,x),K=[]),W.concat(H,J,K).sort(function(le,z){return le.index-z.index}).map(function(le){return{data:le.data,mode:le.mode,length:le.length}})}function V(x,W){switch(W){case v.NUMERIC:return y.getBitsLength(x);case v.ALPHANUMERIC:return E.getBitsLength(x);case v.KANJI:return p.getBitsLength(x);case v.BYTE:return R.getBitsLength(x)}}function Z(x,W){let H;const J=v.getBestModeForData(x);if(H=v.from(W,J),H!==v.BYTE&&H.bit<J.bit)throw new Error('"'+x+'" cannot be encoded with mode '+v.toString(H)+".\n Suggested mode is: "+v.toString(J));switch(H!==v.KANJI||O.isKanjiModeEnabled()||(H=v.BYTE),H){case v.NUMERIC:return new y(x);case v.ALPHANUMERIC:return new E(x);case v.KANJI:return new p(x);case v.BYTE:return new R(x)}}c.fromArray=function(x){return x.reduce(function(W,H){return"string"==typeof H?W.push(Z(H,null)):H.data&&W.push(Z(H.data,H.mode)),W},[])},c.fromString=function(x,W){const H=function(le,z){const B={},ie={start:{}};let xe=["start"];for(let Me=0;Me<le.length;Me++){const Oe=le[Me],we=[];for(let oe=0;oe<Oe.length;oe++){const pe=Oe[oe],ne=""+Me+oe;we.push(ne),B[ne]={node:pe,lastCount:0},ie[ne]={};for(let de=0;de<xe.length;de++){const ve=xe[de];B[ve]&&B[ve].node.mode===pe.mode?(ie[ve][ne]=V(B[ve].lastCount+pe.length,pe.mode)-V(B[ve].lastCount,pe.mode),B[ve].lastCount+=pe.length):(B[ve]&&(B[ve].lastCount=pe.length),ie[ve][ne]=V(pe.length,pe.mode)+4+v.getCharCountIndicator(pe.mode,z))}}xe=we}for(let Me=0;Me<xe.length;Me++)ie[xe[Me]].end=0;return{map:ie,table:B}}(function(le){const z=[];for(let B=0;B<le.length;B++){const ie=le[B];switch(ie.mode){case v.NUMERIC:z.push([ie,{data:ie.data,mode:v.ALPHANUMERIC,length:ie.length},{data:ie.data,mode:v.BYTE,length:ie.length}]);break;case v.ALPHANUMERIC:z.push([ie,{data:ie.data,mode:v.BYTE,length:ie.length}]);break;case v.KANJI:z.push([ie,{data:ie.data,mode:v.BYTE,length:P(ie.data)}]);break;case v.BYTE:z.push([{data:ie.data,mode:v.BYTE,length:P(ie.data)}])}}return z}(M(x,O.isKanjiModeEnabled())),W),J=L.find_path(H.map,"start","end"),K=[];for(let le=1;le<J.length-1;le++)K.push(H.table[J[le]].node);return c.fromArray(K.reduce(function(z,B){const ie=z.length-1>=0?z[z.length-1]:null;return ie&&ie.mode===B.mode?(z[z.length-1].data+=B.data,z):(z.push(B),z)},[]))},c.rawSplit=function(x){return c.fromArray(M(x,O.isKanjiModeEnabled()))}},function(h,c,f){const v=f(10);function y(E){this.mode=v.NUMERIC,this.data=E.toString()}y.getBitsLength=function(E){return 10*Math.floor(E/3)+(E%3?E%3*3+1:0)},y.prototype.getLength=function(){return this.data.length},y.prototype.getBitsLength=function(){return y.getBitsLength(this.data.length)},y.prototype.write=function(E){let R,p,d;for(R=0;R+3<=this.data.length;R+=3)p=this.data.substr(R,3),d=parseInt(p,10),E.put(d,10);const O=this.data.length-R;O>0&&(p=this.data.substr(R),d=parseInt(p,10),E.put(d,3*O+1))},h.exports=y},function(h,c,f){const v=f(10),y=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function E(R){this.mode=v.ALPHANUMERIC,this.data=R}E.getBitsLength=function(R){return 11*Math.floor(R/2)+R%2*6},E.prototype.getLength=function(){return this.data.length},E.prototype.getBitsLength=function(){return E.getBitsLength(this.data.length)},E.prototype.write=function(R){let p;for(p=0;p+2<=this.data.length;p+=2){let d=45*y.indexOf(this.data[p]);d+=y.indexOf(this.data[p+1]),R.put(d,11)}this.data.length%2&&R.put(y.indexOf(this.data[p]),6)},h.exports=E},function(h,c,f){const v=f(93),y=f(10);function E(R){this.mode=y.BYTE,"string"==typeof R&&(R=v(R)),this.data=new Uint8Array(R)}E.getBitsLength=function(R){return 8*R},E.prototype.getLength=function(){return this.data.length},E.prototype.getBitsLength=function(){return E.getBitsLength(this.data.length)},E.prototype.write=function(R){for(let p=0,d=this.data.length;p<d;p++)R.put(this.data[p],8)},h.exports=E},function(h,c,f){h.exports=function(v){for(var y=[],E=v.length,R=0;R<E;R++){var p=v.charCodeAt(R);if(p>=55296&&p<=56319&&E>R+1){var d=v.charCodeAt(R+1);d>=56320&&d<=57343&&(p=1024*(p-55296)+d-56320+65536,R+=1)}p<128?y.push(p):p<2048?(y.push(p>>6|192),y.push(63&p|128)):p<55296||p>=57344&&p<65536?(y.push(p>>12|224),y.push(p>>6&63|128),y.push(63&p|128)):p>=65536&&p<=1114111?(y.push(p>>18|240),y.push(p>>12&63|128),y.push(p>>6&63|128),y.push(63&p|128)):y.push(239,191,189)}return new Uint8Array(y).buffer}},function(h,c,f){const v=f(10),y=f(9);function E(R){this.mode=v.KANJI,this.data=R}E.getBitsLength=function(R){return 13*R},E.prototype.getLength=function(){return this.data.length},E.prototype.getBitsLength=function(){return E.getBitsLength(this.data.length)},E.prototype.write=function(R){let p;for(p=0;p<this.data.length;p++){let d=y.toSJIS(this.data[p]);if(d>=33088&&d<=40956)d-=33088;else{if(!(d>=57408&&d<=60351))throw new Error("Invalid SJIS character: "+this.data[p]+"\nMake sure your charset is UTF-8");d-=49472}d=192*(d>>>8&255)+(255&d),R.put(d,13)}},h.exports=E},function(h,c,f){var v={single_source_shortest_paths:function(y,E,R){var p={},d={};d[E]=0;var O,L,P,N,M,V,x=v.PriorityQueue.make();for(x.push(E,0);!x.empty();)for(P in L=(O=x.pop()).value,N=O.cost,M=y[L]||{})M.hasOwnProperty(P)&&(V=N+M[P],(void 0===d[P]||d[P]>V)&&(d[P]=V,x.push(P,V),p[P]=L));if(void 0!==R&&void 0===d[R]){var W=["Could not find a path from ",E," to ",R,"."].join("");throw new Error(W)}return p},extract_shortest_path_from_predecessor_list:function(y,E){for(var R=[],p=E;p;)R.push(p),p=y[p];return R.reverse(),R},find_path:function(y,E,R){var p=v.single_source_shortest_paths(y,E,R);return v.extract_shortest_path_from_predecessor_list(p,R)},PriorityQueue:{make:function(y){var E,R=v.PriorityQueue,p={};for(E in y=y||{},R)R.hasOwnProperty(E)&&(p[E]=R[E]);return p.queue=[],p.sorter=y.sorter||R.default_sorter,p},default_sorter:function(y,E){return y.cost-E.cost},push:function(y,E){this.queue.push({value:y,cost:E}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};h.exports=v},function(h,c,f){const v=f(56);c.render=function(y,E,R){let p=R,d=E;void 0!==p||E&&E.getContext||(p=E,E=void 0),E||(d=function(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),p=v.getOptions(p);const O=v.getImageWidth(y.modules.size,p),L=d.getContext("2d"),P=L.createImageData(O,O);return v.qrToImageData(P.data,y,p),V=O,L.clearRect(0,0,(M=d).width,M.height),M.style||(M.style={}),M.height=V,M.width=V,M.style.height=V+"px",M.style.width=V+"px",L.putImageData(P,0,0),d;var M,V},c.renderToDataURL=function(y,E,R){let p=R;return void 0!==p||E&&E.getContext||(p=E,E=void 0),p||(p={}),c.render(y,E,p).toDataURL(p.type||"image/png",(p.rendererOpts||{}).quality)}},function(h,c,f){const v=f(56);function y(R,p){const d=R.a/255,O=p+'="'+R.hex+'"';return d<1?O+" "+p+'-opacity="'+d.toFixed(2).slice(1)+'"':O}function E(R,p,d){let O=R+p;return void 0!==d&&(O+=" "+d),O}c.render=function(R,p,d){const O=v.getOptions(p),L=R.modules.size,P=R.modules.data,N=L+2*O.margin,M=O.color.light.a?"<path "+y(O.color.light,"fill")+' d="M0 0h'+N+"v"+N+'H0z"/>':"",V="<path "+y(O.color.dark,"stroke")+' d="'+function(W,H,J){let K="",le=0,z=!1,B=0;for(let ie=0;ie<W.length;ie++){const xe=Math.floor(ie%H),Me=Math.floor(ie/H);xe||z||(z=!0),W[ie]?(B++,ie>0&&xe>0&&W[ie-1]||(K+=z?E("M",xe+J,.5+Me+J):E("m",le,0),le=0,z=!1),xe+1<H&&W[ie+1]||(K+=E("h",B),B=0)):le++}return K}(P,L,O.margin)+'"/>',x='<svg xmlns="http://www.w3.org/2000/svg" '+(O.width?'width="'+O.width+'" height="'+O.width+'" ':"")+'viewBox="0 0 '+N+" "+N+'" shape-rendering="crispEdges">'+M+V+"</svg>\n";return"function"==typeof d&&d(null,x),x}},function(h,c,f){var v=f(99),y={"text/plain":"Text","text/html":"Url",default:"Text"};h.exports=function(E,R){var p,d,O,L,P,N,x,W,M=!1;R||(R={}),p=R.debug||!1;try{if(O=v(),L=document.createRange(),P=document.getSelection(),(N=document.createElement("span")).textContent=E,N.ariaHidden="true",N.style.all="unset",N.style.position="fixed",N.style.top=0,N.style.clip="rect(0, 0, 0, 0)",N.style.whiteSpace="pre",N.style.webkitUserSelect="text",N.style.MozUserSelect="text",N.style.msUserSelect="text",N.style.userSelect="text",N.addEventListener("copy",function(V){V.stopPropagation(),R.format&&(V.preventDefault(),void 0===V.clipboardData?(p&&console.warn("unable to use e.clipboardData"),p&&console.warn("trying IE specific stuff"),window.clipboardData.clearData(),window.clipboardData.setData(y[R.format]||y.default,E)):(V.clipboardData.clearData(),V.clipboardData.setData(R.format,E))),R.onCopy&&(V.preventDefault(),R.onCopy(V.clipboardData))}),document.body.appendChild(N),L.selectNodeContents(N),P.addRange(L),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");M=!0}catch(V){p&&console.error("unable to copy using execCommand: ",V),p&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(R.format||"text",E),R.onCopy&&R.onCopy(window.clipboardData),M=!0}catch(Z){p&&console.error("unable to copy using clipboardData: ",Z),p&&console.error("falling back to prompt"),x="message"in R?R.message:"Copy to clipboard: #{key}, Enter",W=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C",d=x.replace(/#{\s*key\s*}/g,W),window.prompt(d,E)}}finally{P&&("function"==typeof P.removeRange?P.removeRange(L):P.removeAllRanges()),N&&document.body.removeChild(N),O()}return M}},function(h,c){h.exports=function(){var f=document.getSelection();if(!f.rangeCount)return function(){};for(var v=document.activeElement,y=[],E=0;E<f.rangeCount;E++)y.push(f.getRangeAt(E));switch(v.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":v.blur();break;default:v=null}return f.removeAllRanges(),function(){"Caret"===f.type&&f.removeAllRanges(),f.rangeCount||y.forEach(function(R){f.addRange(R)}),v&&v.focus()}}},function(h,c,f){f.r(c);var v={};f.r(v),f.d(v,"generateKey",function(){return V}),f.d(v,"verifyHmac",function(){return x}),f.d(v,"encrypt",function(){return H}),f.d(v,"decrypt",function(){return K});var y=f(2),E=f(1),R=f(61);const O="abcdefghijklmnopqrstuvwxyz0123456789".split("").map(z=>`https://${z}.bridge.walletconnect.org`);var N=f(14),M=f(0);function V(z){return Z.apply(this,arguments)}function Z(){return(Z=ue(function*(z){const ie=N.randomBytes((z||256)/8);return Object(E.convertBufferToArrayBuffer)(M.b(ie))})).apply(this,arguments)}function x(z,B){return W.apply(this,arguments)}function W(){return(W=ue(function*(z,B){const ie=M.n(z.data),xe=M.n(z.iv),Me=M.n(z.hmac),Oe=M.c(Me,!1),we=M.j(ie,xe),oe=yield N.hmacSha256Sign(B,we),pe=M.c(oe,!1);return M.A(Oe)===M.A(pe)})).apply(this,arguments)}function H(z,B,ie){return J.apply(this,arguments)}function J(){return(J=ue(function*(z,B,ie){const xe=M.f(Object(E.convertArrayBufferToBuffer)(B)),Me=ie||(yield V(128)),Oe=M.f(Object(E.convertArrayBufferToBuffer)(Me)),we=M.c(Oe,!1),oe=JSON.stringify(z),pe=M.C(oe),ne=yield N.aesCbcEncrypt(Oe,xe,pe),de=M.c(ne,!1),ve=M.j(ne,Oe),Re=yield N.hmacSha256Sign(xe,ve);return{data:de,hmac:M.c(Re,!1),iv:we}})).apply(this,arguments)}function K(z,B){return le.apply(this,arguments)}function le(){return(le=ue(function*(z,B){const ie=M.f(Object(E.convertArrayBufferToBuffer)(B));if(!ie)throw new Error("Missing key: required for decryption");if(!(yield x(z,ie)))return null;const xe=M.n(z.data),Me=M.n(z.iv),Oe=yield N.aesCbcDecrypt(Me,ie,xe),we=M.e(Oe);let oe;try{oe=JSON.parse(we)}catch{return null}return oe})).apply(this,arguments)}c.default=class extends class{constructor(z){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new class{constructor(){this._eventEmitters=[]}subscribe(z){this._eventEmitters.push(z)}unsubscribe(z){this._eventEmitters=this._eventEmitters.filter(B=>B.event!==z)}trigger(z){let B,ie=[];B=Object(E.isJsonRpcRequest)(z)?z.method:Object(E.isJsonRpcResponseSuccess)(z)||Object(E.isJsonRpcResponseError)(z)?"response:"+z.id:Object(E.isInternalEvent)(z)?z.event:"",B&&(ie=this._eventEmitters.filter(xe=>xe.event===B)),ie&&ie.length||Object(E.isReservedEvent)(B)||Object(E.isInternalEvent)(B)||(ie=this._eventEmitters.filter(xe=>"call_request"===xe.event)),ie.forEach(xe=>{if(Object(E.isJsonRpcResponseError)(z)){const Me=new Error(z.error.message);xe.callback(Me,null)}else xe.callback(null,z)})}},this._clientMeta=Object(E.getClientMeta)()||z.connectorOpts.clientMeta||null,this._cryptoLib=z.cryptoLib,this._sessionStorage=z.sessionStorage||new class{constructor(z="walletconnect"){this.storageId=z}getSession(){let z=null;const B=Object(E.getLocal)(this.storageId);return B&&Object(E.isWalletConnectSession)(B)&&(z=B),z}setSession(z){return Object(E.setLocal)(this.storageId,z),z}removeSession(){Object(E.removeLocal)(this.storageId)}}(z.connectorOpts.storageId),this._qrcodeModal=z.connectorOpts.qrcodeModal,this._qrcodeModalOptions=z.connectorOpts.qrcodeModalOptions,this._signingMethods=[...y.SIGNING_METHODS,...z.connectorOpts.signingMethods||[]],!z.connectorOpts.bridge&&!z.connectorOpts.uri&&!z.connectorOpts.session)throw new Error(y.ERROR_MISSING_REQUIRED);var B;z.connectorOpts.bridge&&(this.bridge="walletconnect.org"===function(Oe){let we=Oe.indexOf("//")>-1?Oe.split("/")[2]:Oe.split("/")[0];return we=we.split(":")[0],we=we.split("?")[0],we}(B=z.connectorOpts.bridge).split(".").slice(-2).join(".")?O[Math.floor(Math.random()*O.length)]:B),z.connectorOpts.uri&&(this.uri=z.connectorOpts.uri);const ie=z.connectorOpts.session||this._getStorageSession();ie&&(this.session=ie),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=z.transport||new R.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),z.connectorOpts.uri&&this._subscribeToSessionRequest(),z.pushServerOpts&&this._registerPushServer(z.pushServerOpts)}set bridge(z){z&&(this._bridge=z)}get bridge(){return this._bridge}set key(z){if(!z)return;const B=Object(E.convertHexToArrayBuffer)(z);this._key=B}get key(){return this._key?Object(E.convertArrayBufferToHex)(this._key,!0):""}set clientId(z){z&&(this._clientId=z)}get clientId(){let z=this._clientId;return z||(z=this._clientId=Object(E.uuid)()),this._clientId}set peerId(z){z&&(this._peerId=z)}get peerId(){return this._peerId}set clientMeta(z){}get clientMeta(){let z=this._clientMeta;return z||(z=this._clientMeta=Object(E.getClientMeta)()),z}set peerMeta(z){this._peerMeta=z}get peerMeta(){return this._peerMeta}set handshakeTopic(z){z&&(this._handshakeTopic=z)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(z){z&&(this._handshakeId=z)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(z){if(!z)return;const{handshakeTopic:B,bridge:ie,key:xe}=this._parseUri(z);this.handshakeTopic=B,this.bridge=ie,this.key=xe}set chainId(z){this._chainId=z}get chainId(){return this._chainId}set networkId(z){this._networkId=z}get networkId(){return this._networkId}set accounts(z){this._accounts=z}get accounts(){return this._accounts}set rpcUrl(z){this._rpcUrl=z}get rpcUrl(){return this._rpcUrl}set connected(z){}get connected(){return this._connected}set pending(z){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(z){z&&(this._connected=z.connected,this.accounts=z.accounts,this.chainId=z.chainId,this.bridge=z.bridge,this.key=z.key,this.clientId=z.clientId,this.clientMeta=z.clientMeta,this.peerId=z.peerId,this.peerMeta=z.peerMeta,this.handshakeId=z.handshakeId,this.handshakeTopic=z.handshakeTopic)}on(z,B){this._eventManager.subscribe({event:z,callback:B})}off(z){this._eventManager.unsubscribe(z)}createInstantRequest(z){var B=this;return ue(function*(){B._key=yield B._generateKey();const ie=B._formatRequest({method:"wc_instantRequest",params:[{peerId:B.clientId,peerMeta:B.clientMeta,request:B._formatRequest(z)}]});B.handshakeId=ie.id,B.handshakeTopic=Object(E.uuid)(),B._eventManager.trigger({event:"display_uri",params:[B.uri]}),B.on("modal_closed",()=>{throw new Error(y.ERROR_QRCODE_MODAL_USER_CLOSED)});const xe=()=>{B.killSession()};try{const Me=yield B._sendCallRequest(ie);return Me&&xe(),Me}catch(Me){throw xe(),Me}})()}connect(z){var B=this;return ue(function*(){if(!B._qrcodeModal)throw new Error(y.ERROR_QRCODE_MODAL_NOT_PROVIDED);return B.connected?{chainId:B.chainId,accounts:B.accounts}:(yield B.createSession(z),new Promise(function(){var ie=ue(function*(xe,Me){B.on("modal_closed",()=>Me(new Error(y.ERROR_QRCODE_MODAL_USER_CLOSED))),B.on("connect",(Oe,we)=>{if(Oe)return Me(Oe);xe(we.params[0])})});return function(xe,Me){return ie.apply(this,arguments)}}()))})()}createSession(z){var B=this;return ue(function*(){if(B._connected)throw new Error(y.ERROR_SESSION_CONNECTED);if(B.pending)return;B._key=yield B._generateKey();const ie=B._formatRequest({method:"wc_sessionRequest",params:[{peerId:B.clientId,peerMeta:B.clientMeta,chainId:z&&z.chainId?z.chainId:null}]});B.handshakeId=ie.id,B.handshakeTopic=Object(E.uuid)(),B._sendSessionRequest(ie,"Session update rejected",{topic:B.handshakeTopic}),B._eventManager.trigger({event:"display_uri",params:[B.uri]})})()}approveSession(z){if(this._connected)throw new Error(y.ERROR_SESSION_CONNECTED);this.chainId=z.chainId,this.accounts=z.accounts,this.networkId=z.networkId||0,this.rpcUrl=z.rpcUrl||"",this._sendResponse({id:this.handshakeId,jsonrpc:"2.0",result:{approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta}}),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(z){if(this._connected)throw new Error(y.ERROR_SESSION_CONNECTED);const B=z&&z.message?z.message:y.ERROR_SESSION_REJECTED,ie=this._formatResponse({id:this.handshakeId,error:{message:B}});this._sendResponse(ie),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:B}]}),this._removeStorageSession()}updateSession(z){if(!this._connected)throw new Error(y.ERROR_SESSION_DISCONNECTED);this.chainId=z.chainId,this.accounts=z.accounts,this.networkId=z.networkId||0,this.rpcUrl=z.rpcUrl||"";const ie=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl}]});this._sendSessionRequest(ie,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}killSession(z){var B=this;return ue(function*(){const ie=z?z.message:"Session Disconnected",xe=B._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});yield B._sendRequest(xe),B._handleSessionDisconnect(ie)})()}sendTransaction(z){var B=this;return ue(function*(){if(!B._connected)throw new Error(y.ERROR_SESSION_DISCONNECTED);const xe=B._formatRequest({method:"eth_sendTransaction",params:[z]});return yield B._sendCallRequest(xe)})()}signTransaction(z){var B=this;return ue(function*(){if(!B._connected)throw new Error(y.ERROR_SESSION_DISCONNECTED);const xe=B._formatRequest({method:"eth_signTransaction",params:[z]});return yield B._sendCallRequest(xe)})()}signMessage(z){var B=this;return ue(function*(){if(!B._connected)throw new Error(y.ERROR_SESSION_DISCONNECTED);const ie=B._formatRequest({method:"eth_sign",params:z});return yield B._sendCallRequest(ie)})()}signPersonalMessage(z){var B=this;return ue(function*(){if(!B._connected)throw new Error(y.ERROR_SESSION_DISCONNECTED);const ie=B._formatRequest({method:"personal_sign",params:z});return yield B._sendCallRequest(ie)})()}signTypedData(z){var B=this;return ue(function*(){if(!B._connected)throw new Error(y.ERROR_SESSION_DISCONNECTED);const ie=B._formatRequest({method:"eth_signTypedData",params:z});return yield B._sendCallRequest(ie)})()}updateChain(z){var B=this;return ue(function*(){if(!B._connected)throw new Error("Session currently disconnected");const ie=B._formatRequest({method:"wallet_updateChain",params:[z]});return yield B._sendCallRequest(ie)})()}unsafeSend(z,B){return this._sendRequest(z,B),this._eventManager.trigger({event:"call_request_sent",params:[{request:z,options:B}]}),new Promise((ie,xe)=>{this._subscribeToResponse(z.id,(Me,Oe)=>{if(Me)xe(Me);else{if(!Oe)throw new Error(y.ERROR_MISSING_JSON_RPC);ie(Oe)}})})}sendCustomRequest(z,B){var ie=this;return ue(function*(){if(!ie._connected)throw new Error(y.ERROR_SESSION_DISCONNECTED);switch(z.method){case"eth_accounts":return ie.accounts;case"eth_chainId":return Object(E.convertNumberToHex)(ie.chainId)}const xe=ie._formatRequest(z);return yield ie._sendCallRequest(xe,B)})()}approveRequest(z){if(!Object(E.isJsonRpcResponseSuccess)(z))throw new Error(y.ERROR_MISSING_RESULT);{const B=this._formatResponse(z);this._sendResponse(B)}}rejectRequest(z){if(!Object(E.isJsonRpcResponseError)(z))throw new Error(y.ERROR_MISSING_ERROR);{const B=this._formatResponse(z);this._sendResponse(B)}}transportClose(){this._transport.close()}_sendRequest(z,B){var ie=this;return ue(function*(){const xe=ie._formatRequest(z),Me=yield ie._encrypt(xe),Oe=void 0!==(null==B?void 0:B.topic)?B.topic:ie.peerId,we=JSON.stringify(Me),oe=void 0!==(null==B?void 0:B.forcePushNotification)?!B.forcePushNotification:Object(E.isSilentPayload)(xe);ie._transport.send(we,Oe,oe)})()}_sendResponse(z){var B=this;return ue(function*(){const ie=yield B._encrypt(z),xe=B.peerId,Me=JSON.stringify(ie);B._transport.send(Me,xe,!0)})()}_sendSessionRequest(z,B,ie){var xe=this;return ue(function*(){xe._sendRequest(z,ie),xe._subscribeToSessionResponse(z.id,B)})()}_sendCallRequest(z,B){return this._sendRequest(z,B),this._eventManager.trigger({event:"call_request_sent",params:[{request:z,options:B}]}),this._subscribeToCallResponse(z.id)}_formatRequest(z){if(void 0===z.method)throw new Error(y.ERROR_MISSING_METHOD);return{id:void 0===z.id?Object(E.payloadId)():z.id,jsonrpc:"2.0",method:z.method,params:void 0===z.params?[]:z.params}}_formatResponse(z){if(void 0===z.id)throw new Error(y.ERROR_MISSING_ID);const B={id:z.id,jsonrpc:"2.0"};if(Object(E.isJsonRpcResponseError)(z)){const ie=Object(E.formatRpcError)(z.error);return Object.assign(Object.assign(Object.assign({},B),z),{error:ie})}if(Object(E.isJsonRpcResponseSuccess)(z))return Object.assign(Object.assign({},B),z);throw new Error(y.ERROR_INVALID_RESPONSE)}_handleSessionDisconnect(z){const B=z||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(E.removeLocal)(y.MOBILE_LINK_CHOICE_KEY)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:B}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(z,B){B&&B.approved?(this._connected?(B.chainId&&(this.chainId=B.chainId),B.accounts&&(this.accounts=B.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,B.chainId&&(this.chainId=B.chainId),B.accounts&&(this.accounts=B.accounts),B.peerId&&!this.peerId&&(this.peerId=B.peerId),B.peerMeta&&!this.peerMeta&&(this.peerMeta=B.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(z)}_handleIncomingMessages(z){var B=this;return ue(function*(){if(![B.clientId,B.handshakeTopic].includes(z.topic))return;let ie;try{ie=JSON.parse(z.payload)}catch{return}const xe=yield B._decrypt(ie);xe&&B._eventManager.trigger(xe)})()}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(z,B){this.on("response:"+z,B)}_subscribeToSessionResponse(z,B){this._subscribeToResponse(z,(ie,xe)=>{ie?this._handleSessionResponse(ie.message):Object(E.isJsonRpcResponseSuccess)(xe)?this._handleSessionResponse(B,xe.result):this._handleSessionResponse(xe.error&&xe.error.message?xe.error.message:B)})}_subscribeToCallResponse(z){return new Promise((B,ie)=>{this._subscribeToResponse(z,(xe,Me)=>{xe?ie(xe):Object(E.isJsonRpcResponseSuccess)(Me)?B(Me.result):ie(Me.error&&Me.error.message?Me.error:new Error(y.ERROR_INVALID_RESPONSE))})})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]})},this._qrcodeModalOptions)}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close()}),this.on("call_request_sent",(z,B)=>{const{request:ie}=B.params[0];if(Object(E.isMobile)()&&this._signingMethods.includes(ie.method)){const xe=Object(E.getLocal)(y.MOBILE_LINK_CHOICE_KEY);xe&&(window.location.href=xe.href)}}),this.on("wc_sessionRequest",(z,B)=>{z&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:z.toString()}]}),this.handshakeId=B.id,this.peerId=B.params[0].peerId,this.peerMeta=B.params[0].peerMeta;const ie=Object.assign(Object.assign({},B),{method:"session_request"});this._eventManager.trigger(ie)}),this.on("wc_sessionUpdate",(z,B)=>{z&&this._handleSessionResponse(z.message),this._handleSessionResponse("Session disconnected",B.params[0])})}_initTransport(){this._transport.on("message",z=>this._handleIncomingMessages(z)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open()}_formatUri(){return`${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(z){const B=Object(E.parseWalletConnectUri)(z);if(B.protocol===this.protocol){if(!B.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const ie=B.handshakeTopic;if(!B.bridge)throw Error("Invalid or missing bridge url parameter value");const xe=decodeURIComponent(B.bridge);if(!B.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:ie,bridge:xe,key:B.key}}throw new Error(y.ERROR_INVALID_URI)}_generateKey(){var z=this;return ue(function*(){return z._cryptoLib?yield z._cryptoLib.generateKey():null})()}_encrypt(z){var B=this;return ue(function*(){const ie=B._key;return B._cryptoLib&&ie?yield B._cryptoLib.encrypt(z,ie):null})()}_decrypt(z){var B=this;return ue(function*(){const ie=B._key;return B._cryptoLib&&ie?yield B._cryptoLib.decrypt(z,ie):null})()}_getStorageSession(){let z=null;return this._sessionStorage&&(z=this._sessionStorage.getSession()),z}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(z){if(!z.url||"string"!=typeof z.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!z.type||"string"!=typeof z.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!z.token||"string"!=typeof z.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const B={bridge:this.bridge,topic:this.clientId,type:z.type,token:z.token,peerName:"",language:z.language||""};this.on("connect",function(){var ie=ue(function*(xe,Me){if(xe)throw xe;z.peerMeta&&(B.peerName=Me.params[0].peerMeta.name);try{if(!(yield(yield fetch(z.url+"/new",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(B)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}});return function(xe,Me){return ie.apply(this,arguments)}}())}}{constructor(z,B){super({cryptoLib:v,connectorOpts:z,pushServerOpts:B})}}},function(h,c,f){f.r(c),f.d(c,"Component",function(){return ie}),f.d(c,"Fragment",function(){return J}),f.d(c,"createContext",function(){return D}),f.d(c,"createElement",function(){return x}),f.d(c,"createRef",function(){return H}),f.d(c,"useCallback",function(){return Ga}),f.d(c,"useContext",function(){return Bu}),f.d(c,"useDebugValue",function(){return pa}),f.d(c,"useEffect",function(){return dr}),f.d(c,"useErrorBoundary",function(){return cs}),f.d(c,"useId",function(){return $o}),f.d(c,"useImperativeHandle",function(){return Br}),f.d(c,"useLayoutEffect",function(){return Vn}),f.d(c,"useMemo",function(){return Er}),f.d(c,"useReducer",function(){return Kn}),f.d(c,"useRef",function(){return Qn}),f.d(c,"useState",function(){return Xt}),f.d(c,"Children",function(){return Fs}),f.d(c,"PureComponent",function(){return fo}),f.d(c,"StrictMode",function(){return Qo}),f.d(c,"Suspense",function(){return Ko}),f.d(c,"SuspenseList",function(){return Go}),f.d(c,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",function(){return tf}),f.d(c,"cloneElement",function(){return eu}),f.d(c,"createFactory",function(){return $u}),f.d(c,"createPortal",function(){return Xa}),f.d(c,"default",function(){return rf}),f.d(c,"findDOMNode",function(){return tu}),f.d(c,"flushSync",function(){return Wu}),f.d(c,"forwardRef",function(){return Fu}),f.d(c,"hydrate",function(){return ur}),f.d(c,"isValidElement",function(){return qs}),f.d(c,"lazy",function(){return No}),f.d(c,"memo",function(){return Wo}),f.d(c,"render",function(){return an}),f.d(c,"startTransition",function(){return nu}),f.d(c,"unmountComponentAtNode",function(){return Vu}),f.d(c,"unstable_batchedUpdates",function(){return nl}),f.d(c,"useDeferredValue",function(){return tr}),f.d(c,"useInsertionEffect",function(){return nf}),f.d(c,"useSyncExternalStore",function(){return Ku}),f.d(c,"useTransition",function(){return rl}),f.d(c,"version",function(){return tl});var v,y,E,R,p,d,O,L,P={},N=[],M=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function V(Q,ee){for(var ye in ee)Q[ye]=ee[ye];return Q}function Z(Q){var ee=Q.parentNode;ee&&ee.removeChild(Q)}function x(Q,ee,ye){var He,ct,Ze,Ct={};for(Ze in ee)"key"==Ze?He=ee[Ze]:"ref"==Ze?ct=ee[Ze]:Ct[Ze]=ee[Ze];if(arguments.length>2&&(Ct.children=arguments.length>3?v.call(arguments,2):ye),"function"==typeof Q&&null!=Q.defaultProps)for(Ze in Q.defaultProps)void 0===Ct[Ze]&&(Ct[Ze]=Q.defaultProps[Ze]);return W(Q,Ct,He,ct,null)}function W(Q,ee,ye,He,ct){var Ze={type:Q,props:ee,key:ye,ref:He,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:ct??++E};return null==ct&&null!=y.vnode&&y.vnode(Ze),Ze}function H(){return{current:null}}function J(Q){return Q.children}function K(Q,ee,ye){"-"===ee[0]?Q.setProperty(ee,ye??""):Q[ee]=null==ye?"":"number"!=typeof ye||M.test(ee)?ye:ye+"px"}function le(Q,ee,ye,He,ct){var Ze;e:if("style"===ee)if("string"==typeof ye)Q.style.cssText=ye;else{if("string"==typeof He&&(Q.style.cssText=He=""),He)for(ee in He)ye&&ee in ye||K(Q.style,ee,"");if(ye)for(ee in ye)He&&ye[ee]===He[ee]||K(Q.style,ee,ye[ee])}else if("o"===ee[0]&&"n"===ee[1])Ze=ee!==(ee=ee.replace(/Capture$/,"")),ee=ee.toLowerCase()in Q?ee.toLowerCase().slice(2):ee.slice(2),Q.l||(Q.l={}),Q.l[ee+Ze]=ye,ye?He||Q.addEventListener(ee,Ze?B:z,Ze):Q.removeEventListener(ee,Ze?B:z,Ze);else if("dangerouslySetInnerHTML"!==ee){if(ct)ee=ee.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==ee&&"list"!==ee&&"form"!==ee&&"tabIndex"!==ee&&"download"!==ee&&ee in Q)try{Q[ee]=ye??"";break e}catch{}"function"==typeof ye||(null==ye||!1===ye&&-1==ee.indexOf("-")?Q.removeAttribute(ee):Q.setAttribute(ee,ye))}}function z(Q){R=!0;try{return this.l[Q.type+!1](y.event?y.event(Q):Q)}finally{R=!1}}function B(Q){R=!0;try{return this.l[Q.type+!0](y.event?y.event(Q):Q)}finally{R=!1}}function ie(Q,ee){this.props=Q,this.context=ee}function xe(Q,ee){if(null==ee)return Q.__?xe(Q.__,Q.__.__k.indexOf(Q)+1):null;for(var ye;ee<Q.__k.length;ee++)if(null!=(ye=Q.__k[ee])&&null!=ye.__e)return ye.__e;return"function"==typeof Q.type?xe(Q):null}function Me(Q){var ee,ye;if(null!=(Q=Q.__)&&null!=Q.__c){for(Q.__e=Q.__c.base=null,ee=0;ee<Q.__k.length;ee++)if(null!=(ye=Q.__k[ee])&&null!=ye.__e){Q.__e=Q.__c.base=ye.__e;break}return Me(Q)}}function Oe(Q){R?setTimeout(Q):O(Q)}function we(Q){(!Q.__d&&(Q.__d=!0)&&p.push(Q)&&!oe.__r++||d!==y.debounceRendering)&&((d=y.debounceRendering)||Oe)(oe)}function oe(){var Q,ee,ye,He,ct,Ze,Ct,rn;for(p.sort(function(un,fn){return un.__v.__b-fn.__v.__b});Q=p.shift();)Q.__d&&(ee=p.length,He=void 0,ct=void 0,Ct=(Ze=(ye=Q).__v).__e,(rn=ye.__P)&&(He=[],(ct=V({},Ze)).__v=Ze.__v+1,Se(rn,Ze,ct,ye.__n,void 0!==rn.ownerSVGElement,null!=Ze.__h?[Ct]:null,He,Ct??xe(Ze),Ze.__h),Fe(He,Ze),Ze.__e!=Ct&&Me(Ze)),p.length>ee&&p.sort(function(un,fn){return un.__v.__b-fn.__v.__b}));oe.__r=0}function pe(Q,ee,ye,He,ct,Ze,Ct,rn,un,fn){var rt,gr,nn,Zt,_n,qi,cr,yr=He&&He.__k||N,Jr=yr.length;for(ye.__k=[],rt=0;rt<ee.length;rt++)if(null!=(Zt=ye.__k[rt]=null==(Zt=ee[rt])||"boolean"==typeof Zt?null:"string"==typeof Zt||"number"==typeof Zt||"bigint"==typeof Zt?W(null,Zt,null,null,Zt):Array.isArray(Zt)?W(J,{children:Zt},null,null,null):Zt.__b>0?W(Zt.type,Zt.props,Zt.key,Zt.ref?Zt.ref:null,Zt.__v):Zt)){if(Zt.__=ye,Zt.__b=ye.__b+1,null===(nn=yr[rt])||nn&&Zt.key==nn.key&&Zt.type===nn.type)yr[rt]=void 0;else for(gr=0;gr<Jr;gr++){if((nn=yr[gr])&&Zt.key==nn.key&&Zt.type===nn.type){yr[gr]=void 0;break}nn=null}Se(Q,Zt,nn=nn||P,ct,Ze,Ct,rn,un,fn),_n=Zt.__e,(gr=Zt.ref)&&nn.ref!=gr&&(cr||(cr=[]),nn.ref&&cr.push(nn.ref,null,Zt),cr.push(gr,Zt.__c||_n,Zt)),null!=_n?(null==qi&&(qi=_n),"function"==typeof Zt.type&&Zt.__k===nn.__k?Zt.__d=un=ne(Zt,un,Q):un=ve(Q,Zt,nn,yr,_n,un),"function"==typeof ye.type&&(ye.__d=un)):un&&nn.__e==un&&un.parentNode!=Q&&(un=xe(nn))}for(ye.__e=qi,rt=Jr;rt--;)null!=yr[rt]&&("function"==typeof ye.type&&null!=yr[rt].__e&&yr[rt].__e==ye.__d&&(ye.__d=Re(He).nextSibling),at(yr[rt],yr[rt]));if(cr)for(rt=0;rt<cr.length;rt++)ke(cr[rt],cr[++rt],cr[++rt])}function ne(Q,ee,ye){for(var He,ct=Q.__k,Ze=0;ct&&Ze<ct.length;Ze++)(He=ct[Ze])&&(He.__=Q,ee="function"==typeof He.type?ne(He,ee,ye):ve(ye,He,He,ct,He.__e,ee));return ee}function de(Q,ee){return ee=ee||[],null==Q||"boolean"==typeof Q||(Array.isArray(Q)?Q.some(function(ye){de(ye,ee)}):ee.push(Q)),ee}function ve(Q,ee,ye,He,ct,Ze){var Ct,rn,un;if(void 0!==ee.__d)Ct=ee.__d,ee.__d=void 0;else if(null==ye||ct!=Ze||null==ct.parentNode)e:if(null==Ze||Ze.parentNode!==Q)Q.appendChild(ct),Ct=null;else{for(rn=Ze,un=0;(rn=rn.nextSibling)&&un<He.length;un+=1)if(rn==ct)break e;Q.insertBefore(ct,Ze),Ct=Ze}return void 0!==Ct?Ct:ct.nextSibling}function Re(Q){var ee,ye,He;if(null==Q.type||"string"==typeof Q.type)return Q.__e;if(Q.__k)for(ee=Q.__k.length-1;ee>=0;ee--)if((ye=Q.__k[ee])&&(He=Re(ye)))return He;return null}function Se(Q,ee,ye,He,ct,Ze,Ct,rn,un){var fn,rt,gr,nn,Zt,_n,qi,cr,yr,Jr,go,mr,il,Jo,ba,yi=ee.type;if(void 0!==ee.constructor)return null;null!=ye.__h&&(un=ye.__h,rn=ee.__e=ye.__e,ee.__h=null,Ze=[rn]),(fn=y.__b)&&fn(ee);try{e:if("function"==typeof yi){if(cr=ee.props,yr=(fn=yi.contextType)&&He[fn.__c],Jr=fn?yr?yr.props.value:fn.__:He,ye.__c?qi=(rt=ee.__c=ye.__c).__=rt.__E:("prototype"in yi&&yi.prototype.render?ee.__c=rt=new yi(cr,Jr):(ee.__c=rt=new ie(cr,Jr),rt.constructor=yi,rt.render=Ve),yr&&yr.sub(rt),rt.props=cr,rt.state||(rt.state={}),rt.context=Jr,rt.__n=He,gr=rt.__d=!0,rt.__h=[],rt._sb=[]),null==rt.__s&&(rt.__s=rt.state),null!=yi.getDerivedStateFromProps&&(rt.__s==rt.state&&(rt.__s=V({},rt.__s)),V(rt.__s,yi.getDerivedStateFromProps(cr,rt.__s))),nn=rt.props,Zt=rt.state,rt.__v=ee,gr)null==yi.getDerivedStateFromProps&&null!=rt.componentWillMount&&rt.componentWillMount(),null!=rt.componentDidMount&&rt.__h.push(rt.componentDidMount);else{if(null==yi.getDerivedStateFromProps&&cr!==nn&&null!=rt.componentWillReceiveProps&&rt.componentWillReceiveProps(cr,Jr),!rt.__e&&null!=rt.shouldComponentUpdate&&!1===rt.shouldComponentUpdate(cr,rt.__s,Jr)||ee.__v===ye.__v){for(ee.__v!==ye.__v&&(rt.props=cr,rt.state=rt.__s,rt.__d=!1),ee.__e=ye.__e,ee.__k=ye.__k,ee.__k.forEach(function($s){$s&&($s.__=ee)}),go=0;go<rt._sb.length;go++)rt.__h.push(rt._sb[go]);rt._sb=[],rt.__h.length&&Ct.push(rt);break e}null!=rt.componentWillUpdate&&rt.componentWillUpdate(cr,rt.__s,Jr),null!=rt.componentDidUpdate&&rt.__h.push(function(){rt.componentDidUpdate(nn,Zt,_n)})}if(rt.context=Jr,rt.props=cr,rt.__P=Q,mr=y.__r,il=0,"prototype"in yi&&yi.prototype.render){for(rt.state=rt.__s,rt.__d=!1,mr&&mr(ee),fn=rt.render(rt.props,rt.state,rt.context),Jo=0;Jo<rt._sb.length;Jo++)rt.__h.push(rt._sb[Jo]);rt._sb=[]}else do{rt.__d=!1,mr&&mr(ee),fn=rt.render(rt.props,rt.state,rt.context),rt.state=rt.__s}while(rt.__d&&++il<25);rt.state=rt.__s,null!=rt.getChildContext&&(He=V(V({},He),rt.getChildContext())),gr||null==rt.getSnapshotBeforeUpdate||(_n=rt.getSnapshotBeforeUpdate(nn,Zt)),ba=null!=fn&&fn.type===J&&null==fn.key?fn.props.children:fn,pe(Q,Array.isArray(ba)?ba:[ba],ee,ye,He,ct,Ze,Ct,rn,un),rt.base=ee.__e,ee.__h=null,rt.__h.length&&Ct.push(rt),qi&&(rt.__E=rt.__=null),rt.__e=!1}else null==Ze&&ee.__v===ye.__v?(ee.__k=ye.__k,ee.__e=ye.__e):ee.__e=function(Q,ee,ye,He,ct,Ze,Ct,rn){var un,fn,rt,gr=ye.props,nn=ee.props,Zt=ee.type,_n=0;if("svg"===Zt&&(ct=!0),null!=Ze)for(;_n<Ze.length;_n++)if((un=Ze[_n])&&"setAttribute"in un==!!Zt&&(Zt?un.localName===Zt:3===un.nodeType)){Q=un,Ze[_n]=null;break}if(null==Q){if(null===Zt)return document.createTextNode(nn);Q=ct?document.createElementNS("http://www.w3.org/2000/svg",Zt):document.createElement(Zt,nn.is&&nn),Ze=null,rn=!1}if(null===Zt)gr===nn||rn&&Q.data===nn||(Q.data=nn);else{if(Ze=Ze&&v.call(Q.childNodes),fn=(gr=ye.props||P).dangerouslySetInnerHTML,rt=nn.dangerouslySetInnerHTML,!rn){if(null!=Ze)for(gr={},_n=0;_n<Q.attributes.length;_n++)gr[Q.attributes[_n].name]=Q.attributes[_n].value;(rt||fn)&&(rt&&(fn&&rt.__html==fn.__html||rt.__html===Q.innerHTML)||(Q.innerHTML=rt&&rt.__html||""))}if(function(qi,cr,yr,Jr,go){var mr;for(mr in yr)"children"===mr||"key"===mr||mr in cr||le(qi,mr,null,yr[mr],Jr);for(mr in cr)go&&"function"!=typeof cr[mr]||"children"===mr||"key"===mr||"value"===mr||"checked"===mr||yr[mr]===cr[mr]||le(qi,mr,cr[mr],yr[mr],Jr)}(Q,nn,gr,ct,rn),rt)ee.__k=[];else if(_n=ee.props.children,pe(Q,Array.isArray(_n)?_n:[_n],ee,ye,He,ct&&"foreignObject"!==Zt,Ze,Ct,Ze?Ze[0]:ye.__k&&xe(ye,0),rn),null!=Ze)for(_n=Ze.length;_n--;)null!=Ze[_n]&&Z(Ze[_n]);rn||("value"in nn&&void 0!==(_n=nn.value)&&(_n!==Q.value||"progress"===Zt&&!_n||"option"===Zt&&_n!==gr.value)&&le(Q,"value",_n,gr.value,!1),"checked"in nn&&void 0!==(_n=nn.checked)&&_n!==Q.checked&&le(Q,"checked",_n,gr.checked,!1))}return Q}(ye.__e,ee,ye,He,ct,Ze,Ct,un);(fn=y.diffed)&&fn(ee)}catch($s){ee.__v=null,(un||null!=Ze)&&(ee.__e=rn,ee.__h=!!un,Ze[Ze.indexOf(rn)]=null),y.__e($s,ee,ye)}}function Fe(Q,ee){y.__c&&y.__c(ee,Q),Q.some(function(ye){try{Q=ye.__h,ye.__h=[],Q.some(function(He){He.call(ye)})}catch(He){y.__e(He,ye.__v)}})}function ke(Q,ee,ye){try{"function"==typeof Q?Q(ee):Q.current=ee}catch(He){y.__e(He,ye)}}function at(Q,ee,ye){var He,ct;if(y.unmount&&y.unmount(Q),(He=Q.ref)&&(He.current&&He.current!==Q.__e||ke(He,null,ee)),null!=(He=Q.__c)){if(He.componentWillUnmount)try{He.componentWillUnmount()}catch(Ze){y.__e(Ze,ee)}He.base=He.__P=null,Q.__c=void 0}if(He=Q.__k)for(ct=0;ct<He.length;ct++)He[ct]&&at(He[ct],ee,ye||"function"!=typeof Q.type);ye||null==Q.__e||Z(Q.__e),Q.__=Q.__e=Q.__d=void 0}function Ve(Q,ee,ye){return this.constructor(Q,ye)}function gt(Q,ee,ye){var He,ct,Ze;y.__&&y.__(Q,ee),ct=(He="function"==typeof ye)?null:ye&&ye.__k||ee.__k,Ze=[],Se(ee,Q=(!He&&ye||ee).__k=x(J,null,[Q]),ct||P,P,void 0!==ee.ownerSVGElement,!He&&ye?[ye]:ct?null:ee.firstChild?v.call(ee.childNodes):null,Ze,!He&&ye?ye:ct?ct.__e:ee.firstChild,He),Fe(Ze,Q)}function It(Q,ee){gt(Q,ee,It)}function Bt(Q,ee,ye){var He,ct,Ze,Ct=V({},Q.props);for(Ze in ee)"key"==Ze?He=ee[Ze]:"ref"==Ze?ct=ee[Ze]:Ct[Ze]=ee[Ze];return arguments.length>2&&(Ct.children=arguments.length>3?v.call(arguments,2):ye),W(Q.type,Ct,He||Q.key,ct||Q.ref,null)}function D(Q,ee){var ye={__c:ee="__cC"+L++,__:Q,Consumer:function(He,ct){return He.children(ct)},Provider:function(He){var ct,Ze;return this.getChildContext||(ct=[],(Ze={})[ee]=this,this.getChildContext=function(){return Ze},this.shouldComponentUpdate=function(Ct){this.props.value!==Ct.value&&ct.some(we)},this.sub=function(Ct){ct.push(Ct);var rn=Ct.componentWillUnmount;Ct.componentWillUnmount=function(){ct.splice(ct.indexOf(Ct),1),rn&&rn.call(Ct)}}),He.children}};return ye.Provider.__=ye.Consumer.contextType=ye}v=N.slice,y={__e:function(Q,ee,ye,He){for(var ct,Ze,Ct;ee=ee.__;)if((ct=ee.__c)&&!ct.__)try{if((Ze=ct.constructor)&&null!=Ze.getDerivedStateFromError&&(ct.setState(Ze.getDerivedStateFromError(Q)),Ct=ct.__d),null!=ct.componentDidCatch&&(ct.componentDidCatch(Q,He||{}),Ct=ct.__d),Ct)return ct.__E=ct}catch(rn){Q=rn}throw Q}},E=0,R=!1,ie.prototype.setState=function(Q,ee){var ye;ye=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=V({},this.state),"function"==typeof Q&&(Q=Q(V({},ye),this.props)),Q&&V(ye,Q),null!=Q&&this.__v&&(ee&&this._sb.push(ee),we(this))},ie.prototype.forceUpdate=function(Q){this.__v&&(this.__e=!0,Q&&this.__h.push(Q),we(this))},ie.prototype.render=J,p=[],O="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,oe.__r=0,L=0;var $,q,Ee,Le,je=0,ft=[],_t=[],Tt=y.__b,tn=y.__r,Mt=y.diffed,Cn=y.__c,vn=y.unmount;function At(Q,ee){y.__h&&y.__h(q,Q,je||ee),je=0;var ye=q.__H||(q.__H={__:[],__h:[]});return Q>=ye.__.length&&ye.__.push({__V:_t}),ye.__[Q]}function Xt(Q){return je=1,Kn(Qa,Q)}function Kn(Q,ee,ye){var He=At($++,2);if(He.t=Q,!He.__c&&(He.__=[ye?ye(ee):Qa(void 0,ee),function(Ze){var Ct=He.__N?He.__N[0]:He.__[0],rn=He.t(Ct,Ze);Ct!==rn&&(He.__N=[rn,He.__[1]],He.__c.setState({}))}],He.__c=q,!q.u)){q.u=!0;var ct=q.shouldComponentUpdate;q.shouldComponentUpdate=function(Ze,Ct,rn){if(!He.__c.__H)return!0;var un=He.__c.__H.__.filter(function(rt){return rt.__c});if(un.every(function(rt){return!rt.__N}))return!ct||ct.call(this,Ze,Ct,rn);var fn=!1;return un.forEach(function(rt){if(rt.__N){var gr=rt.__[0];rt.__=rt.__N,rt.__N=void 0,gr!==rt.__[0]&&(fn=!0)}}),!(!fn&&He.__c.props===Ze)&&(!ct||ct.call(this,Ze,Ct,rn))}}return He.__N||He.__}function dr(Q,ee){var ye=At($++,3);!y.__s&&Ds(ye.__H,ee)&&(ye.__=Q,ye.i=ee,q.__H.__h.push(ye))}function Vn(Q,ee){var ye=At($++,4);!y.__s&&Ds(ye.__H,ee)&&(ye.__=Q,ye.i=ee,q.__h.push(ye))}function Qn(Q){return je=5,Er(function(){return{current:Q}},[])}function Br(Q,ee,ye){je=6,Vn(function(){return"function"==typeof Q?(Q(ee()),function(){return Q(null)}):Q?(Q.current=ee(),function(){return Q.current=null}):void 0},null==ye?ye:ye.concat(Q))}function Er(Q,ee){var ye=At($++,7);return Ds(ye.__H,ee)?(ye.__V=Q(),ye.i=ee,ye.__h=Q,ye.__V):ye.__}function Ga(Q,ee){return je=8,Er(function(){return Q},ee)}function Bu(Q){var ee=q.context[Q.__c],ye=At($++,9);return ye.c=Q,ee?(null==ye.__&&(ye.__=!0,ee.sub(q)),ee.props.value):Q.__}function pa(Q,ee){y.useDebugValue&&y.useDebugValue(ee?ee(Q):Q)}function cs(Q){var ee=At($++,10),ye=Xt();return ee.__=Q,q.componentDidCatch||(q.componentDidCatch=function(He,ct){ee.__&&ee.__(He,ct),ye[1](He)}),[ye[0],function(){ye[1](void 0)}]}function $o(){var Q=At($++,11);if(!Q.__){for(var ee=q.__v;null!==ee&&!ee.__m&&null!==ee.__;)ee=ee.__;var ye=ee.__m||(ee.__m=[0,0]);Q.__="P"+ye[0]+"-"+ye[1]++}return Q.__}function Ya(){for(var Q;Q=ft.shift();)if(Q.__P&&Q.__H)try{Q.__H.__h.forEach(Ji),Q.__H.__h.forEach(ya),Q.__H.__h=[]}catch(ee){Q.__H.__h=[],y.__e(ee,Q.__v)}}y.__b=function(Q){q=null,Tt&&Tt(Q)},y.__r=function(Q){tn&&tn(Q),$=0;var ee=(q=Q.__c).__H;ee&&(Ee===q?(ee.__h=[],q.__h=[],ee.__.forEach(function(ye){ye.__N&&(ye.__=ye.__N),ye.__V=_t,ye.__N=ye.i=void 0})):(ee.__h.forEach(Ji),ee.__h.forEach(ya),ee.__h=[])),Ee=q},y.diffed=function(Q){Mt&&Mt(Q);var ee=Q.__c;ee&&ee.__H&&(ee.__H.__h.length&&(1!==ft.push(ee)&&Le===y.requestAnimationFrame||((Le=y.requestAnimationFrame)||Vo)(Ya)),ee.__H.__.forEach(function(ye){ye.i&&(ye.__H=ye.i),ye.__V!==_t&&(ye.__=ye.__V),ye.i=void 0,ye.__V=_t})),Ee=q=null},y.__c=function(Q,ee){ee.some(function(ye){try{ye.__h.forEach(Ji),ye.__h=ye.__h.filter(function(He){return!He.__||ya(He)})}catch(He){ee.some(function(ct){ct.__h&&(ct.__h=[])}),ee=[],y.__e(He,ye.__v)}}),Cn&&Cn(Q,ee)},y.unmount=function(Q){vn&&vn(Q);var ee,ye=Q.__c;ye&&ye.__H&&(ye.__H.__.forEach(function(He){try{Ji(He)}catch(ct){ee=ct}}),ye.__H=void 0,ee&&y.__e(ee,ye.__v))};var ga="function"==typeof requestAnimationFrame;function Vo(Q){var ee,ye=function(){clearTimeout(He),ga&&cancelAnimationFrame(ee),setTimeout(Q)},He=setTimeout(ye,100);ga&&(ee=requestAnimationFrame(ye))}function Ji(Q){var ee=q,ye=Q.__c;"function"==typeof ye&&(Q.__c=void 0,ye()),q=ee}function ya(Q){var ee=q;Q.__c=Q.__(),q=ee}function Ds(Q,ee){return!Q||Q.length!==ee.length||ee.some(function(ye,He){return ye!==Q[He]})}function Qa(Q,ee){return"function"==typeof ee?ee(Q):ee}function lo(Q,ee){for(var ye in ee)Q[ye]=ee[ye];return Q}function js(Q,ee){for(var ye in Q)if("__source"!==ye&&!(ye in ee))return!0;for(var He in ee)if("__source"!==He&&Q[He]!==ee[He])return!0;return!1}function zs(Q,ee){return Q===ee&&(0!==Q||1/Q==1/ee)||Q!=Q&&ee!=ee}function fo(Q){this.props=Q}function Wo(Q,ee){function ye(ct){var Ze=this.props.ref,Ct=Ze==ct.ref;return!Ct&&Ze&&(Ze.call?Ze(null):Ze.current=null),ee?!ee(this.props,ct)||!Ct:js(this.props,ct)}function He(ct){return this.shouldComponentUpdate=ye,x(Q,ct)}return He.displayName="Memo("+(Q.displayName||Q.name)+")",He.prototype.isReactComponent=!0,He.__f=!0,He}(fo.prototype=new ie).isPureReactComponent=!0,fo.prototype.shouldComponentUpdate=function(Q,ee){return js(this.props,Q)||js(this.state,ee)};var ma=y.__b;y.__b=function(Q){Q.type&&Q.type.__f&&Q.ref&&(Q.props.ref=Q.ref,Q.ref=null),ma&&ma(Q)};var Bs="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fu(Q){function ee(ye){var He=lo({},ye);return delete He.ref,Q(He,ye.ref||null)}return ee.$$typeof=Bs,ee.render=ee,ee.prototype.isReactComponent=ee.__f=!0,ee.displayName="ForwardRef("+(Q.displayName||Q.name)+")",ee}var ls=function(Q,ee){return null==Q?null:de(de(Q).map(ee))},Fs={map:ls,forEach:ls,count:function(Q){return Q?de(Q).length:0},only:function(Q){var ee=de(Q);if(1!==ee.length)throw"Children.only";return ee[0]},toArray:de},va=y.__e;y.__e=function(Q,ee,ye,He){if(Q.then)for(var ct,Ze=ee;Ze=Ze.__;)if((ct=Ze.__c)&&ct.__c)return null==ee.__e&&(ee.__e=ye.__e,ee.__k=ye.__k),ct.__c(Q,ee);va(Q,ee,ye,He)};var _a=y.unmount;function Ko(){this.__u=0,this.t=null,this.__b=null}function Ja(Q){var ee=Q.__.__c;return ee&&ee.__a&&ee.__a(Q)}function No(Q){var ee,ye,He;function ct(Ze){if(ee||(ee=Q()).then(function(Ct){ye=Ct.default||Ct},function(Ct){He=Ct}),He)throw He;if(!ye)throw ee;return x(ye,Ze)}return ct.displayName="Lazy",ct.__f=!0,ct}function Go(){this.u=null,this.o=null}y.unmount=function(Q){var ee=Q.__c;ee&&ee.__R&&ee.__R(),ee&&!0===Q.__h&&(Q.type=null),_a&&_a(Q)},(Ko.prototype=new ie).__c=function(Q,ee){var ye=ee.__c,He=this;null==He.t&&(He.t=[]),He.t.push(ye);var ct=Ja(He.__v),Ze=!1,Ct=function(){Ze||(Ze=!0,ye.__R=null,ct?ct(rn):rn())};ye.__R=Ct;var rn=function(){if(!--He.__u){if(He.state.__a){var fn=He.state.__a;He.__v.__k[0]=function gr(nn,Zt,_n){return nn&&(nn.__v=null,nn.__k=nn.__k&&nn.__k.map(function(qi){return gr(qi,Zt,_n)}),nn.__c&&nn.__c.__P===Zt&&(nn.__e&&_n.insertBefore(nn.__e,nn.__d),nn.__c.__e=!0,nn.__c.__P=_n)),nn}(fn,fn.__c.__P,fn.__c.__O)}var rt;for(He.setState({__a:He.__b=null});rt=He.t.pop();)rt.forceUpdate()}},un=!0===ee.__h;He.__u++||un||He.setState({__a:He.__b=He.__v.__k[0]}),Q.then(Ct,Ct)},Ko.prototype.componentWillUnmount=function(){this.t=[]},Ko.prototype.render=function(Q,ee){if(this.__b){if(this.__v.__k){var ye=document.createElement("div"),He=this.__v.__k[0].__c;this.__v.__k[0]=function Ze(Ct,rn,un){return Ct&&(Ct.__c&&Ct.__c.__H&&(Ct.__c.__H.__.forEach(function(fn){"function"==typeof fn.__c&&fn.__c()}),Ct.__c.__H=null),null!=(Ct=lo({},Ct)).__c&&(Ct.__c.__P===un&&(Ct.__c.__P=rn),Ct.__c=null),Ct.__k=Ct.__k&&Ct.__k.map(function(fn){return Ze(fn,rn,un)})),Ct}(this.__b,ye,He.__O=He.__P)}this.__b=null}var ct=ee.__a&&x(J,null,Q.fallback);return ct&&(ct.__h=null),[x(J,null,ee.__a?null:Q.children),ct]};var Yo=function(Q,ee,ye){if(++ye[1]===ye[0]&&Q.o.delete(ee),Q.props.revealOrder&&("t"!==Q.props.revealOrder[0]||!Q.o.size))for(ye=Q.u;ye;){for(;ye.length>3;)ye.pop()();if(ye[1]<ye[0])break;Q.u=ye=ye[2]}};function Hu(Q){return this.getChildContext=function(){return Q.context},Q.children}function qu(Q){var ee=this,ye=Q.i;ee.componentWillUnmount=function(){gt(null,ee.l),ee.l=null,ee.i=null},ee.i&&ee.i!==ye&&ee.componentWillUnmount(),Q.__v?(ee.l||(ee.i=ye,ee.l={nodeType:1,parentNode:ye,childNodes:[],appendChild:function(He){this.childNodes.push(He),ee.i.appendChild(He)},insertBefore:function(He,ct){this.childNodes.push(He),ee.i.appendChild(He)},removeChild:function(He){this.childNodes.splice(this.childNodes.indexOf(He)>>>1,1),ee.i.removeChild(He)}}),gt(x(Hu,{context:ee.context},Q.__v),ee.l)):ee.l&&ee.componentWillUnmount()}function Xa(Q,ee){var ye=x(qu,{__v:Q,i:ee});return ye.containerInfo=ee,ye}(Go.prototype=new ie).__a=function(Q){var ee=this,ye=Ja(ee.__v),He=ee.o.get(Q);return He[0]++,function(ct){var Ze=function(){ee.props.revealOrder?(He.push(ct),Yo(ee,Q,He)):ct()};ye?ye(Ze):Ze()}},Go.prototype.render=function(Q){this.u=null,this.o=new Map;var ee=de(Q.children);Q.revealOrder&&"b"===Q.revealOrder[0]&&ee.reverse();for(var ye=ee.length;ye--;)this.o.set(ee[ye],this.u=[1,0,this.u]);return Q.children},Go.prototype.componentDidUpdate=Go.prototype.componentDidMount=function(){var Q=this;this.o.forEach(function(ee,ye){Yo(Q,ye,ee)})};var Za="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,el=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ye="undefined"!=typeof document,kt=function(Q){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(Q)};function an(Q,ee,ye){return null==ee.__k&&(ee.textContent=""),gt(Q,ee),"function"==typeof ye&&ye(),Q?Q.__c:null}function ur(Q,ee,ye){return It(Q,ee),"function"==typeof ye&&ye(),Q?Q.__c:null}ie.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(Q){Object.defineProperty(ie.prototype,Q,{configurable:!0,get:function(){return this["UNSAFE_"+Q]},set:function(ee){Object.defineProperty(this,Q,{configurable:!0,writable:!0,value:ee})}})});var ho=y.event;function Gt(){}function fs(){return this.cancelBubble}function ds(){return this.defaultPrevented}y.event=function(Q){return ho&&(Q=ho(Q)),Q.persist=Gt,Q.isPropagationStopped=fs,Q.isDefaultPrevented=ds,Q.nativeEvent=Q};var Hs,po={configurable:!0,get:function(){return this.class}},Xi=y.vnode;y.vnode=function(Q){var ee=Q.type,ye=Q.props,He=ye;if("string"==typeof ee){var ct=-1===ee.indexOf("-");for(var Ze in He={},ye){var Ct=ye[Ze];Ye&&"children"===Ze&&"noscript"===ee||"value"===Ze&&"defaultValue"in ye&&null==Ct||("defaultValue"===Ze&&"value"in ye&&null==ye.value?Ze="value":"download"===Ze&&!0===Ct?Ct="":/ondoubleclick/i.test(Ze)?Ze="ondblclick":/^onchange(textarea|input)/i.test(Ze+ee)&&!kt(ye.type)?Ze="oninput":/^onfocus$/i.test(Ze)?Ze="onfocusin":/^onblur$/i.test(Ze)?Ze="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(Ze)?Ze=Ze.toLowerCase():ct&&el.test(Ze)?Ze=Ze.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===Ct&&(Ct=void 0),/^oninput$/i.test(Ze)&&(Ze=Ze.toLowerCase(),He[Ze]&&(Ze="oninputCapture")),He[Ze]=Ct)}"select"==ee&&He.multiple&&Array.isArray(He.value)&&(He.value=de(ye.children).forEach(function(rn){rn.props.selected=-1!=He.value.indexOf(rn.props.value)})),"select"==ee&&null!=He.defaultValue&&(He.value=de(ye.children).forEach(function(rn){rn.props.selected=He.multiple?-1!=He.defaultValue.indexOf(rn.props.value):He.defaultValue==rn.props.value})),Q.props=He,ye.class!=ye.className&&(po.enumerable="className"in ye,null!=ye.className&&(He.class=ye.className),Object.defineProperty(He,"className",po))}Q.$$typeof=Za,Xi&&Xi(Q)};var ef=y.__r;y.__r=function(Q){ef&&ef(Q),Hs=Q.__c};var tf={ReactCurrentDispatcher:{current:{readContext:function(Q){return Hs.__n[Q.__c].props.value}}}},tl="17.0.2";function $u(Q){return x.bind(null,Q)}function qs(Q){return!!Q&&Q.$$typeof===Za}function eu(Q){return qs(Q)?Bt.apply(null,arguments):Q}function Vu(Q){return!!Q.__k&&(gt(null,Q),!0)}function tu(Q){return Q&&(Q.base||1===Q.nodeType&&Q)||null}var nl=function(Q,ee){return Q(ee)},Wu=function(Q,ee){return Q(ee)},Qo=J;function nu(Q){Q()}function tr(Q){return Q}function rl(){return[!1,nu]}var nf=Vn;function Ku(Q,ee){var ye=ee(),He=Xt({h:{__:ye,v:ee}}),ct=He[0].h,Ze=He[1];return Vn(function(){ct.__=ye,ct.v=ee,zs(ct.__,ee())||Ze({h:ct})},[Q,ye,ee]),dr(function(){return zs(ct.__,ct.v())||Ze({h:ct}),Q(function(){zs(ct.__,ct.v())||Ze({h:ct})})},[Q]),ye}var rf={useState:Xt,useId:$o,useReducer:Kn,useEffect:dr,useLayoutEffect:Vn,useInsertionEffect:Vn,useTransition:rl,useDeferredValue:tr,useSyncExternalStore:Ku,startTransition:nu,useRef:Qn,useImperativeHandle:Br,useMemo:Er,useCallback:Ga,useContext:Bu,useDebugValue:pa,version:"17.0.2",Children:Fs,render:an,hydrate:ur,unmountComponentAtNode:Vu,createPortal:Xa,createElement:x,createContext:D,createFactory:$u,cloneElement:eu,createRef:H,Fragment:J,isValidElement:qs,findDOMNode:tu,Component:ie,PureComponent:fo,memo:Wo,forwardRef:Fu,flushSync:Wu,unstable_batchedUpdates:nl,StrictMode:J,Suspense:Ko,SuspenseList:Go,lazy:No,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:tf}},function(h,c,f){f.r(c),f.d(c,"JsonRpcProvider",function(){return E});var v=f(13),y=f(7);class E extends y.IJsonRpcProvider{constructor(d){super(d),this.events=new v.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(d),this.connection.connected&&this.registerEventListeners()}connect(d=this.connection){var O=this;return ue(function*(){yield O.open(d)})()}disconnect(){var d=this;return ue(function*(){yield d.close()})()}on(d,O){this.events.on(d,O)}once(d,O){this.events.once(d,O)}off(d,O){this.events.off(d,O)}removeListener(d,O){this.events.removeListener(d,O)}request(d,O){var L=this;return ue(function*(){return L.requestStrict(Object(y.formatJsonRpcRequest)(d.method,d.params||[]),O)})()}requestStrict(d,O){var L=this;return ue(function*(){return new Promise(function(){var P=ue(function*(N,M){if(!L.connection.connected)try{yield L.open()}catch(V){M(V)}L.events.on(""+d.id,V=>{Object(y.isJsonRpcError)(V)?M(V.error):N(V.result)});try{yield L.connection.send(d,O)}catch(V){M(V)}});return function(N,M){return P.apply(this,arguments)}}())})()}setConnection(d=this.connection){return d}onPayload(d){this.events.emit("payload",d),Object(y.isJsonRpcResponse)(d)?this.events.emit(""+d.id,d):this.events.emit("message",{type:d.method,data:d.params})}open(d=this.connection){var O=this;return ue(function*(){O.connection===d&&O.connection.connected||(O.connection.connected&&O.close(),"string"==typeof d&&(yield O.connection.open(d),d=O.connection),O.connection=O.setConnection(d),yield O.connection.open(),O.registerEventListeners(),O.events.emit("connect"))})()}close(){var d=this;return ue(function*(){yield d.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",d=>this.onPayload(d)),this.connection.on("close",()=>this.events.emit("disconnect")),this.connection.on("error",d=>this.events.emit("error",d)),this.hasRegisteredEventListeners=!0)}}c.default=E},function(h,c,f){f.r(c),f.d(c,"HttpConnection",function(){return O});var v=f(13),y=f(23),E=f.n(y),R=f(12),p=f(7);const d={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class O{constructor(N){if(this.url=N,this.events=new v.EventEmitter,this.isAvailable=!1,this.registering=!1,!Object(p.isHttpUrl)(N))throw new Error("Provided URL is not compatible with HTTP connection: "+N);this.url=N}get connected(){return this.isAvailable}get connecting(){return this.registering}on(N,M){this.events.on(N,M)}once(N,M){this.events.once(N,M)}off(N,M){this.events.off(N,M)}removeListener(N,M){this.events.removeListener(N,M)}open(N=this.url){var M=this;return ue(function*(){yield M.register(N)})()}close(){var N=this;return ue(function*(){if(!N.isAvailable)throw new Error("Connection already closed");N.onClose()})()}send(N,M){var V=this;return ue(function*(){V.isAvailable||(yield V.register());try{const Z=Object(R.b)(N),x=yield E()(V.url,Object.assign(Object.assign({},d),{body:Z})),W=yield x.json();V.onPayload({data:W})}catch(Z){V.onError(N.id,Z)}})()}register(N=this.url){var M=this;return ue(function*(){if(!Object(p.isHttpUrl)(N))throw new Error("Provided URL is not compatible with HTTP connection: "+N);if(M.registering){const V=M.events.getMaxListeners();return(M.events.listenerCount("register_error")>=V||M.events.listenerCount("open")>=V)&&M.events.setMaxListeners(V+1),new Promise((Z,x)=>{M.events.once("register_error",W=>{M.resetMaxListeners(),x(W)}),M.events.once("open",()=>{if(M.resetMaxListeners(),void 0===M.isAvailable)return x(new Error("HTTP connection is missing or invalid"));Z()})})}M.url=N,M.registering=!0;try{const V=Object(R.b)({id:1,jsonrpc:"2.0",method:"test",params:[]});yield E()(N,Object.assign(Object.assign({},d),{body:V})),M.onOpen()}catch(V){const Z=M.parseError(V);throw M.events.emit("register_error",Z),M.onClose(),Z}})()}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(N){if(void 0===N.data)return;const M="string"==typeof N.data?Object(R.a)(N.data):N.data;this.events.emit("payload",M)}onError(N,M){const V=this.parseError(M),Z=V.message||V.toString(),x=Object(p.formatJsonRpcError)(N,Z);this.events.emit("payload",x)}parseError(N,M=this.url){return Object(p.parseConnectionError)(N,M,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}c.default=O}]);var f_,_3=J1(l_.exports),pn={exports:{}},bd={},Po={exports:{}},$n={};function b3(){if(f_)return $n;f_=1;var _=Symbol.for("react.element"),m=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),y=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),O=Symbol.iterator,L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,N={};function M(ne,de,ve){this.props=ne,this.context=de,this.refs=N,this.updater=ve||L}function V(){}function Z(ne,de,ve){this.props=ne,this.context=de,this.refs=N,this.updater=ve||L}M.prototype.isReactComponent={},M.prototype.setState=function(ne,de){if("object"!=typeof ne&&"function"!=typeof ne&&null!=ne)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ne,de,"setState")},M.prototype.forceUpdate=function(ne){this.updater.enqueueForceUpdate(this,ne,"forceUpdate")},V.prototype=M.prototype;var x=Z.prototype=new V;x.constructor=Z,P(x,M.prototype),x.isPureReactComponent=!0;var W=Array.isArray,H=Object.prototype.hasOwnProperty,J={current:null},K={key:!0,ref:!0,__self:!0,__source:!0};function le(ne,de,ve){var Re,Se={},Fe=null,$e=null;if(null!=de)for(Re in void 0!==de.ref&&($e=de.ref),void 0!==de.key&&(Fe=""+de.key),de)H.call(de,Re)&&!K.hasOwnProperty(Re)&&(Se[Re]=de[Re]);var ke=arguments.length-2;if(1===ke)Se.children=ve;else if(1<ke){for(var at=Array(ke),Ve=0;Ve<ke;Ve++)at[Ve]=arguments[Ve+2];Se.children=at}if(ne&&ne.defaultProps)for(Re in ke=ne.defaultProps)void 0===Se[Re]&&(Se[Re]=ke[Re]);return{$$typeof:_,type:ne,key:Fe,ref:$e,props:Se,_owner:J.current}}function z(ne){return"object"==typeof ne&&null!==ne&&ne.$$typeof===_}var B=/\/+/g;function ie(ne,de){return"object"==typeof ne&&null!==ne&&null!=ne.key?(Re={"=":"=0",":":"=2"},"$"+(""+ne.key).replace(/[=:]/g,function(Se){return Re[Se]})):de.toString(36);var Re}function xe(ne,de,ve,Re,Se){var Fe=typeof ne;"undefined"!==Fe&&"boolean"!==Fe||(ne=null);var Ve,gt,$e=!1;if(null===ne)$e=!0;else switch(Fe){case"string":case"number":$e=!0;break;case"object":switch(ne.$$typeof){case _:case m:$e=!0}}if($e)return Se=Se($e=ne),ne=""===Re?"."+ie($e,0):Re,W(Se)?(ve="",null!=ne&&(ve=ne.replace(B,"$&/")+"/"),xe(Se,de,ve,"",function(Ve){return Ve})):null!=Se&&(z(Se)&&(Ve=Se,gt=ve+(!Se.key||$e&&$e.key===Se.key?"":(""+Se.key).replace(B,"$&/")+"/")+ne,Se={$$typeof:_,type:Ve.type,key:gt,ref:Ve.ref,props:Ve.props,_owner:Ve._owner}),de.push(Se)),1;if($e=0,Re=""===Re?".":Re+":",W(ne))for(var ke=0;ke<ne.length;ke++){var at=Re+ie(Fe=ne[ke],ke);$e+=xe(Fe,de,ve,at,Se)}else if(at=function(Ve){return null===Ve||"object"!=typeof Ve?null:"function"==typeof(Ve=O&&Ve[O]||Ve["@@iterator"])?Ve:null}(ne),"function"==typeof at)for(ne=at.call(ne),ke=0;!(Fe=ne.next()).done;)$e+=xe(Fe=Fe.value,de,ve,at=Re+ie(Fe,ke++),Se);else if("object"===Fe)throw de=String(ne),Error("Objects are not valid as a React child (found: "+("[object Object]"===de?"object with keys {"+Object.keys(ne).join(", ")+"}":de)+"). If you meant to render a collection of children, use an array instead.");return $e}function Me(ne,de,ve){if(null==ne)return ne;var Re=[],Se=0;return xe(ne,Re,"","",function(Fe){return de.call(ve,Fe,Se++)}),Re}function Oe(ne){if(-1===ne._status){var de=ne._result;(de=de()).then(function(ve){0!==ne._status&&-1!==ne._status||(ne._status=1,ne._result=ve)},function(ve){0!==ne._status&&-1!==ne._status||(ne._status=2,ne._result=ve)}),-1===ne._status&&(ne._status=0,ne._result=de)}if(1===ne._status)return ne._result.default;throw ne._result}var we={current:null},oe={transition:null},pe={ReactCurrentDispatcher:we,ReactCurrentBatchConfig:oe,ReactCurrentOwner:J};return $n.Children={map:Me,forEach:function(ne,de,ve){Me(ne,function(){de.apply(this,arguments)},ve)},count:function(ne){var de=0;return Me(ne,function(){de++}),de},toArray:function(ne){return Me(ne,function(de){return de})||[]},only:function(ne){if(!z(ne))throw Error("React.Children.only expected to receive a single React element child.");return ne}},$n.Component=M,$n.Fragment=h,$n.Profiler=f,$n.PureComponent=Z,$n.StrictMode=c,$n.Suspense=R,$n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pe,$n.cloneElement=function(ne,de,ve){if(null==ne)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+ne+".");var Re=P({},ne.props),Se=ne.key,Fe=ne.ref,$e=ne._owner;if(null!=de){if(void 0!==de.ref&&(Fe=de.ref,$e=J.current),void 0!==de.key&&(Se=""+de.key),ne.type&&ne.type.defaultProps)var ke=ne.type.defaultProps;for(at in de)H.call(de,at)&&!K.hasOwnProperty(at)&&(Re[at]=void 0===de[at]&&void 0!==ke?ke[at]:de[at])}var at=arguments.length-2;if(1===at)Re.children=ve;else if(1<at){ke=Array(at);for(var Ve=0;Ve<at;Ve++)ke[Ve]=arguments[Ve+2];Re.children=ke}return{$$typeof:_,type:ne.type,key:Se,ref:Fe,props:Re,_owner:$e}},$n.createContext=function(ne){return(ne={$$typeof:y,_currentValue:ne,_currentValue2:ne,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:v,_context:ne},ne.Consumer=ne},$n.createElement=le,$n.createFactory=function(ne){var de=le.bind(null,ne);return de.type=ne,de},$n.createRef=function(){return{current:null}},$n.forwardRef=function(ne){return{$$typeof:E,render:ne}},$n.isValidElement=z,$n.lazy=function(ne){return{$$typeof:d,_payload:{_status:-1,_result:ne},_init:Oe}},$n.memo=function(ne,de){return{$$typeof:p,type:ne,compare:void 0===de?null:de}},$n.startTransition=function(ne){var de=oe.transition;oe.transition={};try{ne()}finally{oe.transition=de}},$n.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},$n.useCallback=function(ne,de){return we.current.useCallback(ne,de)},$n.useContext=function(ne){return we.current.useContext(ne)},$n.useDebugValue=function(){},$n.useDeferredValue=function(ne){return we.current.useDeferredValue(ne)},$n.useEffect=function(ne,de){return we.current.useEffect(ne,de)},$n.useId=function(){return we.current.useId()},$n.useImperativeHandle=function(ne,de,ve){return we.current.useImperativeHandle(ne,de,ve)},$n.useInsertionEffect=function(ne,de){return we.current.useInsertionEffect(ne,de)},$n.useLayoutEffect=function(ne,de){return we.current.useLayoutEffect(ne,de)},$n.useMemo=function(ne,de){return we.current.useMemo(ne,de)},$n.useReducer=function(ne,de,ve){return we.current.useReducer(ne,de,ve)},$n.useRef=function(ne){return we.current.useRef(ne)},$n.useState=function(ne){return we.current.useState(ne)},$n.useSyncExternalStore=function(ne,de,ve){return we.current.useSyncExternalStore(ne,de,ve)},$n.useTransition=function(){return we.current.useTransition()},$n.version="18.2.0",$n}Po.exports=b3();var d_,Uu=J1(Po.exports);!function(_){_.exports=function(){if(d_)return bd;d_=1;var m=Po.exports,h=Symbol.for("react.element"),c=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,v=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function E(R,p,d){var O,L={},P=null,N=null;for(O in void 0!==d&&(P=""+d),void 0!==p.key&&(P=""+p.key),void 0!==p.ref&&(N=p.ref),p)f.call(p,O)&&!y.hasOwnProperty(O)&&(L[O]=p[O]);if(R&&R.defaultProps)for(O in p=R.defaultProps)void 0===L[O]&&(L[O]=p[O]);return{$$typeof:h,type:R,key:P,ref:N,props:L,_owner:v.current}}return bd.Fragment=c,bd.jsx=E,bd.jsxs=E,bd}()}(pn);var h_,Bp={exports:{}},pr={};function w3(_){function m(Re,Se,Fe,$e,ke){for(var at,Ve,gt,It,Bt,D=0,$=0,q=0,Ee=0,Le=0,je=0,ft=gt=at=0,_t=0,Tt=0,tn=0,Mt=0,Cn=Fe.length,vn=Cn-1,At="",Xt="",Kn="",dr="";_t<Cn;){if(Ve=Fe.charCodeAt(_t),_t===vn&&$+Ee+q+D!==0&&(0!==$&&(Ve=47===$?10:47),Ee=q=D=0,Cn++,vn++),$+Ee+q+D===0){if(_t===vn&&(0<Tt&&(At=At.replace(O,"")),0<At.trim().length)){switch(Ve){case 32:case 9:case 59:case 13:case 10:break;default:At+=Fe.charAt(_t)}Ve=59}switch(Ve){case 123:for(at=(At=At.trim()).charCodeAt(0),gt=1,Mt=++_t;_t<Cn;){switch(Ve=Fe.charCodeAt(_t)){case 123:gt++;break;case 125:gt--;break;case 47:switch(Ve=Fe.charCodeAt(_t+1)){case 42:case 47:e:{for(ft=_t+1;ft<vn;++ft)switch(Fe.charCodeAt(ft)){case 47:if(42===Ve&&42===Fe.charCodeAt(ft-1)&&_t+2!==ft){_t=ft+1;break e}break;case 10:if(47===Ve){_t=ft+1;break e}}_t=ft}}break;case 91:Ve++;case 40:Ve++;case 34:case 39:for(;_t++<vn&&Fe.charCodeAt(_t)!==Ve;);}if(0===gt)break;_t++}if(gt=Fe.substring(Mt,_t),0===at&&(at=(At=At.replace(d,"").trim()).charCodeAt(0)),64===at){switch(0<Tt&&(At=At.replace(O,"")),Ve=At.charCodeAt(1)){case 100:case 109:case 115:case 45:Tt=Se;break;default:Tt=oe}if(Mt=(gt=m(Se,Tt,gt,Ve,ke+1)).length,0<ne&&(Bt=E(3,gt,Tt=h(oe,At,tn),Se,Me,xe,Mt,Ve,ke,$e),At=Tt.join(""),void 0!==Bt&&0===(Mt=(gt=Bt.trim()).length)&&(Ve=0,gt="")),0<Mt)switch(Ve){case 115:At=At.replace(J,y);case 100:case 109:case 45:gt=At+"{"+gt+"}";break;case 107:gt=(At=At.replace(Z,"$1 $2"))+"{"+gt+"}",gt=1===we||2===we&&v("@"+gt,3)?"@-webkit-"+gt+"@"+gt:"@"+gt;break;default:gt=At+gt,112===$e&&(Xt+=gt,gt="")}else gt=""}else gt=m(Se,h(Se,At,tn),gt,$e,ke+1);Kn+=gt,gt=tn=Tt=ft=at=0,At="",Ve=Fe.charCodeAt(++_t);break;case 125:case 59:if(1<(Mt=(At=(0<Tt?At.replace(O,""):At).trim()).length))switch(0===ft&&(at=At.charCodeAt(0),45===at||96<at&&123>at)&&(Mt=(At=At.replace(" ",":")).length),0<ne&&void 0!==(Bt=E(1,At,Se,Re,Me,xe,Xt.length,$e,ke,$e))&&0===(Mt=(At=Bt.trim()).length)&&(At="\0\0"),at=At.charCodeAt(0),Ve=At.charCodeAt(1),at){case 0:break;case 64:if(105===Ve||99===Ve){dr+=At+Fe.charAt(_t);break}default:58!==At.charCodeAt(Mt-1)&&(Xt+=f(At,at,Ve,At.charCodeAt(2)))}tn=Tt=ft=at=0,At="",Ve=Fe.charCodeAt(++_t)}}switch(Ve){case 13:case 10:47===$?$=0:1+at===0&&107!==$e&&0<At.length&&(Tt=1,At+="\0"),0<ne*ve&&E(0,At,Se,Re,Me,xe,Xt.length,$e,ke,$e),xe=1,Me++;break;case 59:case 125:if($+Ee+q+D===0){xe++;break}default:switch(xe++,It=Fe.charAt(_t),Ve){case 9:case 32:if(Ee+D+$===0)switch(Le){case 44:case 58:case 9:case 32:It="";break;default:32!==Ve&&(It=" ")}break;case 0:It="\\0";break;case 12:It="\\f";break;case 11:It="\\v";break;case 38:Ee+$+D===0&&(Tt=tn=1,It="\f"+It);break;case 108:if(Ee+$+D+Oe===0&&0<ft)switch(_t-ft){case 2:112===Le&&58===Fe.charCodeAt(_t-3)&&(Oe=Le);case 8:111===je&&(Oe=je)}break;case 58:Ee+$+D===0&&(ft=_t);break;case 44:$+q+Ee+D===0&&(Tt=1,It+="\r");break;case 34:case 39:0===$&&(Ee=Ee===Ve?0:0===Ee?Ve:Ee);break;case 91:Ee+$+q===0&&D++;break;case 93:Ee+$+q===0&&D--;break;case 41:Ee+$+D===0&&q--;break;case 40:Ee+$+D===0&&(0===at&&(2*Le+3*je==533||(at=1)),q++);break;case 64:$+q+Ee+D+ft+gt===0&&(gt=1);break;case 42:case 47:if(!(0<Ee+D+q))switch($){case 0:switch(2*Ve+3*Fe.charCodeAt(_t+1)){case 235:$=47;break;case 220:Mt=_t,$=42}break;case 42:47===Ve&&42===Le&&Mt+2!==_t&&(33===Fe.charCodeAt(Mt+2)&&(Xt+=Fe.substring(Mt,_t+1)),It="",$=0)}}0===$&&(At+=It)}je=Le,Le=Ve,_t++}if(0<(Mt=Xt.length)){if(Tt=Se,0<ne&&void 0!==(Bt=E(2,Xt,Tt,Re,Me,xe,Mt,$e,ke,$e))&&0===(Xt=Bt).length)return dr+Xt+Kn;if(Xt=Tt.join(",")+"{"+Xt+"}",we*Oe!=0){switch(2!==we||v(Xt,2)||(Oe=0),Oe){case 111:Xt=Xt.replace(W,":-moz-$1")+Xt;break;case 112:Xt=Xt.replace(x,"::-webkit-input-$1")+Xt.replace(x,"::-moz-$1")+Xt.replace(x,":-ms-input-$1")+Xt}Oe=0}}return dr+Xt+Kn}function h(Re,Se,Fe){var $e=Se.trim().split(M);Se=$e;var ke=$e.length,at=Re.length;switch(at){case 0:case 1:var Ve=0;for(Re=0===at?"":Re[0]+" ";Ve<ke;++Ve)Se[Ve]=c(Re,Se[Ve],Fe).trim();break;default:var gt=Ve=0;for(Se=[];Ve<ke;++Ve)for(var It=0;It<at;++It)Se[gt++]=c(Re[It]+" ",$e[Ve],Fe).trim()}return Se}function c(Re,Se,Fe){var $e=Se.charCodeAt(0);switch(33>$e&&($e=(Se=Se.trim()).charCodeAt(0)),$e){case 38:return Se.replace(V,"$1"+Re.trim());case 58:return Re.trim()+Se.replace(V,"$1"+Re.trim());default:if(0<1*Fe&&0<Se.indexOf("\f"))return Se.replace(V,(58===Re.charCodeAt(0)?"":"$1")+Re.trim())}return Re+Se}function f(Re,Se,Fe,$e){var ke=Re+";",at=2*Se+3*Fe+4*$e;if(944===at){Re=ke.indexOf(":",9)+1;var Ve=ke.substring(Re,ke.length-1).trim();return Ve=ke.substring(0,Re).trim()+Ve+";",1===we||2===we&&v(Ve,1)?"-webkit-"+Ve+Ve:Ve}if(0===we||2===we&&!v(ke,1))return ke;switch(at){case 1015:return 97===ke.charCodeAt(10)?"-webkit-"+ke+ke:ke;case 951:return 116===ke.charCodeAt(3)?"-webkit-"+ke+ke:ke;case 963:return 110===ke.charCodeAt(5)?"-webkit-"+ke+ke:ke;case 1009:if(100!==ke.charCodeAt(4))break;case 969:case 942:return"-webkit-"+ke+ke;case 978:return"-webkit-"+ke+"-moz-"+ke+ke;case 1019:case 983:return"-webkit-"+ke+"-moz-"+ke+"-ms-"+ke+ke;case 883:if(45===ke.charCodeAt(8))return"-webkit-"+ke+ke;if(0<ke.indexOf("image-set(",11))return ke.replace(ie,"$1-webkit-$2")+ke;break;case 932:if(45===ke.charCodeAt(4))switch(ke.charCodeAt(5)){case 103:return"-webkit-box-"+ke.replace("-grow","")+"-webkit-"+ke+"-ms-"+ke.replace("grow","positive")+ke;case 115:return"-webkit-"+ke+"-ms-"+ke.replace("shrink","negative")+ke;case 98:return"-webkit-"+ke+"-ms-"+ke.replace("basis","preferred-size")+ke}return"-webkit-"+ke+"-ms-"+ke+ke;case 964:return"-webkit-"+ke+"-ms-flex-"+ke+ke;case 1023:if(99!==ke.charCodeAt(8))break;return"-webkit-box-pack"+(Ve=ke.substring(ke.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+ke+"-ms-flex-pack"+Ve+ke;case 1005:return P.test(ke)?ke.replace(L,":-webkit-")+ke.replace(L,":-moz-")+ke:ke;case 1e3:switch(Se=(Ve=ke.substring(13).trim()).indexOf("-")+1,Ve.charCodeAt(0)+Ve.charCodeAt(Se)){case 226:Ve=ke.replace(H,"tb");break;case 232:Ve=ke.replace(H,"tb-rl");break;case 220:Ve=ke.replace(H,"lr");break;default:return ke}return"-webkit-"+ke+"-ms-"+Ve+ke;case 1017:if(-1===ke.indexOf("sticky",9))break;case 975:switch(Se=(ke=Re).length-10,at=(Ve=(33===ke.charCodeAt(Se)?ke.substring(0,Se):ke).substring(Re.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|Ve.charCodeAt(7))){case 203:if(111>Ve.charCodeAt(8))break;case 115:ke=ke.replace(Ve,"-webkit-"+Ve)+";"+ke;break;case 207:case 102:ke=ke.replace(Ve,"-webkit-"+(102<at?"inline-":"")+"box")+";"+ke.replace(Ve,"-webkit-"+Ve)+";"+ke.replace(Ve,"-ms-"+Ve+"box")+";"+ke}return ke+";";case 938:if(45===ke.charCodeAt(5))switch(ke.charCodeAt(6)){case 105:return Ve=ke.replace("-items",""),"-webkit-"+ke+"-webkit-box-"+Ve+"-ms-flex-"+Ve+ke;case 115:return"-webkit-"+ke+"-ms-flex-item-"+ke.replace(le,"")+ke;default:return"-webkit-"+ke+"-ms-flex-line-pack"+ke.replace("align-content","").replace(le,"")+ke}break;case 973:case 989:if(45!==ke.charCodeAt(3)||122===ke.charCodeAt(4))break;case 931:case 953:if(!0===B.test(Re))return 115===(Ve=Re.substring(Re.indexOf(":")+1)).charCodeAt(0)?f(Re.replace("stretch","fill-available"),Se,Fe,$e).replace(":fill-available",":stretch"):ke.replace(Ve,"-webkit-"+Ve)+ke.replace(Ve,"-moz-"+Ve.replace("fill-",""))+ke;break;case 962:if(ke="-webkit-"+ke+(102===ke.charCodeAt(5)?"-ms-"+ke:"")+ke,Fe+$e===211&&105===ke.charCodeAt(13)&&0<ke.indexOf("transform",10))return ke.substring(0,ke.indexOf(";",27)+1).replace(N,"$1-webkit-$2")+ke}return ke}function v(Re,Se){var Fe=Re.indexOf(1===Se?":":"{"),$e=Re.substring(0,3!==Se?Fe:10);return Fe=Re.substring(Fe+1,Re.length-1),de(2!==Se?$e:$e.replace(z,"$1"),Fe,Se)}function y(Re,Se){var Fe=f(Se,Se.charCodeAt(0),Se.charCodeAt(1),Se.charCodeAt(2));return Fe!==Se+";"?Fe.replace(K," or ($1)").substring(4):"("+Se+")"}function E(Re,Se,Fe,$e,ke,at,Ve,gt,It,Bt){for(var D,$=0,q=Se;$<ne;++$)switch(D=pe[$].call(p,Re,q,Fe,$e,ke,at,Ve,gt,It,Bt)){case void 0:case!1:case!0:case null:break;default:q=D}if(q!==Se)return q}function R(Re){return void 0!==(Re=Re.prefix)&&(de=null,Re?"function"!=typeof Re?we=1:(we=2,de=Re):we=0),R}function p(Re,Se){var Fe=Re;if(33>Fe.charCodeAt(0)&&(Fe=Fe.trim()),Fe=[Fe],0<ne){var $e=E(-1,Se,Fe,Fe,Me,xe,0,0,0,0);void 0!==$e&&"string"==typeof $e&&(Se=$e)}var ke=m(oe,Fe,Se,0,0);return 0<ne&&void 0!==($e=E(-2,ke,Fe,Fe,Me,xe,ke.length,0,0,0))&&(ke=$e),Oe=0,xe=Me=1,ke}var d=/^\0+/g,O=/[\0\r\f]/g,L=/: */g,P=/zoo|gra/,N=/([,: ])(transform)/g,M=/,\r+?/g,V=/([\t\r\n ])*\f?&/g,Z=/@(k\w+)\s*(\S*)\s*/,x=/::(place)/g,W=/:(read-only)/g,H=/[svh]\w+-[tblr]{2}/,J=/\(\s*(.*)\s*\)/g,K=/([\s\S]*?);/g,le=/-self|flex-/g,z=/[^]*?(:[rp][el]a[\w-]+)[^]*/,B=/stretch|:\s*\w+\-(?:conte|avail)/,ie=/([^-])(image-set\()/,xe=1,Me=1,Oe=0,we=1,oe=[],pe=[],ne=0,de=null,ve=0;return p.use=function Re(Se){switch(Se){case void 0:case null:ne=pe.length=0;break;default:if("function"==typeof Se)pe[ne++]=Se;else if("object"==typeof Se)for(var Fe=0,$e=Se.length;Fe<$e;++Fe)Re(Se[Fe]);else ve=0|!!Se}return Re},p.set=R,void 0!==_&&R(_),p}!function(_){_.exports=function(){if(h_)return pr;h_=1;var m="function"==typeof Symbol&&Symbol.for,h=m?Symbol.for("react.element"):60103,c=m?Symbol.for("react.portal"):60106,f=m?Symbol.for("react.fragment"):60107,v=m?Symbol.for("react.strict_mode"):60108,y=m?Symbol.for("react.profiler"):60114,E=m?Symbol.for("react.provider"):60109,R=m?Symbol.for("react.context"):60110,p=m?Symbol.for("react.async_mode"):60111,d=m?Symbol.for("react.concurrent_mode"):60111,O=m?Symbol.for("react.forward_ref"):60112,L=m?Symbol.for("react.suspense"):60113,P=m?Symbol.for("react.suspense_list"):60120,N=m?Symbol.for("react.memo"):60115,M=m?Symbol.for("react.lazy"):60116,V=m?Symbol.for("react.block"):60121,Z=m?Symbol.for("react.fundamental"):60117,x=m?Symbol.for("react.responder"):60118,W=m?Symbol.for("react.scope"):60119;function H(K){if("object"==typeof K&&null!==K){var le=K.$$typeof;switch(le){case h:switch(K=K.type){case p:case d:case f:case y:case v:case L:return K;default:switch(K=K&&K.$$typeof){case R:case O:case M:case N:case E:return K;default:return le}}case c:return le}}}function J(K){return H(K)===d}return pr.AsyncMode=p,pr.ConcurrentMode=d,pr.ContextConsumer=R,pr.ContextProvider=E,pr.Element=h,pr.ForwardRef=O,pr.Fragment=f,pr.Lazy=M,pr.Memo=N,pr.Portal=c,pr.Profiler=y,pr.StrictMode=v,pr.Suspense=L,pr.isAsyncMode=function(K){return J(K)||H(K)===p},pr.isConcurrentMode=J,pr.isContextConsumer=function(K){return H(K)===R},pr.isContextProvider=function(K){return H(K)===E},pr.isElement=function(K){return"object"==typeof K&&null!==K&&K.$$typeof===h},pr.isForwardRef=function(K){return H(K)===O},pr.isFragment=function(K){return H(K)===f},pr.isLazy=function(K){return H(K)===M},pr.isMemo=function(K){return H(K)===N},pr.isPortal=function(K){return H(K)===c},pr.isProfiler=function(K){return H(K)===y},pr.isStrictMode=function(K){return H(K)===v},pr.isSuspense=function(K){return H(K)===L},pr.isValidElementType=function(K){return"string"==typeof K||"function"==typeof K||K===f||K===d||K===y||K===v||K===L||K===P||"object"==typeof K&&null!==K&&(K.$$typeof===M||K.$$typeof===N||K.$$typeof===E||K.$$typeof===R||K.$$typeof===O||K.$$typeof===Z||K.$$typeof===x||K.$$typeof===W||K.$$typeof===V)},pr.typeOf=H,pr}()}(Bp);var E3={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var O3=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,p_=function(_){var m=Object.create(null);return function(h){return void 0===m[h]&&(m[h]=_(h)),m[h]}}(function(_){return O3.test(_)||111===_.charCodeAt(0)&&110===_.charCodeAt(1)&&_.charCodeAt(2)<91}),X1=Bp.exports,x3={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},R3={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},g_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Z1={};function y_(_){return X1.isMemo(_)?g_:Z1[_.$$typeof]||x3}Z1[X1.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Z1[X1.Memo]=g_;var I3=Object.defineProperty,C3=Object.getOwnPropertyNames,m_=Object.getOwnPropertySymbols,P3=Object.getOwnPropertyDescriptor,k3=Object.getPrototypeOf,v_=Object.prototype,N3=function _(m,h,c){if("string"!=typeof h){if(v_){var f=k3(h);f&&f!==v_&&_(m,f,c)}var v=C3(h);m_&&(v=v.concat(m_(h)));for(var y=y_(m),E=y_(h),R=0;R<v.length;++R){var p=v[R];if(!(R3[p]||c&&c[p]||E&&E[p]||y&&y[p])){var d=P3(h,p);try{I3(m,p,d)}catch{}}}}return m};function Ka(){return(Ka=Object.assign||function(_){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var c in h)Object.prototype.hasOwnProperty.call(h,c)&&(_[c]=h[c])}return _}).apply(this,arguments)}var __=function(_,m){for(var h=[_[0]],c=0,f=m.length;c<f;c+=1)h.push(m[c],_[c+1]);return h},ey=function(_){return null!==_&&"object"==typeof _&&"[object Object]"===(_.toString?_.toString():Object.prototype.toString.call(_))&&!Bp.exports.typeOf(_)},Fp=Object.freeze([]),Du=Object.freeze({});function wd(_){return"function"==typeof _}function b_(_){return _.displayName||_.name||"Component"}function ty(_){return _&&"string"==typeof _.styledComponentId}var Wl="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ny="undefined"!=typeof window&&"HTMLElement"in window,A3=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY));function Ed(_){for(var m=arguments.length,h=new Array(m>1?m-1:0),c=1;c<m;c++)h[c-1]=arguments[c];throw new Error("An error occurred. See https://git.io/JUIaE#"+_+" for more information."+(h.length>0?" Args: "+h.join(", "):""))}var T3=function(){function _(h){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=h}var m=_.prototype;return m.indexOfGroup=function(h){for(var c=0,f=0;f<h;f++)c+=this.groupSizes[f];return c},m.insertRules=function(h,c){if(h>=this.groupSizes.length){for(var f=this.groupSizes,v=f.length,y=v;h>=y;)(y<<=1)<0&&Ed(16,""+h);this.groupSizes=new Uint32Array(y),this.groupSizes.set(f),this.length=y;for(var E=v;E<y;E++)this.groupSizes[E]=0}for(var R=this.indexOfGroup(h+1),p=0,d=c.length;p<d;p++)this.tag.insertRule(R,c[p])&&(this.groupSizes[h]++,R++)},m.clearGroup=function(h){if(h<this.length){var c=this.groupSizes[h],f=this.indexOfGroup(h),v=f+c;this.groupSizes[h]=0;for(var y=f;y<v;y++)this.tag.deleteRule(f)}},m.getGroup=function(h){var c="";if(h>=this.length||0===this.groupSizes[h])return c;for(var f=this.groupSizes[h],v=this.indexOfGroup(h),y=v+f,E=v;E<y;E++)c+=this.tag.getRule(E)+"/*!sc*/\n";return c},_}(),Hp=new Map,qp=new Map,Sd=1,$p=function(_){if(Hp.has(_))return Hp.get(_);for(;qp.has(Sd);)Sd++;var m=Sd++;return Hp.set(_,m),qp.set(m,_),m},M3=function(_){return qp.get(_)},L3=function(_,m){m>=Sd&&(Sd=m+1),Hp.set(_,m),qp.set(m,_)},U3="style["+Wl+'][data-styled-version="5.3.11"]',D3=new RegExp("^"+Wl+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),j3=function(_,m,h){for(var c,f=h.split(","),v=0,y=f.length;v<y;v++)(c=f[v])&&_.registerName(m,c)},z3=function(_,m){for(var h=(m.textContent||"").split("/*!sc*/\n"),c=[],f=0,v=h.length;f<v;f++){var y=h[f].trim();if(y){var E=y.match(D3);if(E){var R=0|parseInt(E[1],10),p=E[2];0!==R&&(L3(p,R),j3(_,p,E[3]),_.getTag().insertRules(R,c)),c.length=0}else c.push(y)}}},w_=function(_){var m=document.head,h=_||m,c=document.createElement("style"),f=function(E){for(var R=E.childNodes,p=R.length;p>=0;p--){var d=R[p];if(d&&1===d.nodeType&&d.hasAttribute(Wl))return d}}(h),v=void 0!==f?f.nextSibling:null;c.setAttribute(Wl,"active"),c.setAttribute("data-styled-version","5.3.11");var y=s_.nc;return y&&c.setAttribute("nonce",y),h.insertBefore(c,v),c},B3=function(){function _(h){var c=this.element=w_(h);c.appendChild(document.createTextNode("")),this.sheet=function(f){if(f.sheet)return f.sheet;for(var v=document.styleSheets,y=0,E=v.length;y<E;y++){var R=v[y];if(R.ownerNode===f)return R}Ed(17)}(c),this.length=0}var m=_.prototype;return m.insertRule=function(h,c){try{return this.sheet.insertRule(c,h),this.length++,!0}catch{return!1}},m.deleteRule=function(h){this.sheet.deleteRule(h),this.length--},m.getRule=function(h){var c=this.sheet.cssRules[h];return void 0!==c&&"string"==typeof c.cssText?c.cssText:""},_}(),F3=function(){function _(h){var c=this.element=w_(h);this.nodes=c.childNodes,this.length=0}var m=_.prototype;return m.insertRule=function(h,c){if(h<=this.length&&h>=0){var f=document.createTextNode(c);return this.element.insertBefore(f,this.nodes[h]||null),this.length++,!0}return!1},m.deleteRule=function(h){this.element.removeChild(this.nodes[h]),this.length--},m.getRule=function(h){return h<this.length?this.nodes[h].textContent:""},_}(),H3=function(){function _(h){this.rules=[],this.length=0}var m=_.prototype;return m.insertRule=function(h,c){return h<=this.length&&(this.rules.splice(h,0,c),this.length++,!0)},m.deleteRule=function(h){this.rules.splice(h,1),this.length--},m.getRule=function(h){return h<this.length?this.rules[h]:""},_}(),E_=ny,q3={isServer:!ny,useCSSOMInjection:!A3},S_=function(){function _(h,c,f){void 0===h&&(h=Du),void 0===c&&(c={}),this.options=Ka({},q3,{},h),this.gs=c,this.names=new Map(f),this.server=!!h.isServer,!this.server&&ny&&E_&&(E_=!1,function(v){for(var y=document.querySelectorAll(U3),E=0,R=y.length;E<R;E++){var p=y[E];p&&"active"!==p.getAttribute(Wl)&&(z3(v,p),p.parentNode&&p.parentNode.removeChild(p))}}(this))}_.registerId=function(h){return $p(h)};var m=_.prototype;return m.reconstructWithOptions=function(h,c){return void 0===c&&(c=!0),new _(Ka({},this.options,{},h),this.gs,c&&this.names||void 0)},m.allocateGSInstance=function(h){return this.gs[h]=(this.gs[h]||0)+1},m.getTag=function(){return this.tag||(this.tag=(f=(c=this.options).isServer,v=c.useCSSOMInjection,y=c.target,h=f?new H3(y):v?new B3(y):new F3(y),new T3(h)));var h,c,f,v,y},m.hasNameForId=function(h,c){return this.names.has(h)&&this.names.get(h).has(c)},m.registerName=function(h,c){if($p(h),this.names.has(h))this.names.get(h).add(c);else{var f=new Set;f.add(c),this.names.set(h,f)}},m.insertRules=function(h,c,f){this.registerName(h,c),this.getTag().insertRules($p(h),f)},m.clearNames=function(h){this.names.has(h)&&this.names.get(h).clear()},m.clearRules=function(h){this.getTag().clearGroup($p(h)),this.clearNames(h)},m.clearTag=function(){this.tag=void 0},m.toString=function(){return function(h){for(var c=h.getTag(),f=c.length,v="",y=0;y<f;y++){var E=M3(y);if(void 0!==E){var R=h.names.get(E),p=c.getGroup(y);if(R&&p&&R.size){var d=Wl+".g"+y+'[id="'+E+'"]',O="";void 0!==R&&R.forEach(function(L){L.length>0&&(O+=L+",")}),v+=""+p+d+'{content:"'+O+'"}/*!sc*/\n'}}}return v}(this)},_}(),$3=/(a)(d)/gi,O_=function(_){return String.fromCharCode(_+(_>25?39:97))};function ry(_){var m,h="";for(m=Math.abs(_);m>52;m=m/52|0)h=O_(m%52)+h;return(O_(m%52)+h).replace($3,"$1-$2")}var Kl=function(_,m){for(var h=m.length;h;)_=33*_^m.charCodeAt(--h);return _},x_=function(_){return Kl(5381,_)},V3=x_("5.3.11"),W3=function(){function _(m,h,c){this.rules=m,this.staticRulesId="",this.isStatic=(void 0===c||c.isStatic)&&function(f){for(var v=0;v<f.length;v+=1){var y=f[v];if(wd(y)&&!ty(y))return!1}return!0}(m),this.componentId=h,this.baseHash=Kl(V3,h),this.baseStyle=c,S_.registerId(h)}return _.prototype.generateAndInjectStyles=function(m,h,c){var f=this.componentId,v=[];if(this.baseStyle&&v.push(this.baseStyle.generateAndInjectStyles(m,h,c)),this.isStatic&&!c.hash)if(this.staticRulesId&&h.hasNameForId(f,this.staticRulesId))v.push(this.staticRulesId);else{var y=Gl(this.rules,m,h,c).join(""),E=ry(Kl(this.baseHash,y)>>>0);if(!h.hasNameForId(f,E)){var R=c(y,"."+E,void 0,f);h.insertRules(f,E,R)}v.push(E),this.staticRulesId=E}else{for(var p=this.rules.length,d=Kl(this.baseHash,c.hash),O="",L=0;L<p;L++){var P=this.rules[L];if("string"==typeof P)O+=P;else if(P){var N=Gl(P,m,h,c),M=Array.isArray(N)?N.join(""):N;d=Kl(d,M+L),O+=M}}if(O){var V=ry(d>>>0);if(!h.hasNameForId(f,V)){var Z=c(O,"."+V,void 0,f);h.insertRules(f,V,Z)}v.push(V)}}return v.join(" ")},_}(),K3=/^\s*\/\/.*$/gm,G3=[":","[",".","#"],R_=Uu.createContext(),I_=Uu.createContext(),Y3=new S_,iy=function(_){var m,h,c,f,y=Du.options,R=Du.plugins,p=void 0===R?Fp:R,d=new w3(void 0===y?Du:y),O=[],L=function(M){function V(Z){if(Z)try{M(Z+"}")}catch{}}return function(Z,x,W,H,J,K,le,z,B,ie){switch(Z){case 1:if(0===B&&64===x.charCodeAt(0))return M(x+";"),"";break;case 2:if(0===z)return x+"/*|*/";break;case 3:switch(z){case 102:case 112:return M(W[0]+x),"";default:return x+(0===ie?"/*|*/":"")}case-2:x.split("/*|*/}").forEach(V)}}}(function(M){O.push(M)}),P=function(M,V,Z){return 0===V&&-1!==G3.indexOf(Z[h.length])||Z.match(f)?M:"."+m};function N(M,V,Z,x){void 0===x&&(x="&");var W=M.replace(K3,""),H=V&&Z?Z+" "+V+" { "+W+" }":W;return m=x,h=V,c=new RegExp("\\"+h+"\\b","g"),f=new RegExp("(\\"+h+"\\b){2,}"),d(Z||!V?"":V,H)}return d.use([].concat(p,[function(M,V,Z){2===M&&Z.length&&Z[0].lastIndexOf(h)>0&&(Z[0]=Z[0].replace(c,P))},L,function(M){if(-2===M){var V=O;return O=[],V}}])),N.hash=p.length?p.reduce(function(M,V){return V.name||Ed(15),Kl(M,V.name)},5381).toString():"",N}(),Q3=function(){function _(m,h){var c=this;this.inject=function(f,v){void 0===v&&(v=iy);var y=c.name+v.hash;f.hasNameForId(c.id,y)||f.insertRules(c.id,y,v(c.rules,y,"@keyframes"))},this.toString=function(){return Ed(12,String(c.name))},this.name=m,this.id="sc-keyframes-"+m,this.rules=h}return _.prototype.getName=function(m){return void 0===m&&(m=iy),this.name+m.hash},_}(),J3=/([A-Z])/,X3=/([A-Z])/g,Z3=/^ms-/,e5=function(_){return"-"+_.toLowerCase()};function C_(_){return J3.test(_)?_.replace(X3,e5).replace(Z3,"-ms-"):_}var P_=function(_){return null==_||!1===_||""===_};function Gl(_,m,h,c){if(Array.isArray(_)){for(var f,v=[],y=0,E=_.length;y<E;y+=1)""!==(f=Gl(_[y],m,h,c))&&(Array.isArray(f)?v.push.apply(v,f):v.push(f));return v}return P_(_)?"":ty(_)?"."+_.styledComponentId:wd(_)?"function"!=typeof(R=_)||R.prototype&&R.prototype.isReactComponent||!m?_:Gl(_(m),m,h,c):_ instanceof Q3?h?(_.inject(h,c),_.getName(c)):_:ey(_)?function p(d,O){var L,P,N=[];for(var M in d)d.hasOwnProperty(M)&&!P_(d[M])&&(Array.isArray(d[M])&&d[M].isCss||wd(d[M])?N.push(C_(M)+":",d[M],";"):ey(d[M])?N.push.apply(N,p(d[M],M)):N.push(C_(M)+": "+(L=M,(null==(P=d[M])||"boolean"==typeof P||""===P?"":"number"!=typeof P||0===P||L in E3||L.startsWith("--")?String(P).trim():P+"px")+";")));return O?[O+" {"].concat(N,["}"]):N}(_):_.toString();var R}var k_=function(_){return Array.isArray(_)&&(_.isCss=!0),_};function Qc(_){for(var m=arguments.length,h=new Array(m>1?m-1:0),c=1;c<m;c++)h[c-1]=arguments[c];return wd(_)||ey(_)?k_(Gl(__(Fp,[_].concat(h)))):0===h.length&&1===_.length&&"string"==typeof _[0]?_:k_(Gl(__(_,h)))}var t5=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,n5=/(^-|-$)/g;function oy(_){return _.replace(t5,"-").replace(n5,"")}function Vp(_){return"string"==typeof _&&!0}var sy=function(_){return"function"==typeof _||"object"==typeof _&&null!==_&&!Array.isArray(_)},r5=function(_){return"__proto__"!==_&&"constructor"!==_&&"prototype"!==_};function i5(_,m,h){var c=_[h];sy(m)&&sy(c)?N_(c,m):_[h]=m}function N_(_){for(var m=arguments.length,h=new Array(m>1?m-1:0),c=1;c<m;c++)h[c-1]=arguments[c];for(var f=0,v=h;f<v.length;f++){var y=v[f];if(sy(y))for(var E in y)r5(E)&&i5(_,y[E],E)}return _}var A_=Uu.createContext(),ay={};function T_(_,m,h){var x,c=ty(_),f=!Vp(_),v=m.attrs,y=void 0===v?Fp:v,E=m.componentId,R=void 0===E?function(x,W){var H="string"!=typeof x?"sc":oy(x);ay[H]=(ay[H]||0)+1;var J=H+"-"+ry(x_("5.3.11"+H+ay[H])>>>0);return W?W+"-"+J:J}(m.displayName,m.parentComponentId):E,p=m.displayName,d=void 0===p?Vp(x=_)?"styled."+x:"Styled("+b_(x)+")":p,O=m.displayName&&m.componentId?oy(m.displayName)+"-"+m.componentId:m.componentId||R,L=c&&_.attrs?Array.prototype.concat(_.attrs,y).filter(Boolean):y,P=m.shouldForwardProp;c&&_.shouldForwardProp&&(P=m.shouldForwardProp?function(x,W,H){return _.shouldForwardProp(x,W,H)&&m.shouldForwardProp(x,W,H)}:_.shouldForwardProp);var N,M=new W3(h,O,c?_.componentStyle:void 0),V=M.isStatic&&0===y.length,Z=function(x,W){return function(H,J,K,le){var at,Ve,gt,z=H.attrs,B=H.componentStyle,ie=H.defaultProps,xe=H.foldedComponentIds,Me=H.shouldForwardProp,Oe=H.styledComponentId,we=H.target,oe=function(at,Ve,gt){void 0===at&&(at=Du);var It=Ka({},Ve,{theme:at}),Bt={};return gt.forEach(function(D){var $,q,Ee,Le=D;for($ in wd(Le)&&(Le=Le(It)),Le)It[$]=Bt[$]="className"===$?(Ee=Le[$],(q=Bt[$])&&Ee?q+" "+Ee:q||Ee):Le[$]}),[It,Bt]}((at=J,Ve=Po.exports.useContext(A_),void 0===(gt=ie)&&(gt=Du),at.theme!==gt.theme&&at.theme||Ve||gt.theme||Du),J,z),ne=oe[1],de=function(at,Ve,gt,It){var Bt=Po.exports.useContext(R_)||Y3,D=Po.exports.useContext(I_)||iy;return at.generateAndInjectStyles(Ve?Du:gt,Bt,D)}(B,le,oe[0]),ve=K,Re=ne.$as||J.$as||ne.as||J.as||we,Se=Vp(Re),Fe=ne!==J?Ka({},J,{},ne):J,$e={};for(var ke in Fe)"$"!==ke[0]&&"as"!==ke&&("forwardedAs"===ke?$e.as=Fe[ke]:(Me?Me(ke,p_,Re):!Se||p_(ke))&&($e[ke]=Fe[ke]));return J.style&&ne.style!==J.style&&($e.style=Ka({},J.style,{},ne.style)),$e.className=Array.prototype.concat(xe,Oe,de!==Oe?de:null,J.className,ne.className).filter(Boolean).join(" "),$e.ref=ve,Po.exports.createElement(Re,$e)}(N,x,W,V)};return Z.displayName=d,(N=Uu.forwardRef(Z)).attrs=L,N.componentStyle=M,N.displayName=d,N.shouldForwardProp=P,N.foldedComponentIds=c?Array.prototype.concat(_.foldedComponentIds,_.styledComponentId):Fp,N.styledComponentId=O,N.target=c?_.target:_,N.withComponent=function(x){var W=m.componentId,H=function(K,le){if(null==K)return{};var z,B,ie={},xe=Object.keys(K);for(B=0;B<xe.length;B++)le.indexOf(z=xe[B])>=0||(ie[z]=K[z]);return ie}(m,["componentId"]),J=W&&W+"-"+(Vp(x)?x:oy(b_(x)));return T_(x,Ka({},H,{attrs:L,componentId:J}),h)},Object.defineProperty(N,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(x){this._foldedDefaultProps=c?N_({},_.defaultProps,x):x}}),Object.defineProperty(N,"toString",{value:function(){return"."+N.styledComponentId}}),f&&N3(N,_,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),N}var Ti=function(_){return function m(h,c,f){if(void 0===f&&(f=Du),!Bp.exports.isValidElementType(c))return Ed(1,String(c));var v=function(){return h(c,f,Qc.apply(void 0,arguments))};return v.withConfig=function(y){return m(h,c,Ka({},f,{},y))},v.attrs=function(y){return m(h,c,Ka({},f,{attrs:Array.prototype.concat(f.attrs,y).filter(Boolean)}))},v}(T_,_)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(_){Ti[_]=Ti(_)});const o5=Ti.div`
z-index: 998;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.6);
transition: opacity .25s;
`,M_="only screen and (min-width: 640px)",L_="only screen and (max-height: 640px)",uy="1.2rem",s5=Ti.div`
z-index: 999;
position: fixed;
top: 0px;
left: 0px;
width: 100vw;
height: 100%;
font: 14px inter, sans-serif;
font-family: "Segoe UI", Helvetica, Arial, sans-serif;
font-feature-settings: "kern";
text-align: left !important;
display: flex;
flex-direction: column;
justify-content: end;
align-items: center;
@media ${M_} {
justify-content: start;
align-items: end;
}
`,a5=Ti.div`
position: relative;
bottom: 0px;
left: 0px;
width: 100%;
border-radius: ${uy} ${uy} 0 0;
background: #131214;
transform: scale(1);
transition: opacity .25s,transform .25s;
@media ${M_} {
max-width: 340px;
margin: auto;
border-radius: ${uy};
}
`,u5=Ti.button`
box-sizing: border-box;
margin: 0.2rem 0.2rem 0 0;
border: none;
padding: 0;
width: 18px;
height: 18px;
background: transparent;
outline: none;
cursor: pointer;
& > img {
width: 18px;
height: 18px;
}
`,Od="15px",c5=Ti.div`
display: flex;
flex: 1;
flex-direction: row;
justify-content: space-between;
padding: ${Od};
padding-bottom: 0.9rem;
`,cy=Ti.div`
margin-bottom: ${Od};
border-top: 1px solid #2b2a2b;
padding: ${Od} ${Od} 0 ${Od};
color: #C3C3C3;
${({textAlign:_})=>_&&Qc`
text-align: ${_};
`}
`,ly=Ti.h2`
color: #fff;
margin: 0;
line-height: 28px;
font-size: 24px;
font-weight: 600;
@media ${L_} {
font-size: 18px;
}
`;Ti.h3`
color: #fff;
margin: 0;
font-size: 20px;
font-weight: 500;
line-height: 24px;
`;const xd=Ti.p`
${({noMargin:_})=>_?Qc`
margin: 0;
`:"\n margin: 12px 0 0 0;\n "}
font-size: 14px;
font-weight: 500;
line-height: 20px;
`,fy=Ti.button`
width: 100%;
${({extraMargin:_})=>_?Qc`
margin: 2rem 0 1.2rem 0;
`:Qc`
margin-top: 1.2rem;
`}
border-radius: 3rem;
padding: 0.8rem 1rem;
font-size: 14px;
font-weight: 600;
line-height: 17px;
transition: all .5s ease;
cursor: pointer;
${({variant:_})=>"primary"==_?Qc`
border: none;
background-color: white;
color: #000;
&:hover, &:focus {
background-color: rgba(255, 255, 255, 0.8);
}
`:Qc`
border: 1px solid #565656;
background-color: transparent;
color: #fff;
&:hover {
background-color: rgba(255, 255, 255, 0.05);
}
`}
`,l5=Ti.a`
color: #BBB0FF;
cursor: pointer;
`;let Yl=_=>{};const dy=({onClose:_,children:m})=>{const[h,c]=Po.exports.useState(!0);Yl=c;const f=()=>{Yl(!1),_&&_()};return h?pn.exports.jsxs(pn.exports.Fragment,{children:[pn.exports.jsx(o5,{}),pn.exports.jsx(s5,Object.assign({id:"ModalWrapper",onClick:y=>{var E;"ModalWrapper"===(null===(E=null==y?void 0:y.target)||void 0===E?void 0:E.id)&&f()}},{children:pn.exports.jsxs(a5,{children:[pn.exports.jsxs(c5,{children:[pn.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='72' height='24' viewBox='0 0 72 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M61.3616 22.4887V23.9996H71.7318V17.1853H70.2208V22.4887H61.3616ZM61.3616 0V1.51096H70.2208V6.81473H71.7318V0H61.3616ZM56.0137 11.689V8.17796H58.3842C59.5398 8.17796 59.9546 8.56305 59.9546 9.61506V10.2372C59.9546 11.3186 59.5545 11.689 58.3842 11.689H56.0137ZM59.7764 12.311C60.8578 12.0296 61.6133 11.022 61.6133 9.82231C61.6133 9.06683 61.3172 8.38521 60.7542 7.83698C60.0432 7.15536 59.0948 6.81473 57.8653 6.81473H54.5322V17.1849H56.0137V13.0518H58.2361C59.3767 13.0518 59.836 13.5258 59.836 14.7112V17.1853H61.3469V14.9482C61.3469 13.3186 60.9618 12.6965 59.7764 12.5187V12.311ZM47.303 12.6517H51.866V11.2888H47.303V8.17761H52.3102V6.81473H45.7916V17.1849H52.5325V15.822H47.303V12.6517ZM42.3398 13.1999V13.9109C42.3398 15.4072 41.7916 15.8963 40.414 15.8963H40.0881C38.7102 15.8963 38.0436 15.4516 38.0436 13.3925V10.6072C38.0436 8.53329 38.7399 8.10338 40.1175 8.10338H40.4137C41.7618 8.10338 42.1914 8.60716 42.2061 9.99979H43.8357C43.6876 7.9553 42.3248 6.66665 40.2803 6.66665C39.2878 6.66665 38.4581 6.97787 37.836 7.57021C36.9027 8.44437 36.3842 9.92593 36.3842 11.9998C36.3842 13.9999 36.8288 15.4814 37.7471 16.3997C38.3692 17.0071 39.2286 17.333 40.073 17.333C40.9619 17.333 41.7769 16.9773 42.1914 16.2071H42.3986V17.1849H43.7615V11.837H39.7467V13.1999H42.3398ZM29.2737 8.17761H30.8886C32.4146 8.17761 33.2443 8.5627 33.2443 10.6369V13.3627C33.2443 15.4366 32.4146 15.822 30.8886 15.822H29.2737V8.17761ZM31.0216 17.1853C33.8513 17.1853 34.903 15.0372 34.903 12.0002C34.903 8.91874 33.7771 6.81509 30.9919 6.81509H27.7917V17.1853H31.0216ZM20.6367 12.6517H25.1997V11.2888H20.6367V8.17761H25.644V6.81473H19.1254V17.1849H25.8663V15.822H20.6367V12.6517ZM11.8962 6.81473H10.3852V17.1849H17.2V15.822H11.8962V6.81473ZM0 17.1853V24H10.3702V22.4887H1.51096V17.1853H0ZM0 0V6.81473H1.51096V1.51096H10.3702V0H0Z' fill='white'/%3e%3c/svg%3e"}),pn.exports.jsx(u5,Object.assign({onClick:f},{children:pn.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M22 2L2 22' stroke='white' stroke-width='3'/%3e%3cpath d='M2 2L22 22' stroke='white' stroke-width='3'/%3e%3c/svg%3e"})}))]}),pn.exports.jsx(pn.exports.Fragment,{children:m})]})}))]}):null};var U_,D_,j_,z_,B_={exports:{}},ko={},F_={exports:{}},H_={};function d5(){if(j_)return ko;j_=1;var _=Po.exports,m=(D_||(D_=1,function(_){_.exports=(U_||(U_=1,function(m){function h(ve,Re){var Se=ve.length;ve.push(Re);e:for(;0<Se;){var Fe=Se-1>>>1,$e=ve[Fe];if(!(0<v($e,Re)))break e;ve[Fe]=Re,ve[Se]=$e,Se=Fe}}function c(ve){return 0===ve.length?null:ve[0]}function f(ve){if(0===ve.length)return null;var Re=ve[0],Se=ve.pop();if(Se!==Re){ve[0]=Se;e:for(var Fe=0,$e=ve.length,ke=$e>>>1;Fe<ke;){var at=2*(Fe+1)-1,Ve=ve[at],gt=at+1,It=ve[gt];if(0>v(Ve,Se))gt<$e&&0>v(It,Ve)?(ve[Fe]=It,ve[gt]=Se,Fe=gt):(ve[Fe]=Ve,ve[at]=Se,Fe=at);else{if(!(gt<$e&&0>v(It,Se)))break e;ve[Fe]=It,ve[gt]=Se,Fe=gt}}}return Re}function v(ve,Re){var Se=ve.sortIndex-Re.sortIndex;return 0!==Se?Se:ve.id-Re.id}if("object"==typeof performance&&"function"==typeof performance.now){var y=performance;m.unstable_now=function(){return y.now()}}else{var E=Date,R=E.now();m.unstable_now=function(){return E.now()-R}}var p=[],d=[],O=1,L=null,P=3,N=!1,M=!1,V=!1,Z="function"==typeof setTimeout?setTimeout:null,x="function"==typeof clearTimeout?clearTimeout:null,W="undefined"!=typeof setImmediate?setImmediate:null;function H(ve){for(var Re=c(d);null!==Re;){if(null===Re.callback)f(d);else{if(!(Re.startTime<=ve))break;f(d),Re.sortIndex=Re.expirationTime,h(p,Re)}Re=c(d)}}function J(ve){if(V=!1,H(ve),!M)if(null!==c(p))M=!0,ne(K);else{var Re=c(d);null!==Re&&de(J,Re.startTime-ve)}}function K(ve,Re){M=!1,V&&(V=!1,x(ie),ie=-1),N=!0;var Se=P;try{for(H(Re),L=c(p);null!==L&&(!(L.expirationTime>Re)||ve&&!Oe());){var Fe=L.callback;if("function"==typeof Fe){L.callback=null,P=L.priorityLevel;var $e=Fe(L.expirationTime<=Re);Re=m.unstable_now(),"function"==typeof $e?L.callback=$e:L===c(p)&&f(p),H(Re)}else f(p);L=c(p)}if(null!==L)var ke=!0;else{var at=c(d);null!==at&&de(J,at.startTime-Re),ke=!1}return ke}finally{L=null,P=Se,N=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var le,z=!1,B=null,ie=-1,xe=5,Me=-1;function Oe(){return!(m.unstable_now()-Me<xe)}function we(){if(null!==B){var ve=m.unstable_now();Me=ve;var Re=!0;try{Re=B(!0,ve)}finally{Re?le():(z=!1,B=null)}}else z=!1}if("function"==typeof W)le=function(){W(we)};else if("undefined"!=typeof MessageChannel){var oe=new MessageChannel,pe=oe.port2;oe.port1.onmessage=we,le=function(){pe.postMessage(null)}}else le=function(){Z(we,0)};function ne(ve){B=ve,z||(z=!0,le())}function de(ve,Re){ie=Z(function(){ve(m.unstable_now())},Re)}m.unstable_IdlePriority=5,m.unstable_ImmediatePriority=1,m.unstable_LowPriority=4,m.unstable_NormalPriority=3,m.unstable_Profiling=null,m.unstable_UserBlockingPriority=2,m.unstable_cancelCallback=function(ve){ve.callback=null},m.unstable_continueExecution=function(){M||N||(M=!0,ne(K))},m.unstable_forceFrameRate=function(ve){0>ve||125<ve?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xe=0<ve?Math.floor(1e3/ve):5},m.unstable_getCurrentPriorityLevel=function(){return P},m.unstable_getFirstCallbackNode=function(){return c(p)},m.unstable_next=function(ve){switch(P){case 1:case 2:case 3:var Re=3;break;default:Re=P}var Se=P;P=Re;try{return ve()}finally{P=Se}},m.unstable_pauseExecution=function(){},m.unstable_requestPaint=function(){},m.unstable_runWithPriority=function(ve,Re){switch(ve){case 1:case 2:case 3:case 4:case 5:break;default:ve=3}var Se=P;P=ve;try{return Re()}finally{P=Se}},m.unstable_scheduleCallback=function(ve,Re,Se){var Fe=m.unstable_now();switch(Se="object"==typeof Se&&null!==Se&&"number"==typeof(Se=Se.delay)&&0<Se?Fe+Se:Fe,ve){case 1:var $e=-1;break;case 2:$e=250;break;case 5:$e=1073741823;break;case 4:$e=1e4;break;default:$e=5e3}return ve={id:O++,callback:Re,priorityLevel:ve,startTime:Se,expirationTime:$e=Se+$e,sortIndex:-1},Se>Fe?(ve.sortIndex=Se,h(d,ve),null===c(p)&&ve===c(d)&&(V?(x(ie),ie=-1):V=!0,de(J,Se-Fe))):(ve.sortIndex=$e,h(p,ve),M||N||(M=!0,ne(K))),ve},m.unstable_shouldYield=Oe,m.unstable_wrapCallback=function(ve){var Re=P;return function(){var Se=P;P=Re;try{return ve.apply(this,arguments)}finally{P=Se}}}}(H_)),H_)}(F_)),F_.exports);function h(t){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+t,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+t+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=new Set,f={};function v(t,o){y(t,o),y(t+"Capture",o)}function y(t,o){for(f[t]=o,t=0;t<o.length;t++)c.add(o[t])}var E=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),R=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},O={};function L(t,o,l,w,C,U,X){this.acceptsBooleans=2===o||3===o||4===o,this.attributeName=w,this.attributeNamespace=C,this.mustUseProperty=l,this.propertyName=t,this.type=o,this.sanitizeURL=U,this.removeEmptyString=X}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){P[t]=new L(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var o=t[0];P[o]=new L(o,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){P[t]=new L(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){P[t]=new L(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){P[t]=new L(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){P[t]=new L(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){P[t]=new L(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){P[t]=new L(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){P[t]=new L(t,5,!1,t.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function M(t){return t[1].toUpperCase()}function V(t,o,l,w){var U,C=P.hasOwnProperty(o)?P[o]:null;(null!==C?0!==C.type:w||!(2<o.length)||"o"!==o[0]&&"O"!==o[0]||"n"!==o[1]&&"N"!==o[1])&&(function(U,X,_e,Ie){if(null==X||function(qe,et,st,nt){if(null!==st&&0===st.type)return!1;switch(typeof et){case"function":case"symbol":return!0;case"boolean":return!nt&&(null!==st?!st.acceptsBooleans:"data-"!==(qe=qe.toLowerCase().slice(0,5))&&"aria-"!==qe);default:return!1}}(U,X,_e,Ie))return!0;if(Ie)return!1;if(null!==_e)switch(_e.type){case 3:return!X;case 4:return!1===X;case 5:return isNaN(X);case 6:return isNaN(X)||1>X}return!1}(o,l,C,w)&&(l=null),w||null===C?(R.call(O,U=o)||!R.call(d,U)&&(p.test(U)?O[U]=!0:(d[U]=!0,0)))&&(null===l?t.removeAttribute(o):t.setAttribute(o,""+l)):C.mustUseProperty?t[C.propertyName]=null===l?3!==C.type&&"":l:(o=C.attributeName,w=C.attributeNamespace,null===l?t.removeAttribute(o):(l=3===(C=C.type)||4===C&&!0===l?"":""+l,w?t.setAttributeNS(w,o,l):t.setAttribute(o,l))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var o=t.replace(N,M);P[o]=new L(o,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var o=t.replace(N,M);P[o]=new L(o,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var o=t.replace(N,M);P[o]=new L(o,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){P[t]=new L(t,1,!1,t.toLowerCase(),null,!1,!1)}),P.xlinkHref=new L("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){P[t]=new L(t,1,!1,t.toLowerCase(),null,!0,!0)});var Z=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),W=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),le=Symbol.for("react.provider"),z=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),xe=Symbol.for("react.suspense_list"),Me=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),we=Symbol.for("react.offscreen"),oe=Symbol.iterator;function pe(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=oe&&t[oe]||t["@@iterator"])?t:null}var ne,de=Object.assign;function ve(t){if(void 0===ne)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);ne=o&&o[1]||""}return"\n"+ne+t}var Re=!1;function Se(t,o){if(!t||Re)return"";Re=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(o,[])}catch(qe){var w=qe}Reflect.construct(t,[],o)}else{try{o.call()}catch(qe){w=qe}t.call(o.prototype)}else{try{throw Error()}catch(qe){w=qe}t()}}catch(qe){if(qe&&w&&"string"==typeof qe.stack){for(var C=qe.stack.split("\n"),U=w.stack.split("\n"),X=C.length-1,_e=U.length-1;1<=X&&0<=_e&&C[X]!==U[_e];)_e--;for(;1<=X&&0<=_e;X--,_e--)if(C[X]!==U[_e]){if(1!==X||1!==_e)do{if(X--,0>--_e||C[X]!==U[_e]){var Ie="\n"+C[X].replace(" at new "," at ");return t.displayName&&Ie.includes("<anonymous>")&&(Ie=Ie.replace("<anonymous>",t.displayName)),Ie}}while(1<=X&&0<=_e);break}}}finally{Re=!1,Error.prepareStackTrace=l}return(t=t?t.displayName||t.name:"")?ve(t):""}function Fe(t){switch(t.tag){case 5:return ve(t.type);case 16:return ve("Lazy");case 13:return ve("Suspense");case 19:return ve("SuspenseList");case 0:case 2:case 15:return Se(t.type,!1);case 11:return Se(t.type.render,!1);case 1:return Se(t.type,!0);default:return""}}function $e(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case H:return"Fragment";case W:return"Portal";case K:return"Profiler";case J:return"StrictMode";case ie:return"Suspense";case xe:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case z:return(t.displayName||"Context")+".Consumer";case le:return(t._context.displayName||"Context")+".Provider";case B:var o=t.render;return(t=t.displayName)||(t=""!==(t=o.displayName||o.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case Me:return null!==(o=t.displayName||null)?o:$e(t.type)||"Memo";case Oe:o=t._payload,t=t._init;try{return $e(t(o))}catch{}}return null}function ke(t){var o=t.type;switch(t.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=(t=o.render).displayName||t.name||"",o.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $e(o);case 8:return o===J?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof o)return o.displayName||o.name||null;if("string"==typeof o)return o}return null}function at(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":case"object":return t;default:return""}}function Ve(t){var o=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===o||"radio"===o)}function gt(t){t._valueTracker||(t._valueTracker=function(o){var l=Ve(o)?"checked":"value",w=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),C=""+o[l];if(!o.hasOwnProperty(l)&&void 0!==w&&"function"==typeof w.get&&"function"==typeof w.set){var U=w.get,X=w.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return U.call(this)},set:function(_e){C=""+_e,X.call(this,_e)}}),Object.defineProperty(o,l,{enumerable:w.enumerable}),{getValue:function(){return C},setValue:function(_e){C=""+_e},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}(t))}function It(t){if(!t)return!1;var o=t._valueTracker;if(!o)return!0;var l=o.getValue(),w="";return t&&(w=Ve(t)?t.checked?"true":"false":t.value),(t=w)!==l&&(o.setValue(t),!0)}function Bt(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch{return t.body}}function D(t,o){return de({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o.checked??t._wrapperState.initialChecked})}function $(t,o){var l=o.defaultValue??"",w=null!=o.checked?o.checked:o.defaultChecked;l=at(null!=o.value?o.value:l),t._wrapperState={initialChecked:w,initialValue:l,controlled:"checkbox"===o.type||"radio"===o.type?null!=o.checked:null!=o.value}}function q(t,o){null!=(o=o.checked)&&V(t,"checked",o,!1)}function Ee(t,o){q(t,o);var l=at(o.value),w=o.type;if(null!=l)"number"===w?(0===l&&""===t.value||t.value!=l)&&(t.value=""+l):t.value!==""+l&&(t.value=""+l);else if("submit"===w||"reset"===w)return void t.removeAttribute("value");o.hasOwnProperty("value")?je(t,o.type,l):o.hasOwnProperty("defaultValue")&&je(t,o.type,at(o.defaultValue)),null==o.checked&&null!=o.defaultChecked&&(t.defaultChecked=!!o.defaultChecked)}function Le(t,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var w=o.type;if(("submit"===w||"reset"===w)&&null==o.value)return;o=""+t._wrapperState.initialValue,l||o===t.value||(t.value=o),t.defaultValue=o}""!==(l=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==l&&(t.name=l)}function je(t,o,l){"number"===o&&Bt(t.ownerDocument)===t||(null==l?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+l&&(t.defaultValue=""+l))}var ft=Array.isArray;function _t(t,o,l,w){if(t=t.options,o){o={};for(var C=0;C<l.length;C++)o["$"+l[C]]=!0;for(l=0;l<t.length;l++)C=o.hasOwnProperty("$"+t[l].value),t[l].selected!==C&&(t[l].selected=C),C&&w&&(t[l].defaultSelected=!0)}else{for(l=""+at(l),o=null,C=0;C<t.length;C++){if(t[C].value===l)return t[C].selected=!0,void(w&&(t[C].defaultSelected=!0));null!==o||t[C].disabled||(o=t[C])}null!==o&&(o.selected=!0)}}function Tt(t,o){if(null!=o.dangerouslySetInnerHTML)throw Error(h(91));return de({},o,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function tn(t,o){var l=o.value;if(null==l){if(l=o.children,o=o.defaultValue,null!=l){if(null!=o)throw Error(h(92));if(ft(l)){if(1<l.length)throw Error(h(93));l=l[0]}o=l}null==o&&(o=""),l=o}t._wrapperState={initialValue:at(l)}}function Mt(t,o){var l=at(o.value),w=at(o.defaultValue);null!=l&&((l=""+l)!==t.value&&(t.value=l),null==o.defaultValue&&t.defaultValue!==l&&(t.defaultValue=l)),null!=w&&(t.defaultValue=""+w)}function Cn(t){var o=t.textContent;o===t._wrapperState.initialValue&&""!==o&&null!==o&&(t.value=o)}function vn(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function At(t,o){return null==t||"http://www.w3.org/1999/xhtml"===t?vn(o):"http://www.w3.org/2000/svg"===t&&"foreignObject"===o?"http://www.w3.org/1999/xhtml":t}var Xt,Kn,dr=(Kn=function(t,o){if("http://www.w3.org/2000/svg"!==t.namespaceURI||"innerHTML"in t)t.innerHTML=o;else{for((Xt=Xt||document.createElement("div")).innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Xt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;o.firstChild;)t.appendChild(o.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,o,l,w){MSApp.execUnsafeLocalFunction(function(){return Kn(t,o)})}:Kn);function Vn(t,o){if(o){var l=t.firstChild;if(l&&l===t.lastChild&&3===l.nodeType)return void(l.nodeValue=o)}t.textContent=o}var Qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Br=["Webkit","ms","Moz","O"];function Er(t,o,l){return null==o||"boolean"==typeof o||""===o?"":l||"number"!=typeof o||0===o||Qn.hasOwnProperty(t)&&Qn[t]?(""+o).trim():o+"px"}function Ga(t,o){for(var l in t=t.style,o)if(o.hasOwnProperty(l)){var w=0===l.indexOf("--"),C=Er(l,o[l],w);"float"===l&&(l="cssFloat"),w?t.setProperty(l,C):t[l]=C}}Object.keys(Qn).forEach(function(t){Br.forEach(function(o){o=o+t.charAt(0).toUpperCase()+t.substring(1),Qn[o]=Qn[t]})});var Bu=de({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pa(t,o){if(o){if(Bu[t]&&(null!=o.children||null!=o.dangerouslySetInnerHTML))throw Error(h(137,t));if(null!=o.dangerouslySetInnerHTML){if(null!=o.children)throw Error(h(60));if("object"!=typeof o.dangerouslySetInnerHTML||!("__html"in o.dangerouslySetInnerHTML))throw Error(h(61))}if(null!=o.style&&"object"!=typeof o.style)throw Error(h(62))}}function cs(t,o){if(-1===t.indexOf("-"))return"string"==typeof o.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $o=null;function Ya(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var ga=null,Vo=null,Ji=null;function ya(t){if(t=ic(t)){if("function"!=typeof ga)throw Error(h(280));var o=t.stateNode;o&&(o=mf(o),ga(t.stateNode,t.type,o))}}function Ds(t){Vo?Ji?Ji.push(t):Ji=[t]:Vo=t}function Qa(){if(Vo){var t=Vo,o=Ji;if(Ji=Vo=null,ya(t),o)for(t=0;t<o.length;t++)ya(o[t])}}function lo(t,o){return t(o)}function js(){}var zs=!1;function fo(t,o,l){if(zs)return t(o,l);zs=!0;try{return lo(t,o,l)}finally{zs=!1,(null!==Vo||null!==Ji)&&(js(),Qa())}}function Wo(t,o){var l=t.stateNode;if(null===l)return null;var w=mf(l);if(null===w)return null;l=w[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(w=!w.disabled)||(w=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!w;break e;default:t=!1}if(t)return null;if(l&&"function"!=typeof l)throw Error(h(231,o,typeof l));return l}var ma=!1;if(E)try{var Bs={};Object.defineProperty(Bs,"passive",{get:function(){ma=!0}}),window.addEventListener("test",Bs,Bs),window.removeEventListener("test",Bs,Bs)}catch{ma=!1}function Fu(t,o,l,w,C,U,X,_e,Ie){var qe=Array.prototype.slice.call(arguments,3);try{o.apply(l,qe)}catch(et){this.onError(et)}}var ls=!1,Fs=null,va=!1,_a=null,Ko={onError:function(t){ls=!0,Fs=t}};function Ja(t,o,l,w,C,U,X,_e,Ie){ls=!1,Fs=null,Fu.apply(Ko,arguments)}function No(t){var o=t,l=t;if(t.alternate)for(;o.return;)o=o.return;else{t=o;do{0!=(4098&(o=t).flags)&&(l=o.return),t=o.return}while(t)}return 3===o.tag?l:null}function Go(t){if(13===t.tag){var o=t.memoizedState;if(null===o&&null!==(t=t.alternate)&&(o=t.memoizedState),null!==o)return o.dehydrated}return null}function Yo(t){if(No(t)!==t)throw Error(h(188))}function Hu(t){return null!==(t=function(o){var l=o.alternate;if(!l){if(null===(l=No(o)))throw Error(h(188));return l!==o?null:o}for(var w=o,C=l;;){var U=w.return;if(null===U)break;var X=U.alternate;if(null===X){if(null!==(C=U.return)){w=C;continue}break}if(U.child===X.child){for(X=U.child;X;){if(X===w)return Yo(U),o;if(X===C)return Yo(U),l;X=X.sibling}throw Error(h(188))}if(w.return!==C.return)w=U,C=X;else{for(var _e=!1,Ie=U.child;Ie;){if(Ie===w){_e=!0,w=U,C=X;break}if(Ie===C){_e=!0,C=U,w=X;break}Ie=Ie.sibling}if(!_e){for(Ie=X.child;Ie;){if(Ie===w){_e=!0,w=X,C=U;break}if(Ie===C){_e=!0,C=X,w=U;break}Ie=Ie.sibling}if(!_e)throw Error(h(189))}}if(w.alternate!==C)throw Error(h(190))}if(3!==w.tag)throw Error(h(188));return w.stateNode.current===w?o:l}(t))?qu(t):null}function qu(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var o=qu(t);if(null!==o)return o;t=t.sibling}return null}var Xa=m.unstable_scheduleCallback,Za=m.unstable_cancelCallback,el=m.unstable_shouldYield,Ye=m.unstable_requestPaint,kt=m.unstable_now,an=m.unstable_getCurrentPriorityLevel,ur=m.unstable_ImmediatePriority,ho=m.unstable_UserBlockingPriority,Gt=m.unstable_NormalPriority,fs=m.unstable_LowPriority,ds=m.unstable_IdlePriority,Hs=null,po=null,Xi=Math.clz32?Math.clz32:function(t){return 0==(t>>>=0)?32:31-(ef(t)/tf|0)|0},ef=Math.log,tf=Math.LN2,tl=64,$u=4194304;function qs(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function eu(t,o){var l=t.pendingLanes;if(0===l)return 0;var w=0,C=t.suspendedLanes,U=t.pingedLanes,X=268435455&l;if(0!==X){var _e=X&~C;0!==_e?w=qs(_e):0!=(U&=X)&&(w=qs(U))}else 0!=(X=l&~C)?w=qs(X):0!==U&&(w=qs(U));if(0===w)return 0;if(0!==o&&o!==w&&0==(o&C)&&((C=w&-w)>=(U=o&-o)||16===C&&0!=(4194240&U)))return o;if(0!=(4&w)&&(w|=16&l),0!==(o=t.entangledLanes))for(t=t.entanglements,o&=w;0<o;)C=1<<(l=31-Xi(o)),w|=t[l],o&=~C;return w}function Vu(t,o){switch(t){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;default:return-1}}function tu(t){return 0!=(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function nl(){var t=tl;return 0==(4194240&(tl<<=1))&&(tl=64),t}function Wu(t){for(var o=[],l=0;31>l;l++)o.push(t);return o}function Qo(t,o,l){t.pendingLanes|=o,536870912!==o&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[o=31-Xi(o)]=l}function nu(t,o){var l=t.entangledLanes|=o;for(t=t.entanglements;l;){var w=31-Xi(l),C=1<<w;C&o|t[w]&o&&(t[w]|=o),l&=~C}}var tr=0;function rl(t){return 1<(t&=-t)?4<t?0!=(268435455&t)?16:536870912:4:1}var nf,Ku,rf,Q,ee,ye=!1,He=[],ct=null,Ze=null,Ct=null,rn=new Map,un=new Map,fn=[],rt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function gr(t,o){switch(t){case"focusin":case"focusout":ct=null;break;case"dragenter":case"dragleave":Ze=null;break;case"mouseover":case"mouseout":Ct=null;break;case"pointerover":case"pointerout":rn.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":un.delete(o.pointerId)}}function nn(t,o,l,w,C,U){return null===t||t.nativeEvent!==U?(t={blockedOn:o,domEventName:l,eventSystemFlags:w,nativeEvent:U,targetContainers:[C]},null!==o&&null!==(o=ic(o))&&Ku(o),t):(t.eventSystemFlags|=w,o=t.targetContainers,null!==C&&-1===o.indexOf(C)&&o.push(C),t)}function Zt(t){var o=su(t.target);if(null!==o){var l=No(o);if(null!==l)if(13===(o=l.tag)){if(null!==(o=Go(l)))return t.blockedOn=o,void ee(t.priority,function(){rf(l)})}else if(3===o&&l.stateNode.current.memoizedState.isDehydrated)return void(t.blockedOn=3===l.tag?l.stateNode.containerInfo:null)}t.blockedOn=null}function _n(t){if(null!==t.blockedOn)return!1;for(var o=t.targetContainers;0<o.length;){var l=$s(t.domEventName,t.eventSystemFlags,o[0],t.nativeEvent);if(null!==l)return null!==(o=ic(l))&&Ku(o),t.blockedOn=l,!1;var w=new(l=t.nativeEvent).constructor(l.type,l);$o=w,l.target.dispatchEvent(w),$o=null,o.shift()}return!0}function qi(t,o,l){_n(t)&&l.delete(o)}function cr(){ye=!1,null!==ct&&_n(ct)&&(ct=null),null!==Ze&&_n(Ze)&&(Ze=null),null!==Ct&&_n(Ct)&&(Ct=null),rn.forEach(qi),un.forEach(qi)}function yr(t,o){t.blockedOn===o&&(t.blockedOn=null,ye||(ye=!0,m.unstable_scheduleCallback(m.unstable_NormalPriority,cr)))}function Jr(t){function o(C){return yr(C,t)}if(0<He.length){yr(He[0],t);for(var l=1;l<He.length;l++){var w=He[l];w.blockedOn===t&&(w.blockedOn=null)}}for(null!==ct&&yr(ct,t),null!==Ze&&yr(Ze,t),null!==Ct&&yr(Ct,t),rn.forEach(o),un.forEach(o),l=0;l<fn.length;l++)(w=fn[l]).blockedOn===t&&(w.blockedOn=null);for(;0<fn.length&&null===(l=fn[0]).blockedOn;)Zt(l),null===l.blockedOn&&fn.shift()}var go=Z.ReactCurrentBatchConfig,mr=!0;function il(t,o,l,w){var C=tr,U=go.transition;go.transition=null;try{tr=1,ba(t,o,l,w)}finally{tr=C,go.transition=U}}function Jo(t,o,l,w){var C=tr,U=go.transition;go.transition=null;try{tr=4,ba(t,o,l,w)}finally{tr=C,go.transition=U}}function ba(t,o,l,w){if(mr){var C=$s(t,o,l,w);if(null===C)ec(t,o,w,yi,l),gr(t,w);else if(function(X,_e,Ie,qe,et){switch(_e){case"focusin":return ct=nn(ct,X,_e,Ie,qe,et),!0;case"dragenter":return Ze=nn(Ze,X,_e,Ie,qe,et),!0;case"mouseover":return Ct=nn(Ct,X,_e,Ie,qe,et),!0;case"pointerover":var st=et.pointerId;return rn.set(st,nn(rn.get(st)||null,X,_e,Ie,qe,et)),!0;case"gotpointercapture":return un.set(st=et.pointerId,nn(un.get(st)||null,X,_e,Ie,qe,et)),!0}return!1}(C,t,o,l,w))w.stopPropagation();else if(gr(t,w),4&o&&-1<rt.indexOf(t)){for(;null!==C;){var U=ic(C);if(null!==U&&nf(U),null===(U=$s(t,o,l,w))&&ec(t,o,w,yi,l),U===C)break;C=U}null!==C&&w.stopPropagation()}else ec(t,o,w,null,l)}}var yi=null;function $s(t,o,l,w){if(yi=null,null!==(t=su(t=Ya(w))))if(null===(o=No(t)))t=null;else if(13===(l=o.tag)){if(null!==(t=Go(o)))return t;t=null}else if(3===l){if(o.stateNode.current.memoizedState.isDehydrated)return 3===o.tag?o.stateNode.containerInfo:null;t=null}else o!==t&&(t=null);return yi=t,null}function kd(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(an()){case ur:return 1;case ho:return 4;case Gt:case fs:return 16;case ds:return 536870912;default:return 16}default:return 16}}var Xo=null,Nd=null,of=null;function Ad(){if(of)return of;var t,o,l=Nd,w=l.length,C="value"in Xo?Xo.value:Xo.textContent,U=C.length;for(t=0;t<w&&l[t]===C[t];t++);var X=w-t;for(o=1;o<=X&&l[w-o]===C[U-o];o++);return of=C.slice(t,1<o?1-o:void 0)}function wa(t){var o=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===o&&(t=13):t=o,10===t&&(t=13),32<=t||13===t?t:0}function hs(){return!0}function Td(){return!1}function Zi(t){function o(l,w,C,U,X){for(var _e in this._reactName=l,this._targetInst=C,this.type=w,this.nativeEvent=U,this.target=X,this.currentTarget=null,t)t.hasOwnProperty(_e)&&(this[_e]=(l=t[_e])?l(U):U[_e]);return this.isDefaultPrevented=(null!=U.defaultPrevented?U.defaultPrevented:!1===U.returnValue)?hs:Td,this.isPropagationStopped=Td,this}return de(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():"unknown"!=typeof l.returnValue&&(l.returnValue=!1),this.isDefaultPrevented=hs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():"unknown"!=typeof l.cancelBubble&&(l.cancelBubble=!0),this.isPropagationStopped=hs)},persist:function(){},isPersistent:hs}),o}var Md,Ld,Gu,ru={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sf=Zi(ru),Yu=de({},ru,{view:0,detail:0}),ag=Zi(Yu),ps=de({},Yu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dd,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Gu&&(Gu&&"mousemove"===t.type?(Md=t.screenX-Gu.screenX,Ld=t.screenY-Gu.screenY):Ld=Md=0,Gu=t),Md)},movementY:function(t){return"movementY"in t?t.movementY:Ld}}),ug=Zi(ps),cg=Zi(de({},ps,{dataTransfer:0})),Ud=Zi(de({},Yu,{relatedTarget:0})),qn=Zi(de({},ru,{animationName:0,elapsedTime:0,pseudoElement:0})),jy=Zi(de({},ru,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),af=Zi(de({},ru,{data:0})),zy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},By={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Fy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hy(t){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(t):!!(t=Fy[t])&&!!o[t]}function Dd(){return Hy}var $y=Zi(de({},Yu,{key:function(t){if(t.key){var o=zy[t.key]||t.key;if("Unidentified"!==o)return o}return"keypress"===t.type?13===(t=wa(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?By[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dd,charCode:function(t){return"keypress"===t.type?wa(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?wa(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}})),fg=Zi(de({},ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),jd=Zi(de({},Yu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dd})),dg=Zi(de({},ru,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wy=Zi(de({},ps,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0})),ol=[9,13,27,32],zd=E&&"CompositionEvent"in window,sl=null;E&&"documentMode"in document&&(sl=document.documentMode);var Ky=E&&"TextEvent"in window&&!sl,hg=E&&(!zd||sl&&8<sl&&11>=sl),pg=String.fromCharCode(32),gg=!1;function yg(t,o){switch(t){case"keyup":return-1!==ol.indexOf(o.keyCode);case"keydown":return 229!==o.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mg(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var iu=!1,vg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function uf(t){var o=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===o?!!vg[t.type]:"textarea"===o}function Bd(t,o,l,w){Ds(w),0<(o=pf(o,"onChange")).length&&(l=new sf("onChange","change",null,l,w),t.push({event:l,listeners:o}))}var cf=null,al=null;function Gy(t){Gd(t,0)}function ul(t){if(It(oc(t)))return t}function Qu(t,o){if("change"===t)return o}var Fd=!1;if(E){var lf;if(E){var Ii="oninput"in document;if(!Ii){var _g=document.createElement("div");_g.setAttribute("oninput","return;"),Ii="function"==typeof _g.oninput}lf=Ii}else lf=!1;Fd=lf&&(!document.documentMode||9<document.documentMode)}function bg(){cf&&(cf.detachEvent("onpropertychange",wg),al=cf=null)}function wg(t){if("value"===t.propertyName&&ul(al)){var o=[];Bd(o,al,t,Ya(t)),fo(Gy,o)}}function Yy(t,o,l){"focusin"===t?(bg(),al=l,(cf=o).attachEvent("onpropertychange",wg)):"focusout"===t&&bg()}function Qy(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return ul(al)}function Jy(t,o){if("click"===t)return ul(o)}function Xy(t,o){if("input"===t||"change"===t)return ul(o)}var Zo="function"==typeof Object.is?Object.is:function(t,o){return t===o&&(0!==t||1/t==1/o)||t!=t&&o!=o};function cl(t,o){if(Zo(t,o))return!0;if("object"!=typeof t||null===t||"object"!=typeof o||null===o)return!1;var l=Object.keys(t),w=Object.keys(o);if(l.length!==w.length)return!1;for(w=0;w<l.length;w++){var C=l[w];if(!R.call(o,C)||!Zo(t[C],o[C]))return!1}return!0}function Eg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Sg(t,o){var l,w=Eg(t);for(t=0;w;){if(3===w.nodeType){if(l=t+w.textContent.length,t<=o&&l>=o)return{node:w,offset:o-t};t=l}e:{for(;w;){if(w.nextSibling){w=w.nextSibling;break e}w=w.parentNode}w=void 0}w=Eg(w)}}function Og(t,o){return!(!t||!o)&&(t===o||(!t||3!==t.nodeType)&&(o&&3===o.nodeType?Og(t,o.parentNode):"contains"in t?t.contains(o):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(o))))}function xg(){for(var t=window,o=Bt();o instanceof t.HTMLIFrameElement;){try{var l="string"==typeof o.contentWindow.location.href}catch{l=!1}if(!l)break;o=Bt((t=o.contentWindow).document)}return o}function ll(t){var o=t&&t.nodeName&&t.nodeName.toLowerCase();return o&&("input"===o&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===o||"true"===t.contentEditable)}function Ju(t){var o=xg(),l=t.focusedElem,w=t.selectionRange;if(o!==l&&l&&l.ownerDocument&&Og(l.ownerDocument.documentElement,l)){if(null!==w&&ll(l))if(o=w.start,void 0===(t=w.end)&&(t=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(t,l.value.length);else if((t=(o=l.ownerDocument||document)&&o.defaultView||window).getSelection){t=t.getSelection();var C=l.textContent.length,U=Math.min(w.start,C);w=void 0===w.end?U:Math.min(w.end,C),!t.extend&&U>w&&(C=w,w=U,U=C),C=Sg(l,U);var X=Sg(l,w);C&&X&&(1!==t.rangeCount||t.anchorNode!==C.node||t.anchorOffset!==C.offset||t.focusNode!==X.node||t.focusOffset!==X.offset)&&((o=o.createRange()).setStart(C.node,C.offset),t.removeAllRanges(),U>w?(t.addRange(o),t.extend(X.node,X.offset)):(o.setEnd(X.node,X.offset),t.addRange(o)))}for(o=[],t=l;t=t.parentNode;)1===t.nodeType&&o.push({element:t,left:t.scrollLeft,top:t.scrollTop});for("function"==typeof l.focus&&l.focus(),l=0;l<o.length;l++)(t=o[l]).element.scrollLeft=t.left,t.element.scrollTop=t.top}}var ff=E&&"documentMode"in document&&11>=document.documentMode,Vs=null,df=null,fl=null,Hd=!1;function dl(t,o,l){var w=l.window===l?l.document:9===l.nodeType?l:l.ownerDocument;Hd||null==Vs||Vs!==Bt(w)||(w="selectionStart"in(w=Vs)&&ll(w)?{start:w.selectionStart,end:w.selectionEnd}:{anchorNode:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset},fl&&cl(fl,w)||(fl=w,0<(w=pf(df,"onSelect")).length&&(o=new sf("onSelect","select",null,o,l),t.push({event:o,listeners:w}),o.target=Vs)))}function Mi(t,o){var l={};return l[t.toLowerCase()]=o.toLowerCase(),l["Webkit"+t]="webkit"+o,l["Moz"+t]="moz"+o,l}var Xu={animationend:Mi("Animation","AnimationEnd"),animationiteration:Mi("Animation","AnimationIteration"),animationstart:Mi("Animation","AnimationStart"),transitionend:Mi("Transition","TransitionEnd")},qd={},Rg={};function hf(t){if(qd[t])return qd[t];if(!Xu[t])return t;var o,l=Xu[t];for(o in l)if(l.hasOwnProperty(o)&&o in Rg)return qd[t]=l[o];return t}E&&(Rg=document.createElement("div").style,"AnimationEvent"in window||(delete Xu.animationend.animation,delete Xu.animationiteration.animation,delete Xu.animationstart.animation),"TransitionEvent"in window||delete Xu.transitionend.transition);var Ig=hf("animationend"),Cg=hf("animationiteration"),Pg=hf("animationstart"),kg=hf("transitionend"),Sn=new Map,$d="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ws(t,o){Sn.set(t,o),v(o,[t])}for(var Vd=0;Vd<$d.length;Vd++){var Wd=$d[Vd];Ws(Wd.toLowerCase(),"on"+(Wd[0].toUpperCase()+Wd.slice(1)))}Ws(Ig,"onAnimationEnd"),Ws(Cg,"onAnimationIteration"),Ws(Pg,"onAnimationStart"),Ws("dblclick","onDoubleClick"),Ws("focusin","onFocus"),Ws("focusout","onBlur"),Ws(kg,"onTransitionEnd"),y("onMouseEnter",["mouseout","mouseover"]),y("onMouseLeave",["mouseout","mouseover"]),y("onPointerEnter",["pointerout","pointerover"]),y("onPointerLeave",["pointerout","pointerover"]),v("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),v("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),v("onBeforeInput",["compositionend","keypress","textInput","paste"]),v("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),v("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),v("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Zy=new Set("cancel close invalid load scroll toggle".split(" ").concat(hl));function Kd(t,o,l){var w=t.type||"unknown-event";t.currentTarget=l,function(C,U,X,_e,Ie,qe,et,st,nt){if(Ja.apply(this,arguments),ls){if(!ls)throw Error(h(198));var ut=Fs;ls=!1,Fs=null,va||(va=!0,_a=ut)}}(w,o,void 0,t),t.currentTarget=null}function Gd(t,o){o=0!=(4&o);for(var l=0;l<t.length;l++){var w=t[l],C=w.event;w=w.listeners;e:{var U=void 0;if(o)for(var X=w.length-1;0<=X;X--){var _e=w[X],Ie=_e.instance,qe=_e.currentTarget;if(_e=_e.listener,Ie!==U&&C.isPropagationStopped())break e;Kd(C,_e,qe),U=Ie}else for(X=0;X<w.length;X++){if(Ie=(_e=w[X]).instance,qe=_e.currentTarget,_e=_e.listener,Ie!==U&&C.isPropagationStopped())break e;Kd(C,_e,qe),U=Ie}}}if(va)throw t=_a,va=!1,_a=null,t}function Sr(t,o){var l=o[eh];void 0===l&&(l=o[eh]=new Set);var w=t+"__bubble";l.has(w)||(gl(o,t,2,!1),l.add(w))}function pl(t,o,l){var w=0;o&&(w|=4),gl(l,t,w,o)}var Zu="_reactListening"+Math.random().toString(36).slice(2);function ou(t){if(!t[Zu]){t[Zu]=!0,c.forEach(function(l){"selectionchange"!==l&&(Zy.has(l)||pl(l,!1,t),pl(l,!0,t))});var o=9===t.nodeType?t:t.ownerDocument;null===o||o[Zu]||(o[Zu]=!0,pl("selectionchange",!1,o))}}function gl(t,o,l,w){switch(kd(o)){case 1:var C=il;break;case 4:C=Jo;break;default:C=ba}l=C.bind(null,o,l,t),C=void 0,!ma||"touchstart"!==o&&"touchmove"!==o&&"wheel"!==o||(C=!0),t.addEventListener(o,l,w?void 0===C||{capture:!0,passive:C}:void 0!==C&&{passive:C})}function ec(t,o,l,w,C){var U=w;if(0==(1&o)&&0==(2&o)&&null!==w)e:for(;;){if(null===w)return;var X=w.tag;if(3===X||4===X){var _e=w.stateNode.containerInfo;if(_e===C||8===_e.nodeType&&_e.parentNode===C)break;if(4===X)for(X=w.return;null!==X;){var Ie=X.tag;if((3===Ie||4===Ie)&&((Ie=X.stateNode.containerInfo)===C||8===Ie.nodeType&&Ie.parentNode===C))return;X=X.return}for(;null!==_e;){if(null===(X=su(_e)))return;if(5===(Ie=X.tag)||6===Ie){w=U=X;continue e}_e=_e.parentNode}}w=w.return}fo(function(){var qe=U,et=Ya(l),st=[];e:{var nt=Sn.get(t);if(void 0!==nt){var ut=sf,wt=t;switch(t){case"keypress":if(0===wa(l))break e;case"keydown":case"keyup":ut=$y;break;case"focusin":wt="focus",ut=Ud;break;case"focusout":wt="blur",ut=Ud;break;case"beforeblur":case"afterblur":ut=Ud;break;case"click":if(2===l.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ut=ug;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ut=cg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ut=jd;break;case Ig:case Cg:case Pg:ut=qn;break;case kg:ut=dg;break;case"scroll":ut=ag;break;case"wheel":ut=Wy;break;case"copy":case"cut":case"paste":ut=jy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ut=fg}var St=0!=(4&o),ot=!St&&"scroll"===t,Be=St?null!==nt?nt+"Capture":null:nt;St=[];for(var tt,yt=qe;null!==yt;){var $t=(tt=yt).stateNode;if(5===tt.tag&&null!==$t&&(tt=$t,null!==Be&&null!=($t=Wo(yt,Be))&&St.push(yl(yt,$t,tt))),ot)break;yt=yt.return}0<St.length&&(nt=new ut(nt,wt,null,l,et),st.push({event:nt,listeners:St}))}}if(0==(7&o)){if(ut="mouseout"===t||"pointerout"===t,(!(nt="mouseover"===t||"pointerover"===t)||l===$o||!(wt=l.relatedTarget||l.fromElement)||!su(wt)&&!wt[Gs])&&(ut||nt)&&(nt=et.window===et?et:(nt=et.ownerDocument)?nt.defaultView||nt.parentWindow:window,ut?(ut=qe,null!==(wt=(wt=l.relatedTarget||l.toElement)?su(wt):null)&&(wt!==(ot=No(wt))||5!==wt.tag&&6!==wt.tag)&&(wt=null)):(ut=null,wt=qe),ut!==wt)){if(St=ug,$t="onMouseLeave",Be="onMouseEnter",yt="mouse","pointerout"!==t&&"pointerover"!==t||(St=fg,$t="onPointerLeave",Be="onPointerEnter",yt="pointer"),ot=null==ut?nt:oc(ut),tt=null==wt?nt:oc(wt),(nt=new St($t,yt+"leave",ut,l,et)).target=ot,nt.relatedTarget=tt,$t=null,su(et)===qe&&((St=new St(Be,yt+"enter",wt,l,et)).target=tt,St.relatedTarget=ot,$t=St),ot=$t,ut&&wt)e:{for(Be=wt,yt=0,tt=St=ut;tt;tt=tc(tt))yt++;for(tt=0,$t=Be;$t;$t=tc($t))tt++;for(;0<yt-tt;)St=tc(St),yt--;for(;0<tt-yt;)Be=tc(Be),tt--;for(;yt--;){if(St===Be||null!==Be&&St===Be.alternate)break e;St=tc(St),Be=tc(Be)}St=null}else St=null;null!==ut&&Ng(st,nt,ut,St,!1),null!==wt&&null!==ot&&Ng(st,ot,wt,St,!0)}if("select"===(ut=(nt=qe?oc(qe):window).nodeName&&nt.nodeName.toLowerCase())||"input"===ut&&"file"===nt.type)var bn=Qu;else if(uf(nt))if(Fd)bn=Xy;else{bn=Qy;var qt=Yy}else(ut=nt.nodeName)&&"input"===ut.toLowerCase()&&("checkbox"===nt.type||"radio"===nt.type)&&(bn=Jy);switch(bn&&(bn=bn(t,qe))?Bd(st,bn,l,et):(qt&&qt(t,nt,qe),"focusout"===t&&(qt=nt._wrapperState)&&qt.controlled&&"number"===nt.type&&je(nt,"number",nt.value)),qt=qe?oc(qe):window,t){case"focusin":(uf(qt)||"true"===qt.contentEditable)&&(Vs=qt,df=qe,fl=null);break;case"focusout":fl=df=Vs=null;break;case"mousedown":Hd=!0;break;case"contextmenu":case"mouseup":case"dragend":Hd=!1,dl(st,l,et);break;case"selectionchange":if(ff)break;case"keydown":case"keyup":dl(st,l,et)}var Rn;if(zd)e:{switch(t){case"compositionstart":var dn="onCompositionStart";break e;case"compositionend":dn="onCompositionEnd";break e;case"compositionupdate":dn="onCompositionUpdate";break e}dn=void 0}else iu?yg(t,l)&&(dn="onCompositionEnd"):"keydown"===t&&229===l.keyCode&&(dn="onCompositionStart");dn&&(hg&&"ko"!==l.locale&&(iu||"onCompositionStart"!==dn?"onCompositionEnd"===dn&&iu&&(Rn=Ad()):(Nd="value"in(Xo=et)?Xo.value:Xo.textContent,iu=!0)),0<(qt=pf(qe,dn)).length&&(dn=new af(dn,t,null,l,et),st.push({event:dn,listeners:qt}),(Rn||null!==(Rn=mg(l)))&&(dn.data=Rn))),(Rn=Ky?function(gn,sr){switch(gn){case"compositionend":return mg(sr);case"keypress":return 32!==sr.which?null:(gg=!0,pg);case"textInput":return(gn=sr.data)===pg&&gg?null:gn;default:return null}}(t,l):function(gn,sr){if(iu)return"compositionend"===gn||!zd&&yg(gn,sr)?(gn=Ad(),of=Nd=Xo=null,iu=!1,gn):null;switch(gn){case"paste":default:return null;case"keypress":if(!(sr.ctrlKey||sr.altKey||sr.metaKey)||sr.ctrlKey&&sr.altKey){if(sr.char&&1<sr.char.length)return sr.char;if(sr.which)return String.fromCharCode(sr.which)}return null;case"compositionend":return hg&&"ko"!==sr.locale?null:sr.data}}(t,l))&&0<(qe=pf(qe,"onBeforeInput")).length&&(et=new af("onBeforeInput","beforeinput",null,l,et),st.push({event:et,listeners:qe}),et.data=Rn)}Gd(st,o)})}function yl(t,o,l){return{instance:t,listener:o,currentTarget:l}}function pf(t,o){for(var l=o+"Capture",w=[];null!==t;){var C=t,U=C.stateNode;5===C.tag&&null!==U&&(C=U,null!=(U=Wo(t,l))&&w.unshift(yl(t,U,C)),null!=(U=Wo(t,o))&&w.push(yl(t,U,C))),t=t.return}return w}function tc(t){if(null===t)return null;do{t=t.return}while(t&&5!==t.tag);return t||null}function Ng(t,o,l,w,C){for(var U=o._reactName,X=[];null!==l&&l!==w;){var _e=l,Ie=_e.alternate,qe=_e.stateNode;if(null!==Ie&&Ie===w)break;5===_e.tag&&null!==qe&&(_e=qe,C?null!=(Ie=Wo(l,U))&&X.unshift(yl(l,Ie,_e)):C||null!=(Ie=Wo(l,U))&&X.push(yl(l,Ie,_e))),l=l.return}0!==X.length&&t.push({event:o,listeners:X})}var Ag=/\r\n?/g,Tg=/\u0000|\uFFFD/g;function Mg(t){return("string"==typeof t?t:""+t).replace(Ag,"\n").replace(Tg,"")}function gf(t,o,l){if(o=Mg(o),Mg(t)!==o&&l)throw Error(h(425))}function yf(){}var Yd=null,Qd=null;function Jd(t,o){return"textarea"===t||"noscript"===t||"string"==typeof o.children||"number"==typeof o.children||"object"==typeof o.dangerouslySetInnerHTML&&null!==o.dangerouslySetInnerHTML&&null!=o.dangerouslySetInnerHTML.__html}var Xd="function"==typeof setTimeout?setTimeout:void 0,em="function"==typeof clearTimeout?clearTimeout:void 0,Lg="function"==typeof Promise?Promise:void 0,tm="function"==typeof queueMicrotask?queueMicrotask:void 0!==Lg?function(t){return Lg.resolve(null).then(t).catch(nm)}:Xd;function nm(t){setTimeout(function(){throw t})}function Zd(t,o){var l=o,w=0;do{var C=l.nextSibling;if(t.removeChild(l),C&&8===C.nodeType)if("/$"===(l=C.data)){if(0===w)return t.removeChild(C),void Jr(o);w--}else"$"!==l&&"$?"!==l&&"$!"!==l||w++;l=C}while(l);Jr(o)}function Ks(t){for(;null!=t;t=t.nextSibling){var o=t.nodeType;if(1===o||3===o)break;if(8===o){if("$"===(o=t.data)||"$!"===o||"$?"===o)break;if("/$"===o)return null}}return t}function Ug(t){t=t.previousSibling;for(var o=0;t;){if(8===t.nodeType){var l=t.data;if("$"===l||"$!"===l||"$?"===l){if(0===o)return t;o--}else"/$"===l&&o++}t=t.previousSibling}return null}var nc=Math.random().toString(36).slice(2),es="__reactFiber$"+nc,rc="__reactProps$"+nc,Gs="__reactContainer$"+nc,eh="__reactEvents$"+nc,rm="__reactListeners$"+nc,im="__reactHandles$"+nc;function su(t){var o=t[es];if(o)return o;for(var l=t.parentNode;l;){if(o=l[Gs]||l[es]){if(l=o.alternate,null!==o.child||null!==l&&null!==l.child)for(t=Ug(t);null!==t;){if(l=t[es])return l;t=Ug(t)}return o}l=(t=l).parentNode}return null}function ic(t){return!(t=t[es]||t[Gs])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function oc(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(h(33))}function mf(t){return t[rc]||null}var th=[],Ea=-1;function Ys(t){return{current:t}}function Pr(t){0>Ea||(t.current=th[Ea],th[Ea]=null,Ea--)}function kr(t,o){Ea++,th[Ea]=t.current,t.current=o}var Sa={},Ci=Ys(Sa),eo=Ys(!1),au=Sa;function sc(t,o){var l=t.type.contextTypes;if(!l)return Sa;var w=t.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===o)return w.__reactInternalMemoizedMaskedChildContext;var C,U={};for(C in l)U[C]=o[C];return w&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,t.__reactInternalMemoizedMaskedChildContext=U),U}function yo(t){return null!=t.childContextTypes}function nh(){Pr(eo),Pr(Ci)}function rh(t,o,l){if(Ci.current!==Sa)throw Error(h(168));kr(Ci,o),kr(eo,l)}function Dg(t,o,l){var w=t.stateNode;if(o=o.childContextTypes,"function"!=typeof w.getChildContext)return l;for(var C in w=w.getChildContext())if(!(C in o))throw Error(h(108,ke(t)||"Unknown",C));return de({},l,w)}function uu(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Sa,au=Ci.current,kr(Ci,t),kr(eo,eo.current),!0}function ac(t,o,l){var w=t.stateNode;if(!w)throw Error(h(169));l?(t=Dg(t,o,au),w.__reactInternalMemoizedMergedChildContext=t,Pr(eo),Pr(Ci),kr(Ci,t)):Pr(eo),kr(eo,l)}var Qs=null,vf=!1,ui=!1;function jg(t){null===Qs?Qs=[t]:Qs.push(t)}function Oa(){if(!ui&&null!==Qs){ui=!0;var t=0,o=tr;try{var l=Qs;for(tr=1;t<l.length;t++){var w=l[t];do{w=w(!0)}while(null!==w)}Qs=null,vf=!1}catch(C){throw null!==Qs&&(Qs=Qs.slice(t+1)),Xa(ur,Oa),C}finally{tr=o,ui=!1}}return null}var uc=[],cc=0,_f=null,bf=0,Ao=[],To=0,cu=null,gs=1,Js="";function lu(t,o){uc[cc++]=bf,uc[cc++]=_f,_f=t,bf=o}function zg(t,o,l){Ao[To++]=gs,Ao[To++]=Js,Ao[To++]=cu,cu=t;var w=gs;t=Js;var C=32-Xi(w)-1;w&=~(1<<C),l+=1;var U=32-Xi(o)+C;if(30<U){var X=C-C%5;U=(w&(1<<X)-1).toString(32),w>>=X,C-=X,gs=1<<32-Xi(o)+C|l<<C|w,Js=U+t}else gs=1<<U|l<<C|w,Js=t}function ih(t){null!==t.return&&(lu(t,1),zg(t,1,0))}function oh(t){for(;t===_f;)_f=uc[--cc],uc[cc]=null,bf=uc[--cc],uc[cc]=null;for(;t===cu;)cu=Ao[--To],Ao[To]=null,Js=Ao[--To],Ao[To]=null,gs=Ao[--To],Ao[To]=null}var mo=null,vo=null,jr=!1,ts=null;function Bg(t,o){var l=jo(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=t,null===(o=t.deletions)?(t.deletions=[l],t.flags|=16):o.push(l)}function Fg(t,o){switch(t.tag){case 5:var l=t.type;return null!==(o=1!==o.nodeType||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o)&&(t.stateNode=o,mo=t,vo=Ks(o.firstChild),!0);case 6:return null!==(o=""===t.pendingProps||3!==o.nodeType?null:o)&&(t.stateNode=o,mo=t,vo=null,!0);case 13:return null!==(o=8!==o.nodeType?null:o)&&(t.memoizedState={dehydrated:o,treeContext:l=null!==cu?{id:gs,overflow:Js}:null,retryLane:1073741824},(l=jo(18,null,null,0)).stateNode=o,l.return=t,t.child=l,mo=t,vo=null,!0);default:return!1}}function sh(t){return 0!=(1&t.mode)&&0==(128&t.flags)}function ah(t){if(jr){var o=vo;if(o){var l=o;if(!Fg(t,o)){if(sh(t))throw Error(h(418));o=Ks(l.nextSibling);var w=mo;o&&Fg(t,o)?Bg(w,l):(t.flags=-4097&t.flags|2,jr=!1,mo=t)}}else{if(sh(t))throw Error(h(418));t.flags=-4097&t.flags|2,jr=!1,mo=t}}}function Hg(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;mo=t}function wf(t){if(t!==mo)return!1;if(!jr)return Hg(t),jr=!0,!1;var o;if((o=3!==t.tag)&&!(o=5!==t.tag)&&(o="head"!==(o=t.type)&&"body"!==o&&!Jd(t.type,t.memoizedProps)),o&&(o=vo)){if(sh(t))throw qg(),Error(h(418));for(;o;)Bg(t,o),o=Ks(o.nextSibling)}if(Hg(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(h(317));e:{for(t=t.nextSibling,o=0;t;){if(8===t.nodeType){var l=t.data;if("/$"===l){if(0===o){vo=Ks(t.nextSibling);break e}o--}else"$"!==l&&"$!"!==l&&"$?"!==l||o++}t=t.nextSibling}vo=null}}else vo=mo?Ks(t.stateNode.nextSibling):null;return!0}function qg(){for(var t=vo;t;)t=Ks(t.nextSibling)}function lc(){vo=mo=null,jr=!1}function uh(t){null===ts?ts=[t]:ts.push(t)}var om=Z.ReactCurrentBatchConfig;function ns(t,o){if(t&&t.defaultProps){for(var l in o=de({},o),t=t.defaultProps)void 0===o[l]&&(o[l]=t[l]);return o}return o}var Ef=Ys(null),Sf=null,fu=null,ch=null;function lh(){ch=fu=Sf=null}function fh(t){var o=Ef.current;Pr(Ef),t._currentValue=o}function dh(t,o,l){for(;null!==t;){var w=t.alternate;if((t.childLanes&o)!==o?(t.childLanes|=o,null!==w&&(w.childLanes|=o)):null!==w&&(w.childLanes&o)!==o&&(w.childLanes|=o),t===l)break;t=t.return}}function fc(t,o){Sf=t,ch=fu=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!=(t.lanes&o)&&(to=!0),t.firstContext=null)}function Mo(t){var o=t._currentValue;if(ch!==t)if(t={context:t,memoizedValue:o,next:null},null===fu){if(null===Sf)throw Error(h(308));fu=t,Sf.dependencies={lanes:0,firstContext:t}}else fu=fu.next=t;return o}var du=null;function Of(t){null===du?du=[t]:du.push(t)}function $g(t,o,l,w){var C=o.interleaved;return null===C?(l.next=l,Of(o)):(l.next=C.next,C.next=l),o.interleaved=l,Xs(t,w)}function Xs(t,o){t.lanes|=o;var l=t.alternate;for(null!==l&&(l.lanes|=o),l=t,t=t.return;null!==t;)t.childLanes|=o,null!==(l=t.alternate)&&(l.childLanes|=o),l=t,t=t.return;return 3===l.tag?l.stateNode:null}var Zs=!1;function hh(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vg(t,o){o.updateQueue===(t=t.updateQueue)&&(o.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ys(t,o){return{eventTime:t,lane:o,tag:0,payload:null,callback:null,next:null}}function ms(t,o,l){var w=t.updateQueue;if(null===w)return null;if(w=w.shared,0!=(2&or)){var C=w.pending;return null===C?o.next=o:(o.next=C.next,C.next=o),w.pending=o,Xs(t,l)}return null===(C=w.interleaved)?(o.next=o,Of(w)):(o.next=C.next,C.next=o),w.interleaved=o,Xs(t,l)}function xf(t,o,l){if(null!==(o=o.updateQueue)&&(o=o.shared,0!=(4194240&l))){var w=o.lanes;l|=w&=t.pendingLanes,o.lanes=l,nu(t,l)}}function Wg(t,o){var l=t.updateQueue,w=t.alternate;if(null===w||l!==(w=w.updateQueue))null===(t=l.lastBaseUpdate)?l.firstBaseUpdate=o:t.next=o,l.lastBaseUpdate=o;else{var C=null,U=null;if(null!==(l=l.firstBaseUpdate)){do{var X={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};null===U?C=U=X:U=U.next=X,l=l.next}while(null!==l);null===U?C=U=o:U=U.next=o}else C=U=o;t.updateQueue=l={baseState:w.baseState,firstBaseUpdate:C,lastBaseUpdate:U,shared:w.shared,effects:w.effects}}}function Rf(t,o,l,w){var C=t.updateQueue;Zs=!1;var U=C.firstBaseUpdate,X=C.lastBaseUpdate,_e=C.shared.pending;if(null!==_e){C.shared.pending=null;var Ie=_e,qe=Ie.next;Ie.next=null,null===X?U=qe:X.next=qe,X=Ie;var et=t.alternate;null!==et&&(_e=(et=et.updateQueue).lastBaseUpdate)!==X&&(null===_e?et.firstBaseUpdate=qe:_e.next=qe,et.lastBaseUpdate=Ie)}if(null!==U){var st=C.baseState;for(X=0,et=qe=Ie=null,_e=U;;){var nt=_e.lane,ut=_e.eventTime;if((w&nt)===nt){null!==et&&(et=et.next={eventTime:ut,lane:0,tag:_e.tag,payload:_e.payload,callback:_e.callback,next:null});e:{var wt=t,St=_e;switch(nt=o,ut=l,St.tag){case 1:if("function"==typeof(wt=St.payload)){st=wt.call(ut,st,nt);break e}st=wt;break e;case 3:wt.flags=-65537&wt.flags|128;case 0:if(null==(nt="function"==typeof(wt=St.payload)?wt.call(ut,st,nt):wt))break e;st=de({},st,nt);break e;case 2:Zs=!0}}null!==_e.callback&&0!==_e.lane&&(t.flags|=64,null===(nt=C.effects)?C.effects=[_e]:nt.push(_e))}else ut={eventTime:ut,lane:nt,tag:_e.tag,payload:_e.payload,callback:_e.callback,next:null},null===et?(qe=et=ut,Ie=st):et=et.next=ut,X|=nt;if(null===(_e=_e.next)){if(null===(_e=C.shared.pending))break;_e=(nt=_e).next,nt.next=null,C.lastBaseUpdate=nt,C.shared.pending=null}}if(null===et&&(Ie=st),C.baseState=Ie,C.firstBaseUpdate=qe,C.lastBaseUpdate=et,null!==(o=C.shared.interleaved)){C=o;do{X|=C.lane,C=C.next}while(C!==o)}else null===U&&(C.shared.lanes=0);ka|=X,t.lanes=X,t.memoizedState=st}}function Kg(t,o,l){if(t=o.effects,o.effects=null,null!==t)for(o=0;o<t.length;o++){var w=t[o],C=w.callback;if(null!==C){if(w.callback=null,w=l,"function"!=typeof C)throw Error(h(191,C));C.call(w)}}}var Gg=(new _.Component).refs;function ph(t,o,l,w){l=null==(l=l(w,o=t.memoizedState))?o:de({},o,l),t.memoizedState=l,0===t.lanes&&(t.updateQueue.baseState=l)}var If={isMounted:function(t){return!!(t=t._reactInternals)&&No(t)===t},enqueueSetState:function(t,o,l){t=t._reactInternals;var w=wi(),C=Ta(t),U=ys(w,C);U.payload=o,null!=l&&(U.callback=l),null!==(o=ms(t,U,C))&&(Uo(o,t,C,w),xf(o,t,C))},enqueueReplaceState:function(t,o,l){t=t._reactInternals;var w=wi(),C=Ta(t),U=ys(w,C);U.tag=1,U.payload=o,null!=l&&(U.callback=l),null!==(o=ms(t,U,C))&&(Uo(o,t,C,w),xf(o,t,C))},enqueueForceUpdate:function(t,o){t=t._reactInternals;var l=wi(),w=Ta(t),C=ys(l,w);C.tag=2,null!=o&&(C.callback=o),null!==(o=ms(t,C,w))&&(Uo(o,t,w,l),xf(o,t,w))}};function Yg(t,o,l,w,C,U,X){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(w,U,X):!(o.prototype&&o.prototype.isPureReactComponent&&cl(l,w)&&cl(C,U))}function Qg(t,o,l){var w=!1,C=Sa,U=o.contextType;return"object"==typeof U&&null!==U?U=Mo(U):(C=yo(o)?au:Ci.current,U=(w=null!=(w=o.contextTypes))?sc(t,C):Sa),o=new o(l,U),t.memoizedState=null!=o.state?o.state:null,o.updater=If,t.stateNode=o,o._reactInternals=t,w&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=C,t.__reactInternalMemoizedMaskedChildContext=U),o}function gh(t,o,l,w){t=o.state,"function"==typeof o.componentWillReceiveProps&&o.componentWillReceiveProps(l,w),"function"==typeof o.UNSAFE_componentWillReceiveProps&&o.UNSAFE_componentWillReceiveProps(l,w),o.state!==t&&If.enqueueReplaceState(o,o.state,null)}function Cf(t,o,l,w){var C=t.stateNode;C.props=l,C.state=t.memoizedState,C.refs=Gg,hh(t);var U=o.contextType;"object"==typeof U&&null!==U?C.context=Mo(U):(U=yo(o)?au:Ci.current,C.context=sc(t,U)),C.state=t.memoizedState,"function"==typeof(U=o.getDerivedStateFromProps)&&(ph(t,o,U,l),C.state=t.memoizedState),"function"==typeof o.getDerivedStateFromProps||"function"==typeof C.getSnapshotBeforeUpdate||"function"!=typeof C.UNSAFE_componentWillMount&&"function"!=typeof C.componentWillMount||(o=C.state,"function"==typeof C.componentWillMount&&C.componentWillMount(),"function"==typeof C.UNSAFE_componentWillMount&&C.UNSAFE_componentWillMount(),o!==C.state&&If.enqueueReplaceState(C,C.state,null),Rf(t,l,C,w),C.state=t.memoizedState),"function"==typeof C.componentDidMount&&(t.flags|=4194308)}function dc(t,o,l){if(null!==(t=l.ref)&&"function"!=typeof t&&"object"!=typeof t){if(l._owner){if(l=l._owner){if(1!==l.tag)throw Error(h(309));var w=l.stateNode}if(!w)throw Error(h(147,t));var C=w,U=""+t;return null!==o&&null!==o.ref&&"function"==typeof o.ref&&o.ref._stringRef===U?o.ref:((o=function(X){var _e=C.refs;_e===Gg&&(_e=C.refs={}),null===X?delete _e[U]:_e[U]=X})._stringRef=U,o)}if("string"!=typeof t)throw Error(h(284));if(!l._owner)throw Error(h(290,t))}return t}function hc(t,o){throw t=Object.prototype.toString.call(o),Error(h(31,"[object Object]"===t?"object with keys {"+Object.keys(o).join(", ")+"}":t))}function Jg(t){return(0,t._init)(t._payload)}function yh(t){function o(ot,Be){if(t){var tt=ot.deletions;null===tt?(ot.deletions=[Be],ot.flags|=16):tt.push(Be)}}function l(ot,Be){if(!t)return null;for(;null!==Be;)o(ot,Be),Be=Be.sibling;return null}function w(ot,Be){for(ot=new Map;null!==Be;)ot.set(null!==Be.key?Be.key:Be.index,Be),Be=Be.sibling;return ot}function C(ot,Be){return(ot=Ua(ot,Be)).index=0,ot.sibling=null,ot}function U(ot,Be,tt){return ot.index=tt,t?null!==(tt=ot.alternate)?(tt=tt.index)<Be?(ot.flags|=2,Be):tt:(ot.flags|=2,Be):(ot.flags|=1048576,Be)}function X(ot){return t&&null===ot.alternate&&(ot.flags|=2),ot}function _e(ot,Be,tt,yt){return null===Be||6!==Be.tag?((Be=tp(tt,ot.mode,yt)).return=ot,Be):((Be=C(Be,tt)).return=ot,Be)}function Ie(ot,Be,tt,yt){var $t=tt.type;return $t===H?et(ot,Be,tt.props.children,yt,tt.key):null!==Be&&(Be.elementType===$t||"object"==typeof $t&&null!==$t&&$t.$$typeof===Oe&&Jg($t)===Be.type)?((yt=C(Be,tt.props)).ref=dc(ot,Be,tt),yt.return=ot,yt):((yt=Kf(tt.type,tt.key,tt.props,null,ot.mode,yt)).ref=dc(ot,Be,tt),yt.return=ot,yt)}function qe(ot,Be,tt,yt){return null===Be||4!==Be.tag||Be.stateNode.containerInfo!==tt.containerInfo||Be.stateNode.implementation!==tt.implementation?((Be=np(tt,ot.mode,yt)).return=ot,Be):((Be=C(Be,tt.children||[])).return=ot,Be)}function et(ot,Be,tt,yt,$t){return null===Be||7!==Be.tag?((Be=Da(tt,ot.mode,yt,$t)).return=ot,Be):((Be=C(Be,tt)).return=ot,Be)}function st(ot,Be,tt){if("string"==typeof Be&&""!==Be||"number"==typeof Be)return(Be=tp(""+Be,ot.mode,tt)).return=ot,Be;if("object"==typeof Be&&null!==Be){switch(Be.$$typeof){case x:return(tt=Kf(Be.type,Be.key,Be.props,null,ot.mode,tt)).ref=dc(ot,null,Be),tt.return=ot,tt;case W:return(Be=np(Be,ot.mode,tt)).return=ot,Be;case Oe:return st(ot,(0,Be._init)(Be._payload),tt)}if(ft(Be)||pe(Be))return(Be=Da(Be,ot.mode,tt,null)).return=ot,Be;hc(ot,Be)}return null}function nt(ot,Be,tt,yt){var $t=null!==Be?Be.key:null;if("string"==typeof tt&&""!==tt||"number"==typeof tt)return null!==$t?null:_e(ot,Be,""+tt,yt);if("object"==typeof tt&&null!==tt){switch(tt.$$typeof){case x:return tt.key===$t?Ie(ot,Be,tt,yt):null;case W:return tt.key===$t?qe(ot,Be,tt,yt):null;case Oe:return nt(ot,Be,($t=tt._init)(tt._payload),yt)}if(ft(tt)||pe(tt))return null!==$t?null:et(ot,Be,tt,yt,null);hc(ot,tt)}return null}function ut(ot,Be,tt,yt,$t){if("string"==typeof yt&&""!==yt||"number"==typeof yt)return _e(Be,ot=ot.get(tt)||null,""+yt,$t);if("object"==typeof yt&&null!==yt){switch(yt.$$typeof){case x:return Ie(Be,ot=ot.get(null===yt.key?tt:yt.key)||null,yt,$t);case W:return qe(Be,ot=ot.get(null===yt.key?tt:yt.key)||null,yt,$t);case Oe:return ut(ot,Be,tt,(0,yt._init)(yt._payload),$t)}if(ft(yt)||pe(yt))return et(Be,ot=ot.get(tt)||null,yt,$t,null);hc(Be,yt)}return null}return function ot(Be,tt,yt,$t){if("object"==typeof yt&&null!==yt&&yt.type===H&&null===yt.key&&(yt=yt.props.children),"object"==typeof yt&&null!==yt){switch(yt.$$typeof){case x:e:{for(var bn=yt.key,qt=tt;null!==qt;){if(qt.key===bn){if((bn=yt.type)===H){if(7===qt.tag){l(Be,qt.sibling),(tt=C(qt,yt.props.children)).return=Be,Be=tt;break e}}else if(qt.elementType===bn||"object"==typeof bn&&null!==bn&&bn.$$typeof===Oe&&Jg(bn)===qt.type){l(Be,qt.sibling),(tt=C(qt,yt.props)).ref=dc(Be,qt,yt),tt.return=Be,Be=tt;break e}l(Be,qt);break}o(Be,qt),qt=qt.sibling}yt.type===H?((tt=Da(yt.props.children,Be.mode,$t,yt.key)).return=Be,Be=tt):(($t=Kf(yt.type,yt.key,yt.props,null,Be.mode,$t)).ref=dc(Be,tt,yt),$t.return=Be,Be=$t)}return X(Be);case W:e:{for(qt=yt.key;null!==tt;){if(tt.key===qt){if(4===tt.tag&&tt.stateNode.containerInfo===yt.containerInfo&&tt.stateNode.implementation===yt.implementation){l(Be,tt.sibling),(tt=C(tt,yt.children||[])).return=Be,Be=tt;break e}l(Be,tt);break}o(Be,tt),tt=tt.sibling}(tt=np(yt,Be.mode,$t)).return=Be,Be=tt}return X(Be);case Oe:return ot(Be,tt,(qt=yt._init)(yt._payload),$t)}if(ft(yt))return function(ot,Be,tt,yt){for(var $t=null,bn=null,qt=Be,Rn=Be=0,dn=null;null!==qt&&Rn<tt.length;Rn++){qt.index>Rn?(dn=qt,qt=null):dn=qt.sibling;var gn=nt(ot,qt,tt[Rn],yt);if(null===gn){null===qt&&(qt=dn);break}t&&qt&&null===gn.alternate&&o(ot,qt),Be=U(gn,Be,Rn),null===bn?$t=gn:bn.sibling=gn,bn=gn,qt=dn}if(Rn===tt.length)return l(ot,qt),jr&&lu(ot,Rn),$t;if(null===qt){for(;Rn<tt.length;Rn++)null!==(qt=st(ot,tt[Rn],yt))&&(Be=U(qt,Be,Rn),null===bn?$t=qt:bn.sibling=qt,bn=qt);return jr&&lu(ot,Rn),$t}for(qt=w(ot,qt);Rn<tt.length;Rn++)null!==(dn=ut(qt,ot,Rn,tt[Rn],yt))&&(t&&null!==dn.alternate&&qt.delete(null===dn.key?Rn:dn.key),Be=U(dn,Be,Rn),null===bn?$t=dn:bn.sibling=dn,bn=dn);return t&&qt.forEach(function(sr){return o(ot,sr)}),jr&&lu(ot,Rn),$t}(Be,tt,yt,$t);if(pe(yt))return function(ot,Be,tt,yt){var $t=pe(tt);if("function"!=typeof $t)throw Error(h(150));if(null==(tt=$t.call(tt)))throw Error(h(151));for(var bn=$t=null,qt=Be,Rn=Be=0,dn=null,gn=tt.next();null!==qt&&!gn.done;Rn++,gn=tt.next()){qt.index>Rn?(dn=qt,qt=null):dn=qt.sibling;var sr=nt(ot,qt,gn.value,yt);if(null===sr){null===qt&&(qt=dn);break}t&&qt&&null===sr.alternate&&o(ot,qt),Be=U(sr,Be,Rn),null===bn?$t=sr:bn.sibling=sr,bn=sr,qt=dn}if(gn.done)return l(ot,qt),jr&&lu(ot,Rn),$t;if(null===qt){for(;!gn.done;Rn++,gn=tt.next())null!==(gn=st(ot,gn.value,yt))&&(Be=U(gn,Be,Rn),null===bn?$t=gn:bn.sibling=gn,bn=gn);return jr&&lu(ot,Rn),$t}for(qt=w(ot,qt);!gn.done;Rn++,gn=tt.next())null!==(gn=ut(qt,ot,Rn,gn.value,yt))&&(t&&null!==gn.alternate&&qt.delete(null===gn.key?Rn:gn.key),Be=U(gn,Be,Rn),null===bn?$t=gn:bn.sibling=gn,bn=gn);return t&&qt.forEach(function(Nc){return o(ot,Nc)}),jr&&lu(ot,Rn),$t}(Be,tt,yt,$t);hc(Be,yt)}return"string"==typeof yt&&""!==yt||"number"==typeof yt?(yt=""+yt,null!==tt&&6===tt.tag?(l(Be,tt.sibling),(tt=C(tt,yt)).return=Be,Be=tt):(l(Be,tt),(tt=tp(yt,Be.mode,$t)).return=Be,Be=tt),X(Be)):l(Be,tt)}}var pc=yh(!0),mh=yh(!1),ml={},vs=Ys(ml),gc=Ys(ml),vl=Ys(ml);function xa(t){if(t===ml)throw Error(h(174));return t}function Pf(t,o){switch(kr(vl,o),kr(gc,t),kr(vs,ml),t=o.nodeType){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:At(null,"");break;default:o=At(o=(t=8===t?o.parentNode:o).namespaceURI||null,t=t.tagName)}Pr(vs),kr(vs,o)}function hu(){Pr(vs),Pr(gc),Pr(vl)}function vh(t){xa(vl.current);var o=xa(vs.current),l=At(o,t.type);o!==l&&(kr(gc,t),kr(vs,l))}function _l(t){gc.current===t&&(Pr(vs),Pr(gc))}var Fr=Ys(0);function mi(t){for(var o=t;null!==o;){if(13===o.tag){var l=o.memoizedState;if(null!==l&&(null===(l=l.dehydrated)||"$?"===l.data||"$!"===l.data))return o}else if(19===o.tag&&void 0!==o.memoizedProps.revealOrder){if(0!=(128&o.flags))return o}else if(null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Li=[];function yc(){for(var t=0;t<Li.length;t++)Li[t]._workInProgressVersionPrimary=null;Li.length=0}var bl=Z.ReactCurrentDispatcher,_h=Z.ReactCurrentBatchConfig,pu=0,Hr=null,ci=null,vi=null,mc=!1,gu=!1,Ra=0,Ui=0;function _i(){throw Error(h(321))}function bh(t,o){if(null===o)return!1;for(var l=0;l<o.length&&l<t.length;l++)if(!Zo(t[l],o[l]))return!1;return!0}function wh(t,o,l,w,C,U){if(pu=U,Hr=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,bl.current=null===t||null===t.memoizedState?f0:um,t=l(w,C),gu){U=0;do{if(gu=!1,Ra=0,25<=U)throw Error(h(301));U+=1,vi=ci=null,o.updateQueue=null,bl.current=cm,t=l(w,C)}while(gu)}if(bl.current=Uf,o=null!==ci&&null!==ci.next,pu=0,vi=ci=Hr=null,mc=!1,o)throw Error(h(300));return t}function kf(){var t=0!==Ra;return Ra=0,t}function _s(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vi?Hr.memoizedState=vi=t:vi=vi.next=t,vi}function Lo(){if(null===ci){var t=Hr.alternate;t=null!==t?t.memoizedState:null}else t=ci.next;var o=null===vi?Hr.memoizedState:vi.next;if(null!==o)vi=o,ci=t;else{if(null===t)throw Error(h(310));t={memoizedState:(ci=t).memoizedState,baseState:ci.baseState,baseQueue:ci.baseQueue,queue:ci.queue,next:null},null===vi?Hr.memoizedState=vi=t:vi=vi.next=t}return vi}function vc(t,o){return"function"==typeof o?o(t):o}function bs(t){var o=Lo(),l=o.queue;if(null===l)throw Error(h(311));l.lastRenderedReducer=t;var w=ci,C=w.baseQueue,U=l.pending;if(null!==U){if(null!==C){var X=C.next;C.next=U.next,U.next=X}w.baseQueue=C=U,l.pending=null}if(null!==C){w=w.baseState;var _e=X=null,Ie=null,qe=U=C.next;do{var et=qe.lane;if((pu&et)===et)null!==Ie&&(Ie=Ie.next={lane:0,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null}),w=qe.hasEagerState?qe.eagerState:t(w,qe.action);else{var st={lane:et,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null};null===Ie?(_e=Ie=st,X=w):Ie=Ie.next=st,Hr.lanes|=et,ka|=et}qe=qe.next}while(null!==qe&&qe!==U);null===Ie?X=w:Ie.next=_e,Zo(w,o.memoizedState)||(to=!0),o.memoizedState=w,o.baseState=X,o.baseQueue=Ie,l.lastRenderedState=w}if(null!==(t=l.interleaved)){C=t;do{Hr.lanes|=U=C.lane,ka|=U,C=C.next}while(C!==t)}else null===C&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function Eh(t){var o=Lo(),l=o.queue;if(null===l)throw Error(h(311));l.lastRenderedReducer=t;var w=l.dispatch,C=l.pending,U=o.memoizedState;if(null!==C){l.pending=null;var X=C=C.next;do{U=t(U,X.action),X=X.next}while(X!==C);Zo(U,o.memoizedState)||(to=!0),o.memoizedState=U,null===o.baseQueue&&(o.baseState=U),l.lastRenderedState=U}return[U,w]}function Xg(){}function Sh(t,o){var l=Hr,w=Lo(),C=o(),U=!Zo(w.memoizedState,C);if(U&&(w.memoizedState=C,to=!0),Tf(_c.bind(null,l,w=w.queue,t),[t]),w.getSnapshot!==o||U||null!==vi&&1&vi.memoizedState.tag){if(l.flags|=2048,wl(9,Oh.bind(null,l,w,C,o),void 0,null),null===bi)throw Error(h(349));0!=(30&pu)||Zg(l,o,C)}return C}function Zg(t,o,l){t.flags|=16384,t={getSnapshot:o,value:l},null===(o=Hr.updateQueue)?(Hr.updateQueue=o={lastEffect:null,stores:null},o.stores=[t]):null===(l=o.stores)?o.stores=[t]:l.push(t)}function Oh(t,o,l,w){o.value=l,o.getSnapshot=w,Nf(o)&&e0(t)}function _c(t,o,l){return l(function(){Nf(o)&&e0(t)})}function Nf(t){var o=t.getSnapshot;t=t.value;try{var l=o();return!Zo(t,l)}catch{return!0}}function e0(t){var o=Xs(t,1);null!==o&&Uo(o,t,1,-1)}function rs(t){var o=_s();return"function"==typeof t&&(t=t()),o.memoizedState=o.baseState=t,o.queue=t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vc,lastRenderedState:t},t=t.dispatch=u0.bind(null,Hr,t),[o.memoizedState,t]}function wl(t,o,l,w){return t={tag:t,create:o,destroy:l,deps:w,next:null},null===(o=Hr.updateQueue)?(Hr.updateQueue=o={lastEffect:null,stores:null},o.lastEffect=t.next=t):null===(l=o.lastEffect)?o.lastEffect=t.next=t:(w=l.next,l.next=t,t.next=w,o.lastEffect=t),t}function t0(){return Lo().memoizedState}function El(t,o,l,w){var C=_s();Hr.flags|=t,C.memoizedState=wl(1|o,l,void 0,void 0===w?null:w)}function Af(t,o,l,w){var C=Lo();w=void 0===w?null:w;var U=void 0;if(null!==ci){var X=ci.memoizedState;if(U=X.destroy,null!==w&&bh(w,X.deps))return void(C.memoizedState=wl(o,l,U,w))}Hr.flags|=t,C.memoizedState=wl(1|o,l,U,w)}function xh(t,o){return El(8390656,8,t,o)}function Tf(t,o){return Af(2048,8,t,o)}function n0(t,o){return Af(4,2,t,o)}function r0(t,o){return Af(4,4,t,o)}function Sl(t,o){return"function"==typeof o?(t=t(),o(t),function(){o(null)}):null!=o?(t=t(),o.current=t,function(){o.current=null}):void 0}function Mf(t,o,l){return l=null!=l?l.concat([t]):null,Af(4,4,Sl.bind(null,o,t),l)}function Lf(){}function i0(t,o){var l=Lo();o=void 0===o?null:o;var w=l.memoizedState;return null!==w&&null!==o&&bh(o,w[1])?w[0]:(l.memoizedState=[t,o],t)}function o0(t,o){var l=Lo();o=void 0===o?null:o;var w=l.memoizedState;return null!==w&&null!==o&&bh(o,w[1])?w[0]:(t=t(),l.memoizedState=[t,o],t)}function s0(t,o,l){return 0==(21&pu)?(t.baseState&&(t.baseState=!1,to=!0),t.memoizedState=l):(Zo(l,o)||(l=nl(),Hr.lanes|=l,ka|=l,t.baseState=!0),o)}function sm(t,o){var l=tr;tr=0!==l&&4>l?l:4,t(!0);var w=_h.transition;_h.transition={};try{t(!1),o()}finally{tr=l,_h.transition=w}}function a0(){return Lo().memoizedState}function am(t,o,l){var w=Ta(t);l={lane:w,action:l,hasEagerState:!1,eagerState:null,next:null},c0(t)?Rh(o,l):null!==(l=$g(t,o,l,w))&&(Uo(l,t,w,wi()),l0(l,o,w))}function u0(t,o,l){var w=Ta(t),C={lane:w,action:l,hasEagerState:!1,eagerState:null,next:null};if(c0(t))Rh(o,C);else{var U=t.alternate;if(0===t.lanes&&(null===U||0===U.lanes)&&null!==(U=o.lastRenderedReducer))try{var X=o.lastRenderedState,_e=U(X,l);if(C.hasEagerState=!0,C.eagerState=_e,Zo(_e,X)){var Ie=o.interleaved;return null===Ie?(C.next=C,Of(o)):(C.next=Ie.next,Ie.next=C),void(o.interleaved=C)}}catch{}null!==(l=$g(t,o,C,w))&&(Uo(l,t,w,C=wi()),l0(l,o,w))}}function c0(t){var o=t.alternate;return t===Hr||null!==o&&o===Hr}function Rh(t,o){gu=mc=!0;var l=t.pending;null===l?o.next=o:(o.next=l.next,l.next=o),t.pending=o}function l0(t,o,l){if(0!=(4194240&l)){var w=o.lanes;l|=w&=t.pendingLanes,o.lanes=l,nu(t,l)}}var Uf={readContext:Mo,useCallback:_i,useContext:_i,useEffect:_i,useImperativeHandle:_i,useInsertionEffect:_i,useLayoutEffect:_i,useMemo:_i,useReducer:_i,useRef:_i,useState:_i,useDebugValue:_i,useDeferredValue:_i,useTransition:_i,useMutableSource:_i,useSyncExternalStore:_i,useId:_i,unstable_isNewReconciler:!1},f0={readContext:Mo,useCallback:function(t,o){return _s().memoizedState=[t,void 0===o?null:o],t},useContext:Mo,useEffect:xh,useImperativeHandle:function(t,o,l){return l=null!=l?l.concat([t]):null,El(4194308,4,Sl.bind(null,o,t),l)},useLayoutEffect:function(t,o){return El(4194308,4,t,o)},useInsertionEffect:function(t,o){return El(4,2,t,o)},useMemo:function(t,o){var l=_s();return o=void 0===o?null:o,t=t(),l.memoizedState=[t,o],t},useReducer:function(t,o,l){var w=_s();return o=void 0!==l?l(o):o,w.memoizedState=w.baseState=o,w.queue=t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:o},t=t.dispatch=am.bind(null,Hr,t),[w.memoizedState,t]},useRef:function(t){return t={current:t},_s().memoizedState=t},useState:rs,useDebugValue:Lf,useDeferredValue:function(t){return _s().memoizedState=t},useTransition:function(){var t=rs(!1),o=t[0];return t=sm.bind(null,t[1]),_s().memoizedState=t,[o,t]},useMutableSource:function(){},useSyncExternalStore:function(t,o,l){var w=Hr,C=_s();if(jr){if(void 0===l)throw Error(h(407));l=l()}else{if(l=o(),null===bi)throw Error(h(349));0!=(30&pu)||Zg(w,o,l)}C.memoizedState=l;var U={value:l,getSnapshot:o};return C.queue=U,xh(_c.bind(null,w,U,t),[t]),w.flags|=2048,wl(9,Oh.bind(null,w,U,l,o),void 0,null),l},useId:function(){var t=_s(),o=bi.identifierPrefix;if(jr){var l=Js;o=":"+o+"R"+(l=(gs&~(1<<32-Xi(gs)-1)).toString(32)+l),0<(l=Ra++)&&(o+="H"+l.toString(32)),o+=":"}else o=":"+o+"r"+(l=Ui++).toString(32)+":";return t.memoizedState=o},unstable_isNewReconciler:!1},um={readContext:Mo,useCallback:i0,useContext:Mo,useEffect:Tf,useImperativeHandle:Mf,useInsertionEffect:n0,useLayoutEffect:r0,useMemo:o0,useReducer:bs,useRef:t0,useState:function(){return bs(vc)},useDebugValue:Lf,useDeferredValue:function(t){return s0(Lo(),ci.memoizedState,t)},useTransition:function(){return[bs(vc)[0],Lo().memoizedState]},useMutableSource:Xg,useSyncExternalStore:Sh,useId:a0,unstable_isNewReconciler:!1},cm={readContext:Mo,useCallback:i0,useContext:Mo,useEffect:Tf,useImperativeHandle:Mf,useInsertionEffect:n0,useLayoutEffect:r0,useMemo:o0,useReducer:Eh,useRef:t0,useState:function(){return Eh(vc)},useDebugValue:Lf,useDeferredValue:function(t){var o=Lo();return null===ci?o.memoizedState=t:s0(o,ci.memoizedState,t)},useTransition:function(){return[Eh(vc)[0],Lo().memoizedState]},useMutableSource:Xg,useSyncExternalStore:Sh,useId:a0,unstable_isNewReconciler:!1};function bc(t,o){try{var l="",w=o;do{l+=Fe(w),w=w.return}while(w);var C=l}catch(U){C="\nError generating stack: "+U.message+"\n"+U.stack}return{value:t,source:o,stack:C,digest:null}}function vr(t,o,l){return{value:t,source:null,stack:l??null,digest:o??null}}function ea(t,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var wc="function"==typeof WeakMap?WeakMap:Map;function d0(t,o,l){(l=ys(-1,l)).tag=3,l.payload={element:null};var w=o.value;return l.callback=function(){oo||(oo=!0,Ss=w),ea(0,o)},l}function h0(t,o,l){(l=ys(-1,l)).tag=3;var w=t.type.getDerivedStateFromError;if("function"==typeof w){var C=o.value;l.payload=function(){return w(C)},l.callback=function(){ea(0,o)}}var U=t.stateNode;return null!==U&&"function"==typeof U.componentDidCatch&&(l.callback=function(){ea(0,o),"function"!=typeof w&&(null===Or?Or=new Set([this]):Or.add(this));var X=o.stack;this.componentDidCatch(o.value,{componentStack:null!==X?X:""})}),l}function Df(t,o,l){var w=t.pingCache;if(null===w){w=t.pingCache=new wc;var C=new Set;w.set(o,C)}else void 0===(C=w.get(o))&&(C=new Set,w.set(o,C));C.has(l)||(C.add(l),t=Vi.bind(null,t,o,l),o.then(t,t))}function p0(t){do{var o;if((o=13===t.tag)&&(o=null===(o=t.memoizedState)||null!==o.dehydrated),o)return t;t=t.return}while(null!==t);return null}function g0(t,o,l,w,C){return 0==(1&t.mode)?(t===o?t.flags|=65536:(t.flags|=128,l.flags|=131072,l.flags&=-52805,1===l.tag&&(null===l.alternate?l.tag=17:((o=ys(-1,1)).tag=2,ms(l,o,1))),l.lanes|=1),t):(t.flags|=65536,t.lanes=C,t)}var Ih=Z.ReactCurrentOwner,to=!1;function no(t,o,l,w){o.child=null===t?mh(o,null,l,w):pc(o,t.child,l,w)}function Ch(t,o,l,w,C){l=l.render;var U=o.ref;return fc(o,C),w=wh(t,o,l,w,U,C),l=kf(),null===t||to?(jr&&l&&ih(o),o.flags|=1,no(t,o,w,C),o.child):(o.updateQueue=t.updateQueue,o.flags&=-2053,t.lanes&=~C,ws(t,o,C))}function y0(t,o,l,w,C){if(null===t){var U=l.type;return"function"!=typeof U||ep(U)||void 0!==U.defaultProps||null!==l.compare||void 0!==l.defaultProps?((t=Kf(l.type,null,w,o,o.mode,C)).ref=o.ref,t.return=o,o.child=t):(o.tag=15,o.type=U,m0(t,o,U,w,C))}return U=t.child,0==(t.lanes&C)&&(l=null!==(l=l.compare)?l:cl)(U.memoizedProps,w)&&t.ref===o.ref?ws(t,o,C):(o.flags|=1,(t=Ua(U,w)).ref=o.ref,t.return=o,o.child=t)}function m0(t,o,l,w,C){if(null!==t){var U=t.memoizedProps;if(cl(U,w)&&t.ref===o.ref){if(to=!1,o.pendingProps=w=U,0==(t.lanes&C))return o.lanes=t.lanes,ws(t,o,C);0!=(131072&t.flags)&&(to=!0)}}return Ol(t,o,l,w,C)}function v0(t,o,l){var w=o.pendingProps,C=w.children,U=null!==t?t.memoizedState:null;if("hidden"===w.mode)if(0==(1&o.mode))o.memoizedState={baseLanes:0,cachePool:null,transitions:null},kr(xc,bo),bo|=l;else{if(0==(1073741824&l))return t=null!==U?U.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:t,cachePool:null,transitions:null},o.updateQueue=null,kr(xc,bo),bo|=t,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},w=null!==U?U.baseLanes:l,kr(xc,bo),bo|=w}else null!==U?(w=U.baseLanes|l,o.memoizedState=null):w=l,kr(xc,bo),bo|=w;return no(t,o,C,l),o.child}function _0(t,o){var l=o.ref;(null===t&&null!==l||null!==t&&t.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Ol(t,o,l,w,C){var U=yo(l)?au:Ci.current;return U=sc(o,U),fc(o,C),l=wh(t,o,l,w,U,C),w=kf(),null===t||to?(jr&&w&&ih(o),o.flags|=1,no(t,o,l,C),o.child):(o.updateQueue=t.updateQueue,o.flags&=-2053,t.lanes&=~C,ws(t,o,C))}function Ph(t,o,l,w,C){if(yo(l)){var U=!0;uu(o)}else U=!1;if(fc(o,C),null===o.stateNode)Ff(t,o),Qg(o,l,w),Cf(o,l,w,C),w=!0;else if(null===t){var X=o.stateNode,_e=o.memoizedProps;X.props=_e;var Ie=X.context,qe=l.contextType;qe="object"==typeof qe&&null!==qe?Mo(qe):sc(o,qe=yo(l)?au:Ci.current);var et=l.getDerivedStateFromProps,st="function"==typeof et||"function"==typeof X.getSnapshotBeforeUpdate;st||"function"!=typeof X.UNSAFE_componentWillReceiveProps&&"function"!=typeof X.componentWillReceiveProps||(_e!==w||Ie!==qe)&&gh(o,X,w,qe),Zs=!1;var nt=o.memoizedState;X.state=nt,Rf(o,w,X,C),Ie=o.memoizedState,_e!==w||nt!==Ie||eo.current||Zs?("function"==typeof et&&(ph(o,l,et,w),Ie=o.memoizedState),(_e=Zs||Yg(o,l,_e,w,nt,Ie,qe))?(st||"function"!=typeof X.UNSAFE_componentWillMount&&"function"!=typeof X.componentWillMount||("function"==typeof X.componentWillMount&&X.componentWillMount(),"function"==typeof X.UNSAFE_componentWillMount&&X.UNSAFE_componentWillMount()),"function"==typeof X.componentDidMount&&(o.flags|=4194308)):("function"==typeof X.componentDidMount&&(o.flags|=4194308),o.memoizedProps=w,o.memoizedState=Ie),X.props=w,X.state=Ie,X.context=qe,w=_e):("function"==typeof X.componentDidMount&&(o.flags|=4194308),w=!1)}else{X=o.stateNode,Vg(t,o),_e=o.memoizedProps,qe=o.type===o.elementType?_e:ns(o.type,_e),X.props=qe,st=o.pendingProps,nt=X.context,Ie="object"==typeof(Ie=l.contextType)&&null!==Ie?Mo(Ie):sc(o,Ie=yo(l)?au:Ci.current);var ut=l.getDerivedStateFromProps;(et="function"==typeof ut||"function"==typeof X.getSnapshotBeforeUpdate)||"function"!=typeof X.UNSAFE_componentWillReceiveProps&&"function"!=typeof X.componentWillReceiveProps||(_e!==st||nt!==Ie)&&gh(o,X,w,Ie),Zs=!1,X.state=nt=o.memoizedState,Rf(o,w,X,C);var wt=o.memoizedState;_e!==st||nt!==wt||eo.current||Zs?("function"==typeof ut&&(ph(o,l,ut,w),wt=o.memoizedState),(qe=Zs||Yg(o,l,qe,w,nt,wt,Ie)||!1)?(et||"function"!=typeof X.UNSAFE_componentWillUpdate&&"function"!=typeof X.componentWillUpdate||("function"==typeof X.componentWillUpdate&&X.componentWillUpdate(w,wt,Ie),"function"==typeof X.UNSAFE_componentWillUpdate&&X.UNSAFE_componentWillUpdate(w,wt,Ie)),"function"==typeof X.componentDidUpdate&&(o.flags|=4),"function"==typeof X.getSnapshotBeforeUpdate&&(o.flags|=1024)):("function"!=typeof X.componentDidUpdate||_e===t.memoizedProps&&nt===t.memoizedState||(o.flags|=4),"function"!=typeof X.getSnapshotBeforeUpdate||_e===t.memoizedProps&&nt===t.memoizedState||(o.flags|=1024),o.memoizedProps=w,o.memoizedState=wt),X.props=w,X.state=wt,X.context=Ie,w=qe):("function"!=typeof X.componentDidUpdate||_e===t.memoizedProps&&nt===t.memoizedState||(o.flags|=4),"function"!=typeof X.getSnapshotBeforeUpdate||_e===t.memoizedProps&&nt===t.memoizedState||(o.flags|=1024),w=!1)}return jf(t,o,l,w,U,C)}function jf(t,o,l,w,C,U){_0(t,o);var X=0!=(128&o.flags);if(!w&&!X)return C&&ac(o,l,!1),ws(t,o,U);w=o.stateNode,Ih.current=o;var _e=X&&"function"!=typeof l.getDerivedStateFromError?null:w.render();return o.flags|=1,null!==t&&X?(o.child=pc(o,t.child,null,U),o.child=pc(o,null,_e,U)):no(t,o,_e,U),o.memoizedState=w.state,C&&ac(o,l,!0),o.child}function b0(t){var o=t.stateNode;o.pendingContext?rh(0,o.pendingContext,o.pendingContext!==o.context):o.context&&rh(0,o.context,!1),Pf(t,o.containerInfo)}function Ec(t,o,l,w,C){return lc(),uh(C),o.flags|=256,no(t,o,l,w),o.child}var w0,zf,kh,Nh,xl={dehydrated:null,treeContext:null,retryLane:0};function Ah(t){return{baseLanes:t,cachePool:null,transitions:null}}function E0(t,o,l){var w,C=o.pendingProps,U=Fr.current,X=!1,_e=0!=(128&o.flags);if((w=_e)||(w=(null===t||null!==t.memoizedState)&&0!=(2&U)),w?(X=!0,o.flags&=-129):null!==t&&null===t.memoizedState||(U|=1),kr(Fr,1&U),null===t)return ah(o),null!==(t=o.memoizedState)&&null!==(t=t.dehydrated)?(o.lanes=0==(1&o.mode)?1:"$!"===t.data?8:1073741824,null):(_e=C.children,t=C.fallback,X?(X=o.child,_e={mode:"hidden",children:_e},0==(1&(C=o.mode))&&null!==X?(X.childLanes=0,X.pendingProps=_e):X=Gf(_e,C,0,null),t=Da(t,C,l,null),X.return=o,t.return=o,X.sibling=t,o.child=X,o.child.memoizedState=Ah(l),o.memoizedState=xl,t):Th(o,_e));if(null!==(U=t.memoizedState)&&null!==(w=U.dehydrated))return function(qe,et,st,nt,ut,wt,St){if(st)return 256&et.flags?(et.flags&=-257,Bf(qe,et,St,nt=vr(Error(h(422))))):null!==et.memoizedState?(et.child=qe.child,et.flags|=128,null):(wt=nt.fallback,nt=Gf({mode:"visible",children:nt.children},ut=et.mode,0,null),(wt=Da(wt,ut,St,null)).flags|=2,nt.return=et,wt.return=et,nt.sibling=wt,et.child=nt,0!=(1&et.mode)&&pc(et,qe.child,null,St),et.child.memoizedState=Ah(St),et.memoizedState=xl,wt);if(0==(1&et.mode))return Bf(qe,et,St,null);if("$!"===ut.data){if(nt=ut.nextSibling&&ut.nextSibling.dataset)var ot=nt.dgst;return nt=ot,Bf(qe,et,St,nt=vr(wt=Error(h(419)),nt,void 0))}if(ot=0!=(St&qe.childLanes),to||ot){if(null!==(nt=bi)){switch(St&-St){case 4:ut=2;break;case 16:ut=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:ut=32;break;case 536870912:ut=268435456;break;default:ut=0}0!==(ut=0!=(ut&(nt.suspendedLanes|St))?0:ut)&&ut!==wt.retryLane&&(wt.retryLane=ut,Xs(qe,ut),Uo(nt,qe,ut,-1))}return Jh(),Bf(qe,et,St,nt=vr(Error(h(421))))}return"$?"===ut.data?(et.flags|=128,et.child=qe.child,et=Zh.bind(null,qe),ut._reactRetry=et,null):(qe=wt.treeContext,vo=Ks(ut.nextSibling),mo=et,jr=!0,ts=null,null!==qe&&(Ao[To++]=gs,Ao[To++]=Js,Ao[To++]=cu,gs=qe.id,Js=qe.overflow,cu=et),(et=Th(et,nt.children)).flags|=4096,et)}(t,o,_e,C,w,U,l);if(X){X=C.fallback,w=(U=t.child).sibling;var Ie={mode:"hidden",children:C.children};return 0==(1&(_e=o.mode))&&o.child!==U?((C=o.child).childLanes=0,C.pendingProps=Ie,o.deletions=null):(C=Ua(U,Ie)).subtreeFlags=14680064&U.subtreeFlags,null!==w?X=Ua(w,X):(X=Da(X,_e,l,null)).flags|=2,X.return=o,C.return=o,C.sibling=X,o.child=C,C=X,X=o.child,_e=null===(_e=t.child.memoizedState)?Ah(l):{baseLanes:_e.baseLanes|l,cachePool:null,transitions:_e.transitions},X.memoizedState=_e,X.childLanes=t.childLanes&~l,o.memoizedState=xl,C}return t=(X=t.child).sibling,C=Ua(X,{mode:"visible",children:C.children}),0==(1&o.mode)&&(C.lanes=l),C.return=o,C.sibling=null,null!==t&&(null===(l=o.deletions)?(o.deletions=[t],o.flags|=16):l.push(t)),o.child=C,o.memoizedState=null,C}function Th(t,o){return(o=Gf({mode:"visible",children:o},t.mode,0,null)).return=t,t.child=o}function Bf(t,o,l,w){return null!==w&&uh(w),pc(o,t.child,null,l),(t=Th(o,o.pendingProps.children)).flags|=2,o.memoizedState=null,t}function S0(t,o,l){t.lanes|=o;var w=t.alternate;null!==w&&(w.lanes|=o),dh(t.return,o,l)}function Mh(t,o,l,w,C){var U=t.memoizedState;null===U?t.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:w,tail:l,tailMode:C}:(U.isBackwards=o,U.rendering=null,U.renderingStartTime=0,U.last=w,U.tail=l,U.tailMode=C)}function O0(t,o,l){var w=o.pendingProps,C=w.revealOrder,U=w.tail;if(no(t,o,w.children,l),0!=(2&(w=Fr.current)))w=1&w|2,o.flags|=128;else{if(null!==t&&0!=(128&t.flags))e:for(t=o.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&S0(t,l,o);else if(19===t.tag)S0(t,l,o);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===o)break e;for(;null===t.sibling;){if(null===t.return||t.return===o)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}w&=1}if(kr(Fr,w),0==(1&o.mode))o.memoizedState=null;else switch(C){case"forwards":for(l=o.child,C=null;null!==l;)null!==(t=l.alternate)&&null===mi(t)&&(C=l),l=l.sibling;null===(l=C)?(C=o.child,o.child=null):(C=l.sibling,l.sibling=null),Mh(o,!1,C,l,U);break;case"backwards":for(l=null,C=o.child,o.child=null;null!==C;){if(null!==(t=C.alternate)&&null===mi(t)){o.child=C;break}t=C.sibling,C.sibling=l,l=C,C=t}Mh(o,!0,l,null,U);break;case"together":Mh(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Ff(t,o){0==(1&o.mode)&&null!==t&&(t.alternate=null,o.alternate=null,o.flags|=2)}function ws(t,o,l){if(null!==t&&(o.dependencies=t.dependencies),ka|=o.lanes,0==(l&o.childLanes))return null;if(null!==t&&o.child!==t.child)throw Error(h(153));if(null!==o.child){for(l=Ua(t=o.child,t.pendingProps),o.child=l,l.return=o;null!==t.sibling;)(l=l.sibling=Ua(t=t.sibling,t.pendingProps)).return=o;l.sibling=null}return o.child}function Sc(t,o){if(!jr)switch(t.tailMode){case"hidden":o=t.tail;for(var l=null;null!==o;)null!==o.alternate&&(l=o),o=o.sibling;null===l?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var w=null;null!==l;)null!==l.alternate&&(w=l),l=l.sibling;null===w?o||null===t.tail?t.tail=null:t.tail.sibling=null:w.sibling=null}}function hr(t){var o=null!==t.alternate&&t.alternate.child===t.child,l=0,w=0;if(o)for(var C=t.child;null!==C;)l|=C.lanes|C.childLanes,w|=14680064&C.subtreeFlags,w|=14680064&C.flags,C.return=t,C=C.sibling;else for(C=t.child;null!==C;)l|=C.lanes|C.childLanes,w|=C.subtreeFlags,w|=C.flags,C.return=t,C=C.sibling;return t.subtreeFlags|=w,t.childLanes=l,o}function Lh(t,o,l){var w=o.pendingProps;switch(oh(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hr(o),null;case 1:case 17:return yo(o.type)&&nh(),hr(o),null;case 3:return w=o.stateNode,hu(),Pr(eo),Pr(Ci),yc(),w.pendingContext&&(w.context=w.pendingContext,w.pendingContext=null),null!==t&&null!==t.child||(wf(o)?o.flags|=4:null===t||t.memoizedState.isDehydrated&&0==(256&o.flags)||(o.flags|=1024,null!==ts&&(Kh(ts),ts=null))),zf(t,o),hr(o),null;case 5:_l(o);var C=xa(vl.current);if(l=o.type,null!==t&&null!=o.stateNode)kh(t,o,l,w,C),t.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!w){if(null===o.stateNode)throw Error(h(166));return hr(o),null}if(t=xa(vs.current),wf(o)){l=o.type;var U=o.memoizedProps;switch((w=o.stateNode)[es]=o,w[rc]=U,t=0!=(1&o.mode),l){case"dialog":Sr("cancel",w),Sr("close",w);break;case"iframe":case"object":case"embed":Sr("load",w);break;case"video":case"audio":for(C=0;C<hl.length;C++)Sr(hl[C],w);break;case"source":Sr("error",w);break;case"img":case"image":case"link":Sr("error",w),Sr("load",w);break;case"details":Sr("toggle",w);break;case"input":$(w,U),Sr("invalid",w);break;case"select":w._wrapperState={wasMultiple:!!U.multiple},Sr("invalid",w);break;case"textarea":tn(w,U),Sr("invalid",w)}for(var X in pa(l,U),C=null,U)if(U.hasOwnProperty(X)){var _e=U[X];"children"===X?"string"==typeof _e?w.textContent!==_e&&(!0!==U.suppressHydrationWarning&&gf(w.textContent,_e,t),C=["children",_e]):"number"==typeof _e&&w.textContent!==""+_e&&(!0!==U.suppressHydrationWarning&&gf(w.textContent,_e,t),C=["children",""+_e]):f.hasOwnProperty(X)&&null!=_e&&"onScroll"===X&&Sr("scroll",w)}switch(l){case"input":gt(w),Le(w,U,!0);break;case"textarea":gt(w),Cn(w);break;case"select":case"option":break;default:"function"==typeof U.onClick&&(w.onclick=yf)}o.updateQueue=w=C,null!==w&&(o.flags|=4)}else{X=9===C.nodeType?C:C.ownerDocument,"http://www.w3.org/1999/xhtml"===t&&(t=vn(l)),"http://www.w3.org/1999/xhtml"===t?"script"===l?((t=X.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"==typeof w.is?t=X.createElement(l,{is:w.is}):(t=X.createElement(l),"select"===l&&(X=t,w.multiple?X.multiple=!0:w.size&&(X.size=w.size))):t=X.createElementNS(t,l),t[es]=o,t[rc]=w,w0(t,o,!1,!1),o.stateNode=t;e:{switch(X=cs(l,w),l){case"dialog":Sr("cancel",t),Sr("close",t),C=w;break;case"iframe":case"object":case"embed":Sr("load",t),C=w;break;case"video":case"audio":for(C=0;C<hl.length;C++)Sr(hl[C],t);C=w;break;case"source":Sr("error",t),C=w;break;case"img":case"image":case"link":Sr("error",t),Sr("load",t),C=w;break;case"details":Sr("toggle",t),C=w;break;case"input":$(t,w),C=D(t,w),Sr("invalid",t);break;case"option":default:C=w;break;case"select":t._wrapperState={wasMultiple:!!w.multiple},C=de({},w,{value:void 0}),Sr("invalid",t);break;case"textarea":tn(t,w),C=Tt(t,w),Sr("invalid",t)}for(U in pa(l,C),_e=C)if(_e.hasOwnProperty(U)){var Ie=_e[U];"style"===U?Ga(t,Ie):"dangerouslySetInnerHTML"===U?null!=(Ie=Ie?Ie.__html:void 0)&&dr(t,Ie):"children"===U?"string"==typeof Ie?("textarea"!==l||""!==Ie)&&Vn(t,Ie):"number"==typeof Ie&&Vn(t,""+Ie):"suppressContentEditableWarning"!==U&&"suppressHydrationWarning"!==U&&"autoFocus"!==U&&(f.hasOwnProperty(U)?null!=Ie&&"onScroll"===U&&Sr("scroll",t):null!=Ie&&V(t,U,Ie,X))}switch(l){case"input":gt(t),Le(t,w,!1);break;case"textarea":gt(t),Cn(t);break;case"option":null!=w.value&&t.setAttribute("value",""+at(w.value));break;case"select":t.multiple=!!w.multiple,null!=(U=w.value)?_t(t,!!w.multiple,U,!1):null!=w.defaultValue&&_t(t,!!w.multiple,w.defaultValue,!0);break;default:"function"==typeof C.onClick&&(t.onclick=yf)}switch(l){case"button":case"input":case"select":case"textarea":w=!!w.autoFocus;break e;case"img":w=!0;break e;default:w=!1}}w&&(o.flags|=4)}null!==o.ref&&(o.flags|=512,o.flags|=2097152)}return hr(o),null;case 6:if(t&&null!=o.stateNode)Nh(t,o,t.memoizedProps,w);else{if("string"!=typeof w&&null===o.stateNode)throw Error(h(166));if(l=xa(vl.current),xa(vs.current),wf(o)){if(l=o.memoizedProps,(w=o.stateNode)[es]=o,(U=w.nodeValue!==l)&&null!==(t=mo))switch(t.tag){case 3:gf(w.nodeValue,l,0!=(1&t.mode));break;case 5:!0!==t.memoizedProps.suppressHydrationWarning&&gf(w.nodeValue,l,0!=(1&t.mode))}U&&(o.flags|=4)}else(w=(9===l.nodeType?l:l.ownerDocument).createTextNode(w))[es]=o,o.stateNode=w}return hr(o),null;case 13:if(Pr(Fr),w=o.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(jr&&null!==vo&&0!=(1&o.mode)&&0==(128&o.flags))qg(),lc(),o.flags|=98560,U=!1;else if(U=wf(o),null!==w&&null!==w.dehydrated){if(null===t){if(!U)throw Error(h(318));if(!(U=null!==(U=o.memoizedState)?U.dehydrated:null))throw Error(h(317));U[es]=o}else lc(),0==(128&o.flags)&&(o.memoizedState=null),o.flags|=4;hr(o),U=!1}else null!==ts&&(Kh(ts),ts=null),U=!0;if(!U)return 65536&o.flags?o:null}return 0!=(128&o.flags)?(o.lanes=l,o):((w=null!==w)!=(null!==t&&null!==t.memoizedState)&&w&&(o.child.flags|=8192,0!=(1&o.mode)&&(null===t||0!=(1&Fr.current)?0===li&&(li=3):Jh())),null!==o.updateQueue&&(o.flags|=4),hr(o),null);case 4:return hu(),zf(t,o),null===t&&ou(o.stateNode.containerInfo),hr(o),null;case 10:return fh(o.type._context),hr(o),null;case 19:if(Pr(Fr),null===(U=o.memoizedState))return hr(o),null;if(w=0!=(128&o.flags),null===(X=U.rendering))if(w)Sc(U,!1);else{if(0!==li||null!==t&&0!=(128&t.flags))for(t=o.child;null!==t;){if(null!==(X=mi(t))){for(o.flags|=128,Sc(U,!1),null!==(w=X.updateQueue)&&(o.updateQueue=w,o.flags|=4),o.subtreeFlags=0,w=l,l=o.child;null!==l;)t=w,(U=l).flags&=14680066,null===(X=U.alternate)?(U.childLanes=0,U.lanes=t,U.child=null,U.subtreeFlags=0,U.memoizedProps=null,U.memoizedState=null,U.updateQueue=null,U.dependencies=null,U.stateNode=null):(U.childLanes=X.childLanes,U.lanes=X.lanes,U.child=X.child,U.subtreeFlags=0,U.deletions=null,U.memoizedProps=X.memoizedProps,U.memoizedState=X.memoizedState,U.updateQueue=X.updateQueue,U.type=X.type,U.dependencies=null===(t=X.dependencies)?null:{lanes:t.lanes,firstContext:t.firstContext}),l=l.sibling;return kr(Fr,1&Fr.current|2),o.child}t=t.sibling}null!==U.tail&&kt()>Rc&&(o.flags|=128,w=!0,Sc(U,!1),o.lanes=4194304)}else{if(!w)if(null!==(t=mi(X))){if(o.flags|=128,w=!0,null!==(l=t.updateQueue)&&(o.updateQueue=l,o.flags|=4),Sc(U,!0),null===U.tail&&"hidden"===U.tailMode&&!X.alternate&&!jr)return hr(o),null}else 2*kt()-U.renderingStartTime>Rc&&1073741824!==l&&(o.flags|=128,w=!0,Sc(U,!1),o.lanes=4194304);U.isBackwards?(X.sibling=o.child,o.child=X):(null!==(l=U.last)?l.sibling=X:o.child=X,U.last=X)}return null!==U.tail?(U.rendering=o=U.tail,U.tail=o.sibling,U.renderingStartTime=kt(),o.sibling=null,l=Fr.current,kr(Fr,w?1&l|2:1&l),o):(hr(o),null);case 22:case 23:return Qh(),w=null!==o.memoizedState,null!==t&&null!==t.memoizedState!==w&&(o.flags|=8192),w&&0!=(1&o.mode)?0!=(1073741824&bo)&&(hr(o),6&o.subtreeFlags&&(o.flags|=8192)):hr(o),null;case 24:case 25:return null}throw Error(h(156,o.tag))}function Uh(t,o){switch(oh(o),o.tag){case 1:return yo(o.type)&&nh(),65536&(t=o.flags)?(o.flags=-65537&t|128,o):null;case 3:return hu(),Pr(eo),Pr(Ci),yc(),0!=(65536&(t=o.flags))&&0==(128&t)?(o.flags=-65537&t|128,o):null;case 5:return _l(o),null;case 13:if(Pr(Fr),null!==(t=o.memoizedState)&&null!==t.dehydrated){if(null===o.alternate)throw Error(h(340));lc()}return 65536&(t=o.flags)?(o.flags=-65537&t|128,o):null;case 19:return Pr(Fr),null;case 4:return hu(),null;case 10:return fh(o.type._context),null;case 22:case 23:return Qh(),null;default:return null}}w0=function(t,o){for(var l=o.child;null!==l;){if(5===l.tag||6===l.tag)t.appendChild(l.stateNode);else if(4!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===o)break;for(;null===l.sibling;){if(null===l.return||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},zf=function(){},kh=function(t,o,l,w){var C=t.memoizedProps;if(C!==w){t=o.stateNode,xa(vs.current);var U,X=null;switch(l){case"input":C=D(t,C),w=D(t,w),X=[];break;case"select":C=de({},C,{value:void 0}),w=de({},w,{value:void 0}),X=[];break;case"textarea":C=Tt(t,C),w=Tt(t,w),X=[];break;default:"function"!=typeof C.onClick&&"function"==typeof w.onClick&&(t.onclick=yf)}for(qe in pa(l,w),l=null,C)if(!w.hasOwnProperty(qe)&&C.hasOwnProperty(qe)&&null!=C[qe])if("style"===qe){var _e=C[qe];for(U in _e)_e.hasOwnProperty(U)&&(l||(l={}),l[U]="")}else"dangerouslySetInnerHTML"!==qe&&"children"!==qe&&"suppressContentEditableWarning"!==qe&&"suppressHydrationWarning"!==qe&&"autoFocus"!==qe&&(f.hasOwnProperty(qe)?X||(X=[]):(X=X||[]).push(qe,null));for(qe in w){var Ie=w[qe];if(_e=null!=C?C[qe]:void 0,w.hasOwnProperty(qe)&&Ie!==_e&&(null!=Ie||null!=_e))if("style"===qe)if(_e){for(U in _e)!_e.hasOwnProperty(U)||Ie&&Ie.hasOwnProperty(U)||(l||(l={}),l[U]="");for(U in Ie)Ie.hasOwnProperty(U)&&_e[U]!==Ie[U]&&(l||(l={}),l[U]=Ie[U])}else l||(X||(X=[]),X.push(qe,l)),l=Ie;else"dangerouslySetInnerHTML"===qe?(_e=_e?_e.__html:void 0,null!=(Ie=Ie?Ie.__html:void 0)&&_e!==Ie&&(X=X||[]).push(qe,Ie)):"children"===qe?"string"!=typeof Ie&&"number"!=typeof Ie||(X=X||[]).push(qe,""+Ie):"suppressContentEditableWarning"!==qe&&"suppressHydrationWarning"!==qe&&(f.hasOwnProperty(qe)?(null!=Ie&&"onScroll"===qe&&Sr("scroll",t),X||_e===Ie||(X=[])):(X=X||[]).push(qe,Ie))}l&&(X=X||[]).push("style",l);var qe=X;(o.updateQueue=qe)&&(o.flags|=4)}},Nh=function(t,o,l,w){l!==w&&(o.flags|=4)};var Rl=!1,Wr=!1,lm="function"==typeof WeakSet?WeakSet:Set,Qt=null;function Ia(t,o){var l=t.ref;if(null!==l)if("function"==typeof l)try{l(null)}catch(w){xr(t,o,w)}else l.current=null}function Hf(t,o,l){try{l()}catch(w){xr(t,o,w)}}var x0=!1;function yu(t,o,l){var w=o.updateQueue;if(null!==(w=null!==w?w.lastEffect:null)){var C=w=w.next;do{if((C.tag&t)===t){var U=C.destroy;C.destroy=void 0,void 0!==U&&Hf(o,l,U)}C=C.next}while(C!==w)}}function qf(t,o){if(null!==(o=null!==(o=o.updateQueue)?o.lastEffect:null)){var l=o=o.next;do{(l.tag&t)===t&&(l.destroy=(0,l.create)()),l=l.next}while(l!==o)}}function Dh(t){var o=t.ref;null!==o&&(t=t.stateNode,"function"==typeof o?o(t):o.current=t)}function mu(t){var o=t.alternate;null!==o&&(t.alternate=null,mu(o)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(o=t.stateNode)&&(delete o[es],delete o[rc],delete o[eh],delete o[rm],delete o[im]),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function R0(t){return 5===t.tag||3===t.tag||4===t.tag}function Oc(t){e:for(;;){for(;null===t.sibling;){if(null===t.return||R0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags||null===t.child||4===t.tag)continue e;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function jh(t,o,l){var w=t.tag;if(5===w||6===w)t=t.stateNode,o?8===l.nodeType?l.parentNode.insertBefore(t,o):l.insertBefore(t,o):(8===l.nodeType?(o=l.parentNode).insertBefore(t,l):(o=l).appendChild(t),null!=(l=l._reactRootContainer)||null!==o.onclick||(o.onclick=yf));else if(4!==w&&null!==(t=t.child))for(jh(t,o,l),t=t.sibling;null!==t;)jh(t,o,l),t=t.sibling}function zh(t,o,l){var w=t.tag;if(5===w||6===w)t=t.stateNode,o?l.insertBefore(t,o):l.appendChild(t);else if(4!==w&&null!==(t=t.child))for(zh(t,o,l),t=t.sibling;null!==t;)zh(t,o,l),t=t.sibling}var $i=null,_o=!1;function Ca(t,o,l){for(l=l.child;null!==l;)Bh(t,o,l),l=l.sibling}function Bh(t,o,l){if(po&&"function"==typeof po.onCommitFiberUnmount)try{po.onCommitFiberUnmount(Hs,l)}catch{}switch(l.tag){case 5:Wr||Ia(l,o);case 6:var w=$i,C=_o;$i=null,Ca(t,o,l),_o=C,null!==($i=w)&&(_o?(l=l.stateNode,8===(t=$i).nodeType?t.parentNode.removeChild(l):t.removeChild(l)):$i.removeChild(l.stateNode));break;case 18:null!==$i&&(_o?(l=l.stateNode,8===(t=$i).nodeType?Zd(t.parentNode,l):1===t.nodeType&&Zd(t,l),Jr(t)):Zd($i,l.stateNode));break;case 4:w=$i,C=_o,$i=l.stateNode.containerInfo,_o=!0,Ca(t,o,l),$i=w,_o=C;break;case 0:case 11:case 14:case 15:if(!Wr&&null!==(w=l.updateQueue)&&null!==(w=w.lastEffect)){C=w=w.next;do{var U=C,X=U.destroy;U=U.tag,void 0!==X&&(0!=(2&U)||0!=(4&U))&&Hf(l,o,X),C=C.next}while(C!==w)}Ca(t,o,l);break;case 1:if(!Wr&&(Ia(l,o),"function"==typeof(w=l.stateNode).componentWillUnmount))try{w.props=l.memoizedProps,w.state=l.memoizedState,w.componentWillUnmount()}catch(_e){xr(l,o,_e)}Ca(t,o,l);break;case 21:Ca(t,o,l);break;case 22:1&l.mode?(Wr=(w=Wr)||null!==l.memoizedState,Ca(t,o,l),Wr=w):Ca(t,o,l);break;default:Ca(t,o,l)}}function Fh(t){var o=t.updateQueue;if(null!==o){t.updateQueue=null;var l=t.stateNode;null===l&&(l=t.stateNode=new lm),o.forEach(function(w){var C=dm.bind(null,t,w);l.has(w)||(l.add(w),w.then(C,C))})}}function Es(t,o){var l=o.deletions;if(null!==l)for(var w=0;w<l.length;w++){var C=l[w];try{var U=t,X=o,_e=X;e:for(;null!==_e;){switch(_e.tag){case 5:$i=_e.stateNode,_o=!1;break e;case 3:case 4:$i=_e.stateNode.containerInfo,_o=!0;break e}_e=_e.return}if(null===$i)throw Error(h(160));Bh(U,X,C),$i=null,_o=!1;var Ie=C.alternate;null!==Ie&&(Ie.return=null),C.return=null}catch(qe){xr(C,o,qe)}}if(12854&o.subtreeFlags)for(o=o.child;null!==o;)Hh(o,t),o=o.sibling}function Hh(t,o){var l=t.alternate,w=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Es(o,t),ta(t),4&w){try{yu(3,t,t.return),qf(3,t)}catch(St){xr(t,t.return,St)}try{yu(5,t,t.return)}catch(St){xr(t,t.return,St)}}break;case 1:Es(o,t),ta(t),512&w&&null!==l&&Ia(l,l.return);break;case 5:if(Es(o,t),ta(t),512&w&&null!==l&&Ia(l,l.return),32&t.flags){var C=t.stateNode;try{Vn(C,"")}catch(St){xr(t,t.return,St)}}if(4&w&&null!=(C=t.stateNode)){var U=t.memoizedProps,X=null!==l?l.memoizedProps:U,_e=t.type,Ie=t.updateQueue;if(t.updateQueue=null,null!==Ie)try{"input"===_e&&"radio"===U.type&&null!=U.name&&q(C,U),cs(_e,X);var qe=cs(_e,U);for(X=0;X<Ie.length;X+=2){var et=Ie[X],st=Ie[X+1];"style"===et?Ga(C,st):"dangerouslySetInnerHTML"===et?dr(C,st):"children"===et?Vn(C,st):V(C,et,st,qe)}switch(_e){case"input":Ee(C,U);break;case"textarea":Mt(C,U);break;case"select":var nt=C._wrapperState.wasMultiple;C._wrapperState.wasMultiple=!!U.multiple;var ut=U.value;null!=ut?_t(C,!!U.multiple,ut,!1):nt!==!!U.multiple&&(null!=U.defaultValue?_t(C,!!U.multiple,U.defaultValue,!0):_t(C,!!U.multiple,U.multiple?[]:"",!1))}C[rc]=U}catch(St){xr(t,t.return,St)}}break;case 6:if(Es(o,t),ta(t),4&w){if(null===t.stateNode)throw Error(h(162));C=t.stateNode,U=t.memoizedProps;try{C.nodeValue=U}catch(St){xr(t,t.return,St)}}break;case 3:if(Es(o,t),ta(t),4&w&&null!==l&&l.memoizedState.isDehydrated)try{Jr(o.containerInfo)}catch(St){xr(t,t.return,St)}break;case 4:default:Es(o,t),ta(t);break;case 13:Es(o,t),ta(t),8192&(C=t.child).flags&&(C.stateNode.isHidden=U=null!==C.memoizedState,!U||null!==C.alternate&&null!==C.alternate.memoizedState||(Wh=kt())),4&w&&Fh(t);break;case 22:if(et=null!==l&&null!==l.memoizedState,1&t.mode?(Wr=(qe=Wr)||et,Es(o,t),Wr=qe):Es(o,t),ta(t),8192&w){if((t.stateNode.isHidden=qe=null!==t.memoizedState)&&!et&&0!=(1&t.mode))for(Qt=t,et=t.child;null!==et;){for(st=Qt=et;null!==Qt;){switch(ut=(nt=Qt).child,nt.tag){case 0:case 11:case 14:case 15:yu(4,nt,nt.return);break;case 1:Ia(nt,nt.return);var wt=nt.stateNode;if("function"==typeof wt.componentWillUnmount){w=nt,l=nt.return;try{wt.props=(o=w).memoizedProps,wt.state=o.memoizedState,wt.componentWillUnmount()}catch(St){xr(w,l,St)}}break;case 5:Ia(nt,nt.return);break;case 22:if(null!==nt.memoizedState){I0(st);continue}}null!==ut?(ut.return=nt,Qt=ut):I0(st)}et=et.sibling}e:for(et=null,st=t;;){if(5===st.tag){if(null===et){et=st;try{C=st.stateNode,qe?"function"==typeof(U=C.style).setProperty?U.setProperty("display","none","important"):U.display="none":(_e=st.stateNode,X=null!=(Ie=st.memoizedProps.style)&&Ie.hasOwnProperty("display")?Ie.display:null,_e.style.display=Er("display",X))}catch(St){xr(t,t.return,St)}}}else if(6===st.tag){if(null===et)try{st.stateNode.nodeValue=qe?"":st.memoizedProps}catch(St){xr(t,t.return,St)}}else if((22!==st.tag&&23!==st.tag||null===st.memoizedState||st===t)&&null!==st.child){st.child.return=st,st=st.child;continue}if(st===t)break e;for(;null===st.sibling;){if(null===st.return||st.return===t)break e;et===st&&(et=null),st=st.return}et===st&&(et=null),st.sibling.return=st.return,st=st.sibling}}break;case 19:Es(o,t),ta(t),4&w&&Fh(t);case 21:}}function ta(t){var o=t.flags;if(2&o){try{e:{for(var l=t.return;null!==l;){if(R0(l)){var w=l;break e}l=l.return}throw Error(h(160))}switch(w.tag){case 5:var C=w.stateNode;32&w.flags&&(Vn(C,""),w.flags&=-33),zh(t,Oc(t),C);break;case 3:case 4:var U=w.stateNode.containerInfo;jh(t,Oc(t),U);break;default:throw Error(h(161))}}catch(X){xr(t,t.return,X)}t.flags&=-3}4096&o&&(t.flags&=-4097)}function fm(t,o,l){Qt=t,qh(t)}function qh(t,o,l){for(var w=0!=(1&t.mode);null!==Qt;){var C=Qt,U=C.child;if(22===C.tag&&w){var X=null!==C.memoizedState||Rl;if(!X){var _e=C.alternate,Ie=null!==_e&&null!==_e.memoizedState||Wr;_e=Rl;var qe=Wr;if(Rl=X,(Wr=Ie)&&!qe)for(Qt=C;null!==Qt;)Ie=(X=Qt).child,22===X.tag&&null!==X.memoizedState?ro(C):null!==Ie?(Ie.return=X,Qt=Ie):ro(C);for(;null!==U;)Qt=U,qh(U),U=U.sibling;Qt=C,Rl=_e,Wr=qe}$h(t)}else 0!=(8772&C.subtreeFlags)&&null!==U?(U.return=C,Qt=U):$h(t)}}function $h(t){for(;null!==Qt;){var o=Qt;if(0!=(8772&o.flags)){var l=o.alternate;try{if(0!=(8772&o.flags))switch(o.tag){case 0:case 11:case 15:Wr||qf(5,o);break;case 1:var w=o.stateNode;if(4&o.flags&&!Wr)if(null===l)w.componentDidMount();else{var C=o.elementType===o.type?l.memoizedProps:ns(o.type,l.memoizedProps);w.componentDidUpdate(C,l.memoizedState,w.__reactInternalSnapshotBeforeUpdate)}var U=o.updateQueue;null!==U&&Kg(o,U,w);break;case 3:var X=o.updateQueue;if(null!==X){if(l=null,null!==o.child)switch(o.child.tag){case 5:case 1:l=o.child.stateNode}Kg(o,X,l)}break;case 5:if(null===l&&4&o.flags){l=o.stateNode;var Ie=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":Ie.autoFocus&&l.focus();break;case"img":Ie.src&&(l.src=Ie.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===o.memoizedState){var qe=o.alternate;if(null!==qe){var et=qe.memoizedState;if(null!==et){var st=et.dehydrated;null!==st&&Jr(st)}}}break;default:throw Error(h(163))}Wr||512&o.flags&&Dh(o)}catch(nt){xr(o,o.return,nt)}}if(o===t){Qt=null;break}if(null!==(l=o.sibling)){l.return=o.return,Qt=l;break}Qt=o.return}}function I0(t){for(;null!==Qt;){var o=Qt;if(o===t){Qt=null;break}var l=o.sibling;if(null!==l){l.return=o.return,Qt=l;break}Qt=o.return}}function ro(t){for(;null!==Qt;){var o=Qt;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{qf(4,o)}catch(Ie){xr(o,l,Ie)}break;case 1:var w=o.stateNode;if("function"==typeof w.componentDidMount){var C=o.return;try{w.componentDidMount()}catch(Ie){xr(o,C,Ie)}}var U=o.return;try{Dh(o)}catch(Ie){xr(o,U,Ie)}break;case 5:var X=o.return;try{Dh(o)}catch(Ie){xr(o,X,Ie)}}}catch(Ie){xr(o,o.return,Ie)}if(o===t){Qt=null;break}var _e=o.sibling;if(null!==_e){_e.return=o.return,Qt=_e;break}Qt=o.return}}var C0,Vh=Math.ceil,na=Z.ReactCurrentDispatcher,Pa=Z.ReactCurrentOwner,Di=Z.ReactCurrentBatchConfig,or=0,bi=null,ei=null,Pi=0,bo=0,xc=Ys(0),li=0,is=null,ka=0,Il=0,Na=0,ra=null,io=null,Wh=0,Rc=1/0,ia=null,oo=!1,Ss=null,Or=null,Ic=!1,Aa=null,Cc=0,Cl=0,Pl=null,$f=-1,Pc=0;function wi(){return 0!=(6&or)?kt():-1!==$f?$f:$f=kt()}function Ta(t){return 0==(1&t.mode)?1:0!=(2&or)&&0!==Pi?Pi&-Pi:null!==om.transition?(0===Pc&&(Pc=nl()),Pc):0!==(t=tr)?t:t=void 0===(t=window.event)?16:kd(t.type)}function Uo(t,o,l,w){if(50<Cl)throw Cl=0,Pl=null,Error(h(185));Qo(t,l,w),0!=(2&or)&&t===bi||(t===bi&&(0==(2&or)&&(Il|=l),4===li&&Ma(t,Pi)),so(t,w),1===l&&0===or&&0==(1&o.mode)&&(Rc=kt()+500,vf&&Oa()))}function so(t,o){var l=t.callbackNode;!function(C,U){for(var X=C.suspendedLanes,_e=C.pingedLanes,Ie=C.expirationTimes,qe=C.pendingLanes;0<qe;){var et=31-Xi(qe),st=1<<et,nt=Ie[et];-1===nt?0!=(st&X)&&0==(st&_e)||(Ie[et]=Vu(st,U)):nt<=U&&(C.expiredLanes|=st),qe&=~st}}(t,o);var C,w=eu(t,t===bi?Pi:0);if(0===w)null!==l&&Za(l),t.callbackNode=null,t.callbackPriority=0;else if(t.callbackPriority!==(o=w&-w)){if(null!=l&&Za(l),1===o)0===t.tag?(C=Gh.bind(null,t),vf=!0,jg(C)):jg(Gh.bind(null,t)),tm(function(){0==(6&or)&&Oa()}),l=null;else{switch(rl(w)){case 1:l=ur;break;case 4:l=ho;break;case 16:default:l=Gt;break;case 536870912:l=ds}l=Nl(l,P0.bind(null,t))}t.callbackPriority=o,t.callbackNode=l}}function P0(t,o){if($f=-1,Pc=0,0!=(6&or))throw Error(h(327));var l=t.callbackNode;if(Nr()&&t.callbackNode!==l)return null;var w=eu(t,t===bi?Pi:0);if(0===w)return null;if(0!=(30&w)||0!=(w&t.expiredLanes)||o)o=Wf(t,w);else{o=w;var C=or;or|=2;var U=N0();for(bi===t&&Pi===o||(ia=null,Rc=kt()+500,Do(t,o));;)try{kl();break}catch(_e){k0(t,_e)}lh(),na.current=U,or=C,null!==ei?o=0:(bi=null,Pi=0,o=li)}if(0!==o){if(2===o&&0!==(C=tu(t))&&(w=C,o=Vf(t,C)),1===o)throw l=is,Do(t,0),Ma(t,w),so(t,kt()),l;if(6===o)Ma(t,w);else{if(C=t.current.alternate,0==(30&w)&&!function(_e){for(var Ie=_e;;){if(16384&Ie.flags){var qe=Ie.updateQueue;if(null!==qe&&null!==(qe=qe.stores))for(var et=0;et<qe.length;et++){var st=qe[et],nt=st.getSnapshot;st=st.value;try{if(!Zo(nt(),st))return!1}catch{return!1}}}if(qe=Ie.child,16384&Ie.subtreeFlags&&null!==qe)qe.return=Ie,Ie=qe;else{if(Ie===_e)break;for(;null===Ie.sibling;){if(null===Ie.return||Ie.return===_e)return!0;Ie=Ie.return}Ie.sibling.return=Ie.return,Ie=Ie.sibling}}return!0}(C)&&(2===(o=Wf(t,w))&&0!==(U=tu(t))&&(w=U,o=Vf(t,U)),1===o))throw l=is,Do(t,0),Ma(t,w),so(t,kt()),l;switch(t.finishedWork=C,t.finishedLanes=w,o){case 0:case 1:throw Error(h(345));case 2:case 5:Ut(t,io,ia);break;case 3:if(Ma(t,w),(130023424&w)===w&&10<(o=Wh+500-kt())){if(0!==eu(t,0))break;if(((C=t.suspendedLanes)&w)!==w){wi(),t.pingedLanes|=t.suspendedLanes&C;break}t.timeoutHandle=Xd(Ut.bind(null,t,io,ia),o);break}Ut(t,io,ia);break;case 4:if(Ma(t,w),(4194240&w)===w)break;for(o=t.eventTimes,C=-1;0<w;){var X=31-Xi(w);U=1<<X,(X=o[X])>C&&(C=X),w&=~U}if(w=C,10<(w=(120>(w=kt()-w)?120:480>w?480:1080>w?1080:1920>w?1920:3e3>w?3e3:4320>w?4320:1960*Vh(w/1960))-w)){t.timeoutHandle=Xd(Ut.bind(null,t,io,ia),w);break}Ut(t,io,ia);break;default:throw Error(h(329))}}}return so(t,kt()),t.callbackNode===l?P0.bind(null,t):null}function Vf(t,o){var l=ra;return t.current.memoizedState.isDehydrated&&(Do(t,o).flags|=256),2!==(t=Wf(t,o))&&(o=io,io=l,null!==o&&Kh(o)),t}function Kh(t){null===io?io=t:io.push.apply(io,t)}function Ma(t,o){for(o&=~Na,t.suspendedLanes|=o&=~Il,t.pingedLanes&=~o,t=t.expirationTimes;0<o;){var l=31-Xi(o),w=1<<l;t[l]=-1,o&=~w}}function Gh(t){if(0!=(6&or))throw Error(h(327));Nr();var o=eu(t,0);if(0==(1&o))return so(t,kt()),null;var l=Wf(t,o);if(0!==t.tag&&2===l){var w=tu(t);0!==w&&(o=w,l=Vf(t,w))}if(1===l)throw l=is,Do(t,0),Ma(t,o),so(t,kt()),l;if(6===l)throw Error(h(345));return t.finishedWork=t.current.alternate,t.finishedLanes=o,Ut(t,io,ia),so(t,kt()),null}function Yh(t,o){var l=or;or|=1;try{return t(o)}finally{0===(or=l)&&(Rc=kt()+500,vf&&Oa())}}function vu(t){null!==Aa&&0===Aa.tag&&0==(6&or)&&Nr();var o=or;or|=1;var l=Di.transition,w=tr;try{if(Di.transition=null,tr=1,t)return t()}finally{tr=w,Di.transition=l,0==(6&(or=o))&&Oa()}}function Qh(){bo=xc.current,Pr(xc)}function Do(t,o){t.finishedWork=null,t.finishedLanes=0;var l=t.timeoutHandle;if(-1!==l&&(t.timeoutHandle=-1,em(l)),null!==ei)for(l=ei.return;null!==l;){var w=l;switch(oh(w),w.tag){case 1:null!=(w=w.type.childContextTypes)&&nh();break;case 3:hu(),Pr(eo),Pr(Ci),yc();break;case 5:_l(w);break;case 4:hu();break;case 13:case 19:Pr(Fr);break;case 10:fh(w.type._context);break;case 22:case 23:Qh()}l=l.return}if(bi=t,ei=t=Ua(t.current,null),Pi=bo=o,li=0,is=null,Na=Il=ka=0,io=ra=null,null!==du){for(o=0;o<du.length;o++)if(null!==(w=(l=du[o]).interleaved)){l.interleaved=null;var U=l.pending;if(null!==U){var X=U.next;U.next=w.next,w.next=X}l.pending=w}du=null}return t}function k0(t,o){for(;;){var l=ei;try{if(lh(),bl.current=Uf,mc){for(var w=Hr.memoizedState;null!==w;){var C=w.queue;null!==C&&(C.pending=null),w=w.next}mc=!1}if(pu=0,vi=ci=Hr=null,gu=!1,Ra=0,Pa.current=null,null===l||null===l.return){li=1,is=o,ei=null;break}e:{var U=t,X=l.return,_e=l,Ie=o;if(o=Pi,_e.flags|=32768,null!==Ie&&"object"==typeof Ie&&"function"==typeof Ie.then){var qe=Ie,et=_e,st=et.tag;if(0==(1&et.mode)&&(0===st||11===st||15===st)){var nt=et.alternate;nt?(et.updateQueue=nt.updateQueue,et.memoizedState=nt.memoizedState,et.lanes=nt.lanes):(et.updateQueue=null,et.memoizedState=null)}var ut=p0(X);if(null!==ut){ut.flags&=-257,g0(ut,X,_e,0,o),1&ut.mode&&Df(U,qe,o),Ie=qe;var wt=(o=ut).updateQueue;if(null===wt){var St=new Set;St.add(Ie),o.updateQueue=St}else wt.add(Ie);break e}if(0==(1&o)){Df(U,qe,o),Jh();break e}Ie=Error(h(426))}else if(jr&&1&_e.mode){var ot=p0(X);if(null!==ot){0==(65536&ot.flags)&&(ot.flags|=256),g0(ot,X,_e,0,o),uh(bc(Ie,_e));break e}}U=Ie=bc(Ie,_e),4!==li&&(li=2),null===ra?ra=[U]:ra.push(U),U=X;do{switch(U.tag){case 3:U.flags|=65536,U.lanes|=o&=-o,Wg(U,d0(0,Ie,o));break e;case 1:_e=Ie;var tt=U.stateNode;if(0==(128&U.flags)&&("function"==typeof U.type.getDerivedStateFromError||null!==tt&&"function"==typeof tt.componentDidCatch&&(null===Or||!Or.has(tt)))){U.flags|=65536,U.lanes|=o&=-o,Wg(U,h0(U,_e,o));break e}}U=U.return}while(null!==U)}T0(l)}catch(yt){o=yt,ei===l&&null!==l&&(ei=l=l.return);continue}break}}function N0(){var t=na.current;return na.current=Uf,null===t?Uf:t}function Jh(){0!==li&&3!==li&&2!==li||(li=4),null===bi||0==(268435455&ka)&&0==(268435455&Il)||Ma(bi,Pi)}function Wf(t,o){var l=or;or|=2;var w=N0();for(bi===t&&Pi===o||(ia=null,Do(t,o));;)try{Xh();break}catch(C){k0(t,C)}if(lh(),or=l,na.current=w,null!==ei)throw Error(h(261));return bi=null,Pi=0,li}function Xh(){for(;null!==ei;)A0(ei)}function kl(){for(;null!==ei&&!el();)A0(ei)}function A0(t){var o=C0(t.alternate,t,bo);t.memoizedProps=t.pendingProps,null===o?T0(t):ei=o,Pa.current=null}function T0(t){var o=t;do{var l=o.alternate;if(t=o.return,0==(32768&o.flags)){if(null!==(l=Lh(l,o,bo)))return void(ei=l)}else{if(null!==(l=Uh(l,o)))return l.flags&=32767,void(ei=l);if(null===t)return li=6,void(ei=null);t.flags|=32768,t.subtreeFlags=0,t.deletions=null}if(null!==(o=o.sibling))return void(ei=o);ei=o=t}while(null!==o);0===li&&(li=5)}function Ut(t,o,l){var w=tr,C=Di.transition;try{Di.transition=null,tr=1,function(U,X,_e,Ie){do{Nr()}while(null!==Aa);if(0!=(6&or))throw Error(h(327));var qe=U.finishedLanes;if(null===(_e=U.finishedWork))return null;if(U.finishedWork=null,U.finishedLanes=0,_e===U.current)throw Error(h(177));U.callbackNode=null,U.callbackPriority=0;var et=_e.lanes|_e.childLanes;if(function(ut,wt){var St=ut.pendingLanes&~wt;ut.pendingLanes=wt,ut.suspendedLanes=0,ut.pingedLanes=0,ut.expiredLanes&=wt,ut.mutableReadLanes&=wt,ut.entangledLanes&=wt,wt=ut.entanglements;var ot=ut.eventTimes;for(ut=ut.expirationTimes;0<St;){var Be=31-Xi(St),tt=1<<Be;wt[Be]=0,ot[Be]=-1,ut[Be]=-1,St&=~tt}}(U,et),U===bi&&(ei=bi=null,Pi=0),0==(2064&_e.subtreeFlags)&&0==(2064&_e.flags)||Ic||(Ic=!0,Nl(Gt,function(){return Nr(),null})),et=0!=(15990&_e.flags),0!=(15990&_e.subtreeFlags)||et){et=Di.transition,Di.transition=null;var st=tr;tr=1;var nt=or;or|=4,Pa.current=null,function(ut,wt){if(Yd=mr,ll(ut=xg())){if("selectionStart"in ut)var St={start:ut.selectionStart,end:ut.selectionEnd};else{var ot=(St=(St=ut.ownerDocument)&&St.defaultView||window).getSelection&&St.getSelection();if(ot&&0!==ot.rangeCount){St=ot.anchorNode;var Be=ot.anchorOffset,tt=ot.focusNode;ot=ot.focusOffset;var yt=0,$t=-1,bn=-1,qt=0,Rn=0,dn=ut,gn=null;t:for(;;){for(var sr;dn!==St||0!==Be&&3!==dn.nodeType||($t=yt+Be),dn!==tt||0!==ot&&3!==dn.nodeType||(bn=yt+ot),3===dn.nodeType&&(yt+=dn.nodeValue.length),null!==(sr=dn.firstChild);)gn=dn,dn=sr;for(;;){if(dn===ut)break t;if(gn===St&&++qt===Be&&($t=yt),gn===tt&&++Rn===ot&&(bn=yt),null!==(sr=dn.nextSibling))break;gn=(dn=gn).parentNode}dn=sr}St=-1===$t||-1===bn?null:{start:$t,end:bn}}else St=null}St=St||{start:0,end:0}}else St=null;for(Qd={focusedElem:ut,selectionRange:St},mr=!1,Qt=wt;null!==Qt;)if(ut=(wt=Qt).child,0!=(1028&wt.subtreeFlags)&&null!==ut)ut.return=wt,Qt=ut;else for(;null!==Qt;){wt=Qt;try{var Nc=wt.alternate;if(0!=(1024&wt.flags))switch(wt.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==Nc){var U0=Nc.memoizedProps,mm=Nc.memoizedState,D0=wt.stateNode,vm=D0.getSnapshotBeforeUpdate(wt.elementType===wt.type?U0:ns(wt.type,U0),mm);D0.__reactInternalSnapshotBeforeUpdate=vm}break;case 3:var Ac=wt.stateNode.containerInfo;1===Ac.nodeType?Ac.textContent="":9===Ac.nodeType&&Ac.documentElement&&Ac.removeChild(Ac.documentElement);break;default:throw Error(h(163))}}catch(Xf){xr(wt,wt.return,Xf)}if(null!==(ut=wt.sibling)){ut.return=wt.return,Qt=ut;break}Qt=wt.return}Nc=x0,x0=!1}(U,_e),Hh(_e,U),Ju(Qd),mr=!!Yd,Qd=Yd=null,U.current=_e,fm(_e),Ye(),or=nt,tr=st,Di.transition=et}else U.current=_e;if(Ic&&(Ic=!1,Aa=U,Cc=qe),0===(et=U.pendingLanes)&&(Or=null),function(ut){if(po&&"function"==typeof po.onCommitFiberRoot)try{po.onCommitFiberRoot(Hs,ut,void 0,128==(128&ut.current.flags))}catch{}}(_e.stateNode),so(U,kt()),null!==X)for(Ie=U.onRecoverableError,_e=0;_e<X.length;_e++)Ie((qe=X[_e]).value,{componentStack:qe.stack,digest:qe.digest});if(oo)throw oo=!1,U=Ss,Ss=null,U;0!=(1&Cc)&&0!==U.tag&&Nr(),0!=(1&(et=U.pendingLanes))?U===Pl?Cl++:(Cl=0,Pl=U):Cl=0,Oa()}(t,o,l,w)}finally{Di.transition=C,tr=w}return null}function Nr(){if(null!==Aa){var t=rl(Cc),o=Di.transition,l=tr;try{if(Di.transition=null,tr=16>t?16:t,null===Aa)var w=!1;else{if(t=Aa,Aa=null,Cc=0,0!=(6&or))throw Error(h(331));var C=or;for(or|=4,Qt=t.current;null!==Qt;){var U=Qt,X=U.child;if(0!=(16&Qt.flags)){var _e=U.deletions;if(null!==_e){for(var Ie=0;Ie<_e.length;Ie++){var qe=_e[Ie];for(Qt=qe;null!==Qt;){var et=Qt;switch(et.tag){case 0:case 11:case 15:yu(8,et,U)}var st=et.child;if(null!==st)st.return=et,Qt=st;else for(;null!==Qt;){var nt=(et=Qt).sibling,ut=et.return;if(mu(et),et===qe){Qt=null;break}if(null!==nt){nt.return=ut,Qt=nt;break}Qt=ut}}}var wt=U.alternate;if(null!==wt){var St=wt.child;if(null!==St){wt.child=null;do{var ot=St.sibling;St.sibling=null,St=ot}while(null!==St)}}Qt=U}}if(0!=(2064&U.subtreeFlags)&&null!==X)X.return=U,Qt=X;else e:for(;null!==Qt;){if(0!=(2048&(U=Qt).flags))switch(U.tag){case 0:case 11:case 15:yu(9,U,U.return)}var Be=U.sibling;if(null!==Be){Be.return=U.return,Qt=Be;break e}Qt=U.return}}var tt=t.current;for(Qt=tt;null!==Qt;){var yt=(X=Qt).child;if(0!=(2064&X.subtreeFlags)&&null!==yt)yt.return=X,Qt=yt;else e:for(X=tt;null!==Qt;){if(0!=(2048&(_e=Qt).flags))try{switch(_e.tag){case 0:case 11:case 15:qf(9,_e)}}catch(bn){xr(_e,_e.return,bn)}if(_e===X){Qt=null;break e}var $t=_e.sibling;if(null!==$t){$t.return=_e.return,Qt=$t;break e}Qt=_e.return}}if(or=C,Oa(),po&&"function"==typeof po.onPostCommitFiberRoot)try{po.onPostCommitFiberRoot(Hs,t)}catch{}w=!0}return w}finally{tr=l,Di.transition=o}}return!1}function La(t,o,l){t=ms(t,o=d0(0,o=bc(l,o),1),1),o=wi(),null!==t&&(Qo(t,1,o),so(t,o))}function xr(t,o,l){if(3===t.tag)La(t,t,l);else for(;null!==o;){if(3===o.tag){La(o,t,l);break}if(1===o.tag){var w=o.stateNode;if("function"==typeof o.type.getDerivedStateFromError||"function"==typeof w.componentDidCatch&&(null===Or||!Or.has(w))){o=ms(o,t=h0(o,t=bc(l,t),1),1),t=wi(),null!==o&&(Qo(o,1,t),so(o,t));break}}o=o.return}}function Vi(t,o,l){var w=t.pingCache;null!==w&&w.delete(o),o=wi(),t.pingedLanes|=t.suspendedLanes&l,bi===t&&(Pi&l)===l&&(4===li||3===li&&(130023424&Pi)===Pi&&500>kt()-Wh?Do(t,0):Na|=l),so(t,o)}function fi(t,o){0===o&&(0==(1&t.mode)?o=1:(o=$u,0==(130023424&($u<<=1))&&($u=4194304)));var l=wi();null!==(t=Xs(t,o))&&(Qo(t,o,l),so(t,l))}function Zh(t){var o=t.memoizedState,l=0;null!==o&&(l=o.retryLane),fi(t,l)}function dm(t,o){var l=0;switch(t.tag){case 13:var w=t.stateNode,C=t.memoizedState;null!==C&&(l=C.retryLane);break;case 19:w=t.stateNode;break;default:throw Error(h(314))}null!==w&&w.delete(o),fi(t,l)}function Nl(t,o){return Xa(t,o)}function hm(t,o,l,w){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=w,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jo(t,o,l,w){return new hm(t,o,l,w)}function ep(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Ua(t,o){var l=t.alternate;return null===l?((l=jo(t.tag,o,t.key,t.mode)).elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=o,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=14680064&t.flags,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,l.dependencies=null===(o=t.dependencies)?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l}function Kf(t,o,l,w,C,U){var X=2;if(w=t,"function"==typeof t)ep(t)&&(X=1);else if("string"==typeof t)X=5;else e:switch(t){case H:return Da(l.children,C,U,o);case J:X=8,C|=8;break;case K:return(t=jo(12,l,o,2|C)).elementType=K,t.lanes=U,t;case ie:return(t=jo(13,l,o,C)).elementType=ie,t.lanes=U,t;case xe:return(t=jo(19,l,o,C)).elementType=xe,t.lanes=U,t;case we:return Gf(l,C,U,o);default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case le:X=10;break e;case z:X=9;break e;case B:X=11;break e;case Me:X=14;break e;case Oe:X=16,w=null;break e}throw Error(h(130,null==t?t:typeof t,""))}return(o=jo(X,l,o,C)).elementType=t,o.type=w,o.lanes=U,o}function Da(t,o,l,w){return(t=jo(7,t,w,o)).lanes=l,t}function Gf(t,o,l,w){return(t=jo(22,t,w,o)).elementType=we,t.lanes=l,t.stateNode={isHidden:!1},t}function tp(t,o,l){return(t=jo(6,t,null,o)).lanes=l,t}function np(t,o,l){return(o=jo(4,null!==t.children?t.children:[],t.key,o)).lanes=l,o.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},o}function pm(t,o,l,w,C){this.tag=o,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wu(0),this.expirationTimes=Wu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wu(0),this.identifierPrefix=w,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function rp(t,o,l,w,C,U,X,_e,Ie){return t=new pm(t,o,l,_e,Ie),1===o?(o=1,!0===U&&(o|=8)):o=0,U=jo(3,null,null,o),t.current=U,U.stateNode=t,U.memoizedState={element:w,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},hh(U),t}function ip(t){if(!t)return Sa;e:{if(No(t=t._reactInternals)!==t||1!==t.tag)throw Error(h(170));var o=t;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(yo(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(null!==o);throw Error(h(171))}if(1===t.tag){var l=t.type;if(yo(l))return Dg(t,l,o)}return o}function M0(t,o,l,w,C,U,X,_e,Ie){return(t=rp(l,w,!0,t,0,U,0,_e,Ie)).context=ip(null),l=t.current,(U=ys(w=wi(),C=Ta(l))).callback=o??null,ms(l,U,C),t.current.lanes=C,Qo(t,C,w),so(t,w),t}function _u(t,o,l,w){var C=o.current,U=wi(),X=Ta(C);return l=ip(l),null===o.context?o.context=l:o.pendingContext=l,(o=ys(U,X)).payload={element:t},null!==(w=void 0===w?null:w)&&(o.callback=w),null!==(t=ms(C,o,X))&&(Uo(t,C,X,U),xf(t,C,X)),X}function Al(t){return(t=t.current).child?t.child.stateNode:null}function L0(t,o){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var l=t.retryLane;t.retryLane=0!==l&&l<o?l:o}}function op(t,o){L0(t,o),(t=t.alternate)&&L0(t,o)}C0=function(t,o,l){if(null!==t)if(t.memoizedProps!==o.pendingProps||eo.current)to=!0;else{if(0==(t.lanes&l)&&0==(128&o.flags))return to=!1,function(st,nt,ut){switch(nt.tag){case 3:b0(nt),lc();break;case 5:vh(nt);break;case 1:yo(nt.type)&&uu(nt);break;case 4:Pf(nt,nt.stateNode.containerInfo);break;case 10:var wt=nt.type._context,St=nt.memoizedProps.value;kr(Ef,wt._currentValue),wt._currentValue=St;break;case 13:if(null!==(wt=nt.memoizedState))return null!==wt.dehydrated?(kr(Fr,1&Fr.current),nt.flags|=128,null):0!=(ut&nt.child.childLanes)?E0(st,nt,ut):(kr(Fr,1&Fr.current),null!==(st=ws(st,nt,ut))?st.sibling:null);kr(Fr,1&Fr.current);break;case 19:if(wt=0!=(ut&nt.childLanes),0!=(128&st.flags)){if(wt)return O0(st,nt,ut);nt.flags|=128}if(null!==(St=nt.memoizedState)&&(St.rendering=null,St.tail=null,St.lastEffect=null),kr(Fr,Fr.current),wt)break;return null;case 22:case 23:return nt.lanes=0,v0(st,nt,ut)}return ws(st,nt,ut)}(t,o,l);to=0!=(131072&t.flags)}else to=!1,jr&&0!=(1048576&o.flags)&&zg(o,bf,o.index);switch(o.lanes=0,o.tag){case 2:var w=o.type;Ff(t,o),t=o.pendingProps;var C=sc(o,Ci.current);fc(o,l),C=wh(null,o,w,t,C,l);var U=kf();return o.flags|=1,"object"==typeof C&&null!==C&&"function"==typeof C.render&&void 0===C.$$typeof?(o.tag=1,o.memoizedState=null,o.updateQueue=null,yo(w)?(U=!0,uu(o)):U=!1,o.memoizedState=null!=C.state?C.state:null,hh(o),C.updater=If,o.stateNode=C,C._reactInternals=o,Cf(o,w,t,l),o=jf(null,o,w,!0,U,l)):(o.tag=0,jr&&U&&ih(o),no(null,o,C,l),o=o.child),o;case 16:w=o.elementType;e:{switch(Ff(t,o),t=o.pendingProps,w=(C=w._init)(w._payload),o.type=w,C=o.tag=function(st){if("function"==typeof st)return ep(st)?1:0;if(null!=st){if((st=st.$$typeof)===B)return 11;if(st===Me)return 14}return 2}(w),t=ns(w,t),C){case 0:o=Ol(null,o,w,t,l);break e;case 1:o=Ph(null,o,w,t,l);break e;case 11:o=Ch(null,o,w,t,l);break e;case 14:o=y0(null,o,w,ns(w.type,t),l);break e}throw Error(h(306,w,""))}return o;case 0:return C=o.pendingProps,Ol(t,o,w=o.type,C=o.elementType===w?C:ns(w,C),l);case 1:return C=o.pendingProps,Ph(t,o,w=o.type,C=o.elementType===w?C:ns(w,C),l);case 3:e:{if(b0(o),null===t)throw Error(h(387));w=o.pendingProps,C=(U=o.memoizedState).element,Vg(t,o),Rf(o,w,null,l);var X=o.memoizedState;if(w=X.element,U.isDehydrated){if(o.updateQueue.baseState=U={element:w,isDehydrated:!1,cache:X.cache,pendingSuspenseBoundaries:X.pendingSuspenseBoundaries,transitions:X.transitions},o.memoizedState=U,256&o.flags){o=Ec(t,o,w,l,C=bc(Error(h(423)),o));break e}if(w!==C){o=Ec(t,o,w,l,C=bc(Error(h(424)),o));break e}for(vo=Ks(o.stateNode.containerInfo.firstChild),mo=o,jr=!0,ts=null,l=mh(o,null,w,l),o.child=l;l;)l.flags=-3&l.flags|4096,l=l.sibling}else{if(lc(),w===C){o=ws(t,o,l);break e}no(t,o,w,l)}o=o.child}return o;case 5:return vh(o),null===t&&ah(o),U=null!==t?t.memoizedProps:null,X=(C=o.pendingProps).children,Jd(w=o.type,C)?X=null:null!==U&&Jd(w,U)&&(o.flags|=32),_0(t,o),no(t,o,X,l),o.child;case 6:return null===t&&ah(o),null;case 13:return E0(t,o,l);case 4:return Pf(o,o.stateNode.containerInfo),w=o.pendingProps,null===t?o.child=pc(o,null,w,l):no(t,o,w,l),o.child;case 11:return C=o.pendingProps,Ch(t,o,w=o.type,C=o.elementType===w?C:ns(w,C),l);case 7:return no(t,o,o.pendingProps,l),o.child;case 8:case 12:return no(t,o,o.pendingProps.children,l),o.child;case 10:e:{if(U=o.memoizedProps,X=(C=o.pendingProps).value,kr(Ef,(w=o.type._context)._currentValue),w._currentValue=X,null!==U)if(Zo(U.value,X)){if(U.children===C.children&&!eo.current){o=ws(t,o,l);break e}}else for(null!==(U=o.child)&&(U.return=o);null!==U;){var _e=U.dependencies;if(null!==_e){X=U.child;for(var Ie=_e.firstContext;null!==Ie;){if(Ie.context===w){if(1===U.tag){(Ie=ys(-1,l&-l)).tag=2;var qe=U.updateQueue;if(null!==qe){var et=(qe=qe.shared).pending;null===et?Ie.next=Ie:(Ie.next=et.next,et.next=Ie),qe.pending=Ie}}U.lanes|=l,null!==(Ie=U.alternate)&&(Ie.lanes|=l),dh(U.return,l,o),_e.lanes|=l;break}Ie=Ie.next}}else if(10===U.tag)X=U.type===o.type?null:U.child;else if(18===U.tag){if(null===(X=U.return))throw Error(h(341));X.lanes|=l,null!==(_e=X.alternate)&&(_e.lanes|=l),dh(X,l,o),X=U.sibling}else X=U.child;if(null!==X)X.return=U;else for(X=U;null!==X;){if(X===o){X=null;break}if(null!==(U=X.sibling)){U.return=X.return,X=U;break}X=X.return}U=X}no(t,o,C.children,l),o=o.child}return o;case 9:return C=o.type,w=o.pendingProps.children,fc(o,l),w=w(C=Mo(C)),o.flags|=1,no(t,o,w,l),o.child;case 14:return C=ns(w=o.type,o.pendingProps),y0(t,o,w,C=ns(w.type,C),l);case 15:return m0(t,o,o.type,o.pendingProps,l);case 17:return C=o.pendingProps,C=o.elementType===(w=o.type)?C:ns(w,C),Ff(t,o),o.tag=1,yo(w)?(t=!0,uu(o)):t=!1,fc(o,l),Qg(o,w,C),Cf(o,w,C,l),jf(null,o,w,!0,t,l);case 19:return O0(t,o,l);case 22:return v0(t,o,l)}throw Error(h(156,o.tag))};var Wi="function"==typeof reportError?reportError:function(t){console.error(t)};function sp(t){this._internalRoot=t}function Yf(t){this._internalRoot=t}function ap(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)}function Qf(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function up(){}function Jf(t,o,l,w,C){var U=l._reactRootContainer;if(U){var X=U;if("function"==typeof C){var _e=C;C=function(){var Ie=Al(X);_e.call(Ie)}}_u(o,X,t,C)}else X=function(Ie,qe,et,st,nt){if(nt){if("function"==typeof st){var ut=st;st=function(){var Be=Al(wt);ut.call(Be)}}var wt=M0(qe,st,Ie,0,null,!1,0,"",up);return Ie._reactRootContainer=wt,Ie[Gs]=wt.current,ou(8===Ie.nodeType?Ie.parentNode:Ie),vu(),wt}for(;nt=Ie.lastChild;)Ie.removeChild(nt);if("function"==typeof st){var St=st;st=function(){var Be=Al(ot);St.call(Be)}}var ot=rp(Ie,0,!1,null,0,!1,0,"",up);return Ie._reactRootContainer=ot,Ie[Gs]=ot.current,ou(8===Ie.nodeType?Ie.parentNode:Ie),vu(function(){_u(qe,ot,et,st)}),ot}(l,o,t,C,w);return Al(X)}Yf.prototype.render=sp.prototype.render=function(t){var o=this._internalRoot;if(null===o)throw Error(h(409));_u(t,o,null,null)},Yf.prototype.unmount=sp.prototype.unmount=function(){var t=this._internalRoot;if(null!==t){this._internalRoot=null;var o=t.containerInfo;vu(function(){_u(null,t,null,null)}),o[Gs]=null}},Yf.prototype.unstable_scheduleHydration=function(t){if(t){var o=Q();t={blockedOn:null,target:t,priority:o};for(var l=0;l<fn.length&&0!==o&&o<fn[l].priority;l++);fn.splice(l,0,t),0===l&&Zt(t)}},nf=function(t){switch(t.tag){case 3:var o=t.stateNode;if(o.current.memoizedState.isDehydrated){var l=qs(o.pendingLanes);0!==l&&(nu(o,1|l),so(o,kt()),0==(6&or)&&(Rc=kt()+500,Oa()))}break;case 13:vu(function(){var w=Xs(t,1);if(null!==w){var C=wi();Uo(w,t,1,C)}}),op(t,1)}},Ku=function(t){if(13===t.tag){var o=Xs(t,134217728);null!==o&&Uo(o,t,134217728,wi()),op(t,134217728)}},rf=function(t){if(13===t.tag){var o=Ta(t),l=Xs(t,o);null!==l&&Uo(l,t,o,wi()),op(t,o)}},Q=function(){return tr},ee=function(t,o){var l=tr;try{return tr=t,o()}finally{tr=l}},ga=function(t,o,l){switch(o){case"input":if(Ee(t,l),o=l.name,"radio"===l.type&&null!=o){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var w=l[o];if(w!==t&&w.form===t.form){var C=mf(w);if(!C)throw Error(h(90));It(w),Ee(w,C)}}}break;case"textarea":Mt(t,l);break;case"select":null!=(o=l.value)&&_t(t,!!l.multiple,o,!1)}},lo=Yh,js=vu;var gm={usingClientEntryPoint:!1,Events:[ic,oc,mf,Ds,Qa,Yh]},kc={findFiberByHostInstance:su,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ym={bundleType:kc.bundleType,version:kc.version,rendererPackageName:kc.rendererPackageName,rendererConfig:kc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Z.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=Hu(t))?null:t.stateNode},findFiberByHostInstance:kc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Tl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tl.isDisabled&&Tl.supportsFiber)try{Hs=Tl.inject(ym),po=Tl}catch{}}return ko.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gm,ko.createPortal=function(t,o){var l=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ap(o))throw Error(h(200));return function(w,C,U){var X=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:W,key:null==X?null:""+X,children:w,containerInfo:C,implementation:U}}(t,o,null,l)},ko.createRoot=function(t,o){if(!ap(t))throw Error(h(299));var l=!1,w="",C=Wi;return null!=o&&(!0===o.unstable_strictMode&&(l=!0),void 0!==o.identifierPrefix&&(w=o.identifierPrefix),void 0!==o.onRecoverableError&&(C=o.onRecoverableError)),o=rp(t,1,!1,null,0,l,0,w,C),t[Gs]=o.current,ou(8===t.nodeType?t.parentNode:t),new sp(o)},ko.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var o=t._reactInternals;if(void 0===o)throw"function"==typeof t.render?Error(h(188)):(t=Object.keys(t).join(","),Error(h(268,t)));return null===(t=Hu(o))?null:t.stateNode},ko.flushSync=function(t){return vu(t)},ko.hydrate=function(t,o,l){if(!Qf(o))throw Error(h(200));return Jf(null,t,o,!0,l)},ko.hydrateRoot=function(t,o,l){if(!ap(t))throw Error(h(405));var w=null!=l&&l.hydratedSources||null,C=!1,U="",X=Wi;if(null!=l&&(!0===l.unstable_strictMode&&(C=!0),void 0!==l.identifierPrefix&&(U=l.identifierPrefix),void 0!==l.onRecoverableError&&(X=l.onRecoverableError)),o=M0(o,null,t,1,l??null,C,0,U,X),t[Gs]=o.current,ou(t),w)for(t=0;t<w.length;t++)C=(C=(l=w[t])._getVersion)(l._source),null==o.mutableSourceEagerHydrationData?o.mutableSourceEagerHydrationData=[l,C]:o.mutableSourceEagerHydrationData.push(l,C);return new Yf(o)},ko.render=function(t,o,l){if(!Qf(o))throw Error(h(200));return Jf(null,t,o,!1,l)},ko.unmountComponentAtNode=function(t){if(!Qf(t))throw Error(h(40));return!!t._reactRootContainer&&(vu(function(){Jf(null,null,t,!1,function(){t._reactRootContainer=null,t[Gs]=null})}),!0)},ko.unstable_batchedUpdates=Yh,ko.unstable_renderSubtreeIntoContainer=function(t,o,l,w){if(!Qf(l))throw Error(h(200));if(null==t||void 0===t._reactInternals)throw Error(h(38));return Jf(t,o,l,!1,w)},ko.version="18.2.0-next-9e3b772b8-20220608",ko}!function(_){(function m(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m)}catch(h){console.error(h)}})(),_.exports=d5()}(B_),z_=B_.exports.createRoot;const $_=Ti.div`
display: flex;
flex-direction: row;
align-items: center;
margin: 12px 0 0 0;
padding: 0 3rem 0 0;
& > img {
width: 48px;
height: 48px;
margin-right: 12px;
}
`,h5=Wa("ExtensionInstallModal"),p5=({onClose:_=(()=>{})})=>(h5("initializing"),pn.exports.jsx(dy,Object.assign({onClose:_},{children:pn.exports.jsx(pn.exports.Fragment,{children:pn.exports.jsxs(cy,{children:[pn.exports.jsx(ly,{children:"With Ledger Extension, you can:"}),pn.exports.jsxs($_,{children:[pn.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='48' height='48' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='48' height='48' rx='24' fill='%23252333'/%3e%3cpath d='M16.56 32.4h16.8V19.2h-15V21h13.2v9.6h-15c-.12 0-.12 0-.12-.12V17.52c0-.12 0-.12.12-.12h14.88c-.048-1.056-.864-1.8-1.92-1.8H16.56c-1.104 0-1.92.816-1.92 1.92v12.96c0 1.104.816 1.92 1.92 1.92Zm10.488-6.48a1.28 1.28 0 0 0 1.272 1.272c.696 0 1.248-.6 1.248-1.272a1.24 1.24 0 0 0-1.248-1.248c-.72 0-1.272.552-1.272 1.248Z' fill='%23BBB0FF'/%3e%3c/svg%3e"}),"Connect your Ledger directly to any dApp on Ethereum and Polygon"]}),pn.exports.jsxs($_,{children:[pn.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='48' height='48' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='48' height='48' rx='24' fill='%23252333'/%3e%3cpath d='M24 33.84c6.24-2.472 9.36-6.408 9.36-11.712v-5.04c-2.664-1.92-5.904-2.928-9.36-2.928-3.456 0-6.696 1.008-9.36 2.928v5.04c0 5.304 3.12 9.24 9.36 11.712Zm-7.44-11.712V18c2.232-1.392 4.632-2.04 7.44-2.04 2.808 0 5.208.648 7.44 2.04v4.128c0 4.512-2.232 7.512-7.44 9.744-5.208-2.232-7.44-5.232-7.44-9.744Zm3.36 1.176 3.36 3.384L28.944 21 27.6 19.656l-4.32 4.296-2.016-1.992-1.344 1.344Z' fill='%23BBB0FF'/%3e%3c/svg%3e"}),"Get warnings about risky transactions before signing them."]}),pn.exports.jsx(fy,Object.assign({variant:"primary",onClick:()=>{window.open("https://apps.apple.com/app/ledger-extension-browse-web3/id1627727841?pt=516048&ct=ledger_button&mt=8","_blank")}},{children:"Install Ledger Extension"}))]})})})));var Jc,V_,g5=Object.defineProperty,Wp=Object.getOwnPropertySymbols,W_=Object.prototype.hasOwnProperty,K_=Object.prototype.propertyIsEnumerable,G_=(_,m,h)=>m in _?g5(_,m,{enumerable:!0,configurable:!0,writable:!0,value:h}):_[m]=h;(_=>{const m=class{constructor(R,p,d,O){if(this.version=R,this.errorCorrectionLevel=p,this.modules=[],this.isFunction=[],R<m.MIN_VERSION||R>m.MAX_VERSION)throw new RangeError("Version value out of range");if(O<-1||O>7)throw new RangeError("Mask value out of range");this.size=4*R+17;let L=[];for(let N=0;N<this.size;N++)L.push(!1);for(let N=0;N<this.size;N++)this.modules.push(L.slice()),this.isFunction.push(L.slice());this.drawFunctionPatterns();const P=this.addEccAndInterleave(d);if(this.drawCodewords(P),-1==O){let N=1e9;for(let M=0;M<8;M++){this.applyMask(M),this.drawFormatBits(M);const V=this.getPenaltyScore();V<N&&(O=M,N=V),this.applyMask(M)}}v(0<=O&&O<=7),this.mask=O,this.applyMask(O),this.drawFormatBits(O),this.isFunction=[]}static encodeText(R,p){const d=_.QrSegment.makeSegments(R);return m.encodeSegments(d,p)}static encodeBinary(R,p){const d=_.QrSegment.makeBytes(R);return m.encodeSegments([d],p)}static encodeSegments(R,p,d=1,O=40,L=-1,P=!0){if(!(m.MIN_VERSION<=d&&d<=O&&O<=m.MAX_VERSION)||L<-1||L>7)throw new RangeError("Invalid value");let N,M;for(N=d;;N++){const W=8*m.getNumDataCodewords(N,p),H=E.getTotalBits(R,N);if(H<=W){M=H;break}if(N>=O)throw new RangeError("Data too long")}for(const W of[m.Ecc.MEDIUM,m.Ecc.QUARTILE,m.Ecc.HIGH])P&&M<=8*m.getNumDataCodewords(N,W)&&(p=W);let V=[];for(const W of R){c(W.mode.modeBits,4,V),c(W.numChars,W.mode.numCharCountBits(N),V);for(const H of W.getData())V.push(H)}v(V.length==M);const Z=8*m.getNumDataCodewords(N,p);v(V.length<=Z),c(0,Math.min(4,Z-V.length),V),c(0,(8-V.length%8)%8,V),v(V.length%8==0);for(let W=236;V.length<Z;W^=253)c(W,8,V);let x=[];for(;8*x.length<V.length;)x.push(0);return V.forEach((W,H)=>x[H>>>3]|=W<<7-(7&H)),new m(N,p,x,L)}getModule(R,p){return 0<=R&&R<this.size&&0<=p&&p<this.size&&this.modules[p][R]}getModules(){return this.modules}drawFunctionPatterns(){for(let d=0;d<this.size;d++)this.setFunctionModule(6,d,d%2==0),this.setFunctionModule(d,6,d%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const R=this.getAlignmentPatternPositions(),p=R.length;for(let d=0;d<p;d++)for(let O=0;O<p;O++)0==d&&0==O||0==d&&O==p-1||d==p-1&&0==O||this.drawAlignmentPattern(R[d],R[O]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(R){const p=this.errorCorrectionLevel.formatBits<<3|R;let d=p;for(let L=0;L<10;L++)d=d<<1^1335*(d>>>9);const O=21522^(p<<10|d);v(O>>>15==0);for(let L=0;L<=5;L++)this.setFunctionModule(8,L,f(O,L));this.setFunctionModule(8,7,f(O,6)),this.setFunctionModule(8,8,f(O,7)),this.setFunctionModule(7,8,f(O,8));for(let L=9;L<15;L++)this.setFunctionModule(14-L,8,f(O,L));for(let L=0;L<8;L++)this.setFunctionModule(this.size-1-L,8,f(O,L));for(let L=8;L<15;L++)this.setFunctionModule(8,this.size-15+L,f(O,L));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let R=this.version;for(let d=0;d<12;d++)R=R<<1^7973*(R>>>11);const p=this.version<<12|R;v(p>>>18==0);for(let d=0;d<18;d++){const O=f(p,d),L=this.size-11+d%3,P=Math.floor(d/3);this.setFunctionModule(L,P,O),this.setFunctionModule(P,L,O)}}drawFinderPattern(R,p){for(let d=-4;d<=4;d++)for(let O=-4;O<=4;O++){const L=Math.max(Math.abs(O),Math.abs(d)),P=R+O,N=p+d;0<=P&&P<this.size&&0<=N&&N<this.size&&this.setFunctionModule(P,N,2!=L&&4!=L)}}drawAlignmentPattern(R,p){for(let d=-2;d<=2;d++)for(let O=-2;O<=2;O++)this.setFunctionModule(R+O,p+d,1!=Math.max(Math.abs(O),Math.abs(d)))}setFunctionModule(R,p,d){this.modules[p][R]=d,this.isFunction[p][R]=!0}addEccAndInterleave(R){const p=this.version,d=this.errorCorrectionLevel;if(R.length!=m.getNumDataCodewords(p,d))throw new RangeError("Invalid argument");const O=m.NUM_ERROR_CORRECTION_BLOCKS[d.ordinal][p],L=m.ECC_CODEWORDS_PER_BLOCK[d.ordinal][p],P=Math.floor(m.getNumRawDataModules(p)/8),N=O-P%O,M=Math.floor(P/O);let V=[];const Z=m.reedSolomonComputeDivisor(L);for(let W=0,H=0;W<O;W++){let J=R.slice(H,H+M-L+(W<N?0:1));H+=J.length;const K=m.reedSolomonComputeRemainder(J,Z);W<N&&J.push(0),V.push(J.concat(K))}let x=[];for(let W=0;W<V[0].length;W++)V.forEach((H,J)=>{(W!=M-L||J>=N)&&x.push(H[W])});return v(x.length==P),x}drawCodewords(R){if(R.length!=Math.floor(m.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let p=0;for(let d=this.size-1;d>=1;d-=2){6==d&&(d=5);for(let O=0;O<this.size;O++)for(let L=0;L<2;L++){const P=d-L,N=0==(d+1&2)?this.size-1-O:O;!this.isFunction[N][P]&&p<8*R.length&&(this.modules[N][P]=f(R[p>>>3],7-(7&p)),p++)}}v(p==8*R.length)}applyMask(R){if(R<0||R>7)throw new RangeError("Mask value out of range");for(let p=0;p<this.size;p++)for(let d=0;d<this.size;d++){let O;switch(R){case 0:O=(d+p)%2==0;break;case 1:O=p%2==0;break;case 2:O=d%3==0;break;case 3:O=(d+p)%3==0;break;case 4:O=(Math.floor(d/3)+Math.floor(p/2))%2==0;break;case 5:O=d*p%2+d*p%3==0;break;case 6:O=(d*p%2+d*p%3)%2==0;break;case 7:O=((d+p)%2+d*p%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[p][d]&&O&&(this.modules[p][d]=!this.modules[p][d])}}getPenaltyScore(){let R=0;for(let L=0;L<this.size;L++){let P=!1,N=0,M=[0,0,0,0,0,0,0];for(let V=0;V<this.size;V++)this.modules[L][V]==P?(N++,5==N?R+=m.PENALTY_N1:N>5&&R++):(this.finderPenaltyAddHistory(N,M),P||(R+=this.finderPenaltyCountPatterns(M)*m.PENALTY_N3),P=this.modules[L][V],N=1);R+=this.finderPenaltyTerminateAndCount(P,N,M)*m.PENALTY_N3}for(let L=0;L<this.size;L++){let P=!1,N=0,M=[0,0,0,0,0,0,0];for(let V=0;V<this.size;V++)this.modules[V][L]==P?(N++,5==N?R+=m.PENALTY_N1:N>5&&R++):(this.finderPenaltyAddHistory(N,M),P||(R+=this.finderPenaltyCountPatterns(M)*m.PENALTY_N3),P=this.modules[V][L],N=1);R+=this.finderPenaltyTerminateAndCount(P,N,M)*m.PENALTY_N3}for(let L=0;L<this.size-1;L++)for(let P=0;P<this.size-1;P++){const N=this.modules[L][P];N==this.modules[L][P+1]&&N==this.modules[L+1][P]&&N==this.modules[L+1][P+1]&&(R+=m.PENALTY_N2)}let p=0;for(const L of this.modules)p=L.reduce((P,N)=>P+(N?1:0),p);const d=this.size*this.size,O=Math.ceil(Math.abs(20*p-10*d)/d)-1;return v(0<=O&&O<=9),R+=O*m.PENALTY_N4,v(0<=R&&R<=2568888),R}getAlignmentPatternPositions(){if(1==this.version)return[];{const R=Math.floor(this.version/7)+2,p=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*R-2));let d=[6];for(let O=this.size-7;d.length<R;O-=p)d.splice(1,0,O);return d}}static getNumRawDataModules(R){if(R<m.MIN_VERSION||R>m.MAX_VERSION)throw new RangeError("Version number out of range");let p=(16*R+128)*R+64;if(R>=2){const d=Math.floor(R/7)+2;p-=(25*d-10)*d-55,R>=7&&(p-=36)}return v(208<=p&&p<=29648),p}static getNumDataCodewords(R,p){return Math.floor(m.getNumRawDataModules(R)/8)-m.ECC_CODEWORDS_PER_BLOCK[p.ordinal][R]*m.NUM_ERROR_CORRECTION_BLOCKS[p.ordinal][R]}static reedSolomonComputeDivisor(R){if(R<1||R>255)throw new RangeError("Degree out of range");let p=[];for(let O=0;O<R-1;O++)p.push(0);p.push(1);let d=1;for(let O=0;O<R;O++){for(let L=0;L<p.length;L++)p[L]=m.reedSolomonMultiply(p[L],d),L+1<p.length&&(p[L]^=p[L+1]);d=m.reedSolomonMultiply(d,2)}return p}static reedSolomonComputeRemainder(R,p){let d=p.map(O=>0);for(const O of R){const L=O^d.shift();d.push(0),p.forEach((P,N)=>d[N]^=m.reedSolomonMultiply(P,L))}return d}static reedSolomonMultiply(R,p){if(R>>>8!=0||p>>>8!=0)throw new RangeError("Byte out of range");let d=0;for(let O=7;O>=0;O--)d=d<<1^285*(d>>>7),d^=(p>>>O&1)*R;return v(d>>>8==0),d}finderPenaltyCountPatterns(R){const p=R[1];v(p<=3*this.size);const d=p>0&&R[2]==p&&R[3]==3*p&&R[4]==p&&R[5]==p;return(d&&R[0]>=4*p&&R[6]>=p?1:0)+(d&&R[6]>=4*p&&R[0]>=p?1:0)}finderPenaltyTerminateAndCount(R,p,d){return R&&(this.finderPenaltyAddHistory(p,d),p=0),this.finderPenaltyAddHistory(p+=this.size,d),this.finderPenaltyCountPatterns(d)}finderPenaltyAddHistory(R,p){0==p[0]&&(R+=this.size),p.pop(),p.unshift(R)}};let h=m;function c(R,p,d){if(p<0||p>31||R>>>p!=0)throw new RangeError("Value out of range");for(let O=p-1;O>=0;O--)d.push(R>>>O&1)}function f(R,p){return 0!=(R>>>p&1)}function v(R){if(!R)throw new Error("Assertion error")}h.MIN_VERSION=1,h.MAX_VERSION=40,h.PENALTY_N1=3,h.PENALTY_N2=3,h.PENALTY_N3=40,h.PENALTY_N4=10,h.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]],h.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]],_.QrCode=h;const y=class{constructor(R,p,d){if(this.mode=R,this.numChars=p,this.bitData=d,p<0)throw new RangeError("Invalid argument");this.bitData=d.slice()}static makeBytes(R){let p=[];for(const d of R)c(d,8,p);return new y(y.Mode.BYTE,R.length,p)}static makeNumeric(R){if(!y.isNumeric(R))throw new RangeError("String contains non-numeric characters");let p=[];for(let d=0;d<R.length;){const O=Math.min(R.length-d,3);c(parseInt(R.substr(d,O),10),3*O+1,p),d+=O}return new y(y.Mode.NUMERIC,R.length,p)}static makeAlphanumeric(R){if(!y.isAlphanumeric(R))throw new RangeError("String contains unencodable characters in alphanumeric mode");let p,d=[];for(p=0;p+2<=R.length;p+=2){let O=45*y.ALPHANUMERIC_CHARSET.indexOf(R.charAt(p));O+=y.ALPHANUMERIC_CHARSET.indexOf(R.charAt(p+1)),c(O,11,d)}return p<R.length&&c(y.ALPHANUMERIC_CHARSET.indexOf(R.charAt(p)),6,d),new y(y.Mode.ALPHANUMERIC,R.length,d)}static makeSegments(R){return""==R?[]:y.isNumeric(R)?[y.makeNumeric(R)]:y.isAlphanumeric(R)?[y.makeAlphanumeric(R)]:[y.makeBytes(y.toUtf8ByteArray(R))]}static makeEci(R){let p=[];if(R<0)throw new RangeError("ECI assignment value out of range");if(R<128)c(R,8,p);else if(R<16384)c(2,2,p),c(R,14,p);else{if(!(R<1e6))throw new RangeError("ECI assignment value out of range");c(6,3,p),c(R,21,p)}return new y(y.Mode.ECI,0,p)}static isNumeric(R){return y.NUMERIC_REGEX.test(R)}static isAlphanumeric(R){return y.ALPHANUMERIC_REGEX.test(R)}getData(){return this.bitData.slice()}static getTotalBits(R,p){let d=0;for(const O of R){const L=O.mode.numCharCountBits(p);if(O.numChars>=1<<L)return 1/0;d+=4+L+O.bitData.length}return d}static toUtf8ByteArray(R){R=encodeURI(R);let p=[];for(let d=0;d<R.length;d++)"%"!=R.charAt(d)?p.push(R.charCodeAt(d)):(p.push(parseInt(R.substr(d+1,2),16)),d+=2);return p}};let E=y;E.NUMERIC_REGEX=/^[0-9]*$/,E.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,E.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",_.QrSegment=E})(Jc||(Jc={})),(_=>{const m=class{constructor(c,f){this.ordinal=c,this.formatBits=f}};let h=m;h.LOW=new m(0,1),h.MEDIUM=new m(1,0),h.QUARTILE=new m(2,3),h.HIGH=new m(3,2),_.Ecc=h})((V_=Jc||(Jc={})).QrCode||(V_.QrCode={})),(_=>{(m=>{const h=class{constructor(f,v){this.modeBits=f,this.numBitsCharCount=v}numCharCountBits(f){return this.numBitsCharCount[Math.floor((f+7)/17)]}};let c=h;c.NUMERIC=new h(1,[10,12,14]),c.ALPHANUMERIC=new h(2,[9,11,13]),c.BYTE=new h(4,[8,16,16]),c.KANJI=new h(8,[8,10,12]),c.ECI=new h(7,[0,0,0]),m.Mode=c})(_.QrSegment||(_.QrSegment={}))})(Jc||(Jc={}));var Rd=Jc,y5={L:Rd.QrCode.Ecc.LOW,M:Rd.QrCode.Ecc.MEDIUM,Q:Rd.QrCode.Ecc.QUARTILE,H:Rd.QrCode.Ecc.HIGH},m5=128,v5="L",_5="#FFFFFF",b5="#000000",w5=!1;!function(){try{(new Path2D).addPath(new Path2D)}catch{return!1}}();const S5=Ti(function(_){const m=_,{value:h,size:c=m5,level:f=v5,bgColor:v=_5,fgColor:y=b5,includeMargin:E=w5,imageSettings:R}=m,p=((x,W)=>{var H={};for(var J in x)W_.call(x,J)&&W.indexOf(J)<0&&(H[J]=x[J]);if(null!=x&&Wp)for(var J of Wp(x))W.indexOf(J)<0&&K_.call(x,J)&&(H[J]=x[J]);return H})(m,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let d=Rd.QrCode.encodeText(h,y5[f]).getModules();const O=E?4:0,L=d.length+2*O,P=function(x,W,H,J){if(null==J)return null;const le=x.length+2*(H?4:0),z=Math.floor(.1*W),B=le/W,ie=(J.width||z)*B,xe=(J.height||z)*B,Me=null==J.x?x.length/2-ie/2:J.x*B,Oe=null==J.y?x.length/2-xe/2:J.y*B;let we=null;if(J.excavate){let oe=Math.floor(Me),pe=Math.floor(Oe);we={x:oe,y:pe,w:Math.ceil(ie+Me-oe),h:Math.ceil(xe+Oe-pe)}}return{x:Me,y:Oe,h:xe,w:ie,excavation:we}}(d,c,E,R);let N=null;var V;null!=R&&null!=P&&(null!=P.excavation&&(V=P.excavation,d=d.slice().map((x,W)=>W<V.y||W>=V.y+V.h?x:x.map((H,J)=>(J<V.x||J>=V.x+V.w)&&H))),N=Uu.createElement("image",{xlinkHref:R.src,height:P.h,width:P.w,x:P.x+O,y:P.y+O,preserveAspectRatio:"none"}));const Z=function(x,W=0){const H=[];return x.forEach(function(J,K){let le=null;J.forEach(function(z,B){if(!z&&null!==le)return H.push(`M${le+W} ${K+W}h${B-le}v1H${le+W}z`),void(le=null);if(B!==J.length-1)z&&null===le&&(le=B);else{if(!z)return;H.push(null===le?`M${B+W},${K+W} h1v1H${B+W}z`:`M${le+W},${K+W} h${B+1-le}v1H${le+W}z`)}})}),H.join("")}(d,O);return Uu.createElement("svg",((x,W)=>{for(var H in W||(W={}))W_.call(W,H)&&G_(x,H,W[H]);if(Wp)for(var H of Wp(W))K_.call(W,H)&&G_(x,H,W[H]);return x})({height:c,width:c,viewBox:`0 0 ${L} ${L}`},p),Uu.createElement("path",{fill:v,d:`M0,0 h${L}v${L}H0z`,shapeRendering:"crispEdges"}),Uu.createElement("path",{fill:y,d:Z,shapeRendering:"crispEdges"}),N)})`
box-sizing: border-box;
flex-grow: 0;
flex-shrink: 0;
padding: 15px;
margin-left: auto;
margin-right: auto;
margin-top: 0.1rem;
border-radius: 1rem;
background-color: white;
@media ${L_} {
width: 200px;
height: 200px;
}
`,O5=Ti.div`
margin: 1rem 0;
border-top: none;
padding-top: 0;
`,hy=Wa("UseLedgerLiveModal");let Q_=_=>{};const R5=({isDesktop:_=!1,uri:m="",onClose:h=(()=>{})})=>{hy("initializing",{isDesktop:_,uri:m});const[c,f]=Po.exports.useState(m);Q_=f;const v=Po.exports.useRef();m!==v.current&&m!==c&&f(m),Po.exports.useEffect(()=>{v.current=m});const E=Po.exports.useCallback(()=>(hy("loading Ledger Live, ",c),window.location.href=`ledgerlive://wc?uri=${encodeURIComponent(c)}`,Yl(!1),!1),[c]),R=Po.exports.useCallback(()=>(window.open("https://www.ledger.com/ledger-live"),!1),[]);return pn.exports.jsx(dy,Object.assign({onClose:h},{children:pn.exports.jsxs(cy,Object.assign({textAlign:"center"},{children:[pn.exports.jsx(ly,{children:"Connect with Ledger Live"}),_&&""!==c&&pn.exports.jsxs(pn.exports.Fragment,{children:[pn.exports.jsx(xd,{children:"Scan for Ledger Live mobile"}),pn.exports.jsx(O5,{children:pn.exports.jsx(S5,{value:c,size:310})}),pn.exports.jsx(xd,Object.assign({noMargin:!0},{children:"or"})),pn.exports.jsx(fy,Object.assign({variant:"primary",onClick:E},{children:"Connect with Ledger Live desktop"}))]}),!_&&""!==c&&pn.exports.jsx(fy,Object.assign({variant:"primary",onClick:E,extraMargin:!0},{children:"Connect with Ledger Live mobile"})),pn.exports.jsxs(xd,{children:["Don't have Ledger Live for ",_?"desktop":"mobile","?"]}),pn.exports.jsx(xd,Object.assign({noMargin:!0},{children:pn.exports.jsx(l5,Object.assign({onClick:R},{children:"Install it"}))}))]}))}))},I5=Ti.div`
margin: 1.4rem 0;
display: flex;
flex-direction: column;
flex: 1;
align-items: start;
font-size: 1rem;
gap: 12px 20px;
`,C5=Ti.div`
display: flex;
flex-direction: row;
align-items: center;
word-break: keep-all;
& > img {
width: 24px;
height: 24px;
margin-right: 8px;
}
`,P5=Wa("PlatformNotSupportedModal"),k5=()=>(P5("initializing"),pn.exports.jsx(dy,{children:pn.exports.jsx(pn.exports.Fragment,{children:pn.exports.jsxs(cy,{children:[pn.exports.jsx(ly,{children:"Sorry, we don't support this platform just yet."}),pn.exports.jsxs(xd,{children:["We're working hard to expand our coverage.",pn.exports.jsx("br",{}),"Until we get there, you can try Ledger Connect on:"]}),pn.exports.jsx(I5,{children:pn.exports.jsxs(C5,{children:[pn.exports.jsx("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='250.076' height='248.707' viewBox='0 0 66.166 65.804'%3e%3cdefs%3e%3clinearGradient id='b'%3e%3cstop style='stop-color:%2306c2e7%3bstop-opacity:1' offset='0'/%3e%3cstop offset='.25' style='stop-color:%230db8ec%3bstop-opacity:1'/%3e%3cstop offset='.5' style='stop-color:%2312aef1%3bstop-opacity:1'/%3e%3cstop style='stop-color:%231f86f9%3bstop-opacity:1' offset='.75'/%3e%3cstop style='stop-color:%23107ddd%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient id='a'%3e%3cstop style='stop-color:%23bdbdbd%3bstop-opacity:1' offset='0'/%3e%3cstop style='stop-color:white%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23a' id='d' x1='412.975' y1='237.608' x2='412.975' y2='59.392' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.35154 0 0 .35154 206.79 159.773)'/%3e%3cfilter style='color-interpolation-filters:sRGB' id='f' x='-.021' width='1.042' y='-.022' height='1.045'%3e%3cfeGaussianBlur stdDeviation='.958'/%3e%3c/filter%3e%3cfilter style='color-interpolation-filters:sRGB' id='c' x='-.048' width='1.096' y='-.048' height='1.096'%3e%3cfeGaussianBlur stdDeviation='3.564'/%3e%3c/filter%3e%3cradialGradient xlink:href='%23b' id='e' cx='413.061' cy='136.818' fx='413.061' fy='136.818' r='82.125' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.38143 0 0 .38143 194.545 155.58)'/%3e%3c/defs%3e%3cpath transform='matrix(.33865 0 0 .3261 -106.77 -14.478)' style='opacity:.52999998%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:2.93077397%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23c)' d='M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z'/%3e%3cpath d='M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z' style='opacity:1%3bfill:url(%23d)%3bfill-opacity:1%3bstroke:%23cdcdcd%3bstroke-width:.09301235%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z' style='opacity:1%3bfill:url(%23e)%3bfill-opacity:1%3bstroke:none%3bstroke-width:.94955933%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M351.969 184.612a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.526.002a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zm-8.355.408a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.174l-1.006-4.75a.42.42 0 0 0-.414-.334zm11.184.004a.42.42 0 0 0-.414.333l-1.01 4.75a.42.42 0 1 0 .824.175l1.01-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.631 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.364-.29zm16.567.001a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm-19.237.976a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm21.937.015a.42.42 0 0 0-.393.25l-1.978 4.434a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.593zm-24.415 1.296a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.421l-1.022-1.769a.42.42 0 0 0-.335-.21zm26.859 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .729.42l1.021-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm31.701.022a.42.42 0 0 0-.355.174l-2.856 3.926a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.14zm35.976.003a.421.421 0 0 0-.291.139l-1.366 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.609 3.249a.42.42 0 1 0 .563-.626l-3.608-3.248a.42.42 0 0 0-.304-.108zm40.108.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm-41.822 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.681l1.653-1.2a.42.42 0 0 0-.261-.76zm-45.137 2.336a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm46.727 0a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm-47.938 2.506a.42.42 0 0 0-.18.805l1.865.833a.42.42 0 1 0 .343-.77l-1.865-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.866.83a.42.42 0 1 0 .343.77l1.866-.831a.42.42 0 0 0-.18-.806zm-50.238 2.602a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zm51.315.018a.408.408 0 0 0-.166.02l-4.618 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm-51.987 2.732a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.823l-1.997-.425a.413.413 0 0 0-.085-.009zm52.654.004a.518.518 0 0 0-.084.009l-1.998.424a.42.42 0 1 0 .175.823l1.997-.424a.42.42 0 0 0-.09-.833zm-53.163 2.761a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .088-.837l-4.828-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.086 0l-4.828.504a.42.42 0 1 0 .087.837l4.829-.504a.42.42 0 0 0-.002-.837zm-53.758 2.794a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.086 0l-4.829.504a.42.42 0 1 0 .088.838l4.829-.504a.42.42 0 0 0-.002-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.434.434 0 0 0-.085-.001zm-46.26 2.844a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.669.004a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zm-45.305 1.657a.408.408 0 0 0-.167.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm-43.7 3.273a.42.42 0 0 0-.163.036l-1.865.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.18-.806zm45.46.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.768l-1.865-.833a.42.42 0 0 0-.163-.036zm-41.827.912a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .421-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.248 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.682l1.653-1.2a.42.42 0 0 0-.261-.762zm40.287.015a.42.42 0 0 0-.262.762l1.653 1.2a.42.42 0 1 0 .495-.681l-1.653-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.303.108l-3.611 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm32.8.011a.421.421 0 0 0-.259.734l3.608 3.248a.42.42 0 1 0 .564-.625l-3.609-3.249a.42.42 0 0 0-.303-.107zm-29.374 3.084a.42.42 0 0 0-.355.173l-2.857 3.927a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm25.936.018a.421.421 0 0 0-.327.668l2.851 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.291.14l-1.366 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.33.002a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.139zm-25.655 1.684a.419.419 0 0 0-.392.25l-1.978 4.433a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.592zm17.956.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm-21.432 1.359a.419.419 0 0 0-.335.21l-1.02 1.768a.42.42 0 1 0 .728.421l1.021-1.769a.42.42 0 0 0-.394-.63zm24.935 0a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.422l-1.021-1.769a.42.42 0 0 0-.335-.21zm-17.055.063a.42.42 0 0 0-.414.334l-1.009 4.749a.42.42 0 1 0 .823.175l1.01-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.572.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .801.26l.631-1.942a.42.42 0 0 0-.436-.55zm15.45 0a.42.42 0 0 0-.437.55l.631 1.943a.42.42 0 1 0 .801-.26l-.631-1.942a.42.42 0 0 0-.364-.29zm-10.366 1.083a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.088l.213-2.03a.42.42 0 0 0-.46-.463zm5.268.002a.42.42 0 0 0-.46.463l.211 2.03a.42.42 0 1 0 .837-.088l-.211-2.03a.42.42 0 0 0-.377-.375z' style='opacity:1%3bfill:%23f4f2f3%3bfill-opacity:1%3bstroke:none%3bstroke-width:.38088897%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath transform='matrix(.35154 0 0 .35154 -112.095 -20.822)' d='m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z' style='opacity:.40900005%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.5614785%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23f)'/%3e%3cpath style='opacity:1%3bfill:%23ff5150%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' d='m129.839 160.803-23.014-23.015 31.437-8.423z' transform='matrix(.64804 -.3317 -.36122 .63206 10.328 -23.732)'/%3e%3cpath transform='matrix(-.36122 .63206 .64804 -.3317 -20.923 6.11)' d='m129.839 160.803-23.014-23.015 31.437-8.423z' style='opacity:1%3bfill:%23f1f1f1%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill'/%3e%3cpath style='opacity:.243%3bfill:black%3bstroke:none%3bstroke-width:.09301235px%3bstroke-linecap:butt%3bstroke-linejoin:miter%3bstroke-opacity:1' d='m331.853 231.185 23.416-15.752 16.815-22.665z' transform='translate(-318.886 -180.595)'/%3e%3c/svg%3e"}),"Safari on iOS"]})})]})})}));var J_={exports:{}};!function(_,m){_.exports=function(h){var c={};function f(v){if(c[v])return c[v].exports;var y=c[v]={i:v,l:!1,exports:{}};return h[v].call(y.exports,y,y.exports,f),y.l=!0,y.exports}return f.m=h,f.c=c,f.d=function(v,y,E){f.o(v,y)||Object.defineProperty(v,y,{enumerable:!0,get:E})},f.r=function(v){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})},f.t=function(v,y){if(1&y&&(v=f(v)),8&y||4&y&&"object"==typeof v&&v&&v.__esModule)return v;var E=Object.create(null);if(f.r(E),Object.defineProperty(E,"default",{enumerable:!0,value:v}),2&y&&"string"!=typeof v)for(var R in v)f.d(E,R,function(p){return v[p]}.bind(null,R));return E},f.n=function(v){var y=v&&v.__esModule?function(){return v.default}:function(){return v};return f.d(y,"a",y),y},f.o=function(v,y){return Object.prototype.hasOwnProperty.call(v,y)},f.p="",f(f.s=90)}({17:function(h,c,f){c.__esModule=!0,c.default=void 0;var v=f(18),y=function(){function E(){}return E.getFirstMatch=function(R,p){var d=p.match(R);return d&&d.length>0&&d[1]||""},E.getSecondMatch=function(R,p){var d=p.match(R);return d&&d.length>1&&d[2]||""},E.matchAndReturnConst=function(R,p,d){if(R.test(p))return d},E.getWindowsVersionName=function(R){switch(R){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},E.getMacOSVersionName=function(R){var p=R.split(".").splice(0,2).map(function(d){return parseInt(d,10)||0});if(p.push(0),10===p[0])switch(p[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},E.getAndroidVersionName=function(R){var p=R.split(".").splice(0,2).map(function(d){return parseInt(d,10)||0});if(p.push(0),!(1===p[0]&&p[1]<5))return 1===p[0]&&p[1]<6?"Cupcake":1===p[0]&&p[1]>=6?"Donut":2===p[0]&&p[1]<2?"Eclair":2===p[0]&&2===p[1]?"Froyo":2===p[0]&&p[1]>2?"Gingerbread":3===p[0]?"Honeycomb":4===p[0]&&p[1]<1?"Ice Cream Sandwich":4===p[0]&&p[1]<4?"Jelly Bean":4===p[0]&&p[1]>=4?"KitKat":5===p[0]?"Lollipop":6===p[0]?"Marshmallow":7===p[0]?"Nougat":8===p[0]?"Oreo":9===p[0]?"Pie":void 0},E.getVersionPrecision=function(R){return R.split(".").length},E.compareVersions=function(R,p,d){void 0===d&&(d=!1);var O=E.getVersionPrecision(R),L=E.getVersionPrecision(p),P=Math.max(O,L),N=0,M=E.map([R,p],function(V){var Z=P-E.getVersionPrecision(V),x=V+new Array(Z+1).join(".0");return E.map(x.split("."),function(W){return new Array(20-W.length).join("0")+W}).reverse()});for(d&&(N=P-Math.min(O,L)),P-=1;P>=N;){if(M[0][P]>M[1][P])return 1;if(M[0][P]===M[1][P]){if(P===N)return 0;P-=1}else if(M[0][P]<M[1][P])return-1}},E.map=function(R,p){var d,O=[];if(Array.prototype.map)return Array.prototype.map.call(R,p);for(d=0;d<R.length;d+=1)O.push(p(R[d]));return O},E.find=function(R,p){var d,O;if(Array.prototype.find)return Array.prototype.find.call(R,p);for(d=0,O=R.length;d<O;d+=1){var L=R[d];if(p(L,d))return L}},E.assign=function(R){for(var p,d,O=R,L=arguments.length,P=new Array(L>1?L-1:0),N=1;N<L;N++)P[N-1]=arguments[N];if(Object.assign)return Object.assign.apply(Object,[R].concat(P));var M=function(){var V=P[p];"object"==typeof V&&null!==V&&Object.keys(V).forEach(function(Z){O[Z]=V[Z]})};for(p=0,d=P.length;p<d;p+=1)M();return R},E.getBrowserAlias=function(R){return v.BROWSER_ALIASES_MAP[R]},E.getBrowserTypeByAlias=function(R){return v.BROWSER_MAP[R]||""},E}();c.default=y,h.exports=c.default},18:function(h,c,f){c.__esModule=!0,c.ENGINE_MAP=c.OS_MAP=c.PLATFORMS_MAP=c.BROWSER_MAP=c.BROWSER_ALIASES_MAP=void 0,c.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},c.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},c.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},c.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},c.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(h,c,f){c.__esModule=!0,c.default=void 0;var v,y=(v=f(91))&&v.__esModule?v:{default:v},E=f(18);function R(d,O){for(var L=0;L<O.length;L++){var P=O[L];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(d,P.key,P)}}var p=function(){function d(){}var O,P;return d.getParser=function(N,M){if(void 0===M&&(M=!1),"string"!=typeof N)throw new Error("UserAgent should be a string");return new y.default(N,M)},d.parse=function(N){return new y.default(N).getResult()},O=d,P=[{key:"BROWSER_MAP",get:function(){return E.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return E.ENGINE_MAP}},{key:"OS_MAP",get:function(){return E.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return E.PLATFORMS_MAP}}],null&&R(O.prototype,null),P&&R(O,P),d}();c.default=p,h.exports=c.default},91:function(h,c,f){c.__esModule=!0,c.default=void 0;var v=d(f(92)),y=d(f(93)),E=d(f(94)),R=d(f(95)),p=d(f(17));function d(L){return L&&L.__esModule?L:{default:L}}var O=function(){function L(N,M){if(void 0===M&&(M=!1),null==N||""===N)throw new Error("UserAgent parameter can't be empty");this._ua=N,this.parsedResult={},!0!==M&&this.parse()}var P=L.prototype;return P.getUA=function(){return this._ua},P.test=function(N){return N.test(this._ua)},P.parseBrowser=function(){var N=this;this.parsedResult.browser={};var M=p.default.find(v.default,function(V){if("function"==typeof V.test)return V.test(N);if(V.test instanceof Array)return V.test.some(function(Z){return N.test(Z)});throw new Error("Browser's test function is not valid")});return M&&(this.parsedResult.browser=M.describe(this.getUA())),this.parsedResult.browser},P.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},P.getBrowserName=function(N){return N?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},P.getBrowserVersion=function(){return this.getBrowser().version},P.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},P.parseOS=function(){var N=this;this.parsedResult.os={};var M=p.default.find(y.default,function(V){if("function"==typeof V.test)return V.test(N);if(V.test instanceof Array)return V.test.some(function(Z){return N.test(Z)});throw new Error("Browser's test function is not valid")});return M&&(this.parsedResult.os=M.describe(this.getUA())),this.parsedResult.os},P.getOSName=function(N){var M=this.getOS().name;return N?String(M).toLowerCase()||"":M||""},P.getOSVersion=function(){return this.getOS().version},P.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},P.getPlatformType=function(N){void 0===N&&(N=!1);var M=this.getPlatform().type;return N?String(M).toLowerCase()||"":M||""},P.parsePlatform=function(){var N=this;this.parsedResult.platform={};var M=p.default.find(E.default,function(V){if("function"==typeof V.test)return V.test(N);if(V.test instanceof Array)return V.test.some(function(Z){return N.test(Z)});throw new Error("Browser's test function is not valid")});return M&&(this.parsedResult.platform=M.describe(this.getUA())),this.parsedResult.platform},P.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},P.getEngineName=function(N){return N?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},P.parseEngine=function(){var N=this;this.parsedResult.engine={};var M=p.default.find(R.default,function(V){if("function"==typeof V.test)return V.test(N);if(V.test instanceof Array)return V.test.some(function(Z){return N.test(Z)});throw new Error("Browser's test function is not valid")});return M&&(this.parsedResult.engine=M.describe(this.getUA())),this.parsedResult.engine},P.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},P.getResult=function(){return p.default.assign({},this.parsedResult)},P.satisfies=function(N){var M=this,V={},Z=0,x={},W=0;if(Object.keys(N).forEach(function(xe){var Me=N[xe];"string"==typeof Me?(x[xe]=Me,W+=1):"object"==typeof Me&&(V[xe]=Me,Z+=1)}),Z>0){var H=Object.keys(V),J=p.default.find(H,function(xe){return M.isOS(xe)});if(J){var K=this.satisfies(V[J]);if(void 0!==K)return K}var le=p.default.find(H,function(xe){return M.isPlatform(xe)});if(le){var z=this.satisfies(V[le]);if(void 0!==z)return z}}if(W>0){var B=Object.keys(x),ie=p.default.find(B,function(xe){return M.isBrowser(xe,!0)});if(void 0!==ie)return this.compareVersion(x[ie])}},P.isBrowser=function(N,M){void 0===M&&(M=!1);var V=this.getBrowserName().toLowerCase(),Z=N.toLowerCase(),x=p.default.getBrowserTypeByAlias(Z);return M&&x&&(Z=x.toLowerCase()),Z===V},P.compareVersion=function(N){var M=[0],V=N,Z=!1,x=this.getBrowserVersion();if("string"==typeof x)return">"===N[0]||"<"===N[0]?(V=N.substr(1),"="===N[1]?(Z=!0,V=N.substr(2)):M=[],M.push(">"===N[0]?1:-1)):"="===N[0]?V=N.substr(1):"~"===N[0]&&(Z=!0,V=N.substr(1)),M.indexOf(p.default.compareVersions(x,V,Z))>-1},P.isOS=function(N){return this.getOSName(!0)===String(N).toLowerCase()},P.isPlatform=function(N){return this.getPlatformType(!0)===String(N).toLowerCase()},P.isEngine=function(N){return this.getEngineName(!0)===String(N).toLowerCase()},P.is=function(N,M){return void 0===M&&(M=!1),this.isBrowser(N,M)||this.isOS(N)||this.isPlatform(N)},P.some=function(N){var M=this;return void 0===N&&(N=[]),N.some(function(V){return M.is(V)})},L}();c.default=O,h.exports=c.default},92:function(h,c,f){c.__esModule=!0,c.default=void 0;var v,y=(v=f(17))&&v.__esModule?v:{default:v},E=/version\/(\d+(\.?_?\d+)+)/i;c.default=[{test:[/googlebot/i],describe:function(p){var d={name:"Googlebot"},O=y.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/opera/i],describe:function(p){var d={name:"Opera"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/opr\/|opios/i],describe:function(p){var d={name:"Opera"},O=y.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/SamsungBrowser/i],describe:function(p){var d={name:"Samsung Internet for Android"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/Whale/i],describe:function(p){var d={name:"NAVER Whale Browser"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/MZBrowser/i],describe:function(p){var d={name:"MZ Browser"},O=y.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/focus/i],describe:function(p){var d={name:"Focus"},O=y.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/swing/i],describe:function(p){var d={name:"Swing"},O=y.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/coast/i],describe:function(p){var d={name:"Opera Coast"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(p){var d={name:"Opera Touch"},O=y.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/yabrowser/i],describe:function(p){var d={name:"Yandex Browser"},O=y.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/ucbrowser/i],describe:function(p){var d={name:"UC Browser"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/Maxthon|mxios/i],describe:function(p){var d={name:"Maxthon"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/epiphany/i],describe:function(p){var d={name:"Epiphany"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/puffin/i],describe:function(p){var d={name:"Puffin"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/sleipnir/i],describe:function(p){var d={name:"Sleipnir"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/k-meleon/i],describe:function(p){var d={name:"K-Meleon"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/micromessenger/i],describe:function(p){var d={name:"WeChat"},O=y.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/qqbrowser/i],describe:function(p){var d={name:/qqbrowserlite/i.test(p)?"QQ Browser Lite":"QQ Browser"},O=y.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/msie|trident/i],describe:function(p){var d={name:"Internet Explorer"},O=y.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/\sedg\//i],describe:function(p){var d={name:"Microsoft Edge"},O=y.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/edg([ea]|ios)/i],describe:function(p){var d={name:"Microsoft Edge"},O=y.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/vivaldi/i],describe:function(p){var d={name:"Vivaldi"},O=y.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/seamonkey/i],describe:function(p){var d={name:"SeaMonkey"},O=y.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/sailfish/i],describe:function(p){var d={name:"Sailfish"},O=y.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,p);return O&&(d.version=O),d}},{test:[/silk/i],describe:function(p){var d={name:"Amazon Silk"},O=y.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/phantom/i],describe:function(p){var d={name:"PhantomJS"},O=y.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/slimerjs/i],describe:function(p){var d={name:"SlimerJS"},O=y.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(p){var d={name:"BlackBerry"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/(web|hpw)[o0]s/i],describe:function(p){var d={name:"WebOS Browser"},O=y.default.getFirstMatch(E,p)||y.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/bada/i],describe:function(p){var d={name:"Bada"},O=y.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/tizen/i],describe:function(p){var d={name:"Tizen"},O=y.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/qupzilla/i],describe:function(p){var d={name:"QupZilla"},O=y.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/firefox|iceweasel|fxios/i],describe:function(p){var d={name:"Firefox"},O=y.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/electron/i],describe:function(p){var d={name:"Electron"},O=y.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/MiuiBrowser/i],describe:function(p){var d={name:"Miui"},O=y.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/chromium/i],describe:function(p){var d={name:"Chromium"},O=y.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,p)||y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/chrome|crios|crmo/i],describe:function(p){var d={name:"Chrome"},O=y.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/GSA/i],describe:function(p){var d={name:"Google Search"},O=y.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:function(p){var d=!p.test(/like android/i),O=p.test(/android/i);return d&&O},describe:function(p){var d={name:"Android Browser"},O=y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/playstation 4/i],describe:function(p){var d={name:"PlayStation 4"},O=y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/safari|applewebkit/i],describe:function(p){var d={name:"Safari"},O=y.default.getFirstMatch(E,p);return O&&(d.version=O),d}},{test:[/.*/i],describe:function(p){var d=-1!==p.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:y.default.getFirstMatch(d,p),version:y.default.getSecondMatch(d,p)}}}],h.exports=c.default},93:function(h,c,f){c.__esModule=!0,c.default=void 0;var v,y=(v=f(17))&&v.__esModule?v:{default:v},E=f(18);c.default=[{test:[/Roku\/DVP/],describe:function(p){var d=y.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,p);return{name:E.OS_MAP.Roku,version:d}}},{test:[/windows phone/i],describe:function(p){var d=y.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,p);return{name:E.OS_MAP.WindowsPhone,version:d}}},{test:[/windows /i],describe:function(p){var d=y.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,p),O=y.default.getWindowsVersionName(d);return{name:E.OS_MAP.Windows,version:d,versionName:O}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(p){var d={name:E.OS_MAP.iOS},O=y.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,p);return O&&(d.version=O),d}},{test:[/macintosh/i],describe:function(p){var d=y.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,p).replace(/[_\s]/g,"."),O=y.default.getMacOSVersionName(d),L={name:E.OS_MAP.MacOS,version:d};return O&&(L.versionName=O),L}},{test:[/(ipod|iphone|ipad)/i],describe:function(p){var d=y.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,p).replace(/[_\s]/g,".");return{name:E.OS_MAP.iOS,version:d}}},{test:function(p){var d=!p.test(/like android/i),O=p.test(/android/i);return d&&O},describe:function(p){var d=y.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,p),O=y.default.getAndroidVersionName(d),L={name:E.OS_MAP.Android,version:d};return O&&(L.versionName=O),L}},{test:[/(web|hpw)[o0]s/i],describe:function(p){var d=y.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,p),O={name:E.OS_MAP.WebOS};return d&&d.length&&(O.version=d),O}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(p){var d=y.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,p)||y.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,p)||y.default.getFirstMatch(/\bbb(\d+)/i,p);return{name:E.OS_MAP.BlackBerry,version:d}}},{test:[/bada/i],describe:function(p){var d=y.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,p);return{name:E.OS_MAP.Bada,version:d}}},{test:[/tizen/i],describe:function(p){var d=y.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,p);return{name:E.OS_MAP.Tizen,version:d}}},{test:[/linux/i],describe:function(){return{name:E.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:E.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(p){var d=y.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,p);return{name:E.OS_MAP.PlayStation4,version:d}}}],h.exports=c.default},94:function(h,c,f){c.__esModule=!0,c.default=void 0;var v,y=(v=f(17))&&v.__esModule?v:{default:v},E=f(18);c.default=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(p){var d=y.default.getFirstMatch(/(can-l01)/i,p)&&"Nova",O={type:E.PLATFORMS_MAP.mobile,vendor:"Huawei"};return d&&(O.model=d),O}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:E.PLATFORMS_MAP.tablet}}},{test:function(p){var d=p.test(/ipod|iphone/i),O=p.test(/like (ipod|iphone)/i);return d&&!O},describe:function(p){var d=y.default.getFirstMatch(/(ipod|iphone)/i,p);return{type:E.PLATFORMS_MAP.mobile,vendor:"Apple",model:d}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:E.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:E.PLATFORMS_MAP.mobile}}},{test:function(p){return"blackberry"===p.getBrowserName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(p){return"bada"===p.getBrowserName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.mobile}}},{test:function(p){return"windows phone"===p.getBrowserName()},describe:function(){return{type:E.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(p){var d=Number(String(p.getOSVersion()).split(".")[0]);return"android"===p.getOSName(!0)&&d>=3},describe:function(){return{type:E.PLATFORMS_MAP.tablet}}},{test:function(p){return"android"===p.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.mobile}}},{test:function(p){return"macos"===p.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(p){return"windows"===p.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.desktop}}},{test:function(p){return"linux"===p.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.desktop}}},{test:function(p){return"playstation 4"===p.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.tv}}},{test:function(p){return"roku"===p.getOSName(!0)},describe:function(){return{type:E.PLATFORMS_MAP.tv}}}],h.exports=c.default},95:function(h,c,f){c.__esModule=!0,c.default=void 0;var v,y=(v=f(17))&&v.__esModule?v:{default:v},E=f(18);c.default=[{test:function(p){return"microsoft edge"===p.getBrowserName(!0)},describe:function(p){if(/\sedg\//i.test(p))return{name:E.ENGINE_MAP.Blink};var d=y.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,p);return{name:E.ENGINE_MAP.EdgeHTML,version:d}}},{test:[/trident/i],describe:function(p){var d={name:E.ENGINE_MAP.Trident},O=y.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:function(p){return p.test(/presto/i)},describe:function(p){var d={name:E.ENGINE_MAP.Presto},O=y.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:function(p){var d=p.test(/gecko/i),O=p.test(/like gecko/i);return d&&!O},describe:function(p){var d={name:E.ENGINE_MAP.Gecko},O=y.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:E.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(p){var d={name:E.ENGINE_MAP.WebKit},O=y.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,p);return O&&(d.version=O),d}}],h.exports=c.default}})}(J_);var N5=J1(J_.exports);function py(){const _=N5.getParser(window.navigator.userAgent),m=_.getOS(),h=_.getBrowser(),{type:c}=_.getPlatform();var f,v;return"isBrave"===(null===(v=null===(f=window.navigator.brave)||void 0===f?void 0:f.isBrave)||void 0===v?void 0:v.name)&&(h.name="Brave"),{type:c,os:m,browser:h}}let Kp=null;function gy(_,m){if(!Kp){const h=document.body,c=document.createElement("div");c.className="ledger-ck-modal",h.appendChild(c),Kp=z_(c)}if(Kp&&_){let h;switch(_){case"UseLedgerLiveModal":h=pn.exports.jsx(R5,Object.assign({},m));break;case"PlatformNotSupportedModal":h=pn.exports.jsx(k5,{});break;case"ExtensionInstallModal":h=pn.exports.jsx(p5,Object.assign({},m))}Kp.render(h)}Yl(!0)}const us=Wa("WalletConnectLegacy"),yy=a_("WalletConnectLegacy");function T5(){return Bi(this,void 0,void 0,function*(){us("getWalletConnectLegacyProvider");try{const _=yield function(){return Bi(this,void 0,void 0,function*(){us("initWalletConnectLegacyProvider");const m=zu();return us("walletConnectProviderOptions is",m),us("created a new legacy provider instance"),new _3({chainId:m.chainId,bridge:m.bridge,infuraId:m.infuraId,rpc:m.rpc,qrcode:!1})})}();return m=_,us("assignWalletConnectLegacyProviderEvents"),m.on("connect",function(f){us("connectHandler",f),Yl(!1)}),m.on("disconnect",function c(f,v){us("disconnectHandler",f,v),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect"),m.removeListener("disconnect",c)}),_.request=function(m){us("patchWalletConnectLegacyProviderRequest");const h=m.request.bind(m),c=zu();return function({method:f,params:v}){return Bi(this,void 0,void 0,function*(){return"eth_requestAccounts"===f?(us("calling patched",f,v),new Promise((y,E)=>Bi(this,void 0,void 0,function*(){try{if(!m.connected)return yield m.connector.createSession({chainId:c.chainId}),us("created a new session"),function(_){const m=py(),h=(sg("getSupportResult"),aw);zu(),!(null==localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))&&!(null==localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))&&h.isLedgerConnectSupported&&h.isChainIdSupported?gy("ExtensionInstallModal",{onClose:_.onClose}):gy("UseLedgerLiveModal",{isDesktop:"desktop"===m.type,uri:_.uri,onClose:_.onClose})}({uri:m.connector.uri,onClose:()=>{yy("user rejected"),E(new u_)}}),y(yield h({method:f,params:v}));us("reusing existing session"),y(yield h({method:f,params:v}))}catch(R){return yy("error",R),E(R)}}))):(us("calling provider",f,v),yield h({method:f,params:v}))})}}(_),_}catch(_){const m=_ instanceof Error?_:new Error(String(_));throw yy("error",m),m}var m})}var X_,my={exports:{}},Ql="object"==typeof Reflect?Reflect:null,Z_=Ql&&"function"==typeof Ql.apply?Ql.apply:function(_,m,h){return Function.prototype.apply.call(_,m,h)};X_=Ql&&"function"==typeof Ql.ownKeys?Ql.ownKeys:Object.getOwnPropertySymbols?function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:function(_){return Object.getOwnPropertyNames(_)};var eb=Number.isNaN||function(_){return _!=_};function Cr(){Cr.init.call(this)}my.exports=Cr,my.exports.once=function(_,m){return new Promise(function(h,c){function f(y){_.removeListener(m,v),c(y)}function v(){"function"==typeof _.removeListener&&_.removeListener("error",f),h([].slice.call(arguments))}var y;ub(_,m,v,{once:!0}),"error"!==m&&("function"==typeof(y=_).on&&ub(y,"error",f,{once:!0}))})},Cr.EventEmitter=Cr,Cr.prototype._events=void 0,Cr.prototype._eventsCount=0,Cr.prototype._maxListeners=void 0;var tb=10;function Gp(_){if("function"!=typeof _)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _)}function nb(_){return void 0===_._maxListeners?Cr.defaultMaxListeners:_._maxListeners}function rb(_,m,h,c){var f,v,y;if(Gp(h),void 0===(v=_._events)?(v=_._events=Object.create(null),_._eventsCount=0):(void 0!==v.newListener&&(_.emit("newListener",m,h.listener?h.listener:h),v=_._events),y=v[m]),void 0===y)y=v[m]=h,++_._eventsCount;else if("function"==typeof y?y=v[m]=c?[h,y]:[y,h]:c?y.unshift(h):y.push(h),(f=nb(_))>0&&y.length>f&&!y.warned){y.warned=!0;var R=new Error("Possible EventEmitter memory leak detected. "+y.length+" "+String(m)+" listeners added. Use emitter.setMaxListeners() to increase limit");R.name="MaxListenersExceededWarning",R.emitter=_,R.type=m,R.count=y.length,console&&console.warn&&console.warn(R)}return _}function M5(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function ib(_,m,h){var c={fired:!1,wrapFn:void 0,target:_,type:m,listener:h},f=M5.bind(c);return f.listener=h,c.wrapFn=f,f}function ob(_,m,h){var c=_._events;if(void 0===c)return[];var f=c[m];return void 0===f?[]:"function"==typeof f?h?[f.listener||f]:[f]:h?function(v){for(var y=new Array(v.length),E=0;E<y.length;++E)y[E]=v[E].listener||v[E];return y}(f):ab(f,f.length)}function sb(_){var m=this._events;if(void 0!==m){var h=m[_];if("function"==typeof h)return 1;if(void 0!==h)return h.length}return 0}function ab(_,m){for(var h=new Array(m),c=0;c<m;++c)h[c]=_[c];return h}function ub(_,m,h,c){if("function"==typeof _.on)c.once?_.once(m,h):_.on(m,h);else{if("function"!=typeof _.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof _);_.addEventListener(m,function f(v){c.once&&_.removeEventListener(m,f),h(v)})}}Object.defineProperty(Cr,"defaultMaxListeners",{enumerable:!0,get:function(){return tb},set:function(_){if("number"!=typeof _||_<0||eb(_))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_+".");tb=_}}),Cr.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Cr.prototype.setMaxListeners=function(_){if("number"!=typeof _||_<0||eb(_))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+_+".");return this._maxListeners=_,this},Cr.prototype.getMaxListeners=function(){return nb(this)},Cr.prototype.emit=function(_){for(var m=[],h=1;h<arguments.length;h++)m.push(arguments[h]);var c="error"===_,f=this._events;if(void 0!==f)c=c&&void 0===f.error;else if(!c)return!1;if(c){var v;if(m.length>0&&(v=m[0]),v instanceof Error)throw v;var y=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw y.context=v,y}var E=f[_];if(void 0===E)return!1;if("function"==typeof E)Z_(E,this,m);else{var R=E.length,p=ab(E,R);for(h=0;h<R;++h)Z_(p[h],this,m)}return!0},Cr.prototype.on=Cr.prototype.addListener=function(_,m){return rb(this,_,m,!1)},Cr.prototype.prependListener=function(_,m){return rb(this,_,m,!0)},Cr.prototype.once=function(_,m){return Gp(m),this.on(_,ib(this,_,m)),this},Cr.prototype.prependOnceListener=function(_,m){return Gp(m),this.prependListener(_,ib(this,_,m)),this},Cr.prototype.off=Cr.prototype.removeListener=function(_,m){var h,c,f,v,y;if(Gp(m),void 0===(c=this._events))return this;if(void 0===(h=c[_]))return this;if(h===m||h.listener===m)0==--this._eventsCount?this._events=Object.create(null):(delete c[_],c.removeListener&&this.emit("removeListener",_,h.listener||m));else if("function"!=typeof h){for(f=-1,v=h.length-1;v>=0;v--)if(h[v]===m||h[v].listener===m){y=h[v].listener,f=v;break}if(f<0)return this;0===f?h.shift():function(E,R){for(;R+1<E.length;R++)E[R]=E[R+1];E.pop()}(h,f),1===h.length&&(c[_]=h[0]),void 0!==c.removeListener&&this.emit("removeListener",_,y||m)}return this},Cr.prototype.removeAllListeners=function(_){var m,h,c;if(void 0===(h=this._events))return this;if(void 0===h.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==h[_]&&(0==--this._eventsCount?this._events=Object.create(null):delete h[_]),this;if(0===arguments.length){var f,v=Object.keys(h);for(c=0;c<v.length;++c)"removeListener"!==(f=v[c])&&this.removeAllListeners(f);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(m=h[_]))this.removeListener(_,m);else if(void 0!==m)for(c=m.length-1;c>=0;c--)this.removeListener(_,m[c]);return this},Cr.prototype.listeners=function(_){return ob(this,_,!0)},Cr.prototype.rawListeners=function(_){return ob(this,_,!1)},Cr.listenerCount=function(_,m){return"function"==typeof _.listenerCount?_.listenerCount(m):sb.call(_,m)},Cr.prototype.listenerCount=sb,Cr.prototype.eventNames=function(){return this._eventsCount>0?X_(this._events):[]};var Yp={},An={},cb={};(function(_){Object.defineProperty(_,"__esModule",{value:!0}),_.mul=Math.imul||function(m,h){var c=65535&m,f=65535&h;return c*f+((m>>>16&65535)*f+c*(h>>>16&65535)<<16>>>0)|0},_.add=function(m,h){return m+h|0},_.sub=function(m,h){return m-h|0},_.rotl=function(m,h){return m<<h|m>>>32-h},_.rotr=function(m,h){return m<<32-h|m>>>h},_.isInteger=Number.isInteger||function(m){return"number"==typeof m&&isFinite(m)&&Math.floor(m)===m},_.MAX_SAFE_INTEGER=9007199254740991,_.isSafeInteger=function(m){return _.isInteger(m)&&m>=-_.MAX_SAFE_INTEGER&&m<=_.MAX_SAFE_INTEGER}})(cb),Object.defineProperty(An,"__esModule",{value:!0});var lb=cb;function fb(_,m,h){return void 0===m&&(m=new Uint8Array(2)),void 0===h&&(h=0),m[h+0]=_>>>8,m[h+1]=_>>>0,m}function db(_,m,h){return void 0===m&&(m=new Uint8Array(2)),void 0===h&&(h=0),m[h+0]=_>>>0,m[h+1]=_>>>8,m}function vy(_,m){return void 0===m&&(m=0),_[m]<<24|_[m+1]<<16|_[m+2]<<8|_[m+3]}function _y(_,m){return void 0===m&&(m=0),(_[m]<<24|_[m+1]<<16|_[m+2]<<8|_[m+3])>>>0}function by(_,m){return void 0===m&&(m=0),_[m+3]<<24|_[m+2]<<16|_[m+1]<<8|_[m]}function wy(_,m){return void 0===m&&(m=0),(_[m+3]<<24|_[m+2]<<16|_[m+1]<<8|_[m])>>>0}function Qp(_,m,h){return void 0===m&&(m=new Uint8Array(4)),void 0===h&&(h=0),m[h+0]=_>>>24,m[h+1]=_>>>16,m[h+2]=_>>>8,m[h+3]=_>>>0,m}function Jp(_,m,h){return void 0===m&&(m=new Uint8Array(4)),void 0===h&&(h=0),m[h+0]=_>>>0,m[h+1]=_>>>8,m[h+2]=_>>>16,m[h+3]=_>>>24,m}function hb(_,m,h){return void 0===m&&(m=new Uint8Array(8)),void 0===h&&(h=0),Qp(_/4294967296>>>0,m,h),Qp(_>>>0,m,h+4),m}function pb(_,m,h){return void 0===m&&(m=new Uint8Array(8)),void 0===h&&(h=0),Jp(_>>>0,m,h),Jp(_/4294967296>>>0,m,h+4),m}An.readInt16BE=function(_,m){return void 0===m&&(m=0),(_[m+0]<<8|_[m+1])<<16>>16},An.readUint16BE=function(_,m){return void 0===m&&(m=0),(_[m+0]<<8|_[m+1])>>>0},An.readInt16LE=function(_,m){return void 0===m&&(m=0),(_[m+1]<<8|_[m])<<16>>16},An.readUint16LE=function(_,m){return void 0===m&&(m=0),(_[m+1]<<8|_[m])>>>0},An.writeUint16BE=fb,An.writeInt16BE=fb,An.writeUint16LE=db,An.writeInt16LE=db,An.readInt32BE=vy,An.readUint32BE=_y,An.readInt32LE=by,An.readUint32LE=wy,An.writeUint32BE=Qp,An.writeInt32BE=Qp,An.writeUint32LE=Jp,An.writeInt32LE=Jp,An.readInt64BE=function(_,m){void 0===m&&(m=0);var h=vy(_,m),c=vy(_,m+4);return 4294967296*h+c-4294967296*(c>>31)},An.readUint64BE=function(_,m){return void 0===m&&(m=0),4294967296*_y(_,m)+_y(_,m+4)},An.readInt64LE=function(_,m){void 0===m&&(m=0);var h=by(_,m);return 4294967296*by(_,m+4)+h-4294967296*(h>>31)},An.readUint64LE=function(_,m){void 0===m&&(m=0);var h=wy(_,m);return 4294967296*wy(_,m+4)+h},An.writeUint64BE=hb,An.writeInt64BE=hb,An.writeUint64LE=pb,An.writeInt64LE=pb,An.readUintBE=function(_,m,h){if(void 0===h&&(h=0),_%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(_/8>m.length-h)throw new Error("readUintBE: array is too short for the given bitLength");for(var c=0,f=1,v=_/8+h-1;v>=h;v--)c+=m[v]*f,f*=256;return c},An.readUintLE=function(_,m,h){if(void 0===h&&(h=0),_%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(_/8>m.length-h)throw new Error("readUintLE: array is too short for the given bitLength");for(var c=0,f=1,v=h;v<h+_/8;v++)c+=m[v]*f,f*=256;return c},An.writeUintBE=function(_,m,h,c){if(void 0===h&&(h=new Uint8Array(_/8)),void 0===c&&(c=0),_%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!lb.isSafeInteger(m))throw new Error("writeUintBE value must be an integer");for(var f=1,v=_/8+c-1;v>=c;v--)h[v]=m/f&255,f*=256;return h},An.writeUintLE=function(_,m,h,c){if(void 0===h&&(h=new Uint8Array(_/8)),void 0===c&&(c=0),_%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!lb.isSafeInteger(m))throw new Error("writeUintLE value must be an integer");for(var f=1,v=c;v<c+_/8;v++)h[v]=m/f&255,f*=256;return h},An.readFloat32BE=function(_,m){return void 0===m&&(m=0),new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat32(m)},An.readFloat32LE=function(_,m){return void 0===m&&(m=0),new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat32(m,!0)},An.readFloat64BE=function(_,m){return void 0===m&&(m=0),new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat64(m)},An.readFloat64LE=function(_,m){return void 0===m&&(m=0),new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat64(m,!0)},An.writeFloat32BE=function(_,m,h){return void 0===m&&(m=new Uint8Array(4)),void 0===h&&(h=0),new DataView(m.buffer,m.byteOffset,m.byteLength).setFloat32(h,_),m},An.writeFloat32LE=function(_,m,h){return void 0===m&&(m=new Uint8Array(4)),void 0===h&&(h=0),new DataView(m.buffer,m.byteOffset,m.byteLength).setFloat32(h,_,!0),m},An.writeFloat64BE=function(_,m,h){return void 0===m&&(m=new Uint8Array(8)),void 0===h&&(h=0),new DataView(m.buffer,m.byteOffset,m.byteLength).setFloat64(h,_),m},An.writeFloat64LE=function(_,m,h){return void 0===m&&(m=new Uint8Array(8)),void 0===h&&(h=0),new DataView(m.buffer,m.byteOffset,m.byteLength).setFloat64(h,_,!0),m};var Us={};Object.defineProperty(Us,"__esModule",{value:!0}),Us.wipe=function(_){for(var m=0;m<_.length;m++)_[m]=0;return _},Object.defineProperty(Yp,"__esModule",{value:!0});var Qi=An,Ey=Us;function U5(_,m,h){for(var c=1634760805,f=857760878,v=2036477234,y=1797285236,E=h[3]<<24|h[2]<<16|h[1]<<8|h[0],R=h[7]<<24|h[6]<<16|h[5]<<8|h[4],p=h[11]<<24|h[10]<<16|h[9]<<8|h[8],d=h[15]<<24|h[14]<<16|h[13]<<8|h[12],O=h[19]<<24|h[18]<<16|h[17]<<8|h[16],L=h[23]<<24|h[22]<<16|h[21]<<8|h[20],P=h[27]<<24|h[26]<<16|h[25]<<8|h[24],N=h[31]<<24|h[30]<<16|h[29]<<8|h[28],M=m[3]<<24|m[2]<<16|m[1]<<8|m[0],V=m[7]<<24|m[6]<<16|m[5]<<8|m[4],Z=m[11]<<24|m[10]<<16|m[9]<<8|m[8],x=m[15]<<24|m[14]<<16|m[13]<<8|m[12],W=c,H=f,J=v,K=y,le=E,z=R,B=p,ie=d,xe=O,Me=L,Oe=P,we=N,oe=M,pe=V,ne=Z,de=x,ve=0;ve<20;ve+=2)le=(le^=xe=xe+(oe=(oe^=W=W+le|0)>>>16|oe<<16)|0)>>>20|le<<12,z=(z^=Me=Me+(pe=(pe^=H=H+z|0)>>>16|pe<<16)|0)>>>20|z<<12,B=(B^=Oe=Oe+(ne=(ne^=J=J+B|0)>>>16|ne<<16)|0)>>>20|B<<12,ie=(ie^=we=we+(de=(de^=K=K+ie|0)>>>16|de<<16)|0)>>>20|ie<<12,B=(B^=Oe=Oe+(ne=(ne^=J=J+B|0)>>>24|ne<<8)|0)>>>25|B<<7,ie=(ie^=we=we+(de=(de^=K=K+ie|0)>>>24|de<<8)|0)>>>25|ie<<7,z=(z^=Me=Me+(pe=(pe^=H=H+z|0)>>>24|pe<<8)|0)>>>25|z<<7,le=(le^=xe=xe+(oe=(oe^=W=W+le|0)>>>24|oe<<8)|0)>>>25|le<<7,z=(z^=Oe=Oe+(de=(de^=W=W+z|0)>>>16|de<<16)|0)>>>20|z<<12,B=(B^=we=we+(oe=(oe^=H=H+B|0)>>>16|oe<<16)|0)>>>20|B<<12,ie=(ie^=xe=xe+(pe=(pe^=J=J+ie|0)>>>16|pe<<16)|0)>>>20|ie<<12,le=(le^=Me=Me+(ne=(ne^=K=K+le|0)>>>16|ne<<16)|0)>>>20|le<<12,ie=(ie^=xe=xe+(pe=(pe^=J=J+ie|0)>>>24|pe<<8)|0)>>>25|ie<<7,le=(le^=Me=Me+(ne=(ne^=K=K+le|0)>>>24|ne<<8)|0)>>>25|le<<7,B=(B^=we=we+(oe=(oe^=H=H+B|0)>>>24|oe<<8)|0)>>>25|B<<7,z=(z^=Oe=Oe+(de=(de^=W=W+z|0)>>>24|de<<8)|0)>>>25|z<<7;Qi.writeUint32LE(W+c|0,_,0),Qi.writeUint32LE(H+f|0,_,4),Qi.writeUint32LE(J+v|0,_,8),Qi.writeUint32LE(K+y|0,_,12),Qi.writeUint32LE(le+E|0,_,16),Qi.writeUint32LE(z+R|0,_,20),Qi.writeUint32LE(B+p|0,_,24),Qi.writeUint32LE(ie+d|0,_,28),Qi.writeUint32LE(xe+O|0,_,32),Qi.writeUint32LE(Me+L|0,_,36),Qi.writeUint32LE(Oe+P|0,_,40),Qi.writeUint32LE(we+N|0,_,44),Qi.writeUint32LE(oe+M|0,_,48),Qi.writeUint32LE(pe+V|0,_,52),Qi.writeUint32LE(ne+Z|0,_,56),Qi.writeUint32LE(de+x|0,_,60)}function gb(_,m,h,c,f){if(void 0===f&&(f=0),32!==_.length)throw new Error("ChaCha: key size must be 32 bytes");if(c.length<h.length)throw new Error("ChaCha: destination is shorter than source");var v,y;if(0===f){if(8!==m.length&&12!==m.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");y=(v=new Uint8Array(16)).length-m.length,v.set(m,y)}else{if(16!==m.length)throw new Error("ChaCha nonce with counter must be 16 bytes");v=m,y=f}for(var E=new Uint8Array(64),R=0;R<h.length;R+=64){U5(E,v,_);for(var p=R;p<R+64&&p<h.length;p++)c[p]=h[p]^E[p-R];D5(v,0,y)}return Ey.wipe(E),0===f&&Ey.wipe(v),c}function D5(_,m,h){for(var c=1;h--;)_[m]=255&(c=c+(255&_[m])|0),c>>>=8,m++;if(c>0)throw new Error("ChaCha: counter overflow")}Yp.streamXOR=gb,Yp.stream=function(_,m,h,c){return void 0===c&&(c=0),Ey.wipe(h),gb(_,m,h,h,c)};var yb={},ju={};function mb(_,m){if(_.length!==m.length)return 0;for(var h=0,c=0;c<_.length;c++)h|=_[c]^m[c];return 1&h-1>>>8}Object.defineProperty(ju,"__esModule",{value:!0}),ju.select=function(_,m,h){return~(_-1)&m|_-1&h},ju.lessOrEqual=function(_,m){return(0|_)-(0|m)-1>>>31&1},ju.compare=mb,ju.equal=function(_,m){return 0!==_.length&&0!==m.length&&0!==mb(_,m)},function(_){Object.defineProperty(_,"__esModule",{value:!0});var m=ju,h=Us;_.DIGEST_LENGTH=16;var c=function(){function f(v){this.digestLength=_.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var y=v[0]|v[1]<<8;this._r[0]=8191&y;var E=v[2]|v[3]<<8;this._r[1]=8191&(y>>>13|E<<3);var R=v[4]|v[5]<<8;this._r[2]=7939&(E>>>10|R<<6);var p=v[6]|v[7]<<8;this._r[3]=8191&(R>>>7|p<<9);var d=v[8]|v[9]<<8;this._r[4]=255&(p>>>4|d<<12),this._r[5]=d>>>1&8190;var O=v[10]|v[11]<<8;this._r[6]=8191&(d>>>14|O<<2);var L=v[12]|v[13]<<8;this._r[7]=8065&(O>>>11|L<<5);var P=v[14]|v[15]<<8;this._r[8]=8191&(L>>>8|P<<8),this._r[9]=P>>>5&127,this._pad[0]=v[16]|v[17]<<8,this._pad[1]=v[18]|v[19]<<8,this._pad[2]=v[20]|v[21]<<8,this._pad[3]=v[22]|v[23]<<8,this._pad[4]=v[24]|v[25]<<8,this._pad[5]=v[26]|v[27]<<8,this._pad[6]=v[28]|v[29]<<8,this._pad[7]=v[30]|v[31]<<8}return f.prototype._blocks=function(v,y,E){for(var R=this._fin?0:2048,p=this._h[0],d=this._h[1],O=this._h[2],L=this._h[3],P=this._h[4],N=this._h[5],M=this._h[6],V=this._h[7],Z=this._h[8],x=this._h[9],W=this._r[0],H=this._r[1],J=this._r[2],K=this._r[3],le=this._r[4],z=this._r[5],B=this._r[6],ie=this._r[7],xe=this._r[8],Me=this._r[9];E>=16;){var Oe=v[y+0]|v[y+1]<<8,we=v[y+2]|v[y+3]<<8,oe=v[y+4]|v[y+5]<<8,pe=v[y+6]|v[y+7]<<8,ne=v[y+8]|v[y+9]<<8,de=v[y+10]|v[y+11]<<8,ve=v[y+12]|v[y+13]<<8,Re=v[y+14]|v[y+15]<<8,Se=0,Fe=Se;Fe+=(p+=8191&Oe)*W,Fe+=(d+=8191&(Oe>>>13|we<<3))*(5*Me),Fe+=(O+=8191&(we>>>10|oe<<6))*(5*xe),Fe+=(L+=8191&(oe>>>7|pe<<9))*(5*ie),Se=(Fe+=(P+=8191&(pe>>>4|ne<<12))*(5*B))>>>13,Fe&=8191,Fe+=(N+=ne>>>1&8191)*(5*z),Fe+=(M+=8191&(ne>>>14|de<<2))*(5*le),Fe+=(V+=8191&(de>>>11|ve<<5))*(5*K),Fe+=(Z+=8191&(ve>>>8|Re<<8))*(5*J);var $e=Se+=(Fe+=(x+=Re>>>5|R)*(5*H))>>>13;$e+=p*H,$e+=d*W,$e+=O*(5*Me),$e+=L*(5*xe),Se=($e+=P*(5*ie))>>>13,$e&=8191,$e+=N*(5*B),$e+=M*(5*z),$e+=V*(5*le),$e+=Z*(5*K),Se+=($e+=x*(5*J))>>>13,$e&=8191;var ke=Se;ke+=p*J,ke+=d*H,ke+=O*W,ke+=L*(5*Me),Se=(ke+=P*(5*xe))>>>13,ke&=8191,ke+=N*(5*ie),ke+=M*(5*B),ke+=V*(5*z),ke+=Z*(5*le);var at=Se+=(ke+=x*(5*K))>>>13;at+=p*K,at+=d*J,at+=O*H,at+=L*W,Se=(at+=P*(5*Me))>>>13,at&=8191,at+=N*(5*xe),at+=M*(5*ie),at+=V*(5*B),at+=Z*(5*z);var Ve=Se+=(at+=x*(5*le))>>>13;Ve+=p*le,Ve+=d*K,Ve+=O*J,Ve+=L*H,Se=(Ve+=P*W)>>>13,Ve&=8191,Ve+=N*(5*Me),Ve+=M*(5*xe),Ve+=V*(5*ie),Ve+=Z*(5*B);var gt=Se+=(Ve+=x*(5*z))>>>13;gt+=p*z,gt+=d*le,gt+=O*K,gt+=L*J,Se=(gt+=P*H)>>>13,gt&=8191,gt+=N*W,gt+=M*(5*Me),gt+=V*(5*xe),gt+=Z*(5*ie);var It=Se+=(gt+=x*(5*B))>>>13;It+=p*B,It+=d*z,It+=O*le,It+=L*K,Se=(It+=P*J)>>>13,It&=8191,It+=N*H,It+=M*W,It+=V*(5*Me),It+=Z*(5*xe);var Bt=Se+=(It+=x*(5*ie))>>>13;Bt+=p*ie,Bt+=d*B,Bt+=O*z,Bt+=L*le,Se=(Bt+=P*K)>>>13,Bt&=8191,Bt+=N*J,Bt+=M*H,Bt+=V*W,Bt+=Z*(5*Me);var D=Se+=(Bt+=x*(5*xe))>>>13;D+=p*xe,D+=d*ie,D+=O*B,D+=L*z,Se=(D+=P*le)>>>13,D&=8191,D+=N*K,D+=M*J,D+=V*H,D+=Z*W;var $=Se+=(D+=x*(5*Me))>>>13;$+=p*Me,$+=d*xe,$+=O*ie,$+=L*B,Se=($+=P*z)>>>13,$&=8191,$+=N*le,$+=M*K,$+=V*J,$+=Z*H,p=Fe=8191&(Se=(Se=((Se+=($+=x*W)>>>13)<<2)+Se|0)+(Fe&=8191)|0),d=$e+=Se>>>=13,O=ke&=8191,L=at&=8191,P=Ve&=8191,N=gt&=8191,M=It&=8191,V=Bt&=8191,Z=D&=8191,x=$&=8191,y+=16,E-=16}this._h[0]=p,this._h[1]=d,this._h[2]=O,this._h[3]=L,this._h[4]=P,this._h[5]=N,this._h[6]=M,this._h[7]=V,this._h[8]=Z,this._h[9]=x},f.prototype.finish=function(v,y){void 0===y&&(y=0);var E,R,p,d,O=new Uint16Array(10);if(this._leftover){for(d=this._leftover,this._buffer[d++]=1;d<16;d++)this._buffer[d]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(E=this._h[1]>>>13,this._h[1]&=8191,d=2;d<10;d++)this._h[d]+=E,E=this._h[d]>>>13,this._h[d]&=8191;for(this._h[0]+=5*E,E=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=E,E=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=E,O[0]=this._h[0]+5,E=O[0]>>>13,O[0]&=8191,d=1;d<10;d++)O[d]=this._h[d]+E,E=O[d]>>>13,O[d]&=8191;for(O[9]-=8192,R=(1^E)-1,d=0;d<10;d++)O[d]&=R;for(R=~R,d=0;d<10;d++)this._h[d]=this._h[d]&R|O[d];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),this._h[0]=65535&(p=this._h[0]+this._pad[0]),d=1;d<8;d++)this._h[d]=65535&(p=(this._h[d]+this._pad[d]|0)+(p>>>16)|0);return v[y+0]=this._h[0]>>>0,v[y+1]=this._h[0]>>>8,v[y+2]=this._h[1]>>>0,v[y+3]=this._h[1]>>>8,v[y+4]=this._h[2]>>>0,v[y+5]=this._h[2]>>>8,v[y+6]=this._h[3]>>>0,v[y+7]=this._h[3]>>>8,v[y+8]=this._h[4]>>>0,v[y+9]=this._h[4]>>>8,v[y+10]=this._h[5]>>>0,v[y+11]=this._h[5]>>>8,v[y+12]=this._h[6]>>>0,v[y+13]=this._h[6]>>>8,v[y+14]=this._h[7]>>>0,v[y+15]=this._h[7]>>>8,this._finished=!0,this},f.prototype.update=function(v){var y,E=0,R=v.length;if(this._leftover){(y=16-this._leftover)>R&&(y=R);for(var p=0;p<y;p++)this._buffer[this._leftover+p]=v[E+p];if(R-=y,E+=y,this._leftover+=y,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(R>=16&&(this._blocks(v,E,y=R-R%16),E+=y,R-=y),R){for(p=0;p<R;p++)this._buffer[this._leftover+p]=v[E+p];this._leftover+=R}return this},f.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var v=new Uint8Array(16);return this.finish(v),v},f.prototype.clean=function(){return h.wipe(this._buffer),h.wipe(this._r),h.wipe(this._h),h.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},f}();_.Poly1305=c,_.oneTimeAuth=function(f,v){var y=new c(f);y.update(v);var E=y.digest();return y.clean(),E},_.equal=function(f,v){return f.length===_.DIGEST_LENGTH&&v.length===_.DIGEST_LENGTH&&m.equal(f,v)}}(yb),function(_){Object.defineProperty(_,"__esModule",{value:!0});var m=Yp,h=yb,c=Us,f=An,v=ju;_.KEY_LENGTH=32,_.NONCE_LENGTH=12,_.TAG_LENGTH=16;var y=new Uint8Array(16),E=function(){function R(p){if(this.nonceLength=_.NONCE_LENGTH,this.tagLength=_.TAG_LENGTH,p.length!==_.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(p)}return R.prototype.seal=function(p,d,O,L){if(p.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var P=new Uint8Array(16);P.set(p,P.length-p.length);var N=new Uint8Array(32);m.stream(this._key,P,N,4);var M,V=d.length+this.tagLength;if(L){if(L.length!==V)throw new Error("ChaCha20Poly1305: incorrect destination length");M=L}else M=new Uint8Array(V);return m.streamXOR(this._key,P,d,M,4),this._authenticate(M.subarray(M.length-this.tagLength,M.length),N,M.subarray(0,M.length-this.tagLength),O),c.wipe(P),M},R.prototype.open=function(p,d,O,L){if(p.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(d.length<this.tagLength)return null;var P=new Uint8Array(16);P.set(p,P.length-p.length);var N=new Uint8Array(32);m.stream(this._key,P,N,4);var M=new Uint8Array(this.tagLength);if(this._authenticate(M,N,d.subarray(0,d.length-this.tagLength),O),!v.equal(M,d.subarray(d.length-this.tagLength,d.length)))return null;var V,Z=d.length-this.tagLength;if(L){if(L.length!==Z)throw new Error("ChaCha20Poly1305: incorrect destination length");V=L}else V=new Uint8Array(Z);return m.streamXOR(this._key,P,d.subarray(0,d.length-this.tagLength),V,4),c.wipe(P),V},R.prototype.clean=function(){return c.wipe(this._key),this},R.prototype._authenticate=function(p,d,O,L){var P=new h.Poly1305(d);L&&(P.update(L),L.length%16>0&&P.update(y.subarray(L.length%16))),P.update(O),O.length%16>0&&P.update(y.subarray(O.length%16));var N=new Uint8Array(8);L&&f.writeUint64LE(L.length,N),P.update(N),f.writeUint64LE(O.length,N),P.update(N);for(var M=P.digest(),V=0;V<M.length;V++)p[V]=M[V];P.clean(),c.wipe(M),c.wipe(N)},R}();_.ChaCha20Poly1305=E}({});var vb={},Id={},Sy={};Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.isSerializableHash=function(_){return void 0!==_.saveState&&void 0!==_.restoreState&&void 0!==_.cleanSavedState},Object.defineProperty(Id,"__esModule",{value:!0});var ha=Sy,j5=ju,z5=Us,_b=function(){function _(m,h){this._finished=!1,this._inner=new m,this._outer=new m,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var c=new Uint8Array(this.blockSize);h.length>this.blockSize?this._inner.update(h).finish(c).clean():c.set(h);for(var f=0;f<c.length;f++)c[f]^=54;for(this._inner.update(c),f=0;f<c.length;f++)c[f]^=106;this._outer.update(c),ha.isSerializableHash(this._inner)&&ha.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),z5.wipe(c)}return _.prototype.reset=function(){if(!ha.isSerializableHash(this._inner)||!ha.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},_.prototype.clean=function(){ha.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),ha.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},_.prototype.update=function(m){return this._inner.update(m),this},_.prototype.finish=function(m){return this._finished?(this._outer.finish(m),this):(this._inner.finish(m),this._outer.update(m.subarray(0,this.digestLength)).finish(m),this._finished=!0,this)},_.prototype.digest=function(){var m=new Uint8Array(this.digestLength);return this.finish(m),m},_.prototype.saveState=function(){if(!ha.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},_.prototype.restoreState=function(m){if(!ha.isSerializableHash(this._inner)||!ha.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(m),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},_.prototype.cleanSavedState=function(m){if(!ha.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(m)},_}();Id.HMAC=_b,Id.hmac=function(_,m,h){var c=new _b(_,m);c.update(h);var f=c.digest();return c.clean(),f},Id.equal=j5.equal,Object.defineProperty(vb,"__esModule",{value:!0});var bb=Id,wb=Us,B5=function(){function _(m,h,c,f){void 0===c&&(c=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=m,this._info=f;var v=bb.hmac(this._hash,c,h);this._hmac=new bb.HMAC(m,v),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return _.prototype._fillBuffer=function(){this._counter[0]++;var m=this._counter[0];if(0===m)throw new Error("hkdf: cannot expand more");this._hmac.reset(),m>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},_.prototype.expand=function(m){for(var h=new Uint8Array(m),c=0;c<h.length;c++)this._bufpos===this._buffer.length&&this._fillBuffer(),h[c]=this._buffer[this._bufpos++];return h},_.prototype.clean=function(){this._hmac.clean(),wb.wipe(this._buffer),wb.wipe(this._counter),this._bufpos=0},_}();vb.HKDF=B5;var Eb={},Xp={},Zp={};function F5(_){throw new Error('Could not dynamically require "'+_+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}Object.defineProperty(Zp,"__esModule",{value:!0}),Zp.BrowserRandomSource=void 0,Zp.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const _="undefined"!=typeof self?self.crypto||self.msCrypto:null;_&&void 0!==_.getRandomValues&&(this._crypto=_,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(_){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const m=new Uint8Array(_);for(let h=0;h<m.length;h+=65536)this._crypto.getRandomValues(m.subarray(h,h+Math.min(m.length-h,65536)));return m}};var eg={},H5=c_(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(eg,"__esModule",{value:!0}),eg.NodeRandomSource=void 0;const q5=Us;eg.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==F5){const _=H5;_&&_.randomBytes&&(this._crypto=_,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(_){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let m=this._crypto.randomBytes(_);if(m.length!==_)throw new Error("NodeRandomSource: got fewer bytes than requested");const h=new Uint8Array(_);for(let c=0;c<h.length;c++)h[c]=m[c];return(0,q5.wipe)(m),h}},Object.defineProperty(Xp,"__esModule",{value:!0}),Xp.SystemRandomSource=void 0;const $5=Zp,V5=eg;Xp.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new $5.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new V5.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(_){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(_)}},function(_){Object.defineProperty(_,"__esModule",{value:!0}),_.randomStringForEntropy=_.randomString=_.randomUint32=_.randomBytes=_.defaultRandomSource=void 0;const h=An,c=Us;function f(E,R=_.defaultRandomSource){return R.randomBytes(E)}_.defaultRandomSource=new Xp.SystemRandomSource,_.randomBytes=f,_.randomUint32=function(E=_.defaultRandomSource){const R=f(4,E),p=(0,h.readUint32LE)(R);return(0,c.wipe)(R),p};const v="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function y(E,R=v,p=_.defaultRandomSource){if(R.length<2)throw new Error("randomString charset is too short");if(R.length>256)throw new Error("randomString charset is too long");let d="";const O=R.length,L=256-256%O;for(;E>0;){const P=f(Math.ceil(256*E/L),p);for(let N=0;N<P.length&&E>0;N++){const M=P[N];M<L&&(d+=R.charAt(M%O),E--)}(0,c.wipe)(P)}return d}_.randomString=y,_.randomStringForEntropy=function(E,R=v,p=_.defaultRandomSource){return y(Math.ceil(E/(Math.log(R.length)/Math.LN2)),R,p)}}(Eb),function(_){Object.defineProperty(_,"__esModule",{value:!0});var m=An,h=Us;_.DIGEST_LENGTH=32,_.BLOCK_SIZE=64;var c=function(){function y(){this.digestLength=_.DIGEST_LENGTH,this.blockSize=_.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return y.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},y.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},y.prototype.clean=function(){h.wipe(this._buffer),h.wipe(this._temp),this.reset()},y.prototype.update=function(E,R){if(void 0===R&&(R=E.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var p=0;if(this._bytesHashed+=R,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&R>0;)this._buffer[this._bufferLength++]=E[p++],R--;this._bufferLength===this.blockSize&&(v(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(R>=this.blockSize&&(p=v(this._temp,this._state,E,p,R),R%=this.blockSize);R>0;)this._buffer[this._bufferLength++]=E[p++],R--;return this},y.prototype.finish=function(E){if(!this._finished){var R=this._bytesHashed,p=this._bufferLength,d=R/536870912|0,O=R<<3,L=R%64<56?64:128;this._buffer[p]=128;for(var P=p+1;P<L-8;P++)this._buffer[P]=0;m.writeUint32BE(d,this._buffer,L-8),m.writeUint32BE(O,this._buffer,L-4),v(this._temp,this._state,this._buffer,0,L),this._finished=!0}for(P=0;P<this.digestLength/4;P++)m.writeUint32BE(this._state[P],E,4*P);return this},y.prototype.digest=function(){var E=new Uint8Array(this.digestLength);return this.finish(E),E},y.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},y.prototype.restoreState=function(E){return this._state.set(E.state),this._bufferLength=E.bufferLength,E.buffer&&this._buffer.set(E.buffer),this._bytesHashed=E.bytesHashed,this._finished=!1,this},y.prototype.cleanSavedState=function(E){h.wipe(E.state),E.buffer&&h.wipe(E.buffer),E.bufferLength=0,E.bytesHashed=0},y}();_.SHA256=c;var f=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function v(y,E,R,p,d){for(;d>=64;){for(var O=E[0],L=E[1],P=E[2],N=E[3],M=E[4],V=E[5],Z=E[6],x=E[7],W=0;W<16;W++)y[W]=m.readUint32BE(R,p+4*W);for(W=16;W<64;W++){var J=y[W-2],K=(J>>>17|J<<15)^(J>>>19|J<<13)^J>>>10,le=((J=y[W-15])>>>7|J<<25)^(J>>>18|J<<14)^J>>>3;y[W]=(K+y[W-7]|0)+(le+y[W-16]|0)}for(W=0;W<64;W++)K=(((M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7))+(M&V^~M&Z)|0)+(x+(f[W]+y[W]|0)|0)|0,le=((O>>>2|O<<30)^(O>>>13|O<<19)^(O>>>22|O<<10))+(O&L^O&P^L&P)|0,x=Z,Z=V,V=M,M=N+K|0,N=P,P=L,L=O,O=K+le|0;E[0]+=O,E[1]+=L,E[2]+=P,E[3]+=N,E[4]+=M,E[5]+=V,E[6]+=Z,E[7]+=x,p+=64,d-=64}return p}_.hash=function(y){var E=new c;E.update(y);var R=E.digest();return E.clean(),R}}({}),function(_){Object.defineProperty(_,"__esModule",{value:!0}),_.sharedKey=_.generateKeyPair=_.generateKeyPairFromSeed=_.scalarMultBase=_.scalarMult=_.SHARED_KEY_LENGTH=_.SECRET_KEY_LENGTH=_.PUBLIC_KEY_LENGTH=void 0;const m=Eb,h=Us;function c(M){const V=new Float64Array(16);if(M)for(let Z=0;Z<M.length;Z++)V[Z]=M[Z];return V}_.PUBLIC_KEY_LENGTH=32,_.SECRET_KEY_LENGTH=32,_.SHARED_KEY_LENGTH=32;const f=new Uint8Array(32);f[0]=9;const v=c([56129,1]);function y(M){let V=1;for(let Z=0;Z<16;Z++){let x=M[Z]+V+65535;V=Math.floor(x/65536),M[Z]=x-65536*V}M[0]+=V-1+37*(V-1)}function E(M,V,Z){const x=~(Z-1);for(let W=0;W<16;W++){const H=x&(M[W]^V[W]);M[W]^=H,V[W]^=H}}function R(M,V,Z){for(let x=0;x<16;x++)M[x]=V[x]+Z[x]}function p(M,V,Z){for(let x=0;x<16;x++)M[x]=V[x]-Z[x]}function d(M,V,Z){let x,W,H=0,J=0,K=0,le=0,z=0,B=0,ie=0,xe=0,Me=0,Oe=0,we=0,oe=0,pe=0,ne=0,de=0,ve=0,Re=0,Se=0,Fe=0,$e=0,ke=0,at=0,Ve=0,gt=0,It=0,Bt=0,D=0,$=0,q=0,Ee=0,Le=0,je=Z[0],ft=Z[1],_t=Z[2],Tt=Z[3],tn=Z[4],Mt=Z[5],Cn=Z[6],vn=Z[7],At=Z[8],Xt=Z[9],Kn=Z[10],dr=Z[11],Vn=Z[12],Qn=Z[13],Br=Z[14],Er=Z[15];x=V[0],H+=x*je,J+=x*ft,K+=x*_t,le+=x*Tt,z+=x*tn,B+=x*Mt,ie+=x*Cn,xe+=x*vn,Me+=x*At,Oe+=x*Xt,we+=x*Kn,oe+=x*dr,pe+=x*Vn,ne+=x*Qn,de+=x*Br,ve+=x*Er,x=V[1],J+=x*je,K+=x*ft,le+=x*_t,z+=x*Tt,B+=x*tn,ie+=x*Mt,xe+=x*Cn,Me+=x*vn,Oe+=x*At,we+=x*Xt,oe+=x*Kn,pe+=x*dr,ne+=x*Vn,de+=x*Qn,ve+=x*Br,Re+=x*Er,x=V[2],K+=x*je,le+=x*ft,z+=x*_t,B+=x*Tt,ie+=x*tn,xe+=x*Mt,Me+=x*Cn,Oe+=x*vn,we+=x*At,oe+=x*Xt,pe+=x*Kn,ne+=x*dr,de+=x*Vn,ve+=x*Qn,Re+=x*Br,Se+=x*Er,x=V[3],le+=x*je,z+=x*ft,B+=x*_t,ie+=x*Tt,xe+=x*tn,Me+=x*Mt,Oe+=x*Cn,we+=x*vn,oe+=x*At,pe+=x*Xt,ne+=x*Kn,de+=x*dr,ve+=x*Vn,Re+=x*Qn,Se+=x*Br,Fe+=x*Er,x=V[4],z+=x*je,B+=x*ft,ie+=x*_t,xe+=x*Tt,Me+=x*tn,Oe+=x*Mt,we+=x*Cn,oe+=x*vn,pe+=x*At,ne+=x*Xt,de+=x*Kn,ve+=x*dr,Re+=x*Vn,Se+=x*Qn,Fe+=x*Br,$e+=x*Er,x=V[5],B+=x*je,ie+=x*ft,xe+=x*_t,Me+=x*Tt,Oe+=x*tn,we+=x*Mt,oe+=x*Cn,pe+=x*vn,ne+=x*At,de+=x*Xt,ve+=x*Kn,Re+=x*dr,Se+=x*Vn,Fe+=x*Qn,$e+=x*Br,ke+=x*Er,x=V[6],ie+=x*je,xe+=x*ft,Me+=x*_t,Oe+=x*Tt,we+=x*tn,oe+=x*Mt,pe+=x*Cn,ne+=x*vn,de+=x*At,ve+=x*Xt,Re+=x*Kn,Se+=x*dr,Fe+=x*Vn,$e+=x*Qn,ke+=x*Br,at+=x*Er,x=V[7],xe+=x*je,Me+=x*ft,Oe+=x*_t,we+=x*Tt,oe+=x*tn,pe+=x*Mt,ne+=x*Cn,de+=x*vn,ve+=x*At,Re+=x*Xt,Se+=x*Kn,Fe+=x*dr,$e+=x*Vn,ke+=x*Qn,at+=x*Br,Ve+=x*Er,x=V[8],Me+=x*je,Oe+=x*ft,we+=x*_t,oe+=x*Tt,pe+=x*tn,ne+=x*Mt,de+=x*Cn,ve+=x*vn,Re+=x*At,Se+=x*Xt,Fe+=x*Kn,$e+=x*dr,ke+=x*Vn,at+=x*Qn,Ve+=x*Br,gt+=x*Er,x=V[9],Oe+=x*je,we+=x*ft,oe+=x*_t,pe+=x*Tt,ne+=x*tn,de+=x*Mt,ve+=x*Cn,Re+=x*vn,Se+=x*At,Fe+=x*Xt,$e+=x*Kn,ke+=x*dr,at+=x*Vn,Ve+=x*Qn,gt+=x*Br,It+=x*Er,x=V[10],we+=x*je,oe+=x*ft,pe+=x*_t,ne+=x*Tt,de+=x*tn,ve+=x*Mt,Re+=x*Cn,Se+=x*vn,Fe+=x*At,$e+=x*Xt,ke+=x*Kn,at+=x*dr,Ve+=x*Vn,gt+=x*Qn,It+=x*Br,Bt+=x*Er,x=V[11],oe+=x*je,pe+=x*ft,ne+=x*_t,de+=x*Tt,ve+=x*tn,Re+=x*Mt,Se+=x*Cn,Fe+=x*vn,$e+=x*At,ke+=x*Xt,at+=x*Kn,Ve+=x*dr,gt+=x*Vn,It+=x*Qn,Bt+=x*Br,D+=x*Er,x=V[12],pe+=x*je,ne+=x*ft,de+=x*_t,ve+=x*Tt,Re+=x*tn,Se+=x*Mt,Fe+=x*Cn,$e+=x*vn,ke+=x*At,at+=x*Xt,Ve+=x*Kn,gt+=x*dr,It+=x*Vn,Bt+=x*Qn,D+=x*Br,$+=x*Er,x=V[13],ne+=x*je,de+=x*ft,ve+=x*_t,Re+=x*Tt,Se+=x*tn,Fe+=x*Mt,$e+=x*Cn,ke+=x*vn,at+=x*At,Ve+=x*Xt,gt+=x*Kn,It+=x*dr,Bt+=x*Vn,D+=x*Qn,$+=x*Br,q+=x*Er,x=V[14],de+=x*je,ve+=x*ft,Re+=x*_t,Se+=x*Tt,Fe+=x*tn,$e+=x*Mt,ke+=x*Cn,at+=x*vn,Ve+=x*At,gt+=x*Xt,It+=x*Kn,Bt+=x*dr,D+=x*Vn,$+=x*Qn,q+=x*Br,Ee+=x*Er,x=V[15],ve+=x*je,Re+=x*ft,Se+=x*_t,Fe+=x*Tt,$e+=x*tn,ke+=x*Mt,at+=x*Cn,Ve+=x*vn,gt+=x*At,It+=x*Xt,Bt+=x*Kn,D+=x*dr,$+=x*Vn,q+=x*Qn,Ee+=x*Br,Le+=x*Er,H+=38*Re,J+=38*Se,K+=38*Fe,le+=38*$e,z+=38*ke,B+=38*at,ie+=38*Ve,xe+=38*gt,Me+=38*It,Oe+=38*Bt,we+=38*D,oe+=38*$,pe+=38*q,ne+=38*Ee,de+=38*Le,W=1,x=H+W+65535,W=Math.floor(x/65536),H=x-65536*W,x=J+W+65535,W=Math.floor(x/65536),J=x-65536*W,x=K+W+65535,W=Math.floor(x/65536),K=x-65536*W,x=le+W+65535,W=Math.floor(x/65536),le=x-65536*W,x=z+W+65535,W=Math.floor(x/65536),z=x-65536*W,x=B+W+65535,W=Math.floor(x/65536),B=x-65536*W,x=ie+W+65535,W=Math.floor(x/65536),ie=x-65536*W,x=xe+W+65535,W=Math.floor(x/65536),xe=x-65536*W,x=Me+W+65535,W=Math.floor(x/65536),Me=x-65536*W,x=Oe+W+65535,W=Math.floor(x/65536),Oe=x-65536*W,x=we+W+65535,W=Math.floor(x/65536),we=x-65536*W,x=oe+W+65535,W=Math.floor(x/65536),oe=x-65536*W,x=pe+W+65535,W=Math.floor(x/65536),pe=x-65536*W,x=ne+W+65535,W=Math.floor(x/65536),ne=x-65536*W,x=de+W+65535,W=Math.floor(x/65536),de=x-65536*W,x=ve+W+65535,W=Math.floor(x/65536),ve=x-65536*W,H+=W-1+37*(W-1),W=1,x=H+W+65535,W=Math.floor(x/65536),H=x-65536*W,x=J+W+65535,W=Math.floor(x/65536),J=x-65536*W,x=K+W+65535,W=Math.floor(x/65536),K=x-65536*W,x=le+W+65535,W=Math.floor(x/65536),le=x-65536*W,x=z+W+65535,W=Math.floor(x/65536),z=x-65536*W,x=B+W+65535,W=Math.floor(x/65536),B=x-65536*W,x=ie+W+65535,W=Math.floor(x/65536),ie=x-65536*W,x=xe+W+65535,W=Math.floor(x/65536),xe=x-65536*W,x=Me+W+65535,W=Math.floor(x/65536),Me=x-65536*W,x=Oe+W+65535,W=Math.floor(x/65536),Oe=x-65536*W,x=we+W+65535,W=Math.floor(x/65536),we=x-65536*W,x=oe+W+65535,W=Math.floor(x/65536),oe=x-65536*W,x=pe+W+65535,W=Math.floor(x/65536),pe=x-65536*W,x=ne+W+65535,W=Math.floor(x/65536),ne=x-65536*W,x=de+W+65535,W=Math.floor(x/65536),de=x-65536*W,x=ve+W+65535,W=Math.floor(x/65536),ve=x-65536*W,H+=W-1+37*(W-1),M[0]=H,M[1]=J,M[2]=K,M[3]=le,M[4]=z,M[5]=B,M[6]=ie,M[7]=xe,M[8]=Me,M[9]=Oe,M[10]=we,M[11]=oe,M[12]=pe,M[13]=ne,M[14]=de,M[15]=ve}function O(M,V){d(M,V,V)}function L(M,V){const Z=new Uint8Array(32),x=new Float64Array(80),W=c(),H=c(),J=c(),K=c(),le=c(),z=c();for(let Me=0;Me<31;Me++)Z[Me]=M[Me];Z[31]=127&M[31]|64,Z[0]&=248,function(Me,Oe){for(let we=0;we<16;we++)Me[we]=Oe[2*we]+(Oe[2*we+1]<<8);Me[15]&=32767}(x,V);for(let Me=0;Me<16;Me++)H[Me]=x[Me];W[0]=K[0]=1;for(let Me=254;Me>=0;--Me){const Oe=Z[Me>>>3]>>>(7&Me)&1;E(W,H,Oe),E(J,K,Oe),R(le,W,J),p(W,W,J),R(J,H,K),p(H,H,K),O(K,le),O(z,W),d(W,J,W),d(J,H,le),R(le,W,J),p(W,W,J),O(H,W),p(J,K,z),d(W,J,v),R(W,W,K),d(J,J,W),d(W,K,z),d(K,H,x),O(H,le),E(W,H,Oe),E(J,K,Oe)}for(let Me=0;Me<16;Me++)x[Me+16]=W[Me],x[Me+32]=J[Me],x[Me+48]=H[Me],x[Me+64]=K[Me];const B=x.subarray(32),ie=x.subarray(16);(function(Me,Oe){const we=c();for(let oe=0;oe<16;oe++)we[oe]=Oe[oe];for(let oe=253;oe>=0;oe--)O(we,we),2!==oe&&4!==oe&&d(we,we,Oe);for(let oe=0;oe<16;oe++)Me[oe]=we[oe]})(B,B),d(ie,ie,B);const xe=new Uint8Array(32);return function(Me,Oe){const we=c(),oe=c();for(let pe=0;pe<16;pe++)oe[pe]=Oe[pe];y(oe),y(oe),y(oe);for(let pe=0;pe<2;pe++){we[0]=oe[0]-65517;for(let de=1;de<15;de++)we[de]=oe[de]-65535-(we[de-1]>>16&1),we[de-1]&=65535;we[15]=oe[15]-32767-(we[14]>>16&1);const ne=we[15]>>16&1;we[14]&=65535,E(oe,we,1-ne)}for(let pe=0;pe<16;pe++)Me[2*pe]=255&oe[pe],Me[2*pe+1]=oe[pe]>>8}(xe,ie),xe}function P(M){return L(M,f)}function N(M){if(M.length!==_.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${_.SECRET_KEY_LENGTH} bytes`);const V=new Uint8Array(M);return{publicKey:P(V),secretKey:V}}_.scalarMult=L,_.scalarMultBase=P,_.generateKeyPairFromSeed=N,_.generateKeyPair=function(M){const V=(0,m.randomBytes)(32,M),Z=N(V);return(0,h.wipe)(V),Z},_.sharedKey=function(M,V,Z=!1){if(M.length!==_.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(V.length!==_.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const x=L(M,V);if(Z){let W=0;for(let H=0;H<x.length;H++)W|=x[H];if(0===W)throw new Error("X25519: invalid shared key")}return x}}({});class Y5{constructor(m,h,c){this.name=m,this.prefix=h,this.baseEncode=c}encode(m){if(m instanceof Uint8Array)return`${this.prefix}${this.baseEncode(m)}`;throw Error("Unknown type, must be binary type")}}class Q5{constructor(m,h,c){if(this.name=m,this.prefix=h,void 0===h.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=h.codePointAt(0),this.baseDecode=c}decode(m){if("string"==typeof m){if(m.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(m)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(m.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(m){return Sb(this,m)}}class J5{constructor(m){this.decoders=m}or(m){return Sb(this,m)}decode(m){const c=this.decoders[m[0]];if(c)return c.decode(m);throw RangeError(`Unable to decode multibase string ${JSON.stringify(m)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Sb=(_,m)=>new J5({..._.decoders||{[_.prefix]:_},...m.decoders||{[m.prefix]:m}});class X5{constructor(m,h,c,f){this.name=m,this.prefix=h,this.baseEncode=c,this.baseDecode=f,this.encoder=new Y5(m,h,c),this.decoder=new Q5(m,h,f)}encode(m){return this.encoder.encode(m)}decode(m){return this.decoder.decode(m)}}const tg=({name:_,prefix:m,encode:h,decode:c})=>new X5(_,m,h,c),Cd=({prefix:_,name:m,alphabet:h})=>{const{encode:c,decode:f}=function(_,m){if(_.length>=255)throw new TypeError("Alphabet too long");for(var h=new Uint8Array(256),c=0;c<h.length;c++)h[c]=255;for(var f=0;f<_.length;f++){var v=_.charAt(f),y=v.charCodeAt(0);if(255!==h[y])throw new TypeError(v+" is ambiguous");h[y]=f}var E=_.length,R=_.charAt(0),p=Math.log(E)/Math.log(256),d=Math.log(256)/Math.log(E);function O(L){if("string"!=typeof L)throw new TypeError("Expected String");if(0===L.length)return new Uint8Array;var P=0;if(" "!==L[P]){for(var N=0,M=0;L[P]===R;)N++,P++;for(var V=(L.length-P)*p+1>>>0,Z=new Uint8Array(V);L[P];){var x=h[L.charCodeAt(P)];if(255===x)return;for(var W=0,H=V-1;(0!==x||W<M)&&-1!==H;H--,W++)Z[H]=(x+=E*Z[H]>>>0)%256>>>0,x=x/256>>>0;if(0!==x)throw new Error("Non-zero carry");M=W,P++}if(" "!==L[P]){for(var J=V-M;J!==V&&0===Z[J];)J++;for(var K=new Uint8Array(N+(V-J)),le=N;J!==V;)K[le++]=Z[J++];return K}}}return{encode:function(L){if(L instanceof Uint8Array||(ArrayBuffer.isView(L)?L=new Uint8Array(L.buffer,L.byteOffset,L.byteLength):Array.isArray(L)&&(L=Uint8Array.from(L))),!(L instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===L.length)return"";for(var P=0,N=0,M=0,V=L.length;M!==V&&0===L[M];)M++,P++;for(var Z=(V-M)*d+1>>>0,x=new Uint8Array(Z);M!==V;){for(var W=L[M],H=0,J=Z-1;(0!==W||H<N)&&-1!==J;J--,H++)x[J]=(W+=256*x[J]>>>0)%E>>>0,W=W/E>>>0;if(0!==W)throw new Error("Non-zero carry");N=H,M++}for(var K=Z-N;K!==Z&&0===x[K];)K++;for(var le=R.repeat(P);K<Z;++K)le+=_.charAt(x[K]);return le},decodeUnsafe:O,decode:function(L){var P=O(L);if(P)return P;throw new Error(`Non-${m} character`)}}}(h,m);return tg({prefix:_,name:m,encode:c,decode:v=>(_=>{if(_ instanceof Uint8Array&&"Uint8Array"===_.constructor.name)return _;if(_ instanceof ArrayBuffer)return new Uint8Array(_);if(ArrayBuffer.isView(_))return new Uint8Array(_.buffer,_.byteOffset,_.byteLength);throw new Error("Unknown type, must be binary type")})(f(v))})},Fi=({name:_,prefix:m,bitsPerChar:h,alphabet:c})=>tg({prefix:m,name:_,encode:f=>((v,y,E)=>{const R="="===y[y.length-1],p=(1<<E)-1;let d="",O=0,L=0;for(let P=0;P<v.length;++P)for(L=L<<8|v[P],O+=8;O>E;)O-=E,d+=y[p&L>>O];if(O&&(d+=y[p&L<<E-O]),R)for(;d.length*E&7;)d+="=";return d})(f,c,h),decode:f=>((v,y,E,R)=>{const p={};for(let M=0;M<y.length;++M)p[y[M]]=M;let d=v.length;for(;"="===v[d-1];)--d;const O=new Uint8Array(d*E/8|0);let L=0,P=0,N=0;for(let M=0;M<d;++M){const V=p[v[M]];if(void 0===V)throw new SyntaxError(`Non-${R} character`);P=P<<E|V,L+=E,L>=8&&(L-=8,O[N++]=255&P>>L)}if(L>=E||255&P<<8-L)throw new SyntaxError("Unexpected end of data");return O})(f,c,h,_)});tg({prefix:"\0",name:"identity",encode:_=>{return m=_,(new TextDecoder).decode(m);var m},decode:_=>{return m=_,(new TextEncoder).encode(m);var m}}),Fi({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Fi({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Cd({prefix:"9",name:"base10",alphabet:"0123456789"}),Fi({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Fi({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Fi({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Fi({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Fi({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Fi({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Fi({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Fi({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Fi({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Fi({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Fi({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Cd({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Cd({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Cd({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Cd({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Fi({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Fi({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Fi({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Fi({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const Ob=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),Z5=Ob.reduce((_,m,h)=>(_[h]=m,_),[]),eS=Ob.reduce((_,m,h)=>(_[m.codePointAt(0)]=h,_),[]);tg({prefix:"\u{1f680}",name:"base256emoji",encode:function(_){return _.reduce((m,h)=>m+Z5[h],"")},decode:function(_){const m=[];for(const h of _){const c=eS[h.codePointAt(0)];if(void 0===c)throw new Error(`Non-base256emoji character: ${h}`);m.push(c)}return new Uint8Array(m)}});var xb=128,nS=-128,rS=Math.pow(2,31),sS=Math.pow(2,7),aS=Math.pow(2,14),uS=Math.pow(2,21),cS=Math.pow(2,28),lS=Math.pow(2,35),fS=Math.pow(2,42),dS=Math.pow(2,49),hS=Math.pow(2,56),pS=Math.pow(2,63),Ib_encode=function _(m,h,c){h=h||[];for(var f=c=c||0;m>=rS;)h[c++]=255&m|xb,m/=128;for(;m&nS;)h[c++]=255&m|xb,m>>>=7;return h[c]=0|m,_.bytes=c-f+1,h},Ib_encodingLength=function(_){return _<sS?1:_<aS?2:_<uS?3:_<cS?4:_<lS?5:_<fS?6:_<dS?7:_<hS?8:_<pS?9:10};const Cb=(_,m,h=0)=>(Ib_encode(_,m,h),m),Pb=_=>Ib_encodingLength(_),kb=(_,m)=>{const h=m.byteLength,c=Pb(_),f=c+Pb(h),v=new Uint8Array(f+h);return Cb(_,v,0),Cb(h,v,c),v.set(m,f),new gS(_,h,m,v)};class gS{constructor(m,h,c,f){this.code=m,this.size=h,this.digest=c,this.bytes=f}}const Nb=({name:_,code:m,encode:h})=>new yS(_,m,h);class yS{constructor(m,h,c){this.name=m,this.code=h,this.encode=c}digest(m){if(m instanceof Uint8Array){const h=this.encode(m);return h instanceof Uint8Array?kb(this.code,h):h.then(c=>kb(this.code,c))}throw Error("Unknown type, must be binary type")}}const Ab=_=>function(){var m=ue(function*(h){return new Uint8Array(yield crypto.subtle.digest(_,h))});return function(h){return m.apply(this,arguments)}}();Nb({name:"sha2-256",code:18,encode:Ab("SHA-256")}),Nb({name:"sha2-512",code:19,encode:Ab("SHA-512")}),new TextEncoder,new TextDecoder;var Oy=function(_,m){return(Oy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,c){h.__proto__=c}||function(h,c){for(var f in c)c.hasOwnProperty(f)&&(h[f]=c[f])})(_,m)},xy=function(){return xy=Object.assign||function(_){for(var m,h=1,c=arguments.length;h<c;h++)for(var f in m=arguments[h])Object.prototype.hasOwnProperty.call(m,f)&&(_[f]=m[f]);return _},xy.apply(this,arguments)};function Tb(_){var m="function"==typeof Symbol&&Symbol.iterator,h=m&&_[m],c=0;if(h)return h.call(_);if(_&&"number"==typeof _.length)return{next:function(){return _&&c>=_.length&&(_=void 0),{value:_&&_[c++],done:!_}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function Mb(_,m){var h="function"==typeof Symbol&&_[Symbol.iterator];if(!h)return _;var c,f,v=h.call(_),y=[];try{for(;(void 0===m||m-- >0)&&!(c=v.next()).done;)y.push(c.value)}catch(E){f={error:E}}finally{try{c&&!c.done&&(h=v.return)&&h.call(v)}finally{if(f)throw f.error}}return y}function Pd(_){return this instanceof Pd?(this.v=_,this):new Pd(_)}var Lb,Db,zb,Bb,Fb,Hb,mS=Object.freeze({__proto__:null,__extends:function(_,m){function h(){this.constructor=_}Oy(_,m),_.prototype=null===m?Object.create(m):(h.prototype=m.prototype,new h)},get __assign(){return xy},__rest:function(_,m){var h={};for(var c in _)Object.prototype.hasOwnProperty.call(_,c)&&m.indexOf(c)<0&&(h[c]=_[c]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols){var f=0;for(c=Object.getOwnPropertySymbols(_);f<c.length;f++)m.indexOf(c[f])<0&&Object.prototype.propertyIsEnumerable.call(_,c[f])&&(h[c[f]]=_[c[f]])}return h},__decorate:function(_,m,h,c){var f,v=arguments.length,y=v<3?m:null===c?c=Object.getOwnPropertyDescriptor(m,h):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)y=Reflect.decorate(_,m,h,c);else for(var E=_.length-1;E>=0;E--)(f=_[E])&&(y=(v<3?f(y):v>3?f(m,h,y):f(m,h))||y);return v>3&&y&&Object.defineProperty(m,h,y),y},__param:function(_,m){return function(h,c){m(h,c,_)}},__metadata:function(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)},__awaiter:function(_,m,h,c){return new(h||(h=Promise))(function(f,v){function y(p){try{R(c.next(p))}catch(d){v(d)}}function E(p){try{R(c.throw(p))}catch(d){v(d)}}function R(p){var d;p.done?f(p.value):(d=p.value,d instanceof h?d:new h(function(O){O(d)})).then(y,E)}R((c=c.apply(_,m||[])).next())})},__generator:function(_,m){var h,c,f,v,y={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return v={next:E(0),throw:E(1),return:E(2)},"function"==typeof Symbol&&(v[Symbol.iterator]=function(){return this}),v;function E(R){return function(p){return function(d){if(h)throw new TypeError("Generator is already executing.");for(;y;)try{if(h=1,c&&(f=2&d[0]?c.return:d[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,d[1])).done)return f;switch(c=0,f&&(d=[2&d[0],f.value]),d[0]){case 0:case 1:f=d;break;case 4:return y.label++,{value:d[1],done:!1};case 5:y.label++,c=d[1],d=[0];continue;case 7:d=y.ops.pop(),y.trys.pop();continue;default:if(!((f=(f=y.trys).length>0&&f[f.length-1])||6!==d[0]&&2!==d[0])){y=0;continue}if(3===d[0]&&(!f||d[1]>f[0]&&d[1]<f[3])){y.label=d[1];break}if(6===d[0]&&y.label<f[1]){y.label=f[1],f=d;break}if(f&&y.label<f[2]){y.label=f[2],y.ops.push(d);break}f[2]&&y.ops.pop(),y.trys.pop();continue}d=m.call(_,y)}catch(O){d=[6,O],c=0}finally{h=f=0}if(5&d[0])throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}([R,p])}}},__createBinding:function(_,m,h,c){void 0===c&&(c=h),_[c]=m[h]},__exportStar:function(_,m){for(var h in _)"default"===h||m.hasOwnProperty(h)||(m[h]=_[h])},__values:Tb,__read:Mb,__spread:function(){for(var _=[],m=0;m<arguments.length;m++)_=_.concat(Mb(arguments[m]));return _},__spreadArrays:function(){for(var _=0,m=0,h=arguments.length;m<h;m++)_+=arguments[m].length;var c=Array(_),f=0;for(m=0;m<h;m++)for(var v=arguments[m],y=0,E=v.length;y<E;y++,f++)c[f]=v[y];return c},__await:Pd,__asyncGenerator:function(_,m,h){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,f=h.apply(_,m||[]),v=[];return c={},y("next"),y("throw"),y("return"),c[Symbol.asyncIterator]=function(){return this},c;function y(O){f[O]&&(c[O]=function(L){return new Promise(function(P,N){v.push([O,L,P,N])>1||E(O,L)})})}function E(O,L){try{(P=f[O](L)).value instanceof Pd?Promise.resolve(P.value.v).then(R,p):d(v[0][2],P)}catch(N){d(v[0][3],N)}var P}function R(O){E("next",O)}function p(O){E("throw",O)}function d(O,L){O(L),v.shift(),v.length&&E(v[0][0],v[0][1])}},__asyncDelegator:function(_){var m,h;return m={},c("next"),c("throw",function(f){throw f}),c("return"),m[Symbol.iterator]=function(){return this},m;function c(f,v){m[f]=_[f]?function(y){return(h=!h)?{value:Pd(_[f](y)),done:"return"===f}:v?v(y):y}:v}},__asyncValues:function(_){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var m,h=_[Symbol.asyncIterator];return h?h.call(_):(_=Tb(_),m={},c("next"),c("throw"),c("return"),m[Symbol.asyncIterator]=function(){return this},m);function c(f){m[f]=_[f]&&function(v){return new Promise(function(y,E){var R,p,d;R=y,p=E,d=(v=_[f](v)).done,Promise.resolve(v.value).then(function(L){R({value:L,done:d})},p)})}}},__makeTemplateObject:function(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_},__importStar:function(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var h in _)Object.hasOwnProperty.call(_,h)&&(m[h]=_[h]);return m.default=_,m},__importDefault:function(_){return _&&_.__esModule?_:{default:_}},__classPrivateFieldGet:function(_,m){if(!m.has(_))throw new TypeError("attempted to get private field on non-instance");return m.get(_)},__classPrivateFieldSet:function(_,m,h){if(!m.has(_))throw new TypeError("attempted to set private field on non-instance");return m.set(_,h),h}}),ng=c_(mS),Ub={},rg={},Xc={},jb={},Jl={},qb={};function $b(){return Bb||(Bb=1,function(_){Object.defineProperty(_,"__esModule",{value:!0});const m=ng;var h;m.__exportStar((Db||(Db=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.ONE_THOUSAND=Jl.ONE_HUNDRED=void 0,Jl.ONE_HUNDRED=100,Jl.ONE_THOUSAND=1e3),Jl),_),m.__exportStar((zb||(zb=1,h=qb,Object.defineProperty(h,"__esModule",{value:!0}),h.ONE_YEAR=h.FOUR_WEEKS=h.THREE_WEEKS=h.TWO_WEEKS=h.ONE_WEEK=h.THIRTY_DAYS=h.SEVEN_DAYS=h.FIVE_DAYS=h.THREE_DAYS=h.ONE_DAY=h.TWENTY_FOUR_HOURS=h.TWELVE_HOURS=h.SIX_HOURS=h.THREE_HOURS=h.ONE_HOUR=h.SIXTY_MINUTES=h.THIRTY_MINUTES=h.TEN_MINUTES=h.FIVE_MINUTES=h.ONE_MINUTE=h.SIXTY_SECONDS=h.THIRTY_SECONDS=h.TEN_SECONDS=h.FIVE_SECONDS=h.ONE_SECOND=void 0,h.ONE_SECOND=1,h.FIVE_SECONDS=5,h.TEN_SECONDS=10,h.THIRTY_SECONDS=30,h.SIXTY_SECONDS=60,h.ONE_MINUTE=h.SIXTY_SECONDS,h.FIVE_MINUTES=5*h.ONE_MINUTE,h.TEN_MINUTES=10*h.ONE_MINUTE,h.THIRTY_MINUTES=30*h.ONE_MINUTE,h.SIXTY_MINUTES=60*h.ONE_MINUTE,h.ONE_HOUR=h.SIXTY_MINUTES,h.THREE_HOURS=3*h.ONE_HOUR,h.SIX_HOURS=6*h.ONE_HOUR,h.TWELVE_HOURS=12*h.ONE_HOUR,h.TWENTY_FOUR_HOURS=24*h.ONE_HOUR,h.ONE_DAY=h.TWENTY_FOUR_HOURS,h.THREE_DAYS=3*h.ONE_DAY,h.FIVE_DAYS=5*h.ONE_DAY,h.SEVEN_DAYS=7*h.ONE_DAY,h.THIRTY_DAYS=30*h.ONE_DAY,h.ONE_WEEK=h.SEVEN_DAYS,h.TWO_WEEKS=2*h.ONE_WEEK,h.THREE_WEEKS=3*h.ONE_WEEK,h.FOUR_WEEKS=4*h.ONE_WEEK,h.ONE_YEAR=365*h.ONE_DAY),qb),_)}(jb)),jb}var Vb,Wb,Kb,Xl={},Gb={},ig={};!function(_){Object.defineProperty(_,"__esModule",{value:!0});const m=ng;m.__exportStar((Hb||(Hb=1,function(_){Object.defineProperty(_,"__esModule",{value:!0});const m=ng;m.__exportStar((Lb||(Lb=1,Object.defineProperty(rg,"__esModule",{value:!0}),rg.delay=void 0,rg.delay=function(h){return new Promise(c=>{setTimeout(()=>{c(!0)},h)})}),rg),_),m.__exportStar(function(){if(Fb)return Xc;Fb=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.fromMiliseconds=Xc.toMiliseconds=void 0;const h=$b();return Xc.toMiliseconds=function(c){return c*h.ONE_THOUSAND},Xc.fromMiliseconds=function(c){return Math.floor(c/h.ONE_THOUSAND)},Xc}(),_)}(Ub)),Ub),_),m.__exportStar(function(){if(Vb)return Xl;Vb=1,Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.Watch=void 0;class h{constructor(){this.timestamps=new Map}start(f){if(this.timestamps.has(f))throw new Error(`Watch already started for label: ${f}`);this.timestamps.set(f,{started:Date.now()})}stop(f){const v=this.get(f);if(void 0!==v.elapsed)throw new Error(`Watch already stopped for label: ${f}`);const y=Date.now()-v.started;this.timestamps.set(f,{started:v.started,elapsed:y})}get(f){const v=this.timestamps.get(f);if(void 0===v)throw new Error(`No timestamp found for label: ${f}`);return v}elapsed(f){const v=this.get(f);return v.elapsed||Date.now()-v.started}}return Xl.Watch=h,Xl.default=h,Xl}(),_),m.__exportStar((Kb||(Kb=1,function(_){Object.defineProperty(_,"__esModule",{value:!0}),ng.__exportStar((Wb||(Wb=1,Object.defineProperty(ig,"__esModule",{value:!0}),ig.IWatch=void 0,ig.IWatch=class{}),ig),_)}(Gb)),Gb),_),m.__exportStar($b(),_)}({});var Dr={};function Zc(_){let m;return"undefined"!=typeof window&&void 0!==window[_]&&(m=window[_]),m}function Zl(_){const m=Zc(_);if(!m)throw new Error(`${_} is not defined in Window`);return m}Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.getLocalStorage=Dr.getLocalStorageOrThrow=Dr.getCrypto=Dr.getCryptoOrThrow=Dr.getLocation=Dr.getLocationOrThrow=Dr.getNavigator=Dr.getNavigatorOrThrow=Dr.getDocument=Dr.getDocumentOrThrow=Dr.getFromWindowOrThrow=Dr.getFromWindow=void 0,Dr.getFromWindow=Zc,Dr.getFromWindowOrThrow=Zl,Dr.getDocumentOrThrow=function(){return Zl("document")},Dr.getDocument=function(){return Zc("document")},Dr.getNavigatorOrThrow=function(){return Zl("navigator")},Dr.getNavigator=function(){return Zc("navigator")},Dr.getLocationOrThrow=function(){return Zl("location")},Dr.getLocation=function(){return Zc("location")},Dr.getCryptoOrThrow=function(){return Zl("crypto")},Dr.getCrypto=function(){return Zc("crypto")},Dr.getLocalStorageOrThrow=function(){return Zl("localStorage")},Dr.getLocalStorage=function(){return Zc("localStorage")};var Ry={};Object.defineProperty(Ry,"__esModule",{value:!0}),Ry.getWindowMetadata=void 0;const Yb=Dr;Ry.getWindowMetadata=function(){let _,m;try{_=Yb.getDocumentOrThrow(),m=Yb.getLocationOrThrow()}catch{return null}function h(...f){const v=_.getElementsByTagName("meta");for(let y=0;y<v.length;y++){const E=v[y],R=["itemprop","property","name"].map(p=>E.getAttribute(p)).filter(p=>!!p&&f.includes(p));if(R.length&&R){const p=E.getAttribute("content");if(p)return p}}return""}const c=function(){let f=h("name","og:site_name","og:title","twitter:title");return f||(f=_.title),f}();return{description:h("description","og:description","twitter:description","keywords"),url:m.origin,icons:function(){const f=_.getElementsByTagName("link"),v=[];for(let y=0;y<f.length;y++){const E=f[y],R=E.getAttribute("rel");if(R&&R.toLowerCase().indexOf("icon")>-1){const p=E.getAttribute("href");if(p)if(-1===p.toLowerCase().indexOf("https:")&&-1===p.toLowerCase().indexOf("http:")&&0!==p.indexOf("//")){let d=m.protocol+"//"+m.host;if(0===p.indexOf("/"))d+=p;else{const O=m.pathname.split("/");O.pop(),d+=O.join("/")+"/"+p}v.push(d)}else 0===p.indexOf("//")?v.push(m.protocol+p):v.push(p)}}return v}(),name:c}};var bS=_=>encodeURIComponent(_).replace(/[!'()*]/g,m=>`%${m.charCodeAt(0).toString(16).toUpperCase()}`),Qb="%[a-f0-9]{2}",Jb=new RegExp("("+Qb+")|([^%]+?)","gi"),Xb=new RegExp("("+Qb+")+","gi");function Iy(_,m){try{return[decodeURIComponent(_.join(""))]}catch{}if(1===_.length)return _;var h=_.slice(0,m=m||1),c=_.slice(m);return Array.prototype.concat.call([],Iy(h),Iy(c))}function wS(_){try{return decodeURIComponent(_)}catch{for(var m=_.match(Jb)||[],h=1;h<m.length;h++)m=(_=Iy(m,h).join("")).match(Jb)||[];return _}}var ES=function(_){if("string"!=typeof _)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof _+"`");try{return _=_.replace(/\+/g," "),decodeURIComponent(_)}catch{return function(h){for(var c={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},f=Xb.exec(h);f;){try{c[f[0]]=decodeURIComponent(f[0])}catch{var v=wS(f[0]);v!==f[0]&&(c[f[0]]=v)}f=Xb.exec(h)}c["%C2"]="\ufffd";for(var y=Object.keys(c),E=0;E<y.length;E++){var R=y[E];h=h.replace(new RegExp(R,"g"),c[R])}return h}(_)}},SS=(_,m)=>{if("string"!=typeof _||"string"!=typeof m)throw new TypeError("Expected the arguments to be of type `string`");if(""===m)return[_];const h=_.indexOf(m);return-1===h?[_]:[_.slice(0,h),_.slice(h+m.length)]},OS=function(_,m){for(var h={},c=Object.keys(_),f=Array.isArray(m),v=0;v<c.length;v++){var y=c[v],E=_[y];(f?-1!==m.indexOf(y):m(y,E,_))&&(h[y]=E)}return h};!function(_){const m=bS,h=ES,c=SS,f=OS,v=Symbol("encodeFragmentIdentifier");function y(N){if("string"!=typeof N||1!==N.length)throw new TypeError("arrayFormatSeparator must be single character string")}function E(N,M){return M.encode?M.strict?m(N):encodeURIComponent(N):N}function R(N,M){return M.decode?h(N):N}function p(N){return Array.isArray(N)?N.sort():"object"==typeof N?p(Object.keys(N)).sort((M,V)=>Number(M)-Number(V)).map(M=>N[M]):N}function d(N){const M=N.indexOf("#");return-1!==M&&(N=N.slice(0,M)),N}function O(N){const M=(N=d(N)).indexOf("?");return-1===M?"":N.slice(M+1)}function L(N,M){return M.parseNumbers&&!Number.isNaN(Number(N))&&"string"==typeof N&&""!==N.trim()?N=Number(N):!M.parseBooleans||null===N||"true"!==N.toLowerCase()&&"false"!==N.toLowerCase()||(N="true"===N.toLowerCase()),N}function P(N,M){y((M=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},M)).arrayFormatSeparator);const V=function(x){let W;switch(x.arrayFormat){case"index":return(H,J,K)=>{W=/\[(\d*)\]$/.exec(H),H=H.replace(/\[\d*\]$/,""),W?(void 0===K[H]&&(K[H]={}),K[H][W[1]]=J):K[H]=J};case"bracket":return(H,J,K)=>{W=/(\[\])$/.exec(H),K[H=H.replace(/\[\]$/,"")]=W?void 0!==K[H]?[].concat(K[H],J):[J]:J};case"colon-list-separator":return(H,J,K)=>{W=/(:list)$/.exec(H),K[H=H.replace(/:list$/,"")]=W?void 0!==K[H]?[].concat(K[H],J):[J]:J};case"comma":case"separator":return(H,J,K)=>{const le="string"==typeof J&&J.includes(x.arrayFormatSeparator),z="string"==typeof J&&!le&&R(J,x).includes(x.arrayFormatSeparator);J=z?R(J,x):J;const B=le||z?J.split(x.arrayFormatSeparator).map(ie=>R(ie,x)):null===J?J:R(J,x);K[H]=B};case"bracket-separator":return(H,J,K)=>{const le=/(\[\])$/.test(H);if(H=H.replace(/\[\]$/,""),!le)return void(K[H]=J&&R(J,x));const z=null===J?[]:J.split(x.arrayFormatSeparator).map(B=>R(B,x));K[H]=void 0!==K[H]?[].concat(K[H],z):z};default:return(H,J,K)=>{K[H]=void 0!==K[H]?[].concat(K[H],J):J}}}(M),Z=Object.create(null);if("string"!=typeof N||!(N=N.trim().replace(/^[?#&]/,"")))return Z;for(const x of N.split("&")){if(""===x)continue;let[W,H]=c(M.decode?x.replace(/\+/g," "):x,"=");H=void 0===H?null:["comma","separator","bracket-separator"].includes(M.arrayFormat)?H:R(H,M),V(R(W,M),H,Z)}for(const x of Object.keys(Z)){const W=Z[x];if("object"==typeof W&&null!==W)for(const H of Object.keys(W))W[H]=L(W[H],M);else Z[x]=L(W,M)}return!1===M.sort?Z:(!0===M.sort?Object.keys(Z).sort():Object.keys(Z).sort(M.sort)).reduce((x,W)=>{const H=Z[W];return x[W]=Boolean(H)&&"object"==typeof H&&!Array.isArray(H)?p(H):H,x},Object.create(null))}_.extract=O,_.parse=P,_.stringify=(N,M)=>{if(!N)return"";y((M=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},M)).arrayFormatSeparator);const V=H=>M.skipNull&&null==N[H]||M.skipEmptyString&&""===N[H],Z=function(H){switch(H.arrayFormat){case"index":return J=>(K,le)=>{const z=K.length;return void 0===le||H.skipNull&&null===le||H.skipEmptyString&&""===le?K:null===le?[...K,[E(J,H),"[",z,"]"].join("")]:[...K,[E(J,H),"[",E(z,H),"]=",E(le,H)].join("")]};case"bracket":return J=>(K,le)=>void 0===le||H.skipNull&&null===le||H.skipEmptyString&&""===le?K:null===le?[...K,[E(J,H),"[]"].join("")]:[...K,[E(J,H),"[]=",E(le,H)].join("")];case"colon-list-separator":return J=>(K,le)=>void 0===le||H.skipNull&&null===le||H.skipEmptyString&&""===le?K:null===le?[...K,[E(J,H),":list="].join("")]:[...K,[E(J,H),":list=",E(le,H)].join("")];case"comma":case"separator":case"bracket-separator":{const J="bracket-separator"===H.arrayFormat?"[]=":"=";return K=>(le,z)=>void 0===z||H.skipNull&&null===z||H.skipEmptyString&&""===z?le:(z=null===z?"":z,0===le.length?[[E(K,H),J,E(z,H)].join("")]:[[le,E(z,H)].join(H.arrayFormatSeparator)])}default:return J=>(K,le)=>void 0===le||H.skipNull&&null===le||H.skipEmptyString&&""===le?K:null===le?[...K,E(J,H)]:[...K,[E(J,H),"=",E(le,H)].join("")]}}(M),x={};for(const H of Object.keys(N))V(H)||(x[H]=N[H]);const W=Object.keys(x);return!1!==M.sort&&W.sort(M.sort),W.map(H=>{const J=N[H];return void 0===J?"":null===J?E(H,M):Array.isArray(J)?0===J.length&&"bracket-separator"===M.arrayFormat?E(H,M)+"[]":J.reduce(Z(H),[]).join("&"):E(H,M)+"="+E(J,M)}).filter(H=>H.length>0).join("&")},_.parseUrl=(N,M)=>{M=Object.assign({decode:!0},M);const[V,Z]=c(N,"#");return Object.assign({url:V.split("?")[0]||"",query:P(O(N),M)},M&&M.parseFragmentIdentifier&&Z?{fragmentIdentifier:R(Z,M)}:{})},_.stringifyUrl=(N,M)=>{M=Object.assign({encode:!0,strict:!0,[v]:!0},M);const V=d(N.url).split("?")[0]||"",Z=_.extract(N.url),x=_.parse(Z,{sort:!1}),W=Object.assign(x,N.query);let H=_.stringify(W,M);H&&(H=`?${H}`);let J=function(K){let le="";const z=K.indexOf("#");return-1!==z&&(le=K.slice(z)),le}(N.url);return N.fragmentIdentifier&&(J=`#${M[v]?E(N.fragmentIdentifier,M):N.fragmentIdentifier}`),`${V}${H}${J}`},_.pick=(N,M,V)=>{V=Object.assign({parseFragmentIdentifier:!0,[v]:!1},V);const{url:Z,query:x,fragmentIdentifier:W}=_.parseUrl(N,V);return _.stringifyUrl({url:Z,query:f(x,M),fragmentIdentifier:W},V)},_.exclude=(N,M,V)=>{const Z=Array.isArray(M)?x=>!M.includes(x):(x,W)=>!M(x,W);return _.pick(N,Z,V)}}({});const xS={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}};function Cy(_,m){return!!Array.isArray(_)&&(!(typeof m<"u"&&_.length)||_.every(m))}var Zb,ew,tw={exports:{}};!function(h){var c=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof wr<"u"?wr:typeof self<"u"?self:{};function v(n){var e=n.default;if("function"==typeof e){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(n).forEach(function(s){var u=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(r,s,u.get?u:{enumerable:!0,get:function(){return n[s]}})}),r}var y,E={exports:{}},R="object"==typeof Reflect?Reflect:null,p=R&&"function"==typeof R.apply?R.apply:function(n,e,r){return Function.prototype.apply.call(n,e,r)};y=R&&"function"==typeof R.ownKeys?R.ownKeys:Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:function(n){return Object.getOwnPropertyNames(n)};var O=Number.isNaN||function(n){return n!=n};function L(){L.init.call(this)}E.exports=L,E.exports.once=function(n,e){return new Promise(function(r,s){function u(S){n.removeListener(e,g),s(S)}function g(){"function"==typeof n.removeListener&&n.removeListener("error",u),r([].slice.call(arguments))}ie(n,e,g,{once:!0}),"error"!==e&&function(n,e,r){"function"==typeof n.on&&ie(n,"error",e,r)}(n,u,{once:!0})})},L.EventEmitter=L,L.prototype._events=void 0,L.prototype._eventsCount=0,L.prototype._maxListeners=void 0;var P=10;function N(n){if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}function M(n){return void 0===n._maxListeners?L.defaultMaxListeners:n._maxListeners}function V(n,e,r,s){var u,g,S;if(N(r),void 0===(g=n._events)?(g=n._events=Object.create(null),n._eventsCount=0):(void 0!==g.newListener&&(n.emit("newListener",e,r.listener?r.listener:r),g=n._events),S=g[e]),void 0===S)S=g[e]=r,++n._eventsCount;else if("function"==typeof S?S=g[e]=s?[r,S]:[S,r]:s?S.unshift(r):S.push(r),(u=M(n))>0&&S.length>u&&!S.warned){S.warned=!0;var I=new Error("Possible EventEmitter memory leak detected. "+S.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");I.name="MaxListenersExceededWarning",I.emitter=n,I.type=e,I.count=S.length,function(n){console&&console.warn&&console.warn(n)}(I)}return n}function Z(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function x(n,e,r){var s={fired:!1,wrapFn:void 0,target:n,type:e,listener:r},u=Z.bind(s);return u.listener=r,s.wrapFn=u,u}function W(n,e,r){var s=n._events;if(void 0===s)return[];var u=s[e];return void 0===u?[]:"function"==typeof u?r?[u.listener||u]:[u]:r?function(n){for(var e=new Array(n.length),r=0;r<e.length;++r)e[r]=n[r].listener||n[r];return e}(u):J(u,u.length)}function H(n){var e=this._events;if(void 0!==e){var r=e[n];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function J(n,e){for(var r=new Array(e),s=0;s<e;++s)r[s]=n[s];return r}function ie(n,e,r,s){if("function"==typeof n.on)s.once?n.once(e,r):n.on(e,r);else{if("function"!=typeof n.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n);n.addEventListener(e,function u(g){s.once&&n.removeEventListener(e,u),r(g)})}}Object.defineProperty(L,"defaultMaxListeners",{enumerable:!0,get:function(){return P},set:function(n){if("number"!=typeof n||n<0||O(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");P=n}}),L.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},L.prototype.setMaxListeners=function(n){if("number"!=typeof n||n<0||O(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this},L.prototype.getMaxListeners=function(){return M(this)},L.prototype.emit=function(n){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var s="error"===n,u=this._events;if(void 0!==u)s=s&&void 0===u.error;else if(!s)return!1;if(s){var g;if(e.length>0&&(g=e[0]),g instanceof Error)throw g;var S=new Error("Unhandled error."+(g?" ("+g.message+")":""));throw S.context=g,S}var I=u[n];if(void 0===I)return!1;if("function"==typeof I)p(I,this,e);else{var F=I.length,A=J(I,F);for(r=0;r<F;++r)p(A[r],this,e)}return!0},L.prototype.on=L.prototype.addListener=function(n,e){return V(this,n,e,!1)},L.prototype.prependListener=function(n,e){return V(this,n,e,!0)},L.prototype.once=function(n,e){return N(e),this.on(n,x(this,n,e)),this},L.prototype.prependOnceListener=function(n,e){return N(e),this.prependListener(n,x(this,n,e)),this},L.prototype.off=L.prototype.removeListener=function(n,e){var r,s,u,g,S;if(N(e),void 0===(s=this._events))return this;if(void 0===(r=s[n]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete s[n],s.removeListener&&this.emit("removeListener",n,r.listener||e));else if("function"!=typeof r){for(u=-1,g=r.length-1;g>=0;g--)if(r[g]===e||r[g].listener===e){S=r[g].listener,u=g;break}if(u<0)return this;0===u?r.shift():function(n,e){for(;e+1<n.length;e++)n[e]=n[e+1];n.pop()}(r,u),1===r.length&&(s[n]=r[0]),void 0!==s.removeListener&&this.emit("removeListener",n,S||e)}return this},L.prototype.removeAllListeners=function(n){var e,r,s;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[n]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[n]),this;if(0===arguments.length){var u,g=Object.keys(r);for(s=0;s<g.length;++s)"removeListener"!==(u=g[s])&&this.removeAllListeners(u);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[n]))this.removeListener(n,e);else if(void 0!==e)for(s=e.length-1;s>=0;s--)this.removeListener(n,e[s]);return this},L.prototype.listeners=function(n){return W(this,n,!0)},L.prototype.rawListeners=function(n){return W(this,n,!1)},L.listenerCount=function(n,e){return"function"==typeof n.listenerCount?n.listenerCount(e):H.call(n,e)},L.prototype.listenerCount=H,L.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]};const xe=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Me=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Oe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function we(n,e){if(!("__proto__"===n||"constructor"===n&&e&&"object"==typeof e&&"prototype"in e))return e;!function(n){console.warn(`[destr] Dropping "${n}" key to prevent prototype pollution.`)}(n)}function pe(n,e={}){if("string"!=typeof n)return n;const r=n.trim();if('"'===n[0]&&'"'===n.at(-1)&&!n.includes("\\"))return r.slice(1,-1);if(r.length<=9){const s=r.toLowerCase();if("true"===s)return!0;if("false"===s)return!1;if("undefined"===s)return;if("null"===s)return null;if("nan"===s)return Number.NaN;if("infinity"===s)return Number.POSITIVE_INFINITY;if("-infinity"===s)return Number.NEGATIVE_INFINITY}if(!Oe.test(n)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return n}try{if(xe.test(n)||Me.test(n)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(n,we)}return JSON.parse(n)}catch(s){if(e.strict)throw s;return n}}function de(n,...e){try{return function(n){return n&&"function"==typeof n.then?n:Promise.resolve(n)}(n(...e))}catch(r){return Promise.reject(r)}}function Se(n){if(function(n){const e=typeof n;return null===n||"object"!==e&&"function"!==e}(n))return String(n);if(function(n){const e=Object.getPrototypeOf(n);return!e||e.isPrototypeOf(Object)}(n)||Array.isArray(n))return JSON.stringify(n);if("function"==typeof n.toJSON)return Se(n.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function Fe(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const $e="base64:";function Ve(n){return n?n.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function gt(...n){return Ve(n.join(":"))}function It(n){return(n=Ve(n))?n+":":""}const D=()=>{const n=new Map;return{name:"memory",options:{},hasItem:e=>n.has(e),getItem:e=>n.get(e)||null,getItemRaw:e=>n.get(e)||null,setItem(e,r){n.set(e,r)},setItemRaw(e,r){n.set(e,r)},removeItem(e){n.delete(e)},getKeys:()=>Array.from(n.keys()),clear(){n.clear()},dispose(){n.clear()}}};function $(n={}){const e={mounts:{"":n.driver||D()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=A=>{for(const G of e.mountpoints)if(A.startsWith(G))return{base:G,relativeKey:A.slice(G.length),driver:e.mounts[G]};return{base:"",relativeKey:A,driver:e.mounts[""]}},s=(A,G)=>e.mountpoints.filter(he=>he.startsWith(A)||G&&A.startsWith(he)).map(he=>({relativeBase:A.length>he.length?A.slice(he.length):void 0,mountpoint:he,driver:e.mounts[he]})),u=(A,G)=>{if(e.watching){G=Ve(G);for(const he of e.watchListeners)he(A,G)}},g=function(){var A=ue(function*(){if(!e.watching){e.watching=!0;for(const G in e.mounts)e.unwatch[G]=yield q(e.mounts[G],u,G)}});return function(){return A.apply(this,arguments)}}(),S=function(){var A=ue(function*(){if(e.watching){for(const G in e.unwatch)yield e.unwatch[G]();e.unwatch={},e.watching=!1}});return function(){return A.apply(this,arguments)}}(),I=(A,G,he)=>{const te=new Map,Ne=se=>{let Ce=te.get(se.base);return Ce||(Ce={driver:se.driver,base:se.base,items:[]},te.set(se.base,Ce)),Ce};for(const se of A){const Ce="string"==typeof se,lt=Ve(Ce?se:se.key),Ot=Ce?void 0:se.value,Te=Ce||!se.options?G:{...G,...se.options},Ue=r(lt);Ne(Ue).items.push({key:lt,value:Ot,relativeKey:Ue.relativeKey,options:Te})}return Promise.all([...te.values()].map(se=>he(se))).then(se=>se.flat())},F={hasItem(A,G={}){A=Ve(A);const{relativeKey:he,driver:te}=r(A);return de(te.hasItem,he,G)},getItem(A,G={}){A=Ve(A);const{relativeKey:he,driver:te}=r(A);return de(te.getItem,he,G).then(Ne=>pe(Ne))},getItems:(A,G)=>I(A,G,he=>he.driver.getItems?de(he.driver.getItems,he.items.map(te=>({key:te.relativeKey,options:te.options})),G).then(te=>te.map(Ne=>({key:gt(he.base,Ne.key),value:pe(Ne.value)}))):Promise.all(he.items.map(te=>de(he.driver.getItem,te.relativeKey,te.options).then(Ne=>({key:te.key,value:pe(Ne)}))))),getItemRaw(A,G={}){A=Ve(A);const{relativeKey:he,driver:te}=r(A);return te.getItemRaw?de(te.getItemRaw,he,G):de(te.getItem,he,G).then(Ne=>function(n){return"string"==typeof n&&n.startsWith($e)?(Fe(),Buffer.from(n.slice($e.length),"base64")):n}(Ne))},setItem:(A,G,he={})=>ue(function*(){if(void 0===G)return F.removeItem(A);A=Ve(A);const{relativeKey:te,driver:Ne}=r(A);Ne.setItem&&(yield de(Ne.setItem,te,Se(G),he),Ne.watch||u("update",A))})(),setItems:(A,G)=>ue(function*(){yield I(A,G,function(){var he=ue(function*(te){te.driver.setItems&&(yield de(te.driver.setItems,te.items.map(Ne=>({key:Ne.relativeKey,value:Se(Ne.value),options:Ne.options})),G)),te.driver.setItem&&(yield Promise.all(te.items.map(Ne=>de(te.driver.setItem,Ne.relativeKey,Se(Ne.value),Ne.options))))});return function(te){return he.apply(this,arguments)}}())})(),setItemRaw:(A,G,he={})=>ue(function*(){if(void 0===G)return F.removeItem(A,he);A=Ve(A);const{relativeKey:te,driver:Ne}=r(A);if(Ne.setItemRaw)yield de(Ne.setItemRaw,te,G,he);else{if(!Ne.setItem)return;yield de(Ne.setItem,te,function(n){if("string"==typeof n)return n;Fe();const e=Buffer.from(n).toString("base64");return $e+e}(G),he)}Ne.watch||u("update",A)})(),removeItem:(A,G={})=>ue(function*(){"boolean"==typeof G&&(G={removeMeta:G}),A=Ve(A);const{relativeKey:he,driver:te}=r(A);te.removeItem&&(yield de(te.removeItem,he,G),(G.removeMeta||G.removeMata)&&(yield de(te.removeItem,he+"$",G)),te.watch||u("remove",A))})(),getMeta:(A,G={})=>ue(function*(){"boolean"==typeof G&&(G={nativeOnly:G}),A=Ve(A);const{relativeKey:he,driver:te}=r(A),Ne=Object.create(null);if(te.getMeta&&Object.assign(Ne,yield de(te.getMeta,he,G)),!G.nativeOnly){const se=yield de(te.getItem,he+"$",G).then(Ce=>pe(Ce));se&&"object"==typeof se&&("string"==typeof se.atime&&(se.atime=new Date(se.atime)),"string"==typeof se.mtime&&(se.mtime=new Date(se.mtime)),Object.assign(Ne,se))}return Ne})(),setMeta(A,G,he={}){return this.setItem(A+"$",G,he)},removeMeta(A,G={}){return this.removeItem(A+"$",G)},getKeys:(A,G={})=>ue(function*(){A=It(A);const he=s(A,!0);let te=[];const Ne=[];for(const se of he){const Ce=(yield de(se.driver.getKeys,se.relativeBase,G)).map(lt=>se.mountpoint+Ve(lt)).filter(lt=>!te.some(Ot=>lt.startsWith(Ot)));Ne.push(...Ce),te=[se.mountpoint,...te.filter(lt=>!lt.startsWith(se.mountpoint))]}return Ne.filter(A?se=>se.startsWith(A)&&!se.endsWith("$"):se=>!se.endsWith("$"))})(),clear:(A,G={})=>ue(function*(){A=It(A),yield Promise.all(s(A,!1).map(function(){var he=ue(function*(te){if(te.driver.clear)return de(te.driver.clear,te.relativeBase,G);if(te.driver.removeItem){const Ne=yield te.driver.getKeys(te.relativeBase||"",G);return Promise.all(Ne.map(se=>te.driver.removeItem(se,G)))}});return function(te){return he.apply(this,arguments)}}()))})(),dispose:()=>ue(function*(){yield Promise.all(Object.values(e.mounts).map(A=>Ee(A)))})(),watch:(A=ue(function*(G){return yield g(),e.watchListeners.push(G),ue(function*(){e.watchListeners=e.watchListeners.filter(he=>he!==G),0===e.watchListeners.length&&(yield S())})}),function(he){return A.apply(this,arguments)}),unwatch:()=>ue(function*(){e.watchListeners=[],yield S()})(),mount(A,G){if((A=It(A))&&e.mounts[A])throw new Error(`already mounted at ${A}`);return A&&(e.mountpoints.push(A),e.mountpoints.sort((he,te)=>te.length-he.length)),e.mounts[A]=G,e.watching&&Promise.resolve(q(G,u,A)).then(he=>{e.unwatch[A]=he}).catch(console.error),F},unmount:(A,G=!0)=>ue(function*(){(A=It(A))&&e.mounts[A]&&(e.watching&&A in e.unwatch&&(e.unwatch[A](),delete e.unwatch[A]),G&&(yield Ee(e.mounts[A])),e.mountpoints=e.mountpoints.filter(he=>he!==A),delete e.mounts[A])})(),getMount(A=""){A=Ve(A)+":";const G=r(A);return{driver:G.driver,base:G.base}},getMounts:(A="",G={})=>(A=Ve(A),s(A,G.parents).map(he=>({driver:he.driver,base:he.mountpoint})))};var A;return F}function q(n,e,r){return n.watch?n.watch((s,u)=>e(s,r+u)):()=>{}}function Ee(n){return Le.apply(this,arguments)}function Le(){return(Le=ue(function*(n){"function"==typeof n.dispose&&(yield de(n.dispose))})).apply(this,arguments)}function je(n){return new Promise((e,r)=>{n.oncomplete=n.onsuccess=()=>e(n.result),n.onabort=n.onerror=()=>r(n.error)})}function ft(n,e){const r=indexedDB.open(n);r.onupgradeneeded=()=>r.result.createObjectStore(e);const s=je(r);return(u,g)=>s.then(S=>g(S.transaction(e,u).objectStore(e)))}let _t;function Tt(){return _t||(_t=ft("keyval-store","keyval")),_t}function tn(n,e=Tt()){return e("readonly",r=>je(r.get(n)))}function Xt(n=Tt()){return n("readonly",e=>{if(e.getAllKeys)return je(e.getAllKeys());const r=[];return function(n,e){return n.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},je(n.transaction)}(e,s=>r.push(s.key)).then(()=>r)})}function Vn(n){if("string"!=typeof n)throw new Error("Cannot safe json parse value of type "+typeof n);try{return(n=>{const r=n.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(r,(s,u)=>"string"==typeof u&&u.match(/^\d+n$/)?BigInt(u.substring(0,u.length-1)):u)})(n)}catch{return n}}function Qn(n){return"string"==typeof n?n:(n=>JSON.stringify(n,(e,r)=>"bigint"==typeof r?r.toString()+"n":r))(n)||""}var Er=(n={})=>{const e=n.base&&n.base.length>0?`${n.base}:`:"",r=u=>e+u;let s;return n.dbName&&n.storeName&&(s=ft(n.dbName,n.storeName)),{name:"idb-keyval",options:n,hasItem:(u=ue(function*(g){return!(typeof(yield tn(r(g),s))>"u")}),function(S){return u.apply(this,arguments)}),getItem:function(){var u=ue(function*(g){return(yield tn(r(g),s))??null});return function(S){return u.apply(this,arguments)}}(),setItem:(u,g)=>function(n,e,r=Tt()){return r("readwrite",s=>(s.put(e,n),je(s.transaction)))}(r(u),g,s),removeItem:u=>function(n,e=Tt()){return e("readwrite",r=>(r.delete(n),je(r.transaction)))}(r(u),s),getKeys:()=>Xt(s),clear:()=>function(n=Tt()){return n("readwrite",e=>(e.clear(),je(e.transaction)))}(s)};var u};class pa{constructor(){this.indexedDb=$({driver:Er({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}getKeys(){var e=this;return ue(function*(){return e.indexedDb.getKeys()})()}getEntries(){var e=this;return ue(function*(){return(yield e.indexedDb.getItems(yield e.indexedDb.getKeys())).map(r=>[r.key,r.value])})()}getItem(e){var r=this;return ue(function*(){const s=yield r.indexedDb.getItem(e);if(null!==s)return s})()}setItem(e,r){var s=this;return ue(function*(){yield s.indexedDb.setItem(e,Qn(r))})()}removeItem(e){var r=this;return ue(function*(){yield r.indexedDb.removeItem(e)})()}}var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof wr<"u"?wr:typeof self<"u"?self:{},$o={exports:{}};function Ya(n){var e;return[n[0],Vn(null!=(e=n[1])?e:"")]}!function(){let n;function e(){}n=e,n.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},n.prototype.setItem=function(r,s){this[r]=String(s)},n.prototype.removeItem=function(r){delete this[r]},n.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(s){r[s]=void 0,delete r[s]})},n.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},n.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),$o.exports=typeof cs<"u"&&cs.localStorage?cs.localStorage:typeof window<"u"&&window.localStorage?window.localStorage:new e}();class ga{constructor(){this.localStorage=$o.exports}getKeys(){var e=this;return ue(function*(){return Object.keys(e.localStorage)})()}getEntries(){var e=this;return ue(function*(){return Object.entries(e.localStorage).map(Ya)})()}getItem(e){var r=this;return ue(function*(){const s=r.localStorage.getItem(e);if(null!==s)return Vn(s)})()}setItem(e,r){var s=this;return ue(function*(){s.localStorage.setItem(e,Qn(r))})()}removeItem(e){var r=this;return ue(function*(){r.localStorage.removeItem(e)})()}}const ya=function(){var n=ue(function*(e,r,s){const u="wc_storage_version",g=yield r.getItem(u);if(g&&g>=1)return void s(r);const S=yield e.getKeys();if(!S.length)return void s(r);const I=[];for(;S.length;){const F=S.shift();if(!F)continue;const A=F.toLowerCase();if(A.includes("wc@")||A.includes("walletconnect")||A.includes("wc_")||A.includes("wallet_connect")){const G=yield e.getItem(F);yield r.setItem(F,G),I.push(F)}}yield r.setItem(u,1),s(r),Ds(e,I)});return function(r,s,u){return n.apply(this,arguments)}}(),Ds=function(){var n=ue(function*(e,r){r.length&&r.forEach(function(){var s=ue(function*(u){yield e.removeItem(u)});return function(u){return s.apply(this,arguments)}}())});return function(r,s){return n.apply(this,arguments)}}();class Qa{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};const e=new ga;this.storage=e;try{const r=new pa;ya(e,r,this.setInitialized)}catch{this.initialized=!0}}getKeys(){var e=this;return ue(function*(){return yield e.initialize(),e.storage.getKeys()})()}getEntries(){var e=this;return ue(function*(){return yield e.initialize(),e.storage.getEntries()})()}getItem(e){var r=this;return ue(function*(){return yield r.initialize(),r.storage.getItem(e)})()}setItem(e,r){var s=this;return ue(function*(){return yield s.initialize(),s.storage.setItem(e,r)})()}removeItem(e){var r=this;return ue(function*(){return yield r.initialize(),r.storage.removeItem(e)})()}initialize(){var e=this;return ue(function*(){e.initialized||(yield new Promise(r=>{const s=setInterval(()=>{e.initialized&&(clearInterval(s),r())},20)}))})()}}var lo={},js=function(n,e){return(js=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var u in s)s.hasOwnProperty(u)&&(r[u]=s[u])})(n,e)};var fo=function(){return fo=Object.assign||function(n){for(var e,r=1,s=arguments.length;r<s;r++)for(var u in e=arguments[r])Object.prototype.hasOwnProperty.call(e,u)&&(n[u]=e[u]);return n},fo.apply(this,arguments)};function Ko(n){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&n[e],s=0;if(r)return r.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ja(n,e){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var s,u,g=r.call(n),S=[];try{for(;(void 0===e||e-- >0)&&!(s=g.next()).done;)S.push(s.value)}catch(I){u={error:I}}finally{try{s&&!s.done&&(r=g.return)&&r.call(g)}finally{if(u)throw u.error}}return S}function Yo(n){return this instanceof Yo?(this.v=n,this):new Yo(n)}var ur=v(Object.freeze({__proto__:null,__extends:function(n,e){function r(){this.constructor=n}js(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},get __assign(){return fo},__rest:function(n,e){var r={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(r[s]=n[s]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(s=Object.getOwnPropertySymbols(n);u<s.length;u++)e.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(n,s[u])&&(r[s[u]]=n[s[u]])}return r},__decorate:function(n,e,r,s){var u,g=arguments.length,S=g<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)S=Reflect.decorate(n,e,r,s);else for(var I=n.length-1;I>=0;I--)(u=n[I])&&(S=(g<3?u(S):g>3?u(e,r,S):u(e,r))||S);return g>3&&S&&Object.defineProperty(e,r,S),S},__param:function(n,e){return function(r,s){e(r,s,n)}},__metadata:function(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)},__awaiter:function(n,e,r,s){return new(r||(r=Promise))(function(g,S){function I(G){try{A(s.next(G))}catch(he){S(he)}}function F(G){try{A(s.throw(G))}catch(he){S(he)}}function A(G){G.done?g(G.value):function(g){return g instanceof r?g:new r(function(S){S(g)})}(G.value).then(I,F)}A((s=s.apply(n,e||[])).next())})},__generator:function(n,e){var r,s,u,g,S={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return g={next:I(0),throw:I(1),return:I(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function I(A){return function(G){return function(A){if(r)throw new TypeError("Generator is already executing.");for(;S;)try{if(r=1,s&&(u=2&A[0]?s.return:A[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,A[1])).done)return u;switch(s=0,u&&(A=[2&A[0],u.value]),A[0]){case 0:case 1:u=A;break;case 4:return S.label++,{value:A[1],done:!1};case 5:S.label++,s=A[1],A=[0];continue;case 7:A=S.ops.pop(),S.trys.pop();continue;default:if(!(u=(u=S.trys).length>0&&u[u.length-1])&&(6===A[0]||2===A[0])){S=0;continue}if(3===A[0]&&(!u||A[1]>u[0]&&A[1]<u[3])){S.label=A[1];break}if(6===A[0]&&S.label<u[1]){S.label=u[1],u=A;break}if(u&&S.label<u[2]){S.label=u[2],S.ops.push(A);break}u[2]&&S.ops.pop(),S.trys.pop();continue}A=e.call(n,S)}catch(G){A=[6,G],s=0}finally{r=u=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([A,G])}}},__createBinding:function(n,e,r,s){void 0===s&&(s=r),n[s]=e[r]},__exportStar:function(n,e){for(var r in n)"default"!==r&&!e.hasOwnProperty(r)&&(e[r]=n[r])},__values:Ko,__read:Ja,__spread:function(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(Ja(arguments[e]));return n},__spreadArrays:function(){for(var n=0,e=0,r=arguments.length;e<r;e++)n+=arguments[e].length;var s=Array(n),u=0;for(e=0;e<r;e++)for(var g=arguments[e],S=0,I=g.length;S<I;S++,u++)s[u]=g[S];return s},__await:Yo,__asyncGenerator:function(n,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,u=r.apply(n,e||[]),g=[];return s={},S("next"),S("throw"),S("return"),s[Symbol.asyncIterator]=function(){return this},s;function S(te){u[te]&&(s[te]=function(Ne){return new Promise(function(se,Ce){g.push([te,Ne,se,Ce])>1||I(te,Ne)})})}function I(te,Ne){try{!function(te){te.value instanceof Yo?Promise.resolve(te.value.v).then(A,G):he(g[0][2],te)}(u[te](Ne))}catch(se){he(g[0][3],se)}}function A(te){I("next",te)}function G(te){I("throw",te)}function he(te,Ne){te(Ne),g.shift(),g.length&&I(g[0][0],g[0][1])}},__asyncDelegator:function(n){var e,r;return e={},s("next"),s("throw",function(u){throw u}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(u,g){e[u]=n[u]?function(S){return(r=!r)?{value:Yo(n[u](S)),done:"return"===u}:g?g(S):S}:g}},__asyncValues:function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=n[Symbol.asyncIterator];return r?r.call(n):(n=Ko(n),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(g){e[g]=n[g]&&function(S){return new Promise(function(I,F){!function(g,S,I,F){Promise.resolve(F).then(function(A){g({value:A,done:I})},S)}(I,F,(S=n[g](S)).done,S.value)})}}},__makeTemplateObject:function(n,e){return Object.defineProperty?Object.defineProperty(n,"raw",{value:e}):n.raw=e,n},__importStar:function(n){if(n&&n.__esModule)return n;var e={};if(null!=n)for(var r in n)Object.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e.default=n,e},__importDefault:function(n){return n&&n.__esModule?n:{default:n}},__classPrivateFieldGet:function(n,e){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return e.get(n)},__classPrivateFieldSet:function(n,e,r){if(!e.has(n))throw new TypeError("attempted to set private field on non-instance");return e.set(n,r),r}})),ho={},Gt={},fs=function(n,e){return(fs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var u in s)s.hasOwnProperty(u)&&(r[u]=s[u])})(n,e)};var Hs=function(){return Hs=Object.assign||function(n){for(var e,r=1,s=arguments.length;r<s;r++)for(var u in e=arguments[r])Object.prototype.hasOwnProperty.call(e,u)&&(n[u]=e[u]);return n},Hs.apply(this,arguments)};function Vu(n){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&n[e],s=0;if(r)return r.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function tu(n,e){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var s,u,g=r.call(n),S=[];try{for(;(void 0===e||e-- >0)&&!(s=g.next()).done;)S.push(s.value)}catch(I){u={error:I}}finally{try{s&&!s.done&&(r=g.return)&&r.call(g)}finally{if(u)throw u.error}}return S}function Qo(n){return this instanceof Qo?(this.v=n,this):new Qo(n)}var ye,He=v(Object.freeze({__proto__:null,__extends:function(n,e){function r(){this.constructor=n}fs(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},get __assign(){return Hs},__rest:function(n,e){var r={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(r[s]=n[s]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(s=Object.getOwnPropertySymbols(n);u<s.length;u++)e.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(n,s[u])&&(r[s[u]]=n[s[u]])}return r},__decorate:function(n,e,r,s){var u,g=arguments.length,S=g<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)S=Reflect.decorate(n,e,r,s);else for(var I=n.length-1;I>=0;I--)(u=n[I])&&(S=(g<3?u(S):g>3?u(e,r,S):u(e,r))||S);return g>3&&S&&Object.defineProperty(e,r,S),S},__param:function(n,e){return function(r,s){e(r,s,n)}},__metadata:function(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)},__awaiter:function(n,e,r,s){return new(r||(r=Promise))(function(g,S){function I(G){try{A(s.next(G))}catch(he){S(he)}}function F(G){try{A(s.throw(G))}catch(he){S(he)}}function A(G){G.done?g(G.value):function(g){return g instanceof r?g:new r(function(S){S(g)})}(G.value).then(I,F)}A((s=s.apply(n,e||[])).next())})},__generator:function(n,e){var r,s,u,g,S={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return g={next:I(0),throw:I(1),return:I(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function I(A){return function(G){return function(A){if(r)throw new TypeError("Generator is already executing.");for(;S;)try{if(r=1,s&&(u=2&A[0]?s.return:A[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,A[1])).done)return u;switch(s=0,u&&(A=[2&A[0],u.value]),A[0]){case 0:case 1:u=A;break;case 4:return S.label++,{value:A[1],done:!1};case 5:S.label++,s=A[1],A=[0];continue;case 7:A=S.ops.pop(),S.trys.pop();continue;default:if(!(u=(u=S.trys).length>0&&u[u.length-1])&&(6===A[0]||2===A[0])){S=0;continue}if(3===A[0]&&(!u||A[1]>u[0]&&A[1]<u[3])){S.label=A[1];break}if(6===A[0]&&S.label<u[1]){S.label=u[1],u=A;break}if(u&&S.label<u[2]){S.label=u[2],S.ops.push(A);break}u[2]&&S.ops.pop(),S.trys.pop();continue}A=e.call(n,S)}catch(G){A=[6,G],s=0}finally{r=u=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([A,G])}}},__createBinding:function(n,e,r,s){void 0===s&&(s=r),n[s]=e[r]},__exportStar:function(n,e){for(var r in n)"default"!==r&&!e.hasOwnProperty(r)&&(e[r]=n[r])},__values:Vu,__read:tu,__spread:function(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(tu(arguments[e]));return n},__spreadArrays:function(){for(var n=0,e=0,r=arguments.length;e<r;e++)n+=arguments[e].length;var s=Array(n),u=0;for(e=0;e<r;e++)for(var g=arguments[e],S=0,I=g.length;S<I;S++,u++)s[u]=g[S];return s},__await:Qo,__asyncGenerator:function(n,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,u=r.apply(n,e||[]),g=[];return s={},S("next"),S("throw"),S("return"),s[Symbol.asyncIterator]=function(){return this},s;function S(te){u[te]&&(s[te]=function(Ne){return new Promise(function(se,Ce){g.push([te,Ne,se,Ce])>1||I(te,Ne)})})}function I(te,Ne){try{!function(te){te.value instanceof Qo?Promise.resolve(te.value.v).then(A,G):he(g[0][2],te)}(u[te](Ne))}catch(se){he(g[0][3],se)}}function A(te){I("next",te)}function G(te){I("throw",te)}function he(te,Ne){te(Ne),g.shift(),g.length&&I(g[0][0],g[0][1])}},__asyncDelegator:function(n){var e,r;return e={},s("next"),s("throw",function(u){throw u}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(u,g){e[u]=n[u]?function(S){return(r=!r)?{value:Qo(n[u](S)),done:"return"===u}:g?g(S):S}:g}},__asyncValues:function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=n[Symbol.asyncIterator];return r?r.call(n):(n=Vu(n),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(g){e[g]=n[g]&&function(S){return new Promise(function(I,F){!function(g,S,I,F){Promise.resolve(F).then(function(A){g({value:A,done:I})},S)}(I,F,(S=n[g](S)).done,S.value)})}}},__makeTemplateObject:function(n,e){return Object.defineProperty?Object.defineProperty(n,"raw",{value:e}):n.raw=e,n},__importStar:function(n){if(n&&n.__esModule)return n;var e={};if(null!=n)for(var r in n)Object.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e.default=n,e},__importDefault:function(n){return n&&n.__esModule?n:{default:n}},__classPrivateFieldGet:function(n,e){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return e.get(n)},__classPrivateFieldSet:function(n,e,r){if(!e.has(n))throw new TypeError("attempted to set private field on non-instance");return e.set(n,r),r}})),ct={},Ze={};var rn,un={},fn={},rt={};var nn,Zt,_n,qi,cr={};function Jr(){return Zt||(Zt=1,function(n){Object.defineProperty(n,"__esModule",{value:!0});const e=He;e.__exportStar((rn||(rn=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.ONE_THOUSAND=rt.ONE_HUNDRED=void 0,rt.ONE_HUNDRED=100,rt.ONE_THOUSAND=1e3),rt),n),e.__exportStar(function(){return nn||(nn=1,n=cr,Object.defineProperty(n,"__esModule",{value:!0}),n.ONE_YEAR=n.FOUR_WEEKS=n.THREE_WEEKS=n.TWO_WEEKS=n.ONE_WEEK=n.THIRTY_DAYS=n.SEVEN_DAYS=n.FIVE_DAYS=n.THREE_DAYS=n.ONE_DAY=n.TWENTY_FOUR_HOURS=n.TWELVE_HOURS=n.SIX_HOURS=n.THREE_HOURS=n.ONE_HOUR=n.SIXTY_MINUTES=n.THIRTY_MINUTES=n.TEN_MINUTES=n.FIVE_MINUTES=n.ONE_MINUTE=n.SIXTY_SECONDS=n.THIRTY_SECONDS=n.TEN_SECONDS=n.FIVE_SECONDS=n.ONE_SECOND=void 0,n.ONE_SECOND=1,n.FIVE_SECONDS=5,n.TEN_SECONDS=10,n.THIRTY_SECONDS=30,n.SIXTY_SECONDS=60,n.ONE_MINUTE=n.SIXTY_SECONDS,n.FIVE_MINUTES=5*n.ONE_MINUTE,n.TEN_MINUTES=10*n.ONE_MINUTE,n.THIRTY_MINUTES=30*n.ONE_MINUTE,n.SIXTY_MINUTES=60*n.ONE_MINUTE,n.ONE_HOUR=n.SIXTY_MINUTES,n.THREE_HOURS=3*n.ONE_HOUR,n.SIX_HOURS=6*n.ONE_HOUR,n.TWELVE_HOURS=12*n.ONE_HOUR,n.TWENTY_FOUR_HOURS=24*n.ONE_HOUR,n.ONE_DAY=n.TWENTY_FOUR_HOURS,n.THREE_DAYS=3*n.ONE_DAY,n.FIVE_DAYS=5*n.ONE_DAY,n.SEVEN_DAYS=7*n.ONE_DAY,n.THIRTY_DAYS=30*n.ONE_DAY,n.ONE_WEEK=n.SEVEN_DAYS,n.TWO_WEEKS=2*n.ONE_WEEK,n.THREE_WEEKS=3*n.ONE_WEEK,n.FOUR_WEEKS=4*n.ONE_WEEK,n.ONE_YEAR=365*n.ONE_DAY),cr;var n}(),n)}(fn)),fn}function mr(){return qi||(qi=1,function(n){Object.defineProperty(n,"__esModule",{value:!0});const e=He;e.__exportStar((ye||(ye=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.delay=void 0,Ze.delay=function(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}),Ze),n),e.__exportStar(function(){if(_n)return un;_n=1,Object.defineProperty(un,"__esModule",{value:!0}),un.fromMiliseconds=un.toMiliseconds=void 0;const n=Jr();return un.toMiliseconds=function(s){return s*n.ONE_THOUSAND},un.fromMiliseconds=function(s){return Math.floor(s/n.ONE_THOUSAND)},un}(),n)}(ct)),ct}var il,Jo={};var yi,$s,kd={},Xo={};function of(){return $s||($s=1,n=kd,Object.defineProperty(n,"__esModule",{value:!0}),He.__exportStar((yi||(yi=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.IWatch=void 0,Xo.IWatch=class{}),Xo),n)),kd;var n}!function(n){Object.defineProperty(n,"__esModule",{value:!0});const e=He;e.__exportStar(mr(),n),e.__exportStar(function(){if(il)return Jo;il=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const s=this.get(r);if(typeof s.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const u=Date.now()-s.started;this.timestamps.set(r,{started:s.started,elapsed:u})}get(r){const s=this.timestamps.get(r);if(typeof s>"u")throw new Error(`No timestamp found for label: ${r}`);return s}elapsed(r){const s=this.get(r);return s.elapsed||Date.now()-s.started}}return Jo.Watch=n,Jo.default=n,Jo}(),n),e.__exportStar(of(),n),e.__exportStar(Jr(),n)}(Gt);var Ad={},wa={};class hs{}var Td,Zi,Md=v(Object.freeze({__proto__:null,IEvents:hs}));function Gu(){return Zi||(Zi=1,n=Ad,Object.defineProperty(n,"__esModule",{value:!0}),ur.__exportStar(function(){if(Td)return wa;Td=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.IHeartBeat=void 0;const n=Md;return wa.IHeartBeat=class extends n.IEvents{constructor(s){super()}},wa}(),n)),Ad;var n}var ru,sf,Yu,ag={},ps={};function cg(){return sf||(sf=1,n=ag,Object.defineProperty(n,"__esModule",{value:!0}),ur.__exportStar((ru||(ru=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.HEARTBEAT_EVENTS=ps.HEARTBEAT_INTERVAL=void 0,ps.HEARTBEAT_INTERVAL=Gt.FIVE_SECONDS,ps.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}),ps),n)),ag;var n}!function(n){Object.defineProperty(n,"__esModule",{value:!0});const e=ur;e.__exportStar(function(){if(Yu)return ho;Yu=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.HeartBeat=void 0;const n=ur,e=E.exports,r=Gt,s=Gu(),u=cg();class g extends s.IHeartBeat{constructor(I){super(I),this.events=new e.EventEmitter,this.interval=u.HEARTBEAT_INTERVAL,this.interval=I?.interval||u.HEARTBEAT_INTERVAL}static init(I){return n.__awaiter(this,void 0,void 0,function*(){const F=new g(I);return yield F.init(),F})}init(){return n.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(I,F){this.events.on(I,F)}once(I,F){this.events.once(I,F)}off(I,F){this.events.off(I,F)}removeListener(I,F){this.events.removeListener(I,F)}initialize(){return n.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),r.toMiliseconds(this.interval))})}pulse(){this.events.emit(u.HEARTBEAT_EVENTS.pulse)}}return ho.HeartBeat=g,ho}(),n),e.__exportStar(Gu(),n),e.__exportStar(cg(),n)}(lo);var qn={},lg=function(n,e){return(lg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var u in s)s.hasOwnProperty(u)&&(r[u]=s[u])})(n,e)};var af=function(){return af=Object.assign||function(n){for(var e,r=1,s=arguments.length;r<s;r++)for(var u in e=arguments[r])Object.prototype.hasOwnProperty.call(e,u)&&(n[u]=e[u]);return n},af.apply(this,arguments)};function jd(n){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&n[e],s=0;if(r)return r.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function dg(n,e){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var s,u,g=r.call(n),S=[];try{for(;(void 0===e||e-- >0)&&!(s=g.next()).done;)S.push(s.value)}catch(I){u={error:I}}finally{try{s&&!s.done&&(r=g.return)&&r.call(g)}finally{if(u)throw u.error}}return S}function ol(n){return this instanceof ol?(this.v=n,this):new ol(n)}var iu,vg,uf,Bd,cf=v(Object.freeze({__proto__:null,__extends:function(n,e){function r(){this.constructor=n}lg(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},get __assign(){return af},__rest:function(n,e){var r={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(r[s]=n[s]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(s=Object.getOwnPropertySymbols(n);u<s.length;u++)e.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(n,s[u])&&(r[s[u]]=n[s[u]])}return r},__decorate:function(n,e,r,s){var u,g=arguments.length,S=g<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)S=Reflect.decorate(n,e,r,s);else for(var I=n.length-1;I>=0;I--)(u=n[I])&&(S=(g<3?u(S):g>3?u(e,r,S):u(e,r))||S);return g>3&&S&&Object.defineProperty(e,r,S),S},__param:function(n,e){return function(r,s){e(r,s,n)}},__metadata:function(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)},__awaiter:function(n,e,r,s){return new(r||(r=Promise))(function(g,S){function I(G){try{A(s.next(G))}catch(he){S(he)}}function F(G){try{A(s.throw(G))}catch(he){S(he)}}function A(G){G.done?g(G.value):function(g){return g instanceof r?g:new r(function(S){S(g)})}(G.value).then(I,F)}A((s=s.apply(n,e||[])).next())})},__generator:function(n,e){var r,s,u,g,S={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return g={next:I(0),throw:I(1),return:I(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function I(A){return function(G){return function(A){if(r)throw new TypeError("Generator is already executing.");for(;S;)try{if(r=1,s&&(u=2&A[0]?s.return:A[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,A[1])).done)return u;switch(s=0,u&&(A=[2&A[0],u.value]),A[0]){case 0:case 1:u=A;break;case 4:return S.label++,{value:A[1],done:!1};case 5:S.label++,s=A[1],A=[0];continue;case 7:A=S.ops.pop(),S.trys.pop();continue;default:if(!(u=(u=S.trys).length>0&&u[u.length-1])&&(6===A[0]||2===A[0])){S=0;continue}if(3===A[0]&&(!u||A[1]>u[0]&&A[1]<u[3])){S.label=A[1];break}if(6===A[0]&&S.label<u[1]){S.label=u[1],u=A;break}if(u&&S.label<u[2]){S.label=u[2],S.ops.push(A);break}u[2]&&S.ops.pop(),S.trys.pop();continue}A=e.call(n,S)}catch(G){A=[6,G],s=0}finally{r=u=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([A,G])}}},__createBinding:function(n,e,r,s){void 0===s&&(s=r),n[s]=e[r]},__exportStar:function(n,e){for(var r in n)"default"!==r&&!e.hasOwnProperty(r)&&(e[r]=n[r])},__values:jd,__read:dg,__spread:function(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(dg(arguments[e]));return n},__spreadArrays:function(){for(var n=0,e=0,r=arguments.length;e<r;e++)n+=arguments[e].length;var s=Array(n),u=0;for(e=0;e<r;e++)for(var g=arguments[e],S=0,I=g.length;S<I;S++,u++)s[u]=g[S];return s},__await:ol,__asyncGenerator:function(n,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,u=r.apply(n,e||[]),g=[];return s={},S("next"),S("throw"),S("return"),s[Symbol.asyncIterator]=function(){return this},s;function S(te){u[te]&&(s[te]=function(Ne){return new Promise(function(se,Ce){g.push([te,Ne,se,Ce])>1||I(te,Ne)})})}function I(te,Ne){try{!function(te){te.value instanceof ol?Promise.resolve(te.value.v).then(A,G):he(g[0][2],te)}(u[te](Ne))}catch(se){he(g[0][3],se)}}function A(te){I("next",te)}function G(te){I("throw",te)}function he(te,Ne){te(Ne),g.shift(),g.length&&I(g[0][0],g[0][1])}},__asyncDelegator:function(n){var e,r;return e={},s("next"),s("throw",function(u){throw u}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(u,g){e[u]=n[u]?function(S){return(r=!r)?{value:ol(n[u](S)),done:"return"===u}:g?g(S):S}:g}},__asyncValues:function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=n[Symbol.asyncIterator];return r?r.call(n):(n=jd(n),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(g){e[g]=n[g]&&function(S){return new Promise(function(I,F){!function(g,S,I,F){Promise.resolve(F).then(function(A){g({value:A,done:I})},S)}(I,F,(S=n[g](S)).done,S.value)})}}},__makeTemplateObject:function(n,e){return Object.defineProperty?Object.defineProperty(n,"raw",{value:e}):n.raw=e,n},__importStar:function(n){if(n&&n.__esModule)return n;var e={};if(null!=n)for(var r in n)Object.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e.default=n,e},__importDefault:function(n){return n&&n.__esModule?n:{default:n}},__classPrivateFieldGet:function(n,e){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return e.get(n)},__classPrivateFieldSet:function(n,e,r){if(!e.has(n))throw new TypeError("attempted to set private field on non-instance");return e.set(n,r),r}}));function Gy(){if(Bd)return uf;Bd=1;const n=function(){if(vg)return iu;function n(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}return vg=1,iu=function(r,s,u){var g=u&&u.stringify||n;if("object"==typeof r&&null!==r){var I=s.length+1;if(1===I)return r;var F=new Array(I);F[0]=g(r);for(var A=1;A<I;A++)F[A]=g(s[A]);return F.join(" ")}if("string"!=typeof r)return r;var G=s.length;if(0===G)return r;for(var he="",te=0,Ne=-1,se=r&&r.length||0,Ce=0;Ce<se;){if(37===r.charCodeAt(Ce)&&Ce+1<se){switch(Ne=Ne>-1?Ne:0,r.charCodeAt(Ce+1)){case 100:case 102:if(te>=G||null==s[te])break;Ne<Ce&&(he+=r.slice(Ne,Ce)),he+=Number(s[te]),Ne=Ce+2,Ce++;break;case 105:if(te>=G||null==s[te])break;Ne<Ce&&(he+=r.slice(Ne,Ce)),he+=Math.floor(Number(s[te])),Ne=Ce+2,Ce++;break;case 79:case 111:case 106:if(te>=G||void 0===s[te])break;Ne<Ce&&(he+=r.slice(Ne,Ce));var lt=typeof s[te];if("string"===lt){he+="'"+s[te]+"'",Ne=Ce+2,Ce++;break}if("function"===lt){he+=s[te].name||"<anonymous>",Ne=Ce+2,Ce++;break}he+=g(s[te]),Ne=Ce+2,Ce++;break;case 115:if(te>=G)break;Ne<Ce&&(he+=r.slice(Ne,Ce)),he+=String(s[te]),Ne=Ce+2,Ce++;break;case 37:Ne<Ce&&(he+=r.slice(Ne,Ce)),he+="%",Ne=Ce+2,Ce++,te--}++te}++Ce}return-1===Ne?r:(Ne<se&&(he+=r.slice(Ne)),he)}}();uf=u;const e=function(){function ae(k){return typeof k<"u"&&k}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return ae(self)||ae(window)||ae(this)||{}}}().console||{},r={mapHttpRequest:se,mapHttpResponse:se,wrapRequestSerializer:Ce,wrapResponseSerializer:Ce,wrapErrorSerializer:Ce,req:se,res:se,err:function(ae){const k={type:ae.constructor.name,msg:ae.message,stack:ae.stack};for(const fe in ae)void 0===k[fe]&&(k[fe]=ae[fe]);return k}};function u(ae){(ae=ae||{}).browser=ae.browser||{};const k=ae.browser.transmit;if(k&&"function"!=typeof k.send)throw Error("pino: transmit option must have a send function");const fe=ae.browser.write||e;ae.browser.write&&(ae.browser.asObject=!0);const vt=ae.serializers||{},dt=function(ae,k){return Array.isArray(ae)?ae.filter(function(fe){return"!stdSerializers.err"!==fe}):!0===ae&&Object.keys(k)}(ae.browser.serialize,vt);let Pt=ae.browser.serialize;Array.isArray(ae.browser.serialize)&&ae.browser.serialize.indexOf("!stdSerializers.err")>-1&&(Pt=!1);"function"==typeof fe&&(fe.error=fe.fatal=fe.warn=fe.info=fe.debug=fe.trace=fe),!1===ae.enabled&&(ae.level="silent");const Jt=ae.level||"info",Ae=Object.create(fe);Ae.log||(Ae.log=lt),Object.defineProperty(Ae,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(Ae,"level",{get:function(){return this._level},set:function(on){if("silent"!==on&&!this.levels.values[on])throw Error("unknown level "+on);this._level=on,g(it,Ae,"error","log"),g(it,Ae,"fatal","error"),g(it,Ae,"warn","error"),g(it,Ae,"info","log"),g(it,Ae,"debug","log"),g(it,Ae,"trace","log")}});const it={transmit:k,serialize:dt,asObject:ae.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:Ne(ae)};return Ae.levels=u.levels,Ae.level=Jt,Ae.setMaxListeners=Ae.getMaxListeners=Ae.emit=Ae.addListener=Ae.on=Ae.prependListener=Ae.once=Ae.prependOnceListener=Ae.removeListener=Ae.removeAllListeners=Ae.listeners=Ae.listenerCount=Ae.eventNames=Ae.write=Ae.flush=lt,Ae.serializers=vt,Ae._serialize=dt,Ae._stdErrSerialize=Pt,Ae.child=function(on,On){if(!on)throw new Error("missing bindings for child Pino");On=On||{},dt&&on.serializers&&(On.serializers=on.serializers);const cn=On.serializers;if(dt&&cn){var zt=Object.assign({},vt,cn),Wt=!0===ae.browser.serialize?Object.keys(zt):dt;delete on.serializers,F([on],Wt,zt,this._stdErrSerialize)}function Nn(Je){this._childLevel=1+(0|Je._childLevel),this.error=A(Je,on,"error"),this.fatal=A(Je,on,"fatal"),this.warn=A(Je,on,"warn"),this.info=A(Je,on,"info"),this.debug=A(Je,on,"debug"),this.trace=A(Je,on,"trace"),zt&&(this.serializers=zt,this._serialize=Wt),k&&(this._logEvent=he([].concat(Je._logEvent.bindings,on)))}return Nn.prototype=this,new Nn(this)},k&&(Ae._logEvent=he()),Ae}function g(ae,k,fe,vt){const dt=Object.getPrototypeOf(k);k[fe]=k.levelVal>k.levels.values[fe]?lt:dt[fe]?dt[fe]:e[fe]||e[vt]||lt,function(ae,k,fe){var vt;!ae.transmit&&k[fe]===lt||(k[fe]=(vt=k[fe],function(){const dt=ae.timestamp(),Pt=new Array(arguments.length),Yt=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var Jt=0;Jt<Pt.length;Jt++)Pt[Jt]=arguments[Jt];if(ae.serialize&&!ae.asObject&&F(Pt,this._serialize,this.serializers,this._stdErrSerialize),ae.asObject?vt.call(Yt,I(this,fe,Pt,dt)):vt.apply(Yt,Pt),ae.transmit){const Ae=ae.transmit.level||k.level,Rt=u.levels.values[fe];if(Rt<u.levels.values[Ae])return;G(this,{ts:dt,methodLevel:fe,methodValue:Rt,transmitLevel:Ae,transmitValue:u.levels.values[ae.transmit.level||k.level],send:ae.transmit.send,val:k.levelVal},Pt)}}))}(ae,k,fe)}function I(ae,k,fe,vt){ae._serialize&&F(fe,ae._serialize,ae.serializers,ae._stdErrSerialize);const dt=fe.slice();let Pt=dt[0];const Yt={};vt&&(Yt.time=vt),Yt.level=u.levels.values[k];let Jt=1+(0|ae._childLevel);if(Jt<1&&(Jt=1),null!==Pt&&"object"==typeof Pt){for(;Jt--&&"object"==typeof dt[0];)Object.assign(Yt,dt.shift());Pt=dt.length?n(dt.shift(),dt):void 0}else"string"==typeof Pt&&(Pt=n(dt.shift(),dt));return void 0!==Pt&&(Yt.msg=Pt),Yt}function F(ae,k,fe,vt){for(const dt in ae)if(vt&&ae[dt]instanceof Error)ae[dt]=u.stdSerializers.err(ae[dt]);else if("object"==typeof ae[dt]&&!Array.isArray(ae[dt]))for(const Pt in ae[dt])k&&k.indexOf(Pt)>-1&&Pt in fe&&(ae[dt][Pt]=fe[Pt](ae[dt][Pt]))}function A(ae,k,fe){return function(){const vt=new Array(1+arguments.length);vt[0]=k;for(var dt=1;dt<vt.length;dt++)vt[dt]=arguments[dt-1];return ae[fe].apply(this,vt)}}function G(ae,k,fe){const vt=k.send,dt=k.ts,Pt=k.methodLevel,Yt=k.methodValue,Jt=k.val,Ae=ae._logEvent.bindings;F(fe,ae._serialize||Object.keys(ae.serializers),ae.serializers,void 0===ae._stdErrSerialize||ae._stdErrSerialize),ae._logEvent.ts=dt,ae._logEvent.messages=fe.filter(function(it){return-1===Ae.indexOf(it)}),ae._logEvent.level.label=Pt,ae._logEvent.level.value=Yt,vt(Pt,ae._logEvent,Jt),ae._logEvent=he(Ae)}function he(ae){return{ts:0,messages:[],bindings:ae||[],level:{label:"",value:0}}}function Ne(ae){return"function"==typeof ae.timestamp?ae.timestamp:!1===ae.timestamp?Ot:Te}function se(){return{}}function Ce(ae){return ae}function lt(){}function Ot(){return!1}function Te(){return Date.now()}return u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=r,u.stdTimeFunctions=Object.assign({},{nullTime:Ot,epochTime:Te,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),uf}var ul,Qu={};function Fd(){return ul||(ul=1,Object.defineProperty(Qu,"__esModule",{value:!0}),Qu.PINO_CUSTOM_CONTEXT_KEY=Qu.PINO_LOGGER_DEFAULTS=void 0,Qu.PINO_LOGGER_DEFAULTS={level:"info"},Qu.PINO_CUSTOM_CONTEXT_KEY="custom_context"),Qu}var lf,Ii={};!function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.pino=void 0;const e=cf,r=e.__importDefault(Gy());Object.defineProperty(n,"pino",{enumerable:!0,get:function(){return r.default}}),e.__exportStar(Fd(),n),e.__exportStar(function(){if(lf)return Ii;lf=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.generateChildLogger=Ii.formatChildLoggerContext=Ii.getLoggerContext=Ii.setBrowserLoggerContext=Ii.getBrowserLoggerContext=Ii.getDefaultLoggerOptions=void 0;const n=Fd();function r(I,F=n.PINO_CUSTOM_CONTEXT_KEY){return I[F]||""}function s(I,F,A=n.PINO_CUSTOM_CONTEXT_KEY){return I[A]=F,I}function u(I,F=n.PINO_CUSTOM_CONTEXT_KEY){let A="";return A=typeof I.bindings>"u"?r(I,F):I.bindings().context||"",A}function g(I,F,A=n.PINO_CUSTOM_CONTEXT_KEY){const G=u(I,A);return G.trim()?`${G}/${F}`:F}return Ii.getDefaultLoggerOptions=function(I){return Object.assign(Object.assign({},I),{level:I?.level||n.PINO_LOGGER_DEFAULTS.level})},Ii.getBrowserLoggerContext=r,Ii.setBrowserLoggerContext=s,Ii.getLoggerContext=u,Ii.formatChildLoggerContext=g,Ii.generateChildLogger=function(I,F,A=n.PINO_CUSTOM_CONTEXT_KEY){const G=g(I,F,A);return s(I.child({context:G}),G,A)},Ii}(),n)}(qn);class bg extends hs{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class wg extends hs{constructor(e,r){super(),this.core=e,this.logger=r,this.records=new Map}}class Qy extends hs{constructor(e,r){super(),this.relayer=e,this.logger=r}}class Jy extends hs{constructor(e){super()}}class Zo extends hs{constructor(e,r){super(),this.relayer=e,this.logger=r}}class cl extends hs{constructor(e,r){super(),this.core=e,this.logger=r}}var ll={},Ju={},ff={},Vs={};Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.BrowserRandomSource=void 0;Vs.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(e);for(let s=0;s<r.length;s+=65536)this._crypto.getRandomValues(r.subarray(s,s+Math.min(r.length-s,65536)));return r}};var dl={},Mi={};Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.wipe=function(n){for(var e=0;e<n.length;e++)n[e]=0;return n};var Rg=v(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(dl,"__esModule",{value:!0}),dl.NodeRandomSource=void 0;const hf=Mi;dl.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=Rg;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(e);if(r.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const s=new Uint8Array(e);for(let u=0;u<s.length;u++)s[u]=r[u];return(0,hf.wipe)(r),s}},Object.defineProperty(ff,"__esModule",{value:!0}),ff.SystemRandomSource=void 0;const Cg=Vs,Pg=dl;ff.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new Cg.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new Pg.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}};var n,Sn={},$d={};n=$d,Object.defineProperty(n,"__esModule",{value:!0}),n.mul=Math.imul||function(I,F){var A=65535&I,G=65535&F;return A*G+((I>>>16&65535)*G+A*(F>>>16&65535)<<16>>>0)|0},n.add=function(I,F){return I+F|0},n.sub=function(I,F){return I-F|0},n.rotl=function(I,F){return I<<F|I>>>32-F},n.rotr=function(I,F){return I<<32-F|I>>>F},n.isInteger=Number.isInteger||function(I){return"number"==typeof I&&isFinite(I)&&Math.floor(I)===I},n.MAX_SAFE_INTEGER=9007199254740991,n.isSafeInteger=function(I){return n.isInteger(I)&&I>=-n.MAX_SAFE_INTEGER&&I<=n.MAX_SAFE_INTEGER},Object.defineProperty(Sn,"__esModule",{value:!0});var Ws=$d;function Kd(n,e,r){return void 0===e&&(e=new Uint8Array(2)),void 0===r&&(r=0),e[r+0]=n>>>8,e[r+1]=n>>>0,e}function Gd(n,e,r){return void 0===e&&(e=new Uint8Array(2)),void 0===r&&(r=0),e[r+0]=n>>>0,e[r+1]=n>>>8,e}function Sr(n,e){return void 0===e&&(e=0),n[e]<<24|n[e+1]<<16|n[e+2]<<8|n[e+3]}function pl(n,e){return void 0===e&&(e=0),(n[e]<<24|n[e+1]<<16|n[e+2]<<8|n[e+3])>>>0}function Zu(n,e){return void 0===e&&(e=0),n[e+3]<<24|n[e+2]<<16|n[e+1]<<8|n[e]}function ou(n,e){return void 0===e&&(e=0),(n[e+3]<<24|n[e+2]<<16|n[e+1]<<8|n[e])>>>0}function gl(n,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),e[r+0]=n>>>24,e[r+1]=n>>>16,e[r+2]=n>>>8,e[r+3]=n>>>0,e}function ec(n,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),e[r+0]=n>>>0,e[r+1]=n>>>8,e[r+2]=n>>>16,e[r+3]=n>>>24,e}function Ag(n,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),gl(n/4294967296>>>0,e,r),gl(n>>>0,e,r+4),e}function Tg(n,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),ec(n>>>0,e,r),ec(n/4294967296>>>0,e,r+4),e}Sn.readInt16BE=function(n,e){return void 0===e&&(e=0),(n[e+0]<<8|n[e+1])<<16>>16},Sn.readUint16BE=function(n,e){return void 0===e&&(e=0),(n[e+0]<<8|n[e+1])>>>0},Sn.readInt16LE=function(n,e){return void 0===e&&(e=0),(n[e+1]<<8|n[e])<<16>>16},Sn.readUint16LE=function(n,e){return void 0===e&&(e=0),(n[e+1]<<8|n[e])>>>0},Sn.writeUint16BE=Kd,Sn.writeInt16BE=Kd,Sn.writeUint16LE=Gd,Sn.writeInt16LE=Gd,Sn.readInt32BE=Sr,Sn.readUint32BE=pl,Sn.readInt32LE=Zu,Sn.readUint32LE=ou,Sn.writeUint32BE=gl,Sn.writeInt32BE=gl,Sn.writeUint32LE=ec,Sn.writeInt32LE=ec,Sn.readInt64BE=function(n,e){void 0===e&&(e=0);var r=Sr(n,e),s=Sr(n,e+4);return 4294967296*r+s-4294967296*(s>>31)},Sn.readUint64BE=function(n,e){return void 0===e&&(e=0),4294967296*pl(n,e)+pl(n,e+4)},Sn.readInt64LE=function(n,e){void 0===e&&(e=0);var r=Zu(n,e);return 4294967296*Zu(n,e+4)+r-4294967296*(r>>31)},Sn.readUint64LE=function(n,e){void 0===e&&(e=0);var r=ou(n,e);return 4294967296*ou(n,e+4)+r},Sn.writeUint64BE=Ag,Sn.writeInt64BE=Ag,Sn.writeUint64LE=Tg,Sn.writeInt64LE=Tg,Sn.readUintBE=function(n,e,r){if(void 0===r&&(r=0),n%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(n/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var s=0,u=1,g=n/8+r-1;g>=r;g--)s+=e[g]*u,u*=256;return s},Sn.readUintLE=function(n,e,r){if(void 0===r&&(r=0),n%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(n/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var s=0,u=1,g=r;g<r+n/8;g++)s+=e[g]*u,u*=256;return s},Sn.writeUintBE=function(n,e,r,s){if(void 0===r&&(r=new Uint8Array(n/8)),void 0===s&&(s=0),n%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!Ws.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var u=1,g=n/8+s-1;g>=s;g--)r[g]=e/u&255,u*=256;return r},Sn.writeUintLE=function(n,e,r,s){if(void 0===r&&(r=new Uint8Array(n/8)),void 0===s&&(s=0),n%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Ws.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var u=1,g=s;g<s+n/8;g++)r[g]=e/u&255,u*=256;return r},Sn.readFloat32BE=function(n,e){return void 0===e&&(e=0),new DataView(n.buffer,n.byteOffset,n.byteLength).getFloat32(e)},Sn.readFloat32LE=function(n,e){return void 0===e&&(e=0),new DataView(n.buffer,n.byteOffset,n.byteLength).getFloat32(e,!0)},Sn.readFloat64BE=function(n,e){return void 0===e&&(e=0),new DataView(n.buffer,n.byteOffset,n.byteLength).getFloat64(e)},Sn.readFloat64LE=function(n,e){return void 0===e&&(e=0),new DataView(n.buffer,n.byteOffset,n.byteLength).getFloat64(e,!0)},Sn.writeFloat32BE=function(n,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat32(r,n),e},Sn.writeFloat32LE=function(n,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat32(r,n,!0),e},Sn.writeFloat64BE=function(n,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat64(r,n),e},Sn.writeFloat64LE=function(n,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat64(r,n,!0),e},function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.randomStringForEntropy=n.randomString=n.randomUint32=n.randomBytes=n.defaultRandomSource=void 0;const r=Sn,s=Mi;function u(A,G=n.defaultRandomSource){return G.randomBytes(A)}n.defaultRandomSource=new ff.SystemRandomSource,n.randomBytes=u,n.randomUint32=function(A=n.defaultRandomSource){const G=u(4,A),he=(0,r.readUint32LE)(G);return(0,s.wipe)(G),he};const S="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function I(A,G=S,he=n.defaultRandomSource){if(G.length<2)throw new Error("randomString charset is too short");if(G.length>256)throw new Error("randomString charset is too long");let te="";const Ne=G.length,se=256-256%Ne;for(;A>0;){const Ce=u(Math.ceil(256*A/se),he);for(let lt=0;lt<Ce.length&&A>0;lt++){const Ot=Ce[lt];Ot<se&&(te+=G.charAt(Ot%Ne),A--)}(0,s.wipe)(Ce)}return te}n.randomString=I,n.randomStringForEntropy=function(A,G=S,he=n.defaultRandomSource){return I(Math.ceil(A/(Math.log(G.length)/Math.LN2)),G,he)}}(Ju);var Ks={};(function(n){Object.defineProperty(n,"__esModule",{value:!0});var e=Sn,r=Mi;n.DIGEST_LENGTH=64,n.BLOCK_SIZE=128;var s=function(){function I(){this.digestLength=n.DIGEST_LENGTH,this.blockSize=n.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return I.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},I.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},I.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},I.prototype.update=function(F,A){if(void 0===A&&(A=F.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var G=0;if(this._bytesHashed+=A,this._bufferLength>0){for(;this._bufferLength<n.BLOCK_SIZE&&A>0;)this._buffer[this._bufferLength++]=F[G++],A--;this._bufferLength===this.blockSize&&(g(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(A>=this.blockSize&&(G=g(this._tempHi,this._tempLo,this._stateHi,this._stateLo,F,G,A),A%=this.blockSize);A>0;)this._buffer[this._bufferLength++]=F[G++],A--;return this},I.prototype.finish=function(F){if(!this._finished){var A=this._bytesHashed,G=this._bufferLength,he=A/536870912|0,te=A<<3,Ne=A%128<112?128:256;this._buffer[G]=128;for(var se=G+1;se<Ne-8;se++)this._buffer[se]=0;e.writeUint32BE(he,this._buffer,Ne-8),e.writeUint32BE(te,this._buffer,Ne-4),g(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,Ne),this._finished=!0}for(se=0;se<this.digestLength/8;se++)e.writeUint32BE(this._stateHi[se],F,8*se),e.writeUint32BE(this._stateLo[se],F,8*se+4);return this},I.prototype.digest=function(){var F=new Uint8Array(this.digestLength);return this.finish(F),F},I.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},I.prototype.restoreState=function(F){return this._stateHi.set(F.stateHi),this._stateLo.set(F.stateLo),this._bufferLength=F.bufferLength,F.buffer&&this._buffer.set(F.buffer),this._bytesHashed=F.bytesHashed,this._finished=!1,this},I.prototype.cleanSavedState=function(F){r.wipe(F.stateHi),r.wipe(F.stateLo),F.buffer&&r.wipe(F.buffer),F.bufferLength=0,F.bytesHashed=0},I}();n.SHA512=s;var u=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function g(I,F,A,G,he,te,Ne){for(var se,Ce,lt,Ot,Te,Ue,ge,be,ae=A[0],k=A[1],fe=A[2],vt=A[3],dt=A[4],Pt=A[5],Yt=A[6],Jt=A[7],Ae=G[0],it=G[1],Rt=G[2],Nt=G[3],Dt=G[4],Vt=G[5],on=G[6],On=G[7];Ne>=128;){for(var cn=0;cn<16;cn++){var zt=8*cn+te;I[cn]=e.readUint32BE(he,zt),F[cn]=e.readUint32BE(he,zt+4)}for(cn=0;cn<80;cn++){var Lt,Xn,Nn=k,Je=fe,Xe=vt,We=dt,j=Pt,De=Yt,sn=it,nr=Rt,mn=Nt,Jn=Dt,Gr=Vt,Ar=on;if(Te=65535&(Ce=On),Ue=Ce>>>16,ge=65535&(se=Jt),be=se>>>16,Te+=65535&(Ce=(Dt>>>14|dt<<18)^(Dt>>>18|dt<<14)^(dt>>>9|Dt<<23)),Ue+=Ce>>>16,ge+=65535&(se=(dt>>>14|Dt<<18)^(dt>>>18|Dt<<14)^(Dt>>>9|dt<<23)),be+=se>>>16,Te+=65535&(Ce=Dt&Vt^~Dt&on),Ue+=Ce>>>16,ge+=65535&(se=dt&Pt^~dt&Yt),be+=se>>>16,Te+=65535&(Ce=u[2*cn+1]),Ue+=Ce>>>16,ge+=65535&(se=u[2*cn]),be+=se>>>16,Ue+=(Ce=F[cn%16])>>>16,ge+=65535&(se=I[cn%16]),be+=se>>>16,ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16,Te=65535&(Ce=Ot=65535&Te|Ue<<16),Ue=Ce>>>16,ge=65535&(se=lt=65535&ge|(be+=ge>>>16)<<16),be=se>>>16,Te+=65535&(Ce=(Ae>>>28|ae<<4)^(ae>>>2|Ae<<30)^(ae>>>7|Ae<<25)),Ue+=Ce>>>16,ge+=65535&(se=(ae>>>28|Ae<<4)^(Ae>>>2|ae<<30)^(Ae>>>7|ae<<25)),be+=se>>>16,Ue+=(Ce=Ae&it^Ae&Rt^it&Rt)>>>16,ge+=65535&(se=ae&k^ae&fe^k&fe),be+=se>>>16,Lt=65535&(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)|(be+=ge>>>16)<<16,Xn=65535&Te|Ue<<16,Te=65535&(Ce=mn),Ue=Ce>>>16,ge=65535&(se=Xe),be=se>>>16,Ue+=(Ce=Ot)>>>16,ge+=65535&(se=lt),be+=se>>>16,k=ae,fe=Nn,vt=Je,dt=Xe=65535&(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)|(be+=ge>>>16)<<16,Pt=We,Yt=j,Jt=De,ae=Lt,it=Ae,Rt=sn,Nt=nr,Dt=mn=65535&Te|Ue<<16,Vt=Jn,on=Gr,On=Ar,Ae=Xn,cn%16==15)for(zt=0;zt<16;zt++)Te=65535&(Ce=F[zt]),Ue=Ce>>>16,ge=65535&(se=I[zt]),be=se>>>16,Te+=65535&(Ce=F[(zt+9)%16]),Ue+=Ce>>>16,ge+=65535&(se=I[(zt+9)%16]),be+=se>>>16,Te+=65535&(Ce=((Ot=F[(zt+1)%16])>>>1|(lt=I[(zt+1)%16])<<31)^(Ot>>>8|lt<<24)^(Ot>>>7|lt<<25)),Ue+=Ce>>>16,ge+=65535&(se=(lt>>>1|Ot<<31)^(lt>>>8|Ot<<24)^lt>>>7),be+=se>>>16,Ue+=(Ce=((Ot=F[(zt+14)%16])>>>19|(lt=I[(zt+14)%16])<<13)^(lt>>>29|Ot<<3)^(Ot>>>6|lt<<26))>>>16,ge+=65535&(se=(lt>>>19|Ot<<13)^(Ot>>>29|lt<<3)^lt>>>6),be+=se>>>16,be+=(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)>>>16,I[zt]=65535&ge|be<<16,F[zt]=65535&Te|Ue<<16}Te=65535&(Ce=Ae),Ue=Ce>>>16,ge=65535&(se=ae),be=se>>>16,Ue+=(Ce=G[0])>>>16,ge+=65535&(se=A[0]),be+=se>>>16,be+=(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)>>>16,A[0]=ae=65535&ge|be<<16,G[0]=Ae=65535&Te|Ue<<16,Te=65535&(Ce=it),Ue=Ce>>>16,ge=65535&(se=k),be=se>>>16,Ue+=(Ce=G[1])>>>16,ge+=65535&(se=A[1]),be+=se>>>16,be+=(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)>>>16,A[1]=k=65535&ge|be<<16,G[1]=it=65535&Te|Ue<<16,Te=65535&(Ce=Rt),Ue=Ce>>>16,ge=65535&(se=fe),be=se>>>16,Ue+=(Ce=G[2])>>>16,ge+=65535&(se=A[2]),be+=se>>>16,be+=(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)>>>16,A[2]=fe=65535&ge|be<<16,G[2]=Rt=65535&Te|Ue<<16,Te=65535&(Ce=Nt),Ue=Ce>>>16,ge=65535&(se=vt),be=se>>>16,Ue+=(Ce=G[3])>>>16,ge+=65535&(se=A[3]),be+=se>>>16,be+=(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)>>>16,A[3]=vt=65535&ge|be<<16,G[3]=Nt=65535&Te|Ue<<16,Te=65535&(Ce=Dt),Ue=Ce>>>16,ge=65535&(se=dt),be=se>>>16,Ue+=(Ce=G[4])>>>16,ge+=65535&(se=A[4]),be+=se>>>16,be+=(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)>>>16,A[4]=dt=65535&ge|be<<16,G[4]=Dt=65535&Te|Ue<<16,Te=65535&(Ce=Vt),Ue=Ce>>>16,ge=65535&(se=Pt),be=se>>>16,Ue+=(Ce=G[5])>>>16,ge+=65535&(se=A[5]),be+=se>>>16,be+=(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)>>>16,A[5]=Pt=65535&ge|be<<16,G[5]=Vt=65535&Te|Ue<<16,Te=65535&(Ce=on),Ue=Ce>>>16,ge=65535&(se=Yt),be=se>>>16,Ue+=(Ce=G[6])>>>16,ge+=65535&(se=A[6]),be+=se>>>16,be+=(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)>>>16,A[6]=Yt=65535&ge|be<<16,G[6]=on=65535&Te|Ue<<16,Te=65535&(Ce=On),Ue=Ce>>>16,ge=65535&(se=Jt),be=se>>>16,Ue+=(Ce=G[7])>>>16,ge+=65535&(se=A[7]),be+=se>>>16,be+=(ge+=(Ue+=(Te+=65535&Ce)>>>16)>>>16)>>>16,A[7]=Jt=65535&ge|be<<16,G[7]=On=65535&Te|Ue<<16,te+=128,Ne-=128}return te}n.hash=function(I){var F=new s;F.update(I);var A=F.digest();return F.clean(),A}})(Ks),function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.convertSecretKeyToX25519=n.convertPublicKeyToX25519=n.verify=n.sign=n.extractPublicKeyFromSecretKey=n.generateKeyPair=n.generateKeyPairFromSeed=n.SEED_LENGTH=n.SECRET_KEY_LENGTH=n.PUBLIC_KEY_LENGTH=n.SIGNATURE_LENGTH=void 0;const e=Ju,r=Ks,s=Mi;function u(Je){const Xe=new Float64Array(16);if(Je)for(let We=0;We<Je.length;We++)Xe[We]=Je[We];return Xe}n.SIGNATURE_LENGTH=64,n.PUBLIC_KEY_LENGTH=32,n.SECRET_KEY_LENGTH=64,n.SEED_LENGTH=32,new Uint8Array(32)[0]=9;const g=u(),S=u([1]),I=u([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),F=u([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),A=u([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),G=u([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),he=u([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function te(Je,Xe){for(let We=0;We<16;We++)Je[We]=0|Xe[We]}function Ne(Je){let Xe=1;for(let We=0;We<16;We++){let j=Je[We]+Xe+65535;Xe=Math.floor(j/65536),Je[We]=j-65536*Xe}Je[0]+=Xe-1+37*(Xe-1)}function se(Je,Xe,We){const j=~(We-1);for(let De=0;De<16;De++){const Lt=j&(Je[De]^Xe[De]);Je[De]^=Lt,Xe[De]^=Lt}}function Ce(Je,Xe){const We=u(),j=u();for(let De=0;De<16;De++)j[De]=Xe[De];Ne(j),Ne(j),Ne(j);for(let De=0;De<2;De++){We[0]=j[0]-65517;for(let Ft=1;Ft<15;Ft++)We[Ft]=j[Ft]-65535-(We[Ft-1]>>16&1),We[Ft-1]&=65535;We[15]=j[15]-32767-(We[14]>>16&1);const Lt=We[15]>>16&1;We[14]&=65535,se(j,We,1-Lt)}for(let De=0;De<16;De++)Je[2*De]=255&j[De],Je[2*De+1]=j[De]>>8}function lt(Je,Xe){let We=0;for(let j=0;j<32;j++)We|=Je[j]^Xe[j];return(1&We-1>>>8)-1}function Ot(Je,Xe){const We=new Uint8Array(32),j=new Uint8Array(32);return Ce(We,Je),Ce(j,Xe),lt(We,j)}function Te(Je){const Xe=new Uint8Array(32);return Ce(Xe,Je),1&Xe[0]}function ge(Je,Xe,We){for(let j=0;j<16;j++)Je[j]=Xe[j]+We[j]}function be(Je,Xe,We){for(let j=0;j<16;j++)Je[j]=Xe[j]-We[j]}function ae(Je,Xe,We){let j,De,Lt=0,Ft=0,sn=0,nr=0,mn=0,Jn=0,Gr=0,Ar=0,Xn=0,Tn=0,Mn=0,Bn=0,In=0,Ln=0,wn=0,hn=0,Un=0,Fn=0,En=0,Wn=0,Gn=0,rr=0,ir=0,Zn=0,lr=0,xs=0,za=0,Eo=0,Ba=0,Uc=0,td=0,ti=We[0],Yr=We[1],ni=We[2],Xr=We[3],ri=We[4],Qr=We[5],Ei=We[6],ii=We[7],Si=We[8],oi=We[9],Oi=We[10],di=We[11],si=We[12],zr=We[13],xi=We[14],Ri=We[15];j=Xe[0],Lt+=j*ti,Ft+=j*Yr,sn+=j*ni,nr+=j*Xr,mn+=j*ri,Jn+=j*Qr,Gr+=j*Ei,Ar+=j*ii,Xn+=j*Si,Tn+=j*oi,Mn+=j*Oi,Bn+=j*di,In+=j*si,Ln+=j*zr,wn+=j*xi,hn+=j*Ri,j=Xe[1],Ft+=j*ti,sn+=j*Yr,nr+=j*ni,mn+=j*Xr,Jn+=j*ri,Gr+=j*Qr,Ar+=j*Ei,Xn+=j*ii,Tn+=j*Si,Mn+=j*oi,Bn+=j*Oi,In+=j*di,Ln+=j*si,wn+=j*zr,hn+=j*xi,Un+=j*Ri,j=Xe[2],sn+=j*ti,nr+=j*Yr,mn+=j*ni,Jn+=j*Xr,Gr+=j*ri,Ar+=j*Qr,Xn+=j*Ei,Tn+=j*ii,Mn+=j*Si,Bn+=j*oi,In+=j*Oi,Ln+=j*di,wn+=j*si,hn+=j*zr,Un+=j*xi,Fn+=j*Ri,j=Xe[3],nr+=j*ti,mn+=j*Yr,Jn+=j*ni,Gr+=j*Xr,Ar+=j*ri,Xn+=j*Qr,Tn+=j*Ei,Mn+=j*ii,Bn+=j*Si,In+=j*oi,Ln+=j*Oi,wn+=j*di,hn+=j*si,Un+=j*zr,Fn+=j*xi,En+=j*Ri,j=Xe[4],mn+=j*ti,Jn+=j*Yr,Gr+=j*ni,Ar+=j*Xr,Xn+=j*ri,Tn+=j*Qr,Mn+=j*Ei,Bn+=j*ii,In+=j*Si,Ln+=j*oi,wn+=j*Oi,hn+=j*di,Un+=j*si,Fn+=j*zr,En+=j*xi,Wn+=j*Ri,j=Xe[5],Jn+=j*ti,Gr+=j*Yr,Ar+=j*ni,Xn+=j*Xr,Tn+=j*ri,Mn+=j*Qr,Bn+=j*Ei,In+=j*ii,Ln+=j*Si,wn+=j*oi,hn+=j*Oi,Un+=j*di,Fn+=j*si,En+=j*zr,Wn+=j*xi,Gn+=j*Ri,j=Xe[6],Gr+=j*ti,Ar+=j*Yr,Xn+=j*ni,Tn+=j*Xr,Mn+=j*ri,Bn+=j*Qr,In+=j*Ei,Ln+=j*ii,wn+=j*Si,hn+=j*oi,Un+=j*Oi,Fn+=j*di,En+=j*si,Wn+=j*zr,Gn+=j*xi,rr+=j*Ri,j=Xe[7],Ar+=j*ti,Xn+=j*Yr,Tn+=j*ni,Mn+=j*Xr,Bn+=j*ri,In+=j*Qr,Ln+=j*Ei,wn+=j*ii,hn+=j*Si,Un+=j*oi,Fn+=j*Oi,En+=j*di,Wn+=j*si,Gn+=j*zr,rr+=j*xi,ir+=j*Ri,j=Xe[8],Xn+=j*ti,Tn+=j*Yr,Mn+=j*ni,Bn+=j*Xr,In+=j*ri,Ln+=j*Qr,wn+=j*Ei,hn+=j*ii,Un+=j*Si,Fn+=j*oi,En+=j*Oi,Wn+=j*di,Gn+=j*si,rr+=j*zr,ir+=j*xi,Zn+=j*Ri,j=Xe[9],Tn+=j*ti,Mn+=j*Yr,Bn+=j*ni,In+=j*Xr,Ln+=j*ri,wn+=j*Qr,hn+=j*Ei,Un+=j*ii,Fn+=j*Si,En+=j*oi,Wn+=j*Oi,Gn+=j*di,rr+=j*si,ir+=j*zr,Zn+=j*xi,lr+=j*Ri,j=Xe[10],Mn+=j*ti,Bn+=j*Yr,In+=j*ni,Ln+=j*Xr,wn+=j*ri,hn+=j*Qr,Un+=j*Ei,Fn+=j*ii,En+=j*Si,Wn+=j*oi,Gn+=j*Oi,rr+=j*di,ir+=j*si,Zn+=j*zr,lr+=j*xi,xs+=j*Ri,j=Xe[11],Bn+=j*ti,In+=j*Yr,Ln+=j*ni,wn+=j*Xr,hn+=j*ri,Un+=j*Qr,Fn+=j*Ei,En+=j*ii,Wn+=j*Si,Gn+=j*oi,rr+=j*Oi,ir+=j*di,Zn+=j*si,lr+=j*zr,xs+=j*xi,za+=j*Ri,j=Xe[12],In+=j*ti,Ln+=j*Yr,wn+=j*ni,hn+=j*Xr,Un+=j*ri,Fn+=j*Qr,En+=j*Ei,Wn+=j*ii,Gn+=j*Si,rr+=j*oi,ir+=j*Oi,Zn+=j*di,lr+=j*si,xs+=j*zr,za+=j*xi,Eo+=j*Ri,j=Xe[13],Ln+=j*ti,wn+=j*Yr,hn+=j*ni,Un+=j*Xr,Fn+=j*ri,En+=j*Qr,Wn+=j*Ei,Gn+=j*ii,rr+=j*Si,ir+=j*oi,Zn+=j*Oi,lr+=j*di,xs+=j*si,za+=j*zr,Eo+=j*xi,Ba+=j*Ri,j=Xe[14],wn+=j*ti,hn+=j*Yr,Un+=j*ni,Fn+=j*Xr,En+=j*ri,Wn+=j*Qr,Gn+=j*Ei,rr+=j*ii,ir+=j*Si,Zn+=j*oi,lr+=j*Oi,xs+=j*di,za+=j*si,Eo+=j*zr,Ba+=j*xi,Uc+=j*Ri,j=Xe[15],hn+=j*ti,Un+=j*Yr,Fn+=j*ni,En+=j*Xr,Wn+=j*ri,Gn+=j*Qr,rr+=j*Ei,ir+=j*ii,Zn+=j*Si,lr+=j*oi,xs+=j*Oi,za+=j*di,Eo+=j*si,Ba+=j*zr,Uc+=j*xi,td+=j*Ri,Lt+=38*Un,Ft+=38*Fn,sn+=38*En,nr+=38*Wn,mn+=38*Gn,Jn+=38*rr,Gr+=38*ir,Ar+=38*Zn,Xn+=38*lr,Tn+=38*xs,Mn+=38*za,Bn+=38*Eo,In+=38*Ba,Ln+=38*Uc,wn+=38*td,De=1,j=Lt+De+65535,De=Math.floor(j/65536),Lt=j-65536*De,j=Ft+De+65535,De=Math.floor(j/65536),Ft=j-65536*De,j=sn+De+65535,De=Math.floor(j/65536),sn=j-65536*De,j=nr+De+65535,De=Math.floor(j/65536),nr=j-65536*De,j=mn+De+65535,De=Math.floor(j/65536),mn=j-65536*De,j=Jn+De+65535,De=Math.floor(j/65536),Jn=j-65536*De,j=Gr+De+65535,De=Math.floor(j/65536),Gr=j-65536*De,j=Ar+De+65535,De=Math.floor(j/65536),Ar=j-65536*De,j=Xn+De+65535,De=Math.floor(j/65536),Xn=j-65536*De,j=Tn+De+65535,De=Math.floor(j/65536),Tn=j-65536*De,j=Mn+De+65535,De=Math.floor(j/65536),Mn=j-65536*De,j=Bn+De+65535,De=Math.floor(j/65536),Bn=j-65536*De,j=In+De+65535,De=Math.floor(j/65536),In=j-65536*De,j=Ln+De+65535,De=Math.floor(j/65536),Ln=j-65536*De,j=wn+De+65535,De=Math.floor(j/65536),wn=j-65536*De,j=hn+De+65535,De=Math.floor(j/65536),hn=j-65536*De,Lt+=De-1+37*(De-1),De=1,j=Lt+De+65535,De=Math.floor(j/65536),Lt=j-65536*De,j=Ft+De+65535,De=Math.floor(j/65536),Ft=j-65536*De,j=sn+De+65535,De=Math.floor(j/65536),sn=j-65536*De,j=nr+De+65535,De=Math.floor(j/65536),nr=j-65536*De,j=mn+De+65535,De=Math.floor(j/65536),mn=j-65536*De,j=Jn+De+65535,De=Math.floor(j/65536),Jn=j-65536*De,j=Gr+De+65535,De=Math.floor(j/65536),Gr=j-65536*De,j=Ar+De+65535,De=Math.floor(j/65536),Ar=j-65536*De,j=Xn+De+65535,De=Math.floor(j/65536),Xn=j-65536*De,j=Tn+De+65535,De=Math.floor(j/65536),Tn=j-65536*De,j=Mn+De+65535,De=Math.floor(j/65536),Mn=j-65536*De,j=Bn+De+65535,De=Math.floor(j/65536),Bn=j-65536*De,j=In+De+65535,De=Math.floor(j/65536),In=j-65536*De,j=Ln+De+65535,De=Math.floor(j/65536),Ln=j-65536*De,j=wn+De+65535,De=Math.floor(j/65536),wn=j-65536*De,j=hn+De+65535,De=Math.floor(j/65536),hn=j-65536*De,Lt+=De-1+37*(De-1),Je[0]=Lt,Je[1]=Ft,Je[2]=sn,Je[3]=nr,Je[4]=mn,Je[5]=Jn,Je[6]=Gr,Je[7]=Ar,Je[8]=Xn,Je[9]=Tn,Je[10]=Mn,Je[11]=Bn,Je[12]=In,Je[13]=Ln,Je[14]=wn,Je[15]=hn}function k(Je,Xe){ae(Je,Xe,Xe)}function fe(Je,Xe){const We=u();let j;for(j=0;j<16;j++)We[j]=Xe[j];for(j=253;j>=0;j--)k(We,We),2!==j&&4!==j&&ae(We,We,Xe);for(j=0;j<16;j++)Je[j]=We[j]}function dt(Je,Xe){const We=u(),j=u(),De=u(),Lt=u(),Ft=u(),sn=u(),nr=u(),mn=u(),Jn=u();be(We,Je[1],Je[0]),be(Jn,Xe[1],Xe[0]),ae(We,We,Jn),ge(j,Je[0],Je[1]),ge(Jn,Xe[0],Xe[1]),ae(j,j,Jn),ae(De,Je[3],Xe[3]),ae(De,De,F),ae(Lt,Je[2],Xe[2]),ge(Lt,Lt,Lt),be(Ft,j,We),be(sn,Lt,De),ge(nr,Lt,De),ge(mn,j,We),ae(Je[0],Ft,sn),ae(Je[1],mn,nr),ae(Je[2],nr,sn),ae(Je[3],Ft,mn)}function Pt(Je,Xe,We){for(let j=0;j<4;j++)se(Je[j],Xe[j],We)}function Yt(Je,Xe){const We=u(),j=u(),De=u();fe(De,Xe[2]),ae(We,Xe[0],De),ae(j,Xe[1],De),Ce(Je,j),Je[31]^=Te(We)<<7}function Jt(Je,Xe,We){te(Je[0],g),te(Je[1],S),te(Je[2],S),te(Je[3],g);for(let j=255;j>=0;--j){const De=We[j/8|0]>>(7&j)&1;Pt(Je,Xe,De),dt(Xe,Je),dt(Je,Je),Pt(Je,Xe,De)}}function Ae(Je,Xe){const We=[u(),u(),u(),u()];te(We[0],A),te(We[1],G),te(We[2],S),ae(We[3],A,G),Jt(Je,We,Xe)}function it(Je){if(Je.length!==n.SEED_LENGTH)throw new Error(`ed25519: seed must be ${n.SEED_LENGTH} bytes`);const Xe=(0,r.hash)(Je);Xe[0]&=248,Xe[31]&=127,Xe[31]|=64;const We=new Uint8Array(32),j=[u(),u(),u(),u()];Ae(j,Xe),Yt(We,j);const De=new Uint8Array(64);return De.set(Je),De.set(We,32),{publicKey:We,secretKey:De}}n.generateKeyPairFromSeed=it,n.generateKeyPair=function(Je){const Xe=(0,e.randomBytes)(32,Je),We=it(Xe);return(0,s.wipe)(Xe),We},n.extractPublicKeyFromSecretKey=function(Je){if(Je.length!==n.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${n.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(Je.subarray(32))};const Dt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Vt(Je,Xe){let We,j,De,Lt;for(j=63;j>=32;--j){for(We=0,De=j-32,Lt=j-12;De<Lt;++De)Xe[De]+=We-16*Xe[j]*Dt[De-(j-32)],We=Math.floor((Xe[De]+128)/256),Xe[De]-=256*We;Xe[De]+=We,Xe[j]=0}for(We=0,De=0;De<32;De++)Xe[De]+=We-(Xe[31]>>4)*Dt[De],We=Xe[De]>>8,Xe[De]&=255;for(De=0;De<32;De++)Xe[De]-=We*Dt[De];for(j=0;j<32;j++)Xe[j+1]+=Xe[j]>>8,Je[j]=255&Xe[j]}function on(Je){const Xe=new Float64Array(64);for(let We=0;We<64;We++)Xe[We]=Je[We];for(let We=0;We<64;We++)Je[We]=0;Vt(Je,Xe)}function cn(Je,Xe){const We=u(),j=u(),De=u(),Lt=u(),Ft=u(),sn=u(),nr=u();return te(Je[2],S),function(Je,Xe){for(let We=0;We<16;We++)Je[We]=Xe[2*We]+(Xe[2*We+1]<<8);Je[15]&=32767}(Je[1],Xe),k(De,Je[1]),ae(Lt,De,I),be(De,De,Je[2]),ge(Lt,Je[2],Lt),k(Ft,Lt),k(sn,Ft),ae(nr,sn,Ft),ae(We,nr,De),ae(We,We,Lt),function(Je,Xe){const We=u();let j;for(j=0;j<16;j++)We[j]=Xe[j];for(j=250;j>=0;j--)k(We,We),1!==j&&ae(We,We,Xe);for(j=0;j<16;j++)Je[j]=We[j]}(We,We),ae(We,We,De),ae(We,We,Lt),ae(We,We,Lt),ae(Je[0],We,Lt),k(j,Je[0]),ae(j,j,Lt),Ot(j,De)&&ae(Je[0],Je[0],he),k(j,Je[0]),ae(j,j,Lt),Ot(j,De)?-1:(Te(Je[0])===Xe[31]>>7&&be(Je[0],g,Je[0]),ae(Je[3],Je[0],Je[1]),0)}n.sign=function(Je,Xe){const We=new Float64Array(64),j=[u(),u(),u(),u()],De=(0,r.hash)(Je.subarray(0,32));De[0]&=248,De[31]&=127,De[31]|=64;const Lt=new Uint8Array(64);Lt.set(De.subarray(32),32);const Ft=new r.SHA512;Ft.update(Lt.subarray(32)),Ft.update(Xe);const sn=Ft.digest();Ft.clean(),on(sn),Ae(j,sn),Yt(Lt,j),Ft.reset(),Ft.update(Lt.subarray(0,32)),Ft.update(Je.subarray(32)),Ft.update(Xe);const nr=Ft.digest();on(nr);for(let mn=0;mn<32;mn++)We[mn]=sn[mn];for(let mn=0;mn<32;mn++)for(let Jn=0;Jn<32;Jn++)We[mn+Jn]+=nr[mn]*De[Jn];return Vt(Lt.subarray(32),We),Lt},n.verify=function(Je,Xe,We){const j=new Uint8Array(32),De=[u(),u(),u(),u()],Lt=[u(),u(),u(),u()];if(We.length!==n.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${n.SIGNATURE_LENGTH} bytes`);if(cn(Lt,Je))return!1;const Ft=new r.SHA512;Ft.update(We.subarray(0,32)),Ft.update(Je),Ft.update(Xe);const sn=Ft.digest();return on(sn),Jt(De,Lt,sn),Ae(Lt,We.subarray(32)),dt(De,Lt),Yt(j,De),!lt(We,j)},n.convertPublicKeyToX25519=function(Je){let Xe=[u(),u(),u(),u()];if(cn(Xe,Je))throw new Error("Ed25519: invalid public key");let We=u(),j=u(),De=Xe[1];ge(We,S,De),be(j,S,De),fe(j,j),ae(We,We,j);let Lt=new Uint8Array(32);return Ce(Lt,We),Lt},n.convertSecretKeyToX25519=function(Je){const Xe=(0,r.hash)(Je.subarray(0,32));Xe[0]&=248,Xe[31]&=127,Xe[31]|=64;const We=new Uint8Array(Xe.subarray(0,32));return(0,s.wipe)(Xe),We}}(ll);const rc="base64url",im="did",su="key",ic="base58btc";function Ea(n){return null!=globalThis.Buffer?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n}function Ys(n=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Ea(globalThis.Buffer.allocUnsafe(n)):new Uint8Array(n)}function Pr(n,e){e||(e=n.reduce((u,g)=>u+g.length,0));const r=Ys(e);let s=0;for(const u of n)r.set(u,s),s+=u.length;return Ea(r)}var Sa=function(n,e){if(n.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),s=0;s<r.length;s++)r[s]=255;for(var u=0;u<n.length;u++){var g=n.charAt(u),S=g.charCodeAt(0);if(255!==r[S])throw new TypeError(g+" is ambiguous");r[S]=u}var I=n.length,F=n.charAt(0),A=Math.log(I)/Math.log(256),G=Math.log(256)/Math.log(I);function te(se){if("string"!=typeof se)throw new TypeError("Expected String");if(0===se.length)return new Uint8Array;var Ce=0;if(" "!==se[Ce]){for(var lt=0,Ot=0;se[Ce]===F;)lt++,Ce++;for(var Te=(se.length-Ce)*A+1>>>0,Ue=new Uint8Array(Te);se[Ce];){var ge=r[se.charCodeAt(Ce)];if(255===ge)return;for(var be=0,ae=Te-1;(0!==ge||be<Ot)&&-1!==ae;ae--,be++)Ue[ae]=(ge+=I*Ue[ae]>>>0)%256>>>0,ge=ge/256>>>0;if(0!==ge)throw new Error("Non-zero carry");Ot=be,Ce++}if(" "!==se[Ce]){for(var k=Te-Ot;k!==Te&&0===Ue[k];)k++;for(var fe=new Uint8Array(lt+(Te-k)),vt=lt;k!==Te;)fe[vt++]=Ue[k++];return fe}}}return{encode:function(se){if(se instanceof Uint8Array||(ArrayBuffer.isView(se)?se=new Uint8Array(se.buffer,se.byteOffset,se.byteLength):Array.isArray(se)&&(se=Uint8Array.from(se))),!(se instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===se.length)return"";for(var Ce=0,lt=0,Ot=0,Te=se.length;Ot!==Te&&0===se[Ot];)Ot++,Ce++;for(var Ue=(Te-Ot)*G+1>>>0,ge=new Uint8Array(Ue);Ot!==Te;){for(var be=se[Ot],ae=0,k=Ue-1;(0!==be||ae<lt)&&-1!==k;k--,ae++)ge[k]=(be+=256*ge[k]>>>0)%I>>>0,be=be/I>>>0;if(0!==be)throw new Error("Non-zero carry");lt=ae,Ot++}for(var fe=Ue-lt;fe!==Ue&&0===ge[fe];)fe++;for(var vt=F.repeat(Ce);fe<Ue;++fe)vt+=n.charAt(ge[fe]);return vt},decodeUnsafe:te,decode:function(se){var Ce=te(se);if(Ce)return Ce;throw new Error(`Non-${e} character`)}}};const Ci=n=>{if(n instanceof Uint8Array&&"Uint8Array"===n.constructor.name)return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error("Unknown type, must be binary type")};class sc{constructor(e,r,s){this.name=e,this.prefix=r,this.baseEncode=s}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class yo{constructor(e,r,s){if(this.name=e,this.prefix=r,void 0===r.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=s}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return rh(this,e)}}class nh{constructor(e){this.decoders=e}or(e){return rh(this,e)}decode(e){const s=this.decoders[e[0]];if(s)return s.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const rh=(n,e)=>new nh({...n.decoders||{[n.prefix]:n},...e.decoders||{[e.prefix]:e}});class Dg{constructor(e,r,s,u){this.name=e,this.prefix=r,this.baseEncode=s,this.baseDecode=u,this.encoder=new sc(e,r,s),this.decoder=new yo(e,r,u)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const uu=({name:n,prefix:e,encode:r,decode:s})=>new Dg(n,e,r,s),ac=({prefix:n,name:e,alphabet:r})=>{const{encode:s,decode:u}=Sa(r,e);return uu({prefix:n,name:e,encode:s,decode:g=>Ci(u(g))})},ui=({name:n,prefix:e,bitsPerChar:r,alphabet:s})=>uu({prefix:e,name:n,encode:u=>((n,e,r)=>{const s="="===e[e.length-1],u=(1<<r)-1;let g="",S=0,I=0;for(let F=0;F<n.length;++F)for(I=I<<8|n[F],S+=8;S>r;)S-=r,g+=e[u&I>>S];if(S&&(g+=e[u&I<<r-S]),s)for(;g.length*r&7;)g+="=";return g})(u,s,r),decode:u=>((n,e,r,s)=>{const u={};for(let G=0;G<e.length;++G)u[e[G]]=G;let g=n.length;for(;"="===n[g-1];)--g;const S=new Uint8Array(g*r/8|0);let I=0,F=0,A=0;for(let G=0;G<g;++G){const he=u[n[G]];if(void 0===he)throw new SyntaxError(`Non-${s} character`);F=F<<r|he,I+=r,I>=8&&(I-=8,S[A++]=255&F>>I)}if(I>=r||255&F<<8-I)throw new SyntaxError("Unexpected end of data");return S})(u,s,r,n)}),jg=uu({prefix:"\0",name:"identity",encode:n=>(n=>(new TextDecoder).decode(n))(n),decode:n=>(n=>(new TextEncoder).encode(n))(n)});var Oa=Object.freeze({__proto__:null,identity:jg});const uc=ui({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var cc=Object.freeze({__proto__:null,base2:uc});const _f=ui({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var bf=Object.freeze({__proto__:null,base8:_f});const Ao=ac({prefix:"9",name:"base10",alphabet:"0123456789"});var To=Object.freeze({__proto__:null,base10:Ao});const cu=ui({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),gs=ui({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Js=Object.freeze({__proto__:null,base16:cu,base16upper:gs});const lu=ui({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),zg=ui({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),ih=ui({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),oh=ui({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),mo=ui({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),vo=ui({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),jr=ui({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),ts=ui({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Bg=ui({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Fg=Object.freeze({__proto__:null,base32:lu,base32upper:zg,base32pad:ih,base32padupper:oh,base32hex:mo,base32hexupper:vo,base32hexpad:jr,base32hexpadupper:ts,base32z:Bg});const sh=ac({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ah=ac({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Hg=Object.freeze({__proto__:null,base36:sh,base36upper:ah});const wf=ac({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),qg=ac({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var lc=Object.freeze({__proto__:null,base58btc:wf,base58flickr:qg});const uh=ui({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),om=ui({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),ns=ui({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ef=ui({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Sf=Object.freeze({__proto__:null,base64:uh,base64pad:om,base64url:ns,base64urlpad:Ef});const fu=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),ch=fu.reduce((n,e,r)=>(n[r]=e,n),[]),lh=fu.reduce((n,e,r)=>(n[e.codePointAt(0)]=r,n),[]);const fc=uu({prefix:"\u{1f680}",name:"base256emoji",encode:function(n){return n.reduce((e,r)=>e+ch[r],"")},decode:function(n){const e=[];for(const r of n){const s=lh[r.codePointAt(0)];if(void 0===s)throw new Error(`Non-base256emoji character: ${r}`);e.push(s)}return new Uint8Array(e)}});var Mo=Object.freeze({__proto__:null,base256emoji:fc}),du=function Zs(n,e,r){e=e||[];for(var s=r=r||0;n>=Xs;)e[r++]=255&n|128,n/=128;for(;-128&n;)e[r++]=255&n|128,n>>>=7;return e[r]=0|n,Zs.bytes=r-s+1,e},Xs=Math.pow(2,31);var hh=function ms(n,e){var r,s=0,u=0,g=e=e||0,S=n.length;do{if(g>=S)throw ms.bytes=0,new RangeError("Could not decode varint");r=n[g++],s+=u<28?(127&r)<<u:(127&r)*Math.pow(2,u),u+=7}while(r>=128);return ms.bytes=g-e,s};var xf=Math.pow(2,7),Wg=Math.pow(2,14),Rf=Math.pow(2,21),Kg=Math.pow(2,28),Gg=Math.pow(2,35),ph=Math.pow(2,42),If=Math.pow(2,49),Yg=Math.pow(2,56),Qg=Math.pow(2,63),gh={encode:du,decode:hh,encodingLength:function(n){return n<xf?1:n<Wg?2:n<Rf?3:n<Kg?4:n<Gg?5:n<ph?6:n<If?7:n<Yg?8:n<Qg?9:10}};const Cf=(n,e,r=0)=>(gh.encode(n,e,r),e),dc=n=>gh.encodingLength(n),hc=(n,e)=>{const r=e.byteLength,s=dc(n),u=s+dc(r),g=new Uint8Array(u+r);return Cf(n,g,0),Cf(r,g,s),g.set(e,u),new Jg(n,r,e,g)};class Jg{constructor(e,r,s,u){this.code=e,this.size=r,this.digest=s,this.bytes=u}}const yh=({name:n,code:e,encode:r})=>new pc(n,e,r);class pc{constructor(e,r,s){this.name=e,this.code=r,this.encode=s}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?hc(this.code,r):r.then(s=>hc(this.code,s))}throw Error("Unknown type, must be binary type")}}const mh=n=>function(){var e=ue(function*(r){return new Uint8Array(yield crypto.subtle.digest(n,r))});return function(r){return e.apply(this,arguments)}}(),ml=yh({name:"sha2-256",code:18,encode:mh("SHA-256")}),vs=yh({name:"sha2-512",code:19,encode:mh("SHA-512")});Object.freeze({__proto__:null,sha256:ml,sha512:vs});const xa=Ci;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:xa,digest:n=>hc(0,xa(n))}}),new TextEncoder,new TextDecoder;const Pf={...Oa,...cc,...bf,...To,...Js,...Fg,...Hg,...lc,...Sf,...Mo};function hu(n,e,r,s){return{name:n,prefix:e,encoder:{name:n,prefix:e,encode:r},decoder:{decode:s}}}const vh=hu("utf8","u",n=>"u"+new TextDecoder("utf8").decode(n),n=>(new TextEncoder).encode(n.substring(1))),_l=hu("ascii","a",n=>{let e="a";for(let r=0;r<n.length;r++)e+=String.fromCharCode(n[r]);return e},n=>{const e=Ys((n=n.substring(1)).length);for(let r=0;r<n.length;r++)e[r]=n.charCodeAt(r);return e}),Fr={utf8:vh,"utf-8":vh,hex:Pf.base16,latin1:_l,ascii:_l,binary:_l,...Pf};function mi(n,e="utf8"){const r=Fr[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?r.encoder.encode(n).substring(1):globalThis.Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString("utf8")}function Li(n,e="utf8"){const r=Fr[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${n}`):Ea(globalThis.Buffer.from(n,"utf-8"))}function yc(n){return mi(Li(Qn(n),"utf8"),rc)}function bl(n){const r="z"+mi(Pr([Li("K36",ic),n]),ic);return[im,su,r].join(":")}function _h(n){return mi(n,rc)}function pu(n){return Li([yc(n.header),yc(n.payload)].join("."),"utf8")}function Hr(n){return[yc(n.header),yc(n.payload),_h(n.signature)].join(".")}function ci(n=Ju.randomBytes(32)){return ll.generateKeyPairFromSeed(n)}function mc(){return(mc=ue(function*(n,e,r,s,u=Gt.fromMiliseconds(Date.now())){const g={alg:"EdDSA",typ:"JWT"},S={iss:bl(s.publicKey),sub:n,aud:e,iat:u,exp:u+r},I=pu({header:g,payload:S});return Hr({header:g,payload:S,signature:ll.sign(s.secretKey,I)})})).apply(this,arguments)}var gu={},Ra={};Object.defineProperty(Ra,"__esModule",{value:!0});var Ui=Sn,_i=Mi;function wh(n,e,r){for(var s=1634760805,u=857760878,g=2036477234,S=1797285236,I=r[3]<<24|r[2]<<16|r[1]<<8|r[0],F=r[7]<<24|r[6]<<16|r[5]<<8|r[4],A=r[11]<<24|r[10]<<16|r[9]<<8|r[8],G=r[15]<<24|r[14]<<16|r[13]<<8|r[12],he=r[19]<<24|r[18]<<16|r[17]<<8|r[16],te=r[23]<<24|r[22]<<16|r[21]<<8|r[20],Ne=r[27]<<24|r[26]<<16|r[25]<<8|r[24],se=r[31]<<24|r[30]<<16|r[29]<<8|r[28],Ce=e[3]<<24|e[2]<<16|e[1]<<8|e[0],lt=e[7]<<24|e[6]<<16|e[5]<<8|e[4],Ot=e[11]<<24|e[10]<<16|e[9]<<8|e[8],Te=e[15]<<24|e[14]<<16|e[13]<<8|e[12],Ue=s,ge=u,be=g,ae=S,k=I,fe=F,vt=A,dt=G,Pt=he,Yt=te,Jt=Ne,Ae=se,it=Ce,Rt=lt,Nt=Ot,Dt=Te,Vt=0;Vt<20;Vt+=2)k=(k^=Pt=Pt+(it=(it^=Ue=Ue+k|0)>>>16|it<<16)|0)>>>20|k<<12,fe=(fe^=Yt=Yt+(Rt=(Rt^=ge=ge+fe|0)>>>16|Rt<<16)|0)>>>20|fe<<12,vt=(vt^=Jt=Jt+(Nt=(Nt^=be=be+vt|0)>>>16|Nt<<16)|0)>>>20|vt<<12,dt=(dt^=Ae=Ae+(Dt=(Dt^=ae=ae+dt|0)>>>16|Dt<<16)|0)>>>20|dt<<12,vt=(vt^=Jt=Jt+(Nt=(Nt^=be=be+vt|0)>>>24|Nt<<8)|0)>>>25|vt<<7,dt=(dt^=Ae=Ae+(Dt=(Dt^=ae=ae+dt|0)>>>24|Dt<<8)|0)>>>25|dt<<7,fe=(fe^=Yt=Yt+(Rt=(Rt^=ge=ge+fe|0)>>>24|Rt<<8)|0)>>>25|fe<<7,k=(k^=Pt=Pt+(it=(it^=Ue=Ue+k|0)>>>24|it<<8)|0)>>>25|k<<7,fe=(fe^=Jt=Jt+(Dt=(Dt^=Ue=Ue+fe|0)>>>16|Dt<<16)|0)>>>20|fe<<12,vt=(vt^=Ae=Ae+(it=(it^=ge=ge+vt|0)>>>16|it<<16)|0)>>>20|vt<<12,dt=(dt^=Pt=Pt+(Rt=(Rt^=be=be+dt|0)>>>16|Rt<<16)|0)>>>20|dt<<12,k=(k^=Yt=Yt+(Nt=(Nt^=ae=ae+k|0)>>>16|Nt<<16)|0)>>>20|k<<12,dt=(dt^=Pt=Pt+(Rt=(Rt^=be=be+dt|0)>>>24|Rt<<8)|0)>>>25|dt<<7,k=(k^=Yt=Yt+(Nt=(Nt^=ae=ae+k|0)>>>24|Nt<<8)|0)>>>25|k<<7,vt=(vt^=Ae=Ae+(it=(it^=ge=ge+vt|0)>>>24|it<<8)|0)>>>25|vt<<7,fe=(fe^=Jt=Jt+(Dt=(Dt^=Ue=Ue+fe|0)>>>24|Dt<<8)|0)>>>25|fe<<7;Ui.writeUint32LE(Ue+s|0,n,0),Ui.writeUint32LE(ge+u|0,n,4),Ui.writeUint32LE(be+g|0,n,8),Ui.writeUint32LE(ae+S|0,n,12),Ui.writeUint32LE(k+I|0,n,16),Ui.writeUint32LE(fe+F|0,n,20),Ui.writeUint32LE(vt+A|0,n,24),Ui.writeUint32LE(dt+G|0,n,28),Ui.writeUint32LE(Pt+he|0,n,32),Ui.writeUint32LE(Yt+te|0,n,36),Ui.writeUint32LE(Jt+Ne|0,n,40),Ui.writeUint32LE(Ae+se|0,n,44),Ui.writeUint32LE(it+Ce|0,n,48),Ui.writeUint32LE(Rt+lt|0,n,52),Ui.writeUint32LE(Nt+Ot|0,n,56),Ui.writeUint32LE(Dt+Te|0,n,60)}function kf(n,e,r,s,u){if(void 0===u&&(u=0),32!==n.length)throw new Error("ChaCha: key size must be 32 bytes");if(s.length<r.length)throw new Error("ChaCha: destination is shorter than source");var g,S;if(0===u){if(8!==e.length&&12!==e.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");S=(g=new Uint8Array(16)).length-e.length,g.set(e,S)}else{if(16!==e.length)throw new Error("ChaCha nonce with counter must be 16 bytes");g=e,S=u}for(var I=new Uint8Array(64),F=0;F<r.length;F+=64){wh(I,g,n);for(var A=F;A<F+64&&A<r.length;A++)s[A]=r[A]^I[A-F];Lo(g,0,S)}return _i.wipe(I),0===u&&_i.wipe(g),s}function Lo(n,e,r){for(var s=1;r--;)n[e]=255&(s=s+(255&n[e])|0),s>>>=8,e++;if(s>0)throw new Error("ChaCha: counter overflow")}Ra.streamXOR=kf,Ra.stream=function(n,e,r,s){return void 0===s&&(s=0),_i.wipe(r),kf(n,e,r,r,s)};var vc={},bs={};function Sh(n,e){if(n.length!==e.length)return 0;for(var r=0,s=0;s<n.length;s++)r|=n[s]^e[s];return 1&r-1>>>8}Object.defineProperty(bs,"__esModule",{value:!0}),bs.select=function(n,e,r){return~(n-1)&e|n-1&r},bs.lessOrEqual=function(n,e){return(0|n)-(0|e)-1>>>31&1},bs.compare=Sh,bs.equal=function(n,e){return 0!==n.length&&0!==e.length&&0!==Sh(n,e)},function(n){Object.defineProperty(n,"__esModule",{value:!0});var e=bs,r=Mi;n.DIGEST_LENGTH=16;var s=function(){function S(I){this.digestLength=n.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var F=I[0]|I[1]<<8;this._r[0]=8191&F;var A=I[2]|I[3]<<8;this._r[1]=8191&(F>>>13|A<<3);var G=I[4]|I[5]<<8;this._r[2]=7939&(A>>>10|G<<6);var he=I[6]|I[7]<<8;this._r[3]=8191&(G>>>7|he<<9);var te=I[8]|I[9]<<8;this._r[4]=255&(he>>>4|te<<12),this._r[5]=te>>>1&8190;var Ne=I[10]|I[11]<<8;this._r[6]=8191&(te>>>14|Ne<<2);var se=I[12]|I[13]<<8;this._r[7]=8065&(Ne>>>11|se<<5);var Ce=I[14]|I[15]<<8;this._r[8]=8191&(se>>>8|Ce<<8),this._r[9]=Ce>>>5&127,this._pad[0]=I[16]|I[17]<<8,this._pad[1]=I[18]|I[19]<<8,this._pad[2]=I[20]|I[21]<<8,this._pad[3]=I[22]|I[23]<<8,this._pad[4]=I[24]|I[25]<<8,this._pad[5]=I[26]|I[27]<<8,this._pad[6]=I[28]|I[29]<<8,this._pad[7]=I[30]|I[31]<<8}return S.prototype._blocks=function(I,F,A){for(var G=this._fin?0:2048,he=this._h[0],te=this._h[1],Ne=this._h[2],se=this._h[3],Ce=this._h[4],lt=this._h[5],Ot=this._h[6],Te=this._h[7],Ue=this._h[8],ge=this._h[9],be=this._r[0],ae=this._r[1],k=this._r[2],fe=this._r[3],vt=this._r[4],dt=this._r[5],Pt=this._r[6],Yt=this._r[7],Jt=this._r[8],Ae=this._r[9];A>=16;){var it=I[F+0]|I[F+1]<<8,Rt=I[F+2]|I[F+3]<<8,Nt=I[F+4]|I[F+5]<<8,Dt=I[F+6]|I[F+7]<<8,Vt=I[F+8]|I[F+9]<<8,on=I[F+10]|I[F+11]<<8,On=I[F+12]|I[F+13]<<8,cn=I[F+14]|I[F+15]<<8,zt=0,Wt=zt;Wt+=(he+=8191&it)*be,Wt+=(te+=8191&(it>>>13|Rt<<3))*(5*Ae),Wt+=(Ne+=8191&(Rt>>>10|Nt<<6))*(5*Jt),Wt+=(se+=8191&(Nt>>>7|Dt<<9))*(5*Yt),zt=(Wt+=(Ce+=8191&(Dt>>>4|Vt<<12))*(5*Pt))>>>13,Wt&=8191,Wt+=(lt+=Vt>>>1&8191)*(5*dt),Wt+=(Ot+=8191&(Vt>>>14|on<<2))*(5*vt),Wt+=(Te+=8191&(on>>>11|On<<5))*(5*fe),Wt+=(Ue+=8191&(On>>>8|cn<<8))*(5*k);var Nn=zt+=(Wt+=(ge+=cn>>>5|G)*(5*ae))>>>13;Nn+=he*ae,Nn+=te*be,Nn+=Ne*(5*Ae),Nn+=se*(5*Jt),zt=(Nn+=Ce*(5*Yt))>>>13,Nn&=8191,Nn+=lt*(5*Pt),Nn+=Ot*(5*dt),Nn+=Te*(5*vt),Nn+=Ue*(5*fe),zt+=(Nn+=ge*(5*k))>>>13,Nn&=8191;var Je=zt;Je+=he*k,Je+=te*ae,Je+=Ne*be,Je+=se*(5*Ae),zt=(Je+=Ce*(5*Jt))>>>13,Je&=8191,Je+=lt*(5*Yt),Je+=Ot*(5*Pt),Je+=Te*(5*dt),Je+=Ue*(5*vt);var Xe=zt+=(Je+=ge*(5*fe))>>>13;Xe+=he*fe,Xe+=te*k,Xe+=Ne*ae,Xe+=se*be,zt=(Xe+=Ce*(5*Ae))>>>13,Xe&=8191,Xe+=lt*(5*Jt),Xe+=Ot*(5*Yt),Xe+=Te*(5*Pt),Xe+=Ue*(5*dt);var We=zt+=(Xe+=ge*(5*vt))>>>13;We+=he*vt,We+=te*fe,We+=Ne*k,We+=se*ae,zt=(We+=Ce*be)>>>13,We&=8191,We+=lt*(5*Ae),We+=Ot*(5*Jt),We+=Te*(5*Yt),We+=Ue*(5*Pt);var j=zt+=(We+=ge*(5*dt))>>>13;j+=he*dt,j+=te*vt,j+=Ne*fe,j+=se*k,zt=(j+=Ce*ae)>>>13,j&=8191,j+=lt*be,j+=Ot*(5*Ae),j+=Te*(5*Jt),j+=Ue*(5*Yt);var De=zt+=(j+=ge*(5*Pt))>>>13;De+=he*Pt,De+=te*dt,De+=Ne*vt,De+=se*fe,zt=(De+=Ce*k)>>>13,De&=8191,De+=lt*ae,De+=Ot*be,De+=Te*(5*Ae),De+=Ue*(5*Jt);var Lt=zt+=(De+=ge*(5*Yt))>>>13;Lt+=he*Yt,Lt+=te*Pt,Lt+=Ne*dt,Lt+=se*vt,zt=(Lt+=Ce*fe)>>>13,Lt&=8191,Lt+=lt*k,Lt+=Ot*ae,Lt+=Te*be,Lt+=Ue*(5*Ae);var Ft=zt+=(Lt+=ge*(5*Jt))>>>13;Ft+=he*Jt,Ft+=te*Yt,Ft+=Ne*Pt,Ft+=se*dt,zt=(Ft+=Ce*vt)>>>13,Ft&=8191,Ft+=lt*fe,Ft+=Ot*k,Ft+=Te*ae,Ft+=Ue*be;var sn=zt+=(Ft+=ge*(5*Ae))>>>13;sn+=he*Ae,sn+=te*Jt,sn+=Ne*Yt,sn+=se*Pt,zt=(sn+=Ce*dt)>>>13,sn&=8191,sn+=lt*vt,sn+=Ot*fe,sn+=Te*k,sn+=Ue*ae,he=Wt=8191&(zt=(zt=((zt+=(sn+=ge*be)>>>13)<<2)+zt|0)+(Wt&=8191)|0),te=Nn+=zt>>>=13,Ne=Je&=8191,se=Xe&=8191,Ce=We&=8191,lt=j&=8191,Ot=De&=8191,Te=Lt&=8191,Ue=Ft&=8191,ge=sn&=8191,F+=16,A-=16}this._h[0]=he,this._h[1]=te,this._h[2]=Ne,this._h[3]=se,this._h[4]=Ce,this._h[5]=lt,this._h[6]=Ot,this._h[7]=Te,this._h[8]=Ue,this._h[9]=ge},S.prototype.finish=function(I,F){void 0===F&&(F=0);var A,G,he,te,Ne=new Uint16Array(10);if(this._leftover){for(te=this._leftover,this._buffer[te++]=1;te<16;te++)this._buffer[te]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(A=this._h[1]>>>13,this._h[1]&=8191,te=2;te<10;te++)this._h[te]+=A,A=this._h[te]>>>13,this._h[te]&=8191;for(this._h[0]+=5*A,A=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=A,A=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=A,Ne[0]=this._h[0]+5,A=Ne[0]>>>13,Ne[0]&=8191,te=1;te<10;te++)Ne[te]=this._h[te]+A,A=Ne[te]>>>13,Ne[te]&=8191;for(Ne[9]-=8192,G=(1^A)-1,te=0;te<10;te++)Ne[te]&=G;for(G=~G,te=0;te<10;te++)this._h[te]=this._h[te]&G|Ne[te];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),this._h[0]=65535&(he=this._h[0]+this._pad[0]),te=1;te<8;te++)this._h[te]=65535&(he=(this._h[te]+this._pad[te]|0)+(he>>>16)|0);return I[F+0]=this._h[0]>>>0,I[F+1]=this._h[0]>>>8,I[F+2]=this._h[1]>>>0,I[F+3]=this._h[1]>>>8,I[F+4]=this._h[2]>>>0,I[F+5]=this._h[2]>>>8,I[F+6]=this._h[3]>>>0,I[F+7]=this._h[3]>>>8,I[F+8]=this._h[4]>>>0,I[F+9]=this._h[4]>>>8,I[F+10]=this._h[5]>>>0,I[F+11]=this._h[5]>>>8,I[F+12]=this._h[6]>>>0,I[F+13]=this._h[6]>>>8,I[F+14]=this._h[7]>>>0,I[F+15]=this._h[7]>>>8,this._finished=!0,this},S.prototype.update=function(I){var F,A=0,G=I.length;if(this._leftover){(F=16-this._leftover)>G&&(F=G);for(var he=0;he<F;he++)this._buffer[this._leftover+he]=I[A+he];if(G-=F,A+=F,this._leftover+=F,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(G>=16&&(this._blocks(I,A,F=G-G%16),A+=F,G-=F),G){for(he=0;he<G;he++)this._buffer[this._leftover+he]=I[A+he];this._leftover+=G}return this},S.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var I=new Uint8Array(16);return this.finish(I),I},S.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},S}();n.Poly1305=s,n.oneTimeAuth=function(S,I){var F=new s(S);F.update(I);var A=F.digest();return F.clean(),A},n.equal=function(S,I){return S.length===n.DIGEST_LENGTH&&I.length===n.DIGEST_LENGTH&&e.equal(S,I)}}(vc),function(n){Object.defineProperty(n,"__esModule",{value:!0});var e=Ra,r=vc,s=Mi,u=Sn,g=bs;n.KEY_LENGTH=32,n.NONCE_LENGTH=12,n.TAG_LENGTH=16;var S=new Uint8Array(16),I=function(){function F(A){if(this.nonceLength=n.NONCE_LENGTH,this.tagLength=n.TAG_LENGTH,A.length!==n.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(A)}return F.prototype.seal=function(A,G,he,te){if(A.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var Ne=new Uint8Array(16);Ne.set(A,Ne.length-A.length);var se=new Uint8Array(32);e.stream(this._key,Ne,se,4);var Ce,lt=G.length+this.tagLength;if(te){if(te.length!==lt)throw new Error("ChaCha20Poly1305: incorrect destination length");Ce=te}else Ce=new Uint8Array(lt);return e.streamXOR(this._key,Ne,G,Ce,4),this._authenticate(Ce.subarray(Ce.length-this.tagLength,Ce.length),se,Ce.subarray(0,Ce.length-this.tagLength),he),s.wipe(Ne),Ce},F.prototype.open=function(A,G,he,te){if(A.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(G.length<this.tagLength)return null;var Ne=new Uint8Array(16);Ne.set(A,Ne.length-A.length);var se=new Uint8Array(32);e.stream(this._key,Ne,se,4);var Ce=new Uint8Array(this.tagLength);if(this._authenticate(Ce,se,G.subarray(0,G.length-this.tagLength),he),!g.equal(Ce,G.subarray(G.length-this.tagLength,G.length)))return null;var lt,Ot=G.length-this.tagLength;if(te){if(te.length!==Ot)throw new Error("ChaCha20Poly1305: incorrect destination length");lt=te}else lt=new Uint8Array(Ot);return e.streamXOR(this._key,Ne,G.subarray(0,G.length-this.tagLength),lt,4),s.wipe(Ne),lt},F.prototype.clean=function(){return s.wipe(this._key),this},F.prototype._authenticate=function(A,G,he,te){var Ne=new r.Poly1305(G);te&&(Ne.update(te),te.length%16>0&&Ne.update(S.subarray(te.length%16))),Ne.update(he),he.length%16>0&&Ne.update(S.subarray(he.length%16));var se=new Uint8Array(8);te&&u.writeUint64LE(te.length,se),Ne.update(se),u.writeUint64LE(he.length,se),Ne.update(se);for(var Ce=Ne.digest(),lt=0;lt<Ce.length;lt++)A[lt]=Ce[lt];Ne.clean(),s.wipe(Ce),s.wipe(se)},F}();n.ChaCha20Poly1305=I}(gu);var Oh={},_c={},Nf={};Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.isSerializableHash=function(n){return typeof n.saveState<"u"&&typeof n.restoreState<"u"&&typeof n.cleanSavedState<"u"},Object.defineProperty(_c,"__esModule",{value:!0});var rs=Nf,wl=bs,t0=Mi,El=function(){function n(e,r){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var s=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(s).clean():s.set(r);for(var u=0;u<s.length;u++)s[u]^=54;for(this._inner.update(s),u=0;u<s.length;u++)s[u]^=106;this._outer.update(s),rs.isSerializableHash(this._inner)&&rs.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),t0.wipe(s)}return n.prototype.reset=function(){if(!rs.isSerializableHash(this._inner)||!rs.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},n.prototype.clean=function(){rs.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),rs.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},n.prototype.update=function(e){return this._inner.update(e),this},n.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},n.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},n.prototype.saveState=function(){if(!rs.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},n.prototype.restoreState=function(e){if(!rs.isSerializableHash(this._inner)||!rs.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},n.prototype.cleanSavedState=function(e){if(!rs.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},n}();_c.HMAC=El,_c.hmac=function(n,e,r){var s=new El(n,e);s.update(r);var u=s.digest();return s.clean(),u},_c.equal=wl.equal,Object.defineProperty(Oh,"__esModule",{value:!0});var xh=_c,Tf=Mi,n0=function(){function n(e,r,s,u){void 0===s&&(s=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=u;var g=xh.hmac(this._hash,s,r);this._hmac=new xh.HMAC(e,g),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return n.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},n.prototype.expand=function(e){for(var r=new Uint8Array(e),s=0;s<r.length;s++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[s]=this._buffer[this._bufpos++];return r},n.prototype.clean=function(){this._hmac.clean(),Tf.wipe(this._buffer),Tf.wipe(this._counter),this._bufpos=0},n}(),r0=Oh.HKDF=n0,Sl={};!function(n){Object.defineProperty(n,"__esModule",{value:!0});var e=Sn,r=Mi;n.DIGEST_LENGTH=32,n.BLOCK_SIZE=64;var s=function(){function I(){this.digestLength=n.DIGEST_LENGTH,this.blockSize=n.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return I.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},I.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},I.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},I.prototype.update=function(F,A){if(void 0===A&&(A=F.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var G=0;if(this._bytesHashed+=A,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&A>0;)this._buffer[this._bufferLength++]=F[G++],A--;this._bufferLength===this.blockSize&&(g(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(A>=this.blockSize&&(G=g(this._temp,this._state,F,G,A),A%=this.blockSize);A>0;)this._buffer[this._bufferLength++]=F[G++],A--;return this},I.prototype.finish=function(F){if(!this._finished){var A=this._bytesHashed,G=this._bufferLength,he=A/536870912|0,te=A<<3,Ne=A%64<56?64:128;this._buffer[G]=128;for(var se=G+1;se<Ne-8;se++)this._buffer[se]=0;e.writeUint32BE(he,this._buffer,Ne-8),e.writeUint32BE(te,this._buffer,Ne-4),g(this._temp,this._state,this._buffer,0,Ne),this._finished=!0}for(se=0;se<this.digestLength/4;se++)e.writeUint32BE(this._state[se],F,4*se);return this},I.prototype.digest=function(){var F=new Uint8Array(this.digestLength);return this.finish(F),F},I.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},I.prototype.restoreState=function(F){return this._state.set(F.state),this._bufferLength=F.bufferLength,F.buffer&&this._buffer.set(F.buffer),this._bytesHashed=F.bytesHashed,this._finished=!1,this},I.prototype.cleanSavedState=function(F){r.wipe(F.state),F.buffer&&r.wipe(F.buffer),F.bufferLength=0,F.bytesHashed=0},I}();n.SHA256=s;var u=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function g(I,F,A,G,he){for(;he>=64;){for(var te=F[0],Ne=F[1],se=F[2],Ce=F[3],lt=F[4],Ot=F[5],Te=F[6],Ue=F[7],ge=0;ge<16;ge++)I[ge]=e.readUint32BE(A,G+4*ge);for(ge=16;ge<64;ge++){var ae=I[ge-2],k=(ae>>>17|ae<<15)^(ae>>>19|ae<<13)^ae>>>10,fe=((ae=I[ge-15])>>>7|ae<<25)^(ae>>>18|ae<<14)^ae>>>3;I[ge]=(k+I[ge-7]|0)+(fe+I[ge-16]|0)}for(ge=0;ge<64;ge++)k=(((lt>>>6|lt<<26)^(lt>>>11|lt<<21)^(lt>>>25|lt<<7))+(lt&Ot^~lt&Te)|0)+(Ue+(u[ge]+I[ge]|0)|0)|0,fe=((te>>>2|te<<30)^(te>>>13|te<<19)^(te>>>22|te<<10))+(te&Ne^te&se^Ne&se)|0,Ue=Te,Te=Ot,Ot=lt,lt=Ce+k|0,Ce=se,se=Ne,Ne=te,te=k+fe|0;F[0]+=te,F[1]+=Ne,F[2]+=se,F[3]+=Ce,F[4]+=lt,F[5]+=Ot,F[6]+=Te,F[7]+=Ue,G+=64,he-=64}return G}n.hash=function(I){var F=new s;F.update(I);var A=F.digest();return F.clean(),A}}(Sl);var Mf={};!function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.sharedKey=n.generateKeyPair=n.generateKeyPairFromSeed=n.scalarMultBase=n.scalarMult=n.SHARED_KEY_LENGTH=n.SECRET_KEY_LENGTH=n.PUBLIC_KEY_LENGTH=void 0;const e=Ju,r=Mi;function s(ge){const be=new Float64Array(16);if(ge)for(let ae=0;ae<ge.length;ae++)be[ae]=ge[ae];return be}n.PUBLIC_KEY_LENGTH=32,n.SECRET_KEY_LENGTH=32,n.SHARED_KEY_LENGTH=32;const u=new Uint8Array(32);u[0]=9;const g=s([56129,1]);function S(ge){let be=1;for(let ae=0;ae<16;ae++){let k=ge[ae]+be+65535;be=Math.floor(k/65536),ge[ae]=k-65536*be}ge[0]+=be-1+37*(be-1)}function I(ge,be,ae){const k=~(ae-1);for(let fe=0;fe<16;fe++){const vt=k&(ge[fe]^be[fe]);ge[fe]^=vt,be[fe]^=vt}}function G(ge,be,ae){for(let k=0;k<16;k++)ge[k]=be[k]+ae[k]}function he(ge,be,ae){for(let k=0;k<16;k++)ge[k]=be[k]-ae[k]}function te(ge,be,ae){let k,fe,vt=0,dt=0,Pt=0,Yt=0,Jt=0,Ae=0,it=0,Rt=0,Nt=0,Dt=0,Vt=0,on=0,On=0,cn=0,zt=0,Wt=0,Nn=0,Je=0,Xe=0,We=0,j=0,De=0,Lt=0,Ft=0,sn=0,nr=0,mn=0,Jn=0,Gr=0,Ar=0,Xn=0,Tn=ae[0],Mn=ae[1],Bn=ae[2],In=ae[3],Ln=ae[4],wn=ae[5],hn=ae[6],Un=ae[7],Fn=ae[8],En=ae[9],Wn=ae[10],Gn=ae[11],rr=ae[12],ir=ae[13],Zn=ae[14],lr=ae[15];k=be[0],vt+=k*Tn,dt+=k*Mn,Pt+=k*Bn,Yt+=k*In,Jt+=k*Ln,Ae+=k*wn,it+=k*hn,Rt+=k*Un,Nt+=k*Fn,Dt+=k*En,Vt+=k*Wn,on+=k*Gn,On+=k*rr,cn+=k*ir,zt+=k*Zn,Wt+=k*lr,k=be[1],dt+=k*Tn,Pt+=k*Mn,Yt+=k*Bn,Jt+=k*In,Ae+=k*Ln,it+=k*wn,Rt+=k*hn,Nt+=k*Un,Dt+=k*Fn,Vt+=k*En,on+=k*Wn,On+=k*Gn,cn+=k*rr,zt+=k*ir,Wt+=k*Zn,Nn+=k*lr,k=be[2],Pt+=k*Tn,Yt+=k*Mn,Jt+=k*Bn,Ae+=k*In,it+=k*Ln,Rt+=k*wn,Nt+=k*hn,Dt+=k*Un,Vt+=k*Fn,on+=k*En,On+=k*Wn,cn+=k*Gn,zt+=k*rr,Wt+=k*ir,Nn+=k*Zn,Je+=k*lr,k=be[3],Yt+=k*Tn,Jt+=k*Mn,Ae+=k*Bn,it+=k*In,Rt+=k*Ln,Nt+=k*wn,Dt+=k*hn,Vt+=k*Un,on+=k*Fn,On+=k*En,cn+=k*Wn,zt+=k*Gn,Wt+=k*rr,Nn+=k*ir,Je+=k*Zn,Xe+=k*lr,k=be[4],Jt+=k*Tn,Ae+=k*Mn,it+=k*Bn,Rt+=k*In,Nt+=k*Ln,Dt+=k*wn,Vt+=k*hn,on+=k*Un,On+=k*Fn,cn+=k*En,zt+=k*Wn,Wt+=k*Gn,Nn+=k*rr,Je+=k*ir,Xe+=k*Zn,We+=k*lr,k=be[5],Ae+=k*Tn,it+=k*Mn,Rt+=k*Bn,Nt+=k*In,Dt+=k*Ln,Vt+=k*wn,on+=k*hn,On+=k*Un,cn+=k*Fn,zt+=k*En,Wt+=k*Wn,Nn+=k*Gn,Je+=k*rr,Xe+=k*ir,We+=k*Zn,j+=k*lr,k=be[6],it+=k*Tn,Rt+=k*Mn,Nt+=k*Bn,Dt+=k*In,Vt+=k*Ln,on+=k*wn,On+=k*hn,cn+=k*Un,zt+=k*Fn,Wt+=k*En,Nn+=k*Wn,Je+=k*Gn,Xe+=k*rr,We+=k*ir,j+=k*Zn,De+=k*lr,k=be[7],Rt+=k*Tn,Nt+=k*Mn,Dt+=k*Bn,Vt+=k*In,on+=k*Ln,On+=k*wn,cn+=k*hn,zt+=k*Un,Wt+=k*Fn,Nn+=k*En,Je+=k*Wn,Xe+=k*Gn,We+=k*rr,j+=k*ir,De+=k*Zn,Lt+=k*lr,k=be[8],Nt+=k*Tn,Dt+=k*Mn,Vt+=k*Bn,on+=k*In,On+=k*Ln,cn+=k*wn,zt+=k*hn,Wt+=k*Un,Nn+=k*Fn,Je+=k*En,Xe+=k*Wn,We+=k*Gn,j+=k*rr,De+=k*ir,Lt+=k*Zn,Ft+=k*lr,k=be[9],Dt+=k*Tn,Vt+=k*Mn,on+=k*Bn,On+=k*In,cn+=k*Ln,zt+=k*wn,Wt+=k*hn,Nn+=k*Un,Je+=k*Fn,Xe+=k*En,We+=k*Wn,j+=k*Gn,De+=k*rr,Lt+=k*ir,Ft+=k*Zn,sn+=k*lr,k=be[10],Vt+=k*Tn,on+=k*Mn,On+=k*Bn,cn+=k*In,zt+=k*Ln,Wt+=k*wn,Nn+=k*hn,Je+=k*Un,Xe+=k*Fn,We+=k*En,j+=k*Wn,De+=k*Gn,Lt+=k*rr,Ft+=k*ir,sn+=k*Zn,nr+=k*lr,k=be[11],on+=k*Tn,On+=k*Mn,cn+=k*Bn,zt+=k*In,Wt+=k*Ln,Nn+=k*wn,Je+=k*hn,Xe+=k*Un,We+=k*Fn,j+=k*En,De+=k*Wn,Lt+=k*Gn,Ft+=k*rr,sn+=k*ir,nr+=k*Zn,mn+=k*lr,k=be[12],On+=k*Tn,cn+=k*Mn,zt+=k*Bn,Wt+=k*In,Nn+=k*Ln,Je+=k*wn,Xe+=k*hn,We+=k*Un,j+=k*Fn,De+=k*En,Lt+=k*Wn,Ft+=k*Gn,sn+=k*rr,nr+=k*ir,mn+=k*Zn,Jn+=k*lr,k=be[13],cn+=k*Tn,zt+=k*Mn,Wt+=k*Bn,Nn+=k*In,Je+=k*Ln,Xe+=k*wn,We+=k*hn,j+=k*Un,De+=k*Fn,Lt+=k*En,Ft+=k*Wn,sn+=k*Gn,nr+=k*rr,mn+=k*ir,Jn+=k*Zn,Gr+=k*lr,k=be[14],zt+=k*Tn,Wt+=k*Mn,Nn+=k*Bn,Je+=k*In,Xe+=k*Ln,We+=k*wn,j+=k*hn,De+=k*Un,Lt+=k*Fn,Ft+=k*En,sn+=k*Wn,nr+=k*Gn,mn+=k*rr,Jn+=k*ir,Gr+=k*Zn,Ar+=k*lr,k=be[15],Wt+=k*Tn,Nn+=k*Mn,Je+=k*Bn,Xe+=k*In,We+=k*Ln,j+=k*wn,De+=k*hn,Lt+=k*Un,Ft+=k*Fn,sn+=k*En,nr+=k*Wn,mn+=k*Gn,Jn+=k*rr,Gr+=k*ir,Ar+=k*Zn,Xn+=k*lr,vt+=38*Nn,dt+=38*Je,Pt+=38*Xe,Yt+=38*We,Jt+=38*j,Ae+=38*De,it+=38*Lt,Rt+=38*Ft,Nt+=38*sn,Dt+=38*nr,Vt+=38*mn,on+=38*Jn,On+=38*Gr,cn+=38*Ar,zt+=38*Xn,fe=1,k=vt+fe+65535,fe=Math.floor(k/65536),vt=k-65536*fe,k=dt+fe+65535,fe=Math.floor(k/65536),dt=k-65536*fe,k=Pt+fe+65535,fe=Math.floor(k/65536),Pt=k-65536*fe,k=Yt+fe+65535,fe=Math.floor(k/65536),Yt=k-65536*fe,k=Jt+fe+65535,fe=Math.floor(k/65536),Jt=k-65536*fe,k=Ae+fe+65535,fe=Math.floor(k/65536),Ae=k-65536*fe,k=it+fe+65535,fe=Math.floor(k/65536),it=k-65536*fe,k=Rt+fe+65535,fe=Math.floor(k/65536),Rt=k-65536*fe,k=Nt+fe+65535,fe=Math.floor(k/65536),Nt=k-65536*fe,k=Dt+fe+65535,fe=Math.floor(k/65536),Dt=k-65536*fe,k=Vt+fe+65535,fe=Math.floor(k/65536),Vt=k-65536*fe,k=on+fe+65535,fe=Math.floor(k/65536),on=k-65536*fe,k=On+fe+65535,fe=Math.floor(k/65536),On=k-65536*fe,k=cn+fe+65535,fe=Math.floor(k/65536),cn=k-65536*fe,k=zt+fe+65535,fe=Math.floor(k/65536),zt=k-65536*fe,k=Wt+fe+65535,fe=Math.floor(k/65536),Wt=k-65536*fe,vt+=fe-1+37*(fe-1),fe=1,k=vt+fe+65535,fe=Math.floor(k/65536),vt=k-65536*fe,k=dt+fe+65535,fe=Math.floor(k/65536),dt=k-65536*fe,k=Pt+fe+65535,fe=Math.floor(k/65536),Pt=k-65536*fe,k=Yt+fe+65535,fe=Math.floor(k/65536),Yt=k-65536*fe,k=Jt+fe+65535,fe=Math.floor(k/65536),Jt=k-65536*fe,k=Ae+fe+65535,fe=Math.floor(k/65536),Ae=k-65536*fe,k=it+fe+65535,fe=Math.floor(k/65536),it=k-65536*fe,k=Rt+fe+65535,fe=Math.floor(k/65536),Rt=k-65536*fe,k=Nt+fe+65535,fe=Math.floor(k/65536),Nt=k-65536*fe,k=Dt+fe+65535,fe=Math.floor(k/65536),Dt=k-65536*fe,k=Vt+fe+65535,fe=Math.floor(k/65536),Vt=k-65536*fe,k=on+fe+65535,fe=Math.floor(k/65536),on=k-65536*fe,k=On+fe+65535,fe=Math.floor(k/65536),On=k-65536*fe,k=cn+fe+65535,fe=Math.floor(k/65536),cn=k-65536*fe,k=zt+fe+65535,fe=Math.floor(k/65536),zt=k-65536*fe,k=Wt+fe+65535,fe=Math.floor(k/65536),Wt=k-65536*fe,vt+=fe-1+37*(fe-1),ge[0]=vt,ge[1]=dt,ge[2]=Pt,ge[3]=Yt,ge[4]=Jt,ge[5]=Ae,ge[6]=it,ge[7]=Rt,ge[8]=Nt,ge[9]=Dt,ge[10]=Vt,ge[11]=on,ge[12]=On,ge[13]=cn,ge[14]=zt,ge[15]=Wt}function Ne(ge,be){te(ge,be,be)}function Ce(ge,be){const ae=new Uint8Array(32),k=new Float64Array(80),fe=s(),vt=s(),dt=s(),Pt=s(),Yt=s(),Jt=s();for(let Nt=0;Nt<31;Nt++)ae[Nt]=ge[Nt];ae[31]=127&ge[31]|64,ae[0]&=248,function(ge,be){for(let ae=0;ae<16;ae++)ge[ae]=be[2*ae]+(be[2*ae+1]<<8);ge[15]&=32767}(k,be);for(let Nt=0;Nt<16;Nt++)vt[Nt]=k[Nt];fe[0]=Pt[0]=1;for(let Nt=254;Nt>=0;--Nt){const Dt=ae[Nt>>>3]>>>(7&Nt)&1;I(fe,vt,Dt),I(dt,Pt,Dt),G(Yt,fe,dt),he(fe,fe,dt),G(dt,vt,Pt),he(vt,vt,Pt),Ne(Pt,Yt),Ne(Jt,fe),te(fe,dt,fe),te(dt,vt,Yt),G(Yt,fe,dt),he(fe,fe,dt),Ne(vt,fe),he(dt,Pt,Jt),te(fe,dt,g),G(fe,fe,Pt),te(dt,dt,fe),te(fe,Pt,Jt),te(Pt,vt,k),Ne(vt,Yt),I(fe,vt,Dt),I(dt,Pt,Dt)}for(let Nt=0;Nt<16;Nt++)k[Nt+16]=fe[Nt],k[Nt+32]=dt[Nt],k[Nt+48]=vt[Nt],k[Nt+64]=Pt[Nt];const Ae=k.subarray(32),it=k.subarray(16);(function(ge,be){const ae=s();for(let k=0;k<16;k++)ae[k]=be[k];for(let k=253;k>=0;k--)Ne(ae,ae),2!==k&&4!==k&&te(ae,ae,be);for(let k=0;k<16;k++)ge[k]=ae[k]})(Ae,Ae),te(it,it,Ae);const Rt=new Uint8Array(32);return function(ge,be){const ae=s(),k=s();for(let fe=0;fe<16;fe++)k[fe]=be[fe];S(k),S(k),S(k);for(let fe=0;fe<2;fe++){ae[0]=k[0]-65517;for(let dt=1;dt<15;dt++)ae[dt]=k[dt]-65535-(ae[dt-1]>>16&1),ae[dt-1]&=65535;ae[15]=k[15]-32767-(ae[14]>>16&1);const vt=ae[15]>>16&1;ae[14]&=65535,I(k,ae,1-vt)}for(let fe=0;fe<16;fe++)ge[2*fe]=255&k[fe],ge[2*fe+1]=k[fe]>>8}(Rt,it),Rt}function lt(ge){return Ce(ge,u)}function Ot(ge){if(ge.length!==n.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${n.SECRET_KEY_LENGTH} bytes`);const be=new Uint8Array(ge);return{publicKey:lt(be),secretKey:be}}n.scalarMult=Ce,n.scalarMultBase=lt,n.generateKeyPairFromSeed=Ot,n.generateKeyPair=function(ge){const be=(0,e.randomBytes)(32,ge),ae=Ot(be);return(0,r.wipe)(be),ae},n.sharedKey=function(ge,be,ae=!1){if(ge.length!==n.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(be.length!==n.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const k=Ce(ge,be);if(ae){let fe=0;for(let vt=0;vt<k.length;vt++)fe|=k[vt];if(0===fe)throw new Error("X25519: invalid shared key")}return k}}(Mf);var Lf=function(n,e,r){if(r||2===arguments.length)for(var s,u=0,g=e.length;u<g;u++)(s||!(u in e))&&(s||(s=Array.prototype.slice.call(e,0,u)),s[u]=e[u]);return n.concat(s||Array.prototype.slice.call(e))},i0=function(e,r,s){this.name=e,this.version=r,this.os=s,this.type="browser"},o0=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},s0=function(e,r,s,u){this.name=e,this.version=r,this.os=s,this.bot=u,this.type="bot-device"},sm=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},a0=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},am=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,c0=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],Rh=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function l0(n){return n?f0(n):typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new a0:typeof navigator<"u"?f0(navigator.userAgent):typeof process<"u"&&process.version?new o0(process.version.slice(1)):null}function f0(n){var e=function(n){return""!==n&&c0.reduce(function(e,r){var s=r[0];if(e)return e;var g=r[1].exec(n);return!!g&&[s,g]},!1)}(n);if(!e)return null;var r=e[0],s=e[1];if("searchbot"===r)return new sm;var u=s[1]&&s[1].split(".").join("_").split("_").slice(0,3);u?u.length<3&&(u=Lf(Lf([],u,!0),function(n){for(var e=[],r=0;r<n;r++)e.push("0");return e}(3-u.length),!0)):u=[];var g=u.join("."),S=function(n){for(var e=0,r=Rh.length;e<r;e++){var s=Rh[e],u=s[0];if(s[1].exec(n))return u}return null}(n),I=am.exec(n);return I&&I[1]?new s0(r,g,S,I[1]):new i0(r,g,S)}var vr={};function ea(n){let e;return typeof window<"u"&&typeof window[n]<"u"&&(e=window[n]),e}function wc(n){const e=ea(n);if(!e)throw new Error(`${n} is not defined in Window`);return e}Object.defineProperty(vr,"__esModule",{value:!0}),vr.getLocalStorage=vr.getLocalStorageOrThrow=vr.getCrypto=vr.getCryptoOrThrow=Ch=vr.getLocation=vr.getLocationOrThrow=Ih=vr.getNavigator=vr.getNavigatorOrThrow=Df=vr.getDocument=vr.getDocumentOrThrow=vr.getFromWindowOrThrow=vr.getFromWindow=void 0,vr.getFromWindow=ea,vr.getFromWindowOrThrow=wc,vr.getDocumentOrThrow=function(){return wc("document")};var Df=vr.getDocument=function(){return ea("document")};vr.getNavigatorOrThrow=function(){return wc("navigator")};var Ih=vr.getNavigator=function(){return ea("navigator")};vr.getLocationOrThrow=function(){return wc("location")};var Ch=vr.getLocation=function(){return ea("location")};vr.getCryptoOrThrow=function(){return wc("crypto")},vr.getCrypto=function(){return ea("crypto")},vr.getLocalStorageOrThrow=function(){return wc("localStorage")},vr.getLocalStorage=function(){return ea("localStorage")};var Ol={};Object.defineProperty(Ol,"__esModule",{value:!0});var Ph=Ol.getWindowMetadata=void 0;const jf=vr;Ph=Ol.getWindowMetadata=function(){let n,e;try{n=jf.getDocumentOrThrow(),e=jf.getLocationOrThrow()}catch{return null}function s(...I){const F=n.getElementsByTagName("meta");for(let A=0;A<F.length;A++){const G=F[A],he=["itemprop","property","name"].map(te=>G.getAttribute(te)).filter(te=>!!te&&I.includes(te));if(he.length&&he){const te=G.getAttribute("content");if(te)return te}}return""}const S=function(){let I=s("name","og:site_name","og:title","twitter:title");return I||(I=n.title),I}();return{description:s("description","og:description","twitter:description","keywords"),url:e.origin,icons:function(){const I=n.getElementsByTagName("link"),F=[];for(let A=0;A<I.length;A++){const G=I[A],he=G.getAttribute("rel");if(he&&he.toLowerCase().indexOf("icon")>-1){const te=G.getAttribute("href");if(te)if(-1===te.toLowerCase().indexOf("https:")&&-1===te.toLowerCase().indexOf("http:")&&0!==te.indexOf("//")){let Ne=e.protocol+"//"+e.host;if(0===te.indexOf("/"))Ne+=te;else{const se=e.pathname.split("/");se.pop(),Ne+=se.join("/")+"/"+te}F.push(Ne)}else 0===te.indexOf("//")?F.push(e.protocol+te):F.push(te)}}return F}(),name:S}};var Ec={},w0=n=>encodeURIComponent(n).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),zf="%[a-f0-9]{2}",kh=new RegExp("("+zf+")|([^%]+?)","gi"),Nh=new RegExp("("+zf+")+","gi");function xl(n,e){try{return[decodeURIComponent(n.join(""))]}catch{}if(1===n.length)return n;var r=n.slice(0,e=e||1),s=n.slice(e);return Array.prototype.concat.call([],xl(r),xl(s))}function Ah(n){try{return decodeURIComponent(n)}catch{for(var e=n.match(kh)||[],r=1;r<e.length;r++)e=(n=xl(e,r).join("")).match(kh)||[];return n}}var Th=function(n){if("string"!=typeof n)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return n=n.replace(/\+/g," "),decodeURIComponent(n)}catch{return function(n){for(var e={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},r=Nh.exec(n);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch{var s=Ah(r[0]);s!==r[0]&&(e[r[0]]=s)}r=Nh.exec(n)}e["%C2"]="\ufffd";for(var u=Object.keys(e),g=0;g<u.length;g++){var S=u[g];n=n.replace(new RegExp(S,"g"),e[S])}return n}(n)}},Bf=(n,e)=>{if("string"!=typeof n||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[n];const r=n.indexOf(e);return-1===r?[n]:[n.slice(0,r),n.slice(r+e.length)]},S0=function(n,e){for(var r={},s=Object.keys(n),u=Array.isArray(e),g=0;g<s.length;g++){var S=s[g],I=n[S];(u?-1!==e.indexOf(S):e(S,I,n))&&(r[S]=I)}return r};!function(n){const e=w0,r=Th,s=Bf,u=S0,S=Symbol("encodeFragmentIdentifier");function A(Te){if("string"!=typeof Te||1!==Te.length)throw new TypeError("arrayFormatSeparator must be single character string")}function G(Te,Ue){return Ue.encode?Ue.strict?e(Te):encodeURIComponent(Te):Te}function he(Te,Ue){return Ue.decode?r(Te):Te}function te(Te){return Array.isArray(Te)?Te.sort():"object"==typeof Te?te(Object.keys(Te)).sort((Ue,ge)=>Number(Ue)-Number(ge)).map(Ue=>Te[Ue]):Te}function Ne(Te){const Ue=Te.indexOf("#");return-1!==Ue&&(Te=Te.slice(0,Ue)),Te}function Ce(Te){const Ue=(Te=Ne(Te)).indexOf("?");return-1===Ue?"":Te.slice(Ue+1)}function lt(Te,Ue){return Ue.parseNumbers&&!Number.isNaN(Number(Te))&&"string"==typeof Te&&""!==Te.trim()?Te=Number(Te):Ue.parseBooleans&&null!==Te&&("true"===Te.toLowerCase()||"false"===Te.toLowerCase())&&(Te="true"===Te.toLowerCase()),Te}function Ot(Te,Ue){A((Ue=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},Ue)).arrayFormatSeparator);const ge=function(Te){let Ue;switch(Te.arrayFormat){case"index":return(ge,be,ae)=>{Ue=/\[(\d*)\]$/.exec(ge),ge=ge.replace(/\[\d*\]$/,""),Ue?(void 0===ae[ge]&&(ae[ge]={}),ae[ge][Ue[1]]=be):ae[ge]=be};case"bracket":return(ge,be,ae)=>{Ue=/(\[\])$/.exec(ge),ae[ge=ge.replace(/\[\]$/,"")]=Ue?void 0!==ae[ge]?[].concat(ae[ge],be):[be]:be};case"colon-list-separator":return(ge,be,ae)=>{Ue=/(:list)$/.exec(ge),ae[ge=ge.replace(/:list$/,"")]=Ue?void 0!==ae[ge]?[].concat(ae[ge],be):[be]:be};case"comma":case"separator":return(ge,be,ae)=>{const k="string"==typeof be&&be.includes(Te.arrayFormatSeparator),fe="string"==typeof be&&!k&&he(be,Te).includes(Te.arrayFormatSeparator);be=fe?he(be,Te):be;const vt=k||fe?be.split(Te.arrayFormatSeparator).map(dt=>he(dt,Te)):null===be?be:he(be,Te);ae[ge]=vt};case"bracket-separator":return(ge,be,ae)=>{const k=/(\[\])$/.test(ge);if(ge=ge.replace(/\[\]$/,""),!k)return void(ae[ge]=be&&he(be,Te));const fe=null===be?[]:be.split(Te.arrayFormatSeparator).map(vt=>he(vt,Te));ae[ge]=void 0!==ae[ge]?[].concat(ae[ge],fe):fe};default:return(ge,be,ae)=>{ae[ge]=void 0!==ae[ge]?[].concat(ae[ge],be):be}}}(Ue),be=Object.create(null);if("string"!=typeof Te||!(Te=Te.trim().replace(/^[?#&]/,"")))return be;for(const ae of Te.split("&")){if(""===ae)continue;let[k,fe]=s(Ue.decode?ae.replace(/\+/g," "):ae,"=");fe=void 0===fe?null:["comma","separator","bracket-separator"].includes(Ue.arrayFormat)?fe:he(fe,Ue),ge(he(k,Ue),fe,be)}for(const ae of Object.keys(be)){const k=be[ae];if("object"==typeof k&&null!==k)for(const fe of Object.keys(k))k[fe]=lt(k[fe],Ue);else be[ae]=lt(k,Ue)}return!1===Ue.sort?be:(!0===Ue.sort?Object.keys(be).sort():Object.keys(be).sort(Ue.sort)).reduce((ae,k)=>{const fe=be[k];return ae[k]=fe&&"object"==typeof fe&&!Array.isArray(fe)?te(fe):fe,ae},Object.create(null))}n.extract=Ce,n.parse=Ot,n.stringify=(Te,Ue)=>{if(!Te)return"";A((Ue=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},Ue)).arrayFormatSeparator);const ge=fe=>Ue.skipNull&&(Te=>null==Te)(Te[fe])||Ue.skipEmptyString&&""===Te[fe],be=function(Te){switch(Te.arrayFormat){case"index":return Ue=>(ge,be)=>{const ae=ge.length;return void 0===be||Te.skipNull&&null===be||Te.skipEmptyString&&""===be?ge:null===be?[...ge,[G(Ue,Te),"[",ae,"]"].join("")]:[...ge,[G(Ue,Te),"[",G(ae,Te),"]=",G(be,Te)].join("")]};case"bracket":return Ue=>(ge,be)=>void 0===be||Te.skipNull&&null===be||Te.skipEmptyString&&""===be?ge:null===be?[...ge,[G(Ue,Te),"[]"].join("")]:[...ge,[G(Ue,Te),"[]=",G(be,Te)].join("")];case"colon-list-separator":return Ue=>(ge,be)=>void 0===be||Te.skipNull&&null===be||Te.skipEmptyString&&""===be?ge:null===be?[...ge,[G(Ue,Te),":list="].join("")]:[...ge,[G(Ue,Te),":list=",G(be,Te)].join("")];case"comma":case"separator":case"bracket-separator":{const Ue="bracket-separator"===Te.arrayFormat?"[]=":"=";return ge=>(be,ae)=>void 0===ae||Te.skipNull&&null===ae||Te.skipEmptyString&&""===ae?be:(ae=null===ae?"":ae,0===be.length?[[G(ge,Te),Ue,G(ae,Te)].join("")]:[[be,G(ae,Te)].join(Te.arrayFormatSeparator)])}default:return Ue=>(ge,be)=>void 0===be||Te.skipNull&&null===be||Te.skipEmptyString&&""===be?ge:null===be?[...ge,G(Ue,Te)]:[...ge,[G(Ue,Te),"=",G(be,Te)].join("")]}}(Ue),ae={};for(const fe of Object.keys(Te))ge(fe)||(ae[fe]=Te[fe]);const k=Object.keys(ae);return!1!==Ue.sort&&k.sort(Ue.sort),k.map(fe=>{const vt=Te[fe];return void 0===vt?"":null===vt?G(fe,Ue):Array.isArray(vt)?0===vt.length&&"bracket-separator"===Ue.arrayFormat?G(fe,Ue)+"[]":vt.reduce(be(fe),[]).join("&"):G(fe,Ue)+"="+G(vt,Ue)}).filter(fe=>fe.length>0).join("&")},n.parseUrl=(Te,Ue)=>{Ue=Object.assign({decode:!0},Ue);const[ge,be]=s(Te,"#");return Object.assign({url:ge.split("?")[0]||"",query:Ot(Ce(Te),Ue)},Ue&&Ue.parseFragmentIdentifier&&be?{fragmentIdentifier:he(be,Ue)}:{})},n.stringifyUrl=(Te,Ue)=>{Ue=Object.assign({encode:!0,strict:!0,[S]:!0},Ue);const ge=Ne(Te.url).split("?")[0]||"",be=n.extract(Te.url),ae=n.parse(be,{sort:!1}),k=Object.assign(ae,Te.query);let fe=n.stringify(k,Ue);fe&&(fe=`?${fe}`);let vt=function(Te){let Ue="";const ge=Te.indexOf("#");return-1!==ge&&(Ue=Te.slice(ge)),Ue}(Te.url);return Te.fragmentIdentifier&&(vt=`#${Ue[S]?G(Te.fragmentIdentifier,Ue):Te.fragmentIdentifier}`),`${ge}${fe}${vt}`},n.pick=(Te,Ue,ge)=>{ge=Object.assign({parseFragmentIdentifier:!0,[S]:!1},ge);const{url:be,query:ae,fragmentIdentifier:k}=n.parseUrl(Te,ge);return n.stringifyUrl({url:be,query:u(ae,Ue),fragmentIdentifier:k},ge)},n.exclude=(Te,Ue,ge)=>{const be=Array.isArray(Ue)?ae=>!Ue.includes(ae):(ae,k)=>!Ue(ae,k);return n.pick(Te,be,ge)}}(Ec);const Mh={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};function ws(n,e){return n.includes(":")?[n]:e.chains||[]}const hr="base16",Lh="base64pad",Uh="utf8";function yu(){return mi(Ju.randomBytes(32),hr)}function mu(n){return mi(Sl.hash(Li(n,Uh)),hr)}function Oc(n){return Number(mi(n,"base10"))}function jh(n){const e=function(n){return Li(`${n}`,"base10")}(typeof n.type<"u"?n.type:0);if(1===Oc(e)&&typeof n.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof n.senderPublicKey<"u"?Li(n.senderPublicKey,hr):void 0,s=typeof n.iv<"u"?Li(n.iv,hr):Ju.randomBytes(12);return function(n){if(1===Oc(n.type)){if(typeof n.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return mi(Pr([n.type,n.senderPublicKey,n.iv,n.sealed]),Lh)}return mi(Pr([n.type,n.iv,n.sealed]),Lh)}({type:e,sealed:new gu.ChaCha20Poly1305(Li(n.symKey,hr)).seal(s,Li(n.message,Uh)),iv:s,senderPublicKey:r})}function _o(n){const e=Li(n,Lh),r=e.slice(0,1);if(1===Oc(r)){const S=33,I=S+12,F=e.slice(1,S),A=e.slice(S,I);return{type:r,sealed:e.slice(I),iv:A,senderPublicKey:F}}const g=e.slice(1,13);return{type:r,sealed:e.slice(13),iv:g}}function Bh(n){const e=n?.type||0;if(1===e){if(typeof n?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof n?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:n?.senderPublicKey,receiverPublicKey:n?.receiverPublicKey}}function Fh(n){return 1===n.type&&"string"==typeof n.senderPublicKey&&"string"==typeof n.receiverPublicKey}var Es=Object.defineProperty,Hh=Object.getOwnPropertySymbols,ta=Object.prototype.hasOwnProperty,fm=Object.prototype.propertyIsEnumerable,qh=(n,e,r)=>e in n?Es(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,$h=(n,e)=>{for(var r in e||(e={}))ta.call(e,r)&&qh(n,r,e[r]);if(Hh)for(var r of Hh(e))fm.call(e,r)&&qh(n,r,e[r]);return n};const ro_reactNative="react-native",ro_node="node",ro_browser="browser",ro_unknown="unknown",C0="js";function Vh(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function na(){return!Df()&&!!Ih()&&"ReactNative"===navigator.product}function Pa(){return!Vh()&&!!Ih()&&!!Df()}function Di(){return na()?ro_reactNative:Vh()?ro_node:Pa()?ro_browser:ro_unknown}function xc(n,e,r){const s=function(){if(Di()===ro_reactNative&&typeof wr<"u"&&typeof(null==wr?void 0:wr.Platform)<"u"){const{OS:r,Version:s}=wr.Platform;return[r,s].join("-")}const n=l0();if(null===n)return"unknown";const e=n.os?n.os.replace(" ","").toLowerCase():"unknown";return"browser"===n.type?[e,n.name,n.version].join("-"):[e,n.version].join("-")}(),u=function(){var n;const e=Di();return e===ro_browser?[e,(null==(n=Ch())?void 0:n.host)||"unknown"].join(":"):e}();return[[n,e].join("-"),[C0,r].join("-"),s,u].join("/")}function li({protocol:n,version:e,relayUrl:r,sdkVersion:s,auth:u,projectId:g,useOnCloseEvent:S,bundleId:I}){const F=r.split("?"),A={auth:u,ua:xc(n,e,s),projectId:g,useOnCloseEvent:S||void 0,origin:I||void 0},G=function(n,e){let r=Ec.parse(n);return r=$h($h({},r),e),Ec.stringify(r)}(F[1]||"",A);return F[0]+"?"+G}function is(n,e){return n.filter(r=>e.includes(r)).length===n.length}function ka(n){return Object.fromEntries(n.entries())}function Il(n){return new Map(Object.entries(n))}function Na(n=Gt.FIVE_MINUTES,e){const r=Gt.toMiliseconds(n||Gt.FIVE_MINUTES);let s,u,g;return{resolve:S=>{g&&s&&(clearTimeout(g),s(S))},reject:S=>{g&&u&&(clearTimeout(g),u(S))},done:()=>new Promise((S,I)=>{g=setTimeout(()=>{I(new Error(e))},r),s=S,u=I})}}function ra(n,e,r){return new Promise(function(){var s=ue(function*(u,g){const S=setTimeout(()=>g(new Error(r)),e);try{u(yield n)}catch(I){g(I)}clearTimeout(S)});return function(u,g){return s.apply(this,arguments)}}())}function io(n,e){if("string"==typeof e&&e.startsWith(`${n}:`))return e;if("topic"===n.toLowerCase()){if("string"!=typeof e)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}if("id"===n.toLowerCase()){if("number"!=typeof e)throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${n}`)}function ia(n){const[e,r]=n.split(":"),s={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof r)s.topic=r;else{if("id"!==e||!Number.isInteger(Number(r)))throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);s.id=Number(r)}return s}function oo(n,e){return Gt.fromMiliseconds((e||Date.now())+Gt.toMiliseconds(n))}function Ss(n){return Date.now()>=Gt.toMiliseconds(n)}function Or(n,e){return`${n}${e?`:${e}`:""}`}function Ic(n=[],e=[]){return[...new Set([...n,...e])]}function Cc(){return(Cc=ue(function*({id:n,topic:e,wcDeepLink:r}){try{if(!r)return;let u=("string"==typeof r?JSON.parse(r):r)?.href;if("string"!=typeof u)return;u.endsWith("/")&&(u=u.slice(0,-1));const g=`${u}/wc?requestId=${n}&sessionTopic=${e}`,S=Di();S===ro_browser?g.startsWith("https://")?window.open(g,"_blank","noreferrer noopener"):window.open(g,"_self","noreferrer noopener"):S===ro_reactNative&&typeof(null==wr?void 0:wr.Linking)<"u"&&(yield wr.Linking.openURL(g))}catch(s){console.error(s)}})).apply(this,arguments)}function Pl(){return(Pl=ue(function*(n,e){try{return(yield n.getItem(e))||(Pa()?localStorage.getItem(e):void 0)}catch(r){console.error(r)}})).apply(this,arguments)}function Pc(n){return n?.relay||{protocol:"irn"}}function wi(n){const e=Mh[n];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${n}`);return e}var Ta=Object.defineProperty,Uo=Object.getOwnPropertySymbols,so=Object.prototype.hasOwnProperty,P0=Object.prototype.propertyIsEnumerable,Vf=(n,e,r)=>e in n?Ta(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r;function Ma(n,e="-"){const r={},s="relay"+e;return Object.keys(n).forEach(u=>{if(u.startsWith(s)){const g=u.replace(s,"");r[g]=n[u]}}),r}function Gh(n){const e=(n=(n=n.includes("wc://")?n.replace("wc://",""):n).includes("wc:")?n.replace("wc:",""):n).indexOf(":"),r=-1!==n.indexOf("?")?n.indexOf("?"):void 0,s=n.substring(0,e),u=n.substring(e+1,r).split("@"),g=typeof r<"u"?n.substring(r):"",S=Ec.parse(g);return{protocol:s,topic:Yh(u[0]),version:parseInt(u[1],10),symKey:S.symKey,relay:Ma(S)}}function Yh(n){return n.startsWith("//")?n.substring(2):n}function Qh(n){return`${n.protocol}:${n.topic}@${n.version}?`+Ec.stringify(((n,e)=>{for(var r in e||(e={}))so.call(e,r)&&Vf(n,r,e[r]);if(Uo)for(var r of Uo(e))P0.call(e,r)&&Vf(n,r,e[r]);return n})({symKey:n.symKey},function(n,e="-"){const s={};return Object.keys(n).forEach(u=>{n[u]&&(s["relay"+e+u]=n[u])}),s}(n.relay)))}function Do(n){const e=[];return n.forEach(r=>{const[s,u]=r.split(":");e.push(`${s}:${u}`)}),e}function Xh(n){return n.includes(":")}function kl(n){return Xh(n)?n.split(":")[0]:n}const A0={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},T0={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Ut(n,e){const{message:r,code:s}=T0[n];return{message:e?`${r} ${e}`:r,code:s}}function Nr(n,e){const{message:r,code:s}=A0[n];return{message:e?`${r} ${e}`:r,code:s}}function La(n,e){return!!Array.isArray(n)&&(!(typeof e<"u"&&n.length)||n.every(e))}function xr(n){return Object.getPrototypeOf(n)===Object.prototype&&Object.keys(n).length}function Vi(n){return typeof n>"u"}function fi(n,e){return!(!e||!Vi(n))||"string"==typeof n&&!!n.trim().length}function Zh(n,e){return!(!e||!Vi(n))||"number"==typeof n&&!isNaN(n)}function Nl(n){return!(!fi(n,!1)||!n.includes(":"))&&2===n.split(":").length}function Da(n){let e=!0;return La(n)?n.length&&(e=n.every(r=>fi(r,!1))):e=!1,e}function tp(n,e,r){let s=null;return Object.entries(n).forEach(([u,g])=>{if(s)return;const S=function(n,e,r){let s=null;return La(e)&&e.length?e.forEach(u=>{s||Nl(u)||(s=Nr("UNSUPPORTED_CHAINS",`${r}, chain ${u} should be a string and conform to "namespace:chainId" format`))}):Nl(n)||(s=Nr("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),s}(u,ws(u,g),`${e} ${r}`);S&&(s=S)}),s}function np(n,e){let r=null;return La(n)?n.forEach(s=>{r||function(n){if(fi(n,!1)&&n.includes(":")){const e=n.split(":");if(3===e.length){const r=e[0]+":"+e[1];return!!e[2]&&Nl(r)}}return!1}(s)||(r=Nr("UNSUPPORTED_ACCOUNTS",`${e}, account ${s} should be a string and conform to "namespace:chainId:address" format`))}):r=Nr("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function ip(n,e){let r=null;return Object.values(n).forEach(s=>{if(r)return;const u=function(n,e){let r=null;return Da(n?.methods)?Da(n?.events)||(r=Nr("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Nr("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}(s,`${e}, namespace`);u&&(r=u)}),r}function _u(n,e){let r=null;if(n&&xr(n)){const s=ip(n,e);s&&(r=s);const u=function(n,e){let r=null;return Object.values(n).forEach(s=>{if(r)return;const u=np(s?.accounts,`${e} namespace`);u&&(r=u)}),r}(n,e);u&&(r=u)}else r=Ut("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function Al(n){return fi(n.protocol,!0)}function Wi(n){return typeof n<"u"&&null!==typeof n}function up(n,e){return!(!Nl(e)||!function(n){const e=[];return Object.values(n).forEach(r=>{e.push(...Do(r.accounts))}),e}(n).includes(e))}function Jf(n,e,r){return!!fi(r,!1)&&function(n,e){const r=[];return Object.values(n).forEach(s=>{Do(s.accounts).includes(e)&&r.push(...s.methods)}),r}(n,e).includes(r)}function gm(n,e,r){return!!fi(r,!1)&&function(n,e){const r=[];return Object.values(n).forEach(s=>{Do(s.accounts).includes(e)&&r.push(...s.events)}),r}(n,e).includes(r)}function kc(n,e,r){let s=null;const u=function(n){const e={};return Object.keys(n).forEach(r=>{var s;r.includes(":")?e[r]=n[r]:null==(s=n[r].chains)||s.forEach(u=>{e[u]={methods:n[r].methods,events:n[r].events}})}),e}(n),g=function(n){const e={};return Object.keys(n).forEach(r=>{r.includes(":")?e[r]=n[r]:Do(n[r].accounts)?.forEach(u=>{e[u]={accounts:n[r].accounts.filter(g=>g.includes(`${u}:`)),methods:n[r].methods,events:n[r].events}})}),e}(e),S=Object.keys(u),I=Object.keys(g),F=Tl(Object.keys(n)),A=Tl(Object.keys(e)),G=F.filter(he=>!A.includes(he));return G.length&&(s=Ut("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n Required: ${G.toString()}\n Received: ${Object.keys(e).toString()}`)),is(S,I)||(s=Ut("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.\n Required: ${S.toString()}\n Approved: ${I.toString()}`)),Object.keys(e).forEach(he=>{if(!he.includes(":")||s)return;const te=Do(e[he].accounts);te.includes(he)||(s=Ut("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${he}\n Required: ${he}\n Approved: ${te.toString()}`))}),S.forEach(he=>{s||(is(u[he].methods,g[he].methods)?is(u[he].events,g[he].events)||(s=Ut("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${he}`)):s=Ut("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${he}`))}),s}function Tl(n){return[...new Set(n.map(e=>e.includes(":")?e.split(":")[0]:e))]}function l(){const n=Di();return new Promise(e=>{switch(n){case ro_browser:e(Pa()&&navigator?.onLine);break;case ro_reactNative:e(function(){return U.apply(this,arguments)}());break;default:e(!0)}})}function U(){return(U=ue(function*(){return!(na()&&typeof wr<"u"&&null!=wr&&wr.NetInfo)||(yield null==wr?void 0:wr.NetInfo.fetch())?.isConnected})).apply(this,arguments)}function _e(n){switch(Di()){case ro_browser:!function(n){!na()&&Pa()&&(window.addEventListener("online",()=>n(!0)),window.addEventListener("offline",()=>n(!1)))}(n);break;case ro_reactNative:!function(n){na()&&typeof wr<"u"&&null!=wr&&wr.NetInfo&&wr?.NetInfo.addEventListener(e=>n(e?.isConnected))}(n)}}const et={};class st{static get(e){return et[e]}static set(e,r){et[e]=r}static delete(e){delete et[e]}}const nt="INTERNAL_ERROR",ut="SERVER_ERROR",wt=[-32700,-32600,-32601,-32602,-32603],St={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[nt]:{code:-32603,message:"Internal error"},[ut]:{code:-32e3,message:"Server error"}},ot=ut;function tt(n){return Object.keys(St).includes(n)?St[n]:St[ot]}function $t(n,e,r){return n.message.includes("getaddrinfo ENOTFOUND")||n.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):n}var bn={},qt=function(n,e){return(qt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var u in s)s.hasOwnProperty(u)&&(r[u]=s[u])})(n,e)};var dn=function(){return dn=Object.assign||function(n){for(var e,r=1,s=arguments.length;r<s;r++)for(var u in e=arguments[r])Object.prototype.hasOwnProperty.call(e,u)&&(n[u]=e[u]);return n},dn.apply(this,arguments)};function Xf(n){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&n[e],s=0;if(r)return r.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function uw(n,e){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var s,u,g=r.call(n),S=[];try{for(;(void 0===e||e-- >0)&&!(s=g.next()).done;)S.push(s.value)}catch(I){u={error:I}}finally{try{s&&!s.done&&(r=g.return)&&r.call(g)}finally{if(u)throw u.error}}return S}function cp(n){return this instanceof cp?(this.v=n,this):new cp(n)}var cw,$S=v(Object.freeze({__proto__:null,__extends:function(n,e){function r(){this.constructor=n}qt(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},get __assign(){return dn},__rest:function(n,e){var r={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(r[s]=n[s]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(s=Object.getOwnPropertySymbols(n);u<s.length;u++)e.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(n,s[u])&&(r[s[u]]=n[s[u]])}return r},__decorate:function(n,e,r,s){var u,g=arguments.length,S=g<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)S=Reflect.decorate(n,e,r,s);else for(var I=n.length-1;I>=0;I--)(u=n[I])&&(S=(g<3?u(S):g>3?u(e,r,S):u(e,r))||S);return g>3&&S&&Object.defineProperty(e,r,S),S},__param:function(n,e){return function(r,s){e(r,s,n)}},__metadata:function(n,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,e)},__awaiter:function(n,e,r,s){return new(r||(r=Promise))(function(g,S){function I(G){try{A(s.next(G))}catch(he){S(he)}}function F(G){try{A(s.throw(G))}catch(he){S(he)}}function A(G){G.done?g(G.value):function(g){return g instanceof r?g:new r(function(S){S(g)})}(G.value).then(I,F)}A((s=s.apply(n,e||[])).next())})},__generator:function(n,e){var r,s,u,g,S={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return g={next:I(0),throw:I(1),return:I(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function I(A){return function(G){return function(A){if(r)throw new TypeError("Generator is already executing.");for(;S;)try{if(r=1,s&&(u=2&A[0]?s.return:A[0]?s.throw||((u=s.return)&&u.call(s),0):s.next)&&!(u=u.call(s,A[1])).done)return u;switch(s=0,u&&(A=[2&A[0],u.value]),A[0]){case 0:case 1:u=A;break;case 4:return S.label++,{value:A[1],done:!1};case 5:S.label++,s=A[1],A=[0];continue;case 7:A=S.ops.pop(),S.trys.pop();continue;default:if(!(u=(u=S.trys).length>0&&u[u.length-1])&&(6===A[0]||2===A[0])){S=0;continue}if(3===A[0]&&(!u||A[1]>u[0]&&A[1]<u[3])){S.label=A[1];break}if(6===A[0]&&S.label<u[1]){S.label=u[1],u=A;break}if(u&&S.label<u[2]){S.label=u[2],S.ops.push(A);break}u[2]&&S.ops.pop(),S.trys.pop();continue}A=e.call(n,S)}catch(G){A=[6,G],s=0}finally{r=u=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([A,G])}}},__createBinding:function(n,e,r,s){void 0===s&&(s=r),n[s]=e[r]},__exportStar:function(n,e){for(var r in n)"default"!==r&&!e.hasOwnProperty(r)&&(e[r]=n[r])},__values:Xf,__read:uw,__spread:function(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(uw(arguments[e]));return n},__spreadArrays:function(){for(var n=0,e=0,r=arguments.length;e<r;e++)n+=arguments[e].length;var s=Array(n),u=0;for(e=0;e<r;e++)for(var g=arguments[e],S=0,I=g.length;S<I;S++,u++)s[u]=g[S];return s},__await:cp,__asyncGenerator:function(n,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,u=r.apply(n,e||[]),g=[];return s={},S("next"),S("throw"),S("return"),s[Symbol.asyncIterator]=function(){return this},s;function S(te){u[te]&&(s[te]=function(Ne){return new Promise(function(se,Ce){g.push([te,Ne,se,Ce])>1||I(te,Ne)})})}function I(te,Ne){try{!function(te){te.value instanceof cp?Promise.resolve(te.value.v).then(A,G):he(g[0][2],te)}(u[te](Ne))}catch(se){he(g[0][3],se)}}function A(te){I("next",te)}function G(te){I("throw",te)}function he(te,Ne){te(Ne),g.shift(),g.length&&I(g[0][0],g[0][1])}},__asyncDelegator:function(n){var e,r;return e={},s("next"),s("throw",function(u){throw u}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(u,g){e[u]=n[u]?function(S){return(r=!r)?{value:cp(n[u](S)),done:"return"===u}:g?g(S):S}:g}},__asyncValues:function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=n[Symbol.asyncIterator];return r?r.call(n):(n=Xf(n),e={},s("next"),s("throw"),s("return"),e[Symbol.asyncIterator]=function(){return this},e);function s(g){e[g]=n[g]&&function(S){return new Promise(function(I,F){!function(g,S,I,F){Promise.resolve(F).then(function(A){g({value:A,done:I})},S)}(I,F,(S=n[g](S)).done,S.value)})}}},__makeTemplateObject:function(n,e){return Object.defineProperty?Object.defineProperty(n,"raw",{value:e}):n.raw=e,n},__importStar:function(n){if(n&&n.__esModule)return n;var e={};if(null!=n)for(var r in n)Object.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e.default=n,e},__importDefault:function(n){return n&&n.__esModule?n:{default:n}},__classPrivateFieldGet:function(n,e){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return e.get(n)},__classPrivateFieldSet:function(n,e,r){if(!e.has(n))throw new TypeError("attempted to set private field on non-instance");return e.set(n,r),r}})),bu={};var lw,wu={};function _m(n=3){return Date.now()*Math.pow(10,n)+Math.floor(Math.random()*Math.pow(10,n))}function fw(n=6){return BigInt(_m(n))}function Zf(n,e,r){return{id:r||_m(),jsonrpc:"2.0",method:n,params:e}}function j0(n,e){return{id:n,jsonrpc:"2.0",result:e}}function z0(n,e,r){return{id:n,jsonrpc:"2.0",error:KS(e,r)}}function KS(n,e){return typeof n>"u"?tt(nt):("string"==typeof n&&(n=Object.assign(Object.assign({},tt(ut)),{message:n})),typeof e<"u"&&(n.data=e),function(n){return wt.includes(n)}(n.code)&&(n=function(n){return Object.values(St).find(e=>e.code===n)||St[ot]}(n.code)),n)}!function(n){Object.defineProperty(n,"__esModule",{value:!0});const e=$S;e.__exportStar(function(){if(cw)return bu;function n(){return c?.crypto||c?.msCrypto||{}}function e(){const s=n();return s.subtle||s.webkitSubtle}return cw=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.isBrowserCryptoAvailable=bu.getSubtleCrypto=bu.getBrowerCrypto=void 0,bu.getBrowerCrypto=n,bu.getSubtleCrypto=e,bu.isBrowserCryptoAvailable=function(){return!!n()&&!!e()},bu}(),n),e.__exportStar(function(){if(lw)return wu;function n(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}return lw=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.isBrowser=wu.isNode=wu.isReactNative=void 0,wu.isReactNative=n,wu.isNode=e,wu.isBrowser=function(){return!n()&&!e()},wu}(),n)}(bn);function dw(n,e){const r=function(n){const e=n.match(new RegExp(/^\w+:/,"gi"));if(e&&e.length)return e[0]}(n);return!(typeof r>"u")&&new RegExp(e).test(r)}function hw(n){return dw(n,"^https?:")}function pw(n){return dw(n,"^wss?:")}function e6(n){return new RegExp("wss?://localhost(:d{2,5})?").test(n)}function gw(n){return"object"==typeof n&&"id"in n&&"jsonrpc"in n&&"2.0"===n.jsonrpc}function bm(n){return gw(n)&&"method"in n}function B0(n){return gw(n)&&(Eu(n)||oa(n))}function Eu(n){return"result"in n}function oa(n){return"error"in n}class Su extends class extends class extends class{}{constructor(){super()}}{constructor(e){super()}}{constructor(e){super(e),this.events=new E.exports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}connect(e=this.connection){var r=this;return ue(function*(){yield r.open(e)})()}disconnect(){var e=this;return ue(function*(){yield e.close()})()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}request(e,r){var s=this;return ue(function*(){return s.requestStrict(Zf(e.method,e.params||[],e.id||fw().toString()),r)})()}requestStrict(e,r){var s=this;return ue(function*(){return new Promise(function(){var u=ue(function*(g,S){if(!s.connection.connected)try{yield s.open()}catch(I){S(I)}s.events.on(`${e.id}`,I=>{oa(I)?S(I.error):g(I.result)});try{yield s.connection.send(e,r)}catch(I){S(I)}});return function(g,S){return u.apply(this,arguments)}}())})()}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),B0(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}open(e=this.connection){var r=this;return ue(function*(){r.connection===e&&r.connection.connected||(r.connection.connected&&r.close(),"string"==typeof e&&(yield r.connection.open(e),e=r.connection),r.connection=r.setConnection(e),yield r.connection.open(),r.registerEventListeners(),r.events.emit("connect"))})()}close(){var e=this;return ue(function*(){yield e.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const yw=n=>n.split("?")[0],n6=typeof WebSocket<"u"?WebSocket:typeof wr<"u"&&typeof wr.WebSocket<"u"?wr.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:ew?Zb:(ew=1,Zb=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")});class r6{constructor(e){if(this.url=e,this.events=new E.exports.EventEmitter,this.registering=!1,!pw(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}open(e=this.url){var r=this;return ue(function*(){yield r.register(e)})()}close(){var e=this;return ue(function*(){return new Promise((r,s)=>{typeof e.socket>"u"?s(new Error("Connection already closed")):(e.socket.onclose=u=>{e.onClose(u),r()},e.socket.close())})})()}send(e){var r=this;return ue(function*(){typeof r.socket>"u"&&(r.socket=yield r.register());try{r.socket.send(Qn(e))}catch(s){r.onError(e.id,s)}})()}register(e=this.url){if(!pw(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((s,u)=>{this.events.once("register_error",g=>{this.resetMaxListeners(),u(g)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return u(new Error("WebSocket connection is missing or invalid"));s(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,s)=>{const u=new URLSearchParams(e).get("origin"),g=bn.isReactNative()?{headers:{origin:u}}:{rejectUnauthorized:!e6(e)},S=new n6(e,[],g);typeof WebSocket<"u"||typeof wr<"u"&&typeof wr.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?S.onerror=I=>{s(this.emitError(I.error))}:S.on("error",I=>{s(this.emitError(I))}),S.onopen=()=>{this.onOpen(S),r(S)}})}onOpen(e){e.onmessage=r=>this.onPayload(r),e.onclose=r=>this.onClose(r),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const r="string"==typeof e.data?Vn(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const s=this.parseError(r),u=z0(e,s.message||s.toString());this.events.emit("payload",u)}parseError(e,r=this.url){return $t(e,yw(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const r=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${yw(this.url)}`));return this.events.emit("register_error",r),r}}var wm={exports:{}};!function(n,e){var s="__lodash_hash_undefined__",S=9007199254740991,I="[object Arguments]",F="[object Array]",G="[object Boolean]",he="[object Date]",te="[object Error]",Ne="[object Function]",Ce="[object Map]",lt="[object Number]",Te="[object Object]",Ue="[object Promise]",be="[object RegExp]",ae="[object Set]",k="[object String]",fe="[object Symbol]",dt="[object WeakMap]",Pt="[object ArrayBuffer]",Yt="[object DataView]",cn=/^\[object .+?Constructor\]$/,zt=/^(?:0|[1-9]\d*)$/,Wt={};Wt["[object Float32Array]"]=Wt["[object Float64Array]"]=Wt["[object Int8Array]"]=Wt["[object Int16Array]"]=Wt["[object Int32Array]"]=Wt["[object Uint8Array]"]=Wt["[object Uint8ClampedArray]"]=Wt["[object Uint16Array]"]=Wt["[object Uint32Array]"]=!0,Wt[I]=Wt[F]=Wt[Pt]=Wt[G]=Wt[Yt]=Wt[he]=Wt[te]=Wt[Ne]=Wt[Ce]=Wt[lt]=Wt[Te]=Wt[be]=Wt[ae]=Wt[k]=Wt[dt]=!1;var Nn="object"==typeof c&&c&&c.Object===Object&&c,Je="object"==typeof self&&self&&self.Object===Object&&self,Xe=Nn||Je||Function("return this")(),We=e&&!e.nodeType&&e,j=We&&n&&!n.nodeType&&n,De=j&&j.exports===We,Lt=De&&Nn.process,Ft=function(){try{return Lt&&Lt.binding&&Lt.binding("util")}catch{}}(),sn=Ft&&Ft.isTypedArray;function Jn(me,Ge){for(var Et=-1,Ht=null==me?0:me.length;++Et<Ht;)if(Ge(me[Et],Et,me))return!0;return!1}function Xn(me,Ge){return me.has(Ge)}function Mn(me){var Ge=-1,Et=Array(me.size);return me.forEach(function(Ht,Mr){Et[++Ge]=[Mr,Ht]}),Et}function In(me){var Ge=-1,Et=Array(me.size);return me.forEach(function(Ht){Et[++Ge]=Ht}),Et}var me,Ln=Array.prototype,hn=Object.prototype,Un=Xe["__core-js_shared__"],Fn=Function.prototype.toString,En=hn.hasOwnProperty,Wn=(me=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||""))?"Symbol(src)_1."+me:"",Gn=hn.toString,rr=RegExp("^"+Fn.call(En).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ir=De?Xe.Buffer:void 0,Zn=Xe.Symbol,lr=Xe.Uint8Array,xs=hn.propertyIsEnumerable,za=Ln.splice,Eo=Zn?Zn.toStringTag:void 0,Ba=Object.getOwnPropertySymbols,Uc=ir?ir.isBuffer:void 0,td=function(me,Ge){return function(Et){return me(Ge(Et))}}(Object.keys,Object),ti=zc(Xe,"DataView"),Yr=zc(Xe,"Map"),ni=zc(Xe,"Promise"),Xr=zc(Xe,"Set"),ri=zc(Xe,"WeakMap"),Qr=zc(Object,"create"),Ei=Iu(ti),ii=Iu(Yr),Si=Iu(ni),oi=Iu(Xr),Oi=Iu(ri),di=Zn?Zn.prototype:void 0,si=di?di.valueOf:void 0;function zr(me){var Ge=-1,Et=null==me?0:me.length;for(this.clear();++Ge<Et;){var Ht=me[Ge];this.set(Ht[0],Ht[1])}}function aa(me){var Ge=-1,Et=null==me?0:me.length;for(this.clear();++Ge<Et;){var Ht=me[Ge];this.set(Ht[0],Ht[1])}}function Rs(me){var Ge=-1,Et=null==me?0:me.length;for(this.clear();++Ge<Et;){var Ht=me[Ge];this.set(Ht[0],Ht[1])}}function Ll(me){var Ge=-1,Et=null==me?0:me.length;for(this.__data__=new Rs;++Ge<Et;)this.add(me[Ge])}function Is(me){var Ge=this.__data__=new aa(me);this.size=Ge.size}function r1(me,Ge){var Et=_r(me),Ht=!Et&&tv(me),Mr=!Et&&!Ht&&bp(me),Pn=!Et&&!Ht&&!Mr&&wp(me),qr=Et||Ht||Mr||Pn,hi=qr?function(me,Ge){for(var Et=-1,Ht=Array(me);++Et<me;)Ht[Et]=Ge(Et);return Ht}(me.length,String):[],Ni=hi.length;for(var Lr in me)(Ge||En.call(me,Lr))&&(!qr||!("length"==Lr||Mr&&("offset"==Lr||"parent"==Lr)||Pn&&("buffer"==Lr||"byteLength"==Lr||"byteOffset"==Lr)||Jm(Lr,Ni)))&&hi.push(Lr);return hi}function Ul(me,Ge){for(var Et=me.length;Et--;)if(c1(me[Et][0],Ge))return Et;return-1}function Dc(me){return null==me?void 0===me?"[object Undefined]":"[object Null]":Eo&&Eo in Object(me)?function(me){var Ge=En.call(me,Eo),Et=me[Eo];try{me[Eo]=void 0;var Ht=!0}catch{}var Mr=Gn.call(me);return Ht&&(Ge?me[Eo]=Et:delete me[Eo]),Mr}(me):function(me){return Gn.call(me)}(me)}function id(me){return Dl(me)&&Dc(me)==I}function od(me,Ge,Et,Ht,Mr){return me===Ge||(null==me||null==Ge||!Dl(me)&&!Dl(Ge)?me!=me&&Ge!=Ge:function(me,Ge,Et,Ht,Mr,Pn){var qr=_r(me),hi=_r(Ge),Ni=qr?F:Fa(me),Lr=hi?F:Fa(Ge),ar=(Ni=Ni==I?Te:Ni)==Te,ua=(Lr=Lr==I?Te:Lr)==Te,$r=Ni==Lr;if($r&&bp(me)){if(!bp(Ge))return!1;qr=!0,ar=!1}if($r&&!ar)return Pn||(Pn=new Is),qr||wp(me)?mp(me,Ge,Et,Ht,Mr,Pn):function(me,Ge,Et,Ht,Mr,Pn,qr){switch(Et){case Yt:if(me.byteLength!=Ge.byteLength||me.byteOffset!=Ge.byteOffset)return!1;me=me.buffer,Ge=Ge.buffer;case Pt:return!(me.byteLength!=Ge.byteLength||!Pn(new lr(me),new lr(Ge)));case G:case he:case lt:return c1(+me,+Ge);case te:return me.name==Ge.name&&me.message==Ge.message;case be:case k:return me==Ge+"";case Ce:var hi=Mn;case ae:if(hi||(hi=In),me.size!=Ge.size&&!(1&Ht))return!1;var Lr=qr.get(me);if(Lr)return Lr==Ge;Ht|=2,qr.set(me,Ge);var ar=mp(hi(me),hi(Ge),Ht,Mr,Pn,qr);return qr.delete(me),ar;case fe:if(si)return si.call(me)==si.call(Ge)}return!1}(me,Ge,Ni,Et,Ht,Mr,Pn);if(!(1&Et)){var So=ar&&En.call(me,"__wrapped__"),Oo=ua&&En.call(Ge,"__wrapped__");if(So||Oo){var ji=So?me.value():me,Cs=Oo?Ge.value():Ge;return Pn||(Pn=new Is),Mr(ji,Cs,Et,Ht,Pn)}}return!!$r&&(Pn||(Pn=new Is),function(me,Ge,Et,Ht,Mr,Pn){var qr=1&Et,hi=vp(me),Ni=hi.length;if(Ni!=vp(Ge).length&&!qr)return!1;for(var Lr=Ni;Lr--;){var ar=hi[Lr];if(!(qr?ar in Ge:En.call(Ge,ar)))return!1}var ua=Pn.get(me);if(ua&&Pn.get(Ge))return ua==Ge;var $r=!0;Pn.set(me,Ge),Pn.set(Ge,me);for(var So=qr;++Lr<Ni;){var Oo=me[ar=hi[Lr]],ji=Ge[ar];if(Ht)var Cs=qr?Ht(ji,Oo,ar,Ge,me,Pn):Ht(Oo,ji,ar,me,Ge,Pn);if(!(void 0===Cs?Oo===ji||Mr(Oo,ji,Et,Ht,Pn):Cs)){$r=!1;break}So||(So="constructor"==ar)}if($r&&!So){var ca=me.constructor,Rr=Ge.constructor;ca!=Rr&&"constructor"in me&&"constructor"in Ge&&!("function"==typeof ca&&ca instanceof ca&&"function"==typeof Rr&&Rr instanceof Rr)&&($r=!1)}return Pn.delete(me),Pn.delete(Ge),$r}(me,Ge,Et,Ht,Mr,Pn))}(me,Ge,Et,Ht,od,Mr))}function i1(me){return!(!d1(me)||function(me){return!!Wn&&Wn in me}(me))&&(l1(me)?rr:cn).test(Iu(me))}function Ym(me){if(!function(me){var Ge=me&&me.constructor;return me===("function"==typeof Ge&&Ge.prototype||hn)}(me))return td(me);var Ge=[];for(var Et in Object(me))En.call(me,Et)&&"constructor"!=Et&&Ge.push(Et);return Ge}function mp(me,Ge,Et,Ht,Mr,Pn){var qr=1&Et,hi=me.length,Ni=Ge.length;if(hi!=Ni&&!(qr&&Ni>hi))return!1;var Lr=Pn.get(me);if(Lr&&Pn.get(Ge))return Lr==Ge;var ar=-1,ua=!0,$r=2&Et?new Ll:void 0;for(Pn.set(me,Ge),Pn.set(Ge,me);++ar<hi;){var So=me[ar],Oo=Ge[ar];if(Ht)var ji=qr?Ht(Oo,So,ar,Ge,me,Pn):Ht(So,Oo,ar,me,Ge,Pn);if(void 0!==ji){if(ji)continue;ua=!1;break}if($r){if(!Jn(Ge,function(Cs,ca){if(!Xn($r,ca)&&(So===Cs||Mr(So,Cs,Et,Ht,Pn)))return $r.push(ca)})){ua=!1;break}}else if(So!==Oo&&!Mr(So,Oo,Et,Ht,Pn)){ua=!1;break}}return Pn.delete(me),Pn.delete(Ge),ua}function vp(me){return function(me,Ge,Et){var Ht=Ge(me);return _r(me)?Ht:function(me,Ge){for(var Et=-1,Ht=Ge.length,Mr=me.length;++Et<Ht;)me[Mr+Et]=Ge[Et];return me}(Ht,Et(me))}(me,rv,Qm)}function sd(me,Ge){var Et=me.__data__;return function(me){var Ge=typeof me;return"string"==Ge||"number"==Ge||"symbol"==Ge||"boolean"==Ge?"__proto__"!==me:null===me}(Ge)?Et["string"==typeof Ge?"string":"hash"]:Et.map}function zc(me,Ge){var Et=function(me,Ge){return me?.[Ge]}(me,Ge);return i1(Et)?Et:void 0}zr.prototype.clear=function(){this.__data__=Qr?Qr(null):{},this.size=0},zr.prototype.delete=function(me){var Ge=this.has(me)&&delete this.__data__[me];return this.size-=Ge?1:0,Ge},zr.prototype.get=function(me){var Ge=this.__data__;if(Qr){var Et=Ge[me];return Et===s?void 0:Et}return En.call(Ge,me)?Ge[me]:void 0},zr.prototype.has=function(me){var Ge=this.__data__;return Qr?void 0!==Ge[me]:En.call(Ge,me)},zr.prototype.set=function(me,Ge){var Et=this.__data__;return this.size+=this.has(me)?0:1,Et[me]=Qr&&void 0===Ge?s:Ge,this},aa.prototype.clear=function(){this.__data__=[],this.size=0},aa.prototype.delete=function(me){var Ge=this.__data__,Et=Ul(Ge,me);return!(Et<0||(Et==Ge.length-1?Ge.pop():za.call(Ge,Et,1),--this.size,0))},aa.prototype.get=function(me){var Ge=this.__data__,Et=Ul(Ge,me);return Et<0?void 0:Ge[Et][1]},aa.prototype.has=function(me){return Ul(this.__data__,me)>-1},aa.prototype.set=function(me,Ge){var Et=this.__data__,Ht=Ul(Et,me);return Ht<0?(++this.size,Et.push([me,Ge])):Et[Ht][1]=Ge,this},Rs.prototype.clear=function(){this.size=0,this.__data__={hash:new zr,map:new(Yr||aa),string:new zr}},Rs.prototype.delete=function(me){var Ge=sd(this,me).delete(me);return this.size-=Ge?1:0,Ge},Rs.prototype.get=function(me){return sd(this,me).get(me)},Rs.prototype.has=function(me){return sd(this,me).has(me)},Rs.prototype.set=function(me,Ge){var Et=sd(this,me),Ht=Et.size;return Et.set(me,Ge),this.size+=Et.size==Ht?0:1,this},Ll.prototype.add=Ll.prototype.push=function(me){return this.__data__.set(me,s),this},Ll.prototype.has=function(me){return this.__data__.has(me)},Is.prototype.clear=function(){this.__data__=new aa,this.size=0},Is.prototype.delete=function(me){var Ge=this.__data__,Et=Ge.delete(me);return this.size=Ge.size,Et},Is.prototype.get=function(me){return this.__data__.get(me)},Is.prototype.has=function(me){return this.__data__.has(me)},Is.prototype.set=function(me,Ge){var Et=this.__data__;if(Et instanceof aa){var Ht=Et.__data__;if(!Yr||Ht.length<199)return Ht.push([me,Ge]),this.size=++Et.size,this;Et=this.__data__=new Rs(Ht)}return Et.set(me,Ge),this.size=Et.size,this};var Qm=Ba?function(me){return null==me?[]:(me=Object(me),function(me,Ge){for(var Et=-1,Ht=null==me?0:me.length,Mr=0,Pn=[];++Et<Ht;){var qr=me[Et];Ge(qr,Et,me)&&(Pn[Mr++]=qr)}return Pn}(Ba(me),function(Ge){return xs.call(me,Ge)}))}:function(){return[]},Fa=Dc;function Jm(me,Ge){return!!(Ge=Ge??S)&&("number"==typeof me||zt.test(me))&&me>-1&&me%1==0&&me<Ge}function Iu(me){if(null!=me){try{return Fn.call(me)}catch{}try{return me+""}catch{}}return""}function c1(me,Ge){return me===Ge||me!=me&&Ge!=Ge}(ti&&Fa(new ti(new ArrayBuffer(1)))!=Yt||Yr&&Fa(new Yr)!=Ce||ni&&Fa(ni.resolve())!=Ue||Xr&&Fa(new Xr)!=ae||ri&&Fa(new ri)!=dt)&&(Fa=function(me){var Ge=Dc(me),Et=Ge==Te?me.constructor:void 0,Ht=Et?Iu(Et):"";if(Ht)switch(Ht){case Ei:return Yt;case ii:return Ce;case Si:return Ue;case oi:return ae;case Oi:return dt}return Ge});var tv=id(function(){return arguments}())?id:function(me){return Dl(me)&&En.call(me,"callee")&&!xs.call(me,"callee")},_r=Array.isArray;var bp=Uc||function(){return!1};function l1(me){if(!d1(me))return!1;var Ge=Dc(me);return Ge==Ne||"[object GeneratorFunction]"==Ge||"[object AsyncFunction]"==Ge||"[object Proxy]"==Ge}function f1(me){return"number"==typeof me&&me>-1&&me%1==0&&me<=S}function d1(me){var Ge=typeof me;return null!=me&&("object"==Ge||"function"==Ge)}function Dl(me){return null!=me&&"object"==typeof me}var wp=sn?function(me){return function(Ge){return me(Ge)}}(sn):function(me){return Dl(me)&&f1(me.length)&&!!Wt[Dc(me)]};function rv(me){return function(me){return null!=me&&f1(me.length)&&!l1(me)}(me)?r1(me):Ym(me)}n.exports=function(me,Ge){return od(me,Ge)}}(wm,wm.exports);var i6=wm.exports;var vw=v(Object.freeze({__proto__:null,default:function(n,e){return e=e||{},new Promise(function(r,s){var u=new XMLHttpRequest,g=[],S=[],I={},F=function(){return{ok:2==(u.status/100|0),statusText:u.statusText,status:u.status,url:u.responseURL,text:function(){return Promise.resolve(u.responseText)},json:function(){return Promise.resolve(u.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([u.response]))},clone:F,headers:{keys:function(){return g},entries:function(){return S},get:function(G){return I[G.toLowerCase()]},has:function(G){return G.toLowerCase()in I}}}};for(var A in u.open(e.method||"get",n,!0),u.onload=function(){u.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(G,he,te){g.push(he=he.toLowerCase()),S.push([he,te]),I[he]=I[he]?I[he]+","+te:te}),r(F())},u.onerror=s,u.withCredentials="include"==e.credentials,e.headers)u.setRequestHeader(A,e.headers[A]);u.send(e.body||null)})}})),s6=self.fetch||(self.fetch=vw.default||vw),a6=Object.defineProperty,_w=Object.getOwnPropertySymbols,u6=Object.prototype.hasOwnProperty,c6=Object.prototype.propertyIsEnumerable,bw=(n,e,r)=>e in n?a6(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,wo=(n,e)=>{for(var r in e||(e={}))u6.call(e,r)&&bw(n,r,e[r]);if(_w)for(var r of _w(e))c6.call(e,r)&&bw(n,r,e[r]);return n};var f6=function(n,e){if(n.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),s=0;s<r.length;s++)r[s]=255;for(var u=0;u<n.length;u++){var g=n.charAt(u),S=g.charCodeAt(0);if(255!==r[S])throw new TypeError(g+" is ambiguous");r[S]=u}var I=n.length,F=n.charAt(0),A=Math.log(I)/Math.log(256),G=Math.log(256)/Math.log(I);function te(se){if("string"!=typeof se)throw new TypeError("Expected String");if(0===se.length)return new Uint8Array;var Ce=0;if(" "!==se[Ce]){for(var lt=0,Ot=0;se[Ce]===F;)lt++,Ce++;for(var Te=(se.length-Ce)*A+1>>>0,Ue=new Uint8Array(Te);se[Ce];){var ge=r[se.charCodeAt(Ce)];if(255===ge)return;for(var be=0,ae=Te-1;(0!==ge||be<Ot)&&-1!==ae;ae--,be++)Ue[ae]=(ge+=I*Ue[ae]>>>0)%256>>>0,ge=ge/256>>>0;if(0!==ge)throw new Error("Non-zero carry");Ot=be,Ce++}if(" "!==se[Ce]){for(var k=Te-Ot;k!==Te&&0===Ue[k];)k++;for(var fe=new Uint8Array(lt+(Te-k)),vt=lt;k!==Te;)fe[vt++]=Ue[k++];return fe}}}return{encode:function(se){if(se instanceof Uint8Array||(ArrayBuffer.isView(se)?se=new Uint8Array(se.buffer,se.byteOffset,se.byteLength):Array.isArray(se)&&(se=Uint8Array.from(se))),!(se instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===se.length)return"";for(var Ce=0,lt=0,Ot=0,Te=se.length;Ot!==Te&&0===se[Ot];)Ot++,Ce++;for(var Ue=(Te-Ot)*G+1>>>0,ge=new Uint8Array(Ue);Ot!==Te;){for(var be=se[Ot],ae=0,k=Ue-1;(0!==be||ae<lt)&&-1!==k;k--,ae++)ge[k]=(be+=256*ge[k]>>>0)%I>>>0,be=be/I>>>0;if(0!==be)throw new Error("Non-zero carry");lt=ae,Ot++}for(var fe=Ue-lt;fe!==Ue&&0===ge[fe];)fe++;for(var vt=F.repeat(Ce);fe<Ue;++fe)vt+=n.charAt(ge[fe]);return vt},decodeUnsafe:te,decode:function(se){var Ce=te(se);if(Ce)return Ce;throw new Error(`Non-${e} character`)}}};const ww=n=>{if(n instanceof Uint8Array&&"Uint8Array"===n.constructor.name)return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error("Unknown type, must be binary type")};class p6{constructor(e,r,s){this.name=e,this.prefix=r,this.baseEncode=s}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class g6{constructor(e,r,s){if(this.name=e,this.prefix=r,void 0===r.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=s}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Ew(this,e)}}class y6{constructor(e){this.decoders=e}or(e){return Ew(this,e)}decode(e){const s=this.decoders[e[0]];if(s)return s.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ew=(n,e)=>new y6(wo(wo({},n.decoders||{[n.prefix]:n}),e.decoders||{[e.prefix]:e}));class m6{constructor(e,r,s,u){this.name=e,this.prefix=r,this.baseEncode=s,this.baseDecode=u,this.encoder=new p6(e,r,s),this.decoder=new g6(e,r,u)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const F0=({name:n,prefix:e,encode:r,decode:s})=>new m6(n,e,r,s),lp=({prefix:n,name:e,alphabet:r})=>{const{encode:s,decode:u}=f6(r,e);return F0({prefix:n,name:e,encode:s,decode:g=>ww(u(g))})},Ki=({name:n,prefix:e,bitsPerChar:r,alphabet:s})=>F0({prefix:e,name:n,encode:u=>((n,e,r)=>{const s="="===e[e.length-1],u=(1<<r)-1;let g="",S=0,I=0;for(let F=0;F<n.length;++F)for(I=I<<8|n[F],S+=8;S>r;)S-=r,g+=e[u&I>>S];if(S&&(g+=e[u&I<<r-S]),s)for(;g.length*r&7;)g+="=";return g})(u,s,r),decode:u=>((n,e,r,s)=>{const u={};for(let G=0;G<e.length;++G)u[e[G]]=G;let g=n.length;for(;"="===n[g-1];)--g;const S=new Uint8Array(g*r/8|0);let I=0,F=0,A=0;for(let G=0;G<g;++G){const he=u[n[G]];if(void 0===he)throw new SyntaxError(`Non-${s} character`);F=F<<r|he,I+=r,I>=8&&(I-=8,S[A++]=255&F>>I)}if(I>=r||255&F<<8-I)throw new SyntaxError("Unexpected end of data");return S})(u,s,r,n)}),b6=F0({prefix:"\0",name:"identity",encode:n=>(n=>(new TextDecoder).decode(n))(n),decode:n=>(n=>(new TextEncoder).encode(n))(n)});var w6=Object.freeze({__proto__:null,identity:b6});const E6=Ki({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var S6=Object.freeze({__proto__:null,base2:E6});const O6=Ki({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var x6=Object.freeze({__proto__:null,base8:O6});const R6=lp({prefix:"9",name:"base10",alphabet:"0123456789"});var I6=Object.freeze({__proto__:null,base10:R6});const C6=Ki({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),P6=Ki({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var k6=Object.freeze({__proto__:null,base16:C6,base16upper:P6});const N6=Ki({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),A6=Ki({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),T6=Ki({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),M6=Ki({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),L6=Ki({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),U6=Ki({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),D6=Ki({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),j6=Ki({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),z6=Ki({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var B6=Object.freeze({__proto__:null,base32:N6,base32upper:A6,base32pad:T6,base32padupper:M6,base32hex:L6,base32hexupper:U6,base32hexpad:D6,base32hexpadupper:j6,base32z:z6});const F6=lp({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),H6=lp({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var q6=Object.freeze({__proto__:null,base36:F6,base36upper:H6});const $6=lp({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),V6=lp({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var W6=Object.freeze({__proto__:null,base58btc:$6,base58flickr:V6});const K6=Ki({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),G6=Ki({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Y6=Ki({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Q6=Ki({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var J6=Object.freeze({__proto__:null,base64:K6,base64pad:G6,base64url:Y6,base64urlpad:Q6});const Sw=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),X6=Sw.reduce((n,e,r)=>(n[r]=e,n),[]),Z6=Sw.reduce((n,e,r)=>(n[e.codePointAt(0)]=r,n),[]);const n4=F0({prefix:"\u{1f680}",name:"base256emoji",encode:function(n){return n.reduce((e,r)=>e+X6[r],"")},decode:function(n){const e=[];for(const r of n){const s=Z6[r.codePointAt(0)];if(void 0===s)throw new Error(`Non-base256emoji character: ${r}`);e.push(s)}return new Uint8Array(e)}});var r4=Object.freeze({__proto__:null,base256emoji:n4}),i4=function xw(n,e,r){e=e||[];for(var s=r=r||0;n>=s4;)e[r++]=255&n|128,n/=128;for(;-128&n;)e[r++]=255&n|128,n>>>=7;return e[r]=0|n,xw.bytes=r-s+1,e},s4=Math.pow(2,31);var a4=function Em(n,e){var r,s=0,u=0,g=e=e||0,S=n.length;do{if(g>=S)throw Em.bytes=0,new RangeError("Could not decode varint");r=n[g++],s+=u<28?(127&r)<<u:(127&r)*Math.pow(2,u),u+=7}while(r>=128);return Em.bytes=g-e,s};var c4=Math.pow(2,7),l4=Math.pow(2,14),f4=Math.pow(2,21),d4=Math.pow(2,28),h4=Math.pow(2,35),p4=Math.pow(2,42),g4=Math.pow(2,49),y4=Math.pow(2,56),m4=Math.pow(2,63),Iw={encode:i4,decode:a4,encodingLength:function(n){return n<c4?1:n<l4?2:n<f4?3:n<d4?4:n<h4?5:n<p4?6:n<g4?7:n<y4?8:n<m4?9:10}};const Cw=(n,e,r=0)=>(Iw.encode(n,e,r),e),Pw=n=>Iw.encodingLength(n),Sm=(n,e)=>{const r=e.byteLength,s=Pw(n),u=s+Pw(r),g=new Uint8Array(u+r);return Cw(n,g,0),Cw(r,g,s),g.set(e,u),new v4(n,r,e,g)};class v4{constructor(e,r,s,u){this.code=e,this.size=r,this.digest=s,this.bytes=u}}const kw=({name:n,code:e,encode:r})=>new _4(n,e,r);class _4{constructor(e,r,s){this.name=e,this.code=r,this.encode=s}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?Sm(this.code,r):r.then(s=>Sm(this.code,s))}throw Error("Unknown type, must be binary type")}}const Nw=n=>function(){var e=ue(function*(r){return new Uint8Array(yield crypto.subtle.digest(n,r))});return function(r){return e.apply(this,arguments)}}(),b4=kw({name:"sha2-256",code:18,encode:Nw("SHA-256")}),w4=kw({name:"sha2-512",code:19,encode:Nw("SHA-512")});var E4=Object.freeze({__proto__:null,sha256:b4,sha512:w4});const Tw=ww;var O4=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:Tw,digest:n=>Sm(0,Tw(n))}});new TextEncoder,new TextDecoder;const Mw=wo(wo(wo(wo(wo(wo(wo(wo(wo(wo({},w6),S6),x6),I6),k6),B6),q6),W6),J6),r4);function Lw(n){return null!=globalThis.Buffer?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n}function Uw(n,e,r,s){return{name:n,prefix:e,encoder:{name:n,prefix:e,encode:r},decoder:{decode:s}}}wo(wo({},E4),O4);const Dw=Uw("utf8","u",n=>"u"+new TextDecoder("utf8").decode(n),n=>(new TextEncoder).encode(n.substring(1))),Om=Uw("ascii","a",n=>{let e="a";for(let r=0;r<n.length;r++)e+=String.fromCharCode(n[r]);return e},n=>{const e=function(n=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?Lw(globalThis.Buffer.allocUnsafe(n)):new Uint8Array(n)}((n=n.substring(1)).length);for(let r=0;r<n.length;r++)e[r]=n.charCodeAt(r);return e}),R4=wo({utf8:Dw,"utf-8":Dw,hex:Mw.base16,latin1:Om,ascii:Om,binary:Om},Mw);const xm="core",Tc="wc@2:core:",P4_logger="error",k4={database:":memory:"},zw="client_ed25519_seed",A4=Gt.ONE_DAY,D4=Gt.SIX_HOURS,Fw="wss://relay.walletconnect.com",Hw="wss://relay.walletconnect.org",ao_message="relayer_message",ao_message_ack="relayer_message_ack",ao_connect="relayer_connect",ao_disconnect="relayer_disconnect",ao_error="relayer_error",ao_connection_stalled="relayer_connection_stalled",ao_publish="relayer_publish",Ou_payload="payload",Ou_connect="connect",Ou_disconnect="disconnect",Ou_error="error",H4=Gt.ONE_SECOND,sa_created="subscription_created",sa_deleted="subscription_deleted",sa_sync="subscription_sync",sa_resubscribed="subscription_resubscribed",Y4=1e3*Gt.FIVE_SECONDS,fp={wc_pairingDelete:{req:{ttl:Gt.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Gt.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Gt.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Gt.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Gt.ONE_DAY,prompt:!1,tag:0},res:{ttl:Gt.ONE_DAY,prompt:!1,tag:0}}},dp_create="pairing_create",dp_expire="pairing_expire",dp_delete="pairing_delete",dp_ping="pairing_ping",ja_created="history_created",ja_updated="history_updated",ja_deleted="history_deleted",ja_sync="history_sync",Os_created="expirer_created",Os_deleted="expirer_deleted",Os_expired="expirer_expired",Os_sync="expirer_sync",Rm="verify-api",ed="https://verify.walletconnect.com",Im="https://verify.walletconnect.org",n8=[ed,Im];class o8{constructor(e,r){var s=this;this.core=e,this.logger=r,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=Tc,this.init=ue(function*(){if(!s.initialized){const u=yield s.getKeyChain();typeof u<"u"&&(s.keychain=u),s.initialized=!0}}),this.has=u=>(this.isInitialized(),this.keychain.has(u)),this.set=function(){var u=ue(function*(g,S){s.isInitialized(),s.keychain.set(g,S),yield s.persist()});return function(g,S){return u.apply(this,arguments)}}(),this.get=u=>{this.isInitialized();const g=this.keychain.get(u);if(typeof g>"u"){const{message:S}=Ut("NO_MATCHING_KEY",`${this.name}: ${u}`);throw new Error(S)}return g},this.del=function(){var u=ue(function*(g){s.isInitialized(),s.keychain.delete(g),yield s.persist()});return function(g){return u.apply(this,arguments)}}(),this.core=e,this.logger=qn.generateChildLogger(r,this.name)}get context(){return qn.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setKeyChain(e){var r=this;return ue(function*(){yield r.core.storage.setItem(r.storageKey,ka(e))})()}getKeyChain(){var e=this;return ue(function*(){const r=yield e.core.storage.getItem(e.storageKey);return typeof r<"u"?Il(r):void 0})()}persist(){var e=this;return ue(function*(){yield e.setKeyChain(e.keychain)})()}isInitialized(){if(!this.initialized){const{message:e}=Ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}class s8{constructor(e,r,s){var u=this;this.core=e,this.logger=r,this.name="crypto",this.initialized=!1,this.init=ue(function*(){u.initialized||(yield u.keychain.init(),u.initialized=!0)}),this.hasKeys=g=>(this.isInitialized(),this.keychain.has(g)),this.getClientId=ue(function*(){return u.isInitialized(),bl(ci(yield u.getClientSeed()).publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const g=function(){const n=Mf.generateKeyPair();return{privateKey:mi(n.secretKey,hr),publicKey:mi(n.publicKey,hr)}}();return this.setPrivateKey(g.publicKey,g.privateKey)},this.signJWT=function(){var g=ue(function*(S){u.isInitialized();const I=ci(yield u.getClientSeed()),F=yu();return yield function(n,e,r,s){return mc.apply(this,arguments)}(F,S,A4,I)});return function(S){return g.apply(this,arguments)}}(),this.generateSharedKey=(g,S,I)=>{this.isInitialized();const F=function(n,e){const r=Mf.sharedKey(Li(n,hr),Li(e,hr),!0);return mi(new r0(Sl.SHA256,r).expand(32),hr)}(this.getPrivateKey(g),S);return this.setSymKey(F,I)},this.setSymKey=function(){var g=ue(function*(S,I){u.isInitialized();const F=I||function(n){return mi(Sl.hash(Li(n,hr)),hr)}(S);return yield u.keychain.set(F,S),F});return function(S,I){return g.apply(this,arguments)}}(),this.deleteKeyPair=function(){var g=ue(function*(S){u.isInitialized(),yield u.keychain.del(S)});return function(S){return g.apply(this,arguments)}}(),this.deleteSymKey=function(){var g=ue(function*(S){u.isInitialized(),yield u.keychain.del(S)});return function(S){return g.apply(this,arguments)}}(),this.encode=function(){var g=ue(function*(S,I,F){u.isInitialized();const A=Bh(F),G=Qn(I);if(Fh(A)){const se=A.senderPublicKey,Ce=A.receiverPublicKey;S=yield u.generateSharedKey(se,Ce)}const he=u.getSymKey(S),{type:te,senderPublicKey:Ne}=A;return jh({type:te,symKey:he,message:G,senderPublicKey:Ne})});return function(S,I,F){return g.apply(this,arguments)}}(),this.decode=function(){var g=ue(function*(S,I,F){u.isInitialized();const A=function(n,e){const r=_o(n);return Bh({type:Oc(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?mi(r.senderPublicKey,hr):void 0,receiverPublicKey:e?.receiverPublicKey})}(I,F);if(Fh(A)){const G=A.receiverPublicKey,he=A.senderPublicKey;S=yield u.generateSharedKey(G,he)}try{return Vn(function(n){const e=new gu.ChaCha20Poly1305(Li(n.symKey,hr)),{sealed:r,iv:s}=_o(n.encoded),u=e.open(s,r);if(null===u)throw new Error("Failed to decrypt");return mi(u,Uh)}({symKey:u.getSymKey(S),encoded:I}))}catch(G){u.logger.error(`Failed to decode message from topic: '${S}', clientId: '${yield u.getClientId()}'`),u.logger.error(G)}});return function(S,I,F){return g.apply(this,arguments)}}(),this.getPayloadType=g=>Oc(_o(g).type),this.getPayloadSenderPublicKey=g=>{const S=_o(g);return S.senderPublicKey?mi(S.senderPublicKey,hr):void 0},this.core=e,this.logger=qn.generateChildLogger(r,this.name),this.keychain=s||new o8(this.core,this.logger)}get context(){return qn.getLoggerContext(this.logger)}setPrivateKey(e,r){var s=this;return ue(function*(){return yield s.keychain.set(e,r),e})()}getPrivateKey(e){return this.keychain.get(e)}getClientSeed(){var e=this;return ue(function*(){let r="";try{r=e.keychain.get(zw)}catch{r=yu(),yield e.keychain.set(zw,r)}return function(n,e="utf8"){const r=R4[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${n}`):Lw(globalThis.Buffer.from(n,"utf-8"))}(r,"base16")})()}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}class a8 extends class{constructor(e,r){this.logger=e,this.core=r}}{constructor(e,r){var s;super(e,r),s=this,this.logger=e,this.core=r,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Tc,this.init=ue(function*(){if(!s.initialized){s.logger.trace("Initialized");try{const u=yield s.getRelayerMessages();typeof u<"u"&&(s.messages=u),s.logger.debug(`Successfully Restored records for ${s.name}`),s.logger.trace({type:"method",method:"restore",size:s.messages.size})}catch(u){s.logger.debug(`Failed to Restore records for ${s.name}`),s.logger.error(u)}finally{s.initialized=!0}}}),this.set=function(){var u=ue(function*(g,S){s.isInitialized();const I=mu(S);let F=s.messages.get(g);return typeof F>"u"&&(F={}),typeof F[I]<"u"||(F[I]=S,s.messages.set(g,F),yield s.persist()),I});return function(g,S){return u.apply(this,arguments)}}(),this.get=u=>{this.isInitialized();let g=this.messages.get(u);return typeof g>"u"&&(g={}),g},this.has=(u,g)=>(this.isInitialized(),typeof this.get(u)[mu(g)]<"u"),this.del=function(){var u=ue(function*(g){s.isInitialized(),s.messages.delete(g),yield s.persist()});return function(g){return u.apply(this,arguments)}}(),this.logger=qn.generateChildLogger(e,this.name),this.core=r}get context(){return qn.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setRelayerMessages(e){var r=this;return ue(function*(){yield r.core.storage.setItem(r.storageKey,ka(e))})()}getRelayerMessages(){var e=this;return ue(function*(){const r=yield e.core.storage.getItem(e.storageKey);return typeof r<"u"?Il(r):void 0})()}persist(){var e=this;return ue(function*(){yield e.setRelayerMessages(e.messages)})()}isInitialized(){if(!this.initialized){const{message:e}=Ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}class u8 extends Qy{constructor(e,r){var s;super(e,r),s=this,this.relayer=e,this.logger=r,this.events=new E.exports.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=Gt.toMiliseconds(Gt.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=function(){var u=ue(function*(g,S,I){var F;s.logger.debug("Publishing Payload"),s.logger.trace({type:"method",method:"publish",params:{topic:g,message:S,opts:I}});try{const A=I?.ttl||D4,G=Pc(I),he=I?.prompt||!1,te=I?.tag||0,Ne=I?.id||fw().toString(),se={topic:g,message:S,opts:{ttl:A,relay:G,prompt:he,tag:te,id:Ne}},Ce=setTimeout(()=>s.queue.set(Ne,se),s.publishTimeout);try{yield yield ra(s.rpcPublish(g,S,A,G,he,te,Ne),s.publishTimeout,"Failed to publish payload, please try again."),s.removeRequestFromQueue(Ne),s.relayer.events.emit(ao_publish,se)}catch(lt){if(s.logger.debug("Publishing Payload stalled"),s.needsTransportRestart=!0,null!=(F=I?.internal)&&F.throwOnFailedPublish)throw s.removeRequestFromQueue(Ne),lt;return}finally{clearTimeout(Ce)}s.logger.debug("Successfully Published Payload"),s.logger.trace({type:"method",method:"publish",params:{topic:g,message:S,opts:I}})}catch(A){throw s.logger.debug("Failed to Publish Payload"),s.logger.error(A),A}});return function(g,S,I){return u.apply(this,arguments)}}(),this.on=(u,g)=>{this.events.on(u,g)},this.once=(u,g)=>{this.events.once(u,g)},this.off=(u,g)=>{this.events.off(u,g)},this.removeListener=(u,g)=>{this.events.removeListener(u,g)},this.relayer=e,this.logger=qn.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return qn.getLoggerContext(this.logger)}rpcPublish(e,r,s,u,g,S,I){var F,A,G,he;const te={method:wi(u.protocol).publish,params:{topic:e,message:r,ttl:s,prompt:g,tag:S},id:I};return Vi(null==(F=te.params)?void 0:F.prompt)&&(null==(A=te.params)||delete A.prompt),Vi(null==(G=te.params)?void 0:G.tag)&&(null==(he=te.params)||delete he.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:te}),this.relayer.request(te)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){var e=this;this.queue.forEach(function(){var r=ue(function*(s){const{topic:u,message:g,opts:S}=s;yield e.publish(u,g,S)});return function(s){return r.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(lo.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(ao_connection_stalled);this.checkQueue()}),this.relayer.on(ao_message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class c8{constructor(){this.map=new Map,this.set=(e,r)=>{const s=this.get(e);this.exists(e,r)||this.map.set(e,[...s,r])},this.get=e=>this.map.get(e)||[],this.exists=(e,r)=>this.get(e).includes(r),this.delete=(e,r)=>{if(typeof r>"u")return void this.map.delete(e);if(!this.map.has(e))return;const s=this.get(e);if(!this.exists(e,r))return;const u=s.filter(g=>g!==r);u.length?this.map.set(e,u):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var l8=Object.defineProperty,f8=Object.defineProperties,d8=Object.getOwnPropertyDescriptors,qw=Object.getOwnPropertySymbols,h8=Object.prototype.hasOwnProperty,p8=Object.prototype.propertyIsEnumerable,$w=(n,e,r)=>e in n?l8(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,hp=(n,e)=>{for(var r in e||(e={}))h8.call(e,r)&&$w(n,r,e[r]);if(qw)for(var r of qw(e))p8.call(e,r)&&$w(n,r,e[r]);return n},Cm=(n,e)=>f8(n,d8(e));class g8 extends Zo{constructor(e,r){var s;super(e,r),s=this,this.relayer=e,this.logger=r,this.subscriptions=new Map,this.topicMap=new c8,this.events=new E.exports.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Tc,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=ue(function*(){s.initialized||(s.logger.trace("Initialized"),s.registerEventListeners(),s.clientId=yield s.relayer.core.crypto.getClientId())}),this.subscribe=function(){var u=ue(function*(g,S){yield s.restartToComplete(),s.isInitialized(),s.logger.debug("Subscribing Topic"),s.logger.trace({type:"method",method:"subscribe",params:{topic:g,opts:S}});try{const I=Pc(S),F={topic:g,relay:I};s.pending.set(g,F);const A=yield s.rpcSubscribe(g,I);return s.onSubscribe(A,F),s.logger.debug("Successfully Subscribed Topic"),s.logger.trace({type:"method",method:"subscribe",params:{topic:g,opts:S}}),A}catch(I){throw s.logger.debug("Failed to Subscribe Topic"),s.logger.error(I),I}});return function(g,S){return u.apply(this,arguments)}}(),this.unsubscribe=function(){var u=ue(function*(g,S){yield s.restartToComplete(),s.isInitialized(),typeof S?.id<"u"?yield s.unsubscribeById(g,S.id,S):yield s.unsubscribeByTopic(g,S)});return function(g,S){return u.apply(this,arguments)}}(),this.isSubscribed=function(){var u=ue(function*(g){return!!s.topics.includes(g)||(yield new Promise((S,I)=>{const F=new Gt.Watch;F.start(s.pendingSubscriptionWatchLabel);const A=setInterval(()=>{!s.pending.has(g)&&s.topics.includes(g)&&(clearInterval(A),F.stop(s.pendingSubscriptionWatchLabel),S(!0)),F.elapsed(s.pendingSubscriptionWatchLabel)>=Y4&&(clearInterval(A),F.stop(s.pendingSubscriptionWatchLabel),I(new Error("Subscription resolution timeout")))},s.pollingInterval)}).catch(()=>!1))});return function(g){return u.apply(this,arguments)}}(),this.on=(u,g)=>{this.events.on(u,g)},this.once=(u,g)=>{this.events.once(u,g)},this.off=(u,g)=>{this.events.off(u,g)},this.removeListener=(u,g)=>{this.events.removeListener(u,g)},this.restart=ue(function*(){s.restartInProgress=!0,yield s.restore(),yield s.reset(),s.restartInProgress=!1}),this.relayer=e,this.logger=qn.generateChildLogger(r,this.name),this.clientId=""}get context(){return qn.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,r){let s=!1;try{s=this.getSubscription(e).topic===r}catch{}return s}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(e,r){var s=this;return ue(function*(){const u=s.topicMap.get(e);yield Promise.all(u.map(function(){var g=ue(function*(S){return yield s.unsubscribeById(e,S,r)});return function(S){return g.apply(this,arguments)}}()))})()}unsubscribeById(e,r,s){var u=this;return ue(function*(){u.logger.debug("Unsubscribing Topic"),u.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:s}});try{const g=Pc(s);yield u.rpcUnsubscribe(e,r,g);const S=Nr("USER_DISCONNECTED",`${u.name}, ${e}`);yield u.onUnsubscribe(e,r,S),u.logger.debug("Successfully Unsubscribed Topic"),u.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:s}})}catch(g){throw u.logger.debug("Failed to Unsubscribe Topic"),u.logger.error(g),g}})()}rpcSubscribe(e,r){var s=this;return ue(function*(){const u={method:wi(r.protocol).subscribe,params:{topic:e}};s.logger.debug("Outgoing Relay Payload"),s.logger.trace({type:"payload",direction:"outgoing",request:u});try{yield yield ra(s.relayer.request(u),s.subscribeTimeout)}catch{s.logger.debug("Outgoing Relay Subscribe Payload stalled"),s.relayer.events.emit(ao_connection_stalled)}return mu(e+s.clientId)})()}rpcBatchSubscribe(e){var r=this;return ue(function*(){if(!e.length)return;const s={method:wi(e[0].relay.protocol).batchSubscribe,params:{topics:e.map(u=>u.topic)}};r.logger.debug("Outgoing Relay Payload"),r.logger.trace({type:"payload",direction:"outgoing",request:s});try{return yield yield ra(r.relayer.request(s),r.subscribeTimeout)}catch{r.logger.debug("Outgoing Relay Payload stalled"),r.relayer.events.emit(ao_connection_stalled)}})()}rpcUnsubscribe(e,r,s){const u={method:wi(s.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:u}),this.relayer.request(u)}onSubscribe(e,r){this.setSubscription(e,Cm(hp({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,hp({},r)),this.pending.delete(r.topic)})}onUnsubscribe(e,r,s){var u=this;return ue(function*(){u.events.removeAllListeners(r),u.hasSubscription(r,e)&&u.deleteSubscription(r,s),yield u.relayer.messages.del(e)})()}setRelayerSubscriptions(e){var r=this;return ue(function*(){yield r.relayer.core.storage.setItem(r.storageKey,e)})()}getRelayerSubscriptions(){var e=this;return ue(function*(){return yield e.relayer.core.storage.getItem(e.storageKey)})()}setSubscription(e,r){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:r}),this.addSubscription(e,r))}addSubscription(e,r){this.subscriptions.set(e,hp({},r)),this.topicMap.set(r.topic,e),this.events.emit(sa_created,r)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const r=this.subscriptions.get(e);if(!r){const{message:s}=Ut("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(s)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});const s=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(s.topic,e),this.events.emit(sa_deleted,Cm(hp({},s),{reason:r}))}persist(){var e=this;return ue(function*(){yield e.setRelayerSubscriptions(e.values),e.events.emit(sa_sync)})()}reset(){var e=this;return ue(function*(){if(e.cached.length){const r=Math.ceil(e.cached.length/e.batchSubscribeTopicsLimit);for(let s=0;s<r;s++){const u=e.cached.splice(0,e.batchSubscribeTopicsLimit);yield e.batchSubscribe(u)}}e.events.emit(sa_resubscribed)})()}restore(){var e=this;return ue(function*(){try{const r=yield e.getRelayerSubscriptions();if(typeof r>"u"||!r.length)return;if(e.subscriptions.size){const{message:s}=Ut("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(s),e.logger.error(`${e.name}: ${JSON.stringify(e.values)}`),new Error(s)}e.cached=r,e.logger.debug(`Successfully Restored subscriptions for ${e.name}`),e.logger.trace({type:"method",method:"restore",subscriptions:e.values})}catch(r){e.logger.debug(`Failed to Restore subscriptions for ${e.name}`),e.logger.error(r)}})()}batchSubscribe(e){var r=this;return ue(function*(){if(!e.length)return;const s=yield r.rpcBatchSubscribe(e);La(s)&&r.onBatchSubscribe(s.map((u,g)=>Cm(hp({},e[g]),{id:u})))})()}onConnect(){var e=this;return ue(function*(){e.restartInProgress||(yield e.restart(),e.onEnable())})()}onDisconnect(){this.onDisable()}checkPending(){var e=this;return ue(function*(){if(!e.initialized||e.relayer.transportExplicitlyClosed)return;const r=[];e.pending.forEach(s=>{r.push(s)}),yield e.batchSubscribe(r)})()}registerEventListeners(){var e=this;this.relayer.core.heartbeat.on(lo.HEARTBEAT_EVENTS.pulse,ue(function*(){yield e.checkPending()})),this.relayer.on(ao_connect,ue(function*(){yield e.onConnect()})),this.relayer.on(ao_disconnect,()=>{this.onDisconnect()}),this.events.on(sa_created,function(){var r=ue(function*(s){const u=sa_created;e.logger.info(`Emitting ${u}`),e.logger.debug({type:"event",event:u,data:s}),yield e.persist()});return function(s){return r.apply(this,arguments)}}()),this.events.on(sa_deleted,function(){var r=ue(function*(s){const u=sa_deleted;e.logger.info(`Emitting ${u}`),e.logger.debug({type:"event",event:u,data:s}),yield e.persist()});return function(s){return r.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:e}=Ut("NOT_INITIALIZED",this.name);throw new Error(e)}}restartToComplete(){var e=this;return ue(function*(){e.restartInProgress&&(yield new Promise(r=>{const s=setInterval(()=>{e.restartInProgress||(clearInterval(s),r())},e.pollingInterval)}))})()}}var y8=Object.defineProperty,Vw=Object.getOwnPropertySymbols,m8=Object.prototype.hasOwnProperty,v8=Object.prototype.propertyIsEnumerable,Ww=(n,e,r)=>e in n?y8(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r;class b8 extends Jy{constructor(e){var r;super(e),r=this,this.protocol="wc",this.version=2,this.events=new E.exports.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=function(){var s=ue(function*(u){r.logger.debug("Publishing Request Payload");try{return yield r.toEstablishConnection(),yield r.provider.request(u)}catch(g){throw r.logger.debug("Failed to Publish Request"),r.logger.error(g),g}});return function(u){return s.apply(this,arguments)}}(),this.onPayloadHandler=s=>{this.onProviderPayload(s)},this.onConnectHandler=()=>{this.events.emit(ao_connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=s=>{this.logger.error(s),this.events.emit(ao_error,s),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Ou_payload,this.onPayloadHandler),this.provider.on(Ou_connect,this.onConnectHandler),this.provider.on(Ou_disconnect,this.onDisconnectHandler),this.provider.on(Ou_error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?qn.generateChildLogger(e.logger,this.name):qn.pino(qn.getDefaultLoggerOptions({level:e.logger||"error"})),this.messages=new a8(this.logger,e.core),this.subscriber=new g8(this,this.logger),this.publisher=new u8(this,this.logger),this.relayUrl=e?.relayUrl||Fw,this.projectId=e.projectId,this.bundleId=function(){var n;try{return na()&&typeof wr<"u"&&typeof(null==wr?void 0:wr.Application)<"u"?null==(n=wr.Application)?void 0:n.applicationId:void 0}catch{return}}(),this.provider={}}init(){var e=this;return ue(function*(){e.logger.trace("Initialized"),e.registerEventListeners(),yield e.createProvider(),yield Promise.all([e.messages.init(),e.subscriber.init()]);try{yield e.transportOpen()}catch{e.logger.warn(`Connection via ${e.relayUrl} failed, attempting to connect via failover domain ${Hw}...`),yield e.restartTransport(Hw)}e.initialized=!0,setTimeout(ue(function*(){0===e.subscriber.topics.length&&(e.logger.info("No topics subscribed to after init, closing transport"),yield e.transportClose(),e.transportExplicitlyClosed=!1)}),1e4)})()}get context(){return qn.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(e,r,s){var u=this;return ue(function*(){u.isInitialized(),yield u.publisher.publish(e,r,s),yield u.recordMessageEvent({topic:e,message:r,publishedAt:Date.now()})})()}subscribe(e,r){var s=this;return ue(function*(){var u;s.isInitialized();let g,S=(null==(u=s.subscriber.topicMap.get(e))?void 0:u[0])||"";if(S)return S;const I=F=>{F.topic===e&&(s.subscriber.off(sa_created,I),g())};return yield Promise.all([new Promise(F=>{g=F,s.subscriber.on(sa_created,I)}),new Promise(function(){var F=ue(function*(A){S=yield s.subscriber.subscribe(e,r),A()});return function(A){return F.apply(this,arguments)}}())]),S})()}unsubscribe(e,r){var s=this;return ue(function*(){s.isInitialized(),yield s.subscriber.unsubscribe(e,r)})()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}transportClose(){var e=this;return ue(function*(){e.transportExplicitlyClosed=!0,e.hasExperiencedNetworkDisruption&&e.connected?yield ra(e.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>e.onProviderDisconnect()):e.connected&&(yield e.provider.disconnect())})()}transportOpen(e){var r=this;return ue(function*(){if(r.transportExplicitlyClosed=!1,yield r.confirmOnlineStateOrThrow(),!r.connectionAttemptInProgress){e&&e!==r.relayUrl&&(r.relayUrl=e,yield r.transportClose(),yield r.createProvider()),r.connectionAttemptInProgress=!0;try{yield Promise.all([new Promise(s=>{if(!r.initialized)return s();r.subscriber.once(sa_resubscribed,()=>{s()})}),new Promise(function(){var s=ue(function*(u,g){try{yield ra(r.provider.connect(),1e4,`Socket stalled when trying to connect to ${r.relayUrl}`)}catch(S){return void g(S)}u()});return function(u,g){return s.apply(this,arguments)}}())])}catch(s){if(r.logger.error(s),!r.isConnectionStalled(s.message))throw s;r.provider.events.emit(Ou_disconnect)}finally{r.connectionAttemptInProgress=!1,r.hasExperiencedNetworkDisruption=!1}}})()}restartTransport(e){var r=this;return ue(function*(){yield r.confirmOnlineStateOrThrow(),!r.connectionAttemptInProgress&&(r.relayUrl=e||r.relayUrl,yield r.transportClose(),yield r.createProvider(),yield r.transportOpen())})()}confirmOnlineStateOrThrow(){return ue(function*(){if(!(yield l()))throw new Error("No internet connection detected. Please restart your network and try again.")})()}isConnectionStalled(e){return this.staleConnectionErrors.some(r=>e.includes(r))}createProvider(){var e=this;return ue(function*(){e.provider.connection&&e.unregisterProviderListeners();const r=yield e.core.crypto.signJWT(e.relayUrl);e.provider=new Su(new r6(li({sdkVersion:"2.11.0",protocol:e.protocol,version:e.version,relayUrl:e.relayUrl,projectId:e.projectId,auth:r,useOnCloseEvent:!0,bundleId:e.bundleId}))),e.registerProviderListeners()})()}recordMessageEvent(e){var r=this;return ue(function*(){const{topic:s,message:u}=e;yield r.messages.set(s,u)})()}shouldIgnoreMessageEvent(e){var r=this;return ue(function*(){const{topic:s,message:u}=e;if(!u||0===u.length)return r.logger.debug(`Ignoring invalid/empty message: ${u}`),!0;if(!(yield r.subscriber.isSubscribed(s)))return r.logger.debug(`Ignoring message for non-subscribed topic ${s}`),!0;const g=r.messages.has(s,u);return g&&r.logger.debug(`Ignoring duplicate message: ${u}`),g})()}onProviderPayload(e){var r=this;return ue(function*(){if(r.logger.debug("Incoming Relay Payload"),r.logger.trace({type:"payload",direction:"incoming",payload:e}),bm(e)){if(!e.method.endsWith("_subscription"))return;const s=e.params,{topic:u,message:g,publishedAt:S}=s.data,I={topic:u,message:g,publishedAt:S};r.logger.debug("Emitting Relayer Payload"),r.logger.trace(((n,e)=>{for(var r in e||(e={}))m8.call(e,r)&&Ww(n,r,e[r]);if(Vw)for(var r of Vw(e))v8.call(e,r)&&Ww(n,r,e[r]);return n})({type:"event",event:s.id},I)),r.events.emit(s.id,I),yield r.acknowledgePayload(e),yield r.onMessageEvent(I)}else B0(e)&&r.events.emit(ao_message_ack,e)})()}onMessageEvent(e){var r=this;return ue(function*(){(yield r.shouldIgnoreMessageEvent(e))||(r.events.emit(ao_message,e),yield r.recordMessageEvent(e))})()}acknowledgePayload(e){var r=this;return ue(function*(){const s=j0(e.id,!0);yield r.provider.connection.send(s)})()}unregisterProviderListeners(){this.provider.off(Ou_payload,this.onPayloadHandler),this.provider.off(Ou_connect,this.onConnectHandler),this.provider.off(Ou_disconnect,this.onDisconnectHandler),this.provider.off(Ou_error,this.onProviderErrorHandler)}registerEventListeners(){var e=this;return ue(function*(){e.events.on(ao_connection_stalled,()=>{e.restartTransport().catch(s=>e.logger.error(s))});let r=yield l();_e(function(){var s=ue(function*(u){e.initialized&&r!==u&&(r=u,u?yield e.restartTransport().catch(g=>e.logger.error(g)):(e.hasExperiencedNetworkDisruption=!0,yield e.transportClose().catch(g=>e.logger.error(g))))});return function(u){return s.apply(this,arguments)}}())})()}onProviderDisconnect(){this.events.emit(ao_disconnect),this.attemptToReconnect()}attemptToReconnect(){var e=this;this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(ue(function*(){yield e.restartTransport().catch(r=>e.logger.error(r))}),Gt.toMiliseconds(H4)))}isInitialized(){if(!this.initialized){const{message:e}=Ut("NOT_INITIALIZED",this.name);throw new Error(e)}}toEstablishConnection(){var e=this;return ue(function*(){if(yield e.confirmOnlineStateOrThrow(),!e.connected){if(e.connectionAttemptInProgress)return yield new Promise(r=>{const s=setInterval(()=>{e.connected&&(clearInterval(s),r())},e.connectionStatusPollingInterval)});yield e.restartTransport()}})()}}var w8=Object.defineProperty,Kw=Object.getOwnPropertySymbols,E8=Object.prototype.hasOwnProperty,S8=Object.prototype.propertyIsEnumerable,Gw=(n,e,r)=>e in n?w8(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,Yw=(n,e)=>{for(var r in e||(e={}))E8.call(e,r)&&Gw(n,r,e[r]);if(Kw)for(var r of Kw(e))S8.call(e,r)&&Gw(n,r,e[r]);return n};class H0 extends class{constructor(e,r,s,u){this.core=e,this.logger=r,this.name=s}}{constructor(e,r,s,u=Tc,g){var S;super(e,r,s,u),S=this,this.core=e,this.logger=r,this.name=s,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Tc,this.init=ue(function*(){S.initialized||(S.logger.trace("Initialized"),yield S.restore(),S.cached.forEach(I=>{S.getKey&&null!==I&&!Vi(I)?S.map.set(S.getKey(I),I):function(n){var e;return null==(e=n?.proposer)?void 0:e.publicKey}(I)?S.map.set(I.id,I):function(n){return n?.topic}(I)&&S.map.set(I.topic,I)}),S.cached=[],S.initialized=!0)}),this.set=function(){var I=ue(function*(F,A){S.isInitialized(),S.map.has(F)?yield S.update(F,A):(S.logger.debug("Setting value"),S.logger.trace({type:"method",method:"set",key:F,value:A}),S.map.set(F,A),yield S.persist())});return function(F,A){return I.apply(this,arguments)}}(),this.get=I=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:I}),this.getData(I)),this.getAll=I=>(this.isInitialized(),I?this.values.filter(F=>Object.keys(I).every(A=>i6(F[A],I[A]))):this.values),this.update=function(){var I=ue(function*(F,A){S.isInitialized(),S.logger.debug("Updating value"),S.logger.trace({type:"method",method:"update",key:F,update:A});const G=Yw(Yw({},S.getData(F)),A);S.map.set(F,G),yield S.persist()});return function(F,A){return I.apply(this,arguments)}}(),this.delete=function(){var I=ue(function*(F,A){S.isInitialized(),S.map.has(F)&&(S.logger.debug("Deleting value"),S.logger.trace({type:"method",method:"delete",key:F,reason:A}),S.map.delete(F),yield S.persist())});return function(F,A){return I.apply(this,arguments)}}(),this.logger=qn.generateChildLogger(r,this.name),this.storagePrefix=u,this.getKey=g}get context(){return qn.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}setDataStore(e){var r=this;return ue(function*(){yield r.core.storage.setItem(r.storageKey,e)})()}getDataStore(){var e=this;return ue(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getData(e){const r=this.map.get(e);if(!r){const{message:s}=Ut("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(s),new Error(s)}return r}persist(){var e=this;return ue(function*(){yield e.setDataStore(e.values)})()}restore(){var e=this;return ue(function*(){try{const r=yield e.getDataStore();if(typeof r>"u"||!r.length)return;if(e.map.size){const{message:s}=Ut("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(s),new Error(s)}e.cached=r,e.logger.debug(`Successfully Restored value for ${e.name}`),e.logger.trace({type:"method",method:"restore",value:e.values})}catch(r){e.logger.debug(`Failed to Restore value for ${e.name}`),e.logger.error(r)}})()}isInitialized(){if(!this.initialized){const{message:e}=Ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}class O8{constructor(e,r){var s=this;this.core=e,this.logger=r,this.name="pairing",this.version="0.3",this.events=new E.exports,this.initialized=!1,this.storagePrefix=Tc,this.ignoredPayloadTypes=[1],this.registeredMethods=[],this.init=ue(function*(){s.initialized||(yield s.pairings.init(),yield s.cleanup(),s.registerRelayerEvents(),s.registerExpirerEvents(),s.initialized=!0,s.logger.trace("Initialized"))}),this.register=({methods:u})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...u])]},this.create=ue(function*(){s.isInitialized();const u=yu(),g=yield s.core.crypto.setSymKey(u),S=oo(Gt.FIVE_MINUTES),I={protocol:"irn"},F={topic:g,expiry:S,relay:I,active:!1},A=Qh({protocol:s.core.protocol,version:s.core.version,topic:g,symKey:u,relay:I});return yield s.pairings.set(g,F),yield s.core.relayer.subscribe(g),s.core.expirer.set(g,S),{topic:g,uri:A}}),this.pair=function(){var u=ue(function*(g){s.isInitialized(),s.isValidPair(g);const{topic:S,symKey:I,relay:F}=Gh(g.uri);let A;if(s.pairings.keys.includes(S)&&(A=s.pairings.get(S),A.active))throw new Error(`Pairing already exists: ${S}. Please try again with a new connection URI.`);const G=oo(Gt.FIVE_MINUTES),he={topic:S,relay:F,expiry:G,active:!1};return yield s.pairings.set(S,he),s.core.expirer.set(S,G),g.activatePairing&&(yield s.activate({topic:S})),s.events.emit(dp_create,he),s.core.crypto.keychain.has(S)||(yield s.core.crypto.setSymKey(I,S),yield s.core.relayer.subscribe(S,{relay:F})),he});return function(g){return u.apply(this,arguments)}}(),this.activate=function(){var u=ue(function*({topic:g}){s.isInitialized();const S=oo(Gt.THIRTY_DAYS);yield s.pairings.update(g,{active:!0,expiry:S}),s.core.expirer.set(g,S)});return function(g){return u.apply(this,arguments)}}(),this.ping=function(){var u=ue(function*(g){s.isInitialized(),yield s.isValidPing(g);const{topic:S}=g;if(s.pairings.keys.includes(S)){const I=yield s.sendRequest(S,"wc_pairingPing",{}),{done:F,resolve:A,reject:G}=Na();s.events.once(Or("pairing_ping",I),({error:he})=>{he?G(he):A()}),yield F()}});return function(g){return u.apply(this,arguments)}}(),this.updateExpiry=function(){var u=ue(function*({topic:g,expiry:S}){s.isInitialized(),yield s.pairings.update(g,{expiry:S})});return function(g){return u.apply(this,arguments)}}(),this.updateMetadata=function(){var u=ue(function*({topic:g,metadata:S}){s.isInitialized(),yield s.pairings.update(g,{peerMetadata:S})});return function(g){return u.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var u=ue(function*(g){s.isInitialized(),yield s.isValidDisconnect(g);const{topic:S}=g;s.pairings.keys.includes(S)&&(yield s.sendRequest(S,"wc_pairingDelete",Nr("USER_DISCONNECTED")),yield s.deletePairing(S))});return function(g){return u.apply(this,arguments)}}(),this.sendRequest=function(){var u=ue(function*(g,S,I){const F=Zf(S,I),A=yield s.core.crypto.encode(g,F),G=fp[S].req;return s.core.history.set(g,F),s.core.relayer.publish(g,A,G),F.id});return function(g,S,I){return u.apply(this,arguments)}}(),this.sendResult=function(){var u=ue(function*(g,S,I){const F=j0(g,I),A=yield s.core.crypto.encode(S,F),G=yield s.core.history.get(S,g),he=fp[G.request.method].res;yield s.core.relayer.publish(S,A,he),yield s.core.history.resolve(F)});return function(g,S,I){return u.apply(this,arguments)}}(),this.sendError=function(){var u=ue(function*(g,S,I){const F=z0(g,I),A=yield s.core.crypto.encode(S,F),G=yield s.core.history.get(S,g),he=fp[G.request.method]?fp[G.request.method].res:fp.unregistered_method.res;yield s.core.relayer.publish(S,A,he),yield s.core.history.resolve(F)});return function(g,S,I){return u.apply(this,arguments)}}(),this.deletePairing=function(){var u=ue(function*(g,S){yield s.core.relayer.unsubscribe(g),yield Promise.all([s.pairings.delete(g,Nr("USER_DISCONNECTED")),s.core.crypto.deleteSymKey(g),S?Promise.resolve():s.core.expirer.del(g)])});return function(g,S){return u.apply(this,arguments)}}(),this.cleanup=ue(function*(){const u=s.pairings.getAll().filter(g=>Ss(g.expiry));yield Promise.all(u.map(g=>s.deletePairing(g.topic)))}),this.onRelayEventRequest=u=>{const{topic:g,payload:S}=u;switch(S.method){case"wc_pairingPing":return this.onPairingPingRequest(g,S);case"wc_pairingDelete":return this.onPairingDeleteRequest(g,S);default:return this.onUnknownRpcMethodRequest(g,S)}},this.onRelayEventResponse=function(){var u=ue(function*(g){const{topic:S,payload:I}=g,F=(yield s.core.history.get(S,I.id)).request.method;return"wc_pairingPing"===F?s.onPairingPingResponse(S,I):s.onUnknownRpcMethodResponse(F)});return function(g){return u.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var u=ue(function*(g,S){const{id:I}=S;try{s.isValidPing({topic:g}),yield s.sendResult(I,g,!0),s.events.emit(dp_ping,{id:I,topic:g})}catch(F){yield s.sendError(I,g,F),s.logger.error(F)}});return function(g,S){return u.apply(this,arguments)}}(),this.onPairingPingResponse=(u,g)=>{const{id:S}=g;setTimeout(()=>{Eu(g)?this.events.emit(Or("pairing_ping",S),{}):oa(g)&&this.events.emit(Or("pairing_ping",S),{error:g.error})},500)},this.onPairingDeleteRequest=function(){var u=ue(function*(g,S){const{id:I}=S;try{s.isValidDisconnect({topic:g}),yield s.deletePairing(g),s.events.emit(dp_delete,{id:I,topic:g})}catch(F){yield s.sendError(I,g,F),s.logger.error(F)}});return function(g,S){return u.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var u=ue(function*(g,S){const{id:I,method:F}=S;try{if(s.registeredMethods.includes(F))return;const A=Nr("WC_METHOD_UNSUPPORTED",F);yield s.sendError(I,g,A),s.logger.error(A)}catch(A){yield s.sendError(I,g,A),s.logger.error(A)}});return function(g,S){return u.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=u=>{this.registeredMethods.includes(u)||this.logger.error(Nr("WC_METHOD_UNSUPPORTED",u))},this.isValidPair=u=>{var g;if(!Wi(u)){const{message:I}=Ut("MISSING_OR_INVALID",`pair() params: ${u}`);throw new Error(I)}if(!function(n){if(fi(n,!1))try{return typeof new URL(n)<"u"}catch{return!1}return!1}(u.uri)){const{message:I}=Ut("MISSING_OR_INVALID",`pair() uri: ${u.uri}`);throw new Error(I)}const S=Gh(u.uri);if(null==(g=S?.relay)||!g.protocol){const{message:I}=Ut("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(I)}if(null==S||!S.symKey){const{message:I}=Ut("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(I)}},this.isValidPing=function(){var u=ue(function*(g){if(!Wi(g)){const{message:I}=Ut("MISSING_OR_INVALID",`ping() params: ${g}`);throw new Error(I)}const{topic:S}=g;yield s.isValidPairingTopic(S)});return function(g){return u.apply(this,arguments)}}(),this.isValidDisconnect=function(){var u=ue(function*(g){if(!Wi(g)){const{message:I}=Ut("MISSING_OR_INVALID",`disconnect() params: ${g}`);throw new Error(I)}const{topic:S}=g;yield s.isValidPairingTopic(S)});return function(g){return u.apply(this,arguments)}}(),this.isValidPairingTopic=function(){var u=ue(function*(g){if(!fi(g,!1)){const{message:S}=Ut("MISSING_OR_INVALID",`pairing topic should be a string: ${g}`);throw new Error(S)}if(!s.pairings.keys.includes(g)){const{message:S}=Ut("NO_MATCHING_KEY",`pairing topic doesn't exist: ${g}`);throw new Error(S)}if(Ss(s.pairings.get(g).expiry)){yield s.deletePairing(g);const{message:S}=Ut("EXPIRED",`pairing topic: ${g}`);throw new Error(S)}});return function(g){return u.apply(this,arguments)}}(),this.core=e,this.logger=qn.generateChildLogger(r,this.name),this.pairings=new H0(this.core,this.logger,this.name,this.storagePrefix)}get context(){return qn.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Ut("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){var e=this;this.core.relayer.on(ao_message,function(){var r=ue(function*(s){const{topic:u,message:g}=s;if(!e.pairings.keys.includes(u)||e.ignoredPayloadTypes.includes(e.core.crypto.getPayloadType(g)))return;const S=yield e.core.crypto.decode(u,g);try{bm(S)?(e.core.history.set(u,S),e.onRelayEventRequest({topic:u,payload:S})):B0(S)&&(yield e.core.history.resolve(S),yield e.onRelayEventResponse({topic:u,payload:S}),e.core.history.delete(u,S.id))}catch(I){e.logger.error(I)}});return function(s){return r.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.core.expirer.on(Os_expired,function(){var r=ue(function*(s){const{topic:u}=ia(s.target);u&&e.pairings.keys.includes(u)&&(yield e.deletePairing(u,!0),e.events.emit(dp_expire,{topic:u}))});return function(s){return r.apply(this,arguments)}}())}}class x8 extends wg{constructor(e,r){var s;super(e,r),s=this,this.core=e,this.logger=r,this.records=new Map,this.events=new E.exports.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Tc,this.init=ue(function*(){s.initialized||(s.logger.trace("Initialized"),yield s.restore(),s.cached.forEach(u=>s.records.set(u.id,u)),s.cached=[],s.registerEventListeners(),s.initialized=!0)}),this.set=(u,g,S)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:u,request:g,chainId:S}),this.records.has(g.id))return;const I={id:g.id,topic:u,request:{method:g.method,params:g.params||null},chainId:S,expiry:oo(Gt.THIRTY_DAYS)};this.records.set(I.id,I),this.events.emit(ja_created,I)},this.resolve=function(){var u=ue(function*(g){if(s.isInitialized(),s.logger.debug("Updating JSON-RPC response history record"),s.logger.trace({type:"method",method:"update",response:g}),!s.records.has(g.id))return;const S=yield s.getRecord(g.id);typeof S.response>"u"&&(S.response=oa(g)?{error:g.error}:{result:g.result},s.records.set(S.id,S),s.events.emit(ja_updated,S))});return function(g){return u.apply(this,arguments)}}(),this.get=function(){var u=ue(function*(g,S){return s.isInitialized(),s.logger.debug("Getting record"),s.logger.trace({type:"method",method:"get",topic:g,id:S}),yield s.getRecord(S)});return function(g,S){return u.apply(this,arguments)}}(),this.delete=(u,g)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:g}),this.values.forEach(S=>{if(S.topic===u){if(typeof g<"u"&&S.id!==g)return;this.records.delete(S.id),this.events.emit(ja_deleted,S)}})},this.exists=function(){var u=ue(function*(g,S){return s.isInitialized(),!!s.records.has(S)&&(yield s.getRecord(S)).topic===g});return function(g,S){return u.apply(this,arguments)}}(),this.on=(u,g)=>{this.events.on(u,g)},this.once=(u,g)=>{this.events.once(u,g)},this.off=(u,g)=>{this.events.off(u,g)},this.removeListener=(u,g)=>{this.events.removeListener(u,g)},this.logger=qn.generateChildLogger(r,this.name)}get context(){return qn.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const s={topic:r.topic,request:Zf(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(s)}),e}setJsonRpcRecords(e){var r=this;return ue(function*(){yield r.core.storage.setItem(r.storageKey,e)})()}getJsonRpcRecords(){var e=this;return ue(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getRecord(e){this.isInitialized();const r=this.records.get(e);if(!r){const{message:s}=Ut("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(s)}return r}persist(){var e=this;return ue(function*(){yield e.setJsonRpcRecords(e.values),e.events.emit(ja_sync)})()}restore(){var e=this;return ue(function*(){try{const r=yield e.getJsonRpcRecords();if(typeof r>"u"||!r.length)return;if(e.records.size){const{message:s}=Ut("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(s),new Error(s)}e.cached=r,e.logger.debug(`Successfully Restored records for ${e.name}`),e.logger.trace({type:"method",method:"restore",records:e.values})}catch(r){e.logger.debug(`Failed to Restore records for ${e.name}`),e.logger.error(r)}})()}registerEventListeners(){this.events.on(ja_created,e=>{const r=ja_created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(ja_updated,e=>{const r=ja_updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(ja_deleted,e=>{const r=ja_deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.core.heartbeat.on(lo.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{Gt.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=Ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}class R8 extends cl{constructor(e,r){var s;super(e,r),s=this,this.core=e,this.logger=r,this.expirations=new Map,this.events=new E.exports.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Tc,this.init=ue(function*(){s.initialized||(s.logger.trace("Initialized"),yield s.restore(),s.cached.forEach(u=>s.expirations.set(u.target,u)),s.cached=[],s.registerEventListeners(),s.initialized=!0)}),this.has=u=>{try{const g=this.formatTarget(u);return typeof this.getExpiration(g)<"u"}catch{return!1}},this.set=(u,g)=>{this.isInitialized();const S=this.formatTarget(u),I={target:S,expiry:g};this.expirations.set(S,I),this.checkExpiry(S,I),this.events.emit(Os_created,{target:S,expiration:I})},this.get=u=>{this.isInitialized();const g=this.formatTarget(u);return this.getExpiration(g)},this.del=u=>{if(this.isInitialized(),this.has(u)){const g=this.formatTarget(u),S=this.getExpiration(g);this.expirations.delete(g),this.events.emit(Os_deleted,{target:g,expiration:S})}},this.on=(u,g)=>{this.events.on(u,g)},this.once=(u,g)=>{this.events.once(u,g)},this.off=(u,g)=>{this.events.off(u,g)},this.removeListener=(u,g)=>{this.events.removeListener(u,g)},this.logger=qn.generateChildLogger(r,this.name)}get context(){return qn.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function(n){return io("topic",n)}(e);if("number"==typeof e)return function(n){return io("id",n)}(e);const{message:r}=Ut("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(r)}setExpirations(e){var r=this;return ue(function*(){yield r.core.storage.setItem(r.storageKey,e)})()}getExpirations(){var e=this;return ue(function*(){return yield e.core.storage.getItem(e.storageKey)})()}persist(){var e=this;return ue(function*(){yield e.setExpirations(e.values),e.events.emit(Os_sync)})()}restore(){var e=this;return ue(function*(){try{const r=yield e.getExpirations();if(typeof r>"u"||!r.length)return;if(e.expirations.size){const{message:s}=Ut("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(s),new Error(s)}e.cached=r,e.logger.debug(`Successfully Restored expirations for ${e.name}`),e.logger.trace({type:"method",method:"restore",expirations:e.values})}catch(r){e.logger.debug(`Failed to Restore expirations for ${e.name}`),e.logger.error(r)}})()}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:s}=Ut("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(s),new Error(s)}return r}checkExpiry(e,r){const{expiry:s}=r;Gt.toMiliseconds(s)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(Os_expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(lo.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Os_created,e=>{const r=Os_created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Os_expired,e=>{const r=Os_expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Os_deleted,e=>{const r=Os_deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ut("NOT_INITIALIZED",this.name);throw new Error(e)}}}class I8 extends class{constructor(e,r){this.projectId=e,this.logger=r}}{constructor(e,r){var s;super(e,r),s=this,this.projectId=e,this.logger=r,this.name=Rm,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=function(){var u=ue(function*(g){if(s.verifyDisabled||na()||!Pa())return;const S=s.getVerifyUrl(g?.verifyUrl);s.verifyUrl!==S&&s.removeIframe(),s.verifyUrl=S;try{yield s.createIframe()}catch(I){s.logger.info(`Verify iframe failed to load: ${s.verifyUrl}`),s.logger.info(I)}if(!s.initialized){s.removeIframe(),s.verifyUrl=Im;try{yield s.createIframe()}catch(I){s.logger.info(`Verify iframe failed to load: ${s.verifyUrl}`),s.logger.info(I),s.verifyDisabled=!0}}});return function(g){return u.apply(this,arguments)}}(),this.register=function(){var u=ue(function*(g){s.initialized?s.sendPost(g.attestationId):(s.addToQueue(g.attestationId),yield s.init())});return function(g){return u.apply(this,arguments)}}(),this.resolve=function(){var u=ue(function*(g){if(s.isDevEnv)return"";const S=s.getVerifyUrl(g?.verifyUrl);let I;try{I=yield s.fetchAttestation(g.attestationId,S)}catch(F){s.logger.info(`failed to resolve attestation: ${g.attestationId} from url: ${S}`),s.logger.info(F),I=yield s.fetchAttestation(g.attestationId,Im)}return I});return function(g){return u.apply(this,arguments)}}(),this.fetchAttestation=function(){var u=ue(function*(g,S){s.logger.info(`resolving attestation: ${g} from url: ${S}`);const I=s.startAbortTimer(2*Gt.ONE_SECOND),F=yield fetch(`${S}/attestation/${g}`,{signal:s.abortController.signal});return clearTimeout(I),200===F.status?yield F.json():void 0});return function(g,S){return u.apply(this,arguments)}}(),this.addToQueue=u=>{this.queue.push(u)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach(u=>this.sendPost(u)),this.queue=[])},this.sendPost=u=>{var g;try{if(!this.iframe)return;null==(g=this.iframe.contentWindow)||g.postMessage(u,"*"),this.logger.info(`postMessage sent: ${u} ${this.verifyUrl}`)}catch{}},this.createIframe=ue(function*(){let u;const g=S=>{"verify_ready"===S.data&&(s.initialized=!0,s.processQueue(),window.removeEventListener("message",g),u())};yield Promise.race([new Promise(S=>{if(document.getElementById(Rm))return S();window.addEventListener("message",g);const I=document.createElement("iframe");I.id=Rm,I.src=`${s.verifyUrl}/${s.projectId}`,I.style.display="none",document.body.append(I),s.iframe=I,u=S}),new Promise((S,I)=>setTimeout(()=>{window.removeEventListener("message",g),I("verify iframe load timeout")},Gt.toMiliseconds(Gt.FIVE_SECONDS)))])}),this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=u=>{let g=u||ed;return n8.includes(g)||(this.logger.info(`verify url: ${g}, not included in trusted list, assigning default: ${ed}`),g=ed),g},this.logger=qn.generateChildLogger(r,this.name),this.verifyUrl=ed,this.abortController=new AbortController,this.isDevEnv=Vh()&&process.env.IS_VITEST}get context(){return qn.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),Gt.toMiliseconds(e))}}class C8 extends class{constructor(e,r){this.projectId=e,this.logger=r}}{constructor(e,r){var s;super(e,r),s=this,this.projectId=e,this.logger=r,this.context="echo",this.registerDeviceToken=function(){var u=ue(function*(g){const{clientId:S,token:I,notificationType:F,enableEncrypted:A=!1}=g,G=`https://echo.walletconnect.com/${s.projectId}/clients`;yield s6(G,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:S,type:F,token:I,always_raw:A})})});return function(g){return u.apply(this,arguments)}}(),this.logger=qn.generateChildLogger(r,this.context)}}var P8=Object.defineProperty,Qw=Object.getOwnPropertySymbols,k8=Object.prototype.hasOwnProperty,N8=Object.prototype.propertyIsEnumerable,Jw=(n,e,r)=>e in n?P8(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,Xw=(n,e)=>{for(var r in e||(e={}))k8.call(e,r)&&Jw(n,r,e[r]);if(Qw)for(var r of Qw(e))N8.call(e,r)&&Jw(n,r,e[r]);return n};class Pm extends bg{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=xm,this.events=new E.exports.EventEmitter,this.initialized=!1,this.on=(s,u)=>this.events.on(s,u),this.once=(s,u)=>this.events.once(s,u),this.off=(s,u)=>this.events.off(s,u),this.removeListener=(s,u)=>this.events.removeListener(s,u),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||Fw,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const r=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:qn.pino(qn.getDefaultLoggerOptions({level:e?.logger||P4_logger}));this.logger=qn.generateChildLogger(r,this.name),this.heartbeat=new lo.HeartBeat,this.crypto=new s8(this,this.logger,e?.keychain),this.history=new x8(this,this.logger),this.expirer=new R8(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new Qa(Xw(Xw({},k4),e?.storageOptions)),this.relayer=new b8({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new O8(this,this.logger),this.verify=new I8(this.projectId||"",this.logger),this.echoClient=new C8(this.projectId||"",this.logger)}static init(e){return ue(function*(){const r=new Pm(e);yield r.initialize();const s=yield r.crypto.getClientId();return yield r.storage.setItem("WALLETCONNECT_CLIENT_ID",s),r})()}get context(){return qn.getLoggerContext(this.logger)}start(){var e=this;return ue(function*(){e.initialized||(yield e.initialize())})()}initialize(){var e=this;return ue(function*(){e.logger.trace("Initialized");try{yield e.crypto.init(),yield e.history.init(),yield e.expirer.init(),yield e.relayer.init(),yield e.heartbeat.init(),yield e.pairing.init(),e.initialized=!0,e.logger.info("Core Initialization Success")}catch(r){throw e.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,r),e.logger.error(r.message),r}})()}}const A8=Pm,km="wc@2:client:",Nm_name="client",Nm_logger="error",n2="WALLETCONNECT_DEEPLINK_CHOICE",r2="Proposal expired",q0=Gt.SEVEN_DAYS,pp={wc_sessionPropose:{req:{ttl:Gt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Gt.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Gt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Gt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Gt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Gt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Gt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Gt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Gt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Gt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Gt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Gt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Gt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Gt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Gt.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Gt.THIRTY_SECONDS,prompt:!1,tag:1115}}},Am={min:Gt.FIVE_MINUTES,max:Gt.SEVEN_DAYS},xu_idle="IDLE",xu_active="ACTIVE",D8=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var j8=Object.defineProperty,z8=Object.defineProperties,B8=Object.getOwnPropertyDescriptors,i2=Object.getOwnPropertySymbols,F8=Object.prototype.hasOwnProperty,H8=Object.prototype.propertyIsEnumerable,o2=(n,e,r)=>e in n?j8(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,zo=(n,e)=>{for(var r in e||(e={}))F8.call(e,r)&&o2(n,r,e[r]);if(i2)for(var r of i2(e))H8.call(e,r)&&o2(n,r,e[r]);return n},gp=(n,e)=>z8(n,B8(e));class q8 extends class{constructor(e){this.client=e}}{constructor(e){var r;super(e),r=this,this.name="engine",this.events=new E.exports,this.initialized=!1,this.ignoredPayloadTypes=[1],this.requestQueue={state:xu_idle,queue:[]},this.sessionRequestQueue={state:xu_idle,queue:[]},this.requestQueueDelay=Gt.ONE_SECOND,this.init=ue(function*(){r.initialized||(yield r.cleanup(),r.registerRelayerEvents(),r.registerExpirerEvents(),r.registerPairingEvents(),r.client.core.pairing.register({methods:Object.keys(pp)}),r.initialized=!0,setTimeout(()=>{r.sessionRequestQueue.queue=r.getPendingSessionRequests(),r.processSessionRequestQueue()},Gt.toMiliseconds(r.requestQueueDelay)))}),this.connect=function(){var s=ue(function*(u){yield r.isInitialized();const g=gp(zo({},u),{requiredNamespaces:u.requiredNamespaces||{},optionalNamespaces:u.optionalNamespaces||{}});yield r.isValidConnect(g);const{pairingTopic:S,requiredNamespaces:I,optionalNamespaces:F,sessionProperties:A,relays:G}=g;let he,te=S,Ne=!1;if(te&&(Ne=r.client.core.pairing.pairings.get(te).active),!te||!Ne){const{topic:be,uri:ae}=yield r.client.core.pairing.create();te=be,he=ae}const se=yield r.client.core.crypto.generateKeyPair(),Ce=zo({requiredNamespaces:I,optionalNamespaces:F,relays:G??[{protocol:"irn"}],proposer:{publicKey:se,metadata:r.client.metadata}},A&&{sessionProperties:A}),{reject:lt,resolve:Ot,done:Te}=Na(Gt.FIVE_MINUTES,r2);if(r.events.once(Or("session_connect"),function(){var be=ue(function*({error:ae,session:k}){if(ae)lt(ae);else if(k){k.self.publicKey=se;const fe=gp(zo({},k),{requiredNamespaces:k.requiredNamespaces,optionalNamespaces:k.optionalNamespaces});yield r.client.session.set(k.topic,fe),yield r.setExpiry(k.topic,k.expiry),te&&(yield r.client.core.pairing.updateMetadata({topic:te,metadata:k.peer.metadata})),Ot(fe)}});return function(ae){return be.apply(this,arguments)}}()),!te){const{message:be}=Ut("NO_MATCHING_KEY",`connect() pairing topic: ${te}`);throw new Error(be)}const Ue=yield r.sendRequest({topic:te,method:"wc_sessionPropose",params:Ce}),ge=oo(Gt.FIVE_MINUTES);return yield r.setProposal(Ue,zo({id:Ue,expiry:ge},Ce)),{uri:he,approval:Te}});return function(u){return s.apply(this,arguments)}}(),this.pair=function(){var s=ue(function*(u){return yield r.isInitialized(),yield r.client.core.pairing.pair(u)});return function(u){return s.apply(this,arguments)}}(),this.approve=function(){var s=ue(function*(u){yield r.isInitialized(),yield r.isValidApprove(u);const{id:g,relayProtocol:S,namespaces:I,sessionProperties:F}=u,A=r.client.proposal.get(g);let{pairingTopic:G,proposer:he,requiredNamespaces:te,optionalNamespaces:Ne}=A;G=G||"",xr(te)||(te=function(n,e){const r=_u(n,e);if(r)throw new Error(r.message);const s={};for(const[u,g]of Object.entries(n))s[u]={methods:g.methods,events:g.events,chains:g.accounts.map(S=>`${S.split(":")[0]}:${S.split(":")[1]}`)};return s}(I,"approve()"));const se=yield r.client.core.crypto.generateKeyPair(),Ce=he.publicKey,lt=yield r.client.core.crypto.generateSharedKey(se,Ce);G&&g&&(yield r.client.core.pairing.updateMetadata({topic:G,metadata:he.metadata}),yield r.sendResult({id:g,topic:G,result:{relay:{protocol:S??"irn"},responderPublicKey:se}}),yield r.client.proposal.delete(g,Nr("USER_DISCONNECTED")),yield r.client.core.pairing.activate({topic:G}));const Ot=zo({relay:{protocol:S??"irn"},namespaces:I,requiredNamespaces:te,optionalNamespaces:Ne,pairingTopic:G,controller:{publicKey:se,metadata:r.client.metadata},expiry:oo(q0)},F&&{sessionProperties:F});yield r.client.core.relayer.subscribe(lt),yield r.sendRequest({topic:lt,method:"wc_sessionSettle",params:Ot,throwOnFailedPublish:!0});const Te=gp(zo({},Ot),{topic:lt,pairingTopic:G,acknowledged:!1,self:Ot.controller,peer:{publicKey:he.publicKey,metadata:he.metadata},controller:se});return yield r.client.session.set(lt,Te),yield r.setExpiry(lt,oo(q0)),{topic:lt,acknowledged:()=>new Promise(Ue=>setTimeout(()=>Ue(r.client.session.get(lt)),500))}});return function(u){return s.apply(this,arguments)}}(),this.reject=function(){var s=ue(function*(u){yield r.isInitialized(),yield r.isValidReject(u);const{id:g,reason:S}=u,{pairingTopic:I}=r.client.proposal.get(g);I&&(yield r.sendError(g,I,S),yield r.client.proposal.delete(g,Nr("USER_DISCONNECTED")))});return function(u){return s.apply(this,arguments)}}(),this.update=function(){var s=ue(function*(u){yield r.isInitialized(),yield r.isValidUpdate(u);const{topic:g,namespaces:S}=u,I=yield r.sendRequest({topic:g,method:"wc_sessionUpdate",params:{namespaces:S}}),{done:F,resolve:A,reject:G}=Na();return r.events.once(Or("session_update",I),({error:he})=>{he?G(he):A()}),yield r.client.session.update(g,{namespaces:S}),{acknowledged:F}});return function(u){return s.apply(this,arguments)}}(),this.extend=function(){var s=ue(function*(u){yield r.isInitialized(),yield r.isValidExtend(u);const{topic:g}=u,S=yield r.sendRequest({topic:g,method:"wc_sessionExtend",params:{}}),{done:I,resolve:F,reject:A}=Na();return r.events.once(Or("session_extend",S),({error:G})=>{G?A(G):F()}),yield r.setExpiry(g,oo(q0)),{acknowledged:I}});return function(u){return s.apply(this,arguments)}}(),this.request=function(){var s=ue(function*(u){yield r.isInitialized(),yield r.isValidRequest(u);const{chainId:g,request:S,topic:I,expiry:F}=u,A=_m(),{done:G,resolve:he,reject:te}=Na(F,"Request expired. Please try again.");return r.events.once(Or("session_request",A),({error:Ne,result:se})=>{Ne?te(Ne):he(se)}),yield Promise.all([new Promise(function(){var Ne=ue(function*(se){yield r.sendRequest({clientRpcId:A,topic:I,method:"wc_sessionRequest",params:{request:S,chainId:g},expiry:F,throwOnFailedPublish:!0}).catch(Ce=>te(Ce)),r.client.events.emit("session_request_sent",{topic:I,request:S,chainId:g,id:A}),se()});return function(se){return Ne.apply(this,arguments)}}()),new Promise(function(){var Ne=ue(function*(se){const Ce=yield function(n,e){return Pl.apply(this,arguments)}(r.client.core.storage,n2);(function(n){Cc.apply(this,arguments)})({id:A,topic:I,wcDeepLink:Ce}),se()});return function(se){return Ne.apply(this,arguments)}}()),G()]).then(Ne=>Ne[2])});return function(u){return s.apply(this,arguments)}}(),this.respond=function(){var s=ue(function*(u){yield r.isInitialized(),yield r.isValidRespond(u);const{topic:g,response:S}=u,{id:I}=S;Eu(S)?yield r.sendResult({id:I,topic:g,result:S.result,throwOnFailedPublish:!0}):oa(S)&&(yield r.sendError(I,g,S.error)),r.cleanupAfterResponse(u)});return function(u){return s.apply(this,arguments)}}(),this.ping=function(){var s=ue(function*(u){yield r.isInitialized(),yield r.isValidPing(u);const{topic:g}=u;if(r.client.session.keys.includes(g)){const S=yield r.sendRequest({topic:g,method:"wc_sessionPing",params:{}}),{done:I,resolve:F,reject:A}=Na();r.events.once(Or("session_ping",S),({error:G})=>{G?A(G):F()}),yield I()}else r.client.core.pairing.pairings.keys.includes(g)&&(yield r.client.core.pairing.ping({topic:g}))});return function(u){return s.apply(this,arguments)}}(),this.emit=function(){var s=ue(function*(u){yield r.isInitialized(),yield r.isValidEmit(u);const{topic:g,event:S,chainId:I}=u;yield r.sendRequest({topic:g,method:"wc_sessionEvent",params:{event:S,chainId:I}})});return function(u){return s.apply(this,arguments)}}(),this.disconnect=function(){var s=ue(function*(u){yield r.isInitialized(),yield r.isValidDisconnect(u);const{topic:g}=u;r.client.session.keys.includes(g)?(yield r.sendRequest({topic:g,method:"wc_sessionDelete",params:Nr("USER_DISCONNECTED"),throwOnFailedPublish:!0}),yield r.deleteSession(g)):yield r.client.core.pairing.disconnect({topic:g})});return function(u){return s.apply(this,arguments)}}(),this.find=s=>(this.isInitialized(),this.client.session.getAll().filter(u=>function(n,e){const{requiredNamespaces:r}=e,s=Object.keys(n.namespaces),u=Object.keys(r);let g=!0;return!!is(u,s)&&(s.forEach(S=>{const{accounts:I,methods:F,events:A}=n.namespaces[S],G=Do(I),he=r[S];is(ws(S,he),G)&&is(he.methods,F)&&is(he.events,A)||(g=!1)}),g)}(u,s))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=function(){var s=ue(function*(u){if(u.pairingTopic)try{const g=r.client.core.pairing.pairings.get(u.pairingTopic),S=r.client.core.pairing.pairings.getAll().filter(I=>{var F,A;return(null==(F=I.peerMetadata)?void 0:F.url)&&(null==(A=I.peerMetadata)?void 0:A.url)===u.peer.metadata.url&&I.topic&&I.topic!==g.topic});if(0===S.length)return;r.client.logger.info(`Cleaning up ${S.length} duplicate pairing(s)`),yield Promise.all(S.map(I=>r.client.core.pairing.disconnect({topic:I.topic}))),r.client.logger.info("Duplicate pairings clean up finished")}catch(g){r.client.logger.error(g)}});return function(u){return s.apply(this,arguments)}}(),this.deleteSession=function(){var s=ue(function*(u,g){const{self:S}=r.client.session.get(u);yield r.client.core.relayer.unsubscribe(u),r.client.session.delete(u,Nr("USER_DISCONNECTED")),r.client.core.crypto.keychain.has(S.publicKey)&&(yield r.client.core.crypto.deleteKeyPair(S.publicKey)),r.client.core.crypto.keychain.has(u)&&(yield r.client.core.crypto.deleteSymKey(u)),g||r.client.core.expirer.del(u),r.client.core.storage.removeItem(n2).catch(I=>r.client.logger.warn(I)),r.getPendingSessionRequests().forEach(I=>{I.topic===u&&r.deletePendingSessionRequest(I.id,Nr("USER_DISCONNECTED"))})});return function(u,g){return s.apply(this,arguments)}}(),this.deleteProposal=function(){var s=ue(function*(u,g){yield Promise.all([r.client.proposal.delete(u,Nr("USER_DISCONNECTED")),g?Promise.resolve():r.client.core.expirer.del(u)])});return function(u,g){return s.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var s=ue(function*(u,g,S=!1){yield Promise.all([r.client.pendingRequest.delete(u,g),S?Promise.resolve():r.client.core.expirer.del(u)]),r.sessionRequestQueue.queue=r.sessionRequestQueue.queue.filter(I=>I.id!==u),S&&(r.sessionRequestQueue.state=xu_idle)});return function(u,g){return s.apply(this,arguments)}}(),this.setExpiry=function(){var s=ue(function*(u,g){r.client.session.keys.includes(u)&&(yield r.client.session.update(u,{expiry:g})),r.client.core.expirer.set(u,g)});return function(u,g){return s.apply(this,arguments)}}(),this.setProposal=function(){var s=ue(function*(u,g){yield r.client.proposal.set(u,g),r.client.core.expirer.set(u,g.expiry)});return function(u,g){return s.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var s=ue(function*(u){const g=pp.wc_sessionRequest.req.ttl,{id:S,topic:I,params:F,verifyContext:A}=u;yield r.client.pendingRequest.set(S,{id:S,topic:I,params:F,verifyContext:A}),g&&r.client.core.expirer.set(S,oo(g))});return function(u){return s.apply(this,arguments)}}(),this.sendRequest=function(){var s=ue(function*(u){const{topic:g,method:S,params:I,expiry:F,relayRpcId:A,clientRpcId:G,throwOnFailedPublish:he}=u,te=Zf(S,I,G);if(Pa()&&D8.includes(S)){const Ce=mu(JSON.stringify(te));r.client.core.verify.register({attestationId:Ce})}const Ne=yield r.client.core.crypto.encode(g,te),se=pp[S].req;return F&&(se.ttl=F),A&&(se.id=A),r.client.core.history.set(g,te),he?(se.internal=gp(zo({},se.internal),{throwOnFailedPublish:!0}),yield r.client.core.relayer.publish(g,Ne,se)):r.client.core.relayer.publish(g,Ne,se).catch(Ce=>r.client.logger.error(Ce)),te.id});return function(u){return s.apply(this,arguments)}}(),this.sendResult=function(){var s=ue(function*(u){const{id:g,topic:S,result:I,throwOnFailedPublish:F}=u,A=j0(g,I),G=yield r.client.core.crypto.encode(S,A),he=yield r.client.core.history.get(S,g),te=pp[he.request.method].res;F?(te.internal=gp(zo({},te.internal),{throwOnFailedPublish:!0}),yield r.client.core.relayer.publish(S,G,te)):r.client.core.relayer.publish(S,G,te).catch(Ne=>r.client.logger.error(Ne)),yield r.client.core.history.resolve(A)});return function(u){return s.apply(this,arguments)}}(),this.sendError=function(){var s=ue(function*(u,g,S){const I=z0(u,S),F=yield r.client.core.crypto.encode(g,I),A=yield r.client.core.history.get(g,u);r.client.core.relayer.publish(g,F,pp[A.request.method].res),yield r.client.core.history.resolve(I)});return function(u,g,S){return s.apply(this,arguments)}}(),this.cleanup=ue(function*(){const s=[],u=[];r.client.session.getAll().forEach(g=>{Ss(g.expiry)&&s.push(g.topic)}),r.client.proposal.getAll().forEach(g=>{Ss(g.expiry)&&u.push(g.id)}),yield Promise.all([...s.map(g=>r.deleteSession(g)),...u.map(g=>r.deleteProposal(g))])}),this.onRelayEventRequest=function(){var s=ue(function*(u){r.requestQueue.queue.push(u),yield r.processRequestsQueue()});return function(u){return s.apply(this,arguments)}}(),this.processRequestsQueue=ue(function*(){if(r.requestQueue.state!==xu_active){for(r.client.logger.info(`Request queue starting with ${r.requestQueue.queue.length} requests`);r.requestQueue.queue.length>0;){r.requestQueue.state=xu_active;const s=r.requestQueue.queue.shift();if(s)try{r.processRequest(s),yield new Promise(u=>setTimeout(u,300))}catch(u){r.client.logger.warn(u)}}r.requestQueue.state=xu_idle}else r.client.logger.info("Request queue already active, skipping...")}),this.processRequest=s=>{const{topic:u,payload:g}=s,S=g.method;switch(S){case"wc_sessionPropose":return this.onSessionProposeRequest(u,g);case"wc_sessionSettle":return this.onSessionSettleRequest(u,g);case"wc_sessionUpdate":return this.onSessionUpdateRequest(u,g);case"wc_sessionExtend":return this.onSessionExtendRequest(u,g);case"wc_sessionPing":return this.onSessionPingRequest(u,g);case"wc_sessionDelete":return this.onSessionDeleteRequest(u,g);case"wc_sessionRequest":return this.onSessionRequest(u,g);case"wc_sessionEvent":return this.onSessionEventRequest(u,g);default:return this.client.logger.info(`Unsupported request method ${S}`)}},this.onRelayEventResponse=function(){var s=ue(function*(u){const{topic:g,payload:S}=u,I=(yield r.client.core.history.get(g,S.id)).request.method;switch(I){case"wc_sessionPropose":return r.onSessionProposeResponse(g,S);case"wc_sessionSettle":return r.onSessionSettleResponse(g,S);case"wc_sessionUpdate":return r.onSessionUpdateResponse(g,S);case"wc_sessionExtend":return r.onSessionExtendResponse(g,S);case"wc_sessionPing":return r.onSessionPingResponse(g,S);case"wc_sessionRequest":return r.onSessionRequestResponse(g,S);default:return r.client.logger.info(`Unsupported response method ${I}`)}});return function(u){return s.apply(this,arguments)}}(),this.onRelayEventUnknownPayload=s=>{const{topic:u}=s,{message:g}=Ut("MISSING_OR_INVALID",`Decoded payload on topic ${u} is not identifiable as a JSON-RPC request or a response.`);throw new Error(g)},this.onSessionProposeRequest=function(){var s=ue(function*(u,g){const{params:S,id:I}=g;try{r.isValidConnect(zo({},g.params));const F=oo(Gt.FIVE_MINUTES),A=zo({id:I,pairingTopic:u,expiry:F},S);yield r.setProposal(I,A);const G=mu(JSON.stringify(g)),he=yield r.getVerifyContext(G,A.proposer.metadata);r.client.events.emit("session_proposal",{id:I,params:A,verifyContext:he})}catch(F){yield r.sendError(I,u,F),r.client.logger.error(F)}});return function(u,g){return s.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var s=ue(function*(u,g){const{id:S}=g;if(Eu(g)){const{result:I}=g;r.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:I});const F=r.client.proposal.get(S);r.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:F});const A=F.proposer.publicKey;r.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:A});const G=I.responderPublicKey;r.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:G});const he=yield r.client.core.crypto.generateSharedKey(A,G);r.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:he});const te=yield r.client.core.relayer.subscribe(he);r.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:te}),yield r.client.core.pairing.activate({topic:u})}else oa(g)&&(yield r.client.proposal.delete(S,Nr("USER_DISCONNECTED")),r.events.emit(Or("session_connect"),{error:g.error}))});return function(u,g){return s.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var s=ue(function*(u,g){const{id:S,params:I}=g;try{r.isValidSessionSettleRequest(I);const{relay:F,controller:A,expiry:G,namespaces:he,requiredNamespaces:te,optionalNamespaces:Ne,sessionProperties:se,pairingTopic:Ce}=g.params,lt=zo({topic:u,relay:F,expiry:G,namespaces:he,acknowledged:!0,pairingTopic:Ce,requiredNamespaces:te,optionalNamespaces:Ne,controller:A.publicKey,self:{publicKey:"",metadata:r.client.metadata},peer:{publicKey:A.publicKey,metadata:A.metadata}},se&&{sessionProperties:se});yield r.sendResult({id:g.id,topic:u,result:!0}),r.events.emit(Or("session_connect"),{session:lt}),r.cleanupDuplicatePairings(lt)}catch(F){yield r.sendError(S,u,F),r.client.logger.error(F)}});return function(u,g){return s.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var s=ue(function*(u,g){const{id:S}=g;Eu(g)?(yield r.client.session.update(u,{acknowledged:!0}),r.events.emit(Or("session_approve",S),{})):oa(g)&&(yield r.client.session.delete(u,Nr("USER_DISCONNECTED")),r.events.emit(Or("session_approve",S),{error:g.error}))});return function(u,g){return s.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var s=ue(function*(u,g){const{params:S,id:I}=g;try{const F=`${u}_session_update`,A=st.get(F);if(A&&r.isRequestOutOfSync(A,I))return void r.client.logger.info(`Discarding out of sync request - ${I}`);r.isValidUpdate(zo({topic:u},S)),yield r.client.session.update(u,{namespaces:S.namespaces}),yield r.sendResult({id:I,topic:u,result:!0}),r.client.events.emit("session_update",{id:I,topic:u,params:S}),st.set(F,I)}catch(F){yield r.sendError(I,u,F),r.client.logger.error(F)}});return function(u,g){return s.apply(this,arguments)}}(),this.isRequestOutOfSync=(s,u)=>parseInt(u.toString().slice(0,-3))<=parseInt(s.toString().slice(0,-3)),this.onSessionUpdateResponse=(s,u)=>{const{id:g}=u;Eu(u)?this.events.emit(Or("session_update",g),{}):oa(u)&&this.events.emit(Or("session_update",g),{error:u.error})},this.onSessionExtendRequest=function(){var s=ue(function*(u,g){const{id:S}=g;try{r.isValidExtend({topic:u}),yield r.setExpiry(u,oo(q0)),yield r.sendResult({id:S,topic:u,result:!0}),r.client.events.emit("session_extend",{id:S,topic:u})}catch(I){yield r.sendError(S,u,I),r.client.logger.error(I)}});return function(u,g){return s.apply(this,arguments)}}(),this.onSessionExtendResponse=(s,u)=>{const{id:g}=u;Eu(u)?this.events.emit(Or("session_extend",g),{}):oa(u)&&this.events.emit(Or("session_extend",g),{error:u.error})},this.onSessionPingRequest=function(){var s=ue(function*(u,g){const{id:S}=g;try{r.isValidPing({topic:u}),yield r.sendResult({id:S,topic:u,result:!0}),r.client.events.emit("session_ping",{id:S,topic:u})}catch(I){yield r.sendError(S,u,I),r.client.logger.error(I)}});return function(u,g){return s.apply(this,arguments)}}(),this.onSessionPingResponse=(s,u)=>{const{id:g}=u;setTimeout(()=>{Eu(u)?this.events.emit(Or("session_ping",g),{}):oa(u)&&this.events.emit(Or("session_ping",g),{error:u.error})},500)},this.onSessionDeleteRequest=function(){var s=ue(function*(u,g){const{id:S}=g;try{r.isValidDisconnect({topic:u,reason:g.params}),yield Promise.all([new Promise(I=>{r.client.core.relayer.once(ao_publish,ue(function*(){I(yield r.deleteSession(u))}))}),r.sendResult({id:S,topic:u,result:!0})]),r.client.events.emit("session_delete",{id:S,topic:u})}catch(I){r.client.logger.error(I)}});return function(u,g){return s.apply(this,arguments)}}(),this.onSessionRequest=function(){var s=ue(function*(u,g){const{id:S,params:I}=g;try{r.isValidRequest(zo({topic:u},I));const F=mu(JSON.stringify(Zf("wc_sessionRequest",I,S))),A=r.client.session.get(u),G={id:S,topic:u,params:I,verifyContext:yield r.getVerifyContext(F,A.peer.metadata)};yield r.setPendingSessionRequest(G),r.addSessionRequestToSessionRequestQueue(G),r.processSessionRequestQueue()}catch(F){yield r.sendError(S,u,F),r.client.logger.error(F)}});return function(u,g){return s.apply(this,arguments)}}(),this.onSessionRequestResponse=(s,u)=>{const{id:g}=u;Eu(u)?this.events.emit(Or("session_request",g),{result:u.result}):oa(u)&&this.events.emit(Or("session_request",g),{error:u.error})},this.onSessionEventRequest=function(){var s=ue(function*(u,g){const{id:S,params:I}=g;try{const F=`${u}_session_event_${I.event.name}`,A=st.get(F);if(A&&r.isRequestOutOfSync(A,S))return void r.client.logger.info(`Discarding out of sync request - ${S}`);r.isValidEmit(zo({topic:u},I)),r.client.events.emit("session_event",{id:S,topic:u,params:I}),st.set(F,S)}catch(F){yield r.sendError(S,u,F),r.client.logger.error(F)}});return function(u,g){return s.apply(this,arguments)}}(),this.addSessionRequestToSessionRequestQueue=s=>{this.sessionRequestQueue.queue.push(s)},this.cleanupAfterResponse=s=>{this.deletePendingSessionRequest(s.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=xu_idle,this.processSessionRequestQueue()},Gt.toMiliseconds(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===xu_active)return void this.client.logger.info("session request queue is already active.");const s=this.sessionRequestQueue.queue[0];if(s)try{this.sessionRequestQueue.state=xu_active,this.client.events.emit("session_request",s)}catch(u){this.client.logger.error(u)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=s=>{if(s.active)return;const u=this.client.proposal.getAll().find(g=>g.pairingTopic===s.topic);u&&this.onSessionProposeRequest(s.topic,Zf("wc_sessionPropose",{requiredNamespaces:u.requiredNamespaces,optionalNamespaces:u.optionalNamespaces,relays:u.relays,proposer:u.proposer,sessionProperties:u.sessionProperties},u.id))},this.isValidConnect=function(){var s=ue(function*(u){if(!Wi(u)){const{message:G}=Ut("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(u)}`);throw new Error(G)}const{pairingTopic:g,requiredNamespaces:S,optionalNamespaces:I,sessionProperties:F,relays:A}=u;if(Vi(g)||(yield r.isValidPairingTopic(g)),!function(n,e){let r=!1;return e&&!n?r=!0:n&&La(n)&&n.length&&n.forEach(s=>{r=Al(s)}),r}(A,!0)){const{message:G}=Ut("MISSING_OR_INVALID",`connect() relays: ${A}`);throw new Error(G)}!Vi(S)&&0!==xr(S)&&r.validateNamespaces(S,"requiredNamespaces"),!Vi(I)&&0!==xr(I)&&r.validateNamespaces(I,"optionalNamespaces"),Vi(F)||r.validateSessionProps(F,"sessionProperties")});return function(u){return s.apply(this,arguments)}}(),this.validateNamespaces=(s,u)=>{const g=function(n,e,r){let s=null;if(n&&xr(n)){const u=ip(n,e);u&&(s=u);const g=tp(n,e,r);g&&(s=g)}else s=Ut("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return s}(s,"connect()",u);if(g)throw new Error(g.message)},this.isValidApprove=function(){var s=ue(function*(u){if(!Wi(u))throw new Error(Ut("MISSING_OR_INVALID",`approve() params: ${u}`).message);const{id:g,namespaces:S,relayProtocol:I,sessionProperties:F}=u;yield r.isValidProposalId(g);const A=r.client.proposal.get(g),G=_u(S,"approve()");if(G)throw new Error(G.message);const he=kc(A.requiredNamespaces,S,"approve()");if(he)throw new Error(he.message);if(!fi(I,!0)){const{message:te}=Ut("MISSING_OR_INVALID",`approve() relayProtocol: ${I}`);throw new Error(te)}Vi(F)||r.validateSessionProps(F,"sessionProperties")});return function(u){return s.apply(this,arguments)}}(),this.isValidReject=function(){var s=ue(function*(u){if(!Wi(u)){const{message:I}=Ut("MISSING_OR_INVALID",`reject() params: ${u}`);throw new Error(I)}const{id:g,reason:S}=u;if(yield r.isValidProposalId(g),!function(n){return!!(n&&"object"==typeof n&&n.code&&Zh(n.code,!1)&&n.message&&fi(n.message,!1))}(S)){const{message:I}=Ut("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(S)}`);throw new Error(I)}});return function(u){return s.apply(this,arguments)}}(),this.isValidSessionSettleRequest=s=>{if(!Wi(s)){const{message:G}=Ut("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${s}`);throw new Error(G)}const{relay:u,controller:g,namespaces:S,expiry:I}=s;if(!Al(u)){const{message:G}=Ut("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(G)}const F=function(n,e){let r=null;return fi(n?.publicKey,!1)||(r=Ut("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}(g,"onSessionSettleRequest()");if(F)throw new Error(F.message);const A=_u(S,"onSessionSettleRequest()");if(A)throw new Error(A.message);if(Ss(I)){const{message:G}=Ut("EXPIRED","onSessionSettleRequest()");throw new Error(G)}},this.isValidUpdate=function(){var s=ue(function*(u){if(!Wi(u)){const{message:G}=Ut("MISSING_OR_INVALID",`update() params: ${u}`);throw new Error(G)}const{topic:g,namespaces:S}=u;yield r.isValidSessionTopic(g);const I=r.client.session.get(g),F=_u(S,"update()");if(F)throw new Error(F.message);const A=kc(I.requiredNamespaces,S,"update()");if(A)throw new Error(A.message)});return function(u){return s.apply(this,arguments)}}(),this.isValidExtend=function(){var s=ue(function*(u){if(!Wi(u)){const{message:S}=Ut("MISSING_OR_INVALID",`extend() params: ${u}`);throw new Error(S)}const{topic:g}=u;yield r.isValidSessionTopic(g)});return function(u){return s.apply(this,arguments)}}(),this.isValidRequest=function(){var s=ue(function*(u){if(!Wi(u)){const{message:G}=Ut("MISSING_OR_INVALID",`request() params: ${u}`);throw new Error(G)}const{topic:g,request:S,chainId:I,expiry:F}=u;yield r.isValidSessionTopic(g);const{namespaces:A}=r.client.session.get(g);if(!up(A,I)){const{message:G}=Ut("MISSING_OR_INVALID",`request() chainId: ${I}`);throw new Error(G)}if(!function(n){return!(Vi(n)||!fi(n.method,!1))}(S)){const{message:G}=Ut("MISSING_OR_INVALID",`request() ${JSON.stringify(S)}`);throw new Error(G)}if(!Jf(A,I,S.method)){const{message:G}=Ut("MISSING_OR_INVALID",`request() method: ${S.method}`);throw new Error(G)}if(F&&!function(n,e){return Zh(n,!1)&&n<=e.max&&n>=e.min}(F,Am)){const{message:G}=Ut("MISSING_OR_INVALID",`request() expiry: ${F}. Expiry must be a number (in seconds) between ${Am.min} and ${Am.max}`);throw new Error(G)}});return function(u){return s.apply(this,arguments)}}(),this.isValidRespond=function(){var s=ue(function*(u){var g;if(!Wi(u)){const{message:F}=Ut("MISSING_OR_INVALID",`respond() params: ${u}`);throw new Error(F)}const{topic:S,response:I}=u;try{yield r.isValidSessionTopic(S)}catch(F){throw null!=(g=u?.response)&&g.id&&r.cleanupAfterResponse(u),F}if(!function(n){return!(Vi(n)||Vi(n.result)&&Vi(n.error)||!Zh(n.id,!1)||!fi(n.jsonrpc,!1))}(I)){const{message:F}=Ut("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(I)}`);throw new Error(F)}});return function(u){return s.apply(this,arguments)}}(),this.isValidPing=function(){var s=ue(function*(u){if(!Wi(u)){const{message:S}=Ut("MISSING_OR_INVALID",`ping() params: ${u}`);throw new Error(S)}const{topic:g}=u;yield r.isValidSessionOrPairingTopic(g)});return function(u){return s.apply(this,arguments)}}(),this.isValidEmit=function(){var s=ue(function*(u){if(!Wi(u)){const{message:A}=Ut("MISSING_OR_INVALID",`emit() params: ${u}`);throw new Error(A)}const{topic:g,event:S,chainId:I}=u;yield r.isValidSessionTopic(g);const{namespaces:F}=r.client.session.get(g);if(!up(F,I)){const{message:A}=Ut("MISSING_OR_INVALID",`emit() chainId: ${I}`);throw new Error(A)}if(!function(n){return!(Vi(n)||!fi(n.name,!1))}(S)){const{message:A}=Ut("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(S)}`);throw new Error(A)}if(!gm(F,I,S.name)){const{message:A}=Ut("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(S)}`);throw new Error(A)}});return function(u){return s.apply(this,arguments)}}(),this.isValidDisconnect=function(){var s=ue(function*(u){if(!Wi(u)){const{message:S}=Ut("MISSING_OR_INVALID",`disconnect() params: ${u}`);throw new Error(S)}const{topic:g}=u;yield r.isValidSessionOrPairingTopic(g)});return function(u){return s.apply(this,arguments)}}(),this.getVerifyContext=function(){var s=ue(function*(u,g){const S={verified:{verifyUrl:g.verifyUrl||ed,validation:"UNKNOWN",origin:g.url||""}};try{const I=yield r.client.core.verify.resolve({attestationId:u,verifyUrl:g.verifyUrl});I&&(S.verified.origin=I.origin,S.verified.isScam=I.isScam,S.verified.validation=I.origin===new URL(g.url).origin?"VALID":"INVALID")}catch(I){r.client.logger.info(I)}return r.client.logger.info(`Verify context: ${JSON.stringify(S)}`),S});return function(u,g){return s.apply(this,arguments)}}(),this.validateSessionProps=(s,u)=>{Object.values(s).forEach(g=>{if(!fi(g,!1)){const{message:S}=Ut("MISSING_OR_INVALID",`${u} must be in Record<string, string> format. Received: ${JSON.stringify(g)}`);throw new Error(S)}})}}isInitialized(){var e=this;return ue(function*(){if(!e.initialized){const{message:r}=Ut("NOT_INITIALIZED",e.name);throw new Error(r)}yield e.client.core.relayer.confirmOnlineStateOrThrow()})()}registerRelayerEvents(){var e=this;this.client.core.relayer.on(ao_message,function(){var r=ue(function*(s){const{topic:u,message:g}=s;if(e.ignoredPayloadTypes.includes(e.client.core.crypto.getPayloadType(g)))return;const S=yield e.client.core.crypto.decode(u,g);try{bm(S)?(e.client.core.history.set(u,S),e.onRelayEventRequest({topic:u,payload:S})):B0(S)?(yield e.client.core.history.resolve(S),yield e.onRelayEventResponse({topic:u,payload:S}),e.client.core.history.delete(u,S.id)):e.onRelayEventUnknownPayload({topic:u,payload:S})}catch(I){e.client.logger.error(I)}});return function(s){return r.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.client.core.expirer.on(Os_expired,function(){var r=ue(function*(s){const{topic:u,id:g}=ia(s.target);if(g&&e.client.pendingRequest.keys.includes(g))return yield e.deletePendingSessionRequest(g,Ut("EXPIRED"),!0);u?e.client.session.keys.includes(u)&&(yield e.deleteSession(u,!0),e.client.events.emit("session_expire",{topic:u})):g&&(yield e.deleteProposal(g,!0),e.client.events.emit("proposal_expire",{id:g}))});return function(s){return r.apply(this,arguments)}}())}registerPairingEvents(){this.client.core.pairing.events.on(dp_create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!fi(e,!1)){const{message:r}=Ut("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:r}=Ut("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(Ss(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=Ut("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}isValidSessionTopic(e){var r=this;return ue(function*(){if(!fi(e,!1)){const{message:s}=Ut("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(s)}if(!r.client.session.keys.includes(e)){const{message:s}=Ut("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(s)}if(Ss(r.client.session.get(e).expiry)){yield r.deleteSession(e);const{message:s}=Ut("EXPIRED",`session topic: ${e}`);throw new Error(s)}})()}isValidSessionOrPairingTopic(e){var r=this;return ue(function*(){if(r.client.session.keys.includes(e))yield r.isValidSessionTopic(e);else{if(!r.client.core.pairing.pairings.keys.includes(e)){if(fi(e,!1)){const{message:s}=Ut("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(s)}{const{message:s}=Ut("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(s)}}r.isValidPairingTopic(e)}})()}isValidProposalId(e){var r=this;return ue(function*(){if(!function(n){return"number"==typeof n}(e)){const{message:s}=Ut("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(s)}if(!r.client.proposal.keys.includes(e)){const{message:s}=Ut("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(s)}if(Ss(r.client.proposal.get(e).expiry)){yield r.deleteProposal(e);const{message:s}=Ut("EXPIRED",`proposal id: ${e}`);throw new Error(s)}})()}}class $8 extends H0{constructor(e,r){super(e,r,"proposal",km),this.core=e,this.logger=r}}class V8 extends H0{constructor(e,r){super(e,r,"session",km),this.core=e,this.logger=r}}class W8 extends H0{constructor(e,r){super(e,r,"request",km,s=>s.id),this.core=e,this.logger=r}}class Tm extends class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}{constructor(e){var r;super(e),r=this,this.protocol="wc",this.version=2,this.name=Nm_name,this.events=new E.exports.EventEmitter,this.on=(u,g)=>this.events.on(u,g),this.once=(u,g)=>this.events.once(u,g),this.off=(u,g)=>this.events.off(u,g),this.removeListener=(u,g)=>this.events.removeListener(u,g),this.removeAllListeners=u=>this.events.removeAllListeners(u),this.connect=function(){var u=ue(function*(g){try{return yield r.engine.connect(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.pair=function(){var u=ue(function*(g){try{return yield r.engine.pair(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.approve=function(){var u=ue(function*(g){try{return yield r.engine.approve(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.reject=function(){var u=ue(function*(g){try{return yield r.engine.reject(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.update=function(){var u=ue(function*(g){try{return yield r.engine.update(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.extend=function(){var u=ue(function*(g){try{return yield r.engine.extend(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.request=function(){var u=ue(function*(g){try{return yield r.engine.request(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.respond=function(){var u=ue(function*(g){try{return yield r.engine.respond(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.ping=function(){var u=ue(function*(g){try{return yield r.engine.ping(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.emit=function(){var u=ue(function*(g){try{return yield r.engine.emit(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.disconnect=function(){var u=ue(function*(g){try{return yield r.engine.disconnect(g)}catch(S){throw r.logger.error(S.message),S}});return function(g){return u.apply(this,arguments)}}(),this.find=u=>{try{return this.engine.find(u)}catch(g){throw this.logger.error(g.message),g}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(u){throw this.logger.error(u.message),u}},this.name=e?.name||Nm_name,this.metadata=e?.metadata||Ph()||{name:"",description:"",url:"",icons:[""]};const s=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:qn.pino(qn.getDefaultLoggerOptions({level:e?.logger||Nm_logger}));this.core=e?.core||new A8(e),this.logger=qn.generateChildLogger(s,this.name),this.session=new V8(this.core,this.logger),this.proposal=new $8(this.core,this.logger),this.pendingRequest=new W8(this.core,this.logger),this.engine=new q8(this)}static init(e){return ue(function*(){const r=new Tm(e);return yield r.initialize(),r})()}get context(){return qn.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var e=this;return ue(function*(){e.logger.trace("Initialized");try{yield e.core.start(),yield e.session.init(),yield e.proposal.init(),yield e.pendingRequest.init(),yield e.engine.init(),e.core.verify.init({verifyUrl:e.metadata.verifyUrl}),e.logger.info("SignClient Initialization Success")}catch(r){throw e.logger.info("SignClient Initialization Failure"),e.logger.error(r.message),r}})()}}const a2="wc@2:universal_provider:",Ru_DEFAULT_CHAIN_CHANGED="default_chain_changed";var $0,V0,Mm={exports:{}};$0=Mm,V0=Mm.exports,function(){var n,u="Expected a function",S="__lodash_hash_undefined__",F="__lodash_placeholder__",be=128,it=1/0,Rt=9007199254740991,Vt=4294967295,cn=[["ary",be],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],zt="[object Arguments]",Wt="[object Array]",Je="[object Boolean]",Xe="[object Date]",j="[object Error]",De="[object Function]",Lt="[object GeneratorFunction]",Ft="[object Map]",sn="[object Number]",mn="[object Object]",Jn="[object Promise]",Ar="[object RegExp]",Xn="[object Set]",Tn="[object String]",Mn="[object Symbol]",In="[object WeakMap]",wn="[object ArrayBuffer]",hn="[object DataView]",Un="[object Float32Array]",Fn="[object Float64Array]",En="[object Int8Array]",Wn="[object Int16Array]",Gn="[object Int32Array]",rr="[object Uint8Array]",ir="[object Uint8ClampedArray]",Zn="[object Uint16Array]",lr="[object Uint32Array]",xs=/\b__p \+= '';/g,za=/\b(__p \+=) '' \+/g,Eo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ba=/&(?:amp|lt|gt|quot|#39);/g,Uc=/[&<>"']/g,td=RegExp(Ba.source),ti=RegExp(Uc.source),Yr=/<%-([\s\S]+?)%>/g,ni=/<%([\s\S]+?)%>/g,Xr=/<%=([\s\S]+?)%>/g,ri=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qr=/^\w*$/,Ei=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ii=/[\\^$.*+?()[\]{}|]/g,Si=RegExp(ii.source),oi=/^\s+/,Oi=/\s/,di=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,si=/\{\n\/\* \[wrapped with (.+)\] \*/,zr=/,? & /,xi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ri=/[()=,{}\[\]\/\s]/,zm=/\\(\\)?/g,Bm=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Y0=/\w*$/,aa=/^[-+]0x[0-9a-f]+$/i,Fm=/^0b[01]+$/i,Hm=/^\[object .+?Constructor\]$/,qm=/^0o[0-7]+$/i,$m=/^(?:0|[1-9]\d*)$/,Vm=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,Wm=/['\n\r\u2028\u2029\\]/g,nd="\\ud800-\\udfff",Q0="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",J0="\\u2700-\\u27bf",X0="a-z\\xdf-\\xf6\\xf8-\\xff",Ll="A-Z\\xc0-\\xd6\\xd8-\\xde",Z0="\\ufe0e\\ufe0f",e1="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Is="['\u2019]",Km="["+nd+"]",t1="["+e1+"]",rd="["+Q0+"]",n1="\\d+",Gm="["+J0+"]",r1="["+X0+"]",Ul="[^"+nd+e1+n1+J0+X0+Ll+"]",yp="\\ud83c[\\udffb-\\udfff]",Dc="[^"+nd+"]",id="(?:\\ud83c[\\udde6-\\uddff]){2}",od="[\\ud800-\\udbff][\\udc00-\\udfff]",jc="["+Ll+"]",o1="(?:"+r1+"|"+Ul+")",Ym="(?:"+jc+"|"+Ul+")",mp="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",s1="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",a1="(?:"+rd+"|"+yp+")?",vp="["+Z0+"]?",u1=vp+a1+"(?:\\u200d(?:"+[Dc,id,od].join("|")+")"+vp+a1+")*",Qm="(?:"+[Gm,id,od].join("|")+")"+u1,Fa="(?:"+[Dc+rd+"?",rd,id,od,Km].join("|")+")",Jm=RegExp(Is,"g"),Xm=RegExp(rd,"g"),_p=RegExp(yp+"(?="+yp+")|"+Fa+u1,"g"),Zm=RegExp([jc+"?"+r1+"+"+mp+"(?="+[t1,jc,"$"].join("|")+")",Ym+"+"+s1+"(?="+[t1,jc+o1,"$"].join("|")+")",jc+"?"+o1+"+"+mp,jc+"+"+s1,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",n1,Qm].join("|"),"g"),ev=RegExp("[\\u200d"+nd+Q0+Z0+"]"),Iu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,c1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],tv=-1,_r={};_r[Un]=_r[Fn]=_r[En]=_r[Wn]=_r[Gn]=_r[rr]=_r[ir]=_r[Zn]=_r[lr]=!0,_r[zt]=_r[Wt]=_r[wn]=_r[Je]=_r[hn]=_r[Xe]=_r[j]=_r[De]=_r[Ft]=_r[sn]=_r[mn]=_r[Ar]=_r[Xn]=_r[Tn]=_r[In]=!1;var Tr={};Tr[zt]=Tr[Wt]=Tr[wn]=Tr[hn]=Tr[Je]=Tr[Xe]=Tr[Un]=Tr[Fn]=Tr[En]=Tr[Wn]=Tr[Gn]=Tr[Ft]=Tr[sn]=Tr[mn]=Tr[Ar]=Tr[Xn]=Tr[Tn]=Tr[Mn]=Tr[rr]=Tr[ir]=Tr[Zn]=Tr[lr]=!0,Tr[j]=Tr[De]=Tr[In]=!1;var f1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},d1=parseFloat,Dl=parseInt,wp="object"==typeof c&&c&&c.Object===Object&&c,rv="object"==typeof self&&self&&self.Object===Object&&self,ki=wp||rv||Function("return this")(),Ep=V0&&!V0.nodeType&&V0,me=Ep&&$0&&!$0.nodeType&&$0,Ge=me&&me.exports===Ep,Et=Ge&&wp.process,Ht=function(){try{return me&&me.require&&me.require("util").types||Et&&Et.binding&&Et.binding("util")}catch{}}(),Mr=Ht&&Ht.isArrayBuffer,Pn=Ht&&Ht.isDate,qr=Ht&&Ht.isMap,hi=Ht&&Ht.isRegExp,Ni=Ht&&Ht.isSet,Lr=Ht&&Ht.isTypedArray;function ar(Ke,ht,pt){switch(pt.length){case 0:return Ke.call(ht);case 1:return Ke.call(ht,pt[0]);case 2:return Ke.call(ht,pt[0],pt[1]);case 3:return Ke.call(ht,pt[0],pt[1],pt[2])}return Ke.apply(ht,pt)}function ua(Ke,ht,pt,jt){for(var xn=-1,fr=null==Ke?0:Ke.length;++xn<fr;){var xo=Ke[xn];ht(jt,xo,pt(xo),Ke)}return jt}function $r(Ke,ht){for(var pt=-1,jt=null==Ke?0:Ke.length;++pt<jt&&!1!==ht(Ke[pt],pt,Ke););return Ke}function So(Ke,ht){for(var pt=null==Ke?0:Ke.length;pt--&&!1!==ht(Ke[pt],pt,Ke););return Ke}function Oo(Ke,ht){for(var pt=-1,jt=null==Ke?0:Ke.length;++pt<jt;)if(!ht(Ke[pt],pt,Ke))return!1;return!0}function ji(Ke,ht){for(var pt=-1,jt=null==Ke?0:Ke.length,xn=0,fr=[];++pt<jt;){var xo=Ke[pt];ht(xo,pt,Ke)&&(fr[xn++]=xo)}return fr}function Cs(Ke,ht){return!(null==Ke||!Ke.length)&&ad(Ke,ht,0)>-1}function ca(Ke,ht,pt){for(var jt=-1,xn=null==Ke?0:Ke.length;++jt<xn;)if(pt(ht,Ke[jt]))return!0;return!1}function Rr(Ke,ht){for(var pt=-1,jt=null==Ke?0:Ke.length,xn=Array(jt);++pt<jt;)xn[pt]=ht(Ke[pt],pt,Ke);return xn}function Bc(Ke,ht){for(var pt=-1,jt=ht.length,xn=Ke.length;++pt<jt;)Ke[xn+pt]=ht[pt];return Ke}function iv(Ke,ht,pt,jt){var xn=-1,fr=null==Ke?0:Ke.length;for(jt&&fr&&(pt=Ke[++xn]);++xn<fr;)pt=ht(pt,Ke[xn],xn,Ke);return pt}function _O(Ke,ht,pt,jt){var xn=null==Ke?0:Ke.length;for(jt&&xn&&(pt=Ke[--xn]);xn--;)pt=ht(pt,Ke[xn],xn,Ke);return pt}function ov(Ke,ht){for(var pt=-1,jt=null==Ke?0:Ke.length;++pt<jt;)if(ht(Ke[pt],pt,Ke))return!0;return!1}var bO=sv("length");function v2(Ke,ht,pt){var jt;return pt(Ke,function(xn,fr,xo){if(ht(xn,fr,xo))return jt=fr,!1}),jt}function h1(Ke,ht,pt,jt){for(var xn=Ke.length,fr=pt+(jt?1:-1);jt?fr--:++fr<xn;)if(ht(Ke[fr],fr,Ke))return fr;return-1}function ad(Ke,ht,pt){return ht==ht?function(Ke,ht,pt){for(var jt=pt-1,xn=Ke.length;++jt<xn;)if(Ke[jt]===ht)return jt;return-1}(Ke,ht,pt):h1(Ke,_2,pt)}function SO(Ke,ht,pt,jt){for(var xn=pt-1,fr=Ke.length;++xn<fr;)if(jt(Ke[xn],ht))return xn;return-1}function _2(Ke){return Ke!=Ke}function b2(Ke,ht){var pt=null==Ke?0:Ke.length;return pt?uv(Ke,ht)/pt:NaN}function sv(Ke){return function(ht){return null==ht?n:ht[Ke]}}function av(Ke){return function(ht){return null==Ke?n:Ke[ht]}}function w2(Ke,ht,pt,jt,xn){return xn(Ke,function(fr,xo,Hc){pt=jt?(jt=!1,fr):ht(pt,fr,xo,Hc)}),pt}function uv(Ke,ht){for(var pt,jt=-1,xn=Ke.length;++jt<xn;){var fr=ht(Ke[jt]);fr!==n&&(pt=pt===n?fr:pt+fr)}return pt}function cv(Ke,ht){for(var pt=-1,jt=Array(Ke);++pt<Ke;)jt[pt]=ht(pt);return jt}function E2(Ke){return Ke&&Ke.slice(0,R2(Ke)+1).replace(oi,"")}function os(Ke){return function(ht){return Ke(ht)}}function lv(Ke,ht){return Rr(ht,function(pt){return Ke[pt]})}function Sp(Ke,ht){return Ke.has(ht)}function S2(Ke,ht){for(var pt=-1,jt=Ke.length;++pt<jt&&ad(ht,Ke[pt],0)>-1;);return pt}function O2(Ke,ht){for(var pt=Ke.length;pt--&&ad(ht,Ke[pt],0)>-1;);return pt}function RO(Ke,ht){for(var pt=Ke.length,jt=0;pt--;)Ke[pt]===ht&&++jt;return jt}var IO=av({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),CO=av({"&":"&","<":"<",">":">",'"':""","'":"'"});function PO(Ke){return"\\"+f1[Ke]}function ud(Ke){return ev.test(Ke)}function fv(Ke){var ht=-1,pt=Array(Ke.size);return Ke.forEach(function(jt,xn){pt[++ht]=[xn,jt]}),pt}function x2(Ke,ht){return function(pt){return Ke(ht(pt))}}function Fc(Ke,ht){for(var pt=-1,jt=Ke.length,xn=0,fr=[];++pt<jt;){var xo=Ke[pt];(xo===ht||xo===F)&&(Ke[pt]=F,fr[xn++]=pt)}return fr}function p1(Ke){var ht=-1,pt=Array(Ke.size);return Ke.forEach(function(jt){pt[++ht]=jt}),pt}function cd(Ke){return ud(Ke)?function(Ke){for(var ht=_p.lastIndex=0;_p.test(Ke);)++ht;return ht}(Ke):bO(Ke)}function la(Ke){return ud(Ke)?function(Ke){return Ke.match(_p)||[]}(Ke):function(Ke){return Ke.split("")}(Ke)}function R2(Ke){for(var ht=Ke.length;ht--&&Oi.test(Ke.charAt(ht)););return ht}var UO=av({"&":"&","<":"<",">":">",""":'"',"'":"'"});var ld=function Ke(ht){var pt,jt=(ht=null==ht?ki:ld.defaults(ki.Object(),ht,ld.pick(ki,c1))).Array,xn=ht.Date,fr=ht.Error,xo=ht.Function,Hc=ht.Math,Vr=ht.Object,dv=ht.RegExp,FO=ht.String,Ps=ht.TypeError,g1=jt.prototype,fd=Vr.prototype,y1=ht["__core-js_shared__"],m1=xo.prototype.toString,Ir=fd.hasOwnProperty,qO=0,I2=(pt=/[^.]+$/.exec(y1&&y1.keys&&y1.keys.IE_PROTO||""))?"Symbol(src)_1."+pt:"",v1=fd.toString,$O=m1.call(Vr),VO=ki._,WO=dv("^"+m1.call(Ir).replace(ii,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_1=Ge?ht.Buffer:n,qc=ht.Symbol,b1=ht.Uint8Array,C2=_1?_1.allocUnsafe:n,w1=x2(Vr.getPrototypeOf,Vr),P2=Vr.create,k2=fd.propertyIsEnumerable,E1=g1.splice,N2=qc?qc.isConcatSpreadable:n,Op=qc?qc.iterator:n,jl=qc?qc.toStringTag:n,S1=function(){try{var i=ql(Vr,"defineProperty");return i({},"",{}),i}catch{}}(),KO=ht.clearTimeout!==ki.clearTimeout&&ht.clearTimeout,GO=xn&&xn.now!==ki.Date.now&&xn.now,YO=ht.setTimeout!==ki.setTimeout&&ht.setTimeout,O1=Hc.ceil,x1=Hc.floor,hv=Vr.getOwnPropertySymbols,QO=_1?_1.isBuffer:n,A2=ht.isFinite,JO=g1.join,XO=x2(Vr.keys,Vr),Ai=Hc.max,uo=Hc.min,ZO=xn.now,ex=ht.parseInt,T2=Hc.random,tx=g1.reverse,pv=ql(ht,"DataView"),xp=ql(ht,"Map"),gv=ql(ht,"Promise"),dd=ql(ht,"Set"),Rp=ql(ht,"WeakMap"),Ip=ql(Vr,"create"),R1=Rp&&new Rp,hd={},nx=$l(pv),rx=$l(xp),ix=$l(gv),ox=$l(dd),sx=$l(Rp),I1=qc?qc.prototype:n,Cp=I1?I1.valueOf:n,M2=I1?I1.toString:n;function re(i){if(ai(i)&&!kn(i)&&!(i instanceof Yn)){if(i instanceof ks)return i;if(Ir.call(i,"__wrapped__"))return LE(i)}return new ks(i)}var pd=function(){function i(){}return function(a){if(!Zr(a))return{};if(P2)return P2(a);i.prototype=a;var b=new i;return i.prototype=n,b}}();function C1(){}function ks(i,a){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}function Yn(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Vt,this.__views__=[]}function zl(i){var a=-1,b=null==i?0:i.length;for(this.clear();++a<b;){var T=i[a];this.set(T[0],T[1])}}function Cu(i){var a=-1,b=null==i?0:i.length;for(this.clear();++a<b;){var T=i[a];this.set(T[0],T[1])}}function Pu(i){var a=-1,b=null==i?0:i.length;for(this.clear();++a<b;){var T=i[a];this.set(T[0],T[1])}}function Bl(i){var a=-1,b=null==i?0:i.length;for(this.__data__=new Pu;++a<b;)this.add(i[a])}function fa(i){var a=this.__data__=new Cu(i);this.size=a.size}function L2(i,a){var b=kn(i),T=!b&&Vl(i),Y=!b&&!T&&Gc(i),ce=!b&&!T&&!Y&&vd(i),Pe=b||T||Y||ce,ze=Pe?cv(i.length,FO):[],Qe=ze.length;for(var bt in i)(a||Ir.call(i,bt))&&(!Pe||!("length"==bt||Y&&("offset"==bt||"parent"==bt)||ce&&("buffer"==bt||"byteLength"==bt||"byteOffset"==bt)||Tu(bt,Qe)))&&ze.push(bt);return ze}function U2(i){var a=i.length;return a?i[Rv(0,a-1)]:n}function Ax(i,a){return H1(Bo(i),Fl(a,0,i.length))}function Tx(i){return H1(Bo(i))}function yv(i,a,b){(b!==n&&!da(i[a],b)||b===n&&!(a in i))&&ku(i,a,b)}function Pp(i,a,b){var T=i[a];(!Ir.call(i,a)||!da(T,b)||b===n&&!(a in i))&&ku(i,a,b)}function P1(i,a){for(var b=i.length;b--;)if(da(i[b][0],a))return b;return-1}function Mx(i,a,b,T){return $c(i,function(Y,ce,Pe){a(T,Y,b(Y),Pe)}),T}function D2(i,a){return i&&qa(a,zi(a),i)}function ku(i,a,b){"__proto__"==a&&S1?S1(i,a,{configurable:!0,enumerable:!0,value:b,writable:!0}):i[a]=b}function mv(i,a){for(var b=-1,T=a.length,Y=jt(T),ce=null==i;++b<T;)Y[b]=ce?n:Jv(i,a[b]);return Y}function Fl(i,a,b){return i==i&&(b!==n&&(i=i<=b?i:b),a!==n&&(i=i>=a?i:a)),i}function Ns(i,a,b,T,Y,ce){var Pe,ze=1&a,Qe=2&a,bt=4&a;if(b&&(Pe=Y?b(i,T,Y,ce):b(i)),Pe!==n)return Pe;if(!Zr(i))return i;var mt=kn(i);if(mt){if(Pe=function(i){var a=i.length,b=new i.constructor(a);return a&&"string"==typeof i[0]&&Ir.call(i,"index")&&(b.index=i.index,b.input=i.input),b}(i),!ze)return Bo(i,Pe)}else{var xt=co(i),Kt=xt==De||xt==Lt;if(Gc(i))return aE(i,ze);if(xt==mn||xt==zt||Kt&&!Y){if(Pe=Qe||Kt?{}:RE(i),!ze)return Qe?function(i,a){return qa(i,OE(i),a)}(i,function(i,a){return i&&qa(a,Ho(a),i)}(Pe,i)):function(i,a){return qa(i,Bv(i),a)}(i,D2(Pe,i))}else{if(!Tr[xt])return Y?i:{};Pe=function(i,a,b){var T=i.constructor;switch(a){case wn:return Tv(i);case Je:case Xe:return new T(+i);case hn:return function(i,a){var b=a?Tv(i.buffer):i.buffer;return new i.constructor(b,i.byteOffset,i.byteLength)}(i,b);case Un:case Fn:case En:case Wn:case Gn:case rr:case ir:case Zn:case lr:return uE(i,b);case Ft:return new T;case sn:case Tn:return new T(i);case Ar:return function(i){var a=new i.constructor(i.source,Y0.exec(i));return a.lastIndex=i.lastIndex,a}(i);case Xn:return new T;case Mn:return function(i){return Cp?Vr(Cp.call(i)):{}}(i)}}(i,xt,ze)}}ce||(ce=new fa);var en=ce.get(i);if(en)return en;ce.set(i,Pe),t3(i)?i.forEach(function(jn){Pe.add(Ns(jn,a,b,jn,i,ce))}):ZE(i)&&i.forEach(function(jn,zn){Pe.set(zn,Ns(jn,a,b,zn,i,ce))});var yn=mt?n:(bt?Qe?Dv:Uv:Qe?Ho:zi)(i);return $r(yn||i,function(jn,zn){yn&&(jn=i[zn=jn]),Pp(Pe,zn,Ns(jn,a,b,zn,i,ce))}),Pe}function j2(i,a,b){var T=b.length;if(null==i)return!T;for(i=Vr(i);T--;){var Y=b[T],Pe=i[Y];if(Pe===n&&!(Y in i)||!(0,a[Y])(Pe))return!1}return!0}function z2(i,a,b){if("function"!=typeof i)throw new Ps(u);return Up(function(){i.apply(n,b)},a)}function kp(i,a,b,T){var Y=-1,ce=Cs,Pe=!0,ze=i.length,Qe=[],bt=a.length;if(!ze)return Qe;b&&(a=Rr(a,os(b))),T?(ce=ca,Pe=!1):a.length>=200&&(ce=Sp,Pe=!1,a=new Bl(a));e:for(;++Y<ze;){var mt=i[Y],xt=null==b?mt:b(mt);if(mt=T||0!==mt?mt:0,Pe&&xt==xt){for(var Kt=bt;Kt--;)if(a[Kt]===xt)continue e;Qe.push(mt)}else ce(a,xt,T)||Qe.push(mt)}return Qe}re.templateSettings={escape:Yr,evaluate:ni,interpolate:Xr,variable:"",imports:{_:re}},(re.prototype=C1.prototype).constructor=re,(ks.prototype=pd(C1.prototype)).constructor=ks,(Yn.prototype=pd(C1.prototype)).constructor=Yn,zl.prototype.clear=function(){this.__data__=Ip?Ip(null):{},this.size=0},zl.prototype.delete=function(i){var a=this.has(i)&&delete this.__data__[i];return this.size-=a?1:0,a},zl.prototype.get=function(i){var a=this.__data__;if(Ip){var b=a[i];return b===S?n:b}return Ir.call(a,i)?a[i]:n},zl.prototype.has=function(i){var a=this.__data__;return Ip?a[i]!==n:Ir.call(a,i)},zl.prototype.set=function(i,a){var b=this.__data__;return this.size+=this.has(i)?0:1,b[i]=Ip&&a===n?S:a,this},Cu.prototype.clear=function(){this.__data__=[],this.size=0},Cu.prototype.delete=function(i){var a=this.__data__,b=P1(a,i);return!(b<0||(b==a.length-1?a.pop():E1.call(a,b,1),--this.size,0))},Cu.prototype.get=function(i){var a=this.__data__,b=P1(a,i);return b<0?n:a[b][1]},Cu.prototype.has=function(i){return P1(this.__data__,i)>-1},Cu.prototype.set=function(i,a){var b=this.__data__,T=P1(b,i);return T<0?(++this.size,b.push([i,a])):b[T][1]=a,this},Pu.prototype.clear=function(){this.size=0,this.__data__={hash:new zl,map:new(xp||Cu),string:new zl}},Pu.prototype.delete=function(i){var a=F1(this,i).delete(i);return this.size-=a?1:0,a},Pu.prototype.get=function(i){return F1(this,i).get(i)},Pu.prototype.has=function(i){return F1(this,i).has(i)},Pu.prototype.set=function(i,a){var b=F1(this,i),T=b.size;return b.set(i,a),this.size+=b.size==T?0:1,this},Bl.prototype.add=Bl.prototype.push=function(i){return this.__data__.set(i,S),this},Bl.prototype.has=function(i){return this.__data__.has(i)},fa.prototype.clear=function(){this.__data__=new Cu,this.size=0},fa.prototype.delete=function(i){var a=this.__data__,b=a.delete(i);return this.size=a.size,b},fa.prototype.get=function(i){return this.__data__.get(i)},fa.prototype.has=function(i){return this.__data__.has(i)},fa.prototype.set=function(i,a){var b=this.__data__;if(b instanceof Cu){var T=b.__data__;if(!xp||T.length<199)return T.push([i,a]),this.size=++b.size,this;b=this.__data__=new Pu(T)}return b.set(i,a),this.size=b.size,this};var $c=dE(Ha),B2=dE(_v,!0);function Dx(i,a){var b=!0;return $c(i,function(T,Y,ce){return b=!!a(T,Y,ce)}),b}function k1(i,a,b){for(var T=-1,Y=i.length;++T<Y;){var ce=i[T],Pe=a(ce);if(null!=Pe&&(ze===n?Pe==Pe&&!as(Pe):b(Pe,ze)))var ze=Pe,Qe=ce}return Qe}function F2(i,a){var b=[];return $c(i,function(T,Y,ce){a(T,Y,ce)&&b.push(T)}),b}function Gi(i,a,b,T,Y){var ce=-1,Pe=i.length;for(b||(b=RR),Y||(Y=[]);++ce<Pe;){var ze=i[ce];a>0&&b(ze)?a>1?Gi(ze,a-1,b,T,Y):Bc(Y,ze):T||(Y[Y.length]=ze)}return Y}var vv=hE(),H2=hE(!0);function Ha(i,a){return i&&vv(i,a,zi)}function _v(i,a){return i&&H2(i,a,zi)}function N1(i,a){return ji(a,function(b){return Mu(i[b])})}function Hl(i,a){for(var b=0,T=(a=Wc(a,i)).length;null!=i&&b<T;)i=i[$a(a[b++])];return b&&b==T?i:n}function q2(i,a,b){var T=a(i);return kn(i)?T:Bc(T,b(i))}function Ro(i){return null==i?i===n?"[object Undefined]":"[object Null]":jl&&jl in Vr(i)?function(i){var a=Ir.call(i,jl),b=i[jl];try{i[jl]=n;var T=!0}catch{}var Y=v1.call(i);return T&&(a?i[jl]=b:delete i[jl]),Y}(i):function(i){return v1.call(i)}(i)}function bv(i,a){return i>a}function zx(i,a){return null!=i&&Ir.call(i,a)}function Bx(i,a){return null!=i&&a in Vr(i)}function wv(i,a,b){for(var T=b?ca:Cs,Y=i[0].length,ce=i.length,Pe=ce,ze=jt(ce),Qe=1/0,bt=[];Pe--;){var mt=i[Pe];Pe&&a&&(mt=Rr(mt,os(a))),Qe=uo(mt.length,Qe),ze[Pe]=!b&&(a||Y>=120&&mt.length>=120)?new Bl(Pe&&mt):n}mt=i[0];var xt=-1,Kt=ze[0];e:for(;++xt<Y&&bt.length<Qe;){var en=mt[xt],yn=a?a(en):en;if(en=b||0!==en?en:0,!(Kt?Sp(Kt,yn):T(bt,yn,b))){for(Pe=ce;--Pe;){var jn=ze[Pe];if(!(jn?Sp(jn,yn):T(i[Pe],yn,b)))continue e}Kt&&Kt.push(yn),bt.push(en)}}return bt}function Np(i,a,b){var T=null==(i=kE(i,a=Wc(a,i)))?i:i[$a(Ts(a))];return null==T?n:ar(T,i,b)}function $2(i){return ai(i)&&Ro(i)==zt}function Ap(i,a,b,T,Y){return i===a||(null==i||null==a||!ai(i)&&!ai(a)?i!=i&&a!=a:function(i,a,b,T,Y,ce){var Pe=kn(i),ze=kn(a),Qe=Pe?Wt:co(i),bt=ze?Wt:co(a),mt=(Qe=Qe==zt?mn:Qe)==mn,xt=(bt=bt==zt?mn:bt)==mn,Kt=Qe==bt;if(Kt&&Gc(i)){if(!Gc(a))return!1;Pe=!0,mt=!1}if(Kt&&!mt)return ce||(ce=new fa),Pe||vd(i)?SE(i,a,b,T,Y,ce):function(i,a,b,T,Y,ce,Pe){switch(b){case hn:if(i.byteLength!=a.byteLength||i.byteOffset!=a.byteOffset)return!1;i=i.buffer,a=a.buffer;case wn:return!(i.byteLength!=a.byteLength||!ce(new b1(i),new b1(a)));case Je:case Xe:case sn:return da(+i,+a);case j:return i.name==a.name&&i.message==a.message;case Ar:case Tn:return i==a+"";case Ft:var ze=fv;case Xn:if(ze||(ze=p1),i.size!=a.size&&!(1&T))return!1;var bt=Pe.get(i);if(bt)return bt==a;T|=2,Pe.set(i,a);var mt=SE(ze(i),ze(a),T,Y,ce,Pe);return Pe.delete(i),mt;case Mn:if(Cp)return Cp.call(i)==Cp.call(a)}return!1}(i,a,Qe,b,T,Y,ce);if(!(1&b)){var en=mt&&Ir.call(i,"__wrapped__"),yn=xt&&Ir.call(a,"__wrapped__");if(en||yn){var jn=en?i.value():i,zn=yn?a.value():a;return ce||(ce=new fa),Y(jn,zn,b,T,ce)}}return!!Kt&&(ce||(ce=new fa),function(i,a,b,T,Y,ce){var Pe=1&b,ze=Uv(i),Qe=ze.length;if(Qe!=Uv(a).length&&!Pe)return!1;for(var bt=Qe;bt--;){var mt=ze[bt];if(!(Pe?mt in a:Ir.call(a,mt)))return!1}var xt=ce.get(i),Kt=ce.get(a);if(xt&&Kt)return xt==a&&Kt==i;var en=!0;ce.set(i,a),ce.set(a,i);for(var yn=Pe;++bt<Qe;){var jn=i[mt=ze[bt]],zn=a[mt];if(T)var Ur=Pe?T(zn,jn,mt,a,i,ce):T(jn,zn,mt,i,a,ce);if(!(Ur===n?jn===zn||Y(jn,zn,b,T,ce):Ur)){en=!1;break}yn||(yn="constructor"==mt)}if(en&&!yn){var er=i.constructor,Co=a.constructor;er!=Co&&"constructor"in i&&"constructor"in a&&!("function"==typeof er&&er instanceof er&&"function"==typeof Co&&Co instanceof Co)&&(en=!1)}return ce.delete(i),ce.delete(a),en}(i,a,b,T,Y,ce))}(i,a,b,T,Ap,Y))}function Ev(i,a,b,T){var Y=b.length,ce=Y,Pe=!T;if(null==i)return!ce;for(i=Vr(i);Y--;){var ze=b[Y];if(Pe&&ze[2]?ze[1]!==i[ze[0]]:!(ze[0]in i))return!1}for(;++Y<ce;){var Qe=(ze=b[Y])[0],bt=i[Qe],mt=ze[1];if(Pe&&ze[2]){if(bt===n&&!(Qe in i))return!1}else{var xt=new fa;if(T)var Kt=T(bt,mt,Qe,i,a,xt);if(!(Kt===n?Ap(mt,bt,3,T,xt):Kt))return!1}}return!0}function V2(i){return!(!Zr(i)||function(i){return!!I2&&I2 in i}(i))&&(Mu(i)?WO:Hm).test($l(i))}function W2(i){return"function"==typeof i?i:null==i?qo:"object"==typeof i?kn(i)?Y2(i[0],i[1]):G2(i):p3(i)}function Sv(i){if(!Lp(i))return XO(i);var a=[];for(var b in Vr(i))Ir.call(i,b)&&"constructor"!=b&&a.push(b);return a}function Qx(i){if(!Zr(i))return function(i){var a=[];if(null!=i)for(var b in Vr(i))a.push(b);return a}(i);var a=Lp(i),b=[];for(var T in i)"constructor"==T&&(a||!Ir.call(i,T))||b.push(T);return b}function Ov(i,a){return i<a}function K2(i,a){var b=-1,T=Fo(i)?jt(i.length):[];return $c(i,function(Y,ce,Pe){T[++b]=a(Y,ce,Pe)}),T}function G2(i){var a=zv(i);return 1==a.length&&a[0][2]?CE(a[0][0],a[0][1]):function(b){return b===i||Ev(b,i,a)}}function Y2(i,a){return Fv(i)&&IE(a)?CE($a(i),a):function(b){var T=Jv(b,i);return T===n&&T===a?Xv(b,i):Ap(a,T,3)}}function A1(i,a,b,T,Y){i!==a&&vv(a,function(ce,Pe){if(Y||(Y=new fa),Zr(ce))!function(i,a,b,T,Y,ce,Pe){var ze=qv(i,b),Qe=qv(a,b),bt=Pe.get(Qe);if(bt)yv(i,b,bt);else{var mt=ce?ce(ze,Qe,b+"",i,a,Pe):n,xt=mt===n;if(xt){var Kt=kn(Qe),en=!Kt&&Gc(Qe),yn=!Kt&&!en&&vd(Qe);mt=Qe,Kt||en||yn?kn(ze)?mt=ze:pi(ze)?mt=Bo(ze):en?(xt=!1,mt=aE(Qe,!0)):yn?(xt=!1,mt=uE(Qe,!0)):mt=[]:Dp(Qe)||Vl(Qe)?(mt=ze,Vl(ze)?mt=i3(ze):(!Zr(ze)||Mu(ze))&&(mt=RE(Qe))):xt=!1}xt&&(Pe.set(Qe,mt),Y(mt,Qe,T,ce,Pe),Pe.delete(Qe)),yv(i,b,mt)}}(i,a,Pe,b,A1,T,Y);else{var ze=T?T(qv(i,Pe),ce,Pe+"",i,a,Y):n;ze===n&&(ze=ce),yv(i,Pe,ze)}},Ho)}function Q2(i,a){var b=i.length;if(b)return Tu(a+=a<0?b:0,b)?i[a]:n}function J2(i,a,b){a=a.length?Rr(a,function(ce){return kn(ce)?function(Pe){return Hl(Pe,1===ce.length?ce[0]:ce)}:ce}):[qo];var T=-1;return a=Rr(a,os(ln())),function(Ke,ht){var pt=Ke.length;for(Ke.sort(ht);pt--;)Ke[pt]=Ke[pt].value;return Ke}(K2(i,function(ce,Pe,ze){return{criteria:Rr(a,function(bt){return bt(ce)}),index:++T,value:ce}}),function(ce,Pe){return function(i,a,b){for(var T=-1,Y=i.criteria,ce=a.criteria,Pe=Y.length,ze=b.length;++T<Pe;){var Qe=cE(Y[T],ce[T]);if(Qe)return T>=ze?Qe:Qe*("desc"==b[T]?-1:1)}return i.index-a.index}(ce,Pe,b)})}function X2(i,a,b){for(var T=-1,Y=a.length,ce={};++T<Y;){var Pe=a[T],ze=Hl(i,Pe);b(ze,Pe)&&Tp(ce,Wc(Pe,i),ze)}return ce}function xv(i,a,b,T){var Y=T?SO:ad,ce=-1,Pe=a.length,ze=i;for(i===a&&(a=Bo(a)),b&&(ze=Rr(i,os(b)));++ce<Pe;)for(var Qe=0,bt=a[ce],mt=b?b(bt):bt;(Qe=Y(ze,mt,Qe,T))>-1;)ze!==i&&E1.call(ze,Qe,1),E1.call(i,Qe,1);return i}function Z2(i,a){for(var b=i?a.length:0,T=b-1;b--;){var Y=a[b];if(b==T||Y!==ce){var ce=Y;Tu(Y)?E1.call(i,Y,1):Pv(i,Y)}}return i}function Rv(i,a){return i+x1(T2()*(a-i+1))}function Iv(i,a){var b="";if(!i||a<1||a>Rt)return b;do{a%2&&(b+=i),(a=x1(a/2))&&(i+=i)}while(a);return b}function Hn(i,a){return $v(PE(i,a,qo),i+"")}function tR(i){return U2(_d(i))}function nR(i,a){var b=_d(i);return H1(b,Fl(a,0,b.length))}function Tp(i,a,b,T){if(!Zr(i))return i;for(var Y=-1,ce=(a=Wc(a,i)).length,Pe=ce-1,ze=i;null!=ze&&++Y<ce;){var Qe=$a(a[Y]),bt=b;if("__proto__"===Qe||"constructor"===Qe||"prototype"===Qe)return i;if(Y!=Pe){var mt=ze[Qe];(bt=T?T(mt,Qe,ze):n)===n&&(bt=Zr(mt)?mt:Tu(a[Y+1])?[]:{})}Pp(ze,Qe,bt),ze=ze[Qe]}return i}var eE=R1?function(i,a){return R1.set(i,a),i}:qo,rR=S1?function(i,a){return S1(i,"toString",{configurable:!0,enumerable:!1,value:e_(a),writable:!0})}:qo;function iR(i){return H1(_d(i))}function As(i,a,b){var T=-1,Y=i.length;a<0&&(a=-a>Y?0:Y+a),(b=b>Y?Y:b)<0&&(b+=Y),Y=a>b?0:b-a>>>0,a>>>=0;for(var ce=jt(Y);++T<Y;)ce[T]=i[T+a];return ce}function oR(i,a){var b;return $c(i,function(T,Y,ce){return!(b=a(T,Y,ce))}),!!b}function T1(i,a,b){var T=0,Y=null==i?T:i.length;if("number"==typeof a&&a==a&&Y<=2147483647){for(;T<Y;){var ce=T+Y>>>1,Pe=i[ce];null!==Pe&&!as(Pe)&&(b?Pe<=a:Pe<a)?T=ce+1:Y=ce}return Y}return Cv(i,a,qo,b)}function Cv(i,a,b,T){var Y=0,ce=null==i?0:i.length;if(0===ce)return 0;for(var Pe=(a=b(a))!=a,ze=null===a,Qe=as(a),bt=a===n;Y<ce;){var mt=x1((Y+ce)/2),xt=b(i[mt]),Kt=xt!==n,en=null===xt,yn=xt==xt,jn=as(xt);if(Pe)var zn=T||yn;else zn=bt?yn&&(T||Kt):ze?yn&&Kt&&(T||!en):Qe?yn&&Kt&&!en&&(T||!jn):!en&&!jn&&(T?xt<=a:xt<a);zn?Y=mt+1:ce=mt}return uo(ce,4294967294)}function tE(i,a){for(var b=-1,T=i.length,Y=0,ce=[];++b<T;){var Pe=i[b],ze=a?a(Pe):Pe;if(!b||!da(ze,Qe)){var Qe=ze;ce[Y++]=0===Pe?0:Pe}}return ce}function nE(i){return"number"==typeof i?i:as(i)?NaN:+i}function ss(i){if("string"==typeof i)return i;if(kn(i))return Rr(i,ss)+"";if(as(i))return M2?M2.call(i):"";var a=i+"";return"0"==a&&1/i==-it?"-0":a}function Vc(i,a,b){var T=-1,Y=Cs,ce=i.length,Pe=!0,ze=[],Qe=ze;if(b)Pe=!1,Y=ca;else if(ce>=200){var bt=a?null:yR(i);if(bt)return p1(bt);Pe=!1,Y=Sp,Qe=new Bl}else Qe=a?[]:ze;e:for(;++T<ce;){var mt=i[T],xt=a?a(mt):mt;if(mt=b||0!==mt?mt:0,Pe&&xt==xt){for(var Kt=Qe.length;Kt--;)if(Qe[Kt]===xt)continue e;a&&Qe.push(xt),ze.push(mt)}else Y(Qe,xt,b)||(Qe!==ze&&Qe.push(xt),ze.push(mt))}return ze}function Pv(i,a){return null==(i=kE(i,a=Wc(a,i)))||delete i[$a(Ts(a))]}function rE(i,a,b,T){return Tp(i,a,b(Hl(i,a)),T)}function M1(i,a,b,T){for(var Y=i.length,ce=T?Y:-1;(T?ce--:++ce<Y)&&a(i[ce],ce,i););return b?As(i,T?0:ce,T?ce+1:Y):As(i,T?ce+1:0,T?Y:ce)}function iE(i,a){var b=i;return b instanceof Yn&&(b=b.value()),iv(a,function(T,Y){return Y.func.apply(Y.thisArg,Bc([T],Y.args))},b)}function kv(i,a,b){var T=i.length;if(T<2)return T?Vc(i[0]):[];for(var Y=-1,ce=jt(T);++Y<T;)for(var Pe=i[Y],ze=-1;++ze<T;)ze!=Y&&(ce[Y]=kp(ce[Y]||Pe,i[ze],a,b));return Vc(Gi(ce,1),a,b)}function oE(i,a,b){for(var T=-1,Y=i.length,ce=a.length,Pe={};++T<Y;)b(Pe,i[T],T<ce?a[T]:n);return Pe}function Nv(i){return pi(i)?i:[]}function Av(i){return"function"==typeof i?i:qo}function Wc(i,a){return kn(i)?i:Fv(i,a)?[i]:ME(br(i))}var sR=Hn;function Kc(i,a,b){var T=i.length;return b=b===n?T:b,!a&&b>=T?i:As(i,a,b)}var sE=KO||function(i){return ki.clearTimeout(i)};function aE(i,a){if(a)return i.slice();var b=i.length,T=C2?C2(b):new i.constructor(b);return i.copy(T),T}function Tv(i){var a=new i.constructor(i.byteLength);return new b1(a).set(new b1(i)),a}function uE(i,a){var b=a?Tv(i.buffer):i.buffer;return new i.constructor(b,i.byteOffset,i.length)}function cE(i,a){if(i!==a){var b=i!==n,T=null===i,Y=i==i,ce=as(i),Pe=a!==n,ze=null===a,Qe=a==a,bt=as(a);if(!ze&&!bt&&!ce&&i>a||ce&&Pe&&Qe&&!ze&&!bt||T&&Pe&&Qe||!b&&Qe||!Y)return 1;if(!T&&!ce&&!bt&&i<a||bt&&b&&Y&&!T&&!ce||ze&&b&&Y||!Pe&&Y||!Qe)return-1}return 0}function lE(i,a,b,T){for(var Y=-1,ce=i.length,Pe=b.length,ze=-1,Qe=a.length,bt=Ai(ce-Pe,0),mt=jt(Qe+bt),xt=!T;++ze<Qe;)mt[ze]=a[ze];for(;++Y<Pe;)(xt||Y<ce)&&(mt[b[Y]]=i[Y]);for(;bt--;)mt[ze++]=i[Y++];return mt}function fE(i,a,b,T){for(var Y=-1,ce=i.length,Pe=-1,ze=b.length,Qe=-1,bt=a.length,mt=Ai(ce-ze,0),xt=jt(mt+bt),Kt=!T;++Y<mt;)xt[Y]=i[Y];for(var en=Y;++Qe<bt;)xt[en+Qe]=a[Qe];for(;++Pe<ze;)(Kt||Y<ce)&&(xt[en+b[Pe]]=i[Y++]);return xt}function Bo(i,a){var b=-1,T=i.length;for(a||(a=jt(T));++b<T;)a[b]=i[b];return a}function qa(i,a,b,T){var Y=!b;b||(b={});for(var ce=-1,Pe=a.length;++ce<Pe;){var ze=a[ce],Qe=T?T(b[ze],i[ze],ze,b,i):n;Qe===n&&(Qe=i[ze]),Y?ku(b,ze,Qe):Pp(b,ze,Qe)}return b}function L1(i,a){return function(b,T){var Y=kn(b)?ua:Mx,ce=a?a():{};return Y(b,i,ln(T,2),ce)}}function gd(i){return Hn(function(a,b){var T=-1,Y=b.length,ce=Y>1?b[Y-1]:n,Pe=Y>2?b[2]:n;for(ce=i.length>3&&"function"==typeof ce?(Y--,ce):n,Pe&&Io(b[0],b[1],Pe)&&(ce=Y<3?n:ce,Y=1),a=Vr(a);++T<Y;){var ze=b[T];ze&&i(a,ze,T,ce)}return a})}function dE(i,a){return function(b,T){if(null==b)return b;if(!Fo(b))return i(b,T);for(var Y=b.length,ce=a?Y:-1,Pe=Vr(b);(a?ce--:++ce<Y)&&!1!==T(Pe[ce],ce,Pe););return b}}function hE(i){return function(a,b,T){for(var Y=-1,ce=Vr(a),Pe=T(a),ze=Pe.length;ze--;){var Qe=Pe[i?ze:++Y];if(!1===b(ce[Qe],Qe,ce))break}return a}}function pE(i){return function(a){var b=ud(a=br(a))?la(a):n,T=b?b[0]:a.charAt(0),Y=b?Kc(b,1).join(""):a.slice(1);return T[i]()+Y}}function yd(i){return function(a){return iv(d3(f3(a).replace(Jm,"")),i,"")}}function Mp(i){return function(){var a=arguments;switch(a.length){case 0:return new i;case 1:return new i(a[0]);case 2:return new i(a[0],a[1]);case 3:return new i(a[0],a[1],a[2]);case 4:return new i(a[0],a[1],a[2],a[3]);case 5:return new i(a[0],a[1],a[2],a[3],a[4]);case 6:return new i(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new i(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var b=pd(i.prototype),T=i.apply(b,a);return Zr(T)?T:b}}function gE(i){return function(a,b,T){var Y=Vr(a);if(!Fo(a)){var ce=ln(b,3);a=zi(a),b=function(ze){return ce(Y[ze],ze,Y)}}var Pe=i(a,b,T);return Pe>-1?Y[ce?a[Pe]:Pe]:n}}function yE(i){return Au(function(a){var b=a.length,T=b,Y=ks.prototype.thru;for(i&&a.reverse();T--;){var ce=a[T];if("function"!=typeof ce)throw new Ps(u);if(Y&&!Pe&&"wrapper"==B1(ce))var Pe=new ks([],!0)}for(T=Pe?T:b;++T<b;){var ze=B1(ce=a[T]),Qe="wrapper"==ze?jv(ce):n;Pe=Qe&&Hv(Qe[0])&&424==Qe[1]&&!Qe[4].length&&1==Qe[9]?Pe[B1(Qe[0])].apply(Pe,Qe[3]):1==ce.length&&Hv(ce)?Pe[ze]():Pe.thru(ce)}return function(){var bt=arguments,mt=bt[0];if(Pe&&1==bt.length&&kn(mt))return Pe.plant(mt).value();for(var xt=0,Kt=b?a[xt].apply(this,bt):mt;++xt<b;)Kt=a[xt].call(this,Kt);return Kt}})}function U1(i,a,b,T,Y,ce,Pe,ze,Qe,bt){var mt=a&be,xt=1&a,Kt=2&a,en=24&a,yn=512&a,jn=Kt?n:Mp(i);return function zn(){for(var Ur=arguments.length,er=jt(Ur),Co=Ur;Co--;)er[Co]=arguments[Co];if(en)var Va=md(zn),Yc=RO(er,Va);if(T&&(er=lE(er,T,Y,en)),ce&&(er=fE(er,ce,Pe,en)),Ur-=Yc,en&&Ur<bt){var gi=Fc(er,Va);return _E(i,a,U1,zn.placeholder,b,er,gi,ze,Qe,bt-Ur)}var Ls=xt?b:this,jp=Kt?Ls[i]:i;return Ur=er.length,ze?er=MR(er,ze):yn&&Ur>1&&er.reverse(),mt&&Qe<Ur&&(er.length=Qe),this&&this!==ki&&this instanceof zn&&(jp=jn||Mp(jp)),jp.apply(Ls,er)}}function mE(i,a){return function(b,T){return function(i,a,b,T){return Ha(i,function(Y,ce,Pe){a(T,b(Y),ce,Pe)}),T}(b,i,a(T),{})}}function D1(i,a){return function(b,T){var Y;if(b===n&&T===n)return a;if(b!==n&&(Y=b),T!==n){if(Y===n)return T;"string"==typeof b||"string"==typeof T?(b=ss(b),T=ss(T)):(b=nE(b),T=nE(T)),Y=i(b,T)}return Y}}function Mv(i){return Au(function(a){return a=Rr(a,os(ln())),Hn(function(b){var T=this;return i(a,function(Y){return ar(Y,T,b)})})})}function j1(i,a){var b=(a=a===n?" ":ss(a)).length;if(b<2)return b?Iv(a,i):a;var T=Iv(a,O1(i/cd(a)));return ud(a)?Kc(la(T),0,i).join(""):T.slice(0,i)}function vE(i){return function(a,b,T){return T&&"number"!=typeof T&&Io(a,b,T)&&(b=T=n),a=Lu(a),b===n?(b=a,a=0):b=Lu(b),function(i,a,b,T){for(var Y=-1,ce=Ai(O1((a-i)/(b||1)),0),Pe=jt(ce);ce--;)Pe[T?ce:++Y]=i,i+=b;return Pe}(a,b,T=T===n?a<b?1:-1:Lu(T),i)}}function z1(i){return function(a,b){return"string"==typeof a&&"string"==typeof b||(a=Ms(a),b=Ms(b)),i(a,b)}}function _E(i,a,b,T,Y,ce,Pe,ze,Qe,bt){var mt=8&a;a|=mt?32:64,4&(a&=~(mt?64:32))||(a&=-4);var xt=[i,a,Y,mt?ce:n,mt?Pe:n,mt?n:ce,mt?n:Pe,ze,Qe,bt],Kt=b.apply(n,xt);return Hv(i)&&NE(Kt,xt),Kt.placeholder=T,AE(Kt,i,a)}function Lv(i){var a=Hc[i];return function(b,T){if(b=Ms(b),(T=null==T?0:uo(Dn(T),292))&&A2(b)){var Y=(br(b)+"e").split("e");return+((Y=(br(a(Y[0]+"e"+(+Y[1]+T)))+"e").split("e"))[0]+"e"+(+Y[1]-T))}return a(b)}}var yR=dd&&1/p1(new dd([,-0]))[1]==it?function(i){return new dd(i)}:r_;function bE(i){return function(a){var b=co(a);return b==Ft?fv(a):b==Xn?function(Ke){var ht=-1,pt=Array(Ke.size);return Ke.forEach(function(jt){pt[++ht]=[jt,jt]}),pt}(a):function(Ke,ht){return Rr(ht,function(pt){return[pt,Ke[pt]]})}(a,i(a))}}function Nu(i,a,b,T,Y,ce,Pe,ze){var Qe=2&a;if(!Qe&&"function"!=typeof i)throw new Ps(u);var bt=T?T.length:0;if(bt||(a&=-97,T=Y=n),Pe=Pe===n?Pe:Ai(Dn(Pe),0),ze=ze===n?ze:Dn(ze),bt-=Y?Y.length:0,64&a){var mt=T,xt=Y;T=Y=n}var Kt=Qe?n:jv(i),en=[i,a,b,T,Y,mt,xt,ce,Pe,ze];if(Kt&&function(i,a){var b=i[1],T=a[1],Y=b|T;if(!(Y<131||T==be&&8==b||T==be&&256==b&&i[7].length<=a[8]||384==T&&a[7].length<=a[8]&&8==b))return i;1&T&&(i[2]=a[2],Y|=1&b?0:4);var ze=a[3];if(ze){var Qe=i[3];i[3]=Qe?lE(Qe,ze,a[4]):ze,i[4]=Qe?Fc(i[3],F):a[4]}(ze=a[5])&&(i[5]=(Qe=i[5])?fE(Qe,ze,a[6]):ze,i[6]=Qe?Fc(i[5],F):a[6]),(ze=a[7])&&(i[7]=ze),T&be&&(i[8]=null==i[8]?a[8]:uo(i[8],a[8])),null==i[9]&&(i[9]=a[9]),i[0]=a[0],i[1]=Y}(en,Kt),i=en[0],a=en[1],b=en[2],T=en[3],Y=en[4],!(ze=en[9]=en[9]===n?Qe?0:i.length:Ai(en[9]-bt,0))&&24&a&&(a&=-25),a&&1!=a)yn=8==a||16==a?function(i,a,b){var T=Mp(i);return function Y(){for(var ce=arguments.length,Pe=jt(ce),ze=ce,Qe=md(Y);ze--;)Pe[ze]=arguments[ze];var bt=ce<3&&Pe[0]!==Qe&&Pe[ce-1]!==Qe?[]:Fc(Pe,Qe);return(ce-=bt.length)<b?_E(i,a,U1,Y.placeholder,n,Pe,bt,n,n,b-ce):ar(this&&this!==ki&&this instanceof Y?T:i,this,Pe)}}(i,a,ze):32!=a&&33!=a||Y.length?U1.apply(n,en):function(i,a,b,T){var Y=1&a,ce=Mp(i);return function Pe(){for(var ze=-1,Qe=arguments.length,bt=-1,mt=T.length,xt=jt(mt+Qe),Kt=this&&this!==ki&&this instanceof Pe?ce:i;++bt<mt;)xt[bt]=T[bt];for(;Qe--;)xt[bt++]=arguments[++ze];return ar(Kt,Y?b:this,xt)}}(i,a,b,T);else var yn=function(i,a,b){var T=1&a,Y=Mp(i);return function ce(){return(this&&this!==ki&&this instanceof ce?Y:i).apply(T?b:this,arguments)}}(i,a,b);return AE((Kt?eE:NE)(yn,en),i,a)}function wE(i,a,b,T){return i===n||da(i,fd[b])&&!Ir.call(T,b)?a:i}function EE(i,a,b,T,Y,ce){return Zr(i)&&Zr(a)&&(ce.set(a,i),A1(i,a,n,EE,ce),ce.delete(a)),i}function mR(i){return Dp(i)?n:i}function SE(i,a,b,T,Y,ce){var Pe=1&b,ze=i.length,Qe=a.length;if(ze!=Qe&&!(Pe&&Qe>ze))return!1;var bt=ce.get(i),mt=ce.get(a);if(bt&&mt)return bt==a&&mt==i;var xt=-1,Kt=!0,en=2&b?new Bl:n;for(ce.set(i,a),ce.set(a,i);++xt<ze;){var yn=i[xt],jn=a[xt];if(T)var zn=Pe?T(jn,yn,xt,a,i,ce):T(yn,jn,xt,i,a,ce);if(zn!==n){if(zn)continue;Kt=!1;break}if(en){if(!ov(a,function(Ur,er){if(!Sp(en,er)&&(yn===Ur||Y(yn,Ur,b,T,ce)))return en.push(er)})){Kt=!1;break}}else if(yn!==jn&&!Y(yn,jn,b,T,ce)){Kt=!1;break}}return ce.delete(i),ce.delete(a),Kt}function Au(i){return $v(PE(i,n,jE),i+"")}function Uv(i){return q2(i,zi,Bv)}function Dv(i){return q2(i,Ho,OE)}var jv=R1?function(i){return R1.get(i)}:r_;function B1(i){for(var a=i.name+"",b=hd[a],T=Ir.call(hd,a)?b.length:0;T--;){var Y=b[T],ce=Y.func;if(null==ce||ce==i)return Y.name}return a}function md(i){return(Ir.call(re,"placeholder")?re:i).placeholder}function ln(){var i=re.iteratee||t_;return i=i===t_?W2:i,arguments.length?i(arguments[0],arguments[1]):i}function F1(i,a){var b=i.__data__;return function(i){var a=typeof i;return"string"==a||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==i:null===i}(a)?b["string"==typeof a?"string":"hash"]:b.map}function zv(i){for(var a=zi(i),b=a.length;b--;){var T=a[b],Y=i[T];a[b]=[T,Y,IE(Y)]}return a}function ql(i,a){var b=function(Ke,ht){return null==Ke?n:Ke[ht]}(i,a);return V2(b)?b:n}var Bv=hv?function(i){return null==i?[]:(i=Vr(i),ji(hv(i),function(a){return k2.call(i,a)}))}:i_,OE=hv?function(i){for(var a=[];i;)Bc(a,Bv(i)),i=w1(i);return a}:i_,co=Ro;function xE(i,a,b){for(var T=-1,Y=(a=Wc(a,i)).length,ce=!1;++T<Y;){var Pe=$a(a[T]);if(!(ce=null!=i&&b(i,Pe)))break;i=i[Pe]}return ce||++T!=Y?ce:!!(Y=null==i?0:i.length)&&G1(Y)&&Tu(Pe,Y)&&(kn(i)||Vl(i))}function RE(i){return"function"!=typeof i.constructor||Lp(i)?{}:pd(w1(i))}function RR(i){return kn(i)||Vl(i)||!!(N2&&i&&i[N2])}function Tu(i,a){var b=typeof i;return!!(a=a??Rt)&&("number"==b||"symbol"!=b&&$m.test(i))&&i>-1&&i%1==0&&i<a}function Io(i,a,b){if(!Zr(b))return!1;var T=typeof a;return!!("number"==T?Fo(b)&&Tu(a,b.length):"string"==T&&a in b)&&da(b[a],i)}function Fv(i,a){if(kn(i))return!1;var b=typeof i;return!("number"!=b&&"symbol"!=b&&"boolean"!=b&&null!=i&&!as(i))||Qr.test(i)||!ri.test(i)||null!=a&&i in Vr(a)}function Hv(i){var a=B1(i),b=re[a];if("function"!=typeof b||!(a in Yn.prototype))return!1;if(i===b)return!0;var T=jv(b);return!!T&&i===T[0]}(pv&&co(new pv(new ArrayBuffer(1)))!=hn||xp&&co(new xp)!=Ft||gv&&co(gv.resolve())!=Jn||dd&&co(new dd)!=Xn||Rp&&co(new Rp)!=In)&&(co=function(i){var a=Ro(i),b=a==mn?i.constructor:n,T=b?$l(b):"";if(T)switch(T){case nx:return hn;case rx:return Ft;case ix:return Jn;case ox:return Xn;case sx:return In}return a});var PR=y1?Mu:o_;function Lp(i){var a=i&&i.constructor;return i===("function"==typeof a&&a.prototype||fd)}function IE(i){return i==i&&!Zr(i)}function CE(i,a){return function(b){return null!=b&&b[i]===a&&(a!==n||i in Vr(b))}}function PE(i,a,b){return a=Ai(a===n?i.length-1:a,0),function(){for(var T=arguments,Y=-1,ce=Ai(T.length-a,0),Pe=jt(ce);++Y<ce;)Pe[Y]=T[a+Y];Y=-1;for(var ze=jt(a+1);++Y<a;)ze[Y]=T[Y];return ze[a]=b(Pe),ar(i,this,ze)}}function kE(i,a){return a.length<2?i:Hl(i,As(a,0,-1))}function MR(i,a){for(var b=i.length,T=uo(a.length,b),Y=Bo(i);T--;){var ce=a[T];i[T]=Tu(ce,b)?Y[ce]:n}return i}function qv(i,a){if(("constructor"!==a||"function"!=typeof i[a])&&"__proto__"!=a)return i[a]}var NE=TE(eE),Up=YO||function(i,a){return ki.setTimeout(i,a)},$v=TE(rR);function AE(i,a,b){var T=a+"";return $v(i,function(i,a){var b=a.length;if(!b)return i;var T=b-1;return a[T]=(b>1?"& ":"")+a[T],a=a.join(b>2?", ":" "),i.replace(di,"{\n/* [wrapped with "+a+"] */\n")}(T,function(i,a){return $r(cn,function(b){var T="_."+b[0];a&b[1]&&!Cs(i,T)&&i.push(T)}),i.sort()}(function(i){var a=i.match(si);return a?a[1].split(zr):[]}(T),b)))}function TE(i){var a=0,b=0;return function(){var T=ZO(),Y=16-(T-b);if(b=T,Y>0){if(++a>=800)return arguments[0]}else a=0;return i.apply(n,arguments)}}function H1(i,a){var b=-1,T=i.length,Y=T-1;for(a=a===n?T:a;++b<a;){var ce=Rv(b,Y),Pe=i[ce];i[ce]=i[b],i[b]=Pe}return i.length=a,i}var ME=function(i){var a=W1(i,function(T){return 500===b.size&&b.clear(),T}),b=a.cache;return a}(function(i){var a=[];return 46===i.charCodeAt(0)&&a.push(""),i.replace(Ei,function(b,T,Y,ce){a.push(Y?ce.replace(zm,"$1"):T||b)}),a});function $a(i){if("string"==typeof i||as(i))return i;var a=i+"";return"0"==a&&1/i==-it?"-0":a}function $l(i){if(null!=i){try{return m1.call(i)}catch{}try{return i+""}catch{}}return""}function LE(i){if(i instanceof Yn)return i.clone();var a=new ks(i.__wrapped__,i.__chain__);return a.__actions__=Bo(i.__actions__),a.__index__=i.__index__,a.__values__=i.__values__,a}var zR=Hn(function(i,a){return pi(i)?kp(i,Gi(a,1,pi,!0)):[]}),BR=Hn(function(i,a){var b=Ts(a);return pi(b)&&(b=n),pi(i)?kp(i,Gi(a,1,pi,!0),ln(b,2)):[]}),FR=Hn(function(i,a){var b=Ts(a);return pi(b)&&(b=n),pi(i)?kp(i,Gi(a,1,pi,!0),n,b):[]});function UE(i,a,b){var T=null==i?0:i.length;if(!T)return-1;var Y=null==b?0:Dn(b);return Y<0&&(Y=Ai(T+Y,0)),h1(i,ln(a,3),Y)}function DE(i,a,b){var T=null==i?0:i.length;if(!T)return-1;var Y=T-1;return b!==n&&(Y=Dn(b),Y=b<0?Ai(T+Y,0):uo(Y,T-1)),h1(i,ln(a,3),Y,!0)}function jE(i){return null!=i&&i.length?Gi(i,1):[]}function zE(i){return i&&i.length?i[0]:n}var XR=Hn(function(i){var a=Rr(i,Nv);return a.length&&a[0]===i[0]?wv(a):[]}),ZR=Hn(function(i){var a=Ts(i),b=Rr(i,Nv);return a===Ts(b)?a=n:b.pop(),b.length&&b[0]===i[0]?wv(b,ln(a,2)):[]}),eI=Hn(function(i){var a=Ts(i),b=Rr(i,Nv);return(a="function"==typeof a?a:n)&&b.pop(),b.length&&b[0]===i[0]?wv(b,n,a):[]});function Ts(i){var a=null==i?0:i.length;return a?i[a-1]:n}var iI=Hn(BE);function BE(i,a){return i&&i.length&&a&&a.length?xv(i,a):i}var aI=Au(function(i,a){var b=null==i?0:i.length,T=mv(i,a);return Z2(i,Rr(a,function(Y){return Tu(Y,b)?+Y:Y}).sort(cE)),T});function Vv(i){return null==i?i:tx.call(i)}var SI=Hn(function(i){return Vc(Gi(i,1,pi,!0))}),OI=Hn(function(i){var a=Ts(i);return pi(a)&&(a=n),Vc(Gi(i,1,pi,!0),ln(a,2))}),xI=Hn(function(i){var a=Ts(i);return a="function"==typeof a?a:n,Vc(Gi(i,1,pi,!0),n,a)});function Wv(i){if(!i||!i.length)return[];var a=0;return i=ji(i,function(b){if(pi(b))return a=Ai(b.length,a),!0}),cv(a,function(b){return Rr(i,sv(b))})}function FE(i,a){if(!i||!i.length)return[];var b=Wv(i);return null==a?b:Rr(b,function(T){return ar(a,n,T)})}var PI=Hn(function(i,a){return pi(i)?kp(i,a):[]}),kI=Hn(function(i){return kv(ji(i,pi))}),NI=Hn(function(i){var a=Ts(i);return pi(a)&&(a=n),kv(ji(i,pi),ln(a,2))}),AI=Hn(function(i){var a=Ts(i);return a="function"==typeof a?a:n,kv(ji(i,pi),n,a)}),TI=Hn(Wv);var UI=Hn(function(i){var a=i.length,b=a>1?i[a-1]:n;return b="function"==typeof b?(i.pop(),b):n,FE(i,b)});function HE(i){var a=re(i);return a.__chain__=!0,a}function q1(i,a){return a(i)}var jI=Au(function(i){var a=i.length,b=a?i[0]:0,T=this.__wrapped__,Y=function(ce){return mv(ce,i)};return!(a>1||this.__actions__.length)&&T instanceof Yn&&Tu(b)?((T=T.slice(b,+b+(a?1:0))).__actions__.push({func:q1,args:[Y],thisArg:n}),new ks(T,this.__chain__).thru(function(ce){return a&&!ce.length&&ce.push(n),ce})):this.thru(Y)});var WI=L1(function(i,a,b){Ir.call(i,b)?++i[b]:ku(i,b,1)});var YI=gE(UE),QI=gE(DE);function qE(i,a){return(kn(i)?$r:$c)(i,ln(a,3))}function $E(i,a){return(kn(i)?So:B2)(i,ln(a,3))}var eC=L1(function(i,a,b){Ir.call(i,b)?i[b].push(a):ku(i,b,[a])});var nC=Hn(function(i,a,b){var T=-1,Y="function"==typeof a,ce=Fo(i)?jt(i.length):[];return $c(i,function(Pe){ce[++T]=Y?ar(a,Pe,b):Np(Pe,a,b)}),ce}),rC=L1(function(i,a,b){ku(i,b,a)});function $1(i,a){return(kn(i)?Rr:K2)(i,ln(a,3))}var oC=L1(function(i,a,b){i[b?0:1].push(a)},function(){return[[],[]]});var pC=Hn(function(i,a){if(null==i)return[];var b=a.length;return b>1&&Io(i,a[0],a[1])?a=[]:b>2&&Io(a[0],a[1],a[2])&&(a=[a[0]]),J2(i,Gi(a,1),[])}),V1=GO||function(){return ki.Date.now()};function VE(i,a,b){return a=b?n:a,Nu(i,be,n,n,n,n,a=i&&null==a?i.length:a)}function WE(i,a){var b;if("function"!=typeof a)throw new Ps(u);return i=Dn(i),function(){return--i>0&&(b=a.apply(this,arguments)),i<=1&&(a=n),b}}var Kv=Hn(function(i,a,b){var T=1;if(b.length){var Y=Fc(b,md(Kv));T|=32}return Nu(i,T,a,b,Y)}),KE=Hn(function(i,a,b){var T=3;if(b.length){var Y=Fc(b,md(KE));T|=32}return Nu(a,T,i,b,Y)});function QE(i,a,b){var T,Y,ce,Pe,ze,Qe,bt=0,mt=!1,xt=!1,Kt=!0;if("function"!=typeof i)throw new Ps(u);function en(gi){var Ls=T,jp=Y;return T=Y=n,bt=gi,Pe=i.apply(jp,Ls)}function yn(gi){return bt=gi,ze=Up(Ur,a),mt?en(gi):Pe}function zn(gi){var Ls=gi-Qe;return Qe===n||Ls>=a||Ls<0||xt&&gi-bt>=ce}function Ur(){var gi=V1();if(zn(gi))return er(gi);ze=Up(Ur,function(gi){var Ls=a-(gi-Qe);return xt?uo(Ls,ce-(gi-bt)):Ls}(gi))}function er(gi){return ze=n,Kt&&T?en(gi):(T=Y=n,Pe)}function Yc(){var gi=V1(),Ls=zn(gi);if(T=arguments,Y=this,Qe=gi,Ls){if(ze===n)return yn(Qe);if(xt)return sE(ze),ze=Up(Ur,a),en(Qe)}return ze===n&&(ze=Up(Ur,a)),Pe}return a=Ms(a)||0,Zr(b)&&(mt=!!b.leading,ce=(xt="maxWait"in b)?Ai(Ms(b.maxWait)||0,a):ce,Kt="trailing"in b?!!b.trailing:Kt),Yc.cancel=function(){ze!==n&&sE(ze),bt=0,T=Qe=Y=ze=n},Yc.flush=function(){return ze===n?Pe:er(V1())},Yc}var yC=Hn(function(i,a){return z2(i,1,a)}),mC=Hn(function(i,a,b){return z2(i,Ms(a)||0,b)});function W1(i,a){if("function"!=typeof i||null!=a&&"function"!=typeof a)throw new Ps(u);var b=function(){var T=arguments,Y=a?a.apply(this,T):T[0],ce=b.cache;if(ce.has(Y))return ce.get(Y);var Pe=i.apply(this,T);return b.cache=ce.set(Y,Pe)||ce,Pe};return b.cache=new(W1.Cache||Pu),b}function K1(i){if("function"!=typeof i)throw new Ps(u);return function(){var a=arguments;switch(a.length){case 0:return!i.call(this);case 1:return!i.call(this,a[0]);case 2:return!i.call(this,a[0],a[1]);case 3:return!i.call(this,a[0],a[1],a[2])}return!i.apply(this,a)}}W1.Cache=Pu;var bC=sR(function(i,a){var b=(a=1==a.length&&kn(a[0])?Rr(a[0],os(ln())):Rr(Gi(a,1),os(ln()))).length;return Hn(function(T){for(var Y=-1,ce=uo(T.length,b);++Y<ce;)T[Y]=a[Y].call(this,T[Y]);return ar(i,this,T)})}),Gv=Hn(function(i,a){var b=Fc(a,md(Gv));return Nu(i,32,n,a,b)}),JE=Hn(function(i,a){var b=Fc(a,md(JE));return Nu(i,64,n,a,b)}),wC=Au(function(i,a){return Nu(i,256,n,n,n,a)});function da(i,a){return i===a||i!=i&&a!=a}var TC=z1(bv),MC=z1(function(i,a){return i>=a}),Vl=$2(function(){return arguments}())?$2:function(i){return ai(i)&&Ir.call(i,"callee")&&!k2.call(i,"callee")},kn=jt.isArray,LC=Mr?os(Mr):function(i){return ai(i)&&Ro(i)==wn};function Fo(i){return null!=i&&G1(i.length)&&!Mu(i)}function pi(i){return ai(i)&&Fo(i)}var Gc=QO||o_,DC=Pn?os(Pn):function(i){return ai(i)&&Ro(i)==Xe};function Yv(i){if(!ai(i))return!1;var a=Ro(i);return a==j||"[object DOMException]"==a||"string"==typeof i.message&&"string"==typeof i.name&&!Dp(i)}function Mu(i){if(!Zr(i))return!1;var a=Ro(i);return a==De||a==Lt||"[object AsyncFunction]"==a||"[object Proxy]"==a}function XE(i){return"number"==typeof i&&i==Dn(i)}function G1(i){return"number"==typeof i&&i>-1&&i%1==0&&i<=Rt}function Zr(i){var a=typeof i;return null!=i&&("object"==a||"function"==a)}function ai(i){return null!=i&&"object"==typeof i}var ZE=qr?os(qr):function(i){return ai(i)&&co(i)==Ft};function e3(i){return"number"==typeof i||ai(i)&&Ro(i)==sn}function Dp(i){if(!ai(i)||Ro(i)!=mn)return!1;var a=w1(i);if(null===a)return!0;var b=Ir.call(a,"constructor")&&a.constructor;return"function"==typeof b&&b instanceof b&&m1.call(b)==$O}var Qv=hi?os(hi):function(i){return ai(i)&&Ro(i)==Ar};var t3=Ni?os(Ni):function(i){return ai(i)&&co(i)==Xn};function Y1(i){return"string"==typeof i||!kn(i)&&ai(i)&&Ro(i)==Tn}function as(i){return"symbol"==typeof i||ai(i)&&Ro(i)==Mn}var vd=Lr?os(Lr):function(i){return ai(i)&&G1(i.length)&&!!_r[Ro(i)]};var ZC=z1(Ov),eP=z1(function(i,a){return i<=a});function n3(i){if(!i)return[];if(Fo(i))return Y1(i)?la(i):Bo(i);if(Op&&i[Op])return function(Ke){for(var ht,pt=[];!(ht=Ke.next()).done;)pt.push(ht.value);return pt}(i[Op]());var a=co(i);return(a==Ft?fv:a==Xn?p1:_d)(i)}function Lu(i){return i?(i=Ms(i))===it||i===-it?17976931348623157e292*(i<0?-1:1):i==i?i:0:0===i?i:0}function Dn(i){var a=Lu(i),b=a%1;return a==a?b?a-b:a:0}function r3(i){return i?Fl(Dn(i),0,Vt):0}function Ms(i){if("number"==typeof i)return i;if(as(i))return NaN;if(Zr(i)){var a="function"==typeof i.valueOf?i.valueOf():i;i=Zr(a)?a+"":a}if("string"!=typeof i)return 0===i?i:+i;i=E2(i);var b=Fm.test(i);return b||qm.test(i)?Dl(i.slice(2),b?2:8):aa.test(i)?NaN:+i}function i3(i){return qa(i,Ho(i))}function br(i){return null==i?"":ss(i)}var nP=gd(function(i,a){if(Lp(a)||Fo(a))qa(a,zi(a),i);else for(var b in a)Ir.call(a,b)&&Pp(i,b,a[b])}),o3=gd(function(i,a){qa(a,Ho(a),i)}),Q1=gd(function(i,a,b,T){qa(a,Ho(a),i,T)}),rP=gd(function(i,a,b,T){qa(a,zi(a),i,T)}),iP=Au(mv);var sP=Hn(function(i,a){i=Vr(i);var b=-1,T=a.length,Y=T>2?a[2]:n;for(Y&&Io(a[0],a[1],Y)&&(T=1);++b<T;)for(var ce=a[b],Pe=Ho(ce),ze=-1,Qe=Pe.length;++ze<Qe;){var bt=Pe[ze],mt=i[bt];(mt===n||da(mt,fd[bt])&&!Ir.call(i,bt))&&(i[bt]=ce[bt])}return i}),aP=Hn(function(i){return i.push(n,EE),ar(s3,n,i)});function Jv(i,a,b){var T=null==i?n:Hl(i,a);return T===n?b:T}function Xv(i,a){return null!=i&&xE(i,a,Bx)}var mP=mE(function(i,a,b){null!=a&&"function"!=typeof a.toString&&(a=v1.call(a)),i[a]=b},e_(qo)),vP=mE(function(i,a,b){null!=a&&"function"!=typeof a.toString&&(a=v1.call(a)),Ir.call(i,a)?i[a].push(b):i[a]=[b]},ln),_P=Hn(Np);function zi(i){return Fo(i)?L2(i):Sv(i)}function Ho(i){return Fo(i)?L2(i,!0):Qx(i)}var EP=gd(function(i,a,b){A1(i,a,b)}),s3=gd(function(i,a,b,T){A1(i,a,b,T)}),SP=Au(function(i,a){var b={};if(null==i)return b;var T=!1;a=Rr(a,function(ce){return ce=Wc(ce,i),T||(T=ce.length>1),ce}),qa(i,Dv(i),b),T&&(b=Ns(b,7,mR));for(var Y=a.length;Y--;)Pv(b,a[Y]);return b});var xP=Au(function(i,a){return null==i?{}:function(i,a){return X2(i,a,function(b,T){return Xv(i,T)})}(i,a)});function a3(i,a){if(null==i)return{};var b=Rr(Dv(i),function(T){return[T]});return a=ln(a),X2(i,b,function(T,Y){return a(T,Y[0])})}var u3=bE(zi),c3=bE(Ho);function _d(i){return null==i?[]:lv(i,zi(i))}var DP=yd(function(i,a,b){return a=a.toLowerCase(),i+(b?l3(a):a)});function l3(i){return Zv(br(i).toLowerCase())}function f3(i){return(i=br(i))&&i.replace(Vm,IO).replace(Xm,"")}var FP=yd(function(i,a,b){return i+(b?"-":"")+a.toLowerCase()}),HP=yd(function(i,a,b){return i+(b?" ":"")+a.toLowerCase()}),qP=pE("toLowerCase");var QP=yd(function(i,a,b){return i+(b?"_":"")+a.toLowerCase()});var XP=yd(function(i,a,b){return i+(b?" ":"")+Zv(a)});var uk=yd(function(i,a,b){return i+(b?" ":"")+a.toUpperCase()}),Zv=pE("toUpperCase");function d3(i,a,b){return i=br(i),(a=b?n:a)===n?function(Ke){return Iu.test(Ke)}(i)?function(Ke){return Ke.match(Zm)||[]}(i):function(Ke){return Ke.match(xi)||[]}(i):i.match(a)||[]}var h3=Hn(function(i,a){try{return ar(i,n,a)}catch(b){return Yv(b)?b:new fr(b)}}),ck=Au(function(i,a){return $r(a,function(b){b=$a(b),ku(i,b,Kv(i[b],i))}),i});function e_(i){return function(){return i}}var hk=yE(),pk=yE(!0);function qo(i){return i}function t_(i){return W2("function"==typeof i?i:Ns(i,1))}var mk=Hn(function(i,a){return function(b){return Np(b,i,a)}}),vk=Hn(function(i,a){return function(b){return Np(i,b,a)}});function n_(i,a,b){var T=zi(a),Y=N1(a,T);null==b&&(!Zr(a)||!Y.length&&T.length)&&(b=a,a=i,i=this,Y=N1(a,zi(a)));var ce=!(Zr(b)&&"chain"in b&&!b.chain),Pe=Mu(i);return $r(Y,function(ze){var Qe=a[ze];i[ze]=Qe,Pe&&(i.prototype[ze]=function(){var bt=this.__chain__;if(ce||bt){var mt=i(this.__wrapped__);return(mt.__actions__=Bo(this.__actions__)).push({func:Qe,args:arguments,thisArg:i}),mt.__chain__=bt,mt}return Qe.apply(i,Bc([this.value()],arguments))})}),i}function r_(){}var wk=Mv(Rr),Ek=Mv(Oo),Sk=Mv(ov);function p3(i){return Fv(i)?sv($a(i)):function(i){return function(a){return Hl(a,i)}}(i)}var xk=vE(),Rk=vE(!0);function i_(){return[]}function o_(){return!1}var Tk=D1(function(i,a){return i+a},0),Mk=Lv("ceil"),Lk=D1(function(i,a){return i/a},1),Uk=Lv("floor");var i,qk=D1(function(i,a){return i*a},1),$k=Lv("round"),Vk=D1(function(i,a){return i-a},0);return re.after=function(i,a){if("function"!=typeof a)throw new Ps(u);return i=Dn(i),function(){if(--i<1)return a.apply(this,arguments)}},re.ary=VE,re.assign=nP,re.assignIn=o3,re.assignInWith=Q1,re.assignWith=rP,re.at=iP,re.before=WE,re.bind=Kv,re.bindAll=ck,re.bindKey=KE,re.castArray=function(){if(!arguments.length)return[];var i=arguments[0];return kn(i)?i:[i]},re.chain=HE,re.chunk=function(i,a,b){a=(b?Io(i,a,b):a===n)?1:Ai(Dn(a),0);var T=null==i?0:i.length;if(!T||a<1)return[];for(var Y=0,ce=0,Pe=jt(O1(T/a));Y<T;)Pe[ce++]=As(i,Y,Y+=a);return Pe},re.compact=function(i){for(var a=-1,b=null==i?0:i.length,T=0,Y=[];++a<b;){var ce=i[a];ce&&(Y[T++]=ce)}return Y},re.concat=function(){var i=arguments.length;if(!i)return[];for(var a=jt(i-1),b=arguments[0],T=i;T--;)a[T-1]=arguments[T];return Bc(kn(b)?Bo(b):[b],Gi(a,1))},re.cond=function(i){var a=null==i?0:i.length,b=ln();return i=a?Rr(i,function(T){if("function"!=typeof T[1])throw new Ps(u);return[b(T[0]),T[1]]}):[],Hn(function(T){for(var Y=-1;++Y<a;){var ce=i[Y];if(ar(ce[0],this,T))return ar(ce[1],this,T)}})},re.conforms=function(i){return function(i){var a=zi(i);return function(b){return j2(b,i,a)}}(Ns(i,1))},re.constant=e_,re.countBy=WI,re.create=function(i,a){var b=pd(i);return null==a?b:D2(b,a)},re.curry=function GE(i,a,b){var T=Nu(i,8,n,n,n,n,n,a=b?n:a);return T.placeholder=GE.placeholder,T},re.curryRight=function YE(i,a,b){var T=Nu(i,16,n,n,n,n,n,a=b?n:a);return T.placeholder=YE.placeholder,T},re.debounce=QE,re.defaults=sP,re.defaultsDeep=aP,re.defer=yC,re.delay=mC,re.difference=zR,re.differenceBy=BR,re.differenceWith=FR,re.drop=function(i,a,b){var T=null==i?0:i.length;return T?As(i,(a=b||a===n?1:Dn(a))<0?0:a,T):[]},re.dropRight=function(i,a,b){var T=null==i?0:i.length;return T?As(i,0,(a=T-(a=b||a===n?1:Dn(a)))<0?0:a):[]},re.dropRightWhile=function(i,a){return i&&i.length?M1(i,ln(a,3),!0,!0):[]},re.dropWhile=function(i,a){return i&&i.length?M1(i,ln(a,3),!0):[]},re.fill=function(i,a,b,T){var Y=null==i?0:i.length;return Y?(b&&"number"!=typeof b&&Io(i,a,b)&&(b=0,T=Y),function(i,a,b,T){var Y=i.length;for((b=Dn(b))<0&&(b=-b>Y?0:Y+b),(T=T===n||T>Y?Y:Dn(T))<0&&(T+=Y),T=b>T?0:r3(T);b<T;)i[b++]=a;return i}(i,a,b,T)):[]},re.filter=function(i,a){return(kn(i)?ji:F2)(i,ln(a,3))},re.flatMap=function(i,a){return Gi($1(i,a),1)},re.flatMapDeep=function(i,a){return Gi($1(i,a),it)},re.flatMapDepth=function(i,a,b){return b=b===n?1:Dn(b),Gi($1(i,a),b)},re.flatten=jE,re.flattenDeep=function(i){return null!=i&&i.length?Gi(i,it):[]},re.flattenDepth=function(i,a){return null!=i&&i.length?Gi(i,a=a===n?1:Dn(a)):[]},re.flip=function(i){return Nu(i,512)},re.flow=hk,re.flowRight=pk,re.fromPairs=function(i){for(var a=-1,b=null==i?0:i.length,T={};++a<b;){var Y=i[a];T[Y[0]]=Y[1]}return T},re.functions=function(i){return null==i?[]:N1(i,zi(i))},re.functionsIn=function(i){return null==i?[]:N1(i,Ho(i))},re.groupBy=eC,re.initial=function(i){return null!=i&&i.length?As(i,0,-1):[]},re.intersection=XR,re.intersectionBy=ZR,re.intersectionWith=eI,re.invert=mP,re.invertBy=vP,re.invokeMap=nC,re.iteratee=t_,re.keyBy=rC,re.keys=zi,re.keysIn=Ho,re.map=$1,re.mapKeys=function(i,a){var b={};return a=ln(a,3),Ha(i,function(T,Y,ce){ku(b,a(T,Y,ce),T)}),b},re.mapValues=function(i,a){var b={};return a=ln(a,3),Ha(i,function(T,Y,ce){ku(b,Y,a(T,Y,ce))}),b},re.matches=function(i){return G2(Ns(i,1))},re.matchesProperty=function(i,a){return Y2(i,Ns(a,1))},re.memoize=W1,re.merge=EP,re.mergeWith=s3,re.method=mk,re.methodOf=vk,re.mixin=n_,re.negate=K1,re.nthArg=function(i){return i=Dn(i),Hn(function(a){return Q2(a,i)})},re.omit=SP,re.omitBy=function(i,a){return a3(i,K1(ln(a)))},re.once=function(i){return WE(2,i)},re.orderBy=function(i,a,b,T){return null==i?[]:(kn(a)||(a=null==a?[]:[a]),kn(b=T?n:b)||(b=null==b?[]:[b]),J2(i,a,b))},re.over=wk,re.overArgs=bC,re.overEvery=Ek,re.overSome=Sk,re.partial=Gv,re.partialRight=JE,re.partition=oC,re.pick=xP,re.pickBy=a3,re.property=p3,re.propertyOf=function(i){return function(a){return null==i?n:Hl(i,a)}},re.pull=iI,re.pullAll=BE,re.pullAllBy=function(i,a,b){return i&&i.length&&a&&a.length?xv(i,a,ln(b,2)):i},re.pullAllWith=function(i,a,b){return i&&i.length&&a&&a.length?xv(i,a,n,b):i},re.pullAt=aI,re.range=xk,re.rangeRight=Rk,re.rearg=wC,re.reject=function(i,a){return(kn(i)?ji:F2)(i,K1(ln(a,3)))},re.remove=function(i,a){var b=[];if(!i||!i.length)return b;var T=-1,Y=[],ce=i.length;for(a=ln(a,3);++T<ce;){var Pe=i[T];a(Pe,T,i)&&(b.push(Pe),Y.push(T))}return Z2(i,Y),b},re.rest=function(i,a){if("function"!=typeof i)throw new Ps(u);return Hn(i,a=a===n?a:Dn(a))},re.reverse=Vv,re.sampleSize=function(i,a,b){return a=(b?Io(i,a,b):a===n)?1:Dn(a),(kn(i)?Ax:nR)(i,a)},re.set=function(i,a,b){return null==i?i:Tp(i,a,b)},re.setWith=function(i,a,b,T){return T="function"==typeof T?T:n,null==i?i:Tp(i,a,b,T)},re.shuffle=function(i){return(kn(i)?Tx:iR)(i)},re.slice=function(i,a,b){var T=null==i?0:i.length;return T?(b&&"number"!=typeof b&&Io(i,a,b)?(a=0,b=T):(a=null==a?0:Dn(a),b=b===n?T:Dn(b)),As(i,a,b)):[]},re.sortBy=pC,re.sortedUniq=function(i){return i&&i.length?tE(i):[]},re.sortedUniqBy=function(i,a){return i&&i.length?tE(i,ln(a,2)):[]},re.split=function(i,a,b){return b&&"number"!=typeof b&&Io(i,a,b)&&(a=b=n),(b=b===n?Vt:b>>>0)?(i=br(i))&&("string"==typeof a||null!=a&&!Qv(a))&&!(a=ss(a))&&ud(i)?Kc(la(i),0,b):i.split(a,b):[]},re.spread=function(i,a){if("function"!=typeof i)throw new Ps(u);return a=null==a?0:Ai(Dn(a),0),Hn(function(b){var T=b[a],Y=Kc(b,0,a);return T&&Bc(Y,T),ar(i,this,Y)})},re.tail=function(i){var a=null==i?0:i.length;return a?As(i,1,a):[]},re.take=function(i,a,b){return i&&i.length?As(i,0,(a=b||a===n?1:Dn(a))<0?0:a):[]},re.takeRight=function(i,a,b){var T=null==i?0:i.length;return T?As(i,(a=T-(a=b||a===n?1:Dn(a)))<0?0:a,T):[]},re.takeRightWhile=function(i,a){return i&&i.length?M1(i,ln(a,3),!1,!0):[]},re.takeWhile=function(i,a){return i&&i.length?M1(i,ln(a,3)):[]},re.tap=function(i,a){return a(i),i},re.throttle=function(i,a,b){var T=!0,Y=!0;if("function"!=typeof i)throw new Ps(u);return Zr(b)&&(T="leading"in b?!!b.leading:T,Y="trailing"in b?!!b.trailing:Y),QE(i,a,{leading:T,maxWait:a,trailing:Y})},re.thru=q1,re.toArray=n3,re.toPairs=u3,re.toPairsIn=c3,re.toPath=function(i){return kn(i)?Rr(i,$a):as(i)?[i]:Bo(ME(br(i)))},re.toPlainObject=i3,re.transform=function(i,a,b){var T=kn(i),Y=T||Gc(i)||vd(i);if(a=ln(a,4),null==b){var ce=i&&i.constructor;b=Y?T?new ce:[]:Zr(i)&&Mu(ce)?pd(w1(i)):{}}return(Y?$r:Ha)(i,function(Pe,ze,Qe){return a(b,Pe,ze,Qe)}),b},re.unary=function(i){return VE(i,1)},re.union=SI,re.unionBy=OI,re.unionWith=xI,re.uniq=function(i){return i&&i.length?Vc(i):[]},re.uniqBy=function(i,a){return i&&i.length?Vc(i,ln(a,2)):[]},re.uniqWith=function(i,a){return a="function"==typeof a?a:n,i&&i.length?Vc(i,n,a):[]},re.unset=function(i,a){return null==i||Pv(i,a)},re.unzip=Wv,re.unzipWith=FE,re.update=function(i,a,b){return null==i?i:rE(i,a,Av(b))},re.updateWith=function(i,a,b,T){return T="function"==typeof T?T:n,null==i?i:rE(i,a,Av(b),T)},re.values=_d,re.valuesIn=function(i){return null==i?[]:lv(i,Ho(i))},re.without=PI,re.words=d3,re.wrap=function(i,a){return Gv(Av(a),i)},re.xor=kI,re.xorBy=NI,re.xorWith=AI,re.zip=TI,re.zipObject=function(i,a){return oE(i||[],a||[],Pp)},re.zipObjectDeep=function(i,a){return oE(i||[],a||[],Tp)},re.zipWith=UI,re.entries=u3,re.entriesIn=c3,re.extend=o3,re.extendWith=Q1,n_(re,re),re.add=Tk,re.attempt=h3,re.camelCase=DP,re.capitalize=l3,re.ceil=Mk,re.clamp=function(i,a,b){return b===n&&(b=a,a=n),b!==n&&(b=(b=Ms(b))==b?b:0),a!==n&&(a=(a=Ms(a))==a?a:0),Fl(Ms(i),a,b)},re.clone=function(i){return Ns(i,4)},re.cloneDeep=function(i){return Ns(i,5)},re.cloneDeepWith=function(i,a){return Ns(i,5,a="function"==typeof a?a:n)},re.cloneWith=function(i,a){return Ns(i,4,a="function"==typeof a?a:n)},re.conformsTo=function(i,a){return null==a||j2(i,a,zi(a))},re.deburr=f3,re.defaultTo=function(i,a){return null==i||i!=i?a:i},re.divide=Lk,re.endsWith=function(i,a,b){i=br(i),a=ss(a);var T=i.length,Y=b=b===n?T:Fl(Dn(b),0,T);return(b-=a.length)>=0&&i.slice(b,Y)==a},re.eq=da,re.escape=function(i){return(i=br(i))&&ti.test(i)?i.replace(Uc,CO):i},re.escapeRegExp=function(i){return(i=br(i))&&Si.test(i)?i.replace(ii,"\\$&"):i},re.every=function(i,a,b){var T=kn(i)?Oo:Dx;return b&&Io(i,a,b)&&(a=n),T(i,ln(a,3))},re.find=YI,re.findIndex=UE,re.findKey=function(i,a){return v2(i,ln(a,3),Ha)},re.findLast=QI,re.findLastIndex=DE,re.findLastKey=function(i,a){return v2(i,ln(a,3),_v)},re.floor=Uk,re.forEach=qE,re.forEachRight=$E,re.forIn=function(i,a){return null==i?i:vv(i,ln(a,3),Ho)},re.forInRight=function(i,a){return null==i?i:H2(i,ln(a,3),Ho)},re.forOwn=function(i,a){return i&&Ha(i,ln(a,3))},re.forOwnRight=function(i,a){return i&&_v(i,ln(a,3))},re.get=Jv,re.gt=TC,re.gte=MC,re.has=function(i,a){return null!=i&&xE(i,a,zx)},re.hasIn=Xv,re.head=zE,re.identity=qo,re.includes=function(i,a,b,T){i=Fo(i)?i:_d(i),b=b&&!T?Dn(b):0;var Y=i.length;return b<0&&(b=Ai(Y+b,0)),Y1(i)?b<=Y&&i.indexOf(a,b)>-1:!!Y&&ad(i,a,b)>-1},re.indexOf=function(i,a,b){var T=null==i?0:i.length;if(!T)return-1;var Y=null==b?0:Dn(b);return Y<0&&(Y=Ai(T+Y,0)),ad(i,a,Y)},re.inRange=function(i,a,b){return a=Lu(a),b===n?(b=a,a=0):b=Lu(b),function(i,a,b){return i>=uo(a,b)&&i<Ai(a,b)}(i=Ms(i),a,b)},re.invoke=_P,re.isArguments=Vl,re.isArray=kn,re.isArrayBuffer=LC,re.isArrayLike=Fo,re.isArrayLikeObject=pi,re.isBoolean=function(i){return!0===i||!1===i||ai(i)&&Ro(i)==Je},re.isBuffer=Gc,re.isDate=DC,re.isElement=function(i){return ai(i)&&1===i.nodeType&&!Dp(i)},re.isEmpty=function(i){if(null==i)return!0;if(Fo(i)&&(kn(i)||"string"==typeof i||"function"==typeof i.splice||Gc(i)||vd(i)||Vl(i)))return!i.length;var a=co(i);if(a==Ft||a==Xn)return!i.size;if(Lp(i))return!Sv(i).length;for(var b in i)if(Ir.call(i,b))return!1;return!0},re.isEqual=function(i,a){return Ap(i,a)},re.isEqualWith=function(i,a,b){var T=(b="function"==typeof b?b:n)?b(i,a):n;return T===n?Ap(i,a,n,b):!!T},re.isError=Yv,re.isFinite=function(i){return"number"==typeof i&&A2(i)},re.isFunction=Mu,re.isInteger=XE,re.isLength=G1,re.isMap=ZE,re.isMatch=function(i,a){return i===a||Ev(i,a,zv(a))},re.isMatchWith=function(i,a,b){return b="function"==typeof b?b:n,Ev(i,a,zv(a),b)},re.isNaN=function(i){return e3(i)&&i!=+i},re.isNative=function(i){if(PR(i))throw new fr("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return V2(i)},re.isNil=function(i){return null==i},re.isNull=function(i){return null===i},re.isNumber=e3,re.isObject=Zr,re.isObjectLike=ai,re.isPlainObject=Dp,re.isRegExp=Qv,re.isSafeInteger=function(i){return XE(i)&&i>=-Rt&&i<=Rt},re.isSet=t3,re.isString=Y1,re.isSymbol=as,re.isTypedArray=vd,re.isUndefined=function(i){return i===n},re.isWeakMap=function(i){return ai(i)&&co(i)==In},re.isWeakSet=function(i){return ai(i)&&"[object WeakSet]"==Ro(i)},re.join=function(i,a){return null==i?"":JO.call(i,a)},re.kebabCase=FP,re.last=Ts,re.lastIndexOf=function(i,a,b){var T=null==i?0:i.length;if(!T)return-1;var Y=T;return b!==n&&(Y=(Y=Dn(b))<0?Ai(T+Y,0):uo(Y,T-1)),a==a?function(Ke,ht,pt){for(var jt=pt+1;jt--;)if(Ke[jt]===ht)return jt;return jt}(i,a,Y):h1(i,_2,Y,!0)},re.lowerCase=HP,re.lowerFirst=qP,re.lt=ZC,re.lte=eP,re.max=function(i){return i&&i.length?k1(i,qo,bv):n},re.maxBy=function(i,a){return i&&i.length?k1(i,ln(a,2),bv):n},re.mean=function(i){return b2(i,qo)},re.meanBy=function(i,a){return b2(i,ln(a,2))},re.min=function(i){return i&&i.length?k1(i,qo,Ov):n},re.minBy=function(i,a){return i&&i.length?k1(i,ln(a,2),Ov):n},re.stubArray=i_,re.stubFalse=o_,re.stubObject=function(){return{}},re.stubString=function(){return""},re.stubTrue=function(){return!0},re.multiply=qk,re.nth=function(i,a){return i&&i.length?Q2(i,Dn(a)):n},re.noConflict=function(){return ki._===this&&(ki._=VO),this},re.noop=r_,re.now=V1,re.pad=function(i,a,b){i=br(i);var T=(a=Dn(a))?cd(i):0;if(!a||T>=a)return i;var Y=(a-T)/2;return j1(x1(Y),b)+i+j1(O1(Y),b)},re.padEnd=function(i,a,b){i=br(i);var T=(a=Dn(a))?cd(i):0;return a&&T<a?i+j1(a-T,b):i},re.padStart=function(i,a,b){i=br(i);var T=(a=Dn(a))?cd(i):0;return a&&T<a?j1(a-T,b)+i:i},re.parseInt=function(i,a,b){return b||null==a?a=0:a&&(a=+a),ex(br(i).replace(oi,""),a||0)},re.random=function(i,a,b){if(b&&"boolean"!=typeof b&&Io(i,a,b)&&(a=b=n),b===n&&("boolean"==typeof a?(b=a,a=n):"boolean"==typeof i&&(b=i,i=n)),i===n&&a===n?(i=0,a=1):(i=Lu(i),a===n?(a=i,i=0):a=Lu(a)),i>a){var T=i;i=a,a=T}if(b||i%1||a%1){var Y=T2();return uo(i+Y*(a-i+d1("1e-"+((Y+"").length-1))),a)}return Rv(i,a)},re.reduce=function(i,a,b){var T=kn(i)?iv:w2,Y=arguments.length<3;return T(i,ln(a,4),b,Y,$c)},re.reduceRight=function(i,a,b){var T=kn(i)?_O:w2,Y=arguments.length<3;return T(i,ln(a,4),b,Y,B2)},re.repeat=function(i,a,b){return a=(b?Io(i,a,b):a===n)?1:Dn(a),Iv(br(i),a)},re.replace=function(){var i=arguments,a=br(i[0]);return i.length<3?a:a.replace(i[1],i[2])},re.result=function(i,a,b){var T=-1,Y=(a=Wc(a,i)).length;for(Y||(Y=1,i=n);++T<Y;){var ce=null==i?n:i[$a(a[T])];ce===n&&(T=Y,ce=b),i=Mu(ce)?ce.call(i):ce}return i},re.round=$k,re.runInContext=Ke,re.sample=function(i){return(kn(i)?U2:tR)(i)},re.size=function(i){if(null==i)return 0;if(Fo(i))return Y1(i)?cd(i):i.length;var a=co(i);return a==Ft||a==Xn?i.size:Sv(i).length},re.snakeCase=QP,re.some=function(i,a,b){var T=kn(i)?ov:oR;return b&&Io(i,a,b)&&(a=n),T(i,ln(a,3))},re.sortedIndex=function(i,a){return T1(i,a)},re.sortedIndexBy=function(i,a,b){return Cv(i,a,ln(b,2))},re.sortedIndexOf=function(i,a){var b=null==i?0:i.length;if(b){var T=T1(i,a);if(T<b&&da(i[T],a))return T}return-1},re.sortedLastIndex=function(i,a){return T1(i,a,!0)},re.sortedLastIndexBy=function(i,a,b){return Cv(i,a,ln(b,2),!0)},re.sortedLastIndexOf=function(i,a){if(null!=i&&i.length){var b=T1(i,a,!0)-1;if(da(i[b],a))return b}return-1},re.startCase=XP,re.startsWith=function(i,a,b){return i=br(i),b=null==b?0:Fl(Dn(b),0,i.length),a=ss(a),i.slice(b,b+a.length)==a},re.subtract=Vk,re.sum=function(i){return i&&i.length?uv(i,qo):0},re.sumBy=function(i,a){return i&&i.length?uv(i,ln(a,2)):0},re.template=function(i,a,b){var T=re.templateSettings;b&&Io(i,a,b)&&(a=n),i=br(i),a=Q1({},a,T,wE);var Y,ce,Pe=Q1({},a.imports,T.imports,wE),ze=zi(Pe),Qe=lv(Pe,ze),bt=0,mt=a.interpolate||Rs,xt="__p += '",Kt=dv((a.escape||Rs).source+"|"+mt.source+"|"+(mt===Xr?Bm:Rs).source+"|"+(a.evaluate||Rs).source+"|$","g"),en="//# sourceURL="+(Ir.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tv+"]")+"\n";i.replace(Kt,function(zn,Ur,er,Co,Va,Yc){return er||(er=Co),xt+=i.slice(bt,Yc).replace(Wm,PO),Ur&&(Y=!0,xt+="' +\n__e("+Ur+") +\n'"),Va&&(ce=!0,xt+="';\n"+Va+";\n__p += '"),er&&(xt+="' +\n((__t = ("+er+")) == null ? '' : __t) +\n'"),bt=Yc+zn.length,zn}),xt+="';\n";var yn=Ir.call(a,"variable")&&a.variable;if(yn){if(Ri.test(yn))throw new fr("Invalid `variable` option passed into `_.template`")}else xt="with (obj) {\n"+xt+"\n}\n";xt=(ce?xt.replace(xs,""):xt).replace(za,"$1").replace(Eo,"$1;"),xt="function("+(yn||"obj")+") {\n"+(yn?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(Y?", __e = _.escape":"")+(ce?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+xt+"return __p\n}";var jn=h3(function(){return xo(ze,en+"return "+xt).apply(n,Qe)});if(jn.source=xt,Yv(jn))throw jn;return jn},re.times=function(i,a){if((i=Dn(i))<1||i>Rt)return[];var b=Vt,T=uo(i,Vt);a=ln(a),i-=Vt;for(var Y=cv(T,a);++b<i;)a(b);return Y},re.toFinite=Lu,re.toInteger=Dn,re.toLength=r3,re.toLower=function(i){return br(i).toLowerCase()},re.toNumber=Ms,re.toSafeInteger=function(i){return i?Fl(Dn(i),-Rt,Rt):0===i?i:0},re.toString=br,re.toUpper=function(i){return br(i).toUpperCase()},re.trim=function(i,a,b){if((i=br(i))&&(b||a===n))return E2(i);if(!i||!(a=ss(a)))return i;var T=la(i),Y=la(a);return Kc(T,S2(T,Y),O2(T,Y)+1).join("")},re.trimEnd=function(i,a,b){if((i=br(i))&&(b||a===n))return i.slice(0,R2(i)+1);if(!i||!(a=ss(a)))return i;var T=la(i);return Kc(T,0,O2(T,la(a))+1).join("")},re.trimStart=function(i,a,b){if((i=br(i))&&(b||a===n))return i.replace(oi,"");if(!i||!(a=ss(a)))return i;var T=la(i);return Kc(T,S2(T,la(a))).join("")},re.truncate=function(i,a){var b=30,T="...";if(Zr(a)){var Y="separator"in a?a.separator:Y;b="length"in a?Dn(a.length):b,T="omission"in a?ss(a.omission):T}var ce=(i=br(i)).length;if(ud(i)){var Pe=la(i);ce=Pe.length}if(b>=ce)return i;var ze=b-cd(T);if(ze<1)return T;var Qe=Pe?Kc(Pe,0,ze).join(""):i.slice(0,ze);if(Y===n)return Qe+T;if(Pe&&(ze+=Qe.length-ze),Qv(Y)){if(i.slice(ze).search(Y)){var bt,mt=Qe;for(Y.global||(Y=dv(Y.source,br(Y0.exec(Y))+"g")),Y.lastIndex=0;bt=Y.exec(mt);)var xt=bt.index;Qe=Qe.slice(0,xt===n?ze:xt)}}else if(i.indexOf(ss(Y),ze)!=ze){var Kt=Qe.lastIndexOf(Y);Kt>-1&&(Qe=Qe.slice(0,Kt))}return Qe+T},re.unescape=function(i){return(i=br(i))&&td.test(i)?i.replace(Ba,UO):i},re.uniqueId=function(i){var a=++qO;return br(i)+a},re.upperCase=uk,re.upperFirst=Zv,re.each=qE,re.eachRight=$E,re.first=zE,n_(re,(i={},Ha(re,function(a,b){Ir.call(re.prototype,b)||(i[b]=a)}),i),{chain:!1}),re.VERSION="4.17.21",$r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){re[i].placeholder=re}),$r(["drop","take"],function(i,a){Yn.prototype[i]=function(b){b=b===n?1:Ai(Dn(b),0);var T=this.__filtered__&&!a?new Yn(this):this.clone();return T.__filtered__?T.__takeCount__=uo(b,T.__takeCount__):T.__views__.push({size:uo(b,Vt),type:i+(T.__dir__<0?"Right":"")}),T},Yn.prototype[i+"Right"]=function(b){return this.reverse()[i](b).reverse()}}),$r(["filter","map","takeWhile"],function(i,a){var b=a+1,T=1==b||3==b;Yn.prototype[i]=function(Y){var ce=this.clone();return ce.__iteratees__.push({iteratee:ln(Y,3),type:b}),ce.__filtered__=ce.__filtered__||T,ce}}),$r(["head","last"],function(i,a){var b="take"+(a?"Right":"");Yn.prototype[i]=function(){return this[b](1).value()[0]}}),$r(["initial","tail"],function(i,a){var b="drop"+(a?"":"Right");Yn.prototype[i]=function(){return this.__filtered__?new Yn(this):this[b](1)}}),Yn.prototype.compact=function(){return this.filter(qo)},Yn.prototype.find=function(i){return this.filter(i).head()},Yn.prototype.findLast=function(i){return this.reverse().find(i)},Yn.prototype.invokeMap=Hn(function(i,a){return"function"==typeof i?new Yn(this):this.map(function(b){return Np(b,i,a)})}),Yn.prototype.reject=function(i){return this.filter(K1(ln(i)))},Yn.prototype.slice=function(i,a){i=Dn(i);var b=this;return b.__filtered__&&(i>0||a<0)?new Yn(b):(i<0?b=b.takeRight(-i):i&&(b=b.drop(i)),a!==n&&(b=(a=Dn(a))<0?b.dropRight(-a):b.take(a-i)),b)},Yn.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Yn.prototype.toArray=function(){return this.take(Vt)},Ha(Yn.prototype,function(i,a){var b=/^(?:filter|find|map|reject)|While$/.test(a),T=/^(?:head|last)$/.test(a),Y=re[T?"take"+("last"==a?"Right":""):a],ce=T||/^find/.test(a);Y&&(re.prototype[a]=function(){var Pe=this.__wrapped__,ze=T?[1]:arguments,Qe=Pe instanceof Yn,bt=ze[0],mt=Qe||kn(Pe),xt=function(Ur){var er=Y.apply(re,Bc([Ur],ze));return T&&Kt?er[0]:er};mt&&b&&"function"==typeof bt&&1!=bt.length&&(Qe=mt=!1);var Kt=this.__chain__,yn=ce&&!Kt,jn=Qe&&!this.__actions__.length;if(!ce&&mt){Pe=jn?Pe:new Yn(this);var zn=i.apply(Pe,ze);return zn.__actions__.push({func:q1,args:[xt],thisArg:n}),new ks(zn,Kt)}return yn&&jn?i.apply(this,ze):(zn=this.thru(xt),yn?T?zn.value()[0]:zn.value():zn)})}),$r(["pop","push","shift","sort","splice","unshift"],function(i){var a=g1[i],b=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",T=/^(?:pop|shift)$/.test(i);re.prototype[i]=function(){var Y=arguments;if(T&&!this.__chain__){var ce=this.value();return a.apply(kn(ce)?ce:[],Y)}return this[b](function(Pe){return a.apply(kn(Pe)?Pe:[],Y)})}}),Ha(Yn.prototype,function(i,a){var b=re[a];if(b){var T=b.name+"";Ir.call(hd,T)||(hd[T]=[]),hd[T].push({name:a,func:b})}}),hd[U1(n,2).name]=[{name:"wrapper",func:n}],Yn.prototype.clone=function(){var i=new Yn(this.__wrapped__);return i.__actions__=Bo(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Bo(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Bo(this.__views__),i},Yn.prototype.reverse=function(){if(this.__filtered__){var i=new Yn(this);i.__dir__=-1,i.__filtered__=!0}else(i=this.clone()).__dir__*=-1;return i},Yn.prototype.value=function(){var i=this.__wrapped__.value(),a=this.__dir__,b=kn(i),T=a<0,Y=b?i.length:0,ce=function(i,a,b){for(var T=-1,Y=b.length;++T<Y;){var ce=b[T],Pe=ce.size;switch(ce.type){case"drop":i+=Pe;break;case"dropRight":a-=Pe;break;case"take":a=uo(a,i+Pe);break;case"takeRight":i=Ai(i,a-Pe)}}return{start:i,end:a}}(0,Y,this.__views__),Pe=ce.start,ze=ce.end,Qe=ze-Pe,bt=T?ze:Pe-1,mt=this.__iteratees__,xt=mt.length,Kt=0,en=uo(Qe,this.__takeCount__);if(!b||!T&&Y==Qe&&en==Qe)return iE(i,this.__actions__);var yn=[];e:for(;Qe--&&Kt<en;){for(var jn=-1,zn=i[bt+=a];++jn<xt;){var Ur=mt[jn],Co=Ur.type,Va=(0,Ur.iteratee)(zn);if(2==Co)zn=Va;else if(!Va){if(1==Co)continue e;break e}}yn[Kt++]=zn}return yn},re.prototype.at=jI,re.prototype.chain=function(){return HE(this)},re.prototype.commit=function(){return new ks(this.value(),this.__chain__)},re.prototype.next=function(){this.__values__===n&&(this.__values__=n3(this.value()));var i=this.__index__>=this.__values__.length;return{done:i,value:i?n:this.__values__[this.__index__++]}},re.prototype.plant=function(i){for(var a,b=this;b instanceof C1;){var T=LE(b);T.__index__=0,T.__values__=n,a?Y.__wrapped__=T:a=T;var Y=T;b=b.__wrapped__}return Y.__wrapped__=i,a},re.prototype.reverse=function(){var i=this.__wrapped__;if(i instanceof Yn){var a=i;return this.__actions__.length&&(a=new Yn(this)),(a=a.reverse()).__actions__.push({func:q1,args:[Vv],thisArg:n}),new ks(a,this.__chain__)}return this.thru(Vv)},re.prototype.toJSON=re.prototype.valueOf=re.prototype.value=function(){return iE(this.__wrapped__,this.__actions__)},re.prototype.first=re.prototype.head,Op&&(re.prototype[Op]=function(){return this}),re}();me?((me.exports=ld)._=ld,Ep._=ld):ki._=ld}.call(c);var Y8=Object.defineProperty,Q8=Object.defineProperties,J8=Object.getOwnPropertyDescriptors,u2=Object.getOwnPropertySymbols,X8=Object.prototype.hasOwnProperty,Z8=Object.prototype.propertyIsEnumerable,c2=(n,e,r)=>e in n?Y8(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,W0=(n,e)=>{for(var r in e||(e={}))X8.call(e,r)&&c2(n,r,e[r]);if(u2)for(var r of u2(e))Z8.call(e,r)&&c2(n,r,e[r]);return n},eO=(n,e)=>Q8(n,J8(e));function Mc(n,e,r){var s;const u=function(n){const[e,r]=n.split(":");return{namespace:e,reference:r}}(n);return(null==(s=e.rpcMap)?void 0:s[u.reference])||`https://rpc.walletconnect.com/v1/?chainId=${u.namespace}:${u.reference}&projectId=${r}`}function Ml(n){return n.includes(":")?n.split(":")[1]:n}function l2(n){return n.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function f2(n){var e,r,s,u;const g={};if(!xr(n))return g;for(const[S,I]of Object.entries(n)){const F=Xh(S)?[S]:I.chains,A=I.methods||[],G=I.events||[],he=I.rpcMap||{},te=kl(S);g[te]=eO(W0(W0({},g[te]),I),{chains:Ic(F,null==(e=g[te])?void 0:e.chains),methods:Ic(A,null==(r=g[te])?void 0:r.methods),events:Ic(G,null==(s=g[te])?void 0:s.events),rpcMap:W0(W0({},he),null==(u=g[te])?void 0:u.rpcMap)})}return g}function rO(n){return n.includes(":")?n.split(":")[2]:n}function iO(n){const e={};for(const[r,s]of Object.entries(n)){const u=s.methods||[],g=s.events||[],S=s.accounts||[],I=Xh(r)?[r]:s.chains?s.chains:l2(s.accounts);e[r]={chains:I,methods:u,events:g,accounts:S}}return e}function Lm(n){return"number"==typeof n?n:n.includes("0x")?parseInt(n,16):n.includes(":")?Number(n.split(":")[1]):Number(n)}const d2={},Kr=n=>d2[n],Um=(n,e)=>{d2[n]=e};var Dm={exports:{}};!function(n,e){var r,s=typeof self<"u"?self:c,u=function(){function S(){this.fetch=!1,this.DOMException=s.DOMException}return S.prototype=s,new S}();r=u,function(S){var I_searchParams="URLSearchParams"in r,I_iterable="Symbol"in r&&"iterator"in Symbol,I_blob="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),I_formData="FormData"in r,I_arrayBuffer="ArrayBuffer"in r;if(I_arrayBuffer)var A=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],G=ArrayBuffer.isView||function(Ae){return Ae&&A.indexOf(Object.prototype.toString.call(Ae))>-1};function he(Ae){if("string"!=typeof Ae&&(Ae=String(Ae)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(Ae))throw new TypeError("Invalid character in header field name");return Ae.toLowerCase()}function te(Ae){return"string"!=typeof Ae&&(Ae=String(Ae)),Ae}function Ne(Ae){var it={next:function(){var Rt=Ae.shift();return{done:void 0===Rt,value:Rt}}};return I_iterable&&(it[Symbol.iterator]=function(){return it}),it}function se(Ae){this.map={},Ae instanceof se?Ae.forEach(function(it,Rt){this.append(Rt,it)},this):Array.isArray(Ae)?Ae.forEach(function(it){this.append(it[0],it[1])},this):Ae&&Object.getOwnPropertyNames(Ae).forEach(function(it){this.append(it,Ae[it])},this)}function Ce(Ae){if(Ae.bodyUsed)return Promise.reject(new TypeError("Already read"));Ae.bodyUsed=!0}function lt(Ae){return new Promise(function(it,Rt){Ae.onload=function(){it(Ae.result)},Ae.onerror=function(){Rt(Ae.error)}})}function Ot(Ae){var it=new FileReader,Rt=lt(it);return it.readAsArrayBuffer(Ae),Rt}function ge(Ae){if(Ae.slice)return Ae.slice(0);var it=new Uint8Array(Ae.byteLength);return it.set(new Uint8Array(Ae)),it.buffer}function be(){return this.bodyUsed=!1,this._initBody=function(Ae){this._bodyInit=Ae,Ae?"string"==typeof Ae?this._bodyText=Ae:I_blob&&Blob.prototype.isPrototypeOf(Ae)?this._bodyBlob=Ae:I_formData&&FormData.prototype.isPrototypeOf(Ae)?this._bodyFormData=Ae:I_searchParams&&URLSearchParams.prototype.isPrototypeOf(Ae)?this._bodyText=Ae.toString():I_arrayBuffer&&I_blob&&function(Ae){return Ae&&DataView.prototype.isPrototypeOf(Ae)}(Ae)?(this._bodyArrayBuffer=ge(Ae.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):I_arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(Ae)||G(Ae))?this._bodyArrayBuffer=ge(Ae):this._bodyText=Ae=Object.prototype.toString.call(Ae):this._bodyText="",this.headers.get("content-type")||("string"==typeof Ae?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):I_searchParams&&URLSearchParams.prototype.isPrototypeOf(Ae)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},I_blob&&(this.blob=function(){var Ae=Ce(this);if(Ae)return Ae;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Ce(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Ot)}),this.text=function(){var Ae=Ce(this);if(Ae)return Ae;if(this._bodyBlob)return function(Ae){var it=new FileReader,Rt=lt(it);return it.readAsText(Ae),Rt}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(Ae){for(var it=new Uint8Array(Ae),Rt=new Array(it.length),Nt=0;Nt<it.length;Nt++)Rt[Nt]=String.fromCharCode(it[Nt]);return Rt.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},I_formData&&(this.formData=function(){return this.text().then(vt)}),this.json=function(){return this.text().then(JSON.parse)},this}se.prototype.append=function(Ae,it){Ae=he(Ae),it=te(it);var Rt=this.map[Ae];this.map[Ae]=Rt?Rt+", "+it:it},se.prototype.delete=function(Ae){delete this.map[he(Ae)]},se.prototype.get=function(Ae){return Ae=he(Ae),this.has(Ae)?this.map[Ae]:null},se.prototype.has=function(Ae){return this.map.hasOwnProperty(he(Ae))},se.prototype.set=function(Ae,it){this.map[he(Ae)]=te(it)},se.prototype.forEach=function(Ae,it){for(var Rt in this.map)this.map.hasOwnProperty(Rt)&&Ae.call(it,this.map[Rt],Rt,this)},se.prototype.keys=function(){var Ae=[];return this.forEach(function(it,Rt){Ae.push(Rt)}),Ne(Ae)},se.prototype.values=function(){var Ae=[];return this.forEach(function(it){Ae.push(it)}),Ne(Ae)},se.prototype.entries=function(){var Ae=[];return this.forEach(function(it,Rt){Ae.push([Rt,it])}),Ne(Ae)},I_iterable&&(se.prototype[Symbol.iterator]=se.prototype.entries);var ae=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function fe(Ae,it){var Rt=(it=it||{}).body;if(Ae instanceof fe){if(Ae.bodyUsed)throw new TypeError("Already read");this.url=Ae.url,this.credentials=Ae.credentials,it.headers||(this.headers=new se(Ae.headers)),this.method=Ae.method,this.mode=Ae.mode,this.signal=Ae.signal,!Rt&&null!=Ae._bodyInit&&(Rt=Ae._bodyInit,Ae.bodyUsed=!0)}else this.url=String(Ae);if(this.credentials=it.credentials||this.credentials||"same-origin",(it.headers||!this.headers)&&(this.headers=new se(it.headers)),this.method=function(Ae){var it=Ae.toUpperCase();return ae.indexOf(it)>-1?it:Ae}(it.method||this.method||"GET"),this.mode=it.mode||this.mode||null,this.signal=it.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&Rt)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Rt)}function vt(Ae){var it=new FormData;return Ae.trim().split("&").forEach(function(Rt){if(Rt){var Nt=Rt.split("="),Dt=Nt.shift().replace(/\+/g," "),Vt=Nt.join("=").replace(/\+/g," ");it.append(decodeURIComponent(Dt),decodeURIComponent(Vt))}}),it}function dt(Ae){var it=new se;return Ae.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(Rt){var Nt=Rt.split(":"),Dt=Nt.shift().trim();if(Dt){var Vt=Nt.join(":").trim();it.append(Dt,Vt)}}),it}function Pt(Ae,it){it||(it={}),this.type="default",this.status=void 0===it.status?200:it.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in it?it.statusText:"OK",this.headers=new se(it.headers),this.url=it.url||"",this._initBody(Ae)}fe.prototype.clone=function(){return new fe(this,{body:this._bodyInit})},be.call(fe.prototype),be.call(Pt.prototype),Pt.prototype.clone=function(){return new Pt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new se(this.headers),url:this.url})},Pt.error=function(){var Ae=new Pt(null,{status:0,statusText:""});return Ae.type="error",Ae};var Yt=[301,302,303,307,308];Pt.redirect=function(Ae,it){if(-1===Yt.indexOf(it))throw new RangeError("Invalid status code");return new Pt(null,{status:it,headers:{location:Ae}})},S.DOMException=r.DOMException;try{new S.DOMException}catch{S.DOMException=function(Ae,it){this.message=Ae,this.name=it;var Rt=Error(Ae);this.stack=Rt.stack},S.DOMException.prototype=Object.create(Error.prototype),S.DOMException.prototype.constructor=S.DOMException}function Jt(Ae,it){return new Promise(function(Rt,Nt){var Dt=new fe(Ae,it);if(Dt.signal&&Dt.signal.aborted)return Nt(new S.DOMException("Aborted","AbortError"));var Vt=new XMLHttpRequest;function on(){Vt.abort()}Vt.onload=function(){var On={status:Vt.status,statusText:Vt.statusText,headers:dt(Vt.getAllResponseHeaders()||"")};On.url="responseURL"in Vt?Vt.responseURL:On.headers.get("X-Request-URL"),Rt(new Pt("response"in Vt?Vt.response:Vt.responseText,On))},Vt.onerror=function(){Nt(new TypeError("Network request failed"))},Vt.ontimeout=function(){Nt(new TypeError("Network request failed"))},Vt.onabort=function(){Nt(new S.DOMException("Aborted","AbortError"))},Vt.open(Dt.method,Dt.url,!0),"include"===Dt.credentials?Vt.withCredentials=!0:"omit"===Dt.credentials&&(Vt.withCredentials=!1),"responseType"in Vt&&I_blob&&(Vt.responseType="blob"),Dt.headers.forEach(function(On,cn){Vt.setRequestHeader(cn,On)}),Dt.signal&&(Dt.signal.addEventListener("abort",on),Vt.onreadystatechange=function(){4===Vt.readyState&&Dt.signal.removeEventListener("abort",on)}),Vt.send(typeof Dt._bodyInit>"u"?null:Dt._bodyInit)})}Jt.polyfill=!0,r.fetch||(r.fetch=Jt,r.Headers=se,r.Request=fe,r.Response=Pt),S.Headers=se,S.Request=fe,S.Response=Pt,S.fetch=Jt,Object.defineProperty(S,"__esModule",{value:!0})}({}),u.fetch.ponyfill=!0,delete u.fetch.polyfill;var g=u;(e=g.fetch).default=g.fetch,e.fetch=g.fetch,e.Headers=g.Headers,e.Request=g.Request,e.Response=g.Response,n.exports=e}(Dm,Dm.exports);var h2=function(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}(Dm.exports);const p2={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class Lc{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new E.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!hw(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=r}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}open(e=this.url){var r=this;return ue(function*(){yield r.register(e)})()}close(){var e=this;return ue(function*(){if(!e.isAvailable)throw new Error("Connection already closed");e.onClose()})()}send(e,r){var s=this;return ue(function*(){s.isAvailable||(yield s.register());try{const u=Qn(e),g=yield(yield h2(s.url,Object.assign(Object.assign({},p2),{body:u}))).json();s.onPayload({data:g})}catch(u){s.onError(e.id,u)}})()}register(e=this.url){var r=this;return ue(function*(){if(!hw(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(r.registering){const s=r.events.getMaxListeners();return(r.events.listenerCount("register_error")>=s||r.events.listenerCount("open")>=s)&&r.events.setMaxListeners(s+1),new Promise((u,g)=>{r.events.once("register_error",S=>{r.resetMaxListeners(),g(S)}),r.events.once("open",()=>{if(r.resetMaxListeners(),typeof r.isAvailable>"u")return g(new Error("HTTP connection is missing or invalid"));u()})})}r.url=e,r.registering=!0;try{if(!r.disableProviderPing){const s=Qn({id:1,jsonrpc:"2.0",method:"test",params:[]});yield h2(e,Object.assign(Object.assign({},p2),{body:s}))}r.onOpen()}catch(s){const u=r.parseError(s);throw r.events.emit("register_error",u),r.onClose(),u}})()}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const r="string"==typeof e.data?Vn(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const s=this.parseError(r),u=z0(e,s.message||s.toString());this.events.emit("payload",u)}parseError(e,r=this.url){return $t(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}class oO{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Kr("events"),this.client=Kr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ru_DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var s;const u=Ml(r);e[u]=this.createHttpProvider(u,null==(s=this.namespace.rpcMap)?void 0:s[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const s=this.createHttpProvider(e,r);s&&(this.httpProviders[e]=s)}createHttpProvider(e,r){const s=r||Mc(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new Lc(s,Kr("disableProviderPing")))}}class sO{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Kr("events"),this.client=Kr("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}request(e){var r=this;return ue(function*(){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return r.getAccounts();case"wallet_switchEthereumChain":return yield r.handleSwitchChain(e);case"eth_chainId":return parseInt(r.getDefaultChain())}return r.namespace.methods.includes(e.request.method)?yield r.client.request(e):r.getHttpProvider().request(e.request)})()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(parseInt(e),r),this.chainId=parseInt(e),this.events.emit(Ru_DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,r){const s=r||Mc(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new Lc(s,Kr("disableProviderPing")))}setHttpProvider(e,r){const s=this.createHttpProvider(e,r);s&&(this.httpProviders[e]=s)}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var s;const u=parseInt(Ml(r));e[u]=this.createHttpProvider(u,null==(s=this.namespace.rpcMap)?void 0:s[r])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}handleSwitchChain(e){var r=this;return ue(function*(){var s,u;let g=e.request.params?null==(s=e.request.params[0])?void 0:s.chainId:"0x0";g=g.startsWith("0x")?g:`0x${g}`;const S=parseInt(g,16);if(r.isChainApproved(S))r.setDefaultChain(`${S}`);else{if(!r.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${S}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);yield r.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:g}]},chainId:null==(u=r.namespace.chains)?void 0:u[0]}),r.setDefaultChain(`${S}`)}return null})()}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class aO{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Kr("events"),this.client=Kr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ru_DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var s;const u=Ml(r);e[u]=this.createHttpProvider(u,null==(s=this.namespace.rpcMap)?void 0:s[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const s=this.createHttpProvider(e,r);s&&(this.httpProviders[e]=s)}createHttpProvider(e,r){const s=r||Mc(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new Lc(s,Kr("disableProviderPing")))}}class uO{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Kr("events"),this.client=Kr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ru_DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var s;const u=Ml(r);e[u]=this.createHttpProvider(u,null==(s=this.namespace.rpcMap)?void 0:s[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const s=this.createHttpProvider(e,r);s&&(this.httpProviders[e]=s)}createHttpProvider(e,r){const s=r||Mc(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new Lc(s,Kr("disableProviderPing")))}}class cO{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Kr("events"),this.client=Kr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ru_DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{const s=this.getCardanoRPCUrl(r),u=Ml(r);e[u]=this.createHttpProvider(u,s)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){const r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){const s=this.createHttpProvider(e,r);s&&(this.httpProviders[e]=s)}createHttpProvider(e,r){const s=r||this.getCardanoRPCUrl(e);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new Lc(s,Kr("disableProviderPing")))}}class lO{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Kr("events"),this.client=Kr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ru_DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var s;const u=Ml(r);e[u]=this.createHttpProvider(u,null==(s=this.namespace.rpcMap)?void 0:s[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const s=this.createHttpProvider(e,r);s&&(this.httpProviders[e]=s)}createHttpProvider(e,r){const s=r||Mc(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new Lc(s,Kr("disableProviderPing")))}}class fO{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Kr("events"),this.client=Kr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(Ru_DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var s;const u=Ml(r);e[u]=this.createHttpProvider(u,null==(s=this.namespace.rpcMap)?void 0:s[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const s=this.createHttpProvider(e,r);s&&(this.httpProviders[e]=s)}createHttpProvider(e,r){const s=r||Mc(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new Su(new Lc(s,Kr("disableProviderPing")))}}class dO{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Kr("events"),this.client=Kr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){const s=r||Mc(`${this.name}:${e}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,s)}this.events.emit(Ru_DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var s;e[r]=this.createHttpProvider(r,null==(s=this.namespace.rpcMap)?void 0:s[r])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){const s=this.createHttpProvider(e,r);s&&(this.httpProviders[e]=s)}createHttpProvider(e,r){const s=r||Mc(e,this.namespace);return typeof s>"u"?void 0:new Su(new Lc(s,Kr("disableProviderPing")))}}var hO=Object.defineProperty,pO=Object.defineProperties,gO=Object.getOwnPropertyDescriptors,y2=Object.getOwnPropertySymbols,yO=Object.prototype.hasOwnProperty,mO=Object.prototype.propertyIsEnumerable,m2=(n,e,r)=>e in n?hO(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,K0=(n,e)=>{for(var r in e||(e={}))yO.call(e,r)&&m2(n,r,e[r]);if(y2)for(var r of y2(e))mO.call(e,r)&&m2(n,r,e[r]);return n},jm=(n,e)=>pO(n,gO(e));class G0{constructor(e){this.events=new E.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:qn.pino(qn.getDefaultLoggerOptions({level:e?.logger||"error"})),this.disableProviderPing=e?.disableProviderPing||!1}static init(e){return ue(function*(){const r=new G0(e);return yield r.initialize(),r})()}request(e,r){var s=this;return ue(function*(){const[u,g]=s.validateChain(r);if(!s.session)throw new Error("Please call connect() before request()");return yield s.getProvider(u).request({request:K0({},e),chainId:`${u}:${g}`,topic:s.session.topic})})()}sendAsync(e,r,s){const u=(new Date).getTime();this.request(e,s).then(g=>r(null,j0(u,g))).catch(g=>r(g,void 0))}enable(){var e=this;return ue(function*(){if(!e.client)throw new Error("Sign Client not initialized");return e.session||(yield e.connect({namespaces:e.namespaces,optionalNamespaces:e.optionalNamespaces,sessionProperties:e.sessionProperties})),yield e.requestAccounts()})()}disconnect(){var e=this;return ue(function*(){var r;if(!e.session)throw new Error("Please call connect() before enable()");yield e.client.disconnect({topic:null==(r=e.session)?void 0:r.topic,reason:Nr("USER_DISCONNECTED")}),yield e.cleanup()})()}connect(e){var r=this;return ue(function*(){if(!r.client)throw new Error("Sign Client not initialized");if(r.setNamespaces(e),yield r.cleanupPendingPairings(),!e.skipPairing)return yield r.pair(e.pairingTopic)})()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}pair(e){var r=this;return ue(function*(){r.shouldAbortPairingAttempt=!1;let s=0;do{if(r.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(s>=r.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:u,approval:g}=yield r.client.connect({pairingTopic:e,requiredNamespaces:r.namespaces,optionalNamespaces:r.optionalNamespaces,sessionProperties:r.sessionProperties});u&&(r.uri=u,r.events.emit("display_uri",u)),yield g().then(S=>{r.session=S,r.namespaces||(r.namespaces=iO(S.namespaces),r.persist("namespaces",r.namespaces))}).catch(S=>{if(S.message!==r2)throw S;s++})}while(!r.session);return r.onConnect(),r.session})()}setDefaultChain(e,r){try{if(!this.session)return;const[s,u]=this.validateChain(e);this.getProvider(s).setDefaultChain(u,r)}catch(s){if(!/Please call connect/.test(s.message))throw s}}cleanupPendingPairings(e={}){var r=this;return ue(function*(){r.logger.info("Cleaning up inactive pairings...");const s=r.client.pairing.getAll();if(La(s)){for(const u of s)e.deletePairings?r.client.core.expirer.set(u.topic,0):yield r.client.core.relayer.subscriber.unsubscribe(u.topic);r.logger.info(`Inactive pairings cleared: ${s.length}`)}})()}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}checkStorage(){var e=this;return ue(function*(){e.namespaces=yield e.getFromStore("namespaces"),e.optionalNamespaces=(yield e.getFromStore("optionalNamespaces"))||{},e.client.session.length&&(e.session=e.client.session.get(e.client.session.keys[e.client.session.keys.length-1]),e.createProviders())})()}initialize(){var e=this;return ue(function*(){e.logger.trace("Initialized"),yield e.createClient(),yield e.checkStorage(),e.registerEventListeners()})()}createClient(){var e=this;return ue(function*(){e.client=e.providerOpts.client||(yield Tm.init({logger:e.providerOpts.logger||"error",relayUrl:e.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:e.providerOpts.projectId,metadata:e.providerOpts.metadata,storageOptions:e.providerOpts.storageOptions,storage:e.providerOpts.storage,name:e.providerOpts.name})),e.logger.trace("SignClient Initialized")})()}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(r=>kl(r)))];Um("client",this.client),Um("events",this.events),Um("disableProviderPing",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;const s=function(n,e){const r=Object.keys(e.namespaces).filter(u=>u.includes(n));if(!r.length)return[];const s=[];return r.forEach(u=>{s.push(...e.namespaces[u].accounts)}),s}(r,this.session),u=l2(s),g=function(n={},e={}){const r=f2(n),s=f2(e);return Mm.exports.merge(r,s)}(this.namespaces,this.optionalNamespaces),S=jm(K0({},g[r]),{accounts:s,chains:u});switch(r){case"eip155":this.rpcProviders[r]=new sO({namespace:S});break;case"solana":this.rpcProviders[r]=new aO({namespace:S});break;case"cosmos":this.rpcProviders[r]=new uO({namespace:S});break;case"polkadot":this.rpcProviders[r]=new oO({namespace:S});break;case"cip34":this.rpcProviders[r]=new cO({namespace:S});break;case"elrond":this.rpcProviders[r]=new lO({namespace:S});break;case"multiversx":this.rpcProviders[r]=new fO({namespace:S});break;case"near":this.rpcProviders[r]=new dO({namespace:S})}})}registerEventListeners(){var e=this;if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",r=>{this.events.emit("session_ping",r)}),this.client.on("session_event",r=>{const{params:s}=r,{event:u}=s;if("accountsChanged"===u.name){const g=u.data;g&&La(g)&&this.events.emit("accountsChanged",g.map(rO))}else if("chainChanged"===u.name){const g=s.chainId,S=s.event.data,I=kl(g),F=Lm(g)!==Lm(S)?`${I}:${Lm(S)}`:g;this.onChainChanged(F)}else this.events.emit(u.name,u.data);this.events.emit("session_event",r)}),this.client.on("session_update",({topic:r,params:s})=>{var u;const{namespaces:g}=s,S=null==(u=this.client)?void 0:u.session.get(r);this.session=jm(K0({},S),{namespaces:g}),this.onSessionUpdate(),this.events.emit("session_update",{topic:r,params:s})}),this.client.on("session_delete",function(){var r=ue(function*(s){yield e.cleanup(),e.events.emit("session_delete",s),e.events.emit("disconnect",jm(K0({},Nr("USER_DISCONNECTED")),{data:s.topic}))});return function(s){return r.apply(this,arguments)}}()),this.on(Ru_DEFAULT_CHAIN_CHANGED,r=>{this.onChainChanged(r,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace(null==(r=this.session)?void 0:r.namespaces[e])})}setNamespaces(e){const{namespaces:r,optionalNamespaces:s,sessionProperties:u}=e;r&&Object.keys(r).length&&(this.namespaces=r),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=u,this.persist("namespaces",r),this.persist("optionalNamespaces",s)}validateChain(e){const[r,s]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,s];if(r&&!Object.keys(this.namespaces||{}).map(g=>kl(g)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&s)return[r,s];const u=kl(Object.keys(this.namespaces)[0]);return[u,this.rpcProviders[u].getDefaultChain()]}requestAccounts(){var e=this;return ue(function*(){const[r]=e.validateChain();return yield e.getProvider(r).requestAccounts()})()}onChainChanged(e,r=!1){var s;if(!this.namespaces)return;const[u,g]=this.validateChain(e);r||this.getProvider(u).setDefaultChain(g),(null!=(s=this.namespaces[u])?s:this.namespaces[`${u}:${g}`]).defaultChain=g,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",g)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}cleanup(){var e=this;return ue(function*(){e.session=void 0,e.namespaces=void 0,e.optionalNamespaces=void 0,e.sessionProperties=void 0,e.persist("namespaces",void 0),e.persist("optionalNamespaces",void 0),e.persist("sessionProperties",void 0),yield e.cleanupPendingPairings({deletePairings:!0})})()}persist(e,r){this.client.core.storage.setItem(`${a2}/${e}`,r)}getFromStore(e){var r=this;return ue(function*(){return yield r.client.core.storage.getItem(`${a2}/${e}`)})()}}h.UniversalProvider=G0,h.default=G0,Object.defineProperty(h,"__esModule",{value:!0})}(tw.exports);const Py=["eth_sendTransaction","personal_sign"],ky=["chainChanged","accountsChanged"];function Ny(_){return Number(_[0].split(":")[1])}function Ay(_){return`0x${_.toString(16)}`}class Ty{constructor(){this.events=new my.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(m,h)=>(this.events.on(m,h),this),this.once=(m,h)=>(this.events.once(m,h),this),this.removeListener=(m,h)=>(this.events.removeListener(m,h),this),this.off=(m,h)=>(this.events.off(m,h),this),this.parseAccount=m=>this.isCompatibleChainId(m)?this.parseAccountId(m).address:m,this.signer={},this.rpc={}}static init(m){return Bi(this,void 0,void 0,function*(){const h=new Ty;return yield h.initialize(m),h})}request(m){return Bi(this,void 0,void 0,function*(){return yield this.signer.request(m,this.formatChainId(this.chainId))})}sendAsync(m,h){this.signer.sendAsync(m,h,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){return Bi(this,void 0,void 0,function*(){return this.session||(yield this.connect()),yield this.request({method:"eth_requestAccounts"})})}connect(m){return Bi(this,void 0,void 0,function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(m);const{required:h,optional:c}=function(f){const{chains:v,optionalChains:y,methods:E,optionalMethods:R,events:p,optionalEvents:d,rpcMap:O}=f;if(!Cy(v))throw new Error("Invalid chains");const L=v,P=E||Py,N=p||ky,M={chains:L,methods:P,events:N,rpcMap:{[Ny(L)]:O[Ny(L)]}},V=null==p?void 0:p.filter(W=>!ky.includes(W)),Z=null==E?void 0:E.filter(W=>!Py.includes(W));return y||d||R||(null==V?void 0:V.length)||(null==Z?void 0:Z.length)?{required:M,optional:{chains:[...new Set((null==V?void 0:V.length)&&(null==Z?void 0:Z.length)||!y?L.concat(y||[]):y)],methods:[...new Set(P.concat(R||[]))],events:[...new Set(N.concat(d||[]))],rpcMap:O}}:{required:M}}(this.rpc);try{const f=yield new Promise((y,E)=>Bi(this,void 0,void 0,function*(){yield this.signer.connect(Object.assign(Object.assign({namespaces:{[this.namespace]:h}},c&&{optionalNamespaces:{[this.namespace]:c}}),{pairingTopic:null==m?void 0:m.pairingTopic,skipPairing:!1})).then(R=>{y(R)}).catch(R=>{E(new Error(R.message))})}));if(!f)return;this.setChainIds(this.rpc.chains);const v=function(y,E=[]){const R=[];return Object.keys(y).forEach(p=>{E.length&&!E.includes(p)||R.push(...y[p].accounts)}),R}(f.namespaces,[this.namespace]);this.setAccounts(v),this.events.emit("connect",{chainId:Ay(this.chainId)})}catch(f){throw this.signer.logger.error(f),f}})}disconnect(){return Bi(this,void 0,void 0,function*(){this.session&&(yield this.signer.disconnect()),this.reset()})}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",m=>{const{params:h}=m,{event:c}=h;"accountsChanged"===c.name?(this.accounts=this.parseAccounts(c.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===c.name?this.setChainId(this.formatChainId(c.data)):this.events.emit(c.name,c.data),this.events.emit("session_event",m)}),this.signer.on("chainChanged",m=>{const h=parseInt(m);this.chainId=h,this.events.emit("chainChanged",Ay(this.chainId)),this.persist()}),this.signer.on("session_update",m=>{this.events.emit("session_update",m)}),this.signer.on("session_delete",m=>{this.reset(),this.events.emit("session_delete",m),this.events.emit("disconnect",Object.assign(Object.assign({},function(h,c){const{message:f,code:v}=xS.USER_DISCONNECTED;return{message:f,code:v}}()),{data:m.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",m=>{this.events.emit("display_uri",m)})}switchEthereumChain(m){this.request({method:"wallet_switchEthereumChain",params:[{chainId:m.toString(16)}]})}isCompatibleChainId(m){return"string"==typeof m&&m.startsWith(`${this.namespace}:`)}formatChainId(m){return`${this.namespace}:${m}`}parseChainId(m){return Number(m.split(":")[1])}setChainIds(m){const c=m.filter(f=>this.isCompatibleChainId(f)).map(f=>this.parseChainId(f));c.length&&(this.chainId=c[0],this.events.emit("chainChanged",Ay(this.chainId)),this.persist())}setChainId(m){if(this.isCompatibleChainId(m)){const h=this.parseChainId(m);this.chainId=h,this.switchEthereumChain(h)}}parseAccountId(m){const[h,c,f]=m.split(":");return{chainId:`${h}:${c}`,address:f}}setAccounts(m){this.accounts=m.filter(h=>this.parseChainId(this.parseAccountId(h).chainId)===this.chainId).map(h=>this.parseAccountId(h).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(m){var h;return{chains:(null===(h=m.chains)||void 0===h?void 0:h.map(c=>this.formatChainId(c)))||[`${this.namespace}:1`],optionalChains:m.optionalChains?m.optionalChains.map(c=>this.formatChainId(c)):void 0,methods:(null==m?void 0:m.methods)||Py,events:(null==m?void 0:m.events)||ky,optionalMethods:(null==m?void 0:m.optionalMethods)||[],optionalEvents:(null==m?void 0:m.optionalEvents)||[],rpcMap:(null==m?void 0:m.rpcMap)||this.buildRpcMap(m.chains.concat(m.optionalChains||[]),m.projectId),projectId:m.projectId,metadata:m.metadata}}buildRpcMap(m,h){const c={};return m.forEach(f=>{c[f]=this.getRpcUrl(f,h)}),c}initialize(m){return Bi(this,void 0,void 0,function*(){this.rpc=this.getRpcConfig(m),this.chainId=Ny(this.rpc.chains),this.signer=yield tw.exports.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:m.disableProviderPing,relayUrl:m.relayUrl,storageOptions:m.storageOptions}),this.registerEventListeners(),yield this.loadPersistedSession()})}loadConnectOpts(m){if(!m)return;const{chains:h,optionalChains:c,rpcMap:f}=m;h&&Cy(h)&&(this.rpc.chains=h.map(v=>this.formatChainId(v)),h.forEach(v=>{this.rpc.rpcMap[v]=(null==f?void 0:f[v])||this.getRpcUrl(v)})),c&&Cy(c)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==c?void 0:c.map(v=>this.formatChainId(v)),c.forEach(v=>{this.rpc.rpcMap[v]=(null==f?void 0:f[v])||this.getRpcUrl(v)}))}getRpcUrl(m,h){var c;return(null===(c=this.rpc.rpcMap)||void 0===c?void 0:c[m])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${m}&projectId=${h||this.rpc.projectId}`}loadPersistedSession(){return Bi(this,void 0,void 0,function*(){if(!this.session)return;const m=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),h=this.session.namespaces[`${this.namespace}:${m}`]?this.session.namespaces[`${this.namespace}:${m}`]:this.session.namespaces[this.namespace];this.setChainIds(m?[this.formatChainId(m)]:null==h?void 0:h.accounts),this.setAccounts(null==h?void 0:h.accounts)})}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(m){return"string"==typeof m||m instanceof String?[this.parseAccount(m)]:m.map(h=>this.parseAccount(h))}}const Hi=Wa("WalletConnectEvm"),og=a_("WalletConnectEvm");function IS(_){Hi("displayUriHandler",_),(_=>{hy("setModalUri",_),Q_(_)})(_)}const My=Wa("getProvider"),CS=[1];var nw;let Ly;Yi.SupportedProviders=void 0,(Yi.SupportedProviders||(Yi.SupportedProviders={})).Ethereum="Ethereum",Yi.SupportedProviderImplementations=void 0,(nw=Yi.SupportedProviderImplementations||(Yi.SupportedProviderImplementations={})).LedgerConnect="LedgerConnect",nw.WalletConnect="WalletConnect";const rw=_=>(My("getHexChainId",_),"string"==typeof _&&_.match(/^0x[0-9A-Fa-f]*$/)?_:`0x${_.toString(16)}`),iw=Wa("supportOptions");let ow;const zu=()=>(iw("getSupportOptions"),ow),Uy=Wa("ExtensionEvm");var Dy;function NS(_){return("iOS"===_.os.name||"macOS"===_.os.name)&&"Safari"===_.browser.name}function AS(_){return!!Dy[_]}function TS(_){return _.every(AS)}function sw(){if(Uy("getEthereumProvider"),"undefined"==typeof window)throw new v3;let _=window.ethereum;if(Uy("provider is",_),void 0===_||void 0===_.isLedgerConnect)throw new y3;const m=zu(),h=rw(m.chainId||0);return rw(_.chainId)!=h&&(Uy("chainIds are different, changing to",h),_.request({method:"wallet_switchEthereumChain",params:[{chainId:h}]})),_}!function(_){_[_.EthereumMainnet=1]="EthereumMainnet",_[_.Polygon=137]="Polygon"}(Dy||(Dy={}));const sg=Wa("support");let aw;Yi.checkSupport=function(_){sg("checkSupport",_),(c=>{var f;iw("setSupportOptions",c);const v=c.walletConnectVersion||1;let y,E,R=[];1===v?(E=c.chainId||1,y=[E]):(y=c.chains||CS,E=y[0],R.push(...y),(null===(f=c.optionalChains)||void 0===f?void 0:f.length)&&R.push(...c.optionalChains.filter(d=>R.indexOf(d)<0)));const p=Object.assign(Object.assign({},c),{walletConnectVersion:v,chains:y,chainId:E,optionalChains:R,projectId:c.projectId||""});if(2===v&&(!c.projectId||""===c.projectId))throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");ow=p})(_);let h;return h=function(c){sg("checkEthereumSupport",c);const f=py();let v=!1;try{v=!!sw()}catch{}const y={isLedgerConnectSupported:NS(f),isLedgerConnectEnabled:!!v,isChainIdSupported:TS(c.chains),providerImplementation:Yi.SupportedProviderImplementations.LedgerConnect};return y.isLedgerConnectSupported&&y.isLedgerConnectEnabled&&y.isChainIdSupported||(y.providerImplementation=Yi.SupportedProviderImplementations.WalletConnect),My("setProviderImplementation",E=y.providerImplementation),Ly=E,y;var E}(zu()),sg("checkSupportResult is",h),aw=h,h},Yi.enableDebugLogs=()=>{zp=!0},Yi.getProvider=function(){return Bi(this,void 0,void 0,function*(){My("getProvider",Ly);const _=zu();if(_.providerType===Yi.SupportedProviders.Ethereum)return(null==localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||(null==localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))||Ly!==Yi.SupportedProviderImplementations.LedgerConnect?(null==localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||1!==_.walletConnectVersion&&!(null==localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))?yield function(){return Bi(this,void 0,void 0,function*(){Hi("getWalletConnectProvider");try{const _=yield function(){return Bi(this,void 0,void 0,function*(){Hi("initWalletConnectProvider");const m=zu();Hi("walletConnectProviderOptions is",m);const h={projectId:m.projectId,chains:m.chains,optionalChains:m.optionalChains,methods:m.methods,optionalMethods:m.optionalMethods||[],events:m.events,optionalEvents:m.optionalEvents||[],rpcMap:m.rpcMap,relayUrl:m.relayUrl,showQrModal:!1};Hi("ethereum init options are",h),Hi("creating a new provider instance");try{return Ty.init(h)}catch(c){throw og("Error while initializing ethereum provider"),c}})}();return function(m){function h(v){v&&(v.removeListener("connect",c),v.removeListener("session_delete",f))}function c(v){Hi("connectHandler",v),Yl(!1)}function f(v){Hi("disconnectHandler",v),m.disconnect(),h(m)}Hi("assignWalletConnectProviderEvents"),m&&(h(m),m.on("connect",c),m.on("session_delete",f),Hi("provider is",m))}(_),_.request=function(m){Hi("patchWalletConnectProviderRequest");const h=m.request.bind(m),c=zu();return Hi("walletConnectProviderOptions is",c),function({method:f,params:v}){return Bi(this,void 0,void 0,function*(){return"eth_requestAccounts"===f?(Hi("calling patched",f,v),Hi("handling display_uri once"),m.once("display_uri",IS),new Promise((y,E)=>Bi(this,void 0,void 0,function*(){var R,p;try{(null===(R=null==m?void 0:m.session)||void 0===R?void 0:R.connected)?(Hi("reusing existing session"),y(yield h({method:f,params:v}))):(p={uri:"",onClose:()=>{og("user rejected"),E(new u_)}},gy("UseLedgerLiveModal",{isDesktop:"desktop"===py().type,uri:p.uri,onClose:p.onClose}),Hi("creating a new session"),yield m.connect({chains:c.chains,optionalChains:c.optionalChains}),y(yield h({method:f,params:v})))}catch(d){return og("error",d),E(d)}}))):(Hi("calling provider",f,v),yield h({method:f,params:v}))})}}(_),_}catch(_){const m=_ instanceof Error?_:new Error(String(_));throw og("error",m),m}})}():yield T5():sw();throw new m3})},Object.defineProperty(Yi,"__esModule",{value:!0})}(g3)}}]);