@dcl/auth-site 0.0.0-6811828007.commit-b9f0832

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/assets/apple-51f33970.svg +10 -0
  2. package/assets/brand-icons-42e369dc.ttf +0 -0
  3. package/assets/brand-icons-6519a15b.svg +1008 -0
  4. package/assets/brand-icons-9fafd6c3.woff +0 -0
  5. package/assets/brand-icons-d023c55f.eot +0 -0
  6. package/assets/brand-icons-e7d4d534.woff2 +0 -0
  7. package/assets/coinbase-2fdc4113.svg +1 -0
  8. package/assets/dapper-1bed553a.png +0 -0
  9. package/assets/discord-2316fc0e.svg +10 -0
  10. package/assets/flags-94d5c7f1.png +0 -0
  11. package/assets/google-97fe0fd7.svg +13 -0
  12. package/assets/handshine-6e410f33.svg +10 -0
  13. package/assets/icons-282a64fb.svg +1518 -0
  14. package/assets/icons-434466b5.woff2 +0 -0
  15. package/assets/icons-8b4e1b84.eot +0 -0
  16. package/assets/icons-95b6a484.woff +0 -0
  17. package/assets/icons-cb7f81f5.ttf +0 -0
  18. package/assets/index-0bf5e711.js +30 -0
  19. package/assets/index-1f5d15e7.js +182 -0
  20. package/assets/index-312c2d49.css +346 -0
  21. package/assets/join-f622df90.webp +0 -0
  22. package/assets/logo-9a364aec.svg +26 -0
  23. package/assets/magic-4a9e80ca.svg +11 -0
  24. package/assets/metamask-976f4fe8.svg +31 -0
  25. package/assets/outline-icons-4537fa06.eot +0 -0
  26. package/assets/outline-icons-4bc359c2.woff +0 -0
  27. package/assets/outline-icons-4d288344.woff2 +0 -0
  28. package/assets/outline-icons-67172172.ttf +0 -0
  29. package/assets/outline-icons-ae8fd02a.svg +366 -0
  30. package/assets/samsung-blockchain-wallet-78dfce87.svg +9 -0
  31. package/assets/signin-16dbba39.svg +5 -0
  32. package/assets/wallet-connect-39806354.png +0 -0
  33. package/assets/warning-057948e8.svg +4 -0
  34. package/assets/x-894cab63.svg +3 -0
  35. package/favicon.ico +0 -0
  36. package/index.html +15 -0
  37. package/package.json +22 -0
@@ -0,0 +1,182 @@
1
+ var woe=Object.defineProperty;var _oe=(t,e,r)=>e in t?woe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Be=(t,e,r)=>(_oe(t,typeof e!="symbol"?e+"":e,r),r),sS=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var W=(t,e,r)=>(sS(t,e,"read from private field"),r?r.call(t):e.get(t)),Qe=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Te=(t,e,r,n)=>(sS(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Em=(t,e,r,n)=>({set _(i){Te(t,e,i,r)},get _(){return W(t,e,n)}}),ct=(t,e,r)=>(sS(t,e,"access private method"),r);function Eoe(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Df(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function js(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Jz={exports:{}},Gb={};/*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */var x$=Object.getOwnPropertySymbols,xoe=Object.prototype.hasOwnProperty,Aoe=Object.prototype.propertyIsEnumerable;function Soe(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function Ioe(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(e).map(function(a){return e[a]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Xz=Ioe()?Object.assign:function(t,e){for(var r,n=Soe(t),i,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var s in r)xoe.call(r,s)&&(n[s]=r[s]);if(x$){i=x$(r);for(var o=0;o<i.length;o++)Aoe.call(r,i[o])&&(n[i[o]]=r[i[o]])}}return n},Zz={exports:{}},un={};/** @license React v17.0.2
6
+ * react.production.min.js
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */var wN=Xz,kg=60103,eV=60106;un.Fragment=60107;un.StrictMode=60108;un.Profiler=60114;var tV=60109,rV=60110,nV=60112;un.Suspense=60113;var iV=60115,aV=60116;if(typeof Symbol=="function"&&Symbol.for){var Bo=Symbol.for;kg=Bo("react.element"),eV=Bo("react.portal"),un.Fragment=Bo("react.fragment"),un.StrictMode=Bo("react.strict_mode"),un.Profiler=Bo("react.profiler"),tV=Bo("react.provider"),rV=Bo("react.context"),nV=Bo("react.forward_ref"),un.Suspense=Bo("react.suspense"),iV=Bo("react.memo"),aV=Bo("react.lazy")}var A$=typeof Symbol=="function"&&Symbol.iterator;function Ooe(t){return t===null||typeof t!="object"?null:(t=A$&&t[A$]||t["@@iterator"],typeof t=="function"?t:null)}function Kb(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sV={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oV={};function Lg(t,e,r){this.props=t,this.context=e,this.refs=oV,this.updater=r||sV}Lg.prototype.isReactComponent={};Lg.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error(Kb(85));this.updater.enqueueSetState(this,t,e,"setState")};Lg.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function cV(){}cV.prototype=Lg.prototype;function _N(t,e,r){this.props=t,this.context=e,this.refs=oV,this.updater=r||sV}var EN=_N.prototype=new cV;EN.constructor=_N;wN(EN,Lg.prototype);EN.isPureReactComponent=!0;var xN={current:null},uV=Object.prototype.hasOwnProperty,lV={key:!0,ref:!0,__self:!0,__source:!0};function fV(t,e,r){var n,i={},a=null,s=null;if(e!=null)for(n in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(a=""+e.key),e)uV.call(e,n)&&!lV.hasOwnProperty(n)&&(i[n]=e[n]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];i.children=c}if(t&&t.defaultProps)for(n in o=t.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return{$$typeof:kg,type:t,key:a,ref:s,props:i,_owner:xN.current}}function Poe(t,e){return{$$typeof:kg,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function AN(t){return typeof t=="object"&&t!==null&&t.$$typeof===kg}function Toe(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var S$=/\/+/g;function oS(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Toe(""+t.key):e.toString(36)}function l_(t,e,r,n,i){var a=typeof t;(a==="undefined"||a==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(a){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case kg:case eV:s=!0}}if(s)return s=t,i=i(s),t=n===""?"."+oS(s,0):n,Array.isArray(i)?(r="",t!=null&&(r=t.replace(S$,"$&/")+"/"),l_(i,e,r,"",function(u){return u})):i!=null&&(AN(i)&&(i=Poe(i,r+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(S$,"$&/")+"/")+t)),e.push(i)),1;if(s=0,n=n===""?".":n+":",Array.isArray(t))for(var o=0;o<t.length;o++){a=t[o];var c=n+oS(a,o);s+=l_(a,e,r,c,i)}else if(c=Ooe(t),typeof c=="function")for(t=c.call(t),o=0;!(a=t.next()).done;)a=a.value,c=n+oS(a,o++),s+=l_(a,e,r,c,i);else if(a==="object")throw e=""+t,Error(Kb(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e));return s}function hw(t,e,r){if(t==null)return t;var n=[],i=0;return l_(t,n,"","",function(a){return e.call(r,a,i++)}),n}function Coe(t){if(t._status===-1){var e=t._result;e=e(),t._status=0,t._result=e,e.then(function(r){t._status===0&&(r=r.default,t._status=1,t._result=r)},function(r){t._status===0&&(t._status=2,t._result=r)})}if(t._status===1)return t._result;throw t._result}var dV={current:null};function il(){var t=dV.current;if(t===null)throw Error(Kb(321));return t}var Roe={ReactCurrentDispatcher:dV,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:xN,IsSomeRendererActing:{current:!1},assign:wN};un.Children={map:hw,forEach:function(t,e,r){hw(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return hw(t,function(){e++}),e},toArray:function(t){return hw(t,function(e){return e})||[]},only:function(t){if(!AN(t))throw Error(Kb(143));return t}};un.Component=Lg;un.PureComponent=_N;un.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Roe;un.cloneElement=function(t,e,r){if(t==null)throw Error(Kb(267,t));var n=wN({},t.props),i=t.key,a=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(a=e.ref,s=xN.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var o=t.type.defaultProps;for(c in e)uV.call(e,c)&&!lV.hasOwnProperty(c)&&(n[c]=e[c]===void 0&&o!==void 0?o[c]:e[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){o=Array(c);for(var u=0;u<c;u++)o[u]=arguments[u+2];n.children=o}return{$$typeof:kg,type:t.type,key:i,ref:a,props:n,_owner:s}};un.createContext=function(t,e){return e===void 0&&(e=null),t={$$typeof:rV,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider={$$typeof:tV,_context:t},t.Consumer=t};un.createElement=fV;un.createFactory=function(t){var e=fV.bind(null,t);return e.type=t,e};un.createRef=function(){return{current:null}};un.forwardRef=function(t){return{$$typeof:nV,render:t}};un.isValidElement=AN;un.lazy=function(t){return{$$typeof:aV,_payload:{_status:-1,_result:t},_init:Coe}};un.memo=function(t,e){return{$$typeof:iV,type:t,compare:e===void 0?null:e}};un.useCallback=function(t,e){return il().useCallback(t,e)};un.useContext=function(t,e){return il().useContext(t,e)};un.useDebugValue=function(){};un.useEffect=function(t,e){return il().useEffect(t,e)};un.useImperativeHandle=function(t,e,r){return il().useImperativeHandle(t,e,r)};un.useLayoutEffect=function(t,e){return il().useLayoutEffect(t,e)};un.useMemo=function(t,e){return il().useMemo(t,e)};un.useReducer=function(t,e,r){return il().useReducer(t,e,r)};un.useRef=function(t){return il().useRef(t)};un.useState=function(t){return il().useState(t)};un.version="17.0.2";Zz.exports=un;var Ze=Zz.exports;const hV=Df(Ze),Noe=Eoe({__proto__:null,default:hV},[Ze]);/** @license React v17.0.2
13
+ * react-jsx-runtime.production.min.js
14
+ *
15
+ * Copyright (c) Facebook, Inc. and its affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */var Doe=Ze,pV=60103;Gb.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var I$=Symbol.for;pV=I$("react.element"),Gb.Fragment=I$("react.fragment")}var Moe=Doe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$oe=Object.prototype.hasOwnProperty,koe={key:!0,ref:!0,__self:!0,__source:!0};function gV(t,e,r){var n,i={},a=null,s=null;r!==void 0&&(a=""+r),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)$oe.call(e,n)&&!koe.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:pV,type:t,key:a,ref:s,props:i,_owner:Moe.current}}Gb.jsx=gV;Gb.jsxs=gV;Jz.exports=Gb;var ft=Jz.exports;var mV={exports:{}},Co={},yV={exports:{}},vV={};/** @license React v0.20.2
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */(function(t){var e,r,n,i;if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();t.unstable_now=function(){return s.now()-o}}if(typeof window>"u"||typeof MessageChannel!="function"){var c=null,u=null,f=function(){if(c!==null)try{var M=t.unstable_now();c(!0,M),c=null}catch(q){throw setTimeout(f,0),q}};e=function(M){c!==null?setTimeout(e,0,M):(c=M,setTimeout(f,0))},r=function(M,q){u=setTimeout(M,q)},n=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var h=window.setTimeout,m=window.clearTimeout;if(typeof console<"u"){var y=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof y!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var w=!1,v=null,g=-1,_=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},i=function(){},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<M?Math.floor(1e3/M):5};var S=new MessageChannel,A=S.port2;S.port1.onmessage=function(){if(v!==null){var M=t.unstable_now();b=M+_;try{v(!0,M)?A.postMessage(null):(w=!1,v=null)}catch(q){throw A.postMessage(null),q}}else w=!1},e=function(M){v=M,w||(w=!0,A.postMessage(null))},r=function(M,q){g=h(function(){M(t.unstable_now())},q)},n=function(){m(g),g=-1}}function I(M,q){var k=M.length;M.push(q);e:for(;;){var $=k-1>>>1,G=M[$];if(G!==void 0&&0<O(G,q))M[$]=q,M[k]=G,k=$;else break e}}function E(M){return M=M[0],M===void 0?null:M}function p(M){var q=M[0];if(q!==void 0){var k=M.pop();if(k!==q){M[0]=k;e:for(var $=0,G=M.length;$<G;){var pe=2*($+1)-1,Y=M[pe],te=pe+1,ce=M[te];if(Y!==void 0&&0>O(Y,k))ce!==void 0&&0>O(ce,Y)?(M[$]=ce,M[te]=k,$=te):(M[$]=Y,M[pe]=k,$=pe);else if(ce!==void 0&&0>O(ce,k))M[$]=ce,M[te]=k,$=te;else break e}}return q}return null}function O(M,q){var k=M.sortIndex-q.sortIndex;return k!==0?k:M.id-q.id}var N=[],F=[],V=1,de=null,ve=3,U=!1,L=!1,Q=!1;function ne(M){for(var q=E(F);q!==null;){if(q.callback===null)p(F);else if(q.startTime<=M)p(F),q.sortIndex=q.expirationTime,I(N,q);else break;q=E(F)}}function j(M){if(Q=!1,ne(M),!L)if(E(N)!==null)L=!0,e(B);else{var q=E(F);q!==null&&r(j,q.startTime-M)}}function B(M,q){L=!1,Q&&(Q=!1,n()),U=!0;var k=ve;try{for(ne(q),de=E(N);de!==null&&(!(de.expirationTime>q)||M&&!t.unstable_shouldYield());){var $=de.callback;if(typeof $=="function"){de.callback=null,ve=de.priorityLevel;var G=$(de.expirationTime<=q);q=t.unstable_now(),typeof G=="function"?de.callback=G:de===E(N)&&p(N),ne(q)}else p(N);de=E(N)}if(de!==null)var pe=!0;else{var Y=E(F);Y!==null&&r(j,Y.startTime-q),pe=!1}return pe}finally{de=null,ve=k,U=!1}}var H=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_continueExecution=function(){L||U||(L=!0,e(B))},t.unstable_getCurrentPriorityLevel=function(){return ve},t.unstable_getFirstCallbackNode=function(){return E(N)},t.unstable_next=function(M){switch(ve){case 1:case 2:case 3:var q=3;break;default:q=ve}var k=ve;ve=q;try{return M()}finally{ve=k}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=H,t.unstable_runWithPriority=function(M,q){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var k=ve;ve=M;try{return q()}finally{ve=k}},t.unstable_scheduleCallback=function(M,q,k){var $=t.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?$+k:$):k=$,M){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=k+G,M={id:V++,callback:q,priorityLevel:M,startTime:k,expirationTime:G,sortIndex:-1},k>$?(M.sortIndex=k,I(F,M),E(N)===null&&M===E(F)&&(Q?n():Q=!0,r(j,k-$))):(M.sortIndex=G,I(N,M),L||U||(L=!0,e(B))),M},t.unstable_wrapCallback=function(M){var q=ve;return function(){var k=ve;ve=q;try{return M.apply(this,arguments)}finally{ve=k}}}})(vV);yV.exports=vV;var Loe=yV.exports;/** @license React v17.0.2
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var fx=Ze,Jn=Xz,Hi=Loe;function bt(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!fx)throw Error(bt(227));var bV=new Set,$v={};function Ch(t,e){lg(t,e),lg(t+"Capture",e)}function lg(t,e){for($v[t]=e,t=0;t<e.length;t++)bV.add(e[t])}var Xu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),joe=/^[: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]*$/,O$=Object.prototype.hasOwnProperty,P$={},T$={};function Uoe(t){return O$.call(T$,t)?!0:O$.call(P$,t)?!1:joe.test(t)?T$[t]=!0:(P$[t]=!0,!1)}function Foe(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Boe(t,e,r,n){if(e===null||typeof e>"u"||Foe(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ja(t,e,r,n,i,a,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=s}var ca={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ca[t]=new Ja(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ca[e]=new Ja(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ca[t]=new Ja(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ca[t]=new Ja(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){ca[t]=new Ja(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ca[t]=new Ja(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ca[t]=new Ja(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ca[t]=new Ja(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ca[t]=new Ja(t,5,!1,t.toLowerCase(),null,!1,!1)});var SN=/[\-:]([a-z])/g;function IN(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(SN,IN);ca[e]=new Ja(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(SN,IN);ca[e]=new Ja(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(SN,IN);ca[e]=new Ja(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ca[t]=new Ja(t,1,!1,t.toLowerCase(),null,!1,!1)});ca.xlinkHref=new Ja("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ca[t]=new Ja(t,1,!1,t.toLowerCase(),null,!0,!0)});function ON(t,e,r,n){var i=ca.hasOwnProperty(e)?ca[e]:null,a=i!==null?i.type===0:n?!1:!(!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N");a||(Boe(e,r,i,n)&&(r=null),n||i===null?Uoe(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var Rh=fx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fy=60103,Nd=60106,Bl=60107,PN=60108,ov=60114,TN=60109,CN=60110,dx=60112,cv=60113,Q_=60120,hx=60115,RN=60116,NN=60121,DN=60128,wV=60129,MN=60130,lC=60131;if(typeof Symbol=="function"&&Symbol.for){var Ui=Symbol.for;Fy=Ui("react.element"),Nd=Ui("react.portal"),Bl=Ui("react.fragment"),PN=Ui("react.strict_mode"),ov=Ui("react.profiler"),TN=Ui("react.provider"),CN=Ui("react.context"),dx=Ui("react.forward_ref"),cv=Ui("react.suspense"),Q_=Ui("react.suspense_list"),hx=Ui("react.memo"),RN=Ui("react.lazy"),NN=Ui("react.block"),Ui("react.scope"),DN=Ui("react.opaque.id"),wV=Ui("react.debug_trace_mode"),MN=Ui("react.offscreen"),lC=Ui("react.legacy_hidden")}var C$=typeof Symbol=="function"&&Symbol.iterator;function xm(t){return t===null||typeof t!="object"?null:(t=C$&&t[C$]||t["@@iterator"],typeof t=="function"?t:null)}var cS;function By(t){if(cS===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);cS=e&&e[1]||""}return`
34
+ `+cS+t}var uS=!1;function pw(t,e){if(!t||uS)return"";uS=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){n=c}t.call(e.prototype)}else{try{throw Error()}catch(c){n=c}t()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
+ `),a=n.stack.split(`
36
+ `),s=i.length-1,o=a.length-1;1<=s&&0<=o&&i[s]!==a[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==a[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==a[o])return`
37
+ `+i[s].replace(" at new "," at ");while(1<=s&&0<=o);break}}}finally{uS=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?By(t):""}function qoe(t){switch(t.tag){case 5:return By(t.type);case 16:return By("Lazy");case 13:return By("Suspense");case 19:return By("SuspenseList");case 0:case 2:case 15:return t=pw(t.type,!1),t;case 11:return t=pw(t.type.render,!1),t;case 22:return t=pw(t.type._render,!1),t;case 1:return t=pw(t.type,!0),t;default:return""}}function e0(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Bl:return"Fragment";case Nd:return"Portal";case ov:return"Profiler";case PN:return"StrictMode";case cv:return"Suspense";case Q_:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case CN:return(t.displayName||"Context")+".Consumer";case TN:return(t._context.displayName||"Context")+".Provider";case dx:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case hx:return e0(t.type);case NN:return e0(t._render);case RN:e=t._payload,t=t._init;try{return e0(t(e))}catch{}}return null}function Ef(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function _V(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Hoe(t){var e=_V(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,a.call(this,s)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function gw(t){t._valueTracker||(t._valueTracker=Hoe(t))}function EV(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=_V(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Y_(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function fC(t,e){var r=e.checked;return Jn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function R$(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Ef(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function xV(t,e){e=e.checked,e!=null&&ON(t,"checked",e,!1)}function dC(t,e){xV(t,e);var r=Ef(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?hC(t,e.type,r):e.hasOwnProperty("defaultValue")&&hC(t,e.type,Ef(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function N$(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function hC(t,e,r){(e!=="number"||Y_(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}function zoe(t){var e="";return fx.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function pC(t,e){return t=Jn({children:void 0},e),(e=zoe(e.children))&&(t.children=e),t}function t0(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+Ef(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function gC(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(bt(91));return Jn({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function D$(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(bt(92));if(Array.isArray(r)){if(!(1>=r.length))throw Error(bt(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:Ef(r)}}function AV(t,e){var r=Ef(e.value),n=Ef(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function M$(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}var mC={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function SV(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 yC(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?SV(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var mw,IV=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!==mC.svg||"innerHTML"in t)t.innerHTML=e;else{for(mw=mw||document.createElement("div"),mw.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=mw.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function kv(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var uv={animationIterationCount:!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},Voe=["Webkit","ms","Moz","O"];Object.keys(uv).forEach(function(t){Voe.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),uv[e]=uv[t]})});function OV(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||uv.hasOwnProperty(t)&&uv[t]?(""+e).trim():e+"px"}function PV(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=OV(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var Goe=Jn({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 vC(t,e){if(e){if(Goe[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(bt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(bt(60));if(!(typeof e.dangerouslySetInnerHTML=="object"&&"__html"in e.dangerouslySetInnerHTML))throw Error(bt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(bt(62))}}function bC(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";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}}function $N(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var wC=null,r0=null,n0=null;function $$(t){if(t=Qb(t)){if(typeof wC!="function")throw Error(bt(280));var e=t.stateNode;e&&(e=bx(e),wC(t.stateNode,t.type,e))}}function TV(t){r0?n0?n0.push(t):n0=[t]:r0=t}function CV(){if(r0){var t=r0,e=n0;if(n0=r0=null,$$(t),e)for(t=0;t<e.length;t++)$$(e[t])}}function kN(t,e){return t(e)}function RV(t,e,r,n,i){return t(e,r,n,i)}function LN(){}var NV=kN,Dd=!1,lS=!1;function jN(){(r0!==null||n0!==null)&&(LN(),CV())}function Koe(t,e,r){if(lS)return t(e,r);lS=!0;try{return NV(t,e,r)}finally{lS=!1,jN()}}function Lv(t,e){var r=t.stateNode;if(r===null)return null;var n=bx(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(bt(231,e,typeof r));return r}var _C=!1;if(Xu)try{var Am={};Object.defineProperty(Am,"passive",{get:function(){_C=!0}}),window.addEventListener("test",Am,Am),window.removeEventListener("test",Am,Am)}catch{_C=!1}function Woe(t,e,r,n,i,a,s,o,c){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(f){this.onError(f)}}var lv=!1,J_=null,X_=!1,EC=null,Qoe={onError:function(t){lv=!0,J_=t}};function Yoe(t,e,r,n,i,a,s,o,c){lv=!1,J_=null,Woe.apply(Qoe,arguments)}function Joe(t,e,r,n,i,a,s,o,c){if(Yoe.apply(this,arguments),lv){if(lv){var u=J_;lv=!1,J_=null}else throw Error(bt(198));X_||(X_=!0,EC=u)}}function Nh(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&1026&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function DV(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function k$(t){if(Nh(t)!==t)throw Error(bt(188))}function Xoe(t){var e=t.alternate;if(!e){if(e=Nh(t),e===null)throw Error(bt(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return k$(i),t;if(a===n)return k$(i),e;a=a.sibling}throw Error(bt(188))}if(r.return!==n.return)r=i,n=a;else{for(var s=!1,o=i.child;o;){if(o===r){s=!0,r=i,n=a;break}if(o===n){s=!0,n=i,r=a;break}o=o.sibling}if(!s){for(o=a.child;o;){if(o===r){s=!0,r=a,n=i;break}if(o===n){s=!0,n=a,r=i;break}o=o.sibling}if(!s)throw Error(bt(189))}}if(r.alternate!==n)throw Error(bt(190))}if(r.tag!==3)throw Error(bt(188));return r.stateNode.current===r?t:e}function MV(t){if(t=Xoe(t),!t)return null;for(var e=t;;){if(e.tag===5||e.tag===6)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function L$(t,e){for(var r=t.alternate;e!==null;){if(e===t||e===r)return!0;e=e.return}return!1}var $V,UN,kV,LV,xC=!1,jc=[],ff=null,df=null,hf=null,jv=new Map,Uv=new Map,Sm=[],j$="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 AC(t,e,r,n,i){return{blockedOn:t,domEventName:e,eventSystemFlags:r|16,nativeEvent:i,targetContainers:[n]}}function U$(t,e){switch(t){case"focusin":case"focusout":ff=null;break;case"dragenter":case"dragleave":df=null;break;case"mouseover":case"mouseout":hf=null;break;case"pointerover":case"pointerout":jv.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uv.delete(e.pointerId)}}function Im(t,e,r,n,i,a){return t===null||t.nativeEvent!==a?(t=AC(e,r,n,i,a),e!==null&&(e=Qb(e),e!==null&&UN(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function Zoe(t,e,r,n,i){switch(e){case"focusin":return ff=Im(ff,t,e,r,n,i),!0;case"dragenter":return df=Im(df,t,e,r,n,i),!0;case"mouseover":return hf=Im(hf,t,e,r,n,i),!0;case"pointerover":var a=i.pointerId;return jv.set(a,Im(jv.get(a)||null,t,e,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,Uv.set(a,Im(Uv.get(a)||null,t,e,r,n,i)),!0}return!1}function ece(t){var e=Md(t.target);if(e!==null){var r=Nh(e);if(r!==null){if(e=r.tag,e===13){if(e=DV(r),e!==null){t.blockedOn=e,LV(t.lanePriority,function(){Hi.unstable_runWithPriority(t.priority,function(){kV(r)})});return}}else if(e===3&&r.stateNode.hydrate){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function f_(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=HN(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null)return e=Qb(r),e!==null&&UN(e),t.blockedOn=r,!1;e.shift()}return!0}function F$(t,e,r){f_(t)&&r.delete(e)}function tce(){for(xC=!1;0<jc.length;){var t=jc[0];if(t.blockedOn!==null){t=Qb(t.blockedOn),t!==null&&$V(t);break}for(var e=t.targetContainers;0<e.length;){var r=HN(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null){t.blockedOn=r;break}e.shift()}t.blockedOn===null&&jc.shift()}ff!==null&&f_(ff)&&(ff=null),df!==null&&f_(df)&&(df=null),hf!==null&&f_(hf)&&(hf=null),jv.forEach(F$),Uv.forEach(F$)}function Om(t,e){t.blockedOn===e&&(t.blockedOn=null,xC||(xC=!0,Hi.unstable_scheduleCallback(Hi.unstable_NormalPriority,tce)))}function jV(t){function e(i){return Om(i,t)}if(0<jc.length){Om(jc[0],t);for(var r=1;r<jc.length;r++){var n=jc[r];n.blockedOn===t&&(n.blockedOn=null)}}for(ff!==null&&Om(ff,t),df!==null&&Om(df,t),hf!==null&&Om(hf,t),jv.forEach(e),Uv.forEach(e),r=0;r<Sm.length;r++)n=Sm[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Sm.length&&(r=Sm[0],r.blockedOn===null);)ece(r),r.blockedOn===null&&Sm.shift()}function yw(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var jp={animationend:yw("Animation","AnimationEnd"),animationiteration:yw("Animation","AnimationIteration"),animationstart:yw("Animation","AnimationStart"),transitionend:yw("Transition","TransitionEnd")},fS={},UV={};Xu&&(UV=document.createElement("div").style,"AnimationEvent"in window||(delete jp.animationend.animation,delete jp.animationiteration.animation,delete jp.animationstart.animation),"TransitionEvent"in window||delete jp.transitionend.transition);function px(t){if(fS[t])return fS[t];if(!jp[t])return t;var e=jp[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in UV)return fS[t]=e[r];return t}var FV=px("animationend"),BV=px("animationiteration"),qV=px("animationstart"),HV=px("transitionend"),zV=new Map,FN=new Map,rce=["abort","abort",FV,"animationEnd",BV,"animationIteration",qV,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",HV,"transitionEnd","waiting","waiting"];function BN(t,e){for(var r=0;r<t.length;r+=2){var n=t[r],i=t[r+1];i="on"+(i[0].toUpperCase()+i.slice(1)),FN.set(n,e),zV.set(n,i),Ch(i,[n])}}var nce=Hi.unstable_now;nce();var Ln=8;function Pp(t){if(1&t)return Ln=15,1;if(2&t)return Ln=14,2;if(4&t)return Ln=13,4;var e=24&t;return e!==0?(Ln=12,e):t&32?(Ln=11,32):(e=192&t,e!==0?(Ln=10,e):t&256?(Ln=9,256):(e=3584&t,e!==0?(Ln=8,e):t&4096?(Ln=7,4096):(e=4186112&t,e!==0?(Ln=6,e):(e=62914560&t,e!==0?(Ln=5,e):t&67108864?(Ln=4,67108864):t&134217728?(Ln=3,134217728):(e=805306368&t,e!==0?(Ln=2,e):1073741824&t?(Ln=1,1073741824):(Ln=8,t))))))}function ice(t){switch(t){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function ace(t){switch(t){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(bt(358,t))}}function Fv(t,e){var r=t.pendingLanes;if(r===0)return Ln=0;var n=0,i=0,a=t.expiredLanes,s=t.suspendedLanes,o=t.pingedLanes;if(a!==0)n=a,i=Ln=15;else if(a=r&134217727,a!==0){var c=a&~s;c!==0?(n=Pp(c),i=Ln):(o&=a,o!==0&&(n=Pp(o),i=Ln))}else a=r&~s,a!==0?(n=Pp(a),i=Ln):o!==0&&(n=Pp(o),i=Ln);if(n===0)return 0;if(n=31-xf(n),n=r&((0>n?0:1<<n)<<1)-1,e!==0&&e!==n&&!(e&s)){if(Pp(e),i<=Ln)return e;Ln=i}if(e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-xf(e),i=1<<r,n|=t[r],e&=~i;return n}function VV(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Z_(t,e){switch(t){case 15:return 1;case 14:return 2;case 12:return t=Tp(24&~e),t===0?Z_(10,e):t;case 10:return t=Tp(192&~e),t===0?Z_(8,e):t;case 8:return t=Tp(3584&~e),t===0&&(t=Tp(4186112&~e),t===0&&(t=512)),t;case 2:return e=Tp(805306368&~e),e===0&&(e=268435456),e}throw Error(bt(358,t))}function Tp(t){return t&-t}function dS(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function gx(t,e,r){t.pendingLanes|=e;var n=e-1;t.suspendedLanes&=n,t.pingedLanes&=n,t=t.eventTimes,e=31-xf(e),t[e]=r}var xf=Math.clz32?Math.clz32:cce,sce=Math.log,oce=Math.LN2;function cce(t){return t===0?32:31-(sce(t)/oce|0)|0}var uce=Hi.unstable_UserBlockingPriority,lce=Hi.unstable_runWithPriority,d_=!0;function fce(t,e,r,n){Dd||LN();var i=qN,a=Dd;Dd=!0;try{RV(i,t,e,r,n)}finally{(Dd=a)||jN()}}function dce(t,e,r,n){lce(uce,qN.bind(null,t,e,r,n))}function qN(t,e,r,n){if(d_){var i;if((i=(e&4)===0)&&0<jc.length&&-1<j$.indexOf(t))t=AC(null,t,e,r,n),jc.push(t);else{var a=HN(t,e,r,n);if(a===null)i&&U$(t,n);else{if(i){if(-1<j$.indexOf(t)){t=AC(a,t,e,r,n),jc.push(t);return}if(Zoe(a,t,e,r,n))return;U$(t,n)}iG(t,e,n,null,r)}}}}function HN(t,e,r,n){var i=$N(n);if(i=Md(i),i!==null){var a=Nh(i);if(a===null)i=null;else{var s=a.tag;if(s===13){if(i=DV(a),i!==null)return i;i=null}else if(s===3){if(a.stateNode.hydrate)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return iG(t,e,n,i,r),null}var nf=null,zN=null,h_=null;function GV(){if(h_)return h_;var t,e=zN,r=e.length,n,i="value"in nf?nf.value:nf.textContent,a=i.length;for(t=0;t<r&&e[t]===i[t];t++);var s=r-t;for(n=1;n<=s&&e[r-n]===i[a-n];n++);return h_=i.slice(t,1<n?1-n:void 0)}function p_(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function vw(){return!0}function B$(){return!1}function Us(t){function e(r,n,i,a,s){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=s,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(r=t[o],this[o]=r?r(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?vw:B$,this.isPropagationStopped=B$,this}return Jn(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=vw)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=vw)},persist:function(){},isPersistent:vw}),e}var jg={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},VN=Us(jg),Wb=Jn({},jg,{view:0,detail:0}),hce=Us(Wb),hS,pS,Pm,mx=Jn({},Wb,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:GN,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Pm&&(Pm&&t.type==="mousemove"?(hS=t.screenX-Pm.screenX,pS=t.screenY-Pm.screenY):pS=hS=0,Pm=t),hS)},movementY:function(t){return"movementY"in t?t.movementY:pS}}),q$=Us(mx),pce=Jn({},mx,{dataTransfer:0}),gce=Us(pce),mce=Jn({},Wb,{relatedTarget:0}),gS=Us(mce),yce=Jn({},jg,{animationName:0,elapsedTime:0,pseudoElement:0}),vce=Us(yce),bce=Jn({},jg,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),wce=Us(bce),_ce=Jn({},jg,{data:0}),H$=Us(_ce),Ece={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xce={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"},Ace={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sce(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Ace[t])?!!e[t]:!1}function GN(){return Sce}var Ice=Jn({},Wb,{key:function(t){if(t.key){var e=Ece[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=p_(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?xce[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:GN,charCode:function(t){return t.type==="keypress"?p_(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?p_(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Oce=Us(Ice),Pce=Jn({},mx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),z$=Us(Pce),Tce=Jn({},Wb,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:GN}),Cce=Us(Tce),Rce=Jn({},jg,{propertyName:0,elapsedTime:0,pseudoElement:0}),Nce=Us(Rce),Dce=Jn({},mx,{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}),Mce=Us(Dce),$ce=[9,13,27,32],KN=Xu&&"CompositionEvent"in window,fv=null;Xu&&"documentMode"in document&&(fv=document.documentMode);var kce=Xu&&"TextEvent"in window&&!fv,KV=Xu&&(!KN||fv&&8<fv&&11>=fv),V$=String.fromCharCode(32),G$=!1;function WV(t,e){switch(t){case"keyup":return $ce.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QV(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Up=!1;function Lce(t,e){switch(t){case"compositionend":return QV(e);case"keypress":return e.which!==32?null:(G$=!0,V$);case"textInput":return t=e.data,t===V$&&G$?null:t;default:return null}}function jce(t,e){if(Up)return t==="compositionend"||!KN&&WV(t,e)?(t=GV(),h_=zN=nf=null,Up=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return KV&&e.locale!=="ko"?null:e.data;default:return null}}var Uce={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 K$(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Uce[t.type]:e==="textarea"}function YV(t,e,r,n){TV(n),e=eE(e,"onChange"),0<e.length&&(r=new VN("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var dv=null,Bv=null;function Fce(t){tG(t,0)}function yx(t){var e=Bp(t);if(EV(e))return t}function Bce(t,e){if(t==="change")return e}var JV=!1;if(Xu){var mS;if(Xu){var yS="oninput"in document;if(!yS){var W$=document.createElement("div");W$.setAttribute("oninput","return;"),yS=typeof W$.oninput=="function"}mS=yS}else mS=!1;JV=mS&&(!document.documentMode||9<document.documentMode)}function Q$(){dv&&(dv.detachEvent("onpropertychange",XV),Bv=dv=null)}function XV(t){if(t.propertyName==="value"&&yx(Bv)){var e=[];if(YV(e,Bv,t,$N(t)),t=Fce,Dd)t(e);else{Dd=!0;try{kN(t,e)}finally{Dd=!1,jN()}}}}function qce(t,e,r){t==="focusin"?(Q$(),dv=e,Bv=r,dv.attachEvent("onpropertychange",XV)):t==="focusout"&&Q$()}function Hce(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return yx(Bv)}function zce(t,e){if(t==="click")return yx(e)}function Vce(t,e){if(t==="input"||t==="change")return yx(e)}function Gce(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var yo=typeof Object.is=="function"?Object.is:Gce,Kce=Object.prototype.hasOwnProperty;function qv(t,e){if(yo(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++)if(!Kce.call(e,r[n])||!yo(t[r[n]],e[r[n]]))return!1;return!0}function Y$(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function J$(t,e){var r=Y$(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Y$(r)}}function ZV(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?ZV(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function X$(){for(var t=window,e=Y_();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Y_(t.document)}return e}function SC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Wce=Xu&&"documentMode"in document&&11>=document.documentMode,Fp=null,IC=null,hv=null,OC=!1;function Z$(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;OC||Fp==null||Fp!==Y_(n)||(n=Fp,"selectionStart"in n&&SC(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),hv&&qv(hv,n)||(hv=n,n=eE(IC,"onSelect"),0<n.length&&(e=new VN("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Fp)))}BN("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);BN("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);BN(rce,2);for(var ek="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),vS=0;vS<ek.length;vS++)FN.set(ek[vS],0);lg("onMouseEnter",["mouseout","mouseover"]);lg("onMouseLeave",["mouseout","mouseover"]);lg("onPointerEnter",["pointerout","pointerover"]);lg("onPointerLeave",["pointerout","pointerover"]);Ch("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ch("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ch("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ch("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ch("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ch("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qy="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eG=new Set("cancel close invalid load scroll toggle".split(" ").concat(qy));function tk(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,Joe(n,e,void 0,t),t.currentTarget=null}function tG(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var a=void 0;if(e)for(var s=n.length-1;0<=s;s--){var o=n[s],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==a&&i.isPropagationStopped())break e;tk(i,o,u),a=c}else for(s=0;s<n.length;s++){if(o=n[s],c=o.instance,u=o.currentTarget,o=o.listener,c!==a&&i.isPropagationStopped())break e;tk(i,o,u),a=c}}}if(X_)throw t=EC,X_=!1,EC=null,t}function Hn(t,e){var r=sG(e),n=t+"__bubble";r.has(n)||(nG(e,t,2,!1),r.add(n))}var rk="_reactListening"+Math.random().toString(36).slice(2);function rG(t){t[rk]||(t[rk]=!0,bV.forEach(function(e){eG.has(e)||nk(e,!1,t,null),nk(e,!0,t,null)}))}function nk(t,e,r,n){var i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,a=r;if(t==="selectionchange"&&r.nodeType!==9&&(a=r.ownerDocument),n!==null&&!e&&eG.has(t)){if(t!=="scroll")return;i|=2,a=n}var s=sG(a),o=t+"__"+(e?"capture":"bubble");s.has(o)||(e&&(i|=4),nG(a,t,i,e),s.add(o))}function nG(t,e,r,n){var i=FN.get(e);switch(i===void 0?2:i){case 0:i=fce;break;case 1:i=dce;break;default:i=qN}r=i.bind(null,e,r,t),i=void 0,!_C||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function iG(t,e,r,n,i){var a=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var o=n.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=n.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;s=s.return}for(;o!==null;){if(s=Md(o),s===null)return;if(c=s.tag,c===5||c===6){n=a=s;continue e}o=o.parentNode}}n=n.return}Koe(function(){var u=a,f=$N(r),h=[];e:{var m=zV.get(t);if(m!==void 0){var y=VN,w=t;switch(t){case"keypress":if(p_(r)===0)break e;case"keydown":case"keyup":y=Oce;break;case"focusin":w="focus",y=gS;break;case"focusout":w="blur",y=gS;break;case"beforeblur":case"afterblur":y=gS;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=q$;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=gce;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Cce;break;case FV:case BV:case qV:y=vce;break;case HV:y=Nce;break;case"scroll":y=hce;break;case"wheel":y=Mce;break;case"copy":case"cut":case"paste":y=wce;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=z$}var v=(e&4)!==0,g=!v&&t==="scroll",_=v?m!==null?m+"Capture":null:m;v=[];for(var b=u,S;b!==null;){S=b;var A=S.stateNode;if(S.tag===5&&A!==null&&(S=A,_!==null&&(A=Lv(b,_),A!=null&&v.push(Hv(b,A,S)))),g)break;b=b.return}0<v.length&&(m=new y(m,w,null,r,f),h.push({event:m,listeners:v}))}}if(!(e&7)){e:{if(m=t==="mouseover"||t==="pointerover",y=t==="mouseout"||t==="pointerout",m&&!(e&16)&&(w=r.relatedTarget||r.fromElement)&&(Md(w)||w[Ug]))break e;if((y||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,y?(w=r.relatedTarget||r.toElement,y=u,w=w?Md(w):null,w!==null&&(g=Nh(w),w!==g||w.tag!==5&&w.tag!==6)&&(w=null)):(y=null,w=u),y!==w)){if(v=q$,A="onMouseLeave",_="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(v=z$,A="onPointerLeave",_="onPointerEnter",b="pointer"),g=y==null?m:Bp(y),S=w==null?m:Bp(w),m=new v(A,b+"leave",y,r,f),m.target=g,m.relatedTarget=S,A=null,Md(f)===u&&(v=new v(_,b+"enter",w,r,f),v.target=S,v.relatedTarget=g,A=v),g=A,y&&w)t:{for(v=y,_=w,b=0,S=v;S;S=pp(S))b++;for(S=0,A=_;A;A=pp(A))S++;for(;0<b-S;)v=pp(v),b--;for(;0<S-b;)_=pp(_),S--;for(;b--;){if(v===_||_!==null&&v===_.alternate)break t;v=pp(v),_=pp(_)}v=null}else v=null;y!==null&&ik(h,m,y,v,!1),w!==null&&g!==null&&ik(h,g,w,v,!0)}}e:{if(m=u?Bp(u):window,y=m.nodeName&&m.nodeName.toLowerCase(),y==="select"||y==="input"&&m.type==="file")var I=Bce;else if(K$(m))if(JV)I=Vce;else{I=Hce;var E=qce}else(y=m.nodeName)&&y.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(I=zce);if(I&&(I=I(t,u))){YV(h,I,r,f);break e}E&&E(t,m,u),t==="focusout"&&(E=m._wrapperState)&&E.controlled&&m.type==="number"&&hC(m,"number",m.value)}switch(E=u?Bp(u):window,t){case"focusin":(K$(E)||E.contentEditable==="true")&&(Fp=E,IC=u,hv=null);break;case"focusout":hv=IC=Fp=null;break;case"mousedown":OC=!0;break;case"contextmenu":case"mouseup":case"dragend":OC=!1,Z$(h,r,f);break;case"selectionchange":if(Wce)break;case"keydown":case"keyup":Z$(h,r,f)}var p;if(KN)e:{switch(t){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else Up?WV(t,r)&&(O="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(O="onCompositionStart");O&&(KV&&r.locale!=="ko"&&(Up||O!=="onCompositionStart"?O==="onCompositionEnd"&&Up&&(p=GV()):(nf=f,zN="value"in nf?nf.value:nf.textContent,Up=!0)),E=eE(u,O),0<E.length&&(O=new H$(O,t,null,r,f),h.push({event:O,listeners:E}),p?O.data=p:(p=QV(r),p!==null&&(O.data=p)))),(p=kce?Lce(t,r):jce(t,r))&&(u=eE(u,"onBeforeInput"),0<u.length&&(f=new H$("onBeforeInput","beforeinput",null,r,f),h.push({event:f,listeners:u}),f.data=p))}tG(h,e)})}function Hv(t,e,r){return{instance:t,listener:e,currentTarget:r}}function eE(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Lv(t,r),a!=null&&n.unshift(Hv(t,a,i)),a=Lv(t,e),a!=null&&n.push(Hv(t,a,i))),t=t.return}return n}function pp(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function ik(t,e,r,n,i){for(var a=e._reactName,s=[];r!==null&&r!==n;){var o=r,c=o.alternate,u=o.stateNode;if(c!==null&&c===n)break;o.tag===5&&u!==null&&(o=u,i?(c=Lv(r,a),c!=null&&s.unshift(Hv(r,c,o))):i||(c=Lv(r,a),c!=null&&s.push(Hv(r,c,o)))),r=r.return}s.length!==0&&t.push({event:e,listeners:s})}function tE(){}var bS=null,wS=null;function aG(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function PC(t,e){return t==="textarea"||t==="option"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var ak=typeof setTimeout=="function"?setTimeout:void 0,Qce=typeof clearTimeout=="function"?clearTimeout:void 0;function WN(t){t.nodeType===1?t.textContent="":t.nodeType===9&&(t=t.body,t!=null&&(t.textContent=""))}function i0(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break}return t}function sk(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var _S=0;function Yce(t){return{$$typeof:DN,toString:t,valueOf:t}}var vx=Math.random().toString(36).slice(2),af="__reactFiber$"+vx,rE="__reactProps$"+vx,Ug="__reactContainer$"+vx,ok="__reactEvents$"+vx;function Md(t){var e=t[af];if(e)return e;for(var r=t.parentNode;r;){if(e=r[Ug]||r[af]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=sk(t);t!==null;){if(r=t[af])return r;t=sk(t)}return e}t=r,r=t.parentNode}return null}function Qb(t){return t=t[af]||t[Ug],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Bp(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(bt(33))}function bx(t){return t[rE]||null}function sG(t){var e=t[ok];return e===void 0&&(e=t[ok]=new Set),e}var TC=[],qp=-1;function Mf(t){return{current:t}}function Gn(t){0>qp||(t.current=TC[qp],TC[qp]=null,qp--)}function ui(t,e){qp++,TC[qp]=t.current,t.current=e}var Af={},Na=Mf(Af),ys=Mf(!1),mh=Af;function fg(t,e){var r=t.type.contextTypes;if(!r)return Af;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function vs(t){return t=t.childContextTypes,t!=null}function nE(){Gn(ys),Gn(Na)}function ck(t,e,r){if(Na.current!==Af)throw Error(bt(168));ui(Na,e),ui(ys,r)}function oG(t,e,r){var n=t.stateNode;if(t=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(bt(108,e0(e)||"Unknown",i));return Jn({},r,n)}function g_(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Af,mh=Na.current,ui(Na,t),ui(ys,ys.current),!0}function uk(t,e,r){var n=t.stateNode;if(!n)throw Error(bt(169));r?(t=oG(t,e,mh),n.__reactInternalMemoizedMergedChildContext=t,Gn(ys),Gn(Na),ui(Na,t)):Gn(ys),ui(ys,r)}var QN=null,lh=null,Jce=Hi.unstable_runWithPriority,YN=Hi.unstable_scheduleCallback,CC=Hi.unstable_cancelCallback,Xce=Hi.unstable_shouldYield,lk=Hi.unstable_requestPaint,RC=Hi.unstable_now,Zce=Hi.unstable_getCurrentPriorityLevel,wx=Hi.unstable_ImmediatePriority,cG=Hi.unstable_UserBlockingPriority,uG=Hi.unstable_NormalPriority,lG=Hi.unstable_LowPriority,fG=Hi.unstable_IdlePriority,ES={},eue=lk!==void 0?lk:function(){},xu=null,m_=null,xS=!1,fk=RC(),Ta=1e4>fk?RC:function(){return RC()-fk};function dg(){switch(Zce()){case wx:return 99;case cG:return 98;case uG:return 97;case lG:return 96;case fG:return 95;default:throw Error(bt(332))}}function dG(t){switch(t){case 99:return wx;case 98:return cG;case 97:return uG;case 96:return lG;case 95:return fG;default:throw Error(bt(332))}}function yh(t,e){return t=dG(t),Jce(t,e)}function zv(t,e,r){return t=dG(t),YN(t,e,r)}function Yc(){if(m_!==null){var t=m_;m_=null,CC(t)}hG()}function hG(){if(!xS&&xu!==null){xS=!0;var t=0;try{var e=xu;yh(99,function(){for(;t<e.length;t++){var r=e[t];do r=r(!0);while(r!==null)}}),xu=null}catch(r){throw xu!==null&&(xu=xu.slice(t+1)),YN(wx,Yc),r}finally{xS=!1}}}var tue=Rh.ReactCurrentBatchConfig;function Ko(t,e){if(t&&t.defaultProps){e=Jn({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}var iE=Mf(null),aE=null,Hp=null,sE=null;function JN(){sE=Hp=aE=null}function XN(t){var e=iE.current;Gn(iE),t.type._context._currentValue=e}function pG(t,e){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)===e){if(r===null||(r.childLanes&e)===e)break;r.childLanes|=e}else t.childLanes|=e,r!==null&&(r.childLanes|=e);t=t.return}}function a0(t,e){aE=t,sE=Hp=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(oc=!0),t.firstContext=null)}function Ao(t,e){if(sE!==t&&e!==!1&&e!==0)if((typeof e!="number"||e===1073741823)&&(sE=t,e=1073741823),e={context:t,observedBits:e,next:null},Hp===null){if(aE===null)throw Error(bt(308));Hp=e,aE.dependencies={lanes:0,firstContext:e,responders:null}}else Hp=Hp.next=e;return t._currentValue}var Ll=!1;function ZN(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function gG(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function pf(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function gf(t,e){if(t=t.updateQueue,t!==null){t=t.shared;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}}function dk(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=s:a=a.next=s,r=r.next}while(r!==null);a===null?i=a=e:a=a.next=e}else i=a=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Vv(t,e,r,n){var i=t.updateQueue;Ll=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var c=o,u=c.next;c.next=null,s===null?a=u:s.next=u,s=c;var f=t.alternate;if(f!==null){f=f.updateQueue;var h=f.lastBaseUpdate;h!==s&&(h===null?f.firstBaseUpdate=u:h.next=u,f.lastBaseUpdate=c)}}if(a!==null){h=i.baseState,s=0,f=u=c=null;do{o=a.lane;var m=a.eventTime;if((n&o)===o){f!==null&&(f=f.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,w=a;switch(o=e,m=r,w.tag){case 1:if(y=w.payload,typeof y=="function"){h=y.call(m,h,o);break e}h=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=w.payload,o=typeof y=="function"?y.call(m,h,o):y,o==null)break e;h=Jn({},h,o);break e;case 2:Ll=!0}}a.callback!==null&&(t.flags|=32,o=i.effects,o===null?i.effects=[a]:o.push(a))}else m={eventTime:m,lane:o,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=m,c=h):f=f.next=m,s|=o;if(a=a.next,a===null){if(o=i.shared.pending,o===null)break;a=o.next,o.next=null,i.lastBaseUpdate=o,i.shared.pending=null}}while(1);f===null&&(c=h),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=f,Jb|=s,t.lanes=s,t.memoizedState=h}}function hk(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(bt(191,i));i.call(n)}}}var mG=new fx.Component().refs;function oE(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Jn({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var _x={isMounted:function(t){return(t=t._reactInternals)?Nh(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=ks(),i=mf(t),a=pf(n,i);a.payload=e,r!=null&&(a.callback=r),gf(t,a),yf(t,i,n)},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=ks(),i=mf(t),a=pf(n,i);a.tag=1,a.payload=e,r!=null&&(a.callback=r),gf(t,a),yf(t,i,n)},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=ks(),n=mf(t),i=pf(r,n);i.tag=2,e!=null&&(i.callback=e),gf(t,i),yf(t,n,r)}};function pk(t,e,r,n,i,a,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,a,s):e.prototype&&e.prototype.isPureReactComponent?!qv(r,n)||!qv(i,a):!0}function yG(t,e,r){var n=!1,i=Af,a=e.contextType;return typeof a=="object"&&a!==null?a=Ao(a):(i=vs(e)?mh:Na.current,n=e.contextTypes,a=(n=n!=null)?fg(t,i):Af),e=new e(r,a),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=_x,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=a),e}function gk(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&_x.enqueueReplaceState(e,e.state,null)}function NC(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs=mG,ZN(t);var a=e.contextType;typeof a=="object"&&a!==null?i.context=Ao(a):(a=vs(e)?mh:Na.current,i.context=fg(t,a)),Vv(t,r,i,n),i.state=t.memoizedState,a=e.getDerivedStateFromProps,typeof a=="function"&&(oE(t,e,a,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&_x.enqueueReplaceState(i,i.state,null),Vv(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4)}var bw=Array.isArray;function Tm(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(bt(309));var n=r.stateNode}if(!n)throw Error(bt(147,t));var i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(a){var s=n.refs;s===mG&&(s=n.refs={}),a===null?delete s[i]:s[i]=a},e._stringRef=i,e)}if(typeof t!="string")throw Error(bt(284));if(!r._owner)throw Error(bt(290,t))}return t}function ww(t,e){if(t.type!=="textarea")throw Error(bt(31,Object.prototype.toString.call(e)==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":e))}function vG(t){function e(g,_){if(t){var b=g.lastEffect;b!==null?(b.nextEffect=_,g.lastEffect=_):g.firstEffect=g.lastEffect=_,_.nextEffect=null,_.flags=8}}function r(g,_){if(!t)return null;for(;_!==null;)e(g,_),_=_.sibling;return null}function n(g,_){for(g=new Map;_!==null;)_.key!==null?g.set(_.key,_):g.set(_.index,_),_=_.sibling;return g}function i(g,_){return g=If(g,_),g.index=0,g.sibling=null,g}function a(g,_,b){return g.index=b,t?(b=g.alternate,b!==null?(b=b.index,b<_?(g.flags=2,_):b):(g.flags=2,_)):_}function s(g){return t&&g.alternate===null&&(g.flags=2),g}function o(g,_,b,S){return _===null||_.tag!==6?(_=PS(b,g.mode,S),_.return=g,_):(_=i(_,b),_.return=g,_)}function c(g,_,b,S){return _!==null&&_.elementType===b.type?(S=i(_,b.props),S.ref=Tm(g,_,b),S.return=g,S):(S=w_(b.type,b.key,b.props,null,g.mode,S),S.ref=Tm(g,_,b),S.return=g,S)}function u(g,_,b,S){return _===null||_.tag!==4||_.stateNode.containerInfo!==b.containerInfo||_.stateNode.implementation!==b.implementation?(_=TS(b,g.mode,S),_.return=g,_):(_=i(_,b.children||[]),_.return=g,_)}function f(g,_,b,S,A){return _===null||_.tag!==7?(_=u0(b,g.mode,S,A),_.return=g,_):(_=i(_,b),_.return=g,_)}function h(g,_,b){if(typeof _=="string"||typeof _=="number")return _=PS(""+_,g.mode,b),_.return=g,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Fy:return b=w_(_.type,_.key,_.props,null,g.mode,b),b.ref=Tm(g,null,_),b.return=g,b;case Nd:return _=TS(_,g.mode,b),_.return=g,_}if(bw(_)||xm(_))return _=u0(_,g.mode,b,null),_.return=g,_;ww(g,_)}return null}function m(g,_,b,S){var A=_!==null?_.key:null;if(typeof b=="string"||typeof b=="number")return A!==null?null:o(g,_,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Fy:return b.key===A?b.type===Bl?f(g,_,b.props.children,S,A):c(g,_,b,S):null;case Nd:return b.key===A?u(g,_,b,S):null}if(bw(b)||xm(b))return A!==null?null:f(g,_,b,S,null);ww(g,b)}return null}function y(g,_,b,S,A){if(typeof S=="string"||typeof S=="number")return g=g.get(b)||null,o(_,g,""+S,A);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Fy:return g=g.get(S.key===null?b:S.key)||null,S.type===Bl?f(_,g,S.props.children,A,S.key):c(_,g,S,A);case Nd:return g=g.get(S.key===null?b:S.key)||null,u(_,g,S,A)}if(bw(S)||xm(S))return g=g.get(b)||null,f(_,g,S,A,null);ww(_,S)}return null}function w(g,_,b,S){for(var A=null,I=null,E=_,p=_=0,O=null;E!==null&&p<b.length;p++){E.index>p?(O=E,E=null):O=E.sibling;var N=m(g,E,b[p],S);if(N===null){E===null&&(E=O);break}t&&E&&N.alternate===null&&e(g,E),_=a(N,_,p),I===null?A=N:I.sibling=N,I=N,E=O}if(p===b.length)return r(g,E),A;if(E===null){for(;p<b.length;p++)E=h(g,b[p],S),E!==null&&(_=a(E,_,p),I===null?A=E:I.sibling=E,I=E);return A}for(E=n(g,E);p<b.length;p++)O=y(E,g,p,b[p],S),O!==null&&(t&&O.alternate!==null&&E.delete(O.key===null?p:O.key),_=a(O,_,p),I===null?A=O:I.sibling=O,I=O);return t&&E.forEach(function(F){return e(g,F)}),A}function v(g,_,b,S){var A=xm(b);if(typeof A!="function")throw Error(bt(150));if(b=A.call(b),b==null)throw Error(bt(151));for(var I=A=null,E=_,p=_=0,O=null,N=b.next();E!==null&&!N.done;p++,N=b.next()){E.index>p?(O=E,E=null):O=E.sibling;var F=m(g,E,N.value,S);if(F===null){E===null&&(E=O);break}t&&E&&F.alternate===null&&e(g,E),_=a(F,_,p),I===null?A=F:I.sibling=F,I=F,E=O}if(N.done)return r(g,E),A;if(E===null){for(;!N.done;p++,N=b.next())N=h(g,N.value,S),N!==null&&(_=a(N,_,p),I===null?A=N:I.sibling=N,I=N);return A}for(E=n(g,E);!N.done;p++,N=b.next())N=y(E,g,p,N.value,S),N!==null&&(t&&N.alternate!==null&&E.delete(N.key===null?p:N.key),_=a(N,_,p),I===null?A=N:I.sibling=N,I=N);return t&&E.forEach(function(V){return e(g,V)}),A}return function(g,_,b,S){var A=typeof b=="object"&&b!==null&&b.type===Bl&&b.key===null;A&&(b=b.props.children);var I=typeof b=="object"&&b!==null;if(I)switch(b.$$typeof){case Fy:e:{for(I=b.key,A=_;A!==null;){if(A.key===I){switch(A.tag){case 7:if(b.type===Bl){r(g,A.sibling),_=i(A,b.props.children),_.return=g,g=_;break e}break;default:if(A.elementType===b.type){r(g,A.sibling),_=i(A,b.props),_.ref=Tm(g,A,b),_.return=g,g=_;break e}}r(g,A);break}else e(g,A);A=A.sibling}b.type===Bl?(_=u0(b.props.children,g.mode,S,b.key),_.return=g,g=_):(S=w_(b.type,b.key,b.props,null,g.mode,S),S.ref=Tm(g,_,b),S.return=g,g=S)}return s(g);case Nd:e:{for(A=b.key;_!==null;){if(_.key===A)if(_.tag===4&&_.stateNode.containerInfo===b.containerInfo&&_.stateNode.implementation===b.implementation){r(g,_.sibling),_=i(_,b.children||[]),_.return=g,g=_;break e}else{r(g,_);break}else e(g,_);_=_.sibling}_=TS(b,g.mode,S),_.return=g,g=_}return s(g)}if(typeof b=="string"||typeof b=="number")return b=""+b,_!==null&&_.tag===6?(r(g,_.sibling),_=i(_,b),_.return=g,g=_):(r(g,_),_=PS(b,g.mode,S),_.return=g,g=_),s(g);if(bw(b))return w(g,_,b,S);if(xm(b))return v(g,_,b,S);if(I&&ww(g,b),typeof b>"u"&&!A)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(bt(152,e0(g.type)||"Component"))}return r(g,_)}}var cE=vG(!0),bG=vG(!1),Yb={},Hc=Mf(Yb),Gv=Mf(Yb),Kv=Mf(Yb);function $d(t){if(t===Yb)throw Error(bt(174));return t}function DC(t,e){switch(ui(Kv,e),ui(Gv,t),ui(Hc,Yb),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:yC(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=yC(e,t)}Gn(Hc),ui(Hc,e)}function hg(){Gn(Hc),Gn(Gv),Gn(Kv)}function mk(t){$d(Kv.current);var e=$d(Hc.current),r=yC(e,t.type);e!==r&&(ui(Gv,t),ui(Hc,r))}function e8(t){Gv.current===t&&(Gn(Hc),Gn(Gv))}var ci=Mf(0);function uE(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&64)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var qu=null,sf=null,zc=!1;function wG(t,e){var r=vo(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=e,r.return=t,r.flags=8,t.lastEffect!==null?(t.lastEffect.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r}function yk(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,!0):!1;case 13:return!1;default:return!1}}function MC(t){if(zc){var e=sf;if(e){var r=e;if(!yk(t,e)){if(e=i0(r.nextSibling),!e||!yk(t,e)){t.flags=t.flags&-1025|2,zc=!1,qu=t;return}wG(qu,r)}qu=t,sf=i0(e.firstChild)}else t.flags=t.flags&-1025|2,zc=!1,qu=t}}function vk(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;qu=t}function _w(t){if(t!==qu)return!1;if(!zc)return vk(t),zc=!0,!1;var e=t.type;if(t.tag!==5||e!=="head"&&e!=="body"&&!PC(e,t.memoizedProps))for(e=sf;e;)wG(t,e),e=i0(e.nextSibling);if(vk(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(bt(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){sf=i0(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}sf=null}}else sf=qu?i0(t.stateNode.nextSibling):null;return!0}function AS(){sf=qu=null,zc=!1}var s0=[];function t8(){for(var t=0;t<s0.length;t++)s0[t]._workInProgressVersionPrimary=null;s0.length=0}var pv=Rh.ReactCurrentDispatcher,bo=Rh.ReactCurrentBatchConfig,Wv=0,wi=null,Ea=null,ea=null,lE=!1,gv=!1;function is(){throw Error(bt(321))}function r8(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!yo(t[r],e[r]))return!1;return!0}function n8(t,e,r,n,i,a){if(Wv=a,wi=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,pv.current=t===null||t.memoizedState===null?nue:iue,t=r(n,i),gv){a=0;do{if(gv=!1,!(25>a))throw Error(bt(301));a+=1,ea=Ea=null,e.updateQueue=null,pv.current=aue,t=r(n,i)}while(gv)}if(pv.current=pE,e=Ea!==null&&Ea.next!==null,Wv=0,ea=Ea=wi=null,lE=!1,e)throw Error(bt(300));return t}function kd(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ea===null?wi.memoizedState=ea=t:ea=ea.next=t,ea}function Dh(){if(Ea===null){var t=wi.alternate;t=t!==null?t.memoizedState:null}else t=Ea.next;var e=ea===null?wi.memoizedState:ea.next;if(e!==null)ea=e,Ea=t;else{if(t===null)throw Error(bt(310));Ea=t,t={memoizedState:Ea.memoizedState,baseState:Ea.baseState,baseQueue:Ea.baseQueue,queue:Ea.queue,next:null},ea===null?wi.memoizedState=ea=t:ea=ea.next=t}return ea}function Uc(t,e){return typeof e=="function"?e(t):e}function Cm(t){var e=Dh(),r=e.queue;if(r===null)throw Error(bt(311));r.lastRenderedReducer=t;var n=Ea,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}n.baseQueue=i=a,r.pending=null}if(i!==null){i=i.next,n=n.baseState;var o=s=a=null,c=i;do{var u=c.lane;if((Wv&u)===u)o!==null&&(o=o.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),n=c.eagerReducer===t?c.eagerState:t(n,c.action);else{var f={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};o===null?(s=o=f,a=n):o=o.next=f,wi.lanes|=u,Jb|=u}c=c.next}while(c!==null&&c!==i);o===null?a=n:o.next=s,yo(n,e.memoizedState)||(oc=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=o,r.lastRenderedState=n}return[e.memoizedState,r.dispatch]}function Rm(t){var e=Dh(),r=e.queue;if(r===null)throw Error(bt(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,a=e.memoizedState;if(i!==null){r.pending=null;var s=i=i.next;do a=t(a,s.action),s=s.next;while(s!==i);yo(a,e.memoizedState)||(oc=!0),e.memoizedState=a,e.baseQueue===null&&(e.baseState=a),r.lastRenderedState=a}return[a,n]}function bk(t,e,r){var n=e._getVersion;n=n(e._source);var i=e._workInProgressVersionPrimary;if(i!==null?t=i===n:(t=t.mutableReadLanes,(t=(Wv&t)===t)&&(e._workInProgressVersionPrimary=n,s0.push(e))),t)return r(e._source);throw s0.push(e),Error(bt(350))}function _G(t,e,r,n){var i=Ka;if(i===null)throw Error(bt(349));var a=e._getVersion,s=a(e._source),o=pv.current,c=o.useState(function(){return bk(i,e,r)}),u=c[1],f=c[0];c=ea;var h=t.memoizedState,m=h.refs,y=m.getSnapshot,w=h.source;h=h.subscribe;var v=wi;return t.memoizedState={refs:m,source:e,subscribe:n},o.useEffect(function(){m.getSnapshot=r,m.setSnapshot=u;var g=a(e._source);if(!yo(s,g)){g=r(e._source),yo(f,g)||(u(g),g=mf(v),i.mutableReadLanes|=g&i.pendingLanes),g=i.mutableReadLanes,i.entangledLanes|=g;for(var _=i.entanglements,b=g;0<b;){var S=31-xf(b),A=1<<S;_[S]|=g,b&=~A}}},[r,e,n]),o.useEffect(function(){return n(e._source,function(){var g=m.getSnapshot,_=m.setSnapshot;try{_(g(e._source));var b=mf(v);i.mutableReadLanes|=b&i.pendingLanes}catch(S){_(function(){throw S})}})},[e,n]),yo(y,r)&&yo(w,e)&&yo(h,n)||(t={pending:null,dispatch:null,lastRenderedReducer:Uc,lastRenderedState:f},t.dispatch=u=s8.bind(null,wi,t),c.queue=t,c.baseQueue=null,f=bk(i,e,r),c.memoizedState=c.baseState=f),f}function EG(t,e,r){var n=Dh();return _G(n,t,e,r)}function Nm(t){var e=kd();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t=e.queue={pending:null,dispatch:null,lastRenderedReducer:Uc,lastRenderedState:t},t=t.dispatch=s8.bind(null,wi,t),[e.memoizedState,t]}function fE(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=wi.updateQueue,e===null?(e={lastEffect:null},wi.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function wk(t){var e=kd();return t={current:t},e.memoizedState=t}function dE(){return Dh().memoizedState}function $C(t,e,r,n){var i=kd();wi.flags|=t,i.memoizedState=fE(1|e,r,void 0,n===void 0?null:n)}function i8(t,e,r,n){var i=Dh();n=n===void 0?null:n;var a=void 0;if(Ea!==null){var s=Ea.memoizedState;if(a=s.destroy,n!==null&&r8(n,s.deps)){fE(e,r,a,n);return}}wi.flags|=t,i.memoizedState=fE(1|e,r,a,n)}function _k(t,e){return $C(516,4,t,e)}function hE(t,e){return i8(516,4,t,e)}function xG(t,e){return i8(4,2,t,e)}function AG(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function SG(t,e,r){return r=r!=null?r.concat([t]):null,i8(4,2,AG.bind(null,e,t),r)}function a8(){}function IG(t,e){var r=Dh();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&r8(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function OG(t,e){var r=Dh();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&r8(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function rue(t,e){var r=dg();yh(98>r?98:r,function(){t(!0)}),yh(97<r?97:r,function(){var n=bo.transition;bo.transition=1;try{t(!1),e()}finally{bo.transition=n}})}function s8(t,e,r){var n=ks(),i=mf(t),a={lane:i,action:r,eagerReducer:null,eagerState:null,next:null},s=e.pending;if(s===null?a.next=a:(a.next=s.next,s.next=a),e.pending=a,s=t.alternate,t===wi||s!==null&&s===wi)gv=lE=!0;else{if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,c=s(o,r);if(a.eagerReducer=s,a.eagerState=c,yo(c,o))return}catch{}finally{}yf(t,i,n)}}var pE={readContext:Ao,useCallback:is,useContext:is,useEffect:is,useImperativeHandle:is,useLayoutEffect:is,useMemo:is,useReducer:is,useRef:is,useState:is,useDebugValue:is,useDeferredValue:is,useTransition:is,useMutableSource:is,useOpaqueIdentifier:is,unstable_isNewReconciler:!1},nue={readContext:Ao,useCallback:function(t,e){return kd().memoizedState=[t,e===void 0?null:e],t},useContext:Ao,useEffect:_k,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,$C(4,2,AG.bind(null,e,t),r)},useLayoutEffect:function(t,e){return $C(4,2,t,e)},useMemo:function(t,e){var r=kd();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=kd();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t=n.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},t=t.dispatch=s8.bind(null,wi,t),[n.memoizedState,t]},useRef:wk,useState:Nm,useDebugValue:a8,useDeferredValue:function(t){var e=Nm(t),r=e[0],n=e[1];return _k(function(){var i=bo.transition;bo.transition=1;try{n(t)}finally{bo.transition=i}},[t]),r},useTransition:function(){var t=Nm(!1),e=t[0];return t=rue.bind(null,t[1]),wk(t),[t,e]},useMutableSource:function(t,e,r){var n=kd();return n.memoizedState={refs:{getSnapshot:e,setSnapshot:null},source:t,subscribe:r},_G(n,t,e,r)},useOpaqueIdentifier:function(){if(zc){var t=!1,e=Yce(function(){throw t||(t=!0,r("r:"+(_S++).toString(36))),Error(bt(355))}),r=Nm(e)[1];return!(wi.mode&2)&&(wi.flags|=516,fE(5,function(){r("r:"+(_S++).toString(36))},void 0,null)),e}return e="r:"+(_S++).toString(36),Nm(e),e},unstable_isNewReconciler:!1},iue={readContext:Ao,useCallback:IG,useContext:Ao,useEffect:hE,useImperativeHandle:SG,useLayoutEffect:xG,useMemo:OG,useReducer:Cm,useRef:dE,useState:function(){return Cm(Uc)},useDebugValue:a8,useDeferredValue:function(t){var e=Cm(Uc),r=e[0],n=e[1];return hE(function(){var i=bo.transition;bo.transition=1;try{n(t)}finally{bo.transition=i}},[t]),r},useTransition:function(){var t=Cm(Uc)[0];return[dE().current,t]},useMutableSource:EG,useOpaqueIdentifier:function(){return Cm(Uc)[0]},unstable_isNewReconciler:!1},aue={readContext:Ao,useCallback:IG,useContext:Ao,useEffect:hE,useImperativeHandle:SG,useLayoutEffect:xG,useMemo:OG,useReducer:Rm,useRef:dE,useState:function(){return Rm(Uc)},useDebugValue:a8,useDeferredValue:function(t){var e=Rm(Uc),r=e[0],n=e[1];return hE(function(){var i=bo.transition;bo.transition=1;try{n(t)}finally{bo.transition=i}},[t]),r},useTransition:function(){var t=Rm(Uc)[0];return[dE().current,t]},useMutableSource:EG,useOpaqueIdentifier:function(){return Rm(Uc)[0]},unstable_isNewReconciler:!1},sue=Rh.ReactCurrentOwner,oc=!1;function ls(t,e,r,n){e.child=t===null?bG(e,null,r,n):cE(e,t.child,r,n)}function Ek(t,e,r,n,i){r=r.render;var a=e.ref;return a0(e,i),n=n8(t,e,r,n,a,i),t!==null&&!oc?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,Hu(t,e,i)):(e.flags|=1,ls(t,e,n,i),e.child)}function xk(t,e,r,n,i,a){if(t===null){var s=r.type;return typeof s=="function"&&!d8(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,PG(t,e,s,n,i,a)):(t=w_(r.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}return s=t.child,!(i&a)&&(i=s.memoizedProps,r=r.compare,r=r!==null?r:qv,r(i,n)&&t.ref===e.ref)?Hu(t,e,a):(e.flags|=1,t=If(s,n),t.ref=e.ref,t.return=e,e.child=t)}function PG(t,e,r,n,i,a){if(t!==null&&qv(t.memoizedProps,n)&&t.ref===e.ref)if(oc=!1,(a&i)!==0)t.flags&16384&&(oc=!0);else return e.lanes=t.lanes,Hu(t,e,a);return kC(t,e,r,n,a)}function SS(t,e,r){var n=e.pendingProps,i=n.children,a=t!==null?t.memoizedState:null;if(n.mode==="hidden"||n.mode==="unstable-defer-without-hiding")if(!(e.mode&4))e.memoizedState={baseLanes:0},xw(e,r);else if(r&1073741824)e.memoizedState={baseLanes:0},xw(e,a!==null?a.baseLanes:r);else return t=a!==null?a.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t},xw(e,t),null;else a!==null?(n=a.baseLanes|r,e.memoizedState=null):n=r,xw(e,n);return ls(t,e,i,r),e.child}function TG(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=128)}function kC(t,e,r,n,i){var a=vs(r)?mh:Na.current;return a=fg(e,a),a0(e,i),r=n8(t,e,r,n,a,i),t!==null&&!oc?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,Hu(t,e,i)):(e.flags|=1,ls(t,e,r,i),e.child)}function Ak(t,e,r,n,i){if(vs(r)){var a=!0;g_(e)}else a=!1;if(a0(e,i),e.stateNode===null)t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),yG(e,r,n),NC(e,r,n,i),n=!0;else if(t===null){var s=e.stateNode,o=e.memoizedProps;s.props=o;var c=s.context,u=r.contextType;typeof u=="object"&&u!==null?u=Ao(u):(u=vs(r)?mh:Na.current,u=fg(e,u));var f=r.getDerivedStateFromProps,h=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==n||c!==u)&&gk(e,s,n,u),Ll=!1;var m=e.memoizedState;s.state=m,Vv(e,n,s,i),c=e.memoizedState,o!==n||m!==c||ys.current||Ll?(typeof f=="function"&&(oE(e,r,f,n),c=e.memoizedState),(o=Ll||pk(e,r,o,n,m,c,u))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4)):(typeof s.componentDidMount=="function"&&(e.flags|=4),e.memoizedProps=n,e.memoizedState=c),s.props=n,s.state=c,s.context=u,n=o):(typeof s.componentDidMount=="function"&&(e.flags|=4),n=!1)}else{s=e.stateNode,gG(t,e),o=e.memoizedProps,u=e.type===e.elementType?o:Ko(e.type,o),s.props=u,h=e.pendingProps,m=s.context,c=r.contextType,typeof c=="object"&&c!==null?c=Ao(c):(c=vs(r)?mh:Na.current,c=fg(e,c));var y=r.getDerivedStateFromProps;(f=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==h||m!==c)&&gk(e,s,n,c),Ll=!1,m=e.memoizedState,s.state=m,Vv(e,n,s,i);var w=e.memoizedState;o!==h||m!==w||ys.current||Ll?(typeof y=="function"&&(oE(e,r,y,n),w=e.memoizedState),(u=Ll||pk(e,r,u,n,m,w,c))?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,w,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,w,c)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=256)):(typeof s.componentDidUpdate!="function"||o===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&m===t.memoizedState||(e.flags|=256),e.memoizedProps=n,e.memoizedState=w),s.props=n,s.state=w,s.context=c,n=u):(typeof s.componentDidUpdate!="function"||o===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&m===t.memoizedState||(e.flags|=256),n=!1)}return LC(t,e,r,n,a,i)}function LC(t,e,r,n,i,a){TG(t,e);var s=(e.flags&64)!==0;if(!n&&!s)return i&&uk(e,r,!1),Hu(t,e,a);n=e.stateNode,sue.current=e;var o=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&s?(e.child=cE(e,t.child,null,a),e.child=cE(e,null,o,a)):ls(t,e,o,a),e.memoizedState=n.state,i&&uk(e,r,!0),e.child}function Sk(t){var e=t.stateNode;e.pendingContext?ck(t,e.pendingContext,e.pendingContext!==e.context):e.context&&ck(t,e.context,!1),DC(t,e.containerInfo)}var Ew={dehydrated:null,retryLane:0};function Ik(t,e,r){var n=e.pendingProps,i=ci.current,a=!1,s;return(s=(e.flags&64)!==0)||(s=t!==null&&t.memoizedState===null?!1:(i&2)!==0),s?(a=!0,e.flags&=-65):t!==null&&t.memoizedState===null||n.fallback===void 0||n.unstable_avoidThisFallback===!0||(i|=1),ui(ci,i&1),t===null?(n.fallback!==void 0&&MC(e),t=n.children,i=n.fallback,a?(t=Ok(e,t,i,r),e.child.memoizedState={baseLanes:r},e.memoizedState=Ew,t):typeof n.unstable_expectedLoadTime=="number"?(t=Ok(e,t,i,r),e.child.memoizedState={baseLanes:r},e.memoizedState=Ew,e.lanes=33554432,t):(r=h8({mode:"visible",children:t},e.mode,r,null),r.return=e,e.child=r)):t.memoizedState!==null?a?(n=Tk(t,e,n.children,n.fallback,r),a=e.child,i=t.child.memoizedState,a.memoizedState=i===null?{baseLanes:r}:{baseLanes:i.baseLanes|r},a.childLanes=t.childLanes&~r,e.memoizedState=Ew,n):(r=Pk(t,e,n.children,r),e.memoizedState=null,r):a?(n=Tk(t,e,n.children,n.fallback,r),a=e.child,i=t.child.memoizedState,a.memoizedState=i===null?{baseLanes:r}:{baseLanes:i.baseLanes|r},a.childLanes=t.childLanes&~r,e.memoizedState=Ew,n):(r=Pk(t,e,n.children,r),e.memoizedState=null,r)}function Ok(t,e,r,n){var i=t.mode,a=t.child;return e={mode:"hidden",children:e},!(i&2)&&a!==null?(a.childLanes=0,a.pendingProps=e):a=h8(e,i,0,null),r=u0(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r}function Pk(t,e,r,n){var i=t.child;return t=i.sibling,r=If(i,{mode:"visible",children:r}),!(e.mode&2)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(t.nextEffect=null,t.flags=8,e.firstEffect=e.lastEffect=t),e.child=r}function Tk(t,e,r,n,i){var a=e.mode,s=t.child;t=s.sibling;var o={mode:"hidden",children:r};return!(a&2)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=o,s=r.lastEffect,s!==null?(e.firstEffect=r.firstEffect,e.lastEffect=s,s.nextEffect=null):e.firstEffect=e.lastEffect=null):r=If(s,o),t!==null?n=If(t,n):(n=u0(n,a,i,null),n.flags|=2),n.return=e,r.return=e,r.sibling=n,e.child=r,n}function Ck(t,e){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),pG(t.return,e)}function IS(t,e,r,n,i,a){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i,lastEffect:a}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i,s.lastEffect=a)}function Rk(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(ls(t,e,n.children,r),n=ci.current,n&2)n=n&1|2,e.flags|=64;else{if(t!==null&&t.flags&64)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ck(t,r);else if(t.tag===19)Ck(t,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(ui(ci,n),!(e.mode&2))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&uE(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),IS(e,!1,i,r,a,e.lastEffect);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&uE(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}IS(e,!0,r,null,a,e.lastEffect);break;case"together":IS(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function Hu(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Jb|=e.lanes,r&e.childLanes){if(t!==null&&e.child!==t.child)throw Error(bt(153));if(e.child!==null){for(t=e.child,r=If(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=If(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}return null}var CG,jC,RG,NG;CG=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};jC=function(){};RG=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,$d(Hc.current);var a=null;switch(r){case"input":i=fC(t,i),n=fC(t,n),a=[];break;case"option":i=pC(t,i),n=pC(t,n),a=[];break;case"select":i=Jn({},i,{value:void 0}),n=Jn({},n,{value:void 0}),a=[];break;case"textarea":i=gC(t,i),n=gC(t,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=tE)}vC(r,n);var s;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(s in o)o.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&($v.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var c=n[u];if(o=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&c!==o&&(c!=null||o!=null))if(u==="style")if(o){for(s in o)!o.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in c)c.hasOwnProperty(s)&&o[s]!==c[s]&&(r||(r={}),r[s]=c[s])}else r||(a||(a=[]),a.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&($v.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Hn("scroll",t),a||o===c||(a=[])):typeof c=="object"&&c!==null&&c.$$typeof===DN?c.toString():(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(e.updateQueue=u)&&(e.flags|=4)}};NG=function(t,e,r,n){r!==n&&(e.flags|=4)};function Dm(t,e){if(!zc)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function oue(t,e,r){var n=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return vs(e.type)&&nE(),null;case 3:return hg(),Gn(ys),Gn(Na),t8(),n=e.stateNode,n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(_w(e)?e.flags|=4:n.hydrate||(e.flags|=256)),jC(e),null;case 5:e8(e);var i=$d(Kv.current);if(r=e.type,t!==null&&e.stateNode!=null)RG(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=128);else{if(!n){if(e.stateNode===null)throw Error(bt(166));return null}if(t=$d(Hc.current),_w(e)){n=e.stateNode,r=e.type;var a=e.memoizedProps;switch(n[af]=e,n[rE]=a,r){case"dialog":Hn("cancel",n),Hn("close",n);break;case"iframe":case"object":case"embed":Hn("load",n);break;case"video":case"audio":for(t=0;t<qy.length;t++)Hn(qy[t],n);break;case"source":Hn("error",n);break;case"img":case"image":case"link":Hn("error",n),Hn("load",n);break;case"details":Hn("toggle",n);break;case"input":R$(n,a),Hn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Hn("invalid",n);break;case"textarea":D$(n,a),Hn("invalid",n)}vC(r,a),t=null;for(var s in a)a.hasOwnProperty(s)&&(i=a[s],s==="children"?typeof i=="string"?n.textContent!==i&&(t=["children",i]):typeof i=="number"&&n.textContent!==""+i&&(t=["children",""+i]):$v.hasOwnProperty(s)&&i!=null&&s==="onScroll"&&Hn("scroll",n));switch(r){case"input":gw(n),N$(n,a,!0);break;case"textarea":gw(n),M$(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=tE)}n=t,e.updateQueue=n,n!==null&&(e.flags|=4)}else{switch(s=i.nodeType===9?i:i.ownerDocument,t===mC.html&&(t=SV(r)),t===mC.html?r==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=s.createElement(r,{is:n.is}):(t=s.createElement(r),r==="select"&&(s=t,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):t=s.createElementNS(t,r),t[af]=e,t[rE]=n,CG(t,e,!1,!1),e.stateNode=t,s=bC(r,n),r){case"dialog":Hn("cancel",t),Hn("close",t),i=n;break;case"iframe":case"object":case"embed":Hn("load",t),i=n;break;case"video":case"audio":for(i=0;i<qy.length;i++)Hn(qy[i],t);i=n;break;case"source":Hn("error",t),i=n;break;case"img":case"image":case"link":Hn("error",t),Hn("load",t),i=n;break;case"details":Hn("toggle",t),i=n;break;case"input":R$(t,n),i=fC(t,n),Hn("invalid",t);break;case"option":i=pC(t,n);break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=Jn({},n,{value:void 0}),Hn("invalid",t);break;case"textarea":D$(t,n),i=gC(t,n),Hn("invalid",t);break;default:i=n}vC(r,i);var o=i;for(a in o)if(o.hasOwnProperty(a)){var c=o[a];a==="style"?PV(t,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&IV(t,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&kv(t,c):typeof c=="number"&&kv(t,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&($v.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Hn("scroll",t):c!=null&&ON(t,a,c,s))}switch(r){case"input":gw(t),N$(t,n,!1);break;case"textarea":gw(t),M$(t);break;case"option":n.value!=null&&t.setAttribute("value",""+Ef(n.value));break;case"select":t.multiple=!!n.multiple,a=n.value,a!=null?t0(t,!!n.multiple,a,!1):n.defaultValue!=null&&t0(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=tE)}aG(r,n)&&(e.flags|=4)}e.ref!==null&&(e.flags|=128)}return null;case 6:if(t&&e.stateNode!=null)NG(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(bt(166));r=$d(Kv.current),$d(Hc.current),_w(e)?(n=e.stateNode,r=e.memoizedProps,n[af]=e,n.nodeValue!==r&&(e.flags|=4)):(n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[af]=e,e.stateNode=n)}return null;case 13:return Gn(ci),n=e.memoizedState,e.flags&64?(e.lanes=r,e):(n=n!==null,r=!1,t===null?e.memoizedProps.fallback!==void 0&&_w(e):r=t.memoizedState!==null,n&&!r&&e.mode&2&&(t===null&&e.memoizedProps.unstable_avoidThisFallback!==!0||ci.current&1?na===0&&(na=3):((na===0||na===3)&&(na=4),Ka===null||!(Jb&134217727)&&!(Bg&134217727)||o0(Ka,Ca))),(n||r)&&(e.flags|=4),null);case 4:return hg(),jC(e),t===null&&rG(e.stateNode.containerInfo),null;case 10:return XN(e),null;case 17:return vs(e.type)&&nE(),null;case 19:if(Gn(ci),n=e.memoizedState,n===null)return null;if(a=(e.flags&64)!==0,s=n.rendering,s===null)if(a)Dm(n,!1);else{if(na!==0||t!==null&&t.flags&64)for(t=e.child;t!==null;){if(s=uE(t),s!==null){for(e.flags|=64,Dm(n,!1),a=s.updateQueue,a!==null&&(e.updateQueue=a,e.flags|=4),n.lastEffect===null&&(e.firstEffect=null),e.lastEffect=n.lastEffect,n=r,r=e.child;r!==null;)a=r,t=n,a.flags&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,s=a.alternate,s===null?(a.childLanes=0,a.lanes=t,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,t=s.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return ui(ci,ci.current&1|2),e.child}t=t.sibling}n.tail!==null&&Ta()>zC&&(e.flags|=64,a=!0,Dm(n,!1),e.lanes=33554432)}else{if(!a)if(t=uE(s),t!==null){if(e.flags|=64,a=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Dm(n,!0),n.tail===null&&n.tailMode==="hidden"&&!s.alternate&&!zc)return e=e.lastEffect=n.lastEffect,e!==null&&(e.nextEffect=null),null}else 2*Ta()-n.renderingStartTime>zC&&r!==1073741824&&(e.flags|=64,a=!0,Dm(n,!1),e.lanes=33554432);n.isBackwards?(s.sibling=e.child,e.child=s):(r=n.last,r!==null?r.sibling=s:e.child=s,n.last=s)}return n.tail!==null?(r=n.tail,n.rendering=r,n.tail=r.sibling,n.lastEffect=e.lastEffect,n.renderingStartTime=Ta(),r.sibling=null,e=ci.current,ui(ci,a?e&1|2:e&1),r):null;case 23:case 24:return f8(),t!==null&&t.memoizedState!==null!=(e.memoizedState!==null)&&n.mode!=="unstable-defer-without-hiding"&&(e.flags|=4),null}throw Error(bt(156,e.tag))}function cue(t){switch(t.tag){case 1:vs(t.type)&&nE();var e=t.flags;return e&4096?(t.flags=e&-4097|64,t):null;case 3:if(hg(),Gn(ys),Gn(Na),t8(),e=t.flags,e&64)throw Error(bt(285));return t.flags=e&-4097|64,t;case 5:return e8(t),null;case 13:return Gn(ci),e=t.flags,e&4096?(t.flags=e&-4097|64,t):null;case 19:return Gn(ci),null;case 4:return hg(),null;case 10:return XN(t),null;case 23:case 24:return f8(),null;default:return null}}function o8(t,e){try{var r="",n=e;do r+=qoe(n),n=n.return;while(n);var i=r}catch(a){i=`
38
+ Error generating stack: `+a.message+`
39
+ `+a.stack}return{value:t,source:e,stack:i}}function UC(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var uue=typeof WeakMap=="function"?WeakMap:Map;function DG(t,e,r){r=pf(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){mE||(mE=!0,VC=n),UC(t,e)},r}function MG(t,e,r){r=pf(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return UC(t,e),n(i)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){typeof n!="function"&&(Fc===null?Fc=new Set([this]):Fc.add(this),UC(t,e));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),r}var lue=typeof WeakSet=="function"?WeakSet:Set;function Nk(t){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){vf(t,r)}else e.current=null}function fue(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(e.flags&256&&t!==null){var r=t.memoizedProps,n=t.memoizedState;t=e.stateNode,e=t.getSnapshotBeforeUpdate(e.elementType===e.type?r:Ko(e.type,r),n),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:e.flags&256&&WN(e.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(bt(163))}function due(t,e,r){switch(r.tag){case 0:case 11:case 15:case 22:if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{if((t.tag&3)===3){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{var i=t;n=i.next,i=i.tag,i&4&&i&1&&(HG(r,t),wue(r,t)),t=n}while(t!==e)}return;case 1:t=r.stateNode,r.flags&4&&(e===null?t.componentDidMount():(n=r.elementType===r.type?e.memoizedProps:Ko(r.type,e.memoizedProps),t.componentDidUpdate(n,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),e=r.updateQueue,e!==null&&hk(r,e,t);return;case 3:if(e=r.updateQueue,e!==null){if(t=null,r.child!==null)switch(r.child.tag){case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}hk(r,e,t)}return;case 5:t=r.stateNode,e===null&&r.flags&4&&aG(r.type,r.memoizedProps)&&t.focus();return;case 6:return;case 4:return;case 12:return;case 13:r.memoizedState===null&&(r=r.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&jV(r))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(bt(163))}function Dk(t,e){for(var r=t;;){if(r.tag===5){var n=r.stateNode;if(e)n=n.style,typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none";else{n=r.stateNode;var i=r.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,n.style.display=OV("display",i)}}else if(r.tag===6)r.stateNode.nodeValue=e?"":r.memoizedProps;else if((r.tag!==23&&r.tag!==24||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function Mk(t,e){if(lh&&typeof lh.onCommitFiberUnmount=="function")try{lh.onCommitFiberUnmount(QN,e)}catch{}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(t=e.updateQueue,t!==null&&(t=t.lastEffect,t!==null)){var r=t=t.next;do{var n=r,i=n.destroy;if(n=n.tag,i!==void 0)if(n&4)HG(e,r);else{n=e;try{i()}catch(a){vf(n,a)}}r=r.next}while(r!==t)}break;case 1:if(Nk(e),t=e.stateNode,typeof t.componentWillUnmount=="function")try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(a){vf(e,a)}break;case 5:Nk(e);break;case 4:$G(t,e)}}function $k(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function kk(t){return t.tag===5||t.tag===3||t.tag===4}function Lk(t){e:{for(var e=t.return;e!==null;){if(kk(e))break e;e=e.return}throw Error(bt(160))}var r=e;switch(e=r.stateNode,r.tag){case 5:var n=!1;break;case 3:e=e.containerInfo,n=!0;break;case 4:e=e.containerInfo,n=!0;break;default:throw Error(bt(161))}r.flags&16&&(kv(e,""),r.flags&=-17);e:t:for(r=t;;){for(;r.sibling===null;){if(r.return===null||kk(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2)){r=r.stateNode;break e}}n?FC(t,r,e):BC(t,r,e)}function FC(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=tE));else if(n!==4&&(t=t.child,t!==null))for(FC(t,e,r),t=t.sibling;t!==null;)FC(t,e,r),t=t.sibling}function BC(t,e,r){var n=t.tag,i=n===5||n===6;if(i)t=i?t.stateNode:t.stateNode.instance,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(BC(t,e,r),t=t.sibling;t!==null;)BC(t,e,r),t=t.sibling}function $G(t,e){for(var r=e,n=!1,i,a;;){if(!n){n=r.return;e:for(;;){if(n===null)throw Error(bt(160));switch(i=n.stateNode,n.tag){case 5:a=!1;break e;case 3:i=i.containerInfo,a=!0;break e;case 4:i=i.containerInfo,a=!0;break e}n=n.return}n=!0}if(r.tag===5||r.tag===6){e:for(var s=t,o=r,c=o;;)if(Mk(s,c),c.child!==null&&c.tag!==4)c.child.return=c,c=c.child;else{if(c===o)break e;for(;c.sibling===null;){if(c.return===null||c.return===o)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}a?(s=i,o=r.stateNode,s.nodeType===8?s.parentNode.removeChild(o):s.removeChild(o)):i.removeChild(r.stateNode)}else if(r.tag===4){if(r.child!==null){i=r.stateNode.containerInfo,a=!0,r.child.return=r,r=r.child;continue}}else if(Mk(t,r),r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return,r.tag===4&&(n=!1)}r.sibling.return=r.return,r=r.sibling}}function OS(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do(n.tag&3)===3&&(t=n.destroy,n.destroy=void 0,t!==void 0&&t()),n=n.next;while(n!==r)}return;case 1:return;case 5:if(r=e.stateNode,r!=null){n=e.memoizedProps;var i=t!==null?t.memoizedProps:n;t=e.type;var a=e.updateQueue;if(e.updateQueue=null,a!==null){for(r[rE]=n,t==="input"&&n.type==="radio"&&n.name!=null&&xV(r,n),bC(t,i),e=bC(t,n),i=0;i<a.length;i+=2){var s=a[i],o=a[i+1];s==="style"?PV(r,o):s==="dangerouslySetInnerHTML"?IV(r,o):s==="children"?kv(r,o):ON(r,s,o,e)}switch(t){case"input":dC(r,n);break;case"textarea":AV(r,n);break;case"select":t=r._wrapperState.wasMultiple,r._wrapperState.wasMultiple=!!n.multiple,a=n.value,a!=null?t0(r,!!n.multiple,a,!1):t!==!!n.multiple&&(n.defaultValue!=null?t0(r,!!n.multiple,n.defaultValue,!0):t0(r,!!n.multiple,n.multiple?[]:"",!1))}}}return;case 6:if(e.stateNode===null)throw Error(bt(162));e.stateNode.nodeValue=e.memoizedProps;return;case 3:r=e.stateNode,r.hydrate&&(r.hydrate=!1,jV(r.containerInfo));return;case 12:return;case 13:e.memoizedState!==null&&(l8=Ta(),Dk(e.child,!0)),jk(e);return;case 19:jk(e);return;case 17:return;case 23:case 24:Dk(e,e.memoizedState!==null);return}throw Error(bt(163))}function jk(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new lue),e.forEach(function(n){var i=xue.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function hue(t,e){return t!==null&&(t=t.memoizedState,t===null||t.dehydrated!==null)?(e=e.memoizedState,e!==null&&e.dehydrated===null):!1}var pue=Math.ceil,gE=Rh.ReactCurrentDispatcher,c8=Rh.ReactCurrentOwner,xr=0,Ka=null,Di=null,Ca=0,vh=0,qC=Mf(0),na=0,Ex=null,Fg=0,Jb=0,Bg=0,u8=0,HC=null,l8=0,zC=1/0;function qg(){zC=Ta()+500}var Bt=null,mE=!1,VC=null,Fc=null,Sf=!1,mv=null,Hy=90,GC=[],KC=[],Gu=null,yv=0,WC=null,y_=-1,Uu=0,v_=0,vv=null,b_=!1;function ks(){return xr&48?Ta():y_!==-1?y_:y_=Ta()}function mf(t){if(t=t.mode,!(t&2))return 1;if(!(t&4))return dg()===99?1:2;if(Uu===0&&(Uu=Fg),tue.transition!==0){v_!==0&&(v_=HC!==null?HC.pendingLanes:0),t=Uu;var e=4186112&~v_;return e&=-e,e===0&&(t=4186112&~t,e=t&-t,e===0&&(e=8192)),e}return t=dg(),xr&4&&t===98?t=Z_(12,Uu):(t=ice(t),t=Z_(t,Uu)),t}function yf(t,e,r){if(50<yv)throw yv=0,WC=null,Error(bt(185));if(t=xx(t,e),t===null)return null;gx(t,e,r),t===Ka&&(Bg|=e,na===4&&o0(t,Ca));var n=dg();e===1?xr&8&&!(xr&48)?QC(t):(So(t,r),xr===0&&(qg(),Yc())):(!(xr&4)||n!==98&&n!==99||(Gu===null?Gu=new Set([t]):Gu.add(t)),So(t,r)),HC=t}function xx(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}function So(t,e){for(var r=t.callbackNode,n=t.suspendedLanes,i=t.pingedLanes,a=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-xf(s),c=1<<o,u=a[o];if(u===-1){if(!(c&n)||c&i){u=e,Pp(c);var f=Ln;a[o]=10<=f?u+250:6<=f?u+5e3:-1}}else u<=e&&(t.expiredLanes|=c);s&=~c}if(n=Fv(t,t===Ka?Ca:0),e=Ln,n===0)r!==null&&(r!==ES&&CC(r),t.callbackNode=null,t.callbackPriority=0);else{if(r!==null){if(t.callbackPriority===e)return;r!==ES&&CC(r)}e===15?(r=QC.bind(null,t),xu===null?(xu=[r],m_=YN(wx,hG)):xu.push(r),r=ES):e===14?r=zv(99,QC.bind(null,t)):(r=ace(e),r=zv(r,kG.bind(null,t))),t.callbackPriority=e,t.callbackNode=r}}function kG(t){if(y_=-1,v_=Uu=0,xr&48)throw Error(bt(327));var e=t.callbackNode;if($f()&&t.callbackNode!==e)return null;var r=Fv(t,t===Ka?Ca:0);if(r===0)return null;var n=r,i=xr;xr|=16;var a=FG();(Ka!==t||Ca!==n)&&(qg(),c0(t,n));do try{yue();break}catch(o){UG(t,o)}while(1);if(JN(),gE.current=a,xr=i,Di!==null?n=0:(Ka=null,Ca=0,n=na),Fg&Bg)c0(t,0);else if(n!==0){if(n===2&&(xr|=64,t.hydrate&&(t.hydrate=!1,WN(t.containerInfo)),r=VV(t),r!==0&&(n=zy(t,r))),n===1)throw e=Ex,c0(t,0),o0(t,r),So(t,Ta()),e;switch(t.finishedWork=t.current.alternate,t.finishedLanes=r,n){case 0:case 1:throw Error(bt(345));case 2:xd(t);break;case 3:if(o0(t,r),(r&62914560)===r&&(n=l8+500-Ta(),10<n)){if(Fv(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){ks(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=ak(xd.bind(null,t),n);break}xd(t);break;case 4:if(o0(t,r),(r&4186112)===r)break;for(n=t.eventTimes,i=-1;0<r;){var s=31-xf(r);a=1<<s,s=n[s],s>i&&(i=s),r&=~a}if(r=i,r=Ta()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*pue(r/1960))-r,10<r){t.timeoutHandle=ak(xd.bind(null,t),r);break}xd(t);break;case 5:xd(t);break;default:throw Error(bt(329))}}return So(t,Ta()),t.callbackNode===e?kG.bind(null,t):null}function o0(t,e){for(e&=~u8,e&=~Bg,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-xf(e),n=1<<r;t[r]=-1,e&=~n}}function QC(t){if(xr&48)throw Error(bt(327));if($f(),t===Ka&&t.expiredLanes&Ca){var e=Ca,r=zy(t,e);Fg&Bg&&(e=Fv(t,e),r=zy(t,e))}else e=Fv(t,0),r=zy(t,e);if(t.tag!==0&&r===2&&(xr|=64,t.hydrate&&(t.hydrate=!1,WN(t.containerInfo)),e=VV(t),e!==0&&(r=zy(t,e))),r===1)throw r=Ex,c0(t,0),o0(t,e),So(t,Ta()),r;return t.finishedWork=t.current.alternate,t.finishedLanes=e,xd(t),So(t,Ta()),null}function gue(){if(Gu!==null){var t=Gu;Gu=null,t.forEach(function(e){e.expiredLanes|=24&e.pendingLanes,So(e,Ta())})}Yc()}function LG(t,e){var r=xr;xr|=1;try{return t(e)}finally{xr=r,xr===0&&(qg(),Yc())}}function jG(t,e){var r=xr;xr&=-2,xr|=8;try{return t(e)}finally{xr=r,xr===0&&(qg(),Yc())}}function xw(t,e){ui(qC,vh),vh|=e,Fg|=e}function f8(){vh=qC.current,Gn(qC)}function c0(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,Qce(r)),Di!==null)for(r=Di.return;r!==null;){var n=r;switch(n.tag){case 1:n=n.type.childContextTypes,n!=null&&nE();break;case 3:hg(),Gn(ys),Gn(Na),t8();break;case 5:e8(n);break;case 4:hg();break;case 13:Gn(ci);break;case 19:Gn(ci);break;case 10:XN(n);break;case 23:case 24:f8()}r=r.return}Ka=t,Di=If(t.current,null),Ca=vh=Fg=e,na=0,Ex=null,u8=Bg=Jb=0}function UG(t,e){do{var r=Di;try{if(JN(),pv.current=pE,lE){for(var n=wi.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}lE=!1}if(Wv=0,ea=Ea=wi=null,gv=!1,c8.current=null,r===null||r.return===null){na=1,Ex=e,Di=null;break}e:{var a=t,s=r.return,o=r,c=e;if(e=Ca,o.flags|=2048,o.firstEffect=o.lastEffect=null,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c;if(!(o.mode&2)){var f=o.alternate;f?(o.updateQueue=f.updateQueue,o.memoizedState=f.memoizedState,o.lanes=f.lanes):(o.updateQueue=null,o.memoizedState=null)}var h=(ci.current&1)!==0,m=s;do{var y;if(y=m.tag===13){var w=m.memoizedState;if(w!==null)y=w.dehydrated!==null;else{var v=m.memoizedProps;y=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!h}}if(y){var g=m.updateQueue;if(g===null){var _=new Set;_.add(u),m.updateQueue=_}else g.add(u);if(!(m.mode&2)){if(m.flags|=64,o.flags|=16384,o.flags&=-2981,o.tag===1)if(o.alternate===null)o.tag=17;else{var b=pf(-1,1);b.tag=2,gf(o,b)}o.lanes|=1;break e}c=void 0,o=e;var S=a.pingCache;if(S===null?(S=a.pingCache=new uue,c=new Set,S.set(u,c)):(c=S.get(u),c===void 0&&(c=new Set,S.set(u,c))),!c.has(o)){c.add(o);var A=Eue.bind(null,a,u,o);u.then(A,A)}m.flags|=4096,m.lanes=e;break e}m=m.return}while(m!==null);c=Error((e0(o.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
40
+
41
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}na!==5&&(na=2),c=o8(c,o),m=s;do{switch(m.tag){case 3:a=c,m.flags|=4096,e&=-e,m.lanes|=e;var I=DG(m,a,e);dk(m,I);break e;case 1:a=c;var E=m.type,p=m.stateNode;if(!(m.flags&64)&&(typeof E.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Fc===null||!Fc.has(p)))){m.flags|=4096,e&=-e,m.lanes|=e;var O=MG(m,a,e);dk(m,O);break e}}m=m.return}while(m!==null)}qG(r)}catch(N){e=N,Di===r&&r!==null&&(Di=r=r.return);continue}break}while(1)}function FG(){var t=gE.current;return gE.current=pE,t===null?pE:t}function zy(t,e){var r=xr;xr|=16;var n=FG();Ka===t&&Ca===e||c0(t,e);do try{mue();break}catch(i){UG(t,i)}while(1);if(JN(),xr=r,gE.current=n,Di!==null)throw Error(bt(261));return Ka=null,Ca=0,na}function mue(){for(;Di!==null;)BG(Di)}function yue(){for(;Di!==null&&!Xce();)BG(Di)}function BG(t){var e=zG(t.alternate,t,vh);t.memoizedProps=t.pendingProps,e===null?qG(t):Di=e,c8.current=null}function qG(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=cue(e),r!==null){r.flags&=2047,Di=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=oue(r,e,vh),r!==null){Di=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||vh&1073741824||!(r.mode&4)){for(var n=0,i=r.child;i!==null;)n|=i.lanes|i.childLanes,i=i.sibling;r.childLanes=n}t!==null&&!(t.flags&2048)&&(t.firstEffect===null&&(t.firstEffect=e.firstEffect),e.lastEffect!==null&&(t.lastEffect!==null&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1<e.flags&&(t.lastEffect!==null?t.lastEffect.nextEffect=e:t.firstEffect=e,t.lastEffect=e))}if(e=e.sibling,e!==null){Di=e;return}Di=e=t}while(e!==null);na===0&&(na=5)}function xd(t){var e=dg();return yh(99,vue.bind(null,t,e)),null}function vue(t,e){do $f();while(mv!==null);if(xr&48)throw Error(bt(327));var r=t.finishedWork;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(bt(177));t.callbackNode=null;var n=r.lanes|r.childLanes,i=n,a=t.pendingLanes&~i;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=i,t.mutableReadLanes&=i,t.entangledLanes&=i,i=t.entanglements;for(var s=t.eventTimes,o=t.expirationTimes;0<a;){var c=31-xf(a),u=1<<c;i[c]=0,s[c]=-1,o[c]=-1,a&=~u}if(Gu!==null&&!(n&24)&&Gu.has(t)&&Gu.delete(t),t===Ka&&(Di=Ka=null,Ca=0),1<r.flags?r.lastEffect!==null?(r.lastEffect.nextEffect=r,n=r.firstEffect):n=r:n=r.firstEffect,n!==null){if(i=xr,xr|=32,c8.current=null,bS=d_,s=X$(),SC(s)){if("selectionStart"in s)o={start:s.selectionStart,end:s.selectionEnd};else e:if(o=(o=s.ownerDocument)&&o.defaultView||window,(u=o.getSelection&&o.getSelection())&&u.rangeCount!==0){o=u.anchorNode,a=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{o.nodeType,c.nodeType}catch{o=null;break e}var f=0,h=-1,m=-1,y=0,w=0,v=s,g=null;t:for(;;){for(var _;v!==o||a!==0&&v.nodeType!==3||(h=f+a),v!==c||u!==0&&v.nodeType!==3||(m=f+u),v.nodeType===3&&(f+=v.nodeValue.length),(_=v.firstChild)!==null;)g=v,v=_;for(;;){if(v===s)break t;if(g===o&&++y===a&&(h=f),g===c&&++w===u&&(m=f),(_=v.nextSibling)!==null)break;v=g,g=v.parentNode}v=_}o=h===-1||m===-1?null:{start:h,end:m}}else o=null;o=o||{start:0,end:0}}else o=null;wS={focusedElem:s,selectionRange:o},d_=!1,vv=null,b_=!1,Bt=n;do try{bue()}catch(N){if(Bt===null)throw Error(bt(330));vf(Bt,N),Bt=Bt.nextEffect}while(Bt!==null);vv=null,Bt=n;do try{for(s=t;Bt!==null;){var b=Bt.flags;if(b&16&&kv(Bt.stateNode,""),b&128){var S=Bt.alternate;if(S!==null){var A=S.ref;A!==null&&(typeof A=="function"?A(null):A.current=null)}}switch(b&1038){case 2:Lk(Bt),Bt.flags&=-3;break;case 6:Lk(Bt),Bt.flags&=-3,OS(Bt.alternate,Bt);break;case 1024:Bt.flags&=-1025;break;case 1028:Bt.flags&=-1025,OS(Bt.alternate,Bt);break;case 4:OS(Bt.alternate,Bt);break;case 8:o=Bt,$G(s,o);var I=o.alternate;$k(o),I!==null&&$k(I)}Bt=Bt.nextEffect}}catch(N){if(Bt===null)throw Error(bt(330));vf(Bt,N),Bt=Bt.nextEffect}while(Bt!==null);if(A=wS,S=X$(),b=A.focusedElem,s=A.selectionRange,S!==b&&b&&b.ownerDocument&&ZV(b.ownerDocument.documentElement,b)){for(s!==null&&SC(b)&&(S=s.start,A=s.end,A===void 0&&(A=S),"selectionStart"in b?(b.selectionStart=S,b.selectionEnd=Math.min(A,b.value.length)):(A=(S=b.ownerDocument||document)&&S.defaultView||window,A.getSelection&&(A=A.getSelection(),o=b.textContent.length,I=Math.min(s.start,o),s=s.end===void 0?I:Math.min(s.end,o),!A.extend&&I>s&&(o=s,s=I,I=o),o=J$(b,I),a=J$(b,s),o&&a&&(A.rangeCount!==1||A.anchorNode!==o.node||A.anchorOffset!==o.offset||A.focusNode!==a.node||A.focusOffset!==a.offset)&&(S=S.createRange(),S.setStart(o.node,o.offset),A.removeAllRanges(),I>s?(A.addRange(S),A.extend(a.node,a.offset)):(S.setEnd(a.node,a.offset),A.addRange(S)))))),S=[],A=b;A=A.parentNode;)A.nodeType===1&&S.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<S.length;b++)A=S[b],A.element.scrollLeft=A.left,A.element.scrollTop=A.top}d_=!!bS,wS=bS=null,t.current=r,Bt=n;do try{for(b=t;Bt!==null;){var E=Bt.flags;if(E&36&&due(b,Bt.alternate,Bt),E&128){S=void 0;var p=Bt.ref;if(p!==null){var O=Bt.stateNode;switch(Bt.tag){case 5:S=O;break;default:S=O}typeof p=="function"?p(S):p.current=S}}Bt=Bt.nextEffect}}catch(N){if(Bt===null)throw Error(bt(330));vf(Bt,N),Bt=Bt.nextEffect}while(Bt!==null);Bt=null,eue(),xr=i}else t.current=r;if(Sf)Sf=!1,mv=t,Hy=e;else for(Bt=n;Bt!==null;)e=Bt.nextEffect,Bt.nextEffect=null,Bt.flags&8&&(E=Bt,E.sibling=null,E.stateNode=null),Bt=e;if(n=t.pendingLanes,n===0&&(Fc=null),n===1?t===WC?yv++:(yv=0,WC=t):yv=0,r=r.stateNode,lh&&typeof lh.onCommitFiberRoot=="function")try{lh.onCommitFiberRoot(QN,r,void 0,(r.current.flags&64)===64)}catch{}if(So(t,Ta()),mE)throw mE=!1,t=VC,VC=null,t;return xr&8||Yc(),null}function bue(){for(;Bt!==null;){var t=Bt.alternate;b_||vv===null||(Bt.flags&8?L$(Bt,vv)&&(b_=!0):Bt.tag===13&&hue(t,Bt)&&L$(Bt,vv)&&(b_=!0));var e=Bt.flags;e&256&&fue(t,Bt),!(e&512)||Sf||(Sf=!0,zv(97,function(){return $f(),null})),Bt=Bt.nextEffect}}function $f(){if(Hy!==90){var t=97<Hy?97:Hy;return Hy=90,yh(t,_ue)}return!1}function wue(t,e){GC.push(e,t),Sf||(Sf=!0,zv(97,function(){return $f(),null}))}function HG(t,e){KC.push(e,t),Sf||(Sf=!0,zv(97,function(){return $f(),null}))}function _ue(){if(mv===null)return!1;var t=mv;if(mv=null,xr&48)throw Error(bt(331));var e=xr;xr|=32;var r=KC;KC=[];for(var n=0;n<r.length;n+=2){var i=r[n],a=r[n+1],s=i.destroy;if(i.destroy=void 0,typeof s=="function")try{s()}catch(c){if(a===null)throw Error(bt(330));vf(a,c)}}for(r=GC,GC=[],n=0;n<r.length;n+=2){i=r[n],a=r[n+1];try{var o=i.create;i.destroy=o()}catch(c){if(a===null)throw Error(bt(330));vf(a,c)}}for(o=t.current.firstEffect;o!==null;)t=o.nextEffect,o.nextEffect=null,o.flags&8&&(o.sibling=null,o.stateNode=null),o=t;return xr=e,Yc(),!0}function Uk(t,e,r){e=o8(r,e),e=DG(t,e,1),gf(t,e),e=ks(),t=xx(t,1),t!==null&&(gx(t,1,e),So(t,e))}function vf(t,e){if(t.tag===3)Uk(t,t,e);else for(var r=t.return;r!==null;){if(r.tag===3){Uk(r,t,e);break}else if(r.tag===1){var n=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Fc===null||!Fc.has(n))){t=o8(e,t);var i=MG(r,t,1);if(gf(r,i),i=ks(),r=xx(r,1),r!==null)gx(r,1,i),So(r,i);else if(typeof n.componentDidCatch=="function"&&(Fc===null||!Fc.has(n)))try{n.componentDidCatch(e,t)}catch{}break}}r=r.return}}function Eue(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=ks(),t.pingedLanes|=t.suspendedLanes&r,Ka===t&&(Ca&r)===r&&(na===4||na===3&&(Ca&62914560)===Ca&&500>Ta()-l8?c0(t,0):u8|=r),So(t,e)}function xue(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(Uu===0&&(Uu=Fg),e=Tp(62914560&~Uu),e===0&&(e=4194304)):e=dg()===99?1:2:e=1),r=ks(),t=xx(t,e),t!==null&&(gx(t,e,r),So(t,r))}var zG;zG=function(t,e,r){var n=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||ys.current)oc=!0;else if(r&n)oc=!!(t.flags&16384);else{switch(oc=!1,e.tag){case 3:Sk(e),AS();break;case 5:mk(e);break;case 1:vs(e.type)&&g_(e);break;case 4:DC(e,e.stateNode.containerInfo);break;case 10:n=e.memoizedProps.value;var i=e.type._context;ui(iE,i._currentValue),i._currentValue=n;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?Ik(t,e,r):(ui(ci,ci.current&1),e=Hu(t,e,r),e!==null?e.sibling:null);ui(ci,ci.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&64){if(n)return Rk(t,e,r);e.flags|=64}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(ci,ci.current),n)break;return null;case 23:case 24:return e.lanes=0,SS(t,e,r)}return Hu(t,e,r)}else oc=!1;switch(e.lanes=0,e.tag){case 2:if(n=e.type,t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=fg(e,Na.current),a0(e,r),i=n8(null,e,n,t,i,r),e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,vs(n)){var a=!0;g_(e)}else a=!1;e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ZN(e);var s=n.getDerivedStateFromProps;typeof s=="function"&&oE(e,n,s,t),i.updater=_x,e.stateNode=i,i._reactInternals=e,NC(e,n,t,r),e=LC(null,e,n,!0,a,r)}else e.tag=0,ls(null,e,i,r),e=e.child;return e;case 16:i=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,a=i._init,i=a(i._payload),e.type=i,a=e.tag=Sue(i),t=Ko(i,t),a){case 0:e=kC(null,e,i,t,r);break e;case 1:e=Ak(null,e,i,t,r);break e;case 11:e=Ek(null,e,i,t,r);break e;case 14:e=xk(null,e,i,Ko(i.type,t),n,r);break e}throw Error(bt(306,i,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ko(n,i),kC(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ko(n,i),Ak(t,e,n,i,r);case 3:if(Sk(e),n=e.updateQueue,t===null||n===null)throw Error(bt(282));if(n=e.pendingProps,i=e.memoizedState,i=i!==null?i.element:null,gG(t,e),Vv(e,n,null,r),n=e.memoizedState.element,n===i)AS(),e=Hu(t,e,r);else{if(i=e.stateNode,(a=i.hydrate)&&(sf=i0(e.stateNode.containerInfo.firstChild),qu=e,a=zc=!0),a){if(t=i.mutableSourceEagerHydrationData,t!=null)for(i=0;i<t.length;i+=2)a=t[i],a._workInProgressVersionPrimary=t[i+1],s0.push(a);for(r=bG(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|1024,r=r.sibling}else ls(t,e,n,r),AS();e=e.child}return e;case 5:return mk(e),t===null&&MC(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,s=i.children,PC(n,i)?s=null:a!==null&&PC(n,a)&&(e.flags|=16),TG(t,e),ls(t,e,s,r),e.child;case 6:return t===null&&MC(e),null;case 13:return Ik(t,e,r);case 4:return DC(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=cE(e,null,n,r):ls(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ko(n,i),Ek(t,e,n,i,r);case 7:return ls(t,e,e.pendingProps,r),e.child;case 8:return ls(t,e,e.pendingProps.children,r),e.child;case 12:return ls(t,e,e.pendingProps.children,r),e.child;case 10:e:{n=e.type._context,i=e.pendingProps,s=e.memoizedProps,a=i.value;var o=e.type._context;if(ui(iE,o._currentValue),o._currentValue=a,s!==null)if(o=s.value,a=yo(o,a)?0:(typeof n._calculateChangedBits=="function"?n._calculateChangedBits(o,a):1073741823)|0,a===0){if(s.children===i.children&&!ys.current){e=Hu(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var u=c.firstContext;u!==null;){if(u.context===n&&u.observedBits&a){o.tag===1&&(u=pf(-1,r&-r),u.tag=2,gf(o,u)),o.lanes|=r,u=o.alternate,u!==null&&(u.lanes|=r),pG(o.return,r),c.lanes|=r;break}u=u.next}}else s=o.tag===10&&o.type===e.type?null:o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ls(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,a=e.pendingProps,n=a.children,a0(e,r),i=Ao(i,a.unstable_observedBits),n=n(i),e.flags|=1,ls(t,e,n,r),e.child;case 14:return i=e.type,a=Ko(i,e.pendingProps),a=Ko(i.type,a),xk(t,e,i,a,n,r);case 15:return PG(t,e,e.type,e.pendingProps,n,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ko(n,i),t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),e.tag=1,vs(n)?(t=!0,g_(e)):t=!1,a0(e,r),yG(e,n,i),NC(e,n,i,r),LC(null,e,n,!0,t,r);case 19:return Rk(t,e,r);case 23:return SS(t,e,r);case 24:return SS(t,e,r)}throw Error(bt(156,e.tag))};function Aue(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function vo(t,e,r,n){return new Aue(t,e,r,n)}function d8(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Sue(t){if(typeof t=="function")return d8(t)?1:0;if(t!=null){if(t=t.$$typeof,t===dx)return 11;if(t===hx)return 14}return 2}function If(t,e){var r=t.alternate;return r===null?(r=vo(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function w_(t,e,r,n,i,a){var s=2;if(n=t,typeof t=="function")d8(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case Bl:return u0(r.children,i,a,e);case wV:s=8,i|=16;break;case PN:s=8,i|=1;break;case ov:return t=vo(12,r,e,i|8),t.elementType=ov,t.type=ov,t.lanes=a,t;case cv:return t=vo(13,r,e,i),t.type=cv,t.elementType=cv,t.lanes=a,t;case Q_:return t=vo(19,r,e,i),t.elementType=Q_,t.lanes=a,t;case MN:return h8(r,i,a,e);case lC:return t=vo(24,r,e,i),t.elementType=lC,t.lanes=a,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case TN:s=10;break e;case CN:s=9;break e;case dx:s=11;break e;case hx:s=14;break e;case RN:s=16,n=null;break e;case NN:s=22;break e}throw Error(bt(130,t==null?t:typeof t,""))}return e=vo(s,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function u0(t,e,r,n){return t=vo(7,t,n,e),t.lanes=r,t}function h8(t,e,r,n){return t=vo(23,t,n,e),t.elementType=MN,t.lanes=r,t}function PS(t,e,r){return t=vo(6,t,null,e),t.lanes=r,t}function TS(t,e,r){return e=vo(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Iue(t,e,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=r,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=dS(0),this.expirationTimes=dS(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dS(0),this.mutableSourceEagerHydrationData=null}function Oue(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Nd,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function yE(t,e,r,n){var i=e.current,a=ks(),s=mf(i);e:if(r){r=r._reactInternals;t:{if(Nh(r)!==r||r.tag!==1)throw Error(bt(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break t;case 1:if(vs(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break t}}o=o.return}while(o!==null);throw Error(bt(171))}if(r.tag===1){var c=r.type;if(vs(c)){r=oG(r,c,o);break e}}r=o}else r=Af;return e.context===null?e.context=r:e.pendingContext=r,e=pf(a,s),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),gf(i,e),yf(i,s,a),s}function CS(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Fk(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function p8(t,e){Fk(t,e),(t=t.alternate)&&Fk(t,e)}function Pue(){return null}function g8(t,e,r){var n=r!=null&&r.hydrationOptions!=null&&r.hydrationOptions.mutableSources||null;if(r=new Iue(t,e,r!=null&&r.hydrate===!0),e=vo(3,null,null,e===2?7:e===1?3:0),r.current=e,e.stateNode=r,ZN(e),t[Ug]=r.current,rG(t.nodeType===8?t.parentNode:t),n)for(t=0;t<n.length;t++){e=n[t];var i=e._getVersion;i=i(e._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[e,i]:r.mutableSourceEagerHydrationData.push(e,i)}this._internalRoot=r}g8.prototype.render=function(t){yE(t,this._internalRoot,null,null)};g8.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;yE(null,t,null,function(){e[Ug]=null})};function Xb(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Tue(t,e){if(e||(e=t?t.nodeType===9?t.documentElement:t.firstChild:null,e=!(!e||e.nodeType!==1||!e.hasAttribute("data-reactroot"))),!e)for(var r;r=t.lastChild;)t.removeChild(r);return new g8(t,0,e?{hydrate:!0}:void 0)}function Ax(t,e,r,n,i){var a=r._reactRootContainer;if(a){var s=a._internalRoot;if(typeof i=="function"){var o=i;i=function(){var u=CS(s);o.call(u)}}yE(e,s,t,i)}else{if(a=r._reactRootContainer=Tue(r,n),s=a._internalRoot,typeof i=="function"){var c=i;i=function(){var u=CS(s);c.call(u)}}jG(function(){yE(e,s,t,i)})}return CS(s)}$V=function(t){if(t.tag===13){var e=ks();yf(t,4,e),p8(t,4)}};UN=function(t){if(t.tag===13){var e=ks();yf(t,67108864,e),p8(t,67108864)}};kV=function(t){if(t.tag===13){var e=ks(),r=mf(t);yf(t,r,e),p8(t,r)}};LV=function(t,e){return e()};wC=function(t,e,r){switch(e){case"input":if(dC(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=bx(n);if(!i)throw Error(bt(90));EV(n),dC(n,i)}}}break;case"textarea":AV(t,r);break;case"select":e=r.value,e!=null&&t0(t,!!r.multiple,e,!1)}};kN=LG;RV=function(t,e,r,n,i){var a=xr;xr|=4;try{return yh(98,t.bind(null,e,r,n,i))}finally{xr=a,xr===0&&(qg(),Yc())}};LN=function(){!(xr&49)&&(gue(),$f())};NV=function(t,e){var r=xr;xr|=2;try{return t(e)}finally{xr=r,xr===0&&(qg(),Yc())}};function VG(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xb(e))throw Error(bt(200));return Oue(t,e,null,r)}var Cue={Events:[Qb,Bp,bx,TV,CV,$f,{current:!1}]},Mm={findFiberByHostInstance:Md,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},Rue={bundleType:Mm.bundleType,version:Mm.version,rendererPackageName:Mm.rendererPackageName,rendererConfig:Mm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Rh.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=MV(t),t===null?null:t.stateNode},findFiberByHostInstance:Mm.findFiberByHostInstance||Pue,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Aw=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Aw.isDisabled&&Aw.supportsFiber)try{QN=Aw.inject(Rue),lh=Aw}catch{}}Co.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cue;Co.createPortal=VG;Co.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(bt(188)):Error(bt(268,Object.keys(t)));return t=MV(e),t=t===null?null:t.stateNode,t};Co.flushSync=function(t,e){var r=xr;if(r&48)return t(e);xr|=1;try{if(t)return yh(99,t.bind(null,e))}finally{xr=r,Yc()}};Co.hydrate=function(t,e,r){if(!Xb(e))throw Error(bt(200));return Ax(null,t,e,!0,r)};Co.render=function(t,e,r){if(!Xb(e))throw Error(bt(200));return Ax(null,t,e,!1,r)};Co.unmountComponentAtNode=function(t){if(!Xb(t))throw Error(bt(40));return t._reactRootContainer?(jG(function(){Ax(null,null,t,!1,function(){t._reactRootContainer=null,t[Ug]=null})}),!0):!1};Co.unstable_batchedUpdates=LG;Co.unstable_createPortal=function(t,e){return VG(t,e,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Co.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Xb(r))throw Error(bt(200));if(t==null||t._reactInternals===void 0)throw Error(bt(38));return Ax(t,e,r,!1,n)};Co.version="17.0.2";function GG(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GG)}catch(t){console.error(t)}}GG(),mV.exports=Co;var Qv=mV.exports;const Nue=Df(Qv);/**
42
+ * @remix-run/router v1.10.0
43
+ *
44
+ * Copyright (c) Remix Software Inc.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE.md file in the root directory of this source tree.
48
+ *
49
+ * @license MIT
50
+ */function Yv(){return Yv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Yv.apply(this,arguments)}var of;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(of||(of={}));const Bk="popstate";function Due(t){t===void 0&&(t={});function e(n,i){let{pathname:a,search:s,hash:o}=n.location;return YC("",{pathname:a,search:s,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:KG(i)}return $ue(e,r,null,t)}function Mi(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function m8(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Mue(){return Math.random().toString(36).substr(2,8)}function qk(t,e){return{usr:t.state,key:t.key,idx:e}}function YC(t,e,r,n){return r===void 0&&(r=null),Yv({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Hg(e):e,{state:r,key:e&&e.key||n||Mue()})}function KG(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hg(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function $ue(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,s=i.history,o=of.Pop,c=null,u=f();u==null&&(u=0,s.replaceState(Yv({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function h(){o=of.Pop;let g=f(),_=g==null?null:g-u;u=g,c&&c({action:o,location:v.location,delta:_})}function m(g,_){o=of.Push;let b=YC(v.location,g,_);r&&r(b,g),u=f()+1;let S=qk(b,u),A=v.createHref(b);try{s.pushState(S,"",A)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;i.location.assign(A)}a&&c&&c({action:o,location:v.location,delta:1})}function y(g,_){o=of.Replace;let b=YC(v.location,g,_);r&&r(b,g),u=f();let S=qk(b,u),A=v.createHref(b);s.replaceState(S,"",A),a&&c&&c({action:o,location:v.location,delta:0})}function w(g){let _=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof g=="string"?g:KG(g);return Mi(_,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,_)}let v={get action(){return o},get location(){return t(i,s)},listen(g){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Bk,h),c=g,()=>{i.removeEventListener(Bk,h),c=null}},createHref(g){return e(i,g)},createURL:w,encodeLocation(g){let _=w(g);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:m,replace:y,go(g){return s.go(g)}};return v}var Hk;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Hk||(Hk={}));function kue(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Hg(e):e,i=YG(n.pathname||"/",r);if(i==null)return null;let a=WG(t);Lue(a);let s=null;for(let o=0;s==null&&o<a.length;++o)s=Gue(a[o],Que(i));return s}function WG(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,s,o)=>{let c={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};c.relativePath.startsWith("/")&&(Mi(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=fh([n,c.relativePath]),f=r.concat(c);a.children&&a.children.length>0&&(Mi(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),WG(a.children,e,f,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:zue(u,a.index),routesMeta:f})};return t.forEach((a,s)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))i(a,s);else for(let c of QG(a.path))i(a,s,c)}),e}function QG(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let s=QG(n.join("/")),o=[];return o.push(...s.map(c=>c===""?a:[a,c].join("/"))),i&&o.push(...s),o.map(c=>t.startsWith("/")&&c===""?"/":c)}function Lue(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Vue(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const jue=/^:\w+$/,Uue=3,Fue=2,Bue=1,que=10,Hue=-2,zk=t=>t==="*";function zue(t,e){let r=t.split("/"),n=r.length;return r.some(zk)&&(n+=Hue),e&&(n+=Fue),r.filter(i=>!zk(i)).reduce((i,a)=>i+(jue.test(a)?Uue:a===""?Bue:que),n)}function Vue(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Gue(t,e){let{routesMeta:r}=t,n={},i="/",a=[];for(let s=0;s<r.length;++s){let o=r[s],c=s===r.length-1,u=i==="/"?e:e.slice(i.length)||"/",f=Kue({path:o.relativePath,caseSensitive:o.caseSensitive,end:c},u);if(!f)return null;Object.assign(n,f.params);let h=o.route;a.push({params:n,pathname:fh([i,f.pathname]),pathnameBase:tle(fh([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=fh([i,f.pathnameBase]))}return a}function Kue(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Wue(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce((u,f,h)=>{if(f==="*"){let m=o[h]||"";s=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}return u[f]=Yue(o[h]||"",f),u},{}),pathname:a,pathnameBase:s,pattern:t}}function Wue(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),m8(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,o)=>(n.push(o),"/([^\\/]+)"));return t.endsWith("*")?(n.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function Que(t){try{return decodeURI(t)}catch(e){return m8(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Yue(t,e){try{return decodeURIComponent(t)}catch(r){return m8(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function YG(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Jue(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Hg(t):t;return{pathname:r?r.startsWith("/")?r:Xue(r,e):e,search:rle(n),hash:nle(i)}}function Xue(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function RS(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Zue(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function ele(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Hg(t):(i=Yv({},t),Mi(!i.pathname||!i.pathname.includes("?"),RS("?","pathname","search",i)),Mi(!i.pathname||!i.pathname.includes("#"),RS("#","pathname","hash",i)),Mi(!i.search||!i.search.includes("#"),RS("#","search","hash",i)));let a=t===""||i.pathname==="",s=a?"/":i.pathname,o;if(n||s==null)o=r;else{let h=e.length-1;if(s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),h-=1;i.pathname=m.join("/")}o=h>=0?e[h]:"/"}let c=Jue(i,o),u=s&&s!=="/"&&s.endsWith("/"),f=(a||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const fh=t=>t.join("/").replace(/\/\/+/g,"/"),tle=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),rle=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,nle=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function ile(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const JG=["post","put","patch","delete"];new Set(JG);const ale=["get",...JG];new Set(ale);/**
51
+ * React Router v6.17.0
52
+ *
53
+ * Copyright (c) Remix Software Inc.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE.md file in the root directory of this source tree.
57
+ *
58
+ * @license MIT
59
+ */function vE(){return vE=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},vE.apply(this,arguments)}const y8=Ze.createContext(null),sle=Ze.createContext(null),Sx=Ze.createContext(null),Ix=Ze.createContext(null),zg=Ze.createContext({outlet:null,matches:[],isDataRoute:!1}),XG=Ze.createContext(null);function Ox(){return Ze.useContext(Ix)!=null}function v8(){return Ox()||Mi(!1),Ze.useContext(Ix).location}function ZG(t){Ze.useContext(Sx).static||Ze.useLayoutEffect(t)}function b8(){let{isDataRoute:t}=Ze.useContext(zg);return t?ble():ole()}function ole(){Ox()||Mi(!1);let t=Ze.useContext(y8),{basename:e,navigator:r}=Ze.useContext(Sx),{matches:n}=Ze.useContext(zg),{pathname:i}=v8(),a=JSON.stringify(Zue(n).map(c=>c.pathnameBase)),s=Ze.useRef(!1);return ZG(()=>{s.current=!0}),Ze.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let f=ele(c,JSON.parse(a),i,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:fh([e,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[e,r,a,i,t])}function cle(t,e){return ule(t,e)}function ule(t,e,r){Ox()||Mi(!1);let{navigator:n}=Ze.useContext(Sx),{matches:i}=Ze.useContext(zg),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let o=a?a.pathnameBase:"/";a&&a.route;let c=v8(),u;if(e){var f;let v=typeof e=="string"?Hg(e):e;o==="/"||(f=v.pathname)!=null&&f.startsWith(o)||Mi(!1),u=v}else u=c;let h=u.pathname||"/",m=o==="/"?h:h.slice(o.length)||"/",y=kue(t,{pathname:m}),w=ple(y&&y.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:fh([o,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?o:fh([o,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,r);return e&&w?Ze.createElement(Ix.Provider,{value:{location:vE({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:of.Pop}},w):w}function lle(){let t=vle(),e=ile(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return Ze.createElement(Ze.Fragment,null,Ze.createElement("h2",null,"Unexpected Application Error!"),Ze.createElement("h3",{style:{fontStyle:"italic"}},e),r?Ze.createElement("pre",{style:i},r):null,a)}const fle=Ze.createElement(lle,null);class dle extends Ze.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?Ze.createElement(zg.Provider,{value:this.props.routeContext},Ze.createElement(XG.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hle(t){let{routeContext:e,match:r,children:n}=t,i=Ze.useContext(y8);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),Ze.createElement(zg.Provider,{value:e},n)}function ple(t,e,r){var n;if(e===void 0&&(e=[]),r===void 0&&(r=null),t==null){var i;if((i=r)!=null&&i.errors)t=r.matches;else return null}let a=t,s=(n=r)==null?void 0:n.errors;if(s!=null){let o=a.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id]));o>=0||Mi(!1),a=a.slice(0,Math.min(a.length,o+1))}return a.reduceRight((o,c,u)=>{let f=c.route.id?s==null?void 0:s[c.route.id]:null,h=null;r&&(h=c.route.errorElement||fle);let m=e.concat(a.slice(0,u+1)),y=()=>{let w;return f?w=h:c.route.Component?w=Ze.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=o,Ze.createElement(hle,{match:c,routeContext:{outlet:o,matches:m,isDataRoute:r!=null},children:w})};return r&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?Ze.createElement(dle,{location:r.location,revalidation:r.revalidation,component:h,error:f,children:y(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):y()},null)}var eK=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(eK||{}),bE=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(bE||{});function gle(t){let e=Ze.useContext(y8);return e||Mi(!1),e}function mle(t){let e=Ze.useContext(sle);return e||Mi(!1),e}function yle(t){let e=Ze.useContext(zg);return e||Mi(!1),e}function tK(t){let e=yle(),r=e.matches[e.matches.length-1];return r.route.id||Mi(!1),r.route.id}function vle(){var t;let e=Ze.useContext(XG),r=mle(bE.UseRouteError),n=tK(bE.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}function ble(){let{router:t}=gle(eK.UseNavigateStable),e=tK(bE.UseNavigateStable),r=Ze.useRef(!1);return ZG(()=>{r.current=!0}),Ze.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,vE({fromRouteId:e},a)))},[t,e])}function Vy(t){Mi(!1)}function wle(t){let{basename:e="/",children:r=null,location:n,navigationType:i=of.Pop,navigator:a,static:s=!1}=t;Ox()&&Mi(!1);let o=e.replace(/^\/*/,"/"),c=Ze.useMemo(()=>({basename:o,navigator:a,static:s}),[o,a,s]);typeof n=="string"&&(n=Hg(n));let{pathname:u="/",search:f="",hash:h="",state:m=null,key:y="default"}=n,w=Ze.useMemo(()=>{let v=YG(u,o);return v==null?null:{location:{pathname:v,search:f,hash:h,state:m,key:y},navigationType:i}},[o,u,f,h,m,y,i]);return w==null?null:Ze.createElement(Sx.Provider,{value:c},Ze.createElement(Ix.Provider,{children:r,value:w}))}function _le(t){let{children:e,location:r}=t;return cle(JC(e),r)}new Promise(()=>{});function JC(t,e){e===void 0&&(e=[]);let r=[];return Ze.Children.forEach(t,(n,i)=>{if(!Ze.isValidElement(n))return;let a=[...e,i];if(n.type===Ze.Fragment){r.push.apply(r,JC(n.props.children,a));return}n.type!==Vy&&Mi(!1),!n.props.index||!n.props.children||Mi(!1);let s={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=JC(n.props.children,a)),r.push(s)}),r}/**
60
+ * React Router DOM v6.17.0
61
+ *
62
+ * Copyright (c) Remix Software Inc.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE.md file in the root directory of this source tree.
66
+ *
67
+ * @license MIT
68
+ */const Ele="startTransition",Vk=Noe[Ele];function xle(t){let{basename:e,children:r,future:n,window:i}=t,a=Ze.useRef();a.current==null&&(a.current=Due({window:i,v5Compat:!0}));let s=a.current,[o,c]=Ze.useState({action:s.action,location:s.location}),{v7_startTransition:u}=n||{},f=Ze.useCallback(h=>{u&&Vk?Vk(()=>c(h)):c(h)},[c,u]);return Ze.useLayoutEffect(()=>s.listen(f),[s,f]),Ze.createElement(wle,{basename:e,children:r,location:o.location,navigationType:o.action,navigator:s})}var Gk;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Gk||(Gk={}));var Kk;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Kk||(Kk={}));const rK="6.8.0";function Ale(t,e,r){const n=e.split("|").map(a=>a.trim());for(let a=0;a<n.length;a++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof t===e)return}const i=new Error(`invalid value for type ${e}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=t,i}async function _a(t){const e=Object.keys(t);return(await Promise.all(e.map(n=>Promise.resolve(t[n])))).reduce((n,i,a)=>(n[e[a]]=i,n),{})}function Qt(t,e,r){for(let n in e){let i=e[n];const a=r?r[n]:null;a&&Ale(i,a,n),Object.defineProperty(t,n,{enumerable:!0,value:i,writable:!1})}}function zp(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(zp).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n<t.length;n++)r+=e[t[n]>>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return zp(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${zp(r)}: ${zp(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function wo(t,e){return t&&t.code===e}function w8(t){return wo(t,"CALL_EXCEPTION")}function Ni(t,e,r){let n=t;{const a=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${zp(r)}`);for(const s in r){if(s==="shortMessage")continue;const o=r[s];a.push(s+"="+zp(o))}}a.push(`code=${e}`),a.push(`version=${rK}`),a.length&&(t+=" ("+a.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return Qt(i,{code:e}),r&&Object.assign(i,r),i.shortMessage==null&&Qt(i,{shortMessage:n}),i}function it(t,e,r,n){if(!t)throw Ni(e,r,n)}function Ne(t,e,r,n){it(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function nK(t,e,r){r==null&&(r=""),r&&(r=": "+r),it(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),it(t<=e,"too many arguemnts"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const Sle=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"){const r=String.fromCharCode(233).normalize("NFD"),n=String.fromCharCode(101,769);if(r!==n)throw new Error("broken")}t.push(e)}catch{}return t},[]);function iK(t){it(Sle.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function kf(t,e,r){if(r==null&&(r=""),t!==e){let n=r,i="new";r&&(n+=".",i+=" "+r),it(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function aK(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x([0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let i=2;for(let a=0;a<n.length;a++)n[a]=parseInt(t.substring(i,i+2),16),i+=2;return n}Ne(!1,"invalid BytesLike value",e||"value",t)}function qt(t,e){return aK(t,e,!1)}function Pa(t,e){return aK(t,e,!0)}function ai(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function sK(t){return ai(t,!0)||t instanceof Uint8Array}const Wk="0123456789abcdef";function _t(t){const e=qt(t);let r="0x";for(let n=0;n<e.length;n++){const i=e[n];r+=Wk[(i&240)>>4]+Wk[i&15]}return r}function Bn(t){return"0x"+t.map(e=>_t(e).substring(2)).join("")}function l0(t){return ai(t,!0)?(t.length-2)/2:qt(t).length}function zn(t,e,r){const n=qt(t);return r!=null&&r>n.length&&it(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),_t(n.slice(e??0,r??n.length))}function oK(t,e,r){const n=qt(t);it(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),r?i.set(n,e-n.length):i.set(n,0),_t(i)}function bh(t,e){return oK(t,e,!0)}function Ile(t,e){return oK(t,e,!1)}const Px=BigInt(0),ic=BigInt(1),Vp=9007199254740991;function wE(t,e){const r=Tx(t,"value"),n=BigInt(jr(e,"width"));if(it(r>>n===Px,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-ic){const i=(ic<<n)-ic;return-((~r&i)+ic)}return r}function cK(t,e){let r=rr(t,"value");const n=BigInt(jr(e,"width")),i=ic<<n-ic;if(r<Px){r=-r,it(r<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});const a=(ic<<n)-ic;return(~r&a)+ic}else it(r<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return r}function Ld(t,e){const r=Tx(t,"value"),n=BigInt(jr(e,"bits"));return r&(ic<<n)-ic}function rr(t,e){switch(typeof t){case"bigint":return t;case"number":return Ne(Number.isInteger(t),"underflow",e||"value",t),Ne(t>=-Vp&&t<=Vp,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){Ne(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}Ne(!1,"invalid BigNumberish value",e||"value",t)}function Tx(t,e){const r=rr(t,e);return it(r>=Px,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const Qk="0123456789abcdef";function Zb(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=Qk[r>>4],e+=Qk[r&15];return BigInt(e)}return rr(t)}function jr(t,e){switch(typeof t){case"bigint":return Ne(t>=-Vp&&t<=Vp,"overflow",e||"value",t),Number(t);case"number":return Ne(Number.isInteger(t),"underflow",e||"value",t),Ne(t>=-Vp&&t<=Vp,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return jr(BigInt(t),e)}catch(r){Ne(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}Ne(!1,"invalid numeric value",e||"value",t)}function Ole(t){return jr(Zb(t))}function Zu(t,e){let n=Tx(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const i=jr(e,"width");for(it(i*2>=n.length,`value exceeds width (${i} bits)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length<i*2;)n="0"+n}return"0x"+n}function gs(t){const e=Tx(t,"value");if(e===Px)return new Uint8Array([]);let r=e.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let i=0;i<n.length;i++){const a=i*2;n[i]=parseInt(r.substring(a,a+2),16)}return n}function Gp(t){let e=_t(sK(t)?t:gs(t)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}const XC="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let Sw=null;function Ple(t){if(Sw==null){Sw={};for(let r=0;r<XC.length;r++)Sw[XC[r]]=BigInt(r)}const e=Sw[t];return Ne(e!=null,"invalid base58 value","letter",t),e}const Tle=BigInt(0),ZC=BigInt(58);function uK(t){let e=Zb(qt(t)),r="";for(;e;)r=XC[Number(e%ZC)]+r,e/=ZC;return r}function Cle(t){let e=Tle;for(let r=0;r<t.length;r++)e*=ZC,e+=Ple(t[r]);return e}function Rle(t){t=atob(t);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return qt(e)}function Nle(t){const e=qt(t);let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}var E0;class lK{constructor(e,r,n){Be(this,"filter");Be(this,"emitter");Qe(this,E0,void 0);Te(this,E0,r),Qt(this,{emitter:e,filter:n})}async removeListener(){W(this,E0)!=null&&await this.emitter.off(this.filter,W(this,E0))}}E0=new WeakMap;function Dle(t,e,r,n,i){Ne(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function fK(t,e,r,n,i){if(t==="BAD_PREFIX"||t==="UNEXPECTED_CONTINUE"){let a=0;for(let s=e+1;s<r.length&&r[s]>>6===2;s++)a++;return a}return t==="OVERRUN"?r.length-e-1:0}function Mle(t,e,r,n,i){return t==="OVERLONG"?(Ne(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),fK(t,e,r))}const $le=Object.freeze({error:Dle,ignore:fK,replace:Mle});function kle(t,e){e==null&&(e=$le.error);const r=qt(t,"bytes"),n=[];let i=0;for(;i<r.length;){const a=r[i++];if(!(a>>7)){n.push(a);continue}let s=null,o=null;if((a&224)===192)s=1,o=127;else if((a&240)===224)s=2,o=2047;else if((a&248)===240)s=3,o=65535;else{(a&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,r,n):i+=e("BAD_PREFIX",i-1,r,n);continue}if(i-1+s>=r.length){i+=e("OVERRUN",i-1,r,n);continue}let c=a&(1<<8-s-1)-1;for(let u=0;u<s;u++){let f=r[i];if((f&192)!=128){i+=e("MISSING_CONTINUE",i,r,n),c=null;break}c=c<<6|f&63,i++}if(c!==null){if(c>1114111){i+=e("OUT_OF_RANGE",i-1-s,r,n,c);continue}if(c>=55296&&c<=57343){i+=e("UTF16_SURROGATE",i-1-s,r,n,c);continue}if(c<=o){i+=e("OVERLONG",i-1-s,r,n,c);continue}n.push(c)}}return n}function Wa(t,e){e!=null&&(iK(e),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const a=t.charCodeAt(n);Ne(n<t.length&&(a&64512)===56320,"invalid surrogate pair","str",t);const s=65536+((i&1023)<<10)+(a&1023);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return new Uint8Array(r)}function Lle(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function _8(t,e){return Lle(kle(t,e))}function dK(t){async function e(r,n){const i=r.url.split(":")[0].toLowerCase();it(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),it(i==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let a;if(n){const h=new AbortController;a=h.signal,n.addListener(()=>{h.abort()})}const s={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:a},o=await fetch(r.url,s),c={};o.headers.forEach((h,m)=>{c[m.toLowerCase()]=h});const u=await o.arrayBuffer(),f=u==null?null:new Uint8Array(u);return{statusCode:o.status,statusMessage:o.statusText,headers:c,body:f}}return e}const jle=12,Ule=250;let Yk=dK();const Fle=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Ble=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let NS=!1;async function hK(t,e){try{const r=t.match(Fle);if(!r)throw new Error("invalid data");return new bf(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?Rle(r[3]):Hle(r[3]))}catch{return new bf(599,"BAD REQUEST (invalid data: URI)",{},null,new Of(t))}}function pK(t){async function e(r,n){try{const i=r.match(Ble);if(!i)throw new Error("invalid link");return new Of(`${t}${i[2]}`)}catch{return new bf(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Of(r))}}return e}const Iw={data:hK,ipfs:pK("https://gateway.ipfs.io/ipfs/")},gK=new WeakMap;var Hd,ql;class qle{constructor(e){Qe(this,Hd,void 0);Qe(this,ql,void 0);Te(this,Hd,[]),Te(this,ql,!1),gK.set(e,()=>{if(!W(this,ql)){Te(this,ql,!0);for(const r of W(this,Hd))setTimeout(()=>{r()},0);Te(this,Hd,[])}})}addListener(e){it(!W(this,ql),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),W(this,Hd).push(e)}get cancelled(){return W(this,ql)}checkSignal(){it(!this.cancelled,"cancelled","CANCELLED",{})}}Hd=new WeakMap,ql=new WeakMap;function Ow(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var x0,A0,Yo,Su,S0,I0,Fi,Cs,Iu,zd,Vd,Gd,Pc,Ou,Hl,Kd,Gy;const nx=class nx{constructor(e){Qe(this,Kd);Qe(this,x0,void 0);Qe(this,A0,void 0);Qe(this,Yo,void 0);Qe(this,Su,void 0);Qe(this,S0,void 0);Qe(this,I0,void 0);Qe(this,Fi,void 0);Qe(this,Cs,void 0);Qe(this,Iu,void 0);Qe(this,zd,void 0);Qe(this,Vd,void 0);Qe(this,Gd,void 0);Qe(this,Pc,void 0);Qe(this,Ou,void 0);Qe(this,Hl,void 0);Te(this,I0,String(e)),Te(this,x0,!1),Te(this,A0,!0),Te(this,Yo,{}),Te(this,Su,""),Te(this,S0,3e5),Te(this,Ou,{slotInterval:Ule,maxAttempts:jle}),Te(this,Hl,null)}get url(){return W(this,I0)}set url(e){Te(this,I0,String(e))}get body(){return W(this,Fi)==null?null:new Uint8Array(W(this,Fi))}set body(e){if(e==null)Te(this,Fi,void 0),Te(this,Cs,void 0);else if(typeof e=="string")Te(this,Fi,Wa(e)),Te(this,Cs,"text/plain");else if(e instanceof Uint8Array)Te(this,Fi,e),Te(this,Cs,"application/octet-stream");else if(typeof e=="object")Te(this,Fi,Wa(JSON.stringify(e))),Te(this,Cs,"application/json");else throw new Error("invalid body")}hasBody(){return W(this,Fi)!=null}get method(){return W(this,Su)?W(this,Su):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),Te(this,Su,String(e).toUpperCase())}get headers(){const e=Object.assign({},W(this,Yo));return W(this,Iu)&&(e.authorization=`Basic ${Nle(Wa(W(this,Iu)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&W(this,Cs)&&(e["content-type"]=W(this,Cs)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){W(this,Yo)[String(e).toLowerCase()]=String(r)}clearHeaders(){Te(this,Yo,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return W(this,Iu)||null}setCredentials(e,r){Ne(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),Te(this,Iu,`${e}:${r}`)}get allowGzip(){return W(this,A0)}set allowGzip(e){Te(this,A0,!!e)}get allowInsecureAuthentication(){return!!W(this,x0)}set allowInsecureAuthentication(e){Te(this,x0,!!e)}get timeout(){return W(this,S0)}set timeout(e){Ne(e>=0,"timeout must be non-zero","timeout",e),Te(this,S0,e)}get preflightFunc(){return W(this,zd)||null}set preflightFunc(e){Te(this,zd,e)}get processFunc(){return W(this,Vd)||null}set processFunc(e){Te(this,Vd,e)}get retryFunc(){return W(this,Gd)||null}set retryFunc(e){Te(this,Gd,e)}get getUrlFunc(){return W(this,Hl)||Yk}set getUrlFunc(e){Te(this,Hl,e)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${W(this,Fi)?_t(W(this,Fi)):"null"}>`}setThrottleParams(e){e.slotInterval!=null&&(W(this,Ou).slotInterval=e.slotInterval),e.maxAttempts!=null&&(W(this,Ou).maxAttempts=e.maxAttempts)}send(){return it(W(this,Pc)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),Te(this,Pc,new qle(this)),ct(this,Kd,Gy).call(this,0,Jk()+this.timeout,0,this,new bf(0,"",{},null,this))}cancel(){it(W(this,Pc)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=gK.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();it(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new nx(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,Te(i,Yo,Object.assign({},W(this,Yo))),W(this,Fi)&&Te(i,Fi,new Uint8Array(W(this,Fi))),Te(i,Cs,W(this,Cs)),i}clone(){const e=new nx(this.url);return Te(e,Su,W(this,Su)),W(this,Fi)&&Te(e,Fi,W(this,Fi)),Te(e,Cs,W(this,Cs)),Te(e,Yo,Object.assign({},W(this,Yo))),Te(e,Iu,W(this,Iu)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),Te(e,zd,W(this,zd)),Te(e,Vd,W(this,Vd)),Te(e,Gd,W(this,Gd)),Te(e,Hl,W(this,Hl)),e}static lockConfig(){NS=!0}static getGateway(e){return Iw[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(NS)throw new Error("gateways locked");Iw[e]=r}static registerGetUrl(e){if(NS)throw new Error("gateways locked");Yk=e}static createGetUrlFunc(e){return dK()}static createDataGateway(){return hK}static createIpfsGatewayFunc(e){return pK(e)}};x0=new WeakMap,A0=new WeakMap,Yo=new WeakMap,Su=new WeakMap,S0=new WeakMap,I0=new WeakMap,Fi=new WeakMap,Cs=new WeakMap,Iu=new WeakMap,zd=new WeakMap,Vd=new WeakMap,Gd=new WeakMap,Pc=new WeakMap,Ou=new WeakMap,Hl=new WeakMap,Kd=new WeakSet,Gy=async function(e,r,n,i,a){var f,h,m;if(e>=W(this,Ou).maxAttempts)return a.makeServerError("exceeded maximum retry limit");it(Jk()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await zle(n);let s=this.clone();const o=(s.url.split(":")[0]||"").toLowerCase();if(o in Iw){const y=await Iw[o](s.url,Ow(W(i,Pc)));if(y instanceof bf){let w=y;if(this.processFunc){Ow(W(i,Pc));try{w=await this.processFunc(s,w)}catch(v){(v.throttle==null||typeof v.stall!="number")&&w.makeServerError("error in post-processing function",v).assertOk()}}return w}s=y}this.preflightFunc&&(s=await this.preflightFunc(s));const c=await this.getUrlFunc(s,Ow(W(i,Pc)));let u=new bf(c.statusCode,c.statusMessage,c.headers,c.body,i);if(u.statusCode===301||u.statusCode===302){try{const y=u.headers.location||"";return ct(f=s.redirect(y),Kd,Gy).call(f,e+1,r,0,i,u)}catch{}return u}else if(u.statusCode===429&&(this.retryFunc==null||await this.retryFunc(s,u,e))){const y=u.headers["retry-after"];let w=W(this,Ou).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof y=="string"&&y.match(/^[1-9][0-9]*$/)&&(w=parseInt(y)),ct(h=s.clone(),Kd,Gy).call(h,e+1,r,w,i,u)}if(this.processFunc){Ow(W(i,Pc));try{u=await this.processFunc(s,u)}catch(y){(y.throttle==null||typeof y.stall!="number")&&u.makeServerError("error in post-processing function",y).assertOk();let w=W(this,Ou).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return y.stall>=0&&(w=y.stall),ct(m=s.clone(),Kd,Gy).call(m,e+1,r,w,i,u)}}return u};let Of=nx;var _b,Eb,xb,Jo,O0,Wd;const TD=class TD{constructor(e,r,n,i,a){Qe(this,_b,void 0);Qe(this,Eb,void 0);Qe(this,xb,void 0);Qe(this,Jo,void 0);Qe(this,O0,void 0);Qe(this,Wd,void 0);Te(this,_b,e),Te(this,Eb,r),Te(this,xb,Object.keys(n).reduce((s,o)=>(s[o.toLowerCase()]=String(n[o]),s),{})),Te(this,Jo,i==null?null:new Uint8Array(i)),Te(this,O0,a||null),Te(this,Wd,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${W(this,Jo)?_t(W(this,Jo)):"null"}>`}get statusCode(){return W(this,_b)}get statusMessage(){return W(this,Eb)}get headers(){return Object.assign({},W(this,xb))}get body(){return W(this,Jo)==null?null:new Uint8Array(W(this,Jo))}get bodyText(){try{return W(this,Jo)==null?"":_8(W(this,Jo))}catch{it(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{it(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(e,r){let n;e?n=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,n=`CLIENT ESCALATED SERVER ERROR (${e})`);const i=new TD(599,n,this.headers,this.body,W(this,O0)||void 0);return Te(i,Wd,{message:e,error:r}),i}throwThrottleError(e,r){r==null?r=-1:Ne(Number.isInteger(r)&&r>=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw Qt(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return W(this,Jo)!=null}get request(){return W(this,O0)}ok(){return W(this,Wd).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=W(this,Wd);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`),it(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r})}};_b=new WeakMap,Eb=new WeakMap,xb=new WeakMap,Jo=new WeakMap,O0=new WeakMap,Wd=new WeakMap;let bf=TD;function Jk(){return new Date().getTime()}function Hle(t){return Wa(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function zle(t){return new Promise(e=>setTimeout(e,t))}const Vle=BigInt(-1),zo=BigInt(0),Kp=BigInt(1),Gle=BigInt(5),gp={};let f0="0000";for(;f0.length<80;)f0+=f0;function dd(t){let e=f0;for(;e.length<t;)e+=e;return BigInt("1"+e.substring(0,t))}function $m(t,e,r){const n=BigInt(e.width);if(e.signed){const i=Kp<<n-Kp;it(r==null||t>=-i&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t>zo?t=wE(Ld(t,n),n):t=-wE(Ld(-t,n),n)}else{const i=Kp<<n;it(r==null||t>=0&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t=(t%i+i)%i&i-Kp}return t}function DS(t){typeof t=="number"&&(t=`fixed128x${t}`);let e=!0,r=128,n=18;if(typeof t=="string"){if(t!=="fixed")if(t==="ufixed")e=!1;else{const a=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);Ne(a,"invalid fixed format","format",t),e=a[1]!=="u",r=parseInt(a[2]),n=parseInt(a[3])}}else if(t){const a=t,s=(o,c,u)=>a[o]==null?u:(Ne(typeof a[o]===c,"invalid fixed format ("+o+" not "+c+")","format."+o,a[o]),a[o]);e=s("signed","boolean",e),r=s("width","number",r),n=s("decimals","number",n)}Ne(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),Ne(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:i}}function Kle(t,e){let r="";t<zo&&(r="-",t*=Vle);let n=t.toString();if(e===0)return r+n;for(;n.length<=e;)n=f0+n;const i=n.length-e;for(n=n.substring(0,i)+"."+n.substring(i);n[0]==="0"&&n[1]!==".";)n=n.substring(1);for(;n[n.length-1]==="0"&&n[n.length-2]!==".";)n=n.substring(0,n.length-1);return r+n}var Xo,Pn,ja,Pu,Ad,Zo,vu,Ab,tR,Sb,rR,Ib,nR,Ob,iR;const Ul=class Ul{constructor(e,r,n){Qe(this,Pu);Qe(this,Zo);Qe(this,Ab);Qe(this,Sb);Qe(this,Ib);Qe(this,Ob);Be(this,"format");Qe(this,Xo,void 0);Qe(this,Pn,void 0);Qe(this,ja,void 0);Be(this,"_value");kf(e,gp,"FixedNumber"),Te(this,Pn,r),Te(this,Xo,n);const i=Kle(r,n.decimals);Qt(this,{format:n.name,_value:i}),Te(this,ja,dd(n.decimals))}get signed(){return W(this,Xo).signed}get width(){return W(this,Xo).width}get decimals(){return W(this,Xo).decimals}get value(){return W(this,Pn)}addUnsafe(e){return ct(this,Ab,tR).call(this,e)}add(e){return ct(this,Ab,tR).call(this,e,"add")}subUnsafe(e){return ct(this,Sb,rR).call(this,e)}sub(e){return ct(this,Sb,rR).call(this,e,"sub")}mulUnsafe(e){return ct(this,Ib,nR).call(this,e)}mul(e){return ct(this,Ib,nR).call(this,e,"mul")}mulSignal(e){ct(this,Pu,Ad).call(this,e);const r=W(this,Pn)*W(e,Pn);return it(r%W(this,ja)===zo,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),ct(this,Zo,vu).call(this,r/W(this,ja),"mulSignal")}divUnsafe(e){return ct(this,Ob,iR).call(this,e)}div(e){return ct(this,Ob,iR).call(this,e,"div")}divSignal(e){it(W(e,Pn)!==zo,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),ct(this,Pu,Ad).call(this,e);const r=W(this,Pn)*W(this,ja);return it(r%W(e,Pn)===zo,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),ct(this,Zo,vu).call(this,r/W(e,Pn),"divSignal")}cmp(e){let r=this.value,n=e.value;const i=this.decimals-e.decimals;return i>0?n*=dd(i):i<0&&(r*=dd(-i)),r<n?-1:r>n?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=W(this,Pn);return W(this,Pn)<zo&&(e-=W(this,ja)-Kp),e=W(this,Pn)/W(this,ja)*W(this,ja),ct(this,Zo,vu).call(this,e,"floor")}ceiling(){let e=W(this,Pn);return W(this,Pn)>zo&&(e+=W(this,ja)-Kp),e=W(this,Pn)/W(this,ja)*W(this,ja),ct(this,Zo,vu).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=Gle*dd(r-1);let i=this.value+n;const a=dd(r);return i=i/a*a,$m(i,W(this,Xo),"round"),new Ul(gp,i,W(this,Xo))}isZero(){return W(this,Pn)===zo}isNegative(){return W(this,Pn)<zo}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Ul.fromString(this.toString(),e)}static fromValue(e,r,n){const i=r==null?0:jr(r),a=DS(n);let s=rr(e,"value");const o=i-a.decimals;if(o>0){const c=dd(o);it(s%c===zo,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),s/=c}else o<0&&(s*=dd(-o));return $m(s,a,"fromValue"),new Ul(gp,s,a)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);Ne(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=DS(r);let a=n[2]||"0",s=n[3]||"";for(;s.length<i.decimals;)s+=f0;it(s.substring(i.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),s=s.substring(0,i.decimals);const o=BigInt(n[1]+a+s);return $m(o,i,"fromString"),new Ul(gp,o,i)}static fromBytes(e,r){let n=Zb(qt(e,"value"));const i=DS(r);return i.signed&&(n=wE(n,i.width)),$m(n,i,"fromBytes"),new Ul(gp,n,i)}};Xo=new WeakMap,Pn=new WeakMap,ja=new WeakMap,Pu=new WeakSet,Ad=function(e){Ne(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)},Zo=new WeakSet,vu=function(e,r){return e=$m(e,W(this,Xo),r),new Ul(gp,e,W(this,Xo))},Ab=new WeakSet,tR=function(e,r){return ct(this,Pu,Ad).call(this,e),ct(this,Zo,vu).call(this,W(this,Pn)+W(e,Pn),r)},Sb=new WeakSet,rR=function(e,r){return ct(this,Pu,Ad).call(this,e),ct(this,Zo,vu).call(this,W(this,Pn)-W(e,Pn),r)},Ib=new WeakSet,nR=function(e,r){return ct(this,Pu,Ad).call(this,e),ct(this,Zo,vu).call(this,W(this,Pn)*W(e,Pn)/W(this,ja),r)},Ob=new WeakSet,iR=function(e,r){return it(W(e,Pn)!==zo,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),ct(this,Pu,Ad).call(this,e),ct(this,Zo,vu).call(this,W(this,Pn)*W(this,ja)/W(e,Pn),r)};let eR=Ul;function Wle(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function Xk(t,e,r){let n=0;for(let i=0;i<r;i++)n=n*256+t[e+i];return n}function Zk(t,e,r,n){const i=[];for(;r<e+1+n;){const a=mK(t,r);i.push(a.result),r+=a.consumed,it(r<=e+1+n,"child data too short","BUFFER_OVERRUN",{buffer:t,length:n,offset:e})}return{consumed:1+n,result:i}}function mK(t,e){it(t.length!==0,"data too short","BUFFER_OVERRUN",{buffer:t,length:0,offset:1});const r=n=>{it(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const i=Xk(t,e+1,n);return r(e+1+n+i),Zk(t,e,e+1+n,n+i)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),Zk(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const i=Xk(t,e+1,n);r(e+1+n+i);const a=_t(t.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:a}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const i=_t(t.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:Wle(t[e])}}function E8(t){const e=qt(t,"data"),r=mK(e,0);return Ne(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function e9(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function yK(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(a){n=n.concat(yK(a))}),n.length<=55)return n.unshift(192+n.length),n;const i=e9(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(qt(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=e9(e.length);return r.unshift(183+r.length),r.concat(e)}const t9="0123456789abcdef";function Jv(t){let e="0x";for(const r of yK(t))e+=t9[r>>4],e+=t9[r&15];return e}const Qle=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Yle(t,e){let r=18;if(typeof e=="string"){const n=Qle.indexOf(e);Ne(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=jr(e,"unit"));return eR.fromValue(t,r,{decimals:r,width:512}).toString()}function Jle(t){return Yle(t,18)}function Xle(t){const e=qt(t,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=_t(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const Va=32,aR=new Uint8Array(Va),Zle=["then"],Pw={};function km(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}var zl;const Dv=class Dv extends Array{constructor(...r){const n=r[0];let i=r[1],a=(r[2]||[]).slice(),s=!0;n!==Pw&&(i=r,a=[],s=!1);super(i.length);Qe(this,zl,void 0);i.forEach((c,u)=>{this[u]=c});const o=a.reduce((c,u)=>(typeof u=="string"&&c.set(u,(c.get(u)||0)+1),c),new Map);if(Te(this,zl,Object.freeze(i.map((c,u)=>{const f=a[u];return f!=null&&o.get(f)===1?f:null}))),!!s)return Object.freeze(this),new Proxy(this,{get:(c,u,f)=>{if(typeof u=="string"){if(u.match(/^[0-9]+$/)){const m=jr(u,"%index");if(m<0||m>=this.length)throw new RangeError("out of result range");const y=c[m];return y instanceof Error&&km(`index ${m}`,y),y}if(Zle.indexOf(u)>=0)return Reflect.get(c,u,f);const h=c[u];if(h instanceof Function)return function(...m){return h.apply(this===f?c:this,m)};if(!(u in c))return c.getValue.apply(this===f?c:this,[u])}return Reflect.get(c,u,f)}})}toArray(){const r=[];return this.forEach((n,i)=>{n instanceof Error&&km(`index ${i}`,n),r.push(n)}),r}toObject(){return W(this,zl).reduce((r,n,i)=>(it(n!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),n in r||(r[n]=this.getValue(n)),r),{})}slice(r,n){r==null&&(r=0),r<0&&(r+=this.length,r<0&&(r=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const i=[],a=[];for(let s=r;s<n;s++)i.push(this[s]),a.push(W(this,zl)[s]);return new Dv(Pw,i,a)}filter(r,n){const i=[],a=[];for(let s=0;s<this.length;s++){const o=this[s];o instanceof Error&&km(`index ${s}`,o),r.call(n,o,s,this)&&(i.push(o),a.push(W(this,zl)[s]))}return new Dv(Pw,i,a)}map(r,n){const i=[];for(let a=0;a<this.length;a++){const s=this[a];s instanceof Error&&km(`index ${a}`,s),i.push(r.call(n,s,a,this))}return i}getValue(r){const n=W(this,zl).indexOf(r);if(n===-1)return;const i=this[n];return i instanceof Error&&km(`property ${JSON.stringify(r)}`,i.error),i}static fromItems(r,n){return new Dv(Pw,r,n)}};zl=new WeakMap;let _E=Dv;function r9(t){let e=gs(t);return it(e.length<=Va,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:Va,offset:e.length}),e.length!==Va&&(e=Pa(Bn([aR.slice(e.length%Va),e]))),e}class al{constructor(e,r,n,i){Be(this,"name");Be(this,"type");Be(this,"localName");Be(this,"dynamic");Qt(this,{name:e,type:r,localName:n,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,r){Ne(!1,e,this.localName,r)}}var Tu,Qd,P0,__;class sR{constructor(){Qe(this,P0);Qe(this,Tu,void 0);Qe(this,Qd,void 0);Te(this,Tu,[]),Te(this,Qd,0)}get data(){return Bn(W(this,Tu))}get length(){return W(this,Qd)}appendWriter(e){return ct(this,P0,__).call(this,Pa(e.data))}writeBytes(e){let r=Pa(e);const n=r.length%Va;return n&&(r=Pa(Bn([r,aR.slice(n)]))),ct(this,P0,__).call(this,r)}writeValue(e){return ct(this,P0,__).call(this,r9(e))}writeUpdatableValue(){const e=W(this,Tu).length;return W(this,Tu).push(aR),Te(this,Qd,W(this,Qd)+Va),r=>{W(this,Tu)[e]=r9(r)}}}Tu=new WeakMap,Qd=new WeakMap,P0=new WeakSet,__=function(e){return W(this,Tu).push(e),Te(this,Qd,W(this,Qd)+e.length),e.length};var Rs,lo,ix,vK;const CD=class CD{constructor(e,r){Qe(this,ix);Be(this,"allowLoose");Qe(this,Rs,void 0);Qe(this,lo,void 0);Qt(this,{allowLoose:!!r}),Te(this,Rs,Pa(e)),Te(this,lo,0)}get data(){return _t(W(this,Rs))}get dataLength(){return W(this,Rs).length}get consumed(){return W(this,lo)}get bytes(){return new Uint8Array(W(this,Rs))}subReader(e){return new CD(W(this,Rs).slice(W(this,lo)+e),this.allowLoose)}readBytes(e,r){let n=ct(this,ix,vK).call(this,0,e,!!r);return Te(this,lo,W(this,lo)+n.length),n.slice(0,e)}readValue(){return Zb(this.readBytes(Va))}readIndex(){return Ole(this.readBytes(Va))}};Rs=new WeakMap,lo=new WeakMap,ix=new WeakSet,vK=function(e,r,n){let i=Math.ceil(r/Va)*Va;return W(this,lo)+i>W(this,Rs).length&&(this.allowLoose&&n&&W(this,lo)+r<=W(this,Rs).length?i=r:it(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Pa(W(this,Rs)),length:W(this,Rs).length,offset:W(this,lo)+i})),W(this,Rs).slice(W(this,lo),W(this,lo)+i)};let oR=CD;function Ds(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function x8(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function bK(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ds(t.outputLen),Ds(t.blockLen)}function pg(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function wK(t,e){x8(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const MS=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _K=t=>t instanceof Uint8Array,E_=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),x_=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),_c=(t,e)=>t<<32-e|t>>>e,efe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!efe)throw new Error("Non little-endian hardware is not supported");const tfe=async()=>{};async function n9(t,e,r){let n=Date.now();for(let i=0;i<t;i++){r(i);const a=Date.now()-n;a>=0&&a<e||(await tfe(),n+=a)}}function rfe(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function gg(t){if(typeof t=="string"&&(t=rfe(t)),!_K(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function nfe(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!_K(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class A8{clone(){return this._cloneInto()}}const ife={}.toString;function EK(t,e){if(e!==void 0&&ife.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function Cx(t){const e=n=>t().update(gg(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function afe(t=32){if(MS&&typeof MS.getRandomValues=="function")return MS.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}let xK=class extends A8{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,bK(e);const n=gg(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,a=new Uint8Array(i);a.set(n.length>i?e.create().update(n).digest():n);for(let s=0;s<a.length;s++)a[s]^=54;this.iHash.update(a),this.oHash=e.create();for(let s=0;s<a.length;s++)a[s]^=106;this.oHash.update(a),a.fill(0)}update(e){return pg(this),this.iHash.update(e),this}digestInto(e){pg(this),x8(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:i,destroyed:a,blockLen:s,outputLen:o}=this;return e=e,e.finished=i,e.destroyed=a,e.blockLen=s,e.outputLen=o,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const Rx=(t,e,r)=>new xK(t,e).update(r).digest();Rx.create=(t,e)=>new xK(t,e);function sfe(t,e,r,n){bK(t);const i=EK({dkLen:32,asyncTick:10},n),{c:a,dkLen:s,asyncTick:o}=i;if(Ds(a),Ds(s),Ds(o),a<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=gg(e),u=gg(r),f=new Uint8Array(s),h=Rx.create(t,c),m=h._cloneInto().update(u);return{c:a,dkLen:s,asyncTick:o,DK:f,PRF:h,PRFSalt:m}}function ofe(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),r}function S8(t,e,r,n){const{c:i,dkLen:a,DK:s,PRF:o,PRFSalt:c}=sfe(t,e,r,n);let u;const f=new Uint8Array(4),h=x_(f),m=new Uint8Array(o.outputLen);for(let y=1,w=0;w<a;y++,w+=o.outputLen){const v=s.subarray(w,w+o.outputLen);h.setInt32(0,y,!1),(u=c._cloneInto(u)).update(f).digestInto(m),v.set(m.subarray(0,v.length));for(let g=1;g<i;g++){o._cloneInto(u).update(m).digestInto(m);for(let _=0;_<v.length;_++)v[_]^=m[_]}}return ofe(o,c,s,u,m)}function cfe(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),a=BigInt(4294967295),s=Number(r>>i&a),o=Number(r&a),c=n?4:0,u=n?0:4;t.setUint32(e+c,s,n),t.setUint32(e+u,o,n)}let I8=class extends A8{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=x_(this.buffer)}update(e){pg(this);const{view:r,buffer:n,blockLen:i}=this;e=gg(e);const a=e.length;for(let s=0;s<a;){const o=Math.min(i-this.pos,a-s);if(o===i){const c=x_(e);for(;i<=a-s;s+=i)this.process(c,s);continue}n.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){pg(this),wK(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:a}=this;let{pos:s}=this;r[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>i-s&&(this.process(n,0),s=0);for(let h=s;h<i;h++)r[h]=0;cfe(n,i-8,BigInt(this.length*8),a),this.process(n,0);const o=x_(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<u;h++)o.setUint32(4*h,f[h],a)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:a,destroyed:s,pos:o}=this;return e.length=i,e.pos=o,e.finished=a,e.destroyed=s,i%r&&e.buffer.set(n),e}};const ufe=(t,e,r)=>t&e^~t&r,lfe=(t,e,r)=>t&e^t&r^e&r,ffe=new Uint32Array([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]),Sl=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Il=new Uint32Array(64);let dfe=class extends I8{constructor(){super(64,32,8,!1),this.A=Sl[0]|0,this.B=Sl[1]|0,this.C=Sl[2]|0,this.D=Sl[3]|0,this.E=Sl[4]|0,this.F=Sl[5]|0,this.G=Sl[6]|0,this.H=Sl[7]|0}get(){const{A:e,B:r,C:n,D:i,E:a,F:s,G:o,H:c}=this;return[e,r,n,i,a,s,o,c]}set(e,r,n,i,a,s,o,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|0,this.F=s|0,this.G=o|0,this.H=c|0}process(e,r){for(let h=0;h<16;h++,r+=4)Il[h]=e.getUint32(r,!1);for(let h=16;h<64;h++){const m=Il[h-15],y=Il[h-2],w=_c(m,7)^_c(m,18)^m>>>3,v=_c(y,17)^_c(y,19)^y>>>10;Il[h]=v+Il[h-7]+w+Il[h-16]|0}let{A:n,B:i,C:a,D:s,E:o,F:c,G:u,H:f}=this;for(let h=0;h<64;h++){const m=_c(o,6)^_c(o,11)^_c(o,25),y=f+m+ufe(o,c,u)+ffe[h]+Il[h]|0,v=(_c(n,2)^_c(n,13)^_c(n,22))+lfe(n,i,a)|0;f=u,u=c,c=o,o=s+y|0,s=a,a=i,i=n,n=y+v|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,s=s+this.D|0,o=o+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(n,i,a,s,o,c,u,f)}roundClean(){Il.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const Vg=Cx(()=>new dfe),Tw=BigInt(2**32-1),cR=BigInt(32);function AK(t,e=!1){return e?{h:Number(t&Tw),l:Number(t>>cR&Tw)}:{h:Number(t>>cR&Tw)|0,l:Number(t&Tw)|0}}function SK(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:a,l:s}=AK(t[i],e);[r[i],n[i]]=[a,s]}return[r,n]}const hfe=(t,e)=>BigInt(t>>>0)<<cR|BigInt(e>>>0),pfe=(t,e,r)=>t>>>r,gfe=(t,e,r)=>t<<32-r|e>>>r,mfe=(t,e,r)=>t>>>r|e<<32-r,yfe=(t,e,r)=>t<<32-r|e>>>r,vfe=(t,e,r)=>t<<64-r|e>>>r-32,bfe=(t,e,r)=>t>>>r-32|e<<64-r,wfe=(t,e)=>e,_fe=(t,e)=>t,IK=(t,e,r)=>t<<r|e>>>32-r,OK=(t,e,r)=>e<<r|t>>>32-r,PK=(t,e,r)=>e<<r-32|t>>>64-r,TK=(t,e,r)=>t<<r-32|e>>>64-r;function Efe(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const xfe=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Afe=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Sfe=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Ife=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,Ofe=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),Pfe=(t,e,r,n,i,a)=>e+r+n+i+a+(t/2**32|0)|0,Tfe={fromBig:AK,split:SK,toBig:hfe,shrSH:pfe,shrSL:gfe,rotrSH:mfe,rotrSL:yfe,rotrBH:vfe,rotrBL:bfe,rotr32H:wfe,rotr32L:_fe,rotlSH:IK,rotlSL:OK,rotlBH:PK,rotlBL:TK,add:Efe,add3L:xfe,add3H:Afe,add4L:Sfe,add4H:Ife,add5H:Pfe,add5L:Ofe},Hr=Tfe,[Cfe,Rfe]=(()=>Hr.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))))(),Ol=new Uint32Array(80),Pl=new Uint32Array(80);class Nfe extends I8{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:a,Cl:s,Dh:o,Dl:c,Eh:u,El:f,Fh:h,Fl:m,Gh:y,Gl:w,Hh:v,Hl:g}=this;return[e,r,n,i,a,s,o,c,u,f,h,m,y,w,v,g]}set(e,r,n,i,a,s,o,c,u,f,h,m,y,w,v,g){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=a|0,this.Cl=s|0,this.Dh=o|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=h|0,this.Fl=m|0,this.Gh=y|0,this.Gl=w|0,this.Hh=v|0,this.Hl=g|0}process(e,r){for(let S=0;S<16;S++,r+=4)Ol[S]=e.getUint32(r),Pl[S]=e.getUint32(r+=4);for(let S=16;S<80;S++){const A=Ol[S-15]|0,I=Pl[S-15]|0,E=Hr.rotrSH(A,I,1)^Hr.rotrSH(A,I,8)^Hr.shrSH(A,I,7),p=Hr.rotrSL(A,I,1)^Hr.rotrSL(A,I,8)^Hr.shrSL(A,I,7),O=Ol[S-2]|0,N=Pl[S-2]|0,F=Hr.rotrSH(O,N,19)^Hr.rotrBH(O,N,61)^Hr.shrSH(O,N,6),V=Hr.rotrSL(O,N,19)^Hr.rotrBL(O,N,61)^Hr.shrSL(O,N,6),de=Hr.add4L(p,V,Pl[S-7],Pl[S-16]),ve=Hr.add4H(de,E,F,Ol[S-7],Ol[S-16]);Ol[S]=ve|0,Pl[S]=de|0}let{Ah:n,Al:i,Bh:a,Bl:s,Ch:o,Cl:c,Dh:u,Dl:f,Eh:h,El:m,Fh:y,Fl:w,Gh:v,Gl:g,Hh:_,Hl:b}=this;for(let S=0;S<80;S++){const A=Hr.rotrSH(h,m,14)^Hr.rotrSH(h,m,18)^Hr.rotrBH(h,m,41),I=Hr.rotrSL(h,m,14)^Hr.rotrSL(h,m,18)^Hr.rotrBL(h,m,41),E=h&y^~h&v,p=m&w^~m&g,O=Hr.add5L(b,I,p,Rfe[S],Pl[S]),N=Hr.add5H(O,_,A,E,Cfe[S],Ol[S]),F=O|0,V=Hr.rotrSH(n,i,28)^Hr.rotrBH(n,i,34)^Hr.rotrBH(n,i,39),de=Hr.rotrSL(n,i,28)^Hr.rotrBL(n,i,34)^Hr.rotrBL(n,i,39),ve=n&a^n&o^a&o,U=i&s^i&c^s&c;_=v|0,b=g|0,v=y|0,g=w|0,y=h|0,w=m|0,{h,l:m}=Hr.add(u|0,f|0,N|0,F|0),u=o|0,f=c|0,o=a|0,c=s|0,a=n|0,s=i|0;const L=Hr.add3L(F,de,U);n=Hr.add3H(L,N,V,ve),i=L|0}({h:n,l:i}=Hr.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:a,l:s}=Hr.add(this.Bh|0,this.Bl|0,a|0,s|0),{h:o,l:c}=Hr.add(this.Ch|0,this.Cl|0,o|0,c|0),{h:u,l:f}=Hr.add(this.Dh|0,this.Dl|0,u|0,f|0),{h,l:m}=Hr.add(this.Eh|0,this.El|0,h|0,m|0),{h:y,l:w}=Hr.add(this.Fh|0,this.Fl|0,y|0,w|0),{h:v,l:g}=Hr.add(this.Gh|0,this.Gl|0,v|0,g|0),{h:_,l:b}=Hr.add(this.Hh|0,this.Hl|0,_|0,b|0),this.set(n,i,a,s,o,c,u,f,h,m,y,w,v,g,_,b)}roundClean(){Ol.fill(0),Pl.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const O8=Cx(()=>new Nfe);function Dfe(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const i9=Dfe(),a9=i9.crypto||i9.msCrypto;function Mfe(t){switch(t){case"sha256":return Vg.create();case"sha512":return O8.create()}Ne(!1,"invalid hashing algorithm name","algorithm",t)}function $fe(t,e){const r={sha256:Vg,sha512:O8}[t];return Ne(r!=null,"invalid hmac algorithm","algorithm",t),Rx.create(r,e)}function kfe(t,e,r,n,i){const a={sha256:Vg,sha512:O8}[i];return Ne(a!=null,"invalid pbkdf2 algorithm","algorithm",i),S8(a,t,e,{c:r,dkLen:n})}function Lfe(t){it(a9!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),Ne(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return a9.getRandomValues(e),e}let CK=!1;const RK=function(t,e,r){return $fe(t,e).update(r).digest()};let NK=RK;function Gg(t,e,r){const n=qt(e,"key"),i=qt(r,"data");return _t(NK(t,n,i))}Gg._=RK;Gg.lock=function(){CK=!0};Gg.register=function(t){if(CK)throw new Error("computeHmac is locked");NK=t};Object.freeze(Gg);const[DK,MK,$K]=[[],[],[]],jfe=BigInt(0),Lm=BigInt(1),Ufe=BigInt(2),Ffe=BigInt(7),Bfe=BigInt(256),qfe=BigInt(113);for(let t=0,e=Lm,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],DK.push(2*(5*n+r)),MK.push((t+1)*(t+2)/2%64);let i=jfe;for(let a=0;a<7;a++)e=(e<<Lm^(e>>Ffe)*qfe)%Bfe,e&Ufe&&(i^=Lm<<(Lm<<BigInt(a))-Lm);$K.push(i)}const[Hfe,zfe]=SK($K,!0),s9=(t,e,r)=>r>32?PK(t,e,r):IK(t,e,r),o9=(t,e,r)=>r>32?TK(t,e,r):OK(t,e,r);function Vfe(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let s=0;s<10;s++)r[s]=t[s]^t[s+10]^t[s+20]^t[s+30]^t[s+40];for(let s=0;s<10;s+=2){const o=(s+8)%10,c=(s+2)%10,u=r[c],f=r[c+1],h=s9(u,f,1)^r[o],m=o9(u,f,1)^r[o+1];for(let y=0;y<50;y+=10)t[s+y]^=h,t[s+y+1]^=m}let i=t[2],a=t[3];for(let s=0;s<24;s++){const o=MK[s],c=s9(i,a,o),u=o9(i,a,o),f=DK[s];i=t[f],a=t[f+1],t[f]=c,t[f+1]=u}for(let s=0;s<50;s+=10){for(let o=0;o<10;o++)r[o]=t[s+o];for(let o=0;o<10;o++)t[s+o]^=~r[(o+2)%10]&r[(o+4)%10]}t[0]^=Hfe[n],t[1]^=zfe[n]}r.fill(0)}class P8 extends A8{constructor(e,r,n,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Ds(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=E_(this.state)}keccak(){Vfe(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){pg(this);const{blockLen:r,state:n}=this;e=gg(e);const i=e.length;for(let a=0;a<i;){const s=Math.min(r-this.pos,i-a);for(let o=0;o<s;o++)n[this.pos++]^=e[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,r&128&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){pg(this,!1),x8(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,a=e.length;i<a;){this.posOut>=n&&this.keccak();const s=Math.min(n-this.posOut,a-i);e.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Ds(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(wK(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:a,enableXOF:s}=this;return e||(e=new P8(r,n,i,s,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=n,e.outputLen=i,e.enableXOF=s,e.destroyed=this.destroyed,e}}const Gfe=(t,e,r)=>Cx(()=>new P8(e,t,r)),Kfe=Gfe(1,136,256/8);let kK=!1;const LK=function(t){return Kfe(t)};let jK=LK;function Fn(t){const e=qt(t,"data");return _t(jK(e))}Fn._=LK;Fn.lock=function(){kK=!0};Fn.register=function(t){if(kK)throw new TypeError("keccak256 is locked");jK=t};Object.freeze(Fn);const Wfe=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),UK=Uint8Array.from({length:16},(t,e)=>e),Qfe=UK.map(t=>(9*t+5)%16);let T8=[UK],C8=[Qfe];for(let t=0;t<4;t++)for(let e of[T8,C8])e.push(e[t].map(r=>Wfe[r]));const FK=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),Yfe=T8.map((t,e)=>t.map(r=>FK[e][r])),Jfe=C8.map((t,e)=>t.map(r=>FK[e][r])),Xfe=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Zfe=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),Cw=(t,e)=>t<<e|t>>>32-e;function c9(t,e,r,n){return t===0?e^r^n:t===1?e&r|~e&n:t===2?(e|~r)^n:t===3?e&n|r&~n:e^(r|~n)}const Rw=new Uint32Array(16);class ede extends I8{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:r,h2:n,h3:i,h4:a}=this;return[e,r,n,i,a]}set(e,r,n,i,a){this.h0=e|0,this.h1=r|0,this.h2=n|0,this.h3=i|0,this.h4=a|0}process(e,r){for(let y=0;y<16;y++,r+=4)Rw[y]=e.getUint32(r,!0);let n=this.h0|0,i=n,a=this.h1|0,s=a,o=this.h2|0,c=o,u=this.h3|0,f=u,h=this.h4|0,m=h;for(let y=0;y<5;y++){const w=4-y,v=Xfe[y],g=Zfe[y],_=T8[y],b=C8[y],S=Yfe[y],A=Jfe[y];for(let I=0;I<16;I++){const E=Cw(n+c9(y,a,o,u)+Rw[_[I]]+v,S[I])+h|0;n=h,h=u,u=Cw(o,10)|0,o=a,a=E}for(let I=0;I<16;I++){const E=Cw(i+c9(w,s,c,f)+Rw[b[I]]+g,A[I])+m|0;i=m,m=f,f=Cw(c,10)|0,c=s,s=E}}this.set(this.h1+o+f|0,this.h2+u+m|0,this.h3+h+i|0,this.h4+n+s|0,this.h0+a+c|0)}roundClean(){Rw.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const tde=Cx(()=>new ede);let BK=!1;const qK=function(t){return tde(t)};let HK=qK;function Kg(t){const e=qt(t,"data");return _t(HK(e))}Kg._=qK;Kg.lock=function(){BK=!0};Kg.register=function(t){if(BK)throw new TypeError("ripemd160 is locked");HK=t};Object.freeze(Kg);let zK=!1;const VK=function(t,e,r,n,i){return kfe(t,e,r,n,i)};let GK=VK;function Lf(t,e,r,n,i){const a=qt(t,"password"),s=qt(e,"salt");return _t(GK(a,s,r,n,i))}Lf._=VK;Lf.lock=function(){zK=!0};Lf.register=function(t){if(zK)throw new Error("pbkdf2 is locked");GK=t};Object.freeze(Lf);let KK=!1;const WK=function(t){return new Uint8Array(Lfe(t))};let QK=WK;function Ku(t){return QK(t)}Ku._=WK;Ku.lock=function(){KK=!0};Ku.register=function(t){if(KK)throw new Error("randomBytes is locked");QK=t};Object.freeze(Ku);const hn=(t,e)=>t<<e|t>>>32-e;function u9(t,e,r,n,i,a){let s=t[e++]^r[n++],o=t[e++]^r[n++],c=t[e++]^r[n++],u=t[e++]^r[n++],f=t[e++]^r[n++],h=t[e++]^r[n++],m=t[e++]^r[n++],y=t[e++]^r[n++],w=t[e++]^r[n++],v=t[e++]^r[n++],g=t[e++]^r[n++],_=t[e++]^r[n++],b=t[e++]^r[n++],S=t[e++]^r[n++],A=t[e++]^r[n++],I=t[e++]^r[n++],E=s,p=o,O=c,N=u,F=f,V=h,de=m,ve=y,U=w,L=v,Q=g,ne=_,j=b,B=S,H=A,M=I;for(let q=0;q<8;q+=2)F^=hn(E+j|0,7),U^=hn(F+E|0,9),j^=hn(U+F|0,13),E^=hn(j+U|0,18),L^=hn(V+p|0,7),B^=hn(L+V|0,9),p^=hn(B+L|0,13),V^=hn(p+B|0,18),H^=hn(Q+de|0,7),O^=hn(H+Q|0,9),de^=hn(O+H|0,13),Q^=hn(de+O|0,18),N^=hn(M+ne|0,7),ve^=hn(N+M|0,9),ne^=hn(ve+N|0,13),M^=hn(ne+ve|0,18),p^=hn(E+N|0,7),O^=hn(p+E|0,9),N^=hn(O+p|0,13),E^=hn(N+O|0,18),de^=hn(V+F|0,7),ve^=hn(de+V|0,9),F^=hn(ve+de|0,13),V^=hn(F+ve|0,18),ne^=hn(Q+L|0,7),U^=hn(ne+Q|0,9),L^=hn(U+ne|0,13),Q^=hn(L+U|0,18),j^=hn(M+H|0,7),B^=hn(j+M|0,9),H^=hn(B+j|0,13),M^=hn(H+B|0,18);i[a++]=s+E|0,i[a++]=o+p|0,i[a++]=c+O|0,i[a++]=u+N|0,i[a++]=f+F|0,i[a++]=h+V|0,i[a++]=m+de|0,i[a++]=y+ve|0,i[a++]=w+U|0,i[a++]=v+L|0,i[a++]=g+Q|0,i[a++]=_+ne|0,i[a++]=b+j|0,i[a++]=S+B|0,i[a++]=A+H|0,i[a++]=I+M|0}function d0(t,e,r,n,i){let a=n+0,s=n+16*i;for(let o=0;o<16;o++)r[s+o]=t[e+(2*i-1)*16+o];for(let o=0;o<i;o++,a+=16,e+=16)u9(r,s,t,e,r,a),o>0&&(s+=16),u9(r,a,t,e+=16,r,s)}function YK(t,e,r){const n=EK({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:i,r:a,p:s,dkLen:o,asyncTick:c,maxmem:u,onProgress:f}=n;if(Ds(i),Ds(a),Ds(s),Ds(o),Ds(c),Ds(u),f!==void 0&&typeof f!="function")throw new Error("progressCb should be function");const h=128*a,m=h/4;if(i<=1||i&i-1||i>=2**(h/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(s<0||s>(2**32-1)*32/h)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(o<0||o>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const y=h*(i+s);if(y>u)throw new Error(`Scrypt: parameters too large, ${y} (128 * r * (N + p)) > ${u} (maxmem)`);const w=S8(Vg,t,e,{c:1,dkLen:h*s}),v=E_(w),g=E_(new Uint8Array(h*i)),_=E_(new Uint8Array(h));let b=()=>{};if(f){const S=2*i*s,A=Math.max(Math.floor(S/1e4),1);let I=0;b=()=>{I++,f&&(!(I%A)||I===S)&&f(I/S)}}return{N:i,r:a,p:s,dkLen:o,blockSize32:m,V:g,B32:v,B:w,tmp:_,blockMixCb:b,asyncTick:c}}function JK(t,e,r,n,i){const a=S8(Vg,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),i.fill(0),a}function rde(t,e,r){const{N:n,r:i,p:a,dkLen:s,blockSize32:o,V:c,B32:u,B:f,tmp:h,blockMixCb:m}=YK(t,e,r);for(let y=0;y<a;y++){const w=o*y;for(let v=0;v<o;v++)c[v]=u[w+v];for(let v=0,g=0;v<n-1;v++)d0(c,g,c,g+=o,i),m();d0(c,(n-1)*o,u,w,i),m();for(let v=0;v<n;v++){const g=u[w+o-16]%n;for(let _=0;_<o;_++)h[_]=u[w+_]^c[g*o+_];d0(h,0,u,w,i),m()}}return JK(t,s,f,c,h)}async function nde(t,e,r){const{N:n,r:i,p:a,dkLen:s,blockSize32:o,V:c,B32:u,B:f,tmp:h,blockMixCb:m,asyncTick:y}=YK(t,e,r);for(let w=0;w<a;w++){const v=o*w;for(let _=0;_<o;_++)c[_]=u[v+_];let g=0;await n9(n-1,y,()=>{d0(c,g,c,g+=o,i),m()}),d0(c,(n-1)*o,u,v,i),m(),await n9(n,y,()=>{const _=u[v+o-16]%n;for(let b=0;b<o;b++)h[b]=u[v+b]^c[_*o+b];d0(h,0,u,v,i),m()})}return JK(t,s,f,c,h)}let XK=!1,ZK=!1;const eW=async function(t,e,r,n,i,a,s){return await nde(t,e,{N:r,r:n,p:i,dkLen:a,onProgress:s})},tW=function(t,e,r,n,i,a){return rde(t,e,{N:r,r:n,p:i,dkLen:a})};let rW=eW,nW=tW;async function Wg(t,e,r,n,i,a,s){const o=qt(t,"passwd"),c=qt(e,"salt");return _t(await rW(o,c,r,n,i,a,s))}Wg._=eW;Wg.lock=function(){ZK=!0};Wg.register=function(t){if(ZK)throw new Error("scrypt is locked");rW=t};Object.freeze(Wg);function Qg(t,e,r,n,i,a){const s=qt(t,"passwd"),o=qt(e,"salt");return _t(nW(s,o,r,n,i,a))}Qg._=tW;Qg.lock=function(){XK=!0};Qg.register=function(t){if(XK)throw new Error("scryptSync is locked");nW=t};Object.freeze(Qg);const iW=function(t){return Mfe("sha256").update(t).digest()};let aW=iW,sW=!1;function uc(t){const e=qt(t,"data");return _t(aW(e))}uc._=iW;uc.lock=function(){sW=!0};uc.register=function(t){if(sW)throw new Error("sha256 is locked");aW=t};Object.freeze(uc);Object.freeze(uc);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const oW=BigInt(0),Nx=BigInt(1),ide=BigInt(2),Dx=t=>t instanceof Uint8Array,ade=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function mg(t){if(!Dx(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=ade[t[r]];return e}function cW(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function R8(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function yg(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(e/2);for(let n=0;n<r.length;n++){const i=n*2,a=t.slice(i,i+2),s=Number.parseInt(a,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");r[n]=s}return r}function dh(t){return R8(mg(t))}function N8(t){if(!Dx(t))throw new Error("Uint8Array expected");return R8(mg(Uint8Array.from(t).reverse()))}function vg(t,e){return yg(t.toString(16).padStart(e*2,"0"))}function D8(t,e){return vg(t,e).reverse()}function sde(t){return yg(cW(t))}function Wo(t,e,r){let n;if(typeof e=="string")try{n=yg(e)}catch(a){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${a}`)}else if(Dx(e))n=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n}function Xv(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!Dx(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function ode(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function cde(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function ude(t){let e;for(e=0;t>oW;t>>=Nx,e+=1);return e}function lde(t,e){return t>>BigInt(e)&Nx}const fde=(t,e,r)=>t|(r?Nx:oW)<<BigInt(e),M8=t=>(ide<<BigInt(t-1))-Nx,$S=t=>new Uint8Array(t),l9=t=>Uint8Array.from(t);function uW(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=$S(t),i=$S(t),a=0;const s=()=>{n.fill(1),i.fill(0),a=0},o=(...h)=>r(i,n,...h),c=(h=$S())=>{i=o(l9([0]),h),n=o(),h.length!==0&&(i=o(l9([1]),h),n=o())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let h=0;const m=[];for(;h<e;){n=o();const y=n.slice();m.push(y),h+=n.length}return Xv(...m)};return(h,m)=>{s(),c(h);let y;for(;!(y=m(u()));)c();return s(),y}}const dde={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function e1(t,e,r={}){const n=(i,a,s)=>{const o=dde[a];if(typeof o!="function")throw new Error(`Invalid validator "${a}", expected function`);const c=t[i];if(!(s&&c===void 0)&&!o(c,t))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${a}`)};for(const[i,a]of Object.entries(e))n(i,a,!1);for(const[i,a]of Object.entries(r))n(i,a,!0);return t}const hde=Object.freeze(Object.defineProperty({__proto__:null,bitGet:lde,bitLen:ude,bitMask:M8,bitSet:fde,bytesToHex:mg,bytesToNumberBE:dh,bytesToNumberLE:N8,concatBytes:Xv,createHmacDrbg:uW,ensureBytes:Wo,equalBytes:ode,hexToBytes:yg,hexToNumber:R8,numberToBytesBE:vg,numberToBytesLE:D8,numberToHexUnpadded:cW,numberToVarBytesBE:sde,utf8ToBytes:cde,validateObject:e1},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qi=BigInt(0),bi=BigInt(1),Id=BigInt(2),pde=BigInt(3),uR=BigInt(4),f9=BigInt(5),d9=BigInt(8);BigInt(9);BigInt(16);function fs(t,e){const r=t%e;return r>=qi?r:e+r}function gde(t,e,r){if(r<=qi||e<qi)throw new Error("Expected power/modulo > 0");if(r===bi)return qi;let n=bi;for(;e>qi;)e&bi&&(n=n*t%r),t=t*t%r,e>>=bi;return n}function Xs(t,e,r){let n=t;for(;e-- >qi;)n*=n,n%=r;return n}function lR(t,e){if(t===qi||e<=qi)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=fs(t,e),n=e,i=qi,a=bi;for(;r!==qi;){const o=n/r,c=n%r,u=i-a*o;n=r,r=c,i=a,a=u}if(n!==bi)throw new Error("invert: does not exist");return fs(i,e)}function mde(t){const e=(t-bi)/Id;let r,n,i;for(r=t-bi,n=0;r%Id===qi;r/=Id,n++);for(i=Id;i<t&&gde(i,e,t)!==t-bi;i++);if(n===1){const s=(t+bi)/uR;return function(c,u){const f=c.pow(u,s);if(!c.eql(c.sqr(f),u))throw new Error("Cannot find square root");return f}}const a=(r+bi)/Id;return function(o,c){if(o.pow(c,e)===o.neg(o.ONE))throw new Error("Cannot find square root");let u=n,f=o.pow(o.mul(o.ONE,i),r),h=o.pow(c,a),m=o.pow(c,r);for(;!o.eql(m,o.ONE);){if(o.eql(m,o.ZERO))return o.ZERO;let y=1;for(let v=o.sqr(m);y<u&&!o.eql(v,o.ONE);y++)v=o.sqr(v);const w=o.pow(f,bi<<BigInt(u-y-1));f=o.sqr(w),h=o.mul(h,w),m=o.mul(m,f),u=y}return h}}function yde(t){if(t%uR===pde){const e=(t+bi)/uR;return function(n,i){const a=n.pow(i,e);if(!n.eql(n.sqr(a),i))throw new Error("Cannot find square root");return a}}if(t%d9===f9){const e=(t-f9)/d9;return function(n,i){const a=n.mul(i,Id),s=n.pow(a,e),o=n.mul(i,s),c=n.mul(n.mul(o,Id),s),u=n.mul(o,n.sub(c,n.ONE));if(!n.eql(n.sqr(u),i))throw new Error("Cannot find square root");return u}}return mde(t)}const vde=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function bde(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=vde.reduce((n,i)=>(n[i]="function",n),e);return e1(t,r)}function wde(t,e,r){if(r<qi)throw new Error("Expected power > 0");if(r===qi)return t.ONE;if(r===bi)return e;let n=t.ONE,i=e;for(;r>qi;)r&bi&&(n=t.mul(n,i)),i=t.sqr(i),r>>=bi;return n}function _de(t,e){const r=new Array(e.length),n=e.reduce((a,s,o)=>t.is0(s)?a:(r[o]=a,t.mul(a,s)),t.ONE),i=t.inv(n);return e.reduceRight((a,s,o)=>t.is0(s)?a:(r[o]=t.mul(a,r[o]),t.mul(a,s)),i),r}function lW(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Ede(t,e,r=!1,n={}){if(t<=qi)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:a}=lW(t,e);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=yde(t),o=Object.freeze({ORDER:t,BITS:i,BYTES:a,MASK:M8(i),ZERO:qi,ONE:bi,create:c=>fs(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return qi<=c&&c<t},is0:c=>c===qi,isOdd:c=>(c&bi)===bi,neg:c=>fs(-c,t),eql:(c,u)=>c===u,sqr:c=>fs(c*c,t),add:(c,u)=>fs(c+u,t),sub:(c,u)=>fs(c-u,t),mul:(c,u)=>fs(c*u,t),pow:(c,u)=>wde(o,c,u),div:(c,u)=>fs(c*lR(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>lR(c,t),sqrt:n.sqrt||(c=>s(o,c)),invertBatch:c=>_de(o,c),cmov:(c,u,f)=>f?u:c,toBytes:c=>r?D8(c,a):vg(c,a),fromBytes:c=>{if(c.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${c.length}`);return r?N8(c):dh(c)}});return Object.freeze(o)}function fW(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function dW(t){const e=fW(t);return e+Math.ceil(e/2)}function xde(t,e,r=!1){const n=t.length,i=fW(e),a=dW(e);if(n<16||n<a||n>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${n}`);const s=r?dh(t):N8(t),o=fs(s,e-bi)+bi;return r?D8(o,i):vg(o,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ade=BigInt(0),kS=BigInt(1);function Sde(t,e){const r=(i,a)=>{const s=a.negate();return i?s:a},n=i=>{const a=Math.ceil(e/i)+1,s=2**(i-1);return{windows:a,windowSize:s}};return{constTimeNegate:r,unsafeLadder(i,a){let s=t.ZERO,o=i;for(;a>Ade;)a&kS&&(s=s.add(o)),o=o.double(),a>>=kS;return s},precomputeWindow(i,a){const{windows:s,windowSize:o}=n(a),c=[];let u=i,f=u;for(let h=0;h<s;h++){f=u,c.push(f);for(let m=1;m<o;m++)f=f.add(u),c.push(f);u=f.double()}return c},wNAF(i,a,s){const{windows:o,windowSize:c}=n(i);let u=t.ZERO,f=t.BASE;const h=BigInt(2**i-1),m=2**i,y=BigInt(i);for(let w=0;w<o;w++){const v=w*c;let g=Number(s&h);s>>=y,g>c&&(g-=m,s+=kS);const _=v,b=v+Math.abs(g)-1,S=w%2!==0,A=g<0;g===0?f=f.add(r(S,a[_])):u=u.add(r(A,a[b]))}return{p:u,f}},wNAFCached(i,a,s,o){const c=i._WINDOW_SIZE||1;let u=a.get(i);return u||(u=this.precomputeWindow(i,c),c!==1&&a.set(i,o(u))),this.wNAF(c,u,s)}}}function hW(t){return bde(t.Fp),e1(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...lW(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ide(t){const e=hW(t);e1(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:Ode,hexToBytes:Pde}=hde,jd={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=jd;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:Ode(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=jd,r=typeof t=="string"?Pde(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:a}=jd._parseInt(r.subarray(2)),{d:s,l:o}=jd._parseInt(a);if(o.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(t){const e=u=>Number.parseInt(u[0],16)&8?"00"+u:u,r=u=>{const f=u.toString(16);return f.length&1?`0${f}`:f},n=e(r(t.s)),i=e(r(t.r)),a=n.length/2,s=i.length/2,o=r(a),c=r(s);return`30${r(s+a+4)}02${c}${i}02${o}${n}`}},Fu=BigInt(0),go=BigInt(1);BigInt(2);const h9=BigInt(3);BigInt(4);function Tde(t){const e=Ide(t),{Fp:r}=e,n=e.toBytes||((w,v,g)=>{const _=v.toAffine();return Xv(Uint8Array.from([4]),r.toBytes(_.x),r.toBytes(_.y))}),i=e.fromBytes||(w=>{const v=w.subarray(1),g=r.fromBytes(v.subarray(0,r.BYTES)),_=r.fromBytes(v.subarray(r.BYTES,2*r.BYTES));return{x:g,y:_}});function a(w){const{a:v,b:g}=e,_=r.sqr(w),b=r.mul(_,w);return r.add(r.add(b,r.mul(w,v)),g)}if(!r.eql(r.sqr(e.Gy),a(e.Gx)))throw new Error("bad generator point: equation left != right");function s(w){return typeof w=="bigint"&&Fu<w&&w<e.n}function o(w){if(!s(w))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(w){const{allowedPrivateKeyLengths:v,nByteLength:g,wrapPrivateKey:_,n:b}=e;if(v&&typeof w!="bigint"){if(w instanceof Uint8Array&&(w=mg(w)),typeof w!="string"||!v.includes(w.length))throw new Error("Invalid key");w=w.padStart(g*2,"0")}let S;try{S=typeof w=="bigint"?w:dh(Wo("private key",w,g))}catch{throw new Error(`private key must be ${g} bytes, hex or bigint, not ${typeof w}`)}return _&&(S=fs(S,b)),o(S),S}const u=new Map;function f(w){if(!(w instanceof h))throw new Error("ProjectivePoint expected")}class h{constructor(v,g,_){if(this.px=v,this.py=g,this.pz=_,v==null||!r.isValid(v))throw new Error("x required");if(g==null||!r.isValid(g))throw new Error("y required");if(_==null||!r.isValid(_))throw new Error("z required")}static fromAffine(v){const{x:g,y:_}=v||{};if(!v||!r.isValid(g)||!r.isValid(_))throw new Error("invalid affine point");if(v instanceof h)throw new Error("projective point not allowed");const b=S=>r.eql(S,r.ZERO);return b(g)&&b(_)?h.ZERO:new h(g,_,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(v){const g=r.invertBatch(v.map(_=>_.pz));return v.map((_,b)=>_.toAffine(g[b])).map(h.fromAffine)}static fromHex(v){const g=h.fromAffine(i(Wo("pointHex",v)));return g.assertValidity(),g}static fromPrivateKey(v){return h.BASE.multiply(c(v))}_setWindowSize(v){this._WINDOW_SIZE=v,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:v,y:g}=this.toAffine();if(!r.isValid(v)||!r.isValid(g))throw new Error("bad point: x or y not FE");const _=r.sqr(g),b=a(v);if(!r.eql(_,b))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:v}=this.toAffine();if(r.isOdd)return!r.isOdd(v);throw new Error("Field doesn't support isOdd")}equals(v){f(v);const{px:g,py:_,pz:b}=this,{px:S,py:A,pz:I}=v,E=r.eql(r.mul(g,I),r.mul(S,b)),p=r.eql(r.mul(_,I),r.mul(A,b));return E&&p}negate(){return new h(this.px,r.neg(this.py),this.pz)}double(){const{a:v,b:g}=e,_=r.mul(g,h9),{px:b,py:S,pz:A}=this;let I=r.ZERO,E=r.ZERO,p=r.ZERO,O=r.mul(b,b),N=r.mul(S,S),F=r.mul(A,A),V=r.mul(b,S);return V=r.add(V,V),p=r.mul(b,A),p=r.add(p,p),I=r.mul(v,p),E=r.mul(_,F),E=r.add(I,E),I=r.sub(N,E),E=r.add(N,E),E=r.mul(I,E),I=r.mul(V,I),p=r.mul(_,p),F=r.mul(v,F),V=r.sub(O,F),V=r.mul(v,V),V=r.add(V,p),p=r.add(O,O),O=r.add(p,O),O=r.add(O,F),O=r.mul(O,V),E=r.add(E,O),F=r.mul(S,A),F=r.add(F,F),O=r.mul(F,V),I=r.sub(I,O),p=r.mul(F,N),p=r.add(p,p),p=r.add(p,p),new h(I,E,p)}add(v){f(v);const{px:g,py:_,pz:b}=this,{px:S,py:A,pz:I}=v;let E=r.ZERO,p=r.ZERO,O=r.ZERO;const N=e.a,F=r.mul(e.b,h9);let V=r.mul(g,S),de=r.mul(_,A),ve=r.mul(b,I),U=r.add(g,_),L=r.add(S,A);U=r.mul(U,L),L=r.add(V,de),U=r.sub(U,L),L=r.add(g,b);let Q=r.add(S,I);return L=r.mul(L,Q),Q=r.add(V,ve),L=r.sub(L,Q),Q=r.add(_,b),E=r.add(A,I),Q=r.mul(Q,E),E=r.add(de,ve),Q=r.sub(Q,E),O=r.mul(N,L),E=r.mul(F,ve),O=r.add(E,O),E=r.sub(de,O),O=r.add(de,O),p=r.mul(E,O),de=r.add(V,V),de=r.add(de,V),ve=r.mul(N,ve),L=r.mul(F,L),de=r.add(de,ve),ve=r.sub(V,ve),ve=r.mul(N,ve),L=r.add(L,ve),V=r.mul(de,L),p=r.add(p,V),V=r.mul(Q,L),E=r.mul(U,E),E=r.sub(E,V),V=r.mul(U,de),O=r.mul(Q,O),O=r.add(O,V),new h(E,p,O)}subtract(v){return this.add(v.negate())}is0(){return this.equals(h.ZERO)}wNAF(v){return y.wNAFCached(this,u,v,g=>{const _=r.invertBatch(g.map(b=>b.pz));return g.map((b,S)=>b.toAffine(_[S])).map(h.fromAffine)})}multiplyUnsafe(v){const g=h.ZERO;if(v===Fu)return g;if(o(v),v===go)return this;const{endo:_}=e;if(!_)return y.unsafeLadder(this,v);let{k1neg:b,k1:S,k2neg:A,k2:I}=_.splitScalar(v),E=g,p=g,O=this;for(;S>Fu||I>Fu;)S&go&&(E=E.add(O)),I&go&&(p=p.add(O)),O=O.double(),S>>=go,I>>=go;return b&&(E=E.negate()),A&&(p=p.negate()),p=new h(r.mul(p.px,_.beta),p.py,p.pz),E.add(p)}multiply(v){o(v);let g=v,_,b;const{endo:S}=e;if(S){const{k1neg:A,k1:I,k2neg:E,k2:p}=S.splitScalar(g);let{p:O,f:N}=this.wNAF(I),{p:F,f:V}=this.wNAF(p);O=y.constTimeNegate(A,O),F=y.constTimeNegate(E,F),F=new h(r.mul(F.px,S.beta),F.py,F.pz),_=O.add(F),b=N.add(V)}else{const{p:A,f:I}=this.wNAF(g);_=A,b=I}return h.normalizeZ([_,b])[0]}multiplyAndAddUnsafe(v,g,_){const b=h.BASE,S=(I,E)=>E===Fu||E===go||!I.equals(b)?I.multiplyUnsafe(E):I.multiply(E),A=S(this,g).add(S(v,_));return A.is0()?void 0:A}toAffine(v){const{px:g,py:_,pz:b}=this,S=this.is0();v==null&&(v=S?r.ONE:r.inv(b));const A=r.mul(g,v),I=r.mul(_,v),E=r.mul(b,v);if(S)return{x:r.ZERO,y:r.ZERO};if(!r.eql(E,r.ONE))throw new Error("invZ was invalid");return{x:A,y:I}}isTorsionFree(){const{h:v,isTorsionFree:g}=e;if(v===go)return!0;if(g)return g(h,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:v,clearCofactor:g}=e;return v===go?this:g?g(h,this):this.multiplyUnsafe(e.h)}toRawBytes(v=!0){return this.assertValidity(),n(h,this,v)}toHex(v=!0){return mg(this.toRawBytes(v))}}h.BASE=new h(e.Gx,e.Gy,r.ONE),h.ZERO=new h(r.ZERO,r.ONE,r.ZERO);const m=e.nBitLength,y=Sde(h,e.endo?Math.ceil(m/2):m);return{CURVE:e,ProjectivePoint:h,normPrivateKeyToScalar:c,weierstrassEquation:a,isWithinCurveOrder:s}}function Cde(t){const e=hW(t);return e1(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function Rde(t){const e=Cde(t),{Fp:r,n}=e,i=r.BYTES+1,a=2*r.BYTES+1;function s(L){return Fu<L&&L<r.ORDER}function o(L){return fs(L,n)}function c(L){return lR(L,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:f,weierstrassEquation:h,isWithinCurveOrder:m}=Tde({...e,toBytes(L,Q,ne){const j=Q.toAffine(),B=r.toBytes(j.x),H=Xv;return ne?H(Uint8Array.from([Q.hasEvenY()?2:3]),B):H(Uint8Array.from([4]),B,r.toBytes(j.y))},fromBytes(L){const Q=L.length,ne=L[0],j=L.subarray(1);if(Q===i&&(ne===2||ne===3)){const B=dh(j);if(!s(B))throw new Error("Point is not on curve");const H=h(B);let M=r.sqrt(H);const q=(M&go)===go;return(ne&1)===1!==q&&(M=r.neg(M)),{x:B,y:M}}else if(Q===a&&ne===4){const B=r.fromBytes(j.subarray(0,r.BYTES)),H=r.fromBytes(j.subarray(r.BYTES,2*r.BYTES));return{x:B,y:H}}else throw new Error(`Point of length ${Q} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),y=L=>mg(vg(L,e.nByteLength));function w(L){const Q=n>>go;return L>Q}function v(L){return w(L)?o(-L):L}const g=(L,Q,ne)=>dh(L.slice(Q,ne));class _{constructor(Q,ne,j){this.r=Q,this.s=ne,this.recovery=j,this.assertValidity()}static fromCompact(Q){const ne=e.nByteLength;return Q=Wo("compactSignature",Q,ne*2),new _(g(Q,0,ne),g(Q,ne,2*ne))}static fromDER(Q){const{r:ne,s:j}=jd.toSig(Wo("DER",Q));return new _(ne,j)}assertValidity(){if(!m(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!m(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(Q){return new _(this.r,this.s,Q)}recoverPublicKey(Q){const{r:ne,s:j,recovery:B}=this,H=p(Wo("msgHash",Q));if(B==null||![0,1,2,3].includes(B))throw new Error("recovery id invalid");const M=B===2||B===3?ne+e.n:ne;if(M>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const q=B&1?"03":"02",k=u.fromHex(q+y(M)),$=c(M),G=o(-H*$),pe=o(j*$),Y=u.BASE.multiplyAndAddUnsafe(k,G,pe);if(!Y)throw new Error("point at infinify");return Y.assertValidity(),Y}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return yg(this.toDERHex())}toDERHex(){return jd.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return yg(this.toCompactHex())}toCompactHex(){return y(this.r)+y(this.s)}}const b={isValidPrivateKey(L){try{return f(L),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const L=dW(e.n);return xde(e.randomBytes(L),e.n)},precompute(L=8,Q=u.BASE){return Q._setWindowSize(L),Q.multiply(BigInt(3)),Q}};function S(L,Q=!0){return u.fromPrivateKey(L).toRawBytes(Q)}function A(L){const Q=L instanceof Uint8Array,ne=typeof L=="string",j=(Q||ne)&&L.length;return Q?j===i||j===a:ne?j===2*i||j===2*a:L instanceof u}function I(L,Q,ne=!0){if(A(L))throw new Error("first arg must be private key");if(!A(Q))throw new Error("second arg must be public key");return u.fromHex(Q).multiply(f(L)).toRawBytes(ne)}const E=e.bits2int||function(L){const Q=dh(L),ne=L.length*8-e.nBitLength;return ne>0?Q>>BigInt(ne):Q},p=e.bits2int_modN||function(L){return o(E(L))},O=M8(e.nBitLength);function N(L){if(typeof L!="bigint")throw new Error("bigint expected");if(!(Fu<=L&&L<O))throw new Error(`bigint expected < 2^${e.nBitLength}`);return vg(L,e.nByteLength)}function F(L,Q,ne=V){if(["recovered","canonical"].some(ce=>ce in ne))throw new Error("sign() legacy options not supported");const{hash:j,randomBytes:B}=e;let{lowS:H,prehash:M,extraEntropy:q}=ne;H==null&&(H=!0),L=Wo("msgHash",L),M&&(L=Wo("prehashed msgHash",j(L)));const k=p(L),$=f(Q),G=[N($),N(k)];if(q!=null){const ce=q===!0?B(r.BYTES):q;G.push(Wo("extraEntropy",ce))}const pe=Xv(...G),Y=k;function te(ce){const T=E(ce);if(!m(T))return;const le=c(T),ze=u.BASE.multiply(T).toAffine(),et=o(ze.x);if(et===Fu)return;const yt=o(le*o(Y+et*$));if(yt===Fu)return;let vt=(ze.x===et?0:2)|Number(ze.y&go),gt=yt;return H&&w(yt)&&(gt=v(yt),vt^=1),new _(et,gt,vt)}return{seed:pe,k2sig:te}}const V={lowS:e.lowS,prehash:!1},de={lowS:e.lowS,prehash:!1};function ve(L,Q,ne=V){const{seed:j,k2sig:B}=F(L,Q,ne),H=e;return uW(H.hash.outputLen,H.nByteLength,H.hmac)(j,B)}u.BASE._setWindowSize(8);function U(L,Q,ne,j=de){var ze;const B=L;if(Q=Wo("msgHash",Q),ne=Wo("publicKey",ne),"strict"in j)throw new Error("options.strict was renamed to lowS");const{lowS:H,prehash:M}=j;let q,k;try{if(typeof B=="string"||B instanceof Uint8Array)try{q=_.fromDER(B)}catch(et){if(!(et instanceof jd.Err))throw et;q=_.fromCompact(B)}else if(typeof B=="object"&&typeof B.r=="bigint"&&typeof B.s=="bigint"){const{r:et,s:yt}=B;q=new _(et,yt)}else throw new Error("PARSE");k=u.fromHex(ne)}catch(et){if(et.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(H&&q.hasHighS())return!1;M&&(Q=e.hash(Q));const{r:$,s:G}=q,pe=p(Q),Y=c(G),te=o(pe*Y),ce=o($*Y),T=(ze=u.BASE.multiplyAndAddUnsafe(k,te,ce))==null?void 0:ze.toAffine();return T?o(T.x)===$:!1}return{CURVE:e,getPublicKey:S,getSharedSecret:I,sign:ve,verify:U,ProjectivePoint:u,Signature:_,utils:b}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Nde(t){return{hash:t,hmac:(e,...r)=>Rx(t,e,nfe(...r)),randomBytes:afe}}function Dde(t,e){const r=n=>Rde({...t,...Nde(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const pW=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),p9=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Mde=BigInt(1),fR=BigInt(2),g9=(t,e)=>(t+e/fR)/e;function $de(t){const e=pW,r=BigInt(3),n=BigInt(6),i=BigInt(11),a=BigInt(22),s=BigInt(23),o=BigInt(44),c=BigInt(88),u=t*t*t%e,f=u*u*t%e,h=Xs(f,r,e)*f%e,m=Xs(h,r,e)*f%e,y=Xs(m,fR,e)*u%e,w=Xs(y,i,e)*y%e,v=Xs(w,a,e)*w%e,g=Xs(v,o,e)*v%e,_=Xs(g,c,e)*g%e,b=Xs(_,o,e)*v%e,S=Xs(b,r,e)*f%e,A=Xs(S,s,e)*w%e,I=Xs(A,n,e)*u%e,E=Xs(I,fR,e);if(!dR.eql(dR.sqr(E),t))throw new Error("Cannot find square root");return E}const dR=Ede(pW,void 0,void 0,{sqrt:$de}),kl=Dde({a:BigInt(0),b:BigInt(7),Fp:dR,n:p9,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=p9,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Mde*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=r,s=BigInt("0x100000000000000000000000000000000"),o=g9(a*t,e),c=g9(-n*t,e);let u=fs(t-o*r-c*i,e),f=fs(-o*n-c*a,e);const h=u>s,m=f>s;if(h&&(u=e-u),m&&(f=e-f),u>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:h,k1:u,k2neg:m,k2:f}}}},Vg);BigInt(0);kl.ProjectivePoint;const hR="0x0000000000000000000000000000000000000000",m9="0x0000000000000000000000000000000000000000000000000000000000000000",kde=`Ethereum Signed Message:
69
+ `,y9=BigInt(0),v9=BigInt(1),b9=BigInt(2),w9=BigInt(27),_9=BigInt(28),Nw=BigInt(35),mp={};function E9(t){return bh(gs(t),32)}var T0,C0,R0,Yd;const Vo=class Vo{constructor(e,r,n,i){Qe(this,T0,void 0);Qe(this,C0,void 0);Qe(this,R0,void 0);Qe(this,Yd,void 0);kf(e,mp,"Signature"),Te(this,T0,r),Te(this,C0,n),Te(this,R0,i),Te(this,Yd,null)}get r(){return W(this,T0)}set r(e){Ne(l0(e)===32,"invalid r","value",e),Te(this,T0,_t(e))}get s(){return W(this,C0)}set s(e){Ne(l0(e)===32,"invalid s","value",e);const r=_t(e);Ne(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),Te(this,C0,r)}get v(){return W(this,R0)}set v(e){const r=jr(e,"value");Ne(r===27||r===28,"invalid v","v",e),Te(this,R0,r)}get networkV(){return W(this,Yd)}get legacyChainId(){const e=this.networkV;return e==null?null:Vo.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=qt(this.s);return this.yParity&&(e[0]|=128),_t(e)}get compactSerialized(){return Bn([this.r,this.yParityAndS])}get serialized(){return Bn([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Vo(mp,this.r,this.s,this.v);return this.networkV&&Te(e,Yd,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=rr(e,"v");return r==w9||r==_9?y9:(Ne(r>=Nw,"invalid EIP-155 v","v",e),(r-Nw)/b9)}static getChainIdV(e,r){return rr(e)*b9+BigInt(35+r-27)}static getNormalizedV(e){const r=rr(e);return r===y9||r===w9?27:r===v9||r===_9?28:(Ne(r>=Nw,"invalid v","v",e),r&v9?27:28)}static from(e){function r(u,f){Ne(u,f,"signature",e)}if(e==null)return new Vo(mp,m9,m9,27);if(typeof e=="string"){const u=qt(e,"signature");if(u.length===64){const f=_t(u.slice(0,32)),h=u.slice(32,64),m=h[0]&128?28:27;return h[0]&=127,new Vo(mp,f,_t(h),m)}if(u.length===65){const f=_t(u.slice(0,32)),h=u.slice(32,64);r((h[0]&128)===0,"non-canonical s");const m=Vo.getNormalizedV(u[64]);return new Vo(mp,f,_t(h),m)}r(!1,"invalid raw signature length")}if(e instanceof Vo)return e.clone();const n=e.r;r(n!=null,"missing r");const i=E9(n),a=function(u,f){if(u!=null)return E9(u);if(f!=null){r(ai(f,32),"invalid yParityAndS");const h=qt(f);return h[0]&=127,_t(h)}r(!1,"missing s")}(e.s,e.yParityAndS);r((qt(a)[0]&128)==0,"non-canonical s");const{networkV:s,v:o}=function(u,f,h){if(u!=null){const m=rr(u);return{networkV:m>=Nw?m:void 0,v:Vo.getNormalizedV(m)}}if(f!=null)return r(ai(f,32),"invalid yParityAndS"),{v:qt(f)[0]&128?28:27};if(h!=null){switch(jr(h,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new Vo(mp,i,a,o);return s&&Te(c,Yd,s),r(e.yParity==null||jr(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};T0=new WeakMap,C0=new WeakMap,R0=new WeakMap,Yd=new WeakMap;let lc=Vo;var Cu;const Cd=class Cd{constructor(e){Qe(this,Cu,void 0);Ne(l0(e)===32,"invalid private key","privateKey","[REDACTED]"),Te(this,Cu,_t(e))}get privateKey(){return W(this,Cu)}get publicKey(){return Cd.computePublicKey(W(this,Cu))}get compressedPublicKey(){return Cd.computePublicKey(W(this,Cu),!0)}sign(e){Ne(l0(e)===32,"invalid digest length","digest",e);const r=kl.sign(Pa(e),Pa(W(this,Cu)),{lowS:!0});return lc.from({r:Zu(r.r,32),s:Zu(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=Cd.computePublicKey(e);return _t(kl.getSharedSecret(Pa(W(this,Cu)),qt(r),!1))}static computePublicKey(e,r){let n=qt(e,"key");if(n.length===32){const a=kl.getPublicKey(n,!!r);return _t(a)}if(n.length===64){const a=new Uint8Array(65);a[0]=4,a.set(n,1),n=a}const i=kl.ProjectivePoint.fromHex(n);return _t(i.toRawBytes(r))}static recoverPublicKey(e,r){Ne(l0(e)===32,"invalid digest length","digest",e);const n=lc.from(r);let i=kl.Signature.fromCompact(Pa(Bn([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const a=i.recoverPublicKey(Pa(e));return Ne(a!=null,"invalid signautre for digest","signature",r),"0x"+a.toHex(!1)}static addPoints(e,r,n){const i=kl.ProjectivePoint.fromHex(Cd.computePublicKey(e).substring(2)),a=kl.ProjectivePoint.fromHex(Cd.computePublicKey(r).substring(2));return"0x"+i.add(a).toHex(!!n)}};Cu=new WeakMap;let Vc=Cd;const Lde=BigInt(0),jde=BigInt(36);function x9(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=qt(Fn(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const $8={};for(let t=0;t<10;t++)$8[String(t)]=String(t);for(let t=0;t<26;t++)$8[String.fromCharCode(65+t)]=String(10+t);const A9=15;function Ude(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>$8[n]).join("");for(;e.length>=A9;){let n=e.substring(0,A9);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}const Fde=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function Bde(t){t=t.toLowerCase();let e=Lde;for(let r=0;r<t.length;r++)e=e*jde+Fde[t[r]];return e}function sn(t){if(Ne(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=x9(t);return Ne(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){Ne(t.substring(2,4)===Ude(t),"bad icap checksum","address",t);let e=Bde(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return x9("0x"+e)}Ne(!1,"invalid address","address",t)}function qde(t){const e=sn(t.from);let n=rr(t.nonce,"tx.nonce").toString(16);return n==="0"?n="0x":n.length%2?n="0x0"+n:n="0x"+n,sn(zn(Fn(Jv([e,n])),12))}function gW(t){return t&&typeof t.getAddress=="function"}async function LS(t,e){const r=await e;return(r==null||r==="0x0000000000000000000000000000000000000000")&&(it(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),Ne(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),sn(r)}function sa(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?sn(t):(it(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),LS(t,e.resolveName(t)));if(gW(t))return LS(t,t.getAddress());if(t&&typeof t.then=="function")return LS(t,t);Ne(!1,"unsupported addressable value","target",t)}const wu={};function jt(t,e){let r=!1;return e<0&&(r=!0,e*=-1),new Ra(wu,`${r?"":"u"}int${e}`,t,{signed:r,width:e})}function pn(t,e){return new Ra(wu,`bytes${e||""}`,t,{size:e})}const S9=Symbol.for("_ethers_typed");var Jd;const Eu=class Eu{constructor(e,r,n,i){Be(this,"type");Be(this,"value");Qe(this,Jd,void 0);Be(this,"_typedSymbol");i==null&&(i=null),kf(wu,e,"Typed"),Qt(this,{_typedSymbol:S9,type:r,value:n}),Te(this,Jd,i),this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(e=>e.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return W(this,Jd)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return W(this,Jd)===!0?-1:W(this,Jd)===!1?this.value.length:null}static from(e,r){return new Eu(wu,e,r)}static uint8(e){return jt(e,8)}static uint16(e){return jt(e,16)}static uint24(e){return jt(e,24)}static uint32(e){return jt(e,32)}static uint40(e){return jt(e,40)}static uint48(e){return jt(e,48)}static uint56(e){return jt(e,56)}static uint64(e){return jt(e,64)}static uint72(e){return jt(e,72)}static uint80(e){return jt(e,80)}static uint88(e){return jt(e,88)}static uint96(e){return jt(e,96)}static uint104(e){return jt(e,104)}static uint112(e){return jt(e,112)}static uint120(e){return jt(e,120)}static uint128(e){return jt(e,128)}static uint136(e){return jt(e,136)}static uint144(e){return jt(e,144)}static uint152(e){return jt(e,152)}static uint160(e){return jt(e,160)}static uint168(e){return jt(e,168)}static uint176(e){return jt(e,176)}static uint184(e){return jt(e,184)}static uint192(e){return jt(e,192)}static uint200(e){return jt(e,200)}static uint208(e){return jt(e,208)}static uint216(e){return jt(e,216)}static uint224(e){return jt(e,224)}static uint232(e){return jt(e,232)}static uint240(e){return jt(e,240)}static uint248(e){return jt(e,248)}static uint256(e){return jt(e,256)}static uint(e){return jt(e,256)}static int8(e){return jt(e,-8)}static int16(e){return jt(e,-16)}static int24(e){return jt(e,-24)}static int32(e){return jt(e,-32)}static int40(e){return jt(e,-40)}static int48(e){return jt(e,-48)}static int56(e){return jt(e,-56)}static int64(e){return jt(e,-64)}static int72(e){return jt(e,-72)}static int80(e){return jt(e,-80)}static int88(e){return jt(e,-88)}static int96(e){return jt(e,-96)}static int104(e){return jt(e,-104)}static int112(e){return jt(e,-112)}static int120(e){return jt(e,-120)}static int128(e){return jt(e,-128)}static int136(e){return jt(e,-136)}static int144(e){return jt(e,-144)}static int152(e){return jt(e,-152)}static int160(e){return jt(e,-160)}static int168(e){return jt(e,-168)}static int176(e){return jt(e,-176)}static int184(e){return jt(e,-184)}static int192(e){return jt(e,-192)}static int200(e){return jt(e,-200)}static int208(e){return jt(e,-208)}static int216(e){return jt(e,-216)}static int224(e){return jt(e,-224)}static int232(e){return jt(e,-232)}static int240(e){return jt(e,-240)}static int248(e){return jt(e,-248)}static int256(e){return jt(e,-256)}static int(e){return jt(e,-256)}static bytes1(e){return pn(e,1)}static bytes2(e){return pn(e,2)}static bytes3(e){return pn(e,3)}static bytes4(e){return pn(e,4)}static bytes5(e){return pn(e,5)}static bytes6(e){return pn(e,6)}static bytes7(e){return pn(e,7)}static bytes8(e){return pn(e,8)}static bytes9(e){return pn(e,9)}static bytes10(e){return pn(e,10)}static bytes11(e){return pn(e,11)}static bytes12(e){return pn(e,12)}static bytes13(e){return pn(e,13)}static bytes14(e){return pn(e,14)}static bytes15(e){return pn(e,15)}static bytes16(e){return pn(e,16)}static bytes17(e){return pn(e,17)}static bytes18(e){return pn(e,18)}static bytes19(e){return pn(e,19)}static bytes20(e){return pn(e,20)}static bytes21(e){return pn(e,21)}static bytes22(e){return pn(e,22)}static bytes23(e){return pn(e,23)}static bytes24(e){return pn(e,24)}static bytes25(e){return pn(e,25)}static bytes26(e){return pn(e,26)}static bytes27(e){return pn(e,27)}static bytes28(e){return pn(e,28)}static bytes29(e){return pn(e,29)}static bytes30(e){return pn(e,30)}static bytes31(e){return pn(e,31)}static bytes32(e){return pn(e,32)}static address(e){return new Eu(wu,"address",e)}static bool(e){return new Eu(wu,"bool",!!e)}static bytes(e){return new Eu(wu,"bytes",e)}static string(e){return new Eu(wu,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new Eu(wu,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===S9}static dereference(e,r){if(Eu.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Jd=new WeakMap;let Ra=Eu;class Hde extends al{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=Ra.dereference(r,"string");try{n=sn(n)}catch(i){return this._throwError(i.message,r)}return e.writeValue(n)}decode(e){return sn(Zu(e.readValue(),20))}}class zde extends al{constructor(r){super(r.name,r.type,"_",r.dynamic);Be(this,"coder");this.coder=r}defaultValue(){return this.coder.defaultValue()}encode(r,n){return this.coder.encode(r,n)}decode(r){return this.coder.decode(r)}}function mW(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(u=>{const f=u.localName;return it(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:r}),it(!c[f],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:u},value:r}),c[f]=!0,r[f]})}else Ne(!1,"invalid tuple value","tuple",r);Ne(e.length===n.length,"types/value length mismatch","tuple",r);let i=new sR,a=new sR,s=[];e.forEach((c,u)=>{let f=n[u];if(c.dynamic){let h=a.length;c.encode(a,f);let m=i.writeUpdatableValue();s.push(y=>{m(y+h)})}else c.encode(i,f)}),s.forEach(c=>{c(i.length)});let o=t.appendWriter(i);return o+=t.appendWriter(a),o}function yW(t,e){let r=[],n=[],i=t.subReader(0);return e.forEach(a=>{let s=null;if(a.dynamic){let o=t.readIndex(),c=i.subReader(o);try{s=a.decode(c)}catch(u){if(wo(u,"BUFFER_OVERRUN"))throw u;s=u,s.baseType=a.name,s.name=a.localName,s.type=a.type}}else try{s=a.decode(t)}catch(o){if(wo(o,"BUFFER_OVERRUN"))throw o;s=o,s.baseType=a.name,s.name=a.localName,s.type=a.type}if(s==null)throw new Error("investigate");r.push(s),n.push(a.localName||null)}),_E.fromItems(r,n)}class Vde extends al{constructor(r,n,i){const a=r.type+"["+(n>=0?n:"")+"]",s=n===-1||r.dynamic;super("array",a,i,s);Be(this,"coder");Be(this,"length");Qt(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let i=0;i<this.length;i++)n.push(r);return n}encode(r,n){const i=Ra.dereference(n,"array");Array.isArray(i)||this._throwError("expected array value",i);let a=this.length;a===-1&&(a=i.length,r.writeValue(i.length)),nK(i.length,a,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let o=0;o<i.length;o++)s.push(this.coder);return mW(r,s,i)}decode(r){let n=this.length;n===-1&&(n=r.readIndex(),it(n*Va<=r.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:r.bytes,offset:n*Va,length:r.dataLength}));let i=[];for(let a=0;a<n;a++)i.push(new zde(this.coder));return yW(r,i)}}class Gde extends al{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,r){const n=Ra.dereference(r,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}}class vW extends al{constructor(e,r){super(e,e,r,!0)}defaultValue(){return"0x"}encode(e,r){r=Pa(r);let n=e.writeValue(r.length);return n+=e.writeBytes(r),n}decode(e){return e.readBytes(e.readIndex(),!0)}}class Kde extends vW{constructor(e){super("bytes",e)}decode(e){return _t(super.decode(e))}}class Wde extends al{constructor(r,n){let i="bytes"+String(r);super(i,i,n,!1);Be(this,"size");Qt(this,{size:r},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(r,n){let i=Pa(Ra.dereference(n,this.type));return i.length!==this.size&&this._throwError("incorrect data length",n),r.writeBytes(i)}decode(r){return _t(r.readBytes(this.size))}}const Qde=new Uint8Array([]);class Yde extends al{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes(Qde)}decode(e){return e.readBytes(0),null}}const Jde=BigInt(0),Xde=BigInt(1),Zde=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class ehe extends al{constructor(r,n,i){const a=(n?"int":"uint")+r*8;super(a,a,i,!1);Be(this,"size");Be(this,"signed");Qt(this,{size:r,signed:n},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(r,n){let i=rr(Ra.dereference(n,this.type)),a=Ld(Zde,Va*8);if(this.signed){let s=Ld(a,this.size*8-1);(i>s||i<-(s+Xde))&&this._throwError("value out-of-bounds",n),i=cK(i,8*Va)}else(i<Jde||i>Ld(a,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(i)}decode(r){let n=Ld(r.readValue(),this.size*8);return this.signed&&(n=wE(n,this.size*8)),n}}class the extends vW{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Wa(Ra.dereference(r,"string")))}decode(e){return _8(super.decode(e))}}class Dw extends al{constructor(r,n){let i=!1;const a=[];r.forEach(o=>{o.dynamic&&(i=!0),a.push(o.type)});const s="tuple("+a.join(",")+")";super("tuple",s,n,i);Be(this,"coders");Qt(this,{coders:Object.freeze(r.slice())})}defaultValue(){const r=[];this.coders.forEach(i=>{r.push(i.defaultValue())});const n=this.coders.reduce((i,a)=>{const s=a.localName;return s&&(i[s]||(i[s]=0),i[s]++),i},{});return this.coders.forEach((i,a)=>{let s=i.localName;!s||n[s]!==1||(s==="length"&&(s="_length"),r[s]==null&&(r[s]=r[a]))}),Object.freeze(r)}encode(r,n){const i=Ra.dereference(n,"tuple");return mW(r,this.coders,i)}decode(r){return yW(r,this.coders)}}function el(t){return Fn(Wa(t))}var rhe="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const I9=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),O9=4;function nhe(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,a=[0,1];for(let I=1;I<n;I++)a.push(i+=r());let s=r(),o=e;e+=s;let c=0,u=0;function f(){return c==0&&(u=u<<8|t[e++],c=8),u>>--c&1}const h=31,m=2**h,y=m>>>1,w=y>>1,v=m-1;let g=0;for(let I=0;I<h;I++)g=g<<1|f();let _=[],b=0,S=m;for(;;){let I=Math.floor(((g-b+1)*i-1)/S),E=0,p=n;for(;p-E>1;){let F=E+p>>>1;I<a[F]?p=F:E=F}if(E==0)break;_.push(E);let O=b+Math.floor(S*a[E]/i),N=b+Math.floor(S*a[E+1]/i)-1;for(;!((O^N)&y);)g=g<<1&v|f(),O=O<<1&v,N=N<<1&v|1;for(;O&~N&w;)g=g&y|g<<1&v>>>1|f(),O=O<<1^y,N=(N^y)<<1|y|1;b=O,S=1+N-O}let A=n-4;return _.map(I=>{switch(I-A){case 3:return A+65792+(t[o++]<<16|t[o++]<<8|t[o++]);case 2:return A+256+(t[o++]<<8|t[o++]);case 1:return A+t[o++];default:return I-1}})}function ihe(t){let e=0;return()=>t[e++]}function bW(t){return ihe(nhe(ahe(t)))}function ahe(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,a)=>e[i.charCodeAt(0)]=a);let r=t.length,n=new Uint8Array(6*r>>3);for(let i=0,a=0,s=0,o=0;i<r;i++)o=o<<6|e[t.charCodeAt(i)],s+=6,s>=8&&(n[a++]=o>>(s-=8));return n}function she(t){return t&1?~t>>1:t>>1}function ohe(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=she(e());return r}function Zv(t,e=0){let r=[];for(;;){let n=t(),i=t();if(!i)break;e+=n;for(let a=0;a<i;a++)r.push(e+a);e+=i+1}return r}function wW(t){return eb(()=>{let e=Zv(t);if(e.length)return e})}function _W(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(che(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(uhe(r,t))}return e.flat()}function eb(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function EW(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)ohe(t,r).forEach((a,s)=>n[s].push(a));return n}function che(t,e){let r=1+e(),n=e(),i=eb(e);return EW(i.length,1+t,e).flatMap((s,o)=>{let[c,...u]=s;return Array(i[o]).fill().map((f,h)=>{let m=h*n;return[c+h*r,u.map(y=>y+m)]})})}function uhe(t,e){let r=1+e();return EW(r,1+t,e).map(i=>[i[0],i.slice(1)])}function lhe(t){let e=[],r=Zv(t);return i(n([]),[]),e;function n(a){let s=t(),o=eb(()=>{let c=Zv(t).map(u=>r[u]);if(c.length)return n(c)});return{S:s,B:o,Q:a}}function i({S:a,B:s},o,c){if(!(a&4&&c===o[o.length-1])){a&2&&(c=o[o.length-1]),a&1&&e.push(o);for(let u of s)for(let f of u.Q)i(u,[...o,f],c)}}}function fhe(t){return t.toString(16).toUpperCase().padStart(2,"0")}function xW(t){return`{${fhe(t)}}`}function dhe(t){let e=[];for(let r=0,n=t.length;r<n;){let i=t.codePointAt(r);r+=i<65536?1:2,e.push(i)}return e}function bg(t){let r=t.length;if(r<4096)return String.fromCodePoint(...t);let n=[];for(let i=0;i<r;)n.push(String.fromCodePoint(...t.slice(i,i+=4096)));return n.join("")}function hhe(t,e){let r=t.length,n=r-e.length;for(let i=0;n==0&&i<r;i++)n=t[i]-e[i];return n}var phe="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const tb=44032,EE=4352,xE=4449,AE=4519,AW=19,SW=21,wg=28,SE=SW*wg,ghe=AW*SE,mhe=tb+ghe,yhe=EE+AW,vhe=xE+SW,bhe=AE+wg;function Ky(t){return t>>24&255}function IW(t){return t&16777215}let pR,P9,gR,A_;function whe(){let t=bW(phe);pR=new Map(wW(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),P9=new Set(Zv(t)),gR=new Map,A_=new Map;for(let[e,r]of _W(t)){if(!P9.has(e)&&r.length==2){let[n,i]=r,a=A_.get(n);a||(a=new Map,A_.set(n,a)),a.set(i,e)}gR.set(e,r.reverse())}}function OW(t){return t>=tb&&t<mhe}function _he(t,e){if(t>=EE&&t<yhe&&e>=xE&&e<vhe)return tb+(t-EE)*SE+(e-xE)*wg;if(OW(t)&&e>AE&&e<bhe&&(t-tb)%wg==0)return t+(e-AE);{let r=A_.get(t);return r&&(r=r.get(e),r)?r:-1}}function PW(t){pR||whe();let e=[],r=[],n=!1;function i(a){let s=pR.get(a);s&&(n=!0,a|=s),e.push(a)}for(let a of t)for(;;){if(a<128)e.push(a);else if(OW(a)){let s=a-tb,o=s/SE|0,c=s%SE/wg|0,u=s%wg;i(EE+o),i(xE+c),u>0&&i(AE+u)}else{let s=gR.get(a);s?r.push(...s):i(a)}if(!r.length)break;a=r.pop()}if(n&&e.length>1){let a=Ky(e[0]);for(let s=1;s<e.length;s++){let o=Ky(e[s]);if(o==0||a<=o){a=o;continue}let c=s-1;for(;;){let u=e[c+1];if(e[c+1]=e[c],e[c]=u,!c||(a=Ky(e[--c]),a<=o))break}a=Ky(e[s])}}return e}function Ehe(t){let e=[],r=[],n=-1,i=0;for(let a of t){let s=Ky(a),o=IW(a);if(n==-1)s==0?n=o:e.push(o);else if(i>0&&i>=s)s==0?(e.push(n,...r),r.length=0,n=o):r.push(o),i=s;else{let c=_he(n,o);c>=0?n=c:i==0&&s==0?(e.push(n),n=o):(r.push(o),i=s)}}return n>=0&&e.push(n,...r),e}function TW(t){return PW(t).map(IW)}function xhe(t){return Ehe(PW(t))}const T9=45,CW=".",RW=65039,NW=1,Wp=t=>Array.from(t);function rb(t,e){return t.P.has(e)||t.Q.has(e)}class Ahe extends Array{get is_emoji(){return!0}}let mR,DW,Ud,yR,MW,h0,jS,Cp,$W,C9,vR;function k8(){if(mR)return;let t=bW(rhe);const e=()=>Zv(t),r=()=>new Set(e());mR=new Map(_W(t)),DW=r(),Ud=e(),yR=new Set(e().map(f=>Ud[f])),Ud=new Set(Ud),MW=r(),r();let n=wW(t),i=t();const a=()=>new Set(e().flatMap(f=>n[f]).concat(e()));h0=eb(f=>{let h=eb(t).map(m=>m+96);if(h.length){let m=f>=i;h[0]-=32,h=bg(h),m&&(h=`Restricted[${h}]`);let y=a(),w=a(),v=!t();return{N:h,P:y,Q:w,M:v,R:m}}}),jS=r(),Cp=new Map;let s=e().concat(Wp(jS)).sort((f,h)=>f-h);s.forEach((f,h)=>{let m=t(),y=s[h]=m?s[h-m]:{V:[],M:new Map};y.V.push(f),jS.has(f)||Cp.set(f,y)});for(let{V:f,M:h}of new Set(Cp.values())){let m=[];for(let w of f){let v=h0.filter(_=>rb(_,w)),g=m.find(({G:_})=>v.some(b=>_.has(b)));g||(g={G:new Set,V:[]},m.push(g)),g.V.push(w),v.forEach(_=>g.G.add(_))}let y=m.flatMap(w=>Wp(w.G));for(let{G:w,V:v}of m){let g=new Set(y.filter(_=>!w.has(_)));for(let _ of v)h.set(_,g)}}let o=new Set,c=new Set;const u=f=>o.has(f)?c.add(f):o.add(f);for(let f of h0){for(let h of f.P)u(h);for(let h of f.Q)u(h)}for(let f of o)!Cp.has(f)&&!c.has(f)&&Cp.set(f,NW);$W=new Set(Wp(o).concat(Wp(TW(o)))),C9=lhe(t).map(f=>Ahe.from(f)).sort(hhe),vR=new Map;for(let f of C9){let h=[vR];for(let m of f){let y=h.map(w=>{let v=w.get(m);return v||(v=new Map,w.set(m,v)),v});m===RW?h.push(...y):h=y}for(let m of h)m.V=f}}function L8(t){return(kW(t)?"":`${j8(Mx([t]))} `)+xW(t)}function j8(t){return`"${t}"‎`}function She(t){if(t.length>=4&&t[2]==T9&&t[3]==T9)throw new Error(`invalid label extension: "${bg(t.slice(0,4))}"`)}function Ihe(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function Ohe(t){let e=t[0],r=I9.get(e);if(r)throw bv(`leading ${r}`);let n=t.length,i=-1;for(let a=1;a<n;a++){e=t[a];let s=I9.get(e);if(s){if(i==a)throw bv(`${r} + ${s}`);i=a+1,r=s}}if(i==n)throw bv(`trailing ${r}`)}function Mx(t,e=xW){let r=[];Phe(t[0])&&r.push("◌");let n=0,i=t.length;for(let a=0;a<i;a++){let s=t[a];kW(s)&&(r.push(bg(t.slice(n,a))),r.push(e(s)),n=a+1)}return r.push(bg(t.slice(n,i))),r.join("")}function Phe(t){return k8(),Ud.has(t)}function kW(t){return k8(),MW.has(t)}function The(t){return Dhe(Che(t,xhe,khe))}function Che(t,e,r){if(!t)return[];k8();let n=0;return t.split(CW).map(i=>{let a=dhe(i),s={input:a,offset:n};n+=a.length+1;try{let o=s.tokens=$he(a,e,r),c=o.length,u;if(!c)throw new Error("empty label");let f=s.output=o.flat();if(Ihe(f),!(s.emoji=c>1||o[0].is_emoji)&&f.every(m=>m<128))She(f),u="ASCII";else{let m=o.flatMap(y=>y.is_emoji?[]:y);if(!m.length)u="Emoji";else{if(Ud.has(f[0]))throw bv("leading combining mark");for(let v=1;v<c;v++){let g=o[v];if(!g.is_emoji&&Ud.has(g[0]))throw bv(`emoji + combining mark: "${bg(o[v-1])} + ${Mx([g[0]])}"`)}Ohe(f);let y=Wp(new Set(m)),[w]=Nhe(y);Mhe(w,m),Rhe(w,y),u=w.N}}s.type=u}catch(o){s.error=o}return s})}function Rhe(t,e){let r,n=[];for(let i of e){let a=Cp.get(i);if(a===NW)return;if(a){let s=a.M.get(i);if(r=r?r.filter(o=>s.has(o)):Wp(s),!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(a=>rb(i,a)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function Nhe(t){let e=h0;for(let r of t){let n=e.filter(i=>rb(i,r));if(!n.length)throw h0.some(i=>rb(i,r))?jW(e[0],r):LW(r);if(e=n,n.length==1)break}return e}function Dhe(t){return t.map(({input:e,error:r,output:n})=>{if(r){let i=r.message;throw new Error(t.length==1?i:`Invalid label ${j8(Mx(e))}: ${i}`)}return bg(n)}).join(CW)}function LW(t){return new Error(`disallowed character: ${L8(t)}`)}function jW(t,e){let r=L8(e),n=h0.find(i=>i.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function bv(t){return new Error(`illegal placement: ${t}`)}function Mhe(t,e){for(let r of e)if(!rb(t,r))throw jW(t,r);if(t.M){let r=TW(e);for(let n=1,i=r.length;n<i;n++)if(yR.has(r[n])){let a=n+1;for(let s;a<i&&yR.has(s=r[a]);a++)for(let o=n;o<a;o++)if(r[o]==s)throw new Error(`duplicate non-spacing marks: ${L8(s)}`);if(a-n>O9)throw new Error(`excessive non-spacing marks: ${j8(Mx(r.slice(n-1,a)))} (${a-n}/${O9})`);n=a}}}function $he(t,e,r){let n=[],i=[];for(t=t.slice().reverse();t.length;){let a=Lhe(t);if(a)i.length&&(n.push(e(i)),i=[]),n.push(r(a));else{let s=t.pop();if($W.has(s))i.push(s);else{let o=mR.get(s);if(o)i.push(...o);else if(!DW.has(s))throw LW(s)}}}return i.length&&n.push(e(i)),n}function khe(t){return t.filter(e=>e!=RW)}function Lhe(t,e){let r=vR,n,i=t.length;for(;i&&(r=r.get(t[--i]),!!r);){let{V:a}=r;a&&(n=a,e&&e.push(...t.slice(i).reverse()),t.length=i)}return n}const UW=new Uint8Array(32);UW.fill(0);function R9(t){return Ne(t.length!==0,"invalid ENS name; empty component","comp",t),t}function FW(t){const e=Wa(jhe(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i<e.length;i++)e[i]===46&&(r.push(R9(e.slice(n,i))),n=i+1);return Ne(n<e.length,"invalid ENS name; empty component","name",t),r.push(R9(e.slice(n))),r}function jhe(t){try{if(t.length===0)throw new Error("empty label");return The(t)}catch(e){Ne(!1,`invalid ENS name (${e.message})`,"name",t)}}function bR(t){Ne(typeof t=="string","invalid ENS name; not a string","name",t),Ne(t.length,"invalid ENS name (empty label)","name",t);let e=UW;const r=FW(t);for(;r.length;)e=Fn(Bn([e,Fn(r.pop())]));return _t(e)}function Uhe(t){return _t(Bn(FW(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}function US(t,e){return{address:sn(t),storageKeys:e.map((r,n)=>(Ne(ai(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function Mh(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(Ne(r.length===2,"invalid slot set",`value[${n}]`,r),US(r[0],r[1])):(Ne(r!=null&&typeof r=="object","invalid address-slot set","value",t),US(r.address,r.storageKeys)));Ne(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,a)=>(i[a]=!0,i),{});return US(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function t1(t){let e;return typeof t=="string"?e=Vc.computePublicKey(t,!1):e=t.publicKey,sn(Fn("0x"+e.substring(4)).substring(26))}function Fhe(t,e){return t1(Vc.recoverPublicKey(t,e))}const ds=BigInt(0),Bhe=BigInt(2),qhe=BigInt(27),Hhe=BigInt(28),zhe=BigInt(35),Vhe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function U8(t){return t==="0x"?null:sn(t)}function BW(t,e){try{return Mh(t)}catch(r){Ne(!1,r.message,e,t)}}function $x(t,e){return t==="0x"?0:jr(t,e)}function Ba(t,e){if(t==="0x")return ds;const r=rr(t,e);return Ne(r<=Vhe,"value exceeds uint size",e,r),r}function ra(t,e){const r=rr(t,"value"),n=gs(r);return Ne(n.length<=32,"value too large",`tx.${e}`,r),n}function qW(t){return Mh(t).map(e=>[e.address,e.storageKeys])}function Ghe(t){const e=E8(t);Ne(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const r={type:0,nonce:$x(e[0],"nonce"),gasPrice:Ba(e[1],"gasPrice"),gasLimit:Ba(e[2],"gasLimit"),to:U8(e[3]),value:Ba(e[4],"value"),data:_t(e[5]),chainId:ds};if(e.length===6)return r;const n=Ba(e[6],"v"),i=Ba(e[7],"r"),a=Ba(e[8],"s");if(i===ds&&a===ds)r.chainId=n;else{let s=(n-zhe)/Bhe;s<ds&&(s=ds),r.chainId=s,Ne(s!==ds||n===qhe||n===Hhe,"non-canonical legacy v","v",e[6]),r.signature=lc.from({r:bh(e[7],32),s:bh(e[8],32),v:n}),r.hash=Fn(t)}return r}function N9(t,e){const r=[ra(t.nonce||0,"nonce"),ra(t.gasPrice||0,"gasPrice"),ra(t.gasLimit||0,"gasLimit"),t.to!=null?sn(t.to):"0x",ra(t.value||0,"value"),t.data||"0x"];let n=ds;if(t.chainId!=ds)n=rr(t.chainId,"tx.chainId"),Ne(!e||e.networkV==null||e.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",e);else if(t.signature){const a=t.signature.legacyChainId;a!=null&&(n=a)}if(!e)return n!==ds&&(r.push(gs(n)),r.push("0x"),r.push("0x")),Jv(r);let i=BigInt(27+e.yParity);return n!==ds?i=lc.getChainIdV(n,e.v):BigInt(e.v)!==i&&Ne(!1,"tx.chainId/sig.v mismatch","sig",e),r.push(gs(i)),r.push(gs(e.r)),r.push(gs(e.s)),Jv(r)}function HW(t,e){let r;try{if(r=$x(e[0],"yParity"),r!==0&&r!==1)throw new Error("bad yParity")}catch{Ne(!1,"invalid yParity","yParity",e[0])}const n=bh(e[1],32),i=bh(e[2],32),a=lc.from({r:n,s:i,yParity:r});t.signature=a}function Khe(t){const e=E8(qt(t).slice(1));Ne(Array.isArray(e)&&(e.length===9||e.length===12),"invalid field count for transaction type: 2","data",_t(t));const r=Ba(e[2],"maxPriorityFeePerGas"),n=Ba(e[3],"maxFeePerGas"),i={type:2,chainId:Ba(e[0],"chainId"),nonce:$x(e[1],"nonce"),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Ba(e[4],"gasLimit"),to:U8(e[5]),value:Ba(e[6],"value"),data:_t(e[7]),accessList:BW(e[8],"accessList")};return e.length===9||(i.hash=Fn(t),HW(i,e.slice(9))),i}function D9(t,e){const r=[ra(t.chainId||0,"chainId"),ra(t.nonce||0,"nonce"),ra(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),ra(t.maxFeePerGas||0,"maxFeePerGas"),ra(t.gasLimit||0,"gasLimit"),t.to!=null?sn(t.to):"0x",ra(t.value||0,"value"),t.data||"0x",qW(t.accessList||[])];return e&&(r.push(ra(e.yParity,"yParity")),r.push(gs(e.r)),r.push(gs(e.s))),Bn(["0x02",Jv(r)])}function Whe(t){const e=E8(qt(t).slice(1));Ne(Array.isArray(e)&&(e.length===8||e.length===11),"invalid field count for transaction type: 1","data",_t(t));const r={type:1,chainId:Ba(e[0],"chainId"),nonce:$x(e[1],"nonce"),gasPrice:Ba(e[2],"gasPrice"),gasLimit:Ba(e[3],"gasLimit"),to:U8(e[4]),value:Ba(e[5],"value"),data:_t(e[6]),accessList:BW(e[7],"accessList")};return e.length===8||(r.hash=Fn(t),HW(r,e.slice(8))),r}function M9(t,e){const r=[ra(t.chainId||0,"chainId"),ra(t.nonce||0,"nonce"),ra(t.gasPrice||0,"gasPrice"),ra(t.gasLimit||0,"gasLimit"),t.to!=null?sn(t.to):"0x",ra(t.value||0,"value"),t.data||"0x",qW(t.accessList||[])];return e&&(r.push(ra(e.yParity,"recoveryParam")),r.push(gs(e.r)),r.push(gs(e.s))),Bn(["0x01",Jv(r)])}var Ru,N0,D0,M0,$0,k0,L0,j0,U0,F0,B0,q0;const Fl=class Fl{constructor(){Qe(this,Ru,void 0);Qe(this,N0,void 0);Qe(this,D0,void 0);Qe(this,M0,void 0);Qe(this,$0,void 0);Qe(this,k0,void 0);Qe(this,L0,void 0);Qe(this,j0,void 0);Qe(this,U0,void 0);Qe(this,F0,void 0);Qe(this,B0,void 0);Qe(this,q0,void 0);Te(this,Ru,null),Te(this,N0,null),Te(this,M0,0),Te(this,$0,BigInt(0)),Te(this,k0,null),Te(this,L0,null),Te(this,j0,null),Te(this,D0,"0x"),Te(this,U0,BigInt(0)),Te(this,F0,BigInt(0)),Te(this,B0,null),Te(this,q0,null)}get type(){return W(this,Ru)}set type(e){switch(e){case null:Te(this,Ru,null);break;case 0:case"legacy":Te(this,Ru,0);break;case 1:case"berlin":case"eip-2930":Te(this,Ru,1);break;case 2:case"london":case"eip-1559":Te(this,Ru,2);break;default:Ne(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559"}return null}get to(){return W(this,N0)}set to(e){Te(this,N0,e==null?null:sn(e))}get nonce(){return W(this,M0)}set nonce(e){Te(this,M0,jr(e,"value"))}get gasLimit(){return W(this,$0)}set gasLimit(e){Te(this,$0,rr(e))}get gasPrice(){const e=W(this,k0);return e==null&&(this.type===0||this.type===1)?ds:e}set gasPrice(e){Te(this,k0,e==null?null:rr(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=W(this,L0);return e??(this.type===2?ds:null)}set maxPriorityFeePerGas(e){Te(this,L0,e==null?null:rr(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=W(this,j0);return e??(this.type===2?ds:null)}set maxFeePerGas(e){Te(this,j0,e==null?null:rr(e,"maxFeePerGas"))}get data(){return W(this,D0)}set data(e){Te(this,D0,_t(e))}get value(){return W(this,U0)}set value(e){Te(this,U0,rr(e,"value"))}get chainId(){return W(this,F0)}set chainId(e){Te(this,F0,rr(e))}get signature(){return W(this,B0)||null}set signature(e){Te(this,B0,e==null?null:lc.from(e))}get accessList(){const e=W(this,q0)||null;return e??(this.type===1||this.type===2?[]:null)}set accessList(e){Te(this,q0,e==null?null:Mh(e))}get hash(){return this.signature==null?null:Fn(this.serialized)}get unsignedHash(){return Fn(this.unsignedSerialized)}get from(){return this.signature==null?null:Fhe(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:Vc.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){switch(it(this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"}),this.inferType()){case 0:return N9(this,this.signature);case 1:return M9(this,this.signature);case 2:return D9(this,this.signature)}it(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get unsignedSerialized(){switch(this.inferType()){case 0:return N9(this);case 1:return M9(this);case 2:return D9(this)}it(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".unsignedSerialized"})}inferType(){return this.inferTypes().pop()}inferTypes(){const e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null;this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&it(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),it(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),it(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):r?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(i.push(0),i.push(1),i.push(2)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}clone(){return Fl.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Fl;if(typeof e=="string"){const n=qt(e);if(n[0]>=127)return Fl.from(Ghe(n));switch(n[0]){case 1:return Fl.from(Whe(n));case 2:return Fl.from(Khe(n))}it(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Fl;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=lc.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.hash!=null&&(Ne(r.isSigned(),"unsigned transaction cannot define hash","tx",e),Ne(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(Ne(r.isSigned(),"unsigned transaction cannot define from","tx",e),Ne(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};Ru=new WeakMap,N0=new WeakMap,D0=new WeakMap,M0=new WeakMap,$0=new WeakMap,k0=new WeakMap,L0=new WeakMap,j0=new WeakMap,U0=new WeakMap,F0=new WeakMap,B0=new WeakMap,q0=new WeakMap;let nb=Fl;function Qhe(t){return typeof t=="string"&&(t=Wa(t)),Fn(Bn([Wa(kde),Wa(String(t.length)),t]))}const zW=new Uint8Array(32);zW.fill(0);const Yhe=BigInt(-1),VW=BigInt(0),GW=BigInt(1),Jhe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Xhe(t){const e=qt(t),r=e.length%32;return r?Bn([e,zW.slice(r)]):_t(e)}const Zhe=Zu(GW,32),epe=Zu(VW,32),$9={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},FS=["name","version","chainId","verifyingContract","salt"];function k9(t){return function(e){return Ne(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const tpe={name:k9("name"),version:k9("version"),chainId:function(t){const e=rr(t,"domain.chainId");return Ne(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):Gp(e)},verifyingContract:function(t){try{return sn(t).toLowerCase()}catch{}Ne(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=qt(t,"domain.salt");return Ne(e.length===32,'invalid domain value "salt"',"domain.salt",t),_t(e)}};function BS(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");Ne(n%8===0&&n!==0&&n<=256&&(e[2]==null||e[2]===String(n)),"invalid numeric width","type",t);const i=Ld(Jhe,r?n-1:n),a=r?(i+GW)*Yhe:VW;return function(s){const o=rr(s,"value");return Ne(o>=a&&o<=i,`value out-of-bounds for ${t}`,"value",o),Zu(r?cK(o,256):o,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return Ne(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const i=qt(n);return Ne(i.length===r,`invalid length for ${t}`,"value",n),Xhe(n)}}}switch(t){case"address":return function(e){return bh(sn(e),32)};case"bool":return function(e){return e?Zhe:epe};case"bytes":return function(e){return Fn(e)};case"string":return function(e){return el(e)}}return null}function L9(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}var Pb,Nu,H0,ax,KW;const co=class co{constructor(e){Qe(this,ax);Be(this,"primaryType");Qe(this,Pb,void 0);Qe(this,Nu,void 0);Qe(this,H0,void 0);Te(this,Pb,JSON.stringify(e)),Te(this,Nu,new Map),Te(this,H0,new Map);const r=new Map,n=new Map,i=new Map;Object.keys(e).forEach(o=>{r.set(o,new Set),n.set(o,[]),i.set(o,new Set)});for(const o in e){const c=new Set;for(const u of e[o]){Ne(!c.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(o)}`,"types",e),c.add(u.name);const f=u.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;Ne(f!==o,`circular type reference to ${JSON.stringify(f)}`,"types",e),!BS(f)&&(Ne(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),n.get(f).push(o),r.get(o).add(f))}}const a=Array.from(n.keys()).filter(o=>n.get(o).length===0);Ne(a.length!==0,"missing primary type","types",e),Ne(a.length===1,`ambiguous primary types or unused types: ${a.map(o=>JSON.stringify(o)).join(", ")}`,"types",e),Qt(this,{primaryType:a[0]});function s(o,c){Ne(!c.has(o),`circular type reference to ${JSON.stringify(o)}`,"types",e),c.add(o);for(const u of r.get(o))if(n.has(u)){s(u,c);for(const f of c)i.get(f).add(u)}c.delete(o)}s(this.primaryType,new Set);for(const[o,c]of i){const u=Array.from(c);u.sort(),W(this,Nu).set(o,L9(o,e[o])+u.map(f=>L9(f,e[f])).join(""))}}get types(){return JSON.parse(W(this,Pb))}getEncoder(e){let r=W(this,H0).get(e);return r||(r=ct(this,ax,KW).call(this,e),W(this,H0).set(e,r)),r}encodeType(e){const r=W(this,Nu).get(e);return Ne(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Fn(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(BS(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i)return Ne(!i[3]||parseInt(i[3])===r.length,`array length mismatch; expected length ${parseInt(i[3])}`,"value",r),r.map(s=>this._visit(i[1],s,n));const a=this.types[e];if(a)return a.reduce((s,{name:o,type:c})=>(s[o]=this._visit(c,r[o],n),s),{});Ne(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new co(e)}static getPrimaryType(e){return co.from(e).primaryType}static hashStruct(e,r,n){return co.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const i=$9[n];Ne(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>FS.indexOf(n.name)-FS.indexOf(i.name)),co.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Bn(["0x1901",co.hashDomain(e),co.from(r).hash(n)])}static hash(e,r,n){return Fn(co.encode(e,r,n))}static async resolveNames(e,r,n,i){e=Object.assign({},e);for(const o in e)e[o]==null&&delete e[o];const a={};e.verifyingContract&&!ai(e.verifyingContract,20)&&(a[e.verifyingContract]="0x");const s=co.from(r);s.visit(n,(o,c)=>(o==="address"&&!ai(c,20)&&(a[c]="0x"),c));for(const o in a)a[o]=await i(o);return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=s.visit(n,(o,c)=>o==="address"&&a[c]?a[c]:c),{domain:e,value:n}}static getPayload(e,r,n){co.hashDomain(e);const i={},a=[];FS.forEach(c=>{const u=e[c];u!=null&&(i[c]=tpe[c](u),a.push({name:c,type:$9[c]}))});const s=co.from(r),o=Object.assign({},r);return Ne(o.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),o.EIP712Domain=a,s.encode(n),{types:o,domain:i,primaryType:s.primaryType,message:s.visit(n,(c,u)=>{if(c.match(/^bytes(\d*)/))return _t(qt(u));if(c.match(/^u?int/))return rr(u).toString();switch(c){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return Ne(typeof u=="string","invalid string","value",u),u}Ne(!1,"unsupported type","type",c)})}}};Pb=new WeakMap,Nu=new WeakMap,H0=new WeakMap,ax=new WeakSet,KW=function(e){{const i=BS(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],a=this.getEncoder(i);return s=>{Ne(!r[3]||parseInt(r[3])===s.length,`array length mismatch; expected length ${parseInt(r[3])}`,"value",s);let o=s.map(a);return W(this,Nu).has(i)&&(o=o.map(Fn)),Fn(Bn(o))}}const n=this.types[e];if(n){const i=el(W(this,Nu).get(e));return a=>{const s=n.map(({name:o,type:c})=>{const u=this.getEncoder(c)(a[o]);return W(this,Nu).has(c)?Fn(u):u});return s.unshift(i),Bn(s)}}Ne(!1,`unknown type: ${e}`,"type",e)};let _g=co;function Ga(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const rpe="external public payable",npe=Ga(rpe.split(" ")),WW="constant external internal payable private public pure view",ipe=Ga(WW.split(" ")),QW="constructor error event fallback function receive struct",YW=Ga(QW.split(" ")),JW="calldata memory storage payable indexed",ape=Ga(JW.split(" ")),spe="tuple returns",ope=[QW,JW,spe,WW].join(" "),cpe=Ga(ope.split(" ")),upe={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},lpe=new RegExp("^(\\s*)"),fpe=new RegExp("^([0-9]+)"),dpe=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),XW=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),ZW=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var Xi,ec,Tb,wR;const sx=class sx{constructor(e){Qe(this,Tb);Qe(this,Xi,void 0);Qe(this,ec,void 0);Te(this,Xi,0),Te(this,ec,e.slice())}get offset(){return W(this,Xi)}get length(){return W(this,ec).length-W(this,Xi)}clone(){return new sx(W(this,ec))}reset(){Te(this,Xi,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=ct(this,Tb,wR).call(this,W(this,Xi)+1,e.match+1);return Te(this,Xi,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;W(this,Xi)<e.match-1;){const n=this.peek().linkNext;r.push(ct(this,Tb,wR).call(this,W(this,Xi)+1,n)),Te(this,Xi,n)}return Te(this,Xi,e.match+1),r}peek(){if(W(this,Xi)>=W(this,ec).length)throw new Error("out-of-bounds");return W(this,ec)[W(this,Xi)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return Em(this,Xi)._++,e}toString(){const e=[];for(let r=W(this,Xi);r<W(this,ec).length;r++){const n=W(this,ec)[r];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}};Xi=new WeakMap,ec=new WeakMap,Tb=new WeakSet,wR=function(e=0,r=0){return new sx(W(this,ec).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let fc=sx;function jf(t){const e=[],r=s=>{const o=a<t.length?JSON.stringify(t[a]):"$EOI";throw new Error(`invalid token ${o} at ${a}: ${s}`)};let n=[],i=[],a=0;for(;a<t.length;){let s=t.substring(a),o=s.match(lpe);o&&(a+=o[1].length,s=t.substring(a));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:a,value:-1};e.push(c);let u=upe[s[0]]||"";if(u){if(c.type=u,c.text=s[0],a++,u==="OPEN_PAREN")n.push(e.length-1),i.push(e.length-1);else if(u=="CLOSE_PAREN")n.length===0&&r("no matching open bracket"),c.match=n.pop(),e[c.match].match=e.length-1,c.depth--,c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1;else if(u==="COMMA")c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1,i.push(e.length-1);else if(u==="OPEN_BRACKET")c.type="BRACKET";else if(u==="CLOSE_BRACKET"){let f=e.pop().text;if(e.length>0&&e[e.length-1].type==="NUMBER"){const h=e.pop().text;f=h+f,e[e.length-1].value=jr(h)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=f}continue}if(o=s.match(dpe),o){if(c.text=o[1],a+=c.text.length,cpe.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(ZW)){c.type="TYPE";continue}c.type="ID";continue}if(o=s.match(fpe),o){c.text=o[1],c.type="NUMBER",a+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(s[0])} at position ${a}`)}return new fc(e.map(s=>Object.freeze(s)))}function j9(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function kx(t,e){if(e.peekKeyword(YW)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function tl(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function eQ(t){let e=tl(t,ipe);return j9(e,Ga("constant payable nonpayable".split(" "))),j9(e,Ga("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function Wu(t,e){return t.popParams().map(r=>oa.from(r,e))}function tQ(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return rr(t.pop().text);throw new Error("invalid gas")}return null}function wh(t){if(t.length)throw new Error(`unexpected tokens: ${t.toString()}`)}const hpe=new RegExp(/^(.*)\[([0-9]*)\]$/);function U9(t){const e=t.match(ZW);if(Ne(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);Ne(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);Ne(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const ii={},_s=Symbol.for("_ethers_internal"),F9="_ParamTypeInternal",B9="_ErrorInternal",q9="_EventInternal",H9="_ConstructorInternal",z9="_FallbackInternal",V9="_FunctionInternal",G9="_StructInternal";var z0,S_;const uo=class uo{constructor(e,r,n,i,a,s,o,c){Qe(this,z0);Be(this,"name");Be(this,"type");Be(this,"baseType");Be(this,"indexed");Be(this,"components");Be(this,"arrayLength");Be(this,"arrayChildren");if(kf(e,ii,"ParamType"),Object.defineProperty(this,_s,{value:F9}),s&&(s=Object.freeze(s.slice())),i==="array"){if(o==null||c==null)throw new Error("")}else if(o!=null||c!=null)throw new Error("");if(i==="tuple"){if(s==null)throw new Error("")}else if(s!=null)throw new Error("");Qt(this,{name:r,type:n,baseType:i,indexed:a,components:s,arrayLength:o,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const a=JSON.parse(this.arrayChildren.format("json"));return a.name=n,a.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(a)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(a=>JSON.parse(a.format(e)))),JSON.stringify(i)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?(e!=="sighash"&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")"):r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,a)=>n.components[a].walk(i,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],i=[e];return ct(this,z0,S_).call(this,n,e,r,a=>{i[0]=a}),n.length&&await Promise.all(n),i[0]}static from(e,r){if(uo.isParamType(e))return e;if(typeof e=="string")try{return uo.from(jf(e),r)}catch{Ne(!1,"invalid param type","obj",e)}else if(e instanceof fc){let o="",c="",u=null;tl(e,Ga(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",u=e.popParams().map(v=>uo.from(v)),o=`tuple(${u.map(v=>v.format()).join(",")})`):(o=U9(e.popType("TYPE")),c=o);let f=null,h=null;for(;e.length&&e.peekType("BRACKET");){const v=e.pop();f=new uo(ii,"",o,c,null,u,h,f),h=v.value,o+=v.text,c="array",u=null}let m=null;if(tl(e,ape).has("indexed")){if(!r)throw new Error("");m=!0}const w=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new uo(ii,w,o,c,m,u,h,f)}const n=e.name;Ne(!n||typeof n=="string"&&n.match(XW),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(Ne(r,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let a=e.type,s=a.match(hpe);if(s){const o=parseInt(s[2]||"-1"),c=uo.from({type:s[1],components:e.components});return new uo(ii,n||"",a,"array",i,null,o,c)}if(a==="tuple"||a.startsWith("tuple(")||a.startsWith("(")){const o=e.components!=null?e.components.map(u=>uo.from(u)):null;return new uo(ii,n||"",a,"tuple",i,o,null,null)}return a=U9(e.type),new uo(ii,n||"",a,a,i,null,null,null)}static isParamType(e){return e&&e[_s]===F9}};z0=new WeakSet,S_=function(e,r,n,i){if(this.isArray()){if(!Array.isArray(r))throw new Error("invalid array value");if(this.arrayLength!==-1&&r.length!==this.arrayLength)throw new Error("array is wrong length");const s=this.arrayChildren,o=r.slice();o.forEach((c,u)=>{var f;ct(f=s,z0,S_).call(f,e,c,n,h=>{o[u]=h})}),i(o);return}if(this.isTuple()){const s=this.components;let o;if(Array.isArray(r))o=r.slice();else{if(r==null||typeof r!="object")throw new Error("invalid tuple value");o=s.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in r))throw new Error(`missing value for component ${c.name}`);return r[c.name]})}if(o.length!==this.components.length)throw new Error("array is wrong length");o.forEach((c,u)=>{var f;ct(f=s[u],z0,S_).call(f,e,c,n,h=>{o[u]=h})}),i(o);return}const a=n(this.type,r);a.then?e.push(async function(){i(await a)}()):i(a)};let oa=uo;class _h{constructor(e,r,n){Be(this,"type");Be(this,"inputs");kf(e,ii,"Fragment"),n=Object.freeze(n.slice()),Qt(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{_h.from(JSON.parse(e))}catch{}return _h.from(jf(e))}if(e instanceof fc)switch(e.peekKeyword(YW)){case"constructor":return zu.from(e);case"error":return hs.from(e);case"event":return $c.from(e);case"fallback":case"receive":return Au.from(e);case"function":return kc.from(e);case"struct":return hh.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return zu.from(e);case"error":return hs.from(e);case"event":return $c.from(e);case"fallback":case"receive":return Au.from(e);case"function":return kc.from(e);case"struct":return hh.from(e)}it(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}Ne(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return zu.isFragment(e)}static isError(e){return hs.isFragment(e)}static isEvent(e){return $c.isFragment(e)}static isFunction(e){return kc.isFragment(e)}static isStruct(e){return hh.isFragment(e)}}class Lx extends _h{constructor(r,n,i,a){super(r,n,a);Be(this,"name");Ne(typeof i=="string"&&i.match(XW),"invalid identifier","name",i),a=Object.freeze(a.slice()),Qt(this,{name:i})}}function ib(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class hs extends Lx{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,_s,{value:B9})}get selector(){return el(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+ib(e,this.inputs)),r.join(" ")}static from(e){if(hs.isFragment(e))return e;if(typeof e=="string")return hs.from(jf(e));if(e instanceof fc){const r=kx("error",e),n=Wu(e);return wh(e),new hs(ii,r,n)}return new hs(ii,e.name,e.inputs?e.inputs.map(oa.from):[])}static isFragment(e){return e&&e[_s]===B9}}class $c extends Lx{constructor(r,n,i,a){super(r,"event",n,i);Be(this,"anonymous");Object.defineProperty(this,_s,{value:q9}),Qt(this,{anonymous:a})}get topicHash(){return el(this.format("sighash"))}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(r)))});const n=[];return r!=="sighash"&&n.push("event"),n.push(this.name+ib(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(a=>oa.from(a)),new $c(ii,r,n,!1).topicHash}static from(r){if($c.isFragment(r))return r;if(typeof r=="string")try{return $c.from(jf(r))}catch{Ne(!1,"invalid event fragment","obj",r)}else if(r instanceof fc){const n=kx("event",r),i=Wu(r,!0),a=!!tl(r,Ga(["anonymous"])).has("anonymous");return wh(r),new $c(ii,n,i,a)}return new $c(ii,r.name,r.inputs?r.inputs.map(n=>oa.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[_s]===q9}}class zu extends _h{constructor(r,n,i,a,s){super(r,n,i);Be(this,"payable");Be(this,"gas");Object.defineProperty(this,_s,{value:H9}),Qt(this,{payable:a,gas:s})}format(r){if(it(r!=null&&r!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),r==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(r)))});const n=[`constructor${ib(r,this.inputs)}`];return n.push(this.payable?"payable":"nonpayable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(zu.isFragment(r))return r;if(typeof r=="string")try{return zu.from(jf(r))}catch{Ne(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof fc){tl(r,Ga(["constructor"]));const n=Wu(r),i=!!tl(r,npe).has("payable"),a=tQ(r);return wh(r),new zu(ii,"constructor",n,i,a)}return new zu(ii,"constructor",r.inputs?r.inputs.map(oa.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[_s]===H9}}class Au extends _h{constructor(r,n,i){super(r,"fallback",n);Be(this,"payable");Object.defineProperty(this,_s,{value:z9}),Qt(this,{payable:i})}format(r){const n=this.inputs.length===0?"receive":"fallback";if(r==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:i})}return`${n}()${this.payable?" payable":""}`}static from(r){if(Au.isFragment(r))return r;if(typeof r=="string")try{return Au.from(jf(r))}catch{Ne(!1,"invalid fallback fragment","obj",r)}else if(r instanceof fc){const n=r.toString(),i=r.peekKeyword(Ga(["fallback","receive"]));if(Ne(i,"type must be fallback or receive","obj",n),r.popKeyword(Ga(["fallback","receive"]))==="receive"){const c=Wu(r);return Ne(c.length===0,"receive cannot have arguments","obj.inputs",c),tl(r,Ga(["payable"])),wh(r),new Au(ii,[],!0)}let s=Wu(r);s.length?Ne(s.length===1&&s[0].type==="bytes","invalid fallback inputs","obj.inputs",s.map(c=>c.format("minimal")).join(", ")):s=[oa.from("bytes")];const o=eQ(r);if(Ne(o==="nonpayable"||o==="payable","fallback cannot be constants","obj.stateMutability",o),tl(r,Ga(["returns"])).has("returns")){const c=Wu(r);Ne(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(u=>u.format("minimal")).join(", "))}return wh(r),new Au(ii,s,o==="payable")}if(r.type==="receive")return new Au(ii,[],!0);if(r.type==="fallback"){const n=[oa.from("bytes")],i=r.stateMutability==="payable";return new Au(ii,n,i)}Ne(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[_s]===z9}}class kc extends Lx{constructor(r,n,i,a,s,o){super(r,"function",n,a);Be(this,"constant");Be(this,"outputs");Be(this,"stateMutability");Be(this,"payable");Be(this,"gas");Object.defineProperty(this,_s,{value:V9}),s=Object.freeze(s.slice()),Qt(this,{constant:i==="view"||i==="pure",gas:o,outputs:s,payable:i==="payable",stateMutability:i})}get selector(){return el(this.format("sighash")).substring(0,10)}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(r))),outputs:this.outputs.map(i=>JSON.parse(i.format(r)))});const n=[];return r!=="sighash"&&n.push("function"),n.push(this.name+ib(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(ib(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(a=>oa.from(a)),new kc(ii,r,"view",n,[],null).selector}static from(r){if(kc.isFragment(r))return r;if(typeof r=="string")try{return kc.from(jf(r))}catch{Ne(!1,"invalid function fragment","obj",r)}else if(r instanceof fc){const i=kx("function",r),a=Wu(r),s=eQ(r);let o=[];tl(r,Ga(["returns"])).has("returns")&&(o=Wu(r));const c=tQ(r);return wh(r),new kc(ii,i,s,a,o,c)}let n=r.stateMutability;return n==null&&(n="payable",typeof r.constant=="boolean"?(n="view",r.constant||(n="payable",typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable"))):typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable")),new kc(ii,r.name,n,r.inputs?r.inputs.map(oa.from):[],r.outputs?r.outputs.map(oa.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[_s]===V9}}class hh extends Lx{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,_s,{value:G9})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return hh.from(jf(e))}catch{Ne(!1,"invalid struct fragment","obj",e)}else if(e instanceof fc){const r=kx("struct",e),n=Wu(e);return wh(e),new hh(ii,r,n)}return new hh(ii,e.name,e.inputs?e.inputs.map(oa.from):[])}static isFragment(e){return e&&e[_s]===G9}}const dc=new Map;dc.set(0,"GENERIC_PANIC");dc.set(1,"ASSERT_FALSE");dc.set(17,"OVERFLOW");dc.set(18,"DIVIDE_BY_ZERO");dc.set(33,"ENUM_RANGE_ERROR");dc.set(34,"BAD_STORAGE_DATA");dc.set(49,"STACK_UNDERFLOW");dc.set(50,"ARRAY_RANGE_ERROR");dc.set(65,"OUT_OF_MEMORY");dc.set(81,"UNINITIALIZED_FUNCTION_CALL");const ppe=new RegExp(/^bytes([0-9]*)$/),gpe=new RegExp(/^(u?int)([0-9]*)$/);let qS=null;function mpe(t,e,r,n){let i="missing revert data",a=null;const s=null;let o=null;if(r){i="execution reverted";const u=qt(r);if(r=_t(r),u.length===0)i+=" (no data present; likely require(false) occurred",a="require(false)";else if(u.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(_t(u.slice(0,4))==="0x08c379a0")try{a=n.decode(["string"],u.slice(4))[0],o={signature:"Error(string)",name:"Error",args:[a]},i+=`: ${JSON.stringify(a)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(_t(u.slice(0,4))==="0x4e487b71")try{const f=Number(n.decode(["uint256"],u.slice(4))[0]);o={signature:"Panic(uint256)",name:"Panic",args:[f]},a=`Panic due to ${dc.get(f)||"UNKNOWN"}(${f})`,i+=`: ${a}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const c={to:e.to?sn(e.to):null,data:e.data||"0x"};return e.from&&(c.from=sn(e.from)),Ni(i,"CALL_EXCEPTION",{action:t,data:r,reason:a,transaction:c,invocation:s,revert:o})}var Vl,Rp;const ox=class ox{constructor(){Qe(this,Vl)}getDefaultValue(e){const r=e.map(i=>ct(this,Vl,Rp).call(this,oa.from(i)));return new Dw(r,"_").defaultValue()}encode(e,r){nK(r.length,e.length,"types/values length mismatch");const n=e.map(s=>ct(this,Vl,Rp).call(this,oa.from(s))),i=new Dw(n,"_"),a=new sR;return i.encode(a,r),a.data}decode(e,r,n){const i=e.map(s=>ct(this,Vl,Rp).call(this,oa.from(s)));return new Dw(i,"_").decode(new oR(r,n))}static defaultAbiCoder(){return qS==null&&(qS=new ox),qS}static getBuiltinCallException(e,r,n){return mpe(e,r,n,ox.defaultAbiCoder())}};Vl=new WeakSet,Rp=function(e){if(e.isArray())return new Vde(ct(this,Vl,Rp).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new Dw(e.components.map(n=>ct(this,Vl,Rp).call(this,n)),e.name);switch(e.baseType){case"address":return new Hde(e.name);case"bool":return new Gde(e.name);case"string":return new the(e.name);case"bytes":return new Kde(e.name);case"":return new Yde(e.name)}let r=e.type.match(gpe);if(r){let n=parseInt(r[2]||"256");return Ne(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new ehe(n/8,r[1]==="int",e.name)}if(r=e.type.match(ppe),r){let n=parseInt(r[1]);return Ne(n!==0&&n<=32,"invalid bytes length","param",e),new Wde(n,e.name)}Ne(!1,"invalid type","type",e.type)};let ab=ox;class ype{constructor(e,r,n){Be(this,"fragment");Be(this,"name");Be(this,"signature");Be(this,"topic");Be(this,"args");const i=e.name,a=e.format();Qt(this,{fragment:e,name:i,signature:a,topic:r,args:n})}}class vpe{constructor(e,r,n,i){Be(this,"fragment");Be(this,"name");Be(this,"args");Be(this,"signature");Be(this,"selector");Be(this,"value");const a=e.name,s=e.format();Qt(this,{fragment:e,name:a,args:n,signature:s,selector:r,value:i})}}class bpe{constructor(e,r,n){Be(this,"fragment");Be(this,"name");Be(this,"args");Be(this,"signature");Be(this,"selector");const i=e.name,a=e.format();Qt(this,{fragment:e,name:i,args:n,signature:a,selector:r})}}class K9{constructor(e){Be(this,"hash");Be(this,"_isIndexed");Qt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const W9={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},Q9={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&W9[t.toString()]&&(e=W9[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Tc,Cc,Rc,va,V0,I_,G0,O_;const Jp=class Jp{constructor(e){Qe(this,V0);Qe(this,G0);Be(this,"fragments");Be(this,"deploy");Be(this,"fallback");Be(this,"receive");Qe(this,Tc,void 0);Qe(this,Cc,void 0);Qe(this,Rc,void 0);Qe(this,va,void 0);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,Te(this,Rc,new Map),Te(this,Tc,new Map),Te(this,Cc,new Map);const n=[];for(const s of r)try{n.push(_h.from(s))}catch(o){console.log("EE",o)}Qt(this,{fragments:Object.freeze(n)});let i=null,a=!1;Te(this,va,this.getAbiCoder()),this.fragments.forEach((s,o)=>{let c;switch(s.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}Qt(this,{deploy:s});return;case"fallback":s.inputs.length===0?a=!0:(Ne(!i||s.payable!==i.payable,"conflicting fallback fragments",`fragments[${o}]`,s),i=s,a=i.payable);return;case"function":c=W(this,Rc);break;case"event":c=W(this,Cc);break;case"error":c=W(this,Tc);break;default:return}const u=s.format();c.has(u)||c.set(u,s)}),this.deploy||Qt(this,{deploy:zu.from("constructor()")}),Qt(this,{fallback:i,receive:a})}format(e){const r=e?"minimal":"full";return this.fragments.map(i=>i.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return ab.defaultAbiCoder()}getFunctionName(e){const r=ct(this,V0,I_).call(this,e,null,!1);return Ne(r,"no matching function","key",e),r.name}hasFunction(e){return!!ct(this,V0,I_).call(this,e,null,!1)}getFunction(e,r){return ct(this,V0,I_).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(W(this,Rc).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(W(this,Rc).get(i),n)}}getEventName(e){const r=ct(this,G0,O_).call(this,e,null,!1);return Ne(r,"no matching event","key",e),r.name}hasEvent(e){return!!ct(this,G0,O_).call(this,e,null,!1)}getEvent(e,r){return ct(this,G0,O_).call(this,e,r||null,!0)}forEachEvent(e){const r=Array.from(W(this,Cc).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(W(this,Cc).get(i),n)}}getError(e,r){if(ai(e)){const i=e.toLowerCase();if(Q9[i])return hs.from(Q9[i].signature);for(const a of W(this,Tc).values())if(i===a.selector)return a;return null}if(e.indexOf("(")===-1){const i=[];for(const[a,s]of W(this,Tc))a.split("(")[0]===e&&i.push(s);if(i.length===0)return e==="Error"?hs.from("error Error(string)"):e==="Panic"?hs.from("error Panic(uint256)"):null;if(i.length>1){const a=i.map(s=>JSON.stringify(s.format())).join(", ");Ne(!1,`ambiguous error description (i.e. ${a})`,"name",e)}return i[0]}if(e=hs.from(e).format(),e==="Error(string)")return hs.from("error Error(string)");if(e==="Panic(uint256)")return hs.from("error Panic(uint256)");const n=W(this,Tc).get(e);return n||null}forEachError(e){const r=Array.from(W(this,Tc).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(W(this,Tc).get(i),n)}}_decodeParams(e,r){return W(this,va).decode(e,r)}_encodeParams(e,r){return W(this,va).encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);Ne(n,"unknown error","fragment",e),e=n}return Ne(zn(r,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",r),this._decodeParams(e.inputs,zn(r,4))}encodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);Ne(n,"unknown error","fragment",e),e=n}return Bn([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);Ne(n,"unknown function","fragment",e),e=n}return Ne(zn(r,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",r),this._decodeParams(e.inputs,zn(r,4))}encodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);Ne(n,"unknown function","fragment",e),e=n}return Bn([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionResult(e,r){if(typeof e=="string"){const a=this.getFunction(e);Ne(a,"unknown function","fragment",e),e=a}let n="invalid length for result data";const i=Pa(r);if(i.length%32===0)try{return W(this,va).decode(e.outputs,i)}catch{n="could not decode result data"}it(!1,n,"BAD_DATA",{value:_t(i),info:{method:e.name,signature:e.format()}})}makeError(e,r){const n=qt(e,"data"),i=ab.getBuiltinCallException("call",r,n),a="execution reverted (unknown custom error)";if(i.message.startsWith(a)){const o=_t(n.slice(0,4)),c=this.getError(o);if(c)try{const u=W(this,va).decode(c.inputs,n.slice(4));i.revert={name:c.name,signature:c.format(),args:u},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}const s=this.parseTransaction(r);return s&&(i.invocation={method:s.name,signature:s.signature,args:s.args}),i}encodeFunctionResult(e,r){if(typeof e=="string"){const n=this.getFunction(e);Ne(n,"unknown function","fragment",e),e=n}return _t(W(this,va).encode(e.outputs,r||[]))}encodeFilterTopics(e,r){if(typeof e=="string"){const a=this.getEvent(e);Ne(a,"unknown event","eventFragment",e),e=a}it(r.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:r.length,expectedCount:e.inputs.length});const n=[];e.anonymous||n.push(e.topicHash);const i=(a,s)=>a.type==="string"?el(s):a.type==="bytes"?Fn(_t(s)):(a.type==="bool"&&typeof s=="boolean"?s=s?"0x01":"0x00":a.type.match(/^u?int/)?s=Zu(s):a.type.match(/^bytes/)?s=Ile(s,32):a.type==="address"&&W(this,va).encode(["address"],[s]),bh(_t(s),32));for(r.forEach((a,s)=>{const o=e.inputs[s];if(!o.indexed){Ne(a==null,"cannot filter non-indexed parameters; must be null","contract."+o.name,a);return}a==null?n.push(null):o.baseType==="array"||o.baseType==="tuple"?Ne(!1,"filtering with tuples or arrays not supported","contract."+o.name,a):Array.isArray(a)?n.push(a.map(c=>i(o,c))):n.push(i(o,a))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const s=this.getEvent(e);Ne(s,"unknown event","eventFragment",e),e=s}const n=[],i=[],a=[];return e.anonymous||n.push(e.topicHash),Ne(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((s,o)=>{const c=r[o];if(s.indexed)if(s.type==="string")n.push(el(c));else if(s.type==="bytes")n.push(Fn(c));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");n.push(W(this,va).encode([s.type],[c]))}else i.push(s),a.push(c)}),{data:W(this,va).encode(i,a),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const y=this.getEvent(e);Ne(y,"unknown event","eventFragment",e),e=y}if(n!=null&&!e.anonymous){const y=e.topicHash;Ne(ai(n[0],32)&&n[0].toLowerCase()===y,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],a=[],s=[];e.inputs.forEach((y,w)=>{y.indexed?y.type==="string"||y.type==="bytes"||y.baseType==="tuple"||y.baseType==="array"?(i.push(oa.from({type:"bytes32",name:y.name})),s.push(!0)):(i.push(y),s.push(!1)):(a.push(y),s.push(!1))});const o=n!=null?W(this,va).decode(i,Bn(n)):null,c=W(this,va).decode(a,r,!0),u=[],f=[];let h=0,m=0;return e.inputs.forEach((y,w)=>{let v=null;if(y.indexed)if(o==null)v=new K9(null);else if(s[w])v=new K9(o[m++]);else try{v=o[m++]}catch(g){v=g}else try{v=c[h++]}catch(g){v=g}u.push(v),f.push(y.name||null)}),_E.fromItems(u,f)}parseTransaction(e){const r=qt(e.data,"tx.data"),n=rr(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(_t(r.slice(0,4)));if(!i)return null;const a=W(this,va).decode(i.inputs,r.slice(4));return new vpe(i,i.selector,a,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new ype(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=_t(e),n=this.getError(zn(r,0,4));if(!n)return null;const i=W(this,va).decode(n.inputs,zn(r,4));return new bpe(n,n.selector,i)}static from(e){return e instanceof Jp?e:typeof e=="string"?new Jp(JSON.parse(e)):typeof e.format=="function"?new Jp(e.format("json")):new Jp(e)}};Tc=new WeakMap,Cc=new WeakMap,Rc=new WeakMap,va=new WeakMap,V0=new WeakSet,I_=function(e,r,n){if(ai(e)){const a=e.toLowerCase();for(const s of W(this,Rc).values())if(a===s.selector)return s;return null}if(e.indexOf("(")===-1){const a=[];for(const[s,o]of W(this,Rc))s.split("(")[0]===e&&a.push(o);if(r){const s=r.length>0?r[r.length-1]:null;let o=r.length,c=!0;Ra.isTyped(s)&&s.type==="overrides"&&(c=!1,o--);for(let u=a.length-1;u>=0;u--){const f=a[u].inputs.length;f!==o&&(!c||f!==o-1)&&a.splice(u,1)}for(let u=a.length-1;u>=0;u--){const f=a[u].inputs;for(let h=0;h<r.length;h++)if(Ra.isTyped(r[h])){if(h>=f.length){if(r[h].type==="overrides")continue;a.splice(u,1);break}if(r[h].type!==f[h].baseType){a.splice(u,1);break}}}}if(a.length===1&&r&&r.length!==a[0].inputs.length){const s=r[r.length-1];(s==null||Array.isArray(s)||typeof s!="object")&&a.splice(0,1)}if(a.length===0)return null;if(a.length>1&&n){const s=a.map(o=>JSON.stringify(o.format())).join(", ");Ne(!1,`ambiguous function description (i.e. matches ${s})`,"key",e)}return a[0]}const i=W(this,Rc).get(kc.from(e).format());return i||null},G0=new WeakSet,O_=function(e,r,n){if(ai(e)){const a=e.toLowerCase();for(const s of W(this,Cc).values())if(a===s.topicHash)return s;return null}if(e.indexOf("(")===-1){const a=[];for(const[s,o]of W(this,Cc))s.split("(")[0]===e&&a.push(o);if(r){for(let s=a.length-1;s>=0;s--)a[s].inputs.length<r.length&&a.splice(s,1);for(let s=a.length-1;s>=0;s--){const o=a[s].inputs;for(let c=0;c<r.length;c++)if(Ra.isTyped(r[c])&&r[c].type!==o[c].baseType){a.splice(s,1);break}}}if(a.length===0)return null;if(a.length>1&&n){const s=a.map(o=>JSON.stringify(o.format())).join(", ");Ne(!1,`ambiguous event description (i.e. matches ${s})`,"key",e)}return a[0]}const i=W(this,Cc).get($c.from(e).format());return i||null};let _R=Jp;const rQ=BigInt(0);function wv(t){return t??null}function Ia(t){return t==null?null:t.toString()}class Y9{constructor(e,r,n){Be(this,"gasPrice");Be(this,"maxFeePerGas");Be(this,"maxPriorityFeePerGas");Qt(this,{gasPrice:wv(e),maxFeePerGas:wv(r),maxPriorityFeePerGas:wv(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Ia(e),maxFeePerGas:Ia(r),maxPriorityFeePerGas:Ia(n)}}}function IE(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=_t(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=rr(t[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=jr(t[i],`request.${i}`));return t.accessList&&(e.accessList=Mh(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),e}var Du;class wpe{constructor(e,r){Be(this,"provider");Be(this,"number");Be(this,"hash");Be(this,"timestamp");Be(this,"parentHash");Be(this,"nonce");Be(this,"difficulty");Be(this,"gasLimit");Be(this,"gasUsed");Be(this,"miner");Be(this,"extraData");Be(this,"baseFeePerGas");Qe(this,Du,void 0);Te(this,Du,e.transactions.map(n=>typeof n!="string"?new sb(n,r):n)),Qt(this,{provider:r,hash:wv(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,miner:e.miner,extraData:e.extraData,baseFeePerGas:wv(e.baseFeePerGas)})}get transactions(){return W(this,Du).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=W(this,Du).slice();return e.length===0?[]:(it(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:i,gasUsed:a,hash:s,miner:o,nonce:c,number:u,parentHash:f,timestamp:h,transactions:m}=this;return{_type:"Block",baseFeePerGas:Ia(e),difficulty:Ia(r),extraData:n,gasLimit:Ia(i),gasUsed:Ia(a),hash:s,miner:o,nonce:c,number:u,parentHash:f,timestamp:h,transactions:m}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>e<this.length?{value:r[e++],done:!1}:{value:void 0,done:!0}}}get length(){return W(this,Du).length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(e){let r;if(typeof e=="number")r=W(this,Du)[e];else{const n=e.toLowerCase();for(const i of W(this,Du))if(typeof i=="string"){if(i!==n)continue;r=i;break}else{if(i.hash===n)continue;r=i;break}}if(r==null)throw new Error("no such tx");return typeof r=="string"?await this.provider.getTransaction(r):r}getPrefetchedTransaction(e){const r=this.prefetchedTransactions;if(typeof e=="number")return r[e];e=e.toLowerCase();for(const n of r)if(n.hash===e)return n;Ne(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return _pe(this)}}Du=new WeakMap;class r1{constructor(e,r){Be(this,"provider");Be(this,"transactionHash");Be(this,"blockHash");Be(this,"blockNumber");Be(this,"removed");Be(this,"address");Be(this,"data");Be(this,"topics");Be(this,"index");Be(this,"transactionIndex");this.provider=r;const n=Object.freeze(e.topics.slice());Qt(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:n,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:r,blockNumber:n,data:i,index:a,removed:s,topics:o,transactionHash:c,transactionIndex:u}=this;return{_type:"log",address:e,blockHash:r,blockNumber:n,data:i,index:a,removed:s,topics:o,transactionHash:c,transactionIndex:u}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return it(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return it(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return it(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return Epe(this)}}var Cb;class nQ{constructor(e,r){Be(this,"provider");Be(this,"to");Be(this,"from");Be(this,"contractAddress");Be(this,"hash");Be(this,"index");Be(this,"blockHash");Be(this,"blockNumber");Be(this,"logsBloom");Be(this,"gasUsed");Be(this,"cumulativeGasUsed");Be(this,"gasPrice");Be(this,"type");Be(this,"status");Be(this,"root");Qe(this,Cb,void 0);Te(this,Cb,Object.freeze(e.logs.map(i=>new r1(i,r))));let n=rQ;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),Qt(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,gasPrice:n,type:e.type,status:e.status,root:e.root})}get logs(){return W(this,Cb)}toJSON(){const{to:e,from:r,contractAddress:n,hash:i,index:a,blockHash:s,blockNumber:o,logsBloom:c,logs:u,status:f,root:h}=this;return{_type:"TransactionReceipt",blockHash:s,blockNumber:o,contractAddress:n,cumulativeGasUsed:Ia(this.cumulativeGasUsed),from:r,gasPrice:Ia(this.gasPrice),gasUsed:Ia(this.gasUsed),hash:i,index:a,logs:u,logsBloom:c,root:h,status:f,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(e==null)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(e==null)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return aQ(this)}reorderedEvent(e){return it(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),iQ(this,e)}}Cb=new WeakMap;var Gl;const RD=class RD{constructor(e,r){Be(this,"provider");Be(this,"blockNumber");Be(this,"blockHash");Be(this,"index");Be(this,"hash");Be(this,"type");Be(this,"to");Be(this,"from");Be(this,"nonce");Be(this,"gasLimit");Be(this,"gasPrice");Be(this,"maxPriorityFeePerGas");Be(this,"maxFeePerGas");Be(this,"data");Be(this,"value");Be(this,"chainId");Be(this,"signature");Be(this,"accessList");Qe(this,Gl,void 0);this.provider=r,this.blockNumber=e.blockNumber!=null?e.blockNumber:null,this.blockHash=e.blockHash!=null?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=e.maxPriorityFeePerGas!=null?e.maxPriorityFeePerGas:null,this.maxFeePerGas=e.maxFeePerGas!=null?e.maxFeePerGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=e.accessList!=null?e.accessList:null,Te(this,Gl,-1)}toJSON(){const{blockNumber:e,blockHash:r,index:n,hash:i,type:a,to:s,from:o,nonce:c,data:u,signature:f,accessList:h}=this;return{_type:"TransactionReceipt",accessList:h,blockNumber:e,blockHash:r,chainId:Ia(this.chainId),data:u,from:o,gasLimit:Ia(this.gasLimit),gasPrice:Ia(this.gasPrice),hash:i,maxFeePerGas:Ia(this.maxFeePerGas),maxPriorityFeePerGas:Ia(this.maxPriorityFeePerGas),nonce:c,signature:f,to:s,index:n,type:a,value:Ia(this.value)}}async getBlock(){let e=this.blockNumber;if(e==null){const n=await this.getTransaction();n&&(e=n.blockNumber)}if(e==null)return null;const r=this.provider.getBlock(e);if(r==null)throw new Error("TODO");return r}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:r,blockNumber:n}=await _a({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return r==null||r.blockNumber==null?0:n-r.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,r){const n=e??1,i=r??0;let a=W(this,Gl),s=-1,o=a===-1;const c=async()=>{if(o)return null;const{blockNumber:m,nonce:y}=await _a({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(y<this.nonce){a=m;return}if(o)return null;const w=await this.getTransaction();if(!(w&&w.blockNumber!=null))for(s===-1&&(s=a-3,s<W(this,Gl)&&(s=W(this,Gl)));s<=m;){if(o)return null;const v=await this.provider.getBlock(s,!0);if(v==null)return;for(const g of v)if(g===this.hash)return;for(let g=0;g<v.length;g++){const _=await v.getTransaction(g);if(_.from===this.from&&_.nonce===this.nonce){if(o)return null;const b=await this.provider.getTransactionReceipt(_.hash);if(b==null||m-b.blockNumber+1<n)return;let S="replaced";_.data===this.data&&_.to===this.to&&_.value===this.value?S="repriced":_.data==="0x"&&_.from===_.to&&_.value===rQ&&(S="cancelled"),it(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:S==="replaced"||S==="cancelled",reason:S,replacement:_.replaceableTransaction(a),hash:_.hash,receipt:b})}}s++}},u=m=>{if(m==null||m.status!==0)return m;it(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:m.to,from:m.from,data:""},receipt:m})},f=await this.provider.getTransactionReceipt(this.hash);if(n===0)return u(f);if(f){if(await f.confirmations()>=n)return u(f)}else if(await c(),n===0)return null;return await new Promise((m,y)=>{const w=[],v=()=>{w.forEach(_=>_())};if(w.push(()=>{o=!0}),i>0){const _=setTimeout(()=>{v(),y(Ni("wait for transaction timeout","TIMEOUT"))},i);w.push(()=>{clearTimeout(_)})}const g=async _=>{if(await _.confirmations()>=n){v();try{m(u(_))}catch(b){y(b)}}};if(w.push(()=>{this.provider.off(this.hash,g)}),this.provider.on(this.hash,g),a>=0){const _=async()=>{try{await c()}catch(b){if(wo(b,"TRANSACTION_REPLACED")){v(),y(b);return}}o||this.provider.once("block",_)};w.push(()=>{this.provider.off("block",_)}),this.provider.once("block",_)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}removedEvent(){return it(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),aQ(this)}reorderedEvent(e){return it(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),it(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),iQ(this,e)}replaceableTransaction(e){Ne(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new RD(this,this.provider);return Te(r,Gl,e),r}};Gl=new WeakMap;let sb=RD;function _pe(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function iQ(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function aQ(t){return{orphan:"drop-transaction",tx:t}}function Epe(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class F8 extends r1{constructor(r,n,i){super(r,r.provider);Be(this,"interface");Be(this,"fragment");Be(this,"args");const a=n.decodeEventLog(i,r.data,r.topics);Qt(this,{args:a,fragment:i,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class sQ extends r1{constructor(r,n){super(r,r.provider);Be(this,"error");Qt(this,{error:n})}}var K0;class xpe extends nQ{constructor(r,n,i){super(i,n);Qe(this,K0,void 0);Te(this,K0,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?W(this,K0).getEvent(r.topics[0]):null;if(n)try{return new F8(r,W(this,K0),n)}catch(i){return new sQ(r,i)}return r})}}K0=new WeakMap;var Rb;class B8 extends sb{constructor(r,n,i){super(i,n);Qe(this,Rb,void 0);Te(this,Rb,r)}async wait(r){const n=await super.wait(r);return n==null?null:new xpe(W(this,Rb),this.provider,n)}}Rb=new WeakMap;class oQ extends lK{constructor(r,n,i,a){super(r,n,i);Be(this,"log");Qt(this,{log:a})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class Ape extends oQ{constructor(e,r,n,i,a){super(e,r,n,new F8(a,e.interface,i));const s=e.interface.decodeEventLog(i,this.log.data,this.log.topics);Qt(this,{args:s,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const J9=BigInt(0);function cQ(t){return t&&typeof t.call=="function"}function uQ(t){return t&&typeof t.estimateGas=="function"}function jx(t){return t&&typeof t.resolveName=="function"}function lQ(t){return t&&typeof t.sendTransaction=="function"}function fQ(t){if(t!=null){if(jx(t))return t;if(t.provider)return t.provider}}var Nb;class Spe{constructor(e,r,n){Qe(this,Nb,void 0);Be(this,"fragment");if(Qt(this,{fragment:r}),r.inputs.length<n.length)throw new Error("too many arguments");const i=Eh(e.runner,"resolveName"),a=jx(i)?i:null;Te(this,Nb,async function(){const s=await Promise.all(r.inputs.map((o,c)=>n[c]==null?null:o.walkAsync(n[c],(f,h)=>f==="address"?Array.isArray(h)?Promise.all(h.map(m=>sa(m,a))):sa(h,a):h)));return e.interface.encodeFilterTopics(r,s)}())}getTopicFilter(){return W(this,Nb)}}Nb=new WeakMap;function Eh(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function Fd(t){return t==null?null:t.provider||null}async function dQ(t,e){const r=Ra.dereference(t,"overrides");Ne(typeof r=="object","invalid overrides parameter","overrides",t);const n=IE(r);return Ne(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),Ne(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function Ipe(t,e,r){const n=Eh(t,"resolveName"),i=jx(n)?n:null;return await Promise.all(e.map((a,s)=>a.walkAsync(r[s],(o,c)=>(c=Ra.dereference(c,o),o==="address"?sa(c,i):c))))}function Ope(t){const e=async function(s){const o=await dQ(s,["data"]);o.to=await t.getAddress(),o.from&&(o.from=await sa(o.from,fQ(t.runner)));const c=t.interface,u=rr(o.value||J9,"overrides.value")===J9,f=(o.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!f&&!u&&Ne(!1,"cannot send data to receive or send value to non-payable fallback","overrides",s),Ne(c.fallback||f,"cannot send data to receive-only contract","overrides.data",o.data);const h=c.receive||c.fallback&&c.fallback.payable;return Ne(h||u,"cannot send value to non-payable fallback","overrides.value",o.value),Ne(c.fallback||f,"cannot send data to receive-only contract","overrides.data",o.data),o},r=async function(s){const o=Eh(t.runner,"call");it(cQ(o),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(s);try{return await o.call(c)}catch(u){throw w8(u)&&u.data?t.interface.makeError(u.data,c):u}},n=async function(s){const o=t.runner;it(lQ(o),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await o.sendTransaction(await e(s)),u=Fd(t.runner);return new B8(t.interface,u,c)},i=async function(s){const o=Eh(t.runner,"estimateGas");return it(uQ(o),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await o.estimateGas(await e(s))},a=async s=>await n(s);return Qt(a,{_contract:t,estimateGas:i,populateTransaction:e,send:n,staticCall:r}),a}function Ppe(t,e){const r=function(...u){const f=t.interface.getFunction(e,u);return it(f,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:u}}),f},n=async function(...u){const f=r(...u);let h={};if(f.inputs.length+1===u.length&&(h=await dQ(u.pop()),h.from&&(h.from=await sa(h.from,fQ(t.runner)))),f.inputs.length!==u.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const m=await Ipe(t.runner,f.inputs,u);return Object.assign({},h,await _a({to:t.getAddress(),data:t.interface.encodeFunctionData(f,m)}))},i=async function(...u){const f=await o(...u);return f.length===1?f[0]:f},a=async function(...u){const f=t.runner;it(lQ(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const h=await f.sendTransaction(await n(...u)),m=Fd(t.runner);return new B8(t.interface,m,h)},s=async function(...u){const f=Eh(t.runner,"estimateGas");return it(uQ(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await n(...u))},o=async function(...u){const f=Eh(t.runner,"call");it(cQ(f),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const h=await n(...u);let m="0x";try{m=await f.call(h)}catch(w){throw w8(w)&&w.data?t.interface.makeError(w.data,h):w}const y=r(...u);return t.interface.decodeFunctionResult(y,m)},c=async(...u)=>r(...u).constant?await i(...u):await a(...u);return Qt(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:s,populateTransaction:n,send:a,staticCall:i,staticCallResult:o}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const u=t.interface.getFunction(e);return it(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),u}}),c}function Tpe(t,e){const r=function(...i){const a=t.interface.getEvent(e,i);return it(a,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),a},n=function(...i){return new Spe(t,r(...i),i)};return Qt(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return it(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const OE=Symbol.for("_ethersInternal_contract"),hQ=new WeakMap;function Cpe(t,e){hQ.set(t[OE],e)}function Ts(t){return hQ.get(t[OE])}function Rpe(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function q8(t,e){let r,n=null;if(Array.isArray(e)){const a=function(s){if(ai(s,32))return s;const o=t.interface.getEvent(s);return Ne(o,"unknown fragment","name",s),o.topicHash};r=e.map(s=>s==null?null:Array.isArray(s)?s.map(a):a(s))}else e==="*"?r=[null]:typeof e=="string"?ai(e,32)?r=[e]:(n=t.interface.getEvent(e),Ne(n,"unknown fragment","event",e),r=[n.topicHash]):Rpe(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):Ne(!1,"unknown event name","event",e);r=r.map(a=>{if(a==null)return null;if(Array.isArray(a)){const s=Array.from(new Set(a.map(o=>o.toLowerCase())).values());return s.length===1?s[0]:(s.sort(),s)}return a.toLowerCase()});const i=r.map(a=>a==null?"null":Array.isArray(a)?a.join("|"):a).join("&");return{fragment:n,tag:i,topics:r}}async function Wy(t,e){const{subs:r}=Ts(t);return r.get((await q8(t,e)).tag)||null}async function X9(t,e,r){const n=Fd(t.runner);it(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:a,topics:s}=await q8(t,r),{addr:o,subs:c}=Ts(t);let u=c.get(a);if(!u){const h={address:o||t,topics:s},m=g=>{let _=i;if(_==null)try{_=t.interface.getEvent(g.topics[0])}catch{}if(_){const b=_,S=i?t.interface.decodeEventLog(i,g.data,g.topics):[];xR(t,r,S,A=>new Ape(t,A,r,b,g))}else xR(t,r,[],b=>new oQ(t,b,r,g))};let y=[];u={tag:a,listeners:[],start:()=>{y.length||y.push(n.on(h,m))},stop:async()=>{if(y.length==0)return;let g=y;y=[],await Promise.all(g),n.off(h,m)}},c.set(a,u)}return u}let ER=Promise.resolve();async function Npe(t,e,r,n){await ER;const i=await Wy(t,e);if(!i)return!1;const a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:s,once:o})=>{const c=Array.from(r);n&&c.push(n(o?null:s));try{s.call(t,...c)}catch{}return!o}),i.listeners.length===0&&(i.stop(),Ts(t).subs.delete(i.tag)),a>0}async function xR(t,e,r,n){try{await ER}catch{}const i=Npe(t,e,r,n);return ER=i,await i}const Mw=["then"];var iDe;const Mv=class Mv{constructor(e,r,n,i){Be(this,"target");Be(this,"interface");Be(this,"runner");Be(this,"filters");Be(this,iDe);Be(this,"fallback");Ne(typeof e=="string"||gW(e),"invalid value for Contract target","target",e),n==null&&(n=null);const a=_R.from(r);Qt(this,{target:e,runner:n,interface:a}),Object.defineProperty(this,OE,{value:{}});let s,o=null,c=null;if(i){const h=Fd(n);c=new B8(this.interface,h,i)}let u=new Map;if(typeof e=="string")if(ai(e))o=e,s=Promise.resolve(e);else{const h=Eh(n,"resolveName");if(!jx(h))throw Ni("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});s=h.resolveName(e).then(m=>{if(m==null)throw Ni("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Ts(this).addr=m,m})}else s=e.getAddress().then(h=>{if(h==null)throw new Error("TODO");return Ts(this).addr=h,h});Cpe(this,{addrPromise:s,addr:o,deployTx:c,subs:u});const f=new Proxy({},{get:(h,m,y)=>{if(typeof m=="symbol"||Mw.indexOf(m)>=0)return Reflect.get(h,m,y);try{return this.getEvent(m)}catch(w){if(!wo(w,"INVALID_ARGUMENT")||w.argument!=="key")throw w}},has:(h,m)=>Mw.indexOf(m)>=0?Reflect.has(h,m):Reflect.has(h,m)||this.interface.hasEvent(String(m))});return Qt(this,{filters:f}),Qt(this,{fallback:a.receive||a.fallback?Ope(this):null}),new Proxy(this,{get:(h,m,y)=>{if(typeof m=="symbol"||m in h||Mw.indexOf(m)>=0)return Reflect.get(h,m,y);try{return h.getFunction(m)}catch(w){if(!wo(w,"INVALID_ARGUMENT")||w.argument!=="key")throw w}},has:(h,m)=>typeof m=="symbol"||m in h||Mw.indexOf(m)>=0?Reflect.has(h,m):h.interface.hasFunction(m)})}connect(e){return new Mv(this.target,this.interface,e)}attach(e){return new Mv(e,this.interface,this.runner)}async getAddress(){return await Ts(this).addrPromise}async getDeployedCode(){const e=Fd(this.runner);it(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=Fd(this.runner);return it(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,a)=>{const s=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",s)}catch(o){a(o)}};s()})}deploymentTransaction(){return Ts(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),Ppe(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),Tpe(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:i,addrPromise:a}=Ts(this),s=i||await a,{fragment:o,topics:c}=await q8(this,e),u={address:s,topics:c,fromBlock:r,toBlock:n},f=Fd(this.runner);return it(f,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await f.getLogs(u)).map(h=>{let m=o;if(m==null)try{m=this.interface.getEvent(h.topics[0])}catch{}if(m)try{return new F8(h,this.interface,m)}catch(y){return new sQ(h,y)}return new r1(h,f)})}async on(e,r){const n=await X9(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await X9(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await xR(this,e,r,null)}async listenerCount(e){if(e){const i=await Wy(this,e);return i?i.listeners.length:0}const{subs:r}=Ts(this);let n=0;for(const{listeners:i}of r.values())n+=i.length;return n}async listeners(e){if(e){const i=await Wy(this,e);return i?i.listeners.map(({listener:a})=>a):[]}const{subs:r}=Ts(this);let n=[];for(const{listeners:i}of r.values())n=n.concat(i.map(({listener:a})=>a));return n}async off(e,r){const n=await Wy(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:a})=>a).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(r==null||n.listeners.length===0)&&(n.stop(),Ts(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await Wy(this,e);if(!r)return this;r.stop(),Ts(this).subs.delete(r.tag)}else{const{subs:r}=Ts(this);for(const{tag:n,stop:i}of r.values())i(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends Mv{constructor(i,a=null){super(i,e,a)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};iDe=OE;let AR=Mv;function Dpe(){return AR}class _v extends Dpe(){}function HS(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ne(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class Mpe{constructor(e){Be(this,"name");Qt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const pQ=new RegExp("^(ipfs)://(.*)$","i"),Z9=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),pQ,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Kl,Xd,Wl,Np,cx,gQ;const Xp=class Xp{constructor(e,r,n){Qe(this,Wl);Be(this,"provider");Be(this,"address");Be(this,"name");Qe(this,Kl,void 0);Qe(this,Xd,void 0);Qt(this,{provider:e,address:r,name:n}),Te(this,Kl,null),Te(this,Xd,new _v(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return W(this,Kl)==null&&Te(this,Kl,(async()=>{try{return await W(this,Xd).supportsInterface("0x9061b923")}catch(e){if(wo(e,"CALL_EXCEPTION"))return!1;throw Te(this,Kl,null),e}})()),await W(this,Kl)}async getAddress(e){if(e==null&&(e=60),e===60)try{const a=await ct(this,Wl,Np).call(this,"addr(bytes32)");return a==null||a===hR?null:a}catch(a){if(wo(a,"CALL_EXCEPTION"))return null;throw a}if(e>=0&&e<2147483648){let a=e+2147483648;const s=await ct(this,Wl,Np).call(this,"addr(bytes32,uint)",[a]);if(ai(s,20))return sn(s)}let r=null;for(const a of this.provider.plugins)if(a instanceof Mpe&&a.supportsCoinType(e)){r=a;break}if(r==null)return null;const n=await ct(this,Wl,Np).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await r.decodeAddress(e,n);if(i!=null)return i;it(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await ct(this,Wl,Np).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await ct(this,Wl,Np).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const i=r[1]==="e3010170"?"ipfs":"ipns",a=parseInt(r[4],16);if(r[5].length===a*2)return`${i}://${uK("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;it(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n<Z9.length;n++){const i=r.match(Z9[n]);if(i==null)continue;const a=i[1].toLowerCase();switch(a){case"https":case"data":return e.push({type:"url",value:r}),{linkage:e,url:r};case"ipfs":{const s=HS(r);return e.push({type:"ipfs",value:r}),e.push({type:"url",value:s}),{linkage:e,url:s}}case"erc721":case"erc1155":{const s=a==="erc721"?"tokenURI(uint256)":"uri(uint256)";e.push({type:a,value:r});const o=await this.getAddress();if(o==null)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const c=(i[2]||"").split("/");if(c.length!==2)return e.push({type:`!${a}caip`,value:i[2]||""}),{url:null,linkage:e};const u=c[1],f=new _v(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(a==="erc721"){const v=await f.ownerOf(u);if(o!==v)return e.push({type:"!owner",value:v}),{url:null,linkage:e};e.push({type:"owner",value:v})}else if(a==="erc1155"){const v=await f.balanceOf(o,u);if(!v)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:v.toString()})}let h=await f[s](u);if(h==null||h==="0x")return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:h}),a==="erc1155"&&(h=h.replace("{id}",Zu(u,32).substring(2)),e.push({type:"metadata-url-expanded",value:h})),h.match(/^ipfs:/i)&&(h=HS(h)),e.push({type:"metadata-url",value:h});let m={};const y=await new Of(h).send();y.assertOk();try{m=y.bodyJson}catch{try{e.push({type:"!metadata",value:y.bodyText})}catch{const _=y.body;return _&&e.push({type:"!metadata",value:_t(_)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!m)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(m)});let w=m.image;if(typeof w!="string")return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(!w.match(/^(https:\/\/|data:)/i)){if(w.match(pQ)==null)return e.push({type:"!imageUrl-ipfs",value:w}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:w}),w=HS(w)}return e.push({type:"url",value:w}),{linkage:e,url:w}}}}}catch{}return{linkage:e,url:null}}static async getEnsAddress(e){const r=await e.getNetwork(),n=r.getPlugin("org.ethers.plugins.network.Ens");return it(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:r}}),n.address}static async fromName(e,r){var i;let n=r;for(;;){if(n===""||n==="."||r!=="eth"&&n==="eth")return null;const a=await ct(i=Xp,cx,gQ).call(i,e,n);if(a!=null){const s=new Xp(e,a,r);return n!==r&&!await s.supportsWildcard()?null:s}n=n.split(".").slice(1).join(".")}}};Kl=new WeakMap,Xd=new WeakMap,Wl=new WeakSet,Np=async function(e,r){r=(r||[]).slice();const n=W(this,Xd).interface;r.unshift(bR(this.name));let i=null;await this.supportsWildcard()&&(i=n.getFunction(e),it(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),r=[Uhe(this.name),n.encodeFunctionData(i,r)],e="resolve(bytes,bytes)"),r.push({enableCcipRead:!0});try{const a=await W(this,Xd)[e](...r);return i?n.decodeFunctionResult(i,a)[0]:a}catch(a){if(!wo(a,"CALL_EXCEPTION"))throw a}return null},cx=new WeakSet,gQ=async function(e,r){const n=await Xp.getEnsAddress(e);try{const a=await new _v(n,["function resolver(bytes32) view returns (address)"],e).resolver(bR(r),{enableCcipRead:!0});return a===hR?null:a}catch(i){throw i}return null},Qe(Xp,cx);let PE=Xp;const eL=BigInt(0);function ni(t,e){return function(r){return r==null?e:t(r)}}function H8(t){return e=>{if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>t(r))}}function n1(t,e){return r=>{const n={};for(const i in t){let a=i;if(e&&i in e&&!(a in r)){for(const s of e[i])if(s in r){a=s;break}}try{const s=t[i](r[a]);s!==void 0&&(n[i]=s)}catch(s){const o=s instanceof Error?s.message:"not-an-error";it(!1,`invalid value for value.${i} (${o})`,"BAD_DATA",{value:r})}}return n}}function $pe(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}Ne(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Eg(t){return Ne(ai(t,!0),"invalid data","value",t),t}function _o(t){return Ne(ai(t,32),"invalid hash","value",t),t}const kpe=n1({address:sn,blockHash:_o,blockNumber:jr,data:Eg,index:jr,removed:ni($pe,!1),topics:H8(_o),transactionHash:_o,transactionIndex:jr},{index:["logIndex"]});function Lpe(t){return kpe(t)}const jpe=n1({hash:ni(_o),parentHash:_o,number:jr,timestamp:jr,nonce:ni(Eg),difficulty:rr,gasLimit:rr,gasUsed:rr,miner:ni(sn),extraData:Eg,baseFeePerGas:ni(rr)});function Upe(t){const e=jpe(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:mQ(r)),e}const Fpe=n1({transactionIndex:jr,blockNumber:jr,transactionHash:_o,address:sn,topics:H8(_o),data:Eg,index:jr,blockHash:_o},{index:["logIndex"]});function Bpe(t){return Fpe(t)}const qpe=n1({to:ni(sn,null),from:ni(sn,null),contractAddress:ni(sn,null),index:jr,root:ni(_t),gasUsed:rr,logsBloom:ni(Eg),blockHash:_o,hash:_o,logs:H8(Bpe),blockNumber:jr,cumulativeGasUsed:rr,effectiveGasPrice:ni(rr),status:ni(jr),type:ni(jr,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Hpe(t){return qpe(t)}function mQ(t){t.to&&rr(t.to)===eL&&(t.to="0x0000000000000000000000000000000000000000");const e=n1({hash:_o,type:r=>r==="0x"||r==null?0:jr(r),accessList:ni(Mh,null),blockHash:ni(_o,null),blockNumber:ni(jr,null),transactionIndex:ni(jr,null),from:sn,gasPrice:ni(rr),maxPriorityFeePerGas:ni(rr),maxFeePerGas:ni(rr),gasLimit:rr,to:ni(sn,null),value:rr,nonce:jr,data:Eg,creates:ni(sn,null),chainId:ni(rr,null)},{data:["input"],gasLimit:["gas"]})(t);if(e.to==null&&e.creates==null&&(e.creates=qde(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=lc.from(t.signature):e.signature=lc.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&rr(e.blockHash)===eL&&(e.blockHash=null),e}const zpe="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class i1{constructor(e){Be(this,"name");Qt(this,{name:e})}clone(){return new i1(this.name)}}class Ux extends i1{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);Be(this,"effectiveBlock");Be(this,"txBase");Be(this,"txCreate");Be(this,"txDataZero");Be(this,"txDataNonzero");Be(this,"txAccessListStorageKey");Be(this,"txAccessListAddress");const i={effectiveBlock:r};function a(s,o){let c=(n||{})[s];c==null&&(c=o),Ne(typeof c=="number",`invalud value for ${s}`,"costs",n),i[s]=c}a("txBase",21e3),a("txCreate",32e3),a("txDataZero",4),a("txDataNonzero",16),a("txAccessListStorageKey",1900),a("txAccessListAddress",2400),Qt(this,i)}clone(){return new Ux(this.effectiveBlock,this)}}class Fx extends i1{constructor(r,n){super("org.ethers.plugins.network.Ens");Be(this,"address");Be(this,"targetNetwork");Qt(this,{address:r||zpe,targetNetwork:n??1})}clone(){return new Fx(this.address,this.targetNetwork)}}var Db,Mb;class yQ extends i1{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");Qe(this,Db,void 0);Qe(this,Mb,void 0);Te(this,Db,r),Te(this,Mb,n)}get url(){return W(this,Db)}get processFunc(){return W(this,Mb)}clone(){return this}}Db=new WeakMap,Mb=new WeakMap;const zS=new Map;var W0,Q0,Ql;const Zp=class Zp{constructor(e,r){Qe(this,W0,void 0);Qe(this,Q0,void 0);Qe(this,Ql,void 0);Te(this,W0,e),Te(this,Q0,rr(r)),Te(this,Ql,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return W(this,W0)}set name(e){Te(this,W0,e)}get chainId(){return W(this,Q0)}set chainId(e){Te(this,Q0,rr(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===rr(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===rr(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===rr(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(W(this,Ql).values())}attachPlugin(e){if(W(this,Ql).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return W(this,Ql).set(e.name,e.clone()),this}getPlugin(e){return W(this,Ql).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new Zp(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new Ux;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let i=2;i<e.data.length;i+=2)e.data.substring(i,i+2)==="00"?n+=r.txDataZero:n+=r.txDataNonzero;if(e.accessList){const i=Mh(e.accessList);for(const a in i)n+=r.txAccessListAddress+r.txAccessListStorageKey*i[a].storageKeys.length}return n}static from(e){if(Gpe(),e==null)return Zp.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){const r=zS.get(e);if(r)return r();if(typeof e=="bigint")return new Zp("unknown",e);Ne(!1,"unknown network","network",e)}if(typeof e.clone=="function")return e.clone();if(typeof e=="object"){Ne(typeof e.name=="string"&&typeof e.chainId=="number","invalid network object name or chainId","network",e);const r=new Zp(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&r.attachPlugin(new Fx(e.ensAddress,e.ensNetwork)),r}Ne(!1,"invalid network","network",e)}static register(e,r){typeof e=="number"&&(e=BigInt(e));const n=zS.get(e);n&&Ne(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),zS.set(e,r)}};W0=new WeakMap,Q0=new WeakMap,Ql=new WeakMap;let Vu=Zp;function tL(t,e){const r=String(t);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${t}`);const n=r.split(".");if(n.length===1&&n.push(""),n.length!==2)throw new Error(`invalid gwei value: ${t}`);for(;n[1].length<e;)n[1]+="0";if(n[1].length>9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function rL(t){return new yQ(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[a,s]=await Promise.all([n.send(),e()]);i=a;const o=i.bodyJson.standard;return{gasPrice:s.gasPrice,maxFeePerGas:tL(o.maxFee,9),maxPriorityFeePerGas:tL(o.maxPriorityFee,9)}}catch(a){it(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:a})}})}function Vpe(t){return new yQ("data:",async(e,r,n)=>{const i=await e();if(i.maxFeePerGas==null||i.maxPriorityFeePerGas==null)return i;const a=i.maxFeePerGas-i.maxPriorityFeePerGas;return{gasPrice:i.gasPrice,maxFeePerGas:a+t,maxPriorityFeePerGas:t}})}let nL=!1;function Gpe(){if(nL)return;nL=!0;function t(e,r,n){const i=function(){const a=new Vu(e,r);return n.ensNetwork!=null&&a.attachPlugin(new Fx(null,n.ensNetwork)),a.attachPlugin(new Ux),(n.plugins||[]).forEach(s=>{a.attachPlugin(s)}),a};Vu.register(e,i),Vu.register(r,i),n.altNames&&n.altNames.forEach(a=>{Vu.register(a,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("matic",137,{ensNetwork:1,plugins:[rL("https://gasstation.polygon.technology/v2")]}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[rL("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[Vpe(BigInt("1000000"))]}),t("optimism-goerli",420,{}),t("xdai",100,{ensNetwork:1})}function SR(t){return JSON.parse(JSON.stringify(t))}var Mu,fo,Yl,Nc,Y0,P_;class Kpe{constructor(e){Qe(this,Y0);Qe(this,Mu,void 0);Qe(this,fo,void 0);Qe(this,Yl,void 0);Qe(this,Nc,void 0);Te(this,Mu,e),Te(this,fo,null),Te(this,Yl,4e3),Te(this,Nc,-2)}get pollingInterval(){return W(this,Yl)}set pollingInterval(e){Te(this,Yl,e)}start(){W(this,fo)||(Te(this,fo,W(this,Mu)._setTimeout(ct(this,Y0,P_).bind(this),W(this,Yl))),ct(this,Y0,P_).call(this))}stop(){W(this,fo)&&(W(this,Mu)._clearTimeout(W(this,fo)),Te(this,fo,null))}pause(e){this.stop(),e&&Te(this,Nc,-2)}resume(){this.start()}}Mu=new WeakMap,fo=new WeakMap,Yl=new WeakMap,Nc=new WeakMap,Y0=new WeakSet,P_=async function(){try{const e=await W(this,Mu).getBlockNumber();if(W(this,Nc)===-2){Te(this,Nc,e);return}if(e!==W(this,Nc)){for(let r=W(this,Nc)+1;r<=e;r++){if(W(this,fo)==null)return;await W(this,Mu).emit("block",r)}Te(this,Nc,e)}}catch{}W(this,fo)!=null&&Te(this,fo,W(this,Mu)._setTimeout(ct(this,Y0,P_).bind(this),W(this,Yl)))};var Zd,eh,Jl;class vQ{constructor(e){Qe(this,Zd,void 0);Qe(this,eh,void 0);Qe(this,Jl,void 0);Te(this,Zd,e),Te(this,Jl,!1),Te(this,eh,r=>{this._poll(r,W(this,Zd))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){W(this,Jl)||(Te(this,Jl,!0),W(this,eh).call(this,-2),W(this,Zd).on("block",W(this,eh)))}stop(){W(this,Jl)&&(Te(this,Jl,!1),W(this,Zd).off("block",W(this,eh)))}pause(e){this.stop()}resume(){this.start()}}Zd=new WeakMap,eh=new WeakMap,Jl=new WeakMap;var ux;class Wpe extends vQ{constructor(r,n){super(r);Qe(this,ux,void 0);Te(this,ux,SR(n))}async _poll(r,n){throw new Error("@TODO")}}ux=new WeakMap;var J0;class Qpe extends vQ{constructor(r,n){super(r);Qe(this,J0,void 0);Te(this,J0,n)}async _poll(r,n){const i=await n.getTransactionReceipt(W(this,J0));i&&n.emit(W(this,J0),i)}}J0=new WeakMap;var $u,X0,Z0,Xl,ho,lx,bQ;class z8{constructor(e,r){Qe(this,lx);Qe(this,$u,void 0);Qe(this,X0,void 0);Qe(this,Z0,void 0);Qe(this,Xl,void 0);Qe(this,ho,void 0);Te(this,$u,e),Te(this,X0,SR(r)),Te(this,Z0,ct(this,lx,bQ).bind(this)),Te(this,Xl,!1),Te(this,ho,-2)}start(){W(this,Xl)||(Te(this,Xl,!0),W(this,ho)===-2&&W(this,$u).getBlockNumber().then(e=>{Te(this,ho,e)}),W(this,$u).on("block",W(this,Z0)))}stop(){W(this,Xl)&&(Te(this,Xl,!1),W(this,$u).off("block",W(this,Z0)))}pause(e){this.stop(),e&&Te(this,ho,-2)}resume(){this.start()}}$u=new WeakMap,X0=new WeakMap,Z0=new WeakMap,Xl=new WeakMap,ho=new WeakMap,lx=new WeakSet,bQ=async function(e){if(W(this,ho)===-2)return;const r=SR(W(this,X0));r.fromBlock=W(this,ho)+1,r.toBlock=e;const n=await W(this,$u).getLogs(r);if(n.length===0){W(this,ho)<e-60&&Te(this,ho,e-60);return}for(const i of n)W(this,$u).emit(W(this,X0),i),Te(this,ho,i.blockNumber)};const Ype=BigInt(2),Jpe=10;function $w(t){return t&&typeof t.then=="function"}function T_(t,e){return t+":"+JSON.stringify(e,(r,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((a,s)=>(a[s]=n[s],a),{})}return n})}class wQ{constructor(e){Be(this,"name");Qt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function Xpe(t){return JSON.parse(JSON.stringify(t))}function IR(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function VS(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"pending":case"debug":case"error":case"network":return{type:t,tag:t}}if(ai(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:T_("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:T_("orphan",r),filter:Xpe(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(i=>i==null?null:Array.isArray(i)?IR(i.map(a=>a.toLowerCase())):i.toLowerCase())};if(r.address){const i=[],a=[],s=o=>{ai(o)?i.push(o):a.push((async()=>{i.push(await sa(o,e))})())};Array.isArray(r.address)?r.address.forEach(s):s(r.address),a.length&&await Promise.all(a),n.address=IR(i.map(o=>o.toLowerCase()))}return{filter:n,tag:T_("event",n),type:"event"}}Ne(!1,"unknown ProviderEvent","event",t)}function GS(){return new Date().getTime()}const Zpe={cacheTimeout:250,pollingInterval:4e3};var ba,Zl,wa,eg,Ns,th,ef,ku,$b,po,tg,rg,os,ro,kb,OR,Lb,PR,rh,Qy,jb,TR,nh,Yy,ng,C_;class e0e{constructor(e,r){Qe(this,os);Qe(this,kb);Qe(this,Lb);Qe(this,rh);Qe(this,jb);Qe(this,nh);Qe(this,ng);Qe(this,ba,void 0);Qe(this,Zl,void 0);Qe(this,wa,void 0);Qe(this,eg,void 0);Qe(this,Ns,void 0);Qe(this,th,void 0);Qe(this,ef,void 0);Qe(this,ku,void 0);Qe(this,$b,void 0);Qe(this,po,void 0);Qe(this,tg,void 0);Qe(this,rg,void 0);if(Te(this,rg,Object.assign({},Zpe,r||{})),e==="any")Te(this,th,!0),Te(this,Ns,null);else if(e){const n=Vu.from(e);Te(this,th,!1),Te(this,Ns,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else Te(this,th,!1),Te(this,Ns,null);Te(this,ku,-1),Te(this,ef,new Map),Te(this,ba,new Map),Te(this,Zl,new Map),Te(this,wa,null),Te(this,eg,!1),Te(this,$b,1),Te(this,po,new Map),Te(this,tg,!1)}get pollingInterval(){return W(this,rg).pollingInterval}get provider(){return this}get plugins(){return Array.from(W(this,Zl).values())}attachPlugin(e){if(W(this,Zl).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return W(this,Zl).set(e.name,e.connect(this)),this}getPlugin(e){return W(this,Zl).get(e)||null}get disableCcipRead(){return W(this,tg)}set disableCcipRead(e){Te(this,tg,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),a=r.toLowerCase(),s=[];for(let o=0;o<n.length;o++){const c=n[o],u=c.replace("{sender}",i).replace("{data}",a),f=new Of(u);c.indexOf("{data}")===-1&&(f.body={data:a,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:f,index:o,urls:n});let h="unknown error";const m=await f.send();try{const y=m.bodyJson;if(y.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:f,result:y}),y.data;y.message&&(h=y.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:y})}catch{}it(m.statusCode<400||m.statusCode>=500,`response not found during CCIP fetch: ${h}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:h}}),s.push(h)}it(!1,`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:s}})}_wrapBlock(e,r){return new wpe(Upe(e),this)}_wrapLog(e,r){return new r1(Lpe(e),this)}_wrapTransactionReceipt(e,r){return new nQ(Hpe(e),this)}_wrapTransactionResponse(e,r){return new sb(mQ(e),this)}_detectNetwork(){it(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){it(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=jr(await ct(this,os,ro).call(this,{method:"getBlockNumber"}),"%response");return W(this,ku)>=0&&Te(this,ku,e),e}_getAddress(e){return sa(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(ai(e))return ai(e,32)?e:Gp(e);if(typeof e=="bigint"&&(e=jr(e,"blockTag")),typeof e=="number")return e>=0?Gp(e):W(this,ku)>=0?Gp(W(this,ku)+e):this.getBlockNumber().then(r=>Gp(r+e));Ne(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?IR(c.map(u=>u.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(c,u,f)=>{let h;switch(c.length){case 0:break;case 1:h=c[0];break;default:c.sort(),h=c}if(n&&(u!=null||f!=null))throw new Error("invalid filter");const m={};return h&&(m.address=h),r.length&&(m.topics=r),u&&(m.fromBlock=u),f&&(m.toBlock=f),n&&(m.blockHash=n),m};let a=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)a.push(this._getAddress(c));else a.push(this._getAddress(e.address));let s;"fromBlock"in e&&(s=this._getBlockTag(e.fromBlock));let o;return"toBlock"in e&&(o=this._getBlockTag(e.toBlock)),a.filter(c=>typeof c!="string").length||s!=null&&typeof s!="string"||o!=null&&typeof o!="string"?Promise.all([Promise.all(a),s,o]).then(c=>i(c[0],c[1],c[2])):i(a,s,o)}_getTransactionRequest(e){const r=IE(e),n=[];if(["to","from"].forEach(i=>{if(r[i]==null)return;const a=sa(r[i],this);$w(a)?n.push(async function(){r[i]=await a}()):r[i]=a}),r.blockTag!=null){const i=this._getBlockTag(r.blockTag);$w(i)?n.push(async function(){r.blockTag=await i}()):r.blockTag=i}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(W(this,Ns)==null){const i=this._detectNetwork().then(a=>(this.emit("network",a,null),a),a=>{throw W(this,Ns)===i&&Te(this,Ns,null),a});return Te(this,Ns,i),(await i).clone()}const e=W(this,Ns),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(W(this,th)?(this.emit("network",n,r),W(this,Ns)===e&&Te(this,Ns,Promise.resolve(n))):it(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:i,gasPrice:a}=await _a({_block:ct(this,jb,TR).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ct(this,os,ro).call(this,{method:"getGasPrice"});return rr(u,"%response")}catch{}return null})()});let s=null,o=null;const c=this._wrapBlock(i,e);return c&&c.baseFeePerGas&&(o=BigInt("1000000000"),s=c.baseFeePerGas*Ype+o),new Y9(a,s,o)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new Of(n.url),a=await n.processFunc(r,this,i);return new Y9(a.gasPrice,a.maxFeePerGas,a.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return $w(r)&&(r=await r),rr(await ct(this,os,ro).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await _a({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ct(this,Lb,PR).call(this,ct(this,kb,OR).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return rr(await ct(this,rh,Qy).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return jr(await ct(this,rh,Qy).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return _t(await ct(this,rh,Qy).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const i=rr(r,"position");return _t(await ct(this,rh,Qy).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:i}=await _a({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),a=nb.from(e);if(a.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(a,i).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:i}=await _a({network:this.getNetwork(),params:ct(this,jb,TR).call(this,e,!!r)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:r,params:n}=await _a({network:this.getNetwork(),params:ct(this,os,ro).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await _a({network:this.getNetwork(),params:ct(this,os,ro).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await ct(this,os,ro).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await _a({network:this.getNetwork(),result:ct(this,os,ro).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:_t(r)}async getLogs(e){let r=this._getFilter(e);$w(r)&&(r=await r);const{network:n,params:i}=await _a({network:this.getNetwork(),params:ct(this,os,ro).call(this,{method:"getLogs",filter:r})});return i.map(a=>this._wrapLog(a,n))}_getProvider(e){it(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await PE.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=sn(e);const r=bR(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await PE.getEnsAddress(this),a=await new _v(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(a==null||a===hR)return null;const o=await new _v(a,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(o)!==e?null:o}catch(n){if(wo(n,"BAD_DATA")&&n.value==="0x"||wo(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const i=r??1;return i===0?this.getTransactionReceipt(e):new Promise(async(a,s)=>{let o=null;const c=async u=>{try{const f=await this.getTransactionReceipt(e);if(f!=null&&u-f.blockNumber+1>=i){a(f),o&&(clearTimeout(o),o=null);return}}catch(f){console.log("EEE",f)}this.once("block",c)};n!=null&&(o=setTimeout(()=>{o!=null&&(o=null,this.off("block",c),s(Ni("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){it(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=W(this,po).get(e);r&&(r.timer&&clearTimeout(r.timer),W(this,po).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=Em(this,$b)._++,i=()=>{W(this,po).delete(n),e()};if(this.paused)W(this,po).set(n,{timer:null,func:i,time:r});else{const a=setTimeout(i,r);W(this,po).set(n,{timer:a,func:i,time:GS()})}return n}_forEachSubscriber(e){for(const r of W(this,ba).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new wQ(e.type);case"block":{const r=new Kpe(this);return r.pollingInterval=this.pollingInterval,r}case"event":return new z8(this,e.filter);case"transaction":return new Qpe(this,e.hash);case"orphan":return new Wpe(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of W(this,ba).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),W(this,wa)!=null&&r.pause(W(this,wa));break}}async on(e,r){const n=await ct(this,ng,C_).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,W(this,wa)!=null&&n.subscriber.pause(W(this,wa))),this}async once(e,r){const n=await ct(this,ng,C_).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,W(this,wa)!=null&&n.subscriber.pause(W(this,wa))),this}async emit(e,...r){const n=await ct(this,nh,Yy).call(this,e,r);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:a,once:s})=>{const o=new lK(this,s?null:a,e);try{a.call(this,...r,o)}catch{}return!s}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),W(this,ba).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await ct(this,nh,Yy).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of W(this,ba).values())r+=n.length;return r}async listeners(e){if(e){const n=await ct(this,nh,Yy).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let r=[];for(const{listeners:n}of W(this,ba).values())r=r.concat(n.map(({listener:i})=>i));return r}async off(e,r){const n=await ct(this,nh,Yy).call(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:a})=>a).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),W(this,ba).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:i}=await ct(this,ng,C_).call(this,e);n&&i.stop(),W(this,ba).delete(r)}else for(const[r,{started:n,subscriber:i}]of W(this,ba))n&&i.stop(),W(this,ba).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return W(this,eg)}destroy(){this.removeAllListeners();for(const e of W(this,po).keys())this._clearTimeout(e);Te(this,eg,!0)}get paused(){return W(this,wa)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(Te(this,ku,-1),W(this,wa)!=null){if(W(this,wa)==!!e)return;it(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),Te(this,wa,!!e);for(const r of W(this,po).values())r.timer&&clearTimeout(r.timer),r.time=GS()-r.time}resume(){if(W(this,wa)!=null){this._forEachSubscriber(e=>e.resume()),Te(this,wa,null);for(const e of W(this,po).values()){let r=e.time;r<0&&(r=0),e.time=GS(),setTimeout(e.func,r)}}}}ba=new WeakMap,Zl=new WeakMap,wa=new WeakMap,eg=new WeakMap,Ns=new WeakMap,th=new WeakMap,ef=new WeakMap,ku=new WeakMap,$b=new WeakMap,po=new WeakMap,tg=new WeakMap,rg=new WeakMap,os=new WeakSet,ro=async function(e){const r=W(this,rg).cacheTimeout;if(r<0)return await this._perform(e);const n=T_(e.method,e);let i=W(this,ef).get(n);return i||(i=this._perform(e),W(this,ef).set(n,i),setTimeout(()=>{W(this,ef).get(n)===i&&W(this,ef).delete(n)},r)),await i},kb=new WeakSet,OR=async function(e,r,n){it(n<Jpe,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:r,enableCcipRead:!0})});const i=IE(e);try{return _t(await this._perform({method:"call",transaction:i,blockTag:r}))}catch(a){if(!this.disableCcipRead&&w8(a)&&a.data&&n>=0&&r==="latest"&&i.to!=null&&zn(a.data,0,4)==="0x556f1830"){const s=a.data,o=await sa(i.to,this);let c;try{c=a0e(zn(a.data,4))}catch(h){it(!1,h.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:s}})}it(c.sender.toLowerCase()===o.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:s,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const u=await this.ccipReadFetch(i,c.calldata,c.urls);it(u!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:a.data,errorArgs:c.errorArgs}});const f={to:o,data:Bn([c.selector,i0e([u,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:f});try{const h=await ct(this,kb,OR).call(this,f,r,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},f),result:h}),h}catch(h){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},f),error:h}),h}}throw a}},Lb=new WeakSet,PR=async function(e){const{value:r}=await _a({network:this.getNetwork(),value:e});return r},rh=new WeakSet,Qy=async function(e,r,n){let i=this._getAddress(r),a=this._getBlockTag(n);return(typeof i!="string"||typeof a!="string")&&([i,a]=await Promise.all([i,a])),await ct(this,Lb,PR).call(this,ct(this,os,ro).call(this,Object.assign(e,{address:i,blockTag:a})))},jb=new WeakSet,TR=async function(e,r){if(ai(e,32))return await ct(this,os,ro).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await ct(this,os,ro).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},nh=new WeakSet,Yy=async function(e,r){let n=await VS(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await VS({orphan:"drop-log",log:r[0]},this)),W(this,ba).get(n.tag)||null},ng=new WeakSet,C_=async function(e){const r=await VS(e,this),n=r.tag;let i=W(this,ba).get(n);return i||(i={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},W(this,ba).set(n,i)),i};function t0e(t,e){try{const r=CR(t,e);if(r)return _8(r)}catch{}return null}function CR(t,e){if(t==="0x")return null;try{const r=jr(zn(t,e,e+32)),n=jr(zn(t,r,r+32));return zn(t,r+32,r+32+n)}catch{}return null}function iL(t){const e=gs(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function r0e(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const n0e=new Uint8Array([]);function i0e(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(n0e),r+=32;for(let n=0;n<t.length;n++){const i=qt(t[n]);e[n]=iL(r),e.push(iL(i.length)),e.push(r0e(i)),r+=32+Math.ceil(i.length/32)*32}return Bn(e)}const aL="0x0000000000000000000000000000000000000000000000000000000000000000";function a0e(t){const e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};it(l0(t)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=zn(t,0,32);it(zn(r,0,12)===zn(aL,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=zn(r,12);try{const n=[],i=jr(zn(t,32,64)),a=jr(zn(t,i,i+32)),s=zn(t,i+32);for(let o=0;o<a;o++){const c=t0e(s,o*32);if(c==null)throw new Error("abort");n.push(c)}e.urls=n}catch{it(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=CR(t,64);if(n==null)throw new Error("abort");e.calldata=n}catch{it(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}it(zn(t,100,128)===zn(aL,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=zn(t,96,100);try{const n=CR(t,128);if(n==null)throw new Error("abort");e.extraData=n}catch{it(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return e.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(n=>e[n]),e}function yp(t,e){if(t.provider)return t.provider;it(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function sL(t,e){let r=IE(e);if(r.to!=null&&(r.to=sa(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),sa(n,t)]).then(([i,a])=>(Ne(i.toLowerCase()===a.toLowerCase(),"transaction from mismatch","tx.from",a),i))}else r.from=t.getAddress();return await _a(r)}class V8{constructor(e){Be(this,"provider");Qt(this,{provider:e||null})}async getNonce(e){return yp(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await sL(this,e)}async populateTransaction(e){const r=yp(this,"populateTransaction"),n=await sL(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const s=rr(n.chainId);Ne(s===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const a=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||a)?Ne(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&a&&Ne(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const s=await r.getFeeData();it(s.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=s.gasPrice)}else{const s=await r.getFeeData();if(n.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const o=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=o,n.maxPriorityFeePerGas=o}else n.maxFeePerGas==null&&(n.maxFeePerGas=s.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(it(!a,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=s.gasPrice),n.type=0):it(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else n.type===2&&(n.maxFeePerGas==null&&(n.maxFeePerGas=s.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return await _a(n)}async estimateGas(e){return yp(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return yp(this,"call").call(await this.populateCall(e))}async resolveName(e){return await yp(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=yp(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=nb.from(n);return await r.broadcastTransaction(await this.signTransaction(i))}}var ig,R_;const ND=class ND extends V8{constructor(r,n){super(n);Qe(this,ig);Be(this,"address");Qt(this,{address:r})}async getAddress(){return this.address}connect(r){return new ND(this.address,r)}async signTransaction(r){ct(this,ig,R_).call(this,"transactions","signTransaction")}async signMessage(r){ct(this,ig,R_).call(this,"messages","signMessage")}async signTypedData(r,n,i){ct(this,ig,R_).call(this,"typed-data","signTypedData")}};ig=new WeakSet,R_=function(r,n){it(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let RR=ND;function s0e(t){return JSON.parse(JSON.stringify(t))}var cs,Dc,ih,tf,ah,ag,Ub,NR,Fb,DR;class _Q{constructor(e){Qe(this,Ub);Qe(this,Fb);Qe(this,cs,void 0);Qe(this,Dc,void 0);Qe(this,ih,void 0);Qe(this,tf,void 0);Qe(this,ah,void 0);Qe(this,ag,void 0);Te(this,cs,e),Te(this,Dc,null),Te(this,ih,ct(this,Ub,NR).bind(this)),Te(this,tf,!1),Te(this,ah,null),Te(this,ag,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){W(this,tf)||(Te(this,tf,!0),ct(this,Ub,NR).call(this,-2))}stop(){W(this,tf)&&(Te(this,tf,!1),Te(this,ag,!0),ct(this,Fb,DR).call(this),W(this,cs).off("block",W(this,ih)))}pause(e){e&&ct(this,Fb,DR).call(this),W(this,cs).off("block",W(this,ih))}resume(){this.start()}}cs=new WeakMap,Dc=new WeakMap,ih=new WeakMap,tf=new WeakMap,ah=new WeakMap,ag=new WeakMap,Ub=new WeakSet,NR=async function(e){try{W(this,Dc)==null&&Te(this,Dc,this._subscribe(W(this,cs)));let r=null;try{r=await W(this,Dc)}catch(a){if(!wo(a,"UNSUPPORTED_OPERATION")||a.operation!=="eth_newFilter")throw a}if(r==null){Te(this,Dc,null),W(this,cs)._recoverSubscriber(this,this._recover(W(this,cs)));return}const n=await W(this,cs).getNetwork();if(W(this,ah)||Te(this,ah,n),W(this,ah).chainId!==n.chainId)throw new Error("chaid changed");if(W(this,ag))return;const i=await W(this,cs).send("eth_getFilterChanges",[r]);await this._emitResults(W(this,cs),i)}catch(r){console.log("@TODO",r)}W(this,cs).once("block",W(this,ih))},Fb=new WeakSet,DR=function(){const e=W(this,Dc);e&&(Te(this,Dc,null),e.then(r=>{W(this,cs).send("eth_uninstallFilter",[r])}))};var sh;class o0e extends _Q{constructor(r,n){super(r);Qe(this,sh,void 0);Te(this,sh,s0e(n))}_recover(r){return new z8(r,W(this,sh))}async _subscribe(r){return await r.send("eth_newFilter",[W(this,sh)])}async _emitResults(r,n){for(const i of n)r.emit(W(this,sh),r._wrapLog(i,r._network))}}sh=new WeakMap;class c0e extends _Q{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const u0e="bigint,boolean,function,number,string,symbol".split(/,/g);function N_(t){if(t==null||u0e.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(N_);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function l0e(t){return new Promise(e=>{setTimeout(e,t)})}function vp(t){return t&&t.toLowerCase()}function oL(t){return t&&typeof t.pollingInterval=="number"}const f0e={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class KS extends V8{constructor(r,n){super(r);Be(this,"address");n=sn(n),Qt(this,{address:n})}connect(r){it(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(r){return await this.populateCall(r)}async sendUncheckedTransaction(r){const n=N_(r),i=[];if(n.from){const s=n.from;i.push((async()=>{const o=await sa(s,this.provider);Ne(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=o})())}else n.from=this.address;if(n.gasLimit==null&&i.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const s=n.to;i.push((async()=>{n.to=await sa(s,this.provider)})())}i.length&&await Promise.all(i);const a=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[a])}async sendTransaction(r){const n=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(r);return await new Promise((a,s)=>{const o=[1e3,100],c=async()=>{const u=await this.provider.getTransaction(i);if(u!=null){a(u.replaceableTransaction(n));return}this.provider._setTimeout(()=>{c()},o.pop()||4e3)};c()})}async signTransaction(r){const n=N_(r);if(n.from){const a=await sa(n.from,this.provider);Ne(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=a}else n.from=this.address;const i=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[i])}async signMessage(r){const n=typeof r=="string"?Wa(r):r;return await this.provider.send("personal_sign",[_t(n),this.address.toLowerCase()])}async signTypedData(r,n,i){const a=N_(i),s=await _g.resolveNames(r,n,a,async o=>{const c=await sa(o);return Ne(c!=null,"TypedData does not support null address","value",o),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(_g.getPayload(s.domain,n,s.value))])}async unlock(r){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),r,null])}async _legacySignMessage(r){const n=typeof r=="string"?Wa(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),_t(n)])}}var oh,sg,Lu,Mc,tc,ju,Bb,MR;class d0e extends e0e{constructor(r,n){super(r,n);Qe(this,Bb);Qe(this,oh,void 0);Qe(this,sg,void 0);Qe(this,Lu,void 0);Qe(this,Mc,void 0);Qe(this,tc,void 0);Qe(this,ju,void 0);Te(this,sg,1),Te(this,oh,Object.assign({},f0e,n||{})),Te(this,Lu,[]),Te(this,Mc,null),Te(this,ju,null);{let a=null;const s=new Promise(o=>{a=o});Te(this,tc,{promise:s,resolve:a})}const i=this._getOption("staticNetwork");i&&(Ne(r==null||i.matches(r),"staticNetwork MUST match network object","options",n),Te(this,ju,i))}_getOption(r){return W(this,oh)[r]}get _network(){return it(W(this,ju),"network is not available yet","NETWORK_ERROR"),W(this,ju)}async _perform(r){if(r.method==="call"||r.method==="estimateGas"){let i=r.transaction;if(i&&i.type!=null&&rr(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const a=await this.getFeeData();a.maxFeePerGas==null&&a.maxPriorityFeePerGas==null&&(r=Object.assign({},r,{transaction:Object.assign({},i,{type:void 0})}))}}const n=this.getRpcRequest(r);return n!=null?await this.send(n.method,n.args):super._perform(r)}async _detectNetwork(){const r=this._getOption("staticNetwork");if(r)return r;if(this.ready)return Vu.from(rr(await this.send("eth_chainId",[])));const n={id:Em(this,sg)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let i;try{i=(await this._send(n))[0]}catch(a){throw this.emit("debug",{action:"receiveRpcError",error:a}),a}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return Vu.from(rr(i.result));throw this.getRpcError(n,i)}_start(){W(this,tc)==null||W(this,tc).resolve==null||(W(this,tc).resolve(),Te(this,tc,null),(async()=>{for(;W(this,ju)==null&&!this.destroyed;)try{Te(this,ju,await this._detectNetwork())}catch(r){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",Ni("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:r}})),await l0e(1e3)}ct(this,Bb,MR).call(this)})())}async _waitUntilReady(){if(W(this,tc)!=null)return await W(this,tc).promise}_getSubscriber(r){return r.type==="pending"?new c0e(this):r.type==="event"?this._getOption("polling")?new z8(this,r.filter):new o0e(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new wQ("orphan"):super._getSubscriber(r)}get ready(){return W(this,tc)==null}getRpcTransaction(r){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(r[i]==null)return;let a=i;i==="gasLimit"&&(a="gas"),n[a]=Gp(rr(r[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{r[i]!=null&&(n[i]=_t(r[i]))}),r.accessList&&(n.accessList=Mh(r.accessList)),n}getRpcRequest(r){switch(r.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getBalance":return{method:"eth_getBalance",args:[vp(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[vp(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[vp(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[vp(r.address),"0x"+r.position.toString(16),r.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[r.signedTransaction]};case"getBlock":if("blockTag"in r)return{method:"eth_getBlockByNumber",args:[r.blockTag,!!r.includeTransactions]};if("blockHash"in r)return{method:"eth_getBlockByHash",args:[r.blockHash,!!r.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[r.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[r.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(r.transaction),r.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(r.transaction)]};case"getLogs":return r.filter&&r.filter.address!=null&&(Array.isArray(r.filter.address)?r.filter.address=r.filter.address.map(vp):r.filter.address=vp(r.filter.address)),{method:"eth_getLogs",args:[r.filter]}}return null}getRpcError(r,n){const{method:i}=r,{error:a}=n;if(i==="eth_estimateGas"&&a.message){const c=a.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return Ni("insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.params[0],info:{payload:r,error:a}})}if(i==="eth_call"||i==="eth_estimateGas"){const c=$R(a),u=ab.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",r.params[0],c?c.data:null);return u.info={error:a,payload:r},u}const s=JSON.stringify(p0e(a));if(typeof a.message=="string"&&a.message.match(/user denied|ethers-user-denied/i))return Ni("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:r,error:a}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const c=r.params[0];if(s.match(/insufficient funds|base fee exceeds gas limit/i))return Ni("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:a}});if(s.match(/nonce/i)&&s.match(/too low/i))return Ni("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:a}});if(s.match(/replacement transaction/i)&&s.match(/underpriced/i))return Ni("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:a}});if(s.match(/only replay-protected/i))return Ni("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:c,info:{error:a}}})}let o=!!s.match(/the method .* does not exist/i);return o||a&&a.details&&a.details.startsWith("Unauthorized method:")&&(o=!0),o?Ni("unsupported operation","UNSUPPORTED_OPERATION",{operation:r.method,info:{error:a,payload:r}}):Ni("could not coalesce error","UNKNOWN_ERROR",{error:a,payload:r})}send(r,n){if(this.destroyed)return Promise.reject(Ni("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r}));const i=Em(this,sg)._++,a=new Promise((s,o)=>{W(this,Lu).push({resolve:s,reject:o,payload:{method:r,params:n,id:i,jsonrpc:"2.0"}})});return ct(this,Bb,MR).call(this),a}async getSigner(r){r==null&&(r=0);const n=this.send("eth_accounts",[]);if(typeof r=="number"){const a=await n;if(r>=a.length)throw new Error("no such account");return new KS(this,a[r])}const{accounts:i}=await _a({network:this.getNetwork(),accounts:n});r=sn(r);for(const a of i)if(sn(a)===r)return new KS(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new KS(this,n))}destroy(){W(this,Mc)&&(clearTimeout(W(this,Mc)),Te(this,Mc,null));for(const{payload:r,reject:n}of W(this,Lu))n(Ni("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));Te(this,Lu,[]),super.destroy()}}oh=new WeakMap,sg=new WeakMap,Lu=new WeakMap,Mc=new WeakMap,tc=new WeakMap,ju=new WeakMap,Bb=new WeakSet,MR=function(){if(W(this,Mc))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");Te(this,Mc,setTimeout(()=>{Te(this,Mc,null);const n=W(this,Lu);for(Te(this,Lu,[]);n.length;){const i=[n.shift()];for(;n.length&&i.length!==W(this,oh).batchMaxCount;)if(i.push(n.shift()),JSON.stringify(i.map(s=>s.payload)).length>W(this,oh).batchMaxSize){n.unshift(i.pop());break}(async()=>{const a=i.length===1?i[0].payload:i.map(s=>s.payload);this.emit("debug",{action:"sendRpcPayload",payload:a});try{const s=await this._send(a);this.emit("debug",{action:"receiveRpcResult",result:s});for(const{resolve:o,reject:c,payload:u}of i){if(this.destroyed){c(Ni("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:u.method}));continue}const f=s.filter(h=>h.id===u.id)[0];if(f==null){const h=Ni("missing response for request","BAD_DATA",{value:s,info:{payload:u}});this.emit("error",h),c(h);continue}if("error"in f){c(this.getRpcError(u,f));continue}o(f.result)}}catch(s){this.emit("debug",{action:"receiveRpcError",error:s});for(const{reject:o}of i)o(s)}})()}},r))};var rf;class h0e extends d0e{constructor(r,n){super(r,n);Qe(this,rf,void 0);Te(this,rf,4e3)}_getSubscriber(r){const n=super._getSubscriber(r);return oL(n)&&(n.pollingInterval=W(this,rf)),n}get pollingInterval(){return W(this,rf)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");Te(this,rf,r),this._forEachSubscriber(n=>{oL(n)&&(n.pollingInterval=W(this,rf))})}}rf=new WeakMap;function $R(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&ai(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=$R(t[e]);if(r)return r}return null}if(typeof t=="string")try{return $R(JSON.parse(t))}catch{}return null}function kR(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)kR(t[r],e);if(typeof t=="string")try{return kR(JSON.parse(t),e)}catch{}}}function p0e(t){const e=[];return kR(t,e),e}var og;class LR extends h0e{constructor(r,n){super(n,{batchMaxCount:1});Qe(this,og,void 0);Te(this,og,async(i,a)=>{const s={method:i,params:a};this.emit("debug",{action:"sendEip1193Request",payload:s});try{const o=await r.request(s);return this.emit("debug",{action:"receiveEip1193Result",result:o}),o}catch(o){const c=new Error(o.message);throw c.code=o.code,c.data=o.data,c.payload=s,this.emit("debug",{action:"receiveEip1193Error",error:c}),c}})}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){Ne(!Array.isArray(r),"EIP-1193 does not support batch request","payload",r);try{const n=await W(this,og).call(this,r.method,r.params||[]);return[{id:r.id,result:n}]}catch(n){return[{id:r.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(r,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(r,n)}async hasSigner(r){r==null&&(r=0);const n=await this.send("eth_accounts",[]);return typeof r=="number"?n.length>r:(r=r.toLowerCase(),n.filter(i=>i.toLowerCase()===r).length!==0)}async getSigner(r){if(r==null&&(r=0),!await this.hasSigner(r))try{await W(this,og).call(this,"eth_requestAccounts",[])}catch(n){const i=n.payload;throw this.getRpcError(i,{id:i.id,error:n})}return await super.getSigner(r)}}og=new WeakMap;var cg;const DD=class DD extends V8{constructor(r,n){super(n);Be(this,"address");Qe(this,cg,void 0);Ne(r&&typeof r.sign=="function","invalid private key","privateKey","[ REDACTED ]"),Te(this,cg,r);const i=t1(this.signingKey.publicKey);Qt(this,{address:i})}get signingKey(){return W(this,cg)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(r){return new DD(W(this,cg),r)}async signTransaction(r){const{to:n,from:i}=await _a({to:r.to?sa(r.to,this.provider):void 0,from:r.from?sa(r.from,this.provider):void 0});n!=null&&(r.to=n),i!=null&&(r.from=i),r.from!=null&&(Ne(sn(r.from)===this.address,"transaction from address mismatch","tx.from",r.from),delete r.from);const a=nb.from(r);return a.signature=this.signingKey.sign(a.unsignedHash),a.serialized}async signMessage(r){return this.signMessageSync(r)}signMessageSync(r){return this.signingKey.sign(Qhe(r)).serialized}async signTypedData(r,n,i){const a=await _g.resolveNames(r,n,i,async s=>{it(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:s}});const o=await this.provider.resolveName(s);return it(o!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:s}),o});return this.signingKey.sign(_g.hash(a.domain,n,a.value)).serialized}};cg=new WeakMap;let TE=DD;const CE=" !#$%&'()*+,-./<=>?@[]^_`{|}~",g0e=/^[a-z]*$/i;function cL(t,e){let r=97;return t.reduce((n,i)=>(i===e?r++:i.match(g0e)?n.push(String.fromCharCode(r)+i):(r=97,n.push(i)),n),[])}function m0e(t,e){for(let i=CE.length-1;i>=0;i--)t=t.split(CE[i]).join(e.substring(2*i,2*i+2));const r=[],n=t.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(i,a,s,o)=>{if(s)for(let c=parseInt(s);c>=0;c--)r.push(";");else r.push(a.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return cL(cL(r,";"),":")}function y0e(t){return Ne(t[0]==="0","unsupported auwl data","data",t),m0e(t.substring(1+2*CE.length),t.substring(1,1+2*CE.length))}class v0e{constructor(e){Be(this,"locale");Qt(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var ug,qb,ch,Hb,jR;class b0e extends v0e{constructor(r,n,i){super(r);Qe(this,Hb);Qe(this,ug,void 0);Qe(this,qb,void 0);Qe(this,ch,void 0);Te(this,ug,n),Te(this,qb,i),Te(this,ch,null)}get _data(){return W(this,ug)}_decodeWords(){return y0e(W(this,ug))}getWord(r){const n=ct(this,Hb,jR).call(this);return Ne(r>=0&&r<n.length,`invalid word index: ${r}`,"index",r),n[r]}getWordIndex(r){return ct(this,Hb,jR).call(this).indexOf(r)}}ug=new WeakMap,qb=new WeakMap,ch=new WeakMap,Hb=new WeakSet,jR=function(){if(W(this,ch)==null){const r=this._decodeWords();if(el(r.join(`
70
+ `)+`
71
+ `)!==W(this,qb))throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);Te(this,ch,r)}return W(this,ch)};const w0e="0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO",_0e="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60";let WS=null;class xh extends b0e{constructor(){super("en",w0e,_0e)}static wordlist(){return WS==null&&(WS=new xh),WS}}function EQ(t){return(1<<t)-1<<8-t&255}function E0e(t){return(1<<t)-1&255}function QS(t,e){iK("NFKD"),e==null&&(e=xh.wordlist());const r=e.split(t);Ne(r.length%3===0&&r.length>=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*r.length/8));let i=0;for(let u=0;u<r.length;u++){let f=e.getWordIndex(r[u].normalize("NFKD"));Ne(f>=0,`invalid mnemonic word at index ${u}`,"mnemonic","[ REDACTED ]");for(let h=0;h<11;h++)f&1<<10-h&&(n[i>>3]|=1<<7-i%8),i++}const a=32*r.length/3,s=r.length/3,o=EQ(s),c=qt(uc(n.slice(0,a/8)))[0]&o;return Ne(c===(n[n.length-1]&o),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),_t(n.slice(0,a/8))}function YS(t,e){Ne(t.length%4===0&&t.length>=16&&t.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=xh.wordlist());const r=[0];let n=11;for(let s=0;s<t.length;s++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=t[s],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[s]>>8-n,r.push(t[s]&E0e(8-n)),n+=3);const i=t.length/4,a=parseInt(uc(t).substring(2,4),16)&EQ(i);return r[r.length-1]<<=i,r[r.length-1]|=a>>8-i,e.join(r.map(s=>e.getWord(s)))}const JS={};class xg{constructor(e,r,n,i,a){Be(this,"phrase");Be(this,"password");Be(this,"wordlist");Be(this,"entropy");i==null&&(i=""),a==null&&(a=xh.wordlist()),kf(e,JS,"Mnemonic"),Qt(this,{phrase:n,password:i,wordlist:a,entropy:r})}computeSeed(){const e=Wa("mnemonic"+this.password,"NFKD");return Lf(Wa(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,r,n){const i=QS(e,n);return e=YS(qt(i),n),new xg(JS,i,e,r,n)}static fromEntropy(e,r,n){const i=qt(e,"entropy"),a=YS(i,n);return new xg(JS,_t(i),a,r,n)}static entropyToPhrase(e,r){const n=qt(e,"entropy");return YS(n,r)}static phraseToEntropy(e,r){return QS(e,r)}static isValidMnemonic(e,r){try{return QS(e,r),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */var Wi=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},XS=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},D_,no,Ic;const x0e={16:10,24:12,32:14},A0e=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Zs=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],kw=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],S0e=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],I0e=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],O0e=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],P0e=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],T0e=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],C0e=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],R0e=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],N0e=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],D0e=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],M0e=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],$0e=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],k0e=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function ZS(t){const e=[];for(let r=0;r<t.length;r+=4)e.push(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]);return e}class G8{get key(){return Wi(this,D_,"f").slice()}constructor(e){if(D_.set(this,void 0),no.set(this,void 0),Ic.set(this,void 0),!(this instanceof G8))throw Error("AES must be instanitated with `new`");XS(this,D_,new Uint8Array(e),"f");const r=x0e[this.key.length];if(r==null)throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)");XS(this,Ic,[],"f"),XS(this,no,[],"f");for(let f=0;f<=r;f++)Wi(this,Ic,"f").push([0,0,0,0]),Wi(this,no,"f").push([0,0,0,0]);const n=(r+1)*4,i=this.key.length/4,a=ZS(this.key);let s;for(let f=0;f<i;f++)s=f>>2,Wi(this,Ic,"f")[s][f%4]=a[f],Wi(this,no,"f")[r-s][f%4]=a[f];let o=0,c=i,u;for(;c<n;){if(u=a[i-1],a[0]^=Zs[u>>16&255]<<24^Zs[u>>8&255]<<16^Zs[u&255]<<8^Zs[u>>24&255]^A0e[o]<<24,o+=1,i!=8)for(let y=1;y<i;y++)a[y]^=a[y-1];else{for(let y=1;y<i/2;y++)a[y]^=a[y-1];u=a[i/2-1],a[i/2]^=Zs[u&255]^Zs[u>>8&255]<<8^Zs[u>>16&255]<<16^Zs[u>>24&255]<<24;for(let y=i/2+1;y<i;y++)a[y]^=a[y-1]}let f=0,h,m;for(;f<i&&c<n;)h=c>>2,m=c%4,Wi(this,Ic,"f")[h][m]=a[f],Wi(this,no,"f")[r-h][m]=a[f++],c++}for(let f=1;f<r;f++)for(let h=0;h<4;h++)u=Wi(this,no,"f")[f][h],Wi(this,no,"f")[f][h]=D0e[u>>24&255]^M0e[u>>16&255]^$0e[u>>8&255]^k0e[u&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const r=Wi(this,Ic,"f").length-1,n=[0,0,0,0];let i=ZS(e);for(let o=0;o<4;o++)i[o]^=Wi(this,Ic,"f")[0][o];for(let o=1;o<r;o++){for(let c=0;c<4;c++)n[c]=S0e[i[c]>>24&255]^I0e[i[(c+1)%4]>>16&255]^O0e[i[(c+2)%4]>>8&255]^P0e[i[(c+3)%4]&255]^Wi(this,Ic,"f")[o][c];i=n.slice()}const a=new Uint8Array(16);let s=0;for(let o=0;o<4;o++)s=Wi(this,Ic,"f")[r][o],a[4*o]=(Zs[i[o]>>24&255]^s>>24)&255,a[4*o+1]=(Zs[i[(o+1)%4]>>16&255]^s>>16)&255,a[4*o+2]=(Zs[i[(o+2)%4]>>8&255]^s>>8)&255,a[4*o+3]=(Zs[i[(o+3)%4]&255]^s)&255;return a}decrypt(e){if(e.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const r=Wi(this,no,"f").length-1,n=[0,0,0,0];let i=ZS(e);for(let o=0;o<4;o++)i[o]^=Wi(this,no,"f")[0][o];for(let o=1;o<r;o++){for(let c=0;c<4;c++)n[c]=T0e[i[c]>>24&255]^C0e[i[(c+3)%4]>>16&255]^R0e[i[(c+2)%4]>>8&255]^N0e[i[(c+1)%4]&255]^Wi(this,no,"f")[o][c];i=n.slice()}const a=new Uint8Array(16);let s=0;for(let o=0;o<4;o++)s=Wi(this,no,"f")[r][o],a[4*o]=(kw[i[o]>>24&255]^s>>24)&255,a[4*o+1]=(kw[i[(o+3)%4]>>16&255]^s>>16)&255,a[4*o+2]=(kw[i[(o+2)%4]>>8&255]^s>>8)&255,a[4*o+3]=(kw[i[(o+1)%4]&255]^s)&255;return a}}D_=new WeakMap,no=new WeakMap,Ic=new WeakMap;class xQ{constructor(e,r,n){if(n&&!(this instanceof n))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new G8(r)},name:{enumerable:!0,value:e}})}}var Lw=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},bp=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Jy,bu;class K8 extends xQ{constructor(e,r){if(super("ECC",e,K8),Jy.set(this,void 0),bu.set(this,void 0),r){if(r.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");Lw(this,Jy,new Uint8Array(r),"f")}else Lw(this,Jy,new Uint8Array(16),"f");Lw(this,bu,this.iv,"f")}get iv(){return new Uint8Array(bp(this,Jy,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const r=new Uint8Array(e.length);for(let n=0;n<e.length;n+=16){for(let i=0;i<16;i++)bp(this,bu,"f")[i]^=e[n+i];Lw(this,bu,this.aes.encrypt(bp(this,bu,"f")),"f"),r.set(bp(this,bu,"f"),n)}return r}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");const r=new Uint8Array(e.length);for(let n=0;n<e.length;n+=16){const i=this.aes.decrypt(e.subarray(n,n+16));for(let a=0;a<16;a++)r[n+a]=i[a]^bp(this,bu,"f")[a],bp(this,bu,"f")[a]=e[n+a]}return r}}Jy=new WeakMap,bu=new WeakMap;var wp=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},eo=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Xy,Sd,io;class Ag extends xQ{constructor(e,r){super("CTR",e,Ag),Xy.set(this,void 0),Sd.set(this,void 0),io.set(this,void 0),wp(this,io,new Uint8Array(16),"f"),eo(this,io,"f").fill(0),wp(this,Xy,eo(this,io,"f"),"f"),wp(this,Sd,16,"f"),r==null&&(r=1),typeof r=="number"?this.setCounterValue(r):this.setCounterBytes(r)}get counter(){return new Uint8Array(eo(this,io,"f"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let r=15;r>=0;--r)eo(this,io,"f")[r]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");eo(this,io,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(eo(this,io,"f")[e]===255)eo(this,io,"f")[e]=0;else{eo(this,io,"f")[e]++;break}}encrypt(e){var r,n;const i=new Uint8Array(e);for(let a=0;a<i.length;a++)eo(this,Sd,"f")===16&&(wp(this,Xy,this.aes.encrypt(eo(this,io,"f")),"f"),wp(this,Sd,0,"f"),this.increment()),i[a]^=eo(this,Xy,"f")[wp(this,Sd,(n=eo(this,Sd,"f"),r=n++,n),"f"),r];return i}decrypt(e){return this.encrypt(e)}}Xy=new WeakMap,Sd=new WeakMap,io=new WeakMap;function L0e(t){if(t.length<16)throw new TypeError("PKCS#7 invalid length");const e=t[t.length-1];if(e>16)throw new TypeError("PKCS#7 padding byte out of range");const r=t.length-e;for(let n=0;n<e;n++)if(t[r+n]!==e)throw new TypeError("PKCS#7 invalid padding byte");return new Uint8Array(t.subarray(0,r))}function AQ(t){return typeof t=="string"&&!t.startsWith("0x")&&(t="0x"+t),Pa(t)}function jm(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function a1(t){return typeof t=="string"?Wa(t,"NFKC"):Pa(t)}function yi(t,e){const r=e.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);Ne(r!=null,"invalid path","path",e);const n=r[1],i=r[3],a=r[4]==="!";let s=t;for(const o of n.toLowerCase().split(".")){if(Array.isArray(s)){if(!o.match(/^[0-9]+$/))break;s=s[parseInt(o)]}else if(typeof s=="object"){let c=null;for(const u in s)if(u.toLowerCase()===o){c=s[u];break}s=c}else s=null;if(s==null)break}if(Ne(!a||s!=null,"missing required value","path",n),i&&s!=null){if(i==="int"){if(typeof s=="string"&&s.match(/^-?[0-9]+$/))return parseInt(s);if(Number.isSafeInteger(s))return s}if(i==="number"&&typeof s=="string"&&s.match(/^-?[0-9.]*$/))return parseFloat(s);if(i==="data"&&typeof s=="string")return AQ(s);if(i==="array"&&Array.isArray(s)||i===typeof s)return s;Ne(!1,`wrong type found for ${i} `,"path",n)}return s}const SQ="m/44'/60'/0'/0/0";function uL(t){try{const e=JSON.parse(t);if((e.version!=null?parseInt(e.version):0)===3)return!0}catch{}return!1}function j0e(t,e,r){if(yi(t,"crypto.cipher:string")==="aes-128-ctr"){const i=yi(t,"crypto.cipherparams.iv:data!"),a=new Ag(e,i);return _t(a.decrypt(r))}it(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}function RE(t,e){const r=qt(e),n=yi(t,"crypto.ciphertext:data!"),i=_t(Fn(Bn([r.slice(16,32),n]))).substring(2);Ne(i===yi(t,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const a=j0e(t,r.slice(0,16),n),s=t1(a);if(t.address){let u=t.address.toLowerCase();u.startsWith("0x")||(u="0x"+u),Ne(sn(u)===s,"keystore address/privateKey mismatch","address",t.address)}const o={address:s,privateKey:a};if(yi(t,"x-ethers.version:string")==="0.1"){const u=r.slice(32,64),f=yi(t,"x-ethers.mnemonicCiphertext:data!"),h=yi(t,"x-ethers.mnemonicCounter:data!"),m=new Ag(u,h);o.mnemonic={path:yi(t,"x-ethers.path:string")||SQ,locale:yi(t,"x-ethers.locale:string")||"en",entropy:_t(qt(m.decrypt(f)))}}return o}function IQ(t){const e=yi(t,"crypto.kdf:string");if(e&&typeof e=="string"){if(e.toLowerCase()==="scrypt"){const r=yi(t,"crypto.kdfparams.salt:data!"),n=yi(t,"crypto.kdfparams.n:int!"),i=yi(t,"crypto.kdfparams.r:int!"),a=yi(t,"crypto.kdfparams.p:int!");Ne(n>0&&(n&n-1)===0,"invalid kdf.N","kdf.N",n),Ne(i>0&&a>0,"invalid kdf","kdf",e);const s=yi(t,"crypto.kdfparams.dklen:int!");return Ne(s===32,"invalid kdf.dklen","kdf.dflen",s),{name:"scrypt",salt:r,N:n,r:i,p:a,dkLen:64}}else if(e.toLowerCase()==="pbkdf2"){const r=yi(t,"crypto.kdfparams.salt:data!"),n=yi(t,"crypto.kdfparams.prf:string!"),i=n.split("-").pop();Ne(i==="sha256"||i==="sha512","invalid kdf.pdf","kdf.pdf",n);const a=yi(t,"crypto.kdfparams.c:int!"),s=yi(t,"crypto.kdfparams.dklen:int!");return Ne(s===32,"invalid kdf.dklen","kdf.dklen",s),{name:"pbkdf2",salt:r,count:a,dkLen:s,algorithm:i}}}Ne(!1,"unsupported key-derivation function","kdf",e)}function U0e(t,e){const r=JSON.parse(t),n=a1(e),i=IQ(r);if(i.name==="pbkdf2"){const{salt:h,count:m,dkLen:y,algorithm:w}=i,v=Lf(n,h,m,y,w);return RE(r,v)}it(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:a,N:s,r:o,p:c,dkLen:u}=i,f=Qg(n,a,s,o,c,u);return RE(r,f)}function lL(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}async function F0e(t,e,r){const n=JSON.parse(t),i=a1(e),a=IQ(n);if(a.name==="pbkdf2"){r&&(r(0),await lL(0));const{salt:m,count:y,dkLen:w,algorithm:v}=a,g=Lf(i,m,y,w,v);return r&&(r(1),await lL(0)),RE(n,g)}it(a.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:a});const{salt:s,N:o,r:c,p:u,dkLen:f}=a,h=await Wg(i,s,o,c,u,f,r);return RE(n,h)}function OQ(t){const e=t.salt!=null?qt(t.salt,"options.salt"):Ku(32);let r=1<<17,n=8,i=1;return t.scrypt&&(t.scrypt.N&&(r=t.scrypt.N),t.scrypt.r&&(n=t.scrypt.r),t.scrypt.p&&(i=t.scrypt.p)),Ne(typeof r=="number"&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),Ne(typeof n=="number"&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),Ne(typeof i=="number"&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:e,N:r,r:n,p:i}}function PQ(t,e,r,n){const i=qt(r.privateKey,"privateKey"),a=n.iv!=null?qt(n.iv,"options.iv"):Ku(16);Ne(a.length===16,"invalid options.iv length","options.iv",n.iv);const s=n.uuid!=null?qt(n.uuid,"options.uuid"):Ku(16);Ne(s.length===16,"invalid options.uuid length","options.uuid",n.iv);const o=t.slice(0,16),c=t.slice(16,32),u=new Ag(o,a),f=qt(u.encrypt(i)),h=Fn(Bn([c,f])),m={address:r.address.substring(2).toLowerCase(),id:Xle(s),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:_t(a).substring(2)},ciphertext:_t(f).substring(2),kdf:"scrypt",kdfparams:{salt:_t(e.salt).substring(2),n:e.N,dklen:32,p:e.p,r:e.r},mac:h.substring(2)}};if(r.mnemonic){const y=n.client!=null?n.client:`ethers/${rK}`,w=r.mnemonic.path||SQ,v=r.mnemonic.locale||"en",g=t.slice(32,64),_=qt(r.mnemonic.entropy,"account.mnemonic.entropy"),b=Ku(16),S=new Ag(g,b),A=qt(S.encrypt(_)),I=new Date,p="UTC--"+(I.getUTCFullYear()+"-"+jm(I.getUTCMonth()+1,2)+"-"+jm(I.getUTCDate(),2)+"T"+jm(I.getUTCHours(),2)+"-"+jm(I.getUTCMinutes(),2)+"-"+jm(I.getUTCSeconds(),2)+".0Z")+"--"+m.address;m["x-ethers"]={client:y,gethFilename:p,path:w,locale:v,mnemonicCounter:_t(b).substring(2),mnemonicCiphertext:_t(A).substring(2),version:"0.1"}}return JSON.stringify(m)}function TQ(t,e,r){r==null&&(r={});const n=a1(e),i=OQ(r),a=Qg(n,i.salt,i.N,i.r,i.p,64);return PQ(qt(a),i,t,r)}async function CQ(t,e,r){r==null&&(r={});const n=a1(e),i=OQ(r),a=await Wg(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return PQ(qt(a),i,t,r)}const eI="m/44'/60'/0'/0/0",B0e=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),wf=2147483648,q0e=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),H0e="0123456789abcdef";function NE(t,e){let r="";for(;t;)r=H0e[t%16]+r,t=Math.trunc(t/16);for(;r.length<e*2;)r="0"+r;return"0x"+r}function UR(t){const e=qt(t),r=zn(uc(uc(e)),0,4),n=Bn([e,r]);return uK(n)}const Oc={};function RQ(t,e,r,n){const i=new Uint8Array(37);t&wf?(it(n!=null,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),i.set(qt(n),1)):i.set(qt(r));for(let s=24;s>=0;s-=8)i[33+(s>>3)]=t>>24-s&255;const a=qt(Gg("sha512",e,i));return{IL:a.slice(0,32),IR:a.slice(32)}}function NQ(t,e){const r=e.split("/");Ne(r.length>0&&(r[0]==="m"||t.depth>0),"invalid path","path",e),r[0]==="m"&&r.shift();let n=t;for(let i=0;i<r.length;i++){const a=r[i];if(a.match(/^[0-9]+'$/)){const s=parseInt(a.substring(0,a.length-1));Ne(s<wf,"invalid path index",`path[${i}]`,a),n=n.deriveChild(wf+s)}else if(a.match(/^[0-9]+$/)){const s=parseInt(a);Ne(s<wf,"invalid path index",`path[${i}]`,a),n=n.deriveChild(s)}else Ne(!1,"invalid path component",`path[${i}]`,a)}return n}var zb,FR,uh,Zy;const Go=class Go extends TE{constructor(r,n,i,a,s,o,c,u,f){super(n,f);Qe(this,zb);Be(this,"publicKey");Be(this,"fingerprint");Be(this,"parentFingerprint");Be(this,"mnemonic");Be(this,"chainCode");Be(this,"path");Be(this,"index");Be(this,"depth");kf(r,Oc,"HDNodeWallet"),Qt(this,{publicKey:n.compressedPublicKey});const h=zn(Kg(uc(this.publicKey)),0,4);Qt(this,{parentFingerprint:i,fingerprint:h,chainCode:a,path:s,index:o,depth:c}),Qt(this,{mnemonic:u})}connect(r){return new Go(Oc,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,r)}async encrypt(r,n){return await CQ(ct(this,zb,FR).call(this),r,{progressCallback:n})}encryptSync(r){return TQ(ct(this,zb,FR).call(this),r)}get extendedKey(){return it(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),UR(Bn(["0x0488ADE4",NE(this.depth,1),this.parentFingerprint,NE(this.index,4),this.chainCode,Bn(["0x00",this.privateKey])]))}hasPath(){return this.path!=null}neuter(){return new ob(Oc,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(r){const n=jr(r,"index");Ne(n<=4294967295,"invalid index","index",n);let i=this.path;i&&(i+="/"+(n&~wf),n&wf&&(i+="'"));const{IR:a,IL:s}=RQ(n,this.chainCode,this.publicKey,this.privateKey),o=new Vc(Zu((Zb(s)+BigInt(this.privateKey))%q0e,32));return new Go(Oc,o,this.fingerprint,_t(a),i,n,this.depth+1,this.mnemonic,this.provider)}derivePath(r){return NQ(this,r)}static fromExtendedKey(r){const n=gs(Cle(r));Ne(n.length===82||UR(n.slice(0,78))===r,"invalid extended key","extendedKey","[ REDACTED ]");const i=n[4],a=_t(n.slice(5,9)),s=parseInt(_t(n.slice(9,13)).substring(2),16),o=_t(n.slice(13,45)),c=n.slice(45,78);switch(_t(n.slice(0,4))){case"0x0488b21e":case"0x043587cf":{const u=_t(c);return new ob(Oc,t1(u),u,a,o,null,s,i,null)}case"0x0488ade4":case"0x04358394 ":if(c[0]!==0)break;return new Go(Oc,new Vc(c.slice(1)),a,o,null,s,i,null,null)}Ne(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(r,n,i){var s;r==null&&(r=""),n==null&&(n=eI),i==null&&(i=xh.wordlist());const a=xg.fromEntropy(Ku(16),r,i);return ct(s=Go,uh,Zy).call(s,a.computeSeed(),a).derivePath(n)}static fromMnemonic(r,n){var i;return n||(n=eI),ct(i=Go,uh,Zy).call(i,r.computeSeed(),r).derivePath(n)}static fromPhrase(r,n,i,a){var o;n==null&&(n=""),i==null&&(i=eI),a==null&&(a=xh.wordlist());const s=xg.fromPhrase(r,n,a);return ct(o=Go,uh,Zy).call(o,s.computeSeed(),s).derivePath(i)}static fromSeed(r){var n;return ct(n=Go,uh,Zy).call(n,r,null)}};zb=new WeakSet,FR=function(){const r={address:this.address,privateKey:this.privateKey},n=this.mnemonic;return this.path&&n&&n.wordlist.locale==="en"&&n.password===""&&(r.mnemonic={path:this.path,locale:"en",entropy:n.entropy}),r},uh=new WeakSet,Zy=function(r,n){Ne(sK(r),"invalid seed","seed","[REDACTED]");const i=qt(r,"seed");Ne(i.length>=16&&i.length<=64,"invalid seed","seed","[REDACTED]");const a=qt(Gg("sha512",B0e,i)),s=new Vc(_t(a.slice(0,32)));return new Go(Oc,s,"0x00000000",_t(a.slice(32)),"m",0,0,n,null)},Qe(Go,uh);let Ev=Go;class ob extends RR{constructor(r,n,i,a,s,o,c,u,f){super(n,f);Be(this,"publicKey");Be(this,"fingerprint");Be(this,"parentFingerprint");Be(this,"chainCode");Be(this,"path");Be(this,"index");Be(this,"depth");kf(r,Oc,"HDNodeVoidWallet"),Qt(this,{publicKey:i});const h=zn(Kg(uc(i)),0,4);Qt(this,{publicKey:i,fingerprint:h,parentFingerprint:a,chainCode:s,path:o,index:c,depth:u})}connect(r){return new ob(Oc,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,r)}get extendedKey(){return it(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),UR(Bn(["0x0488B21E",NE(this.depth,1),this.parentFingerprint,NE(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(r){const n=jr(r,"index");Ne(n<=4294967295,"invalid index","index",n);let i=this.path;i&&(i+="/"+(n&~wf),n&wf&&(i+="'"));const{IR:a,IL:s}=RQ(n,this.chainCode,this.publicKey,null),o=Vc.addPoints(s,this.publicKey,!0),c=t1(o);return new ob(Oc,c,o,this.fingerprint,_t(a),i,n,this.depth+1,this.provider)}derivePath(r){return NQ(this,r)}}function fL(t){try{if(JSON.parse(t).encseed)return!0}catch{}return!1}function dL(t,e){const r=JSON.parse(t),n=a1(e),i=sn(yi(r,"ethaddr:string!")),a=AQ(yi(r,"encseed:string!"));Ne(a&&a.length%16===0,"invalid encseed","json",t);const s=qt(Lf(n,n,2e3,32,"sha256")).slice(0,16),o=a.slice(0,16),c=a.slice(16),u=new K8(s,o),f=L0e(qt(u.decrypt(c)));let h="";for(let m=0;m<f.length;m++)h+=String.fromCharCode(f[m]);return{address:i,privateKey:el(h)}}function hL(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}var Vb,qR;const Rd=class Rd extends TE{constructor(e,r){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new Vc(e):e;super(n,r)}connect(e){return new Rd(this.signingKey,e)}async encrypt(e,r){const n={address:this.address,privateKey:this.privateKey};return await CQ(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return TQ(r,e)}static async fromEncryptedJson(e,r,n){var a;let i=null;return uL(e)?i=await F0e(e,r,n):fL(e)&&(n&&(n(0),await hL(0)),i=dL(e,r),n&&(n(1),await hL(0))),ct(a=Rd,Vb,qR).call(a,i)}static fromEncryptedJsonSync(e,r){var i;let n=null;return uL(e)?n=U0e(e,r):fL(e)?n=dL(e,r):Ne(!1,"invalid JSON wallet","json","[ REDACTED ]"),ct(i=Rd,Vb,qR).call(i,n)}static createRandom(e){const r=Ev.createRandom();return e?r.connect(e):r}static fromPhrase(e,r){const n=Ev.fromPhrase(e);return r?n.connect(r):n}};Vb=new WeakSet,qR=function(e){if(Ne(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=xg.fromEntropy(e.mnemonic.entropy),i=Ev.fromMnemonic(n,e.mnemonic.path);if(i.address===e.address&&i.privateKey===e.privateKey)return i;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const r=new Rd(e.privateKey);return Ne(r.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),r},Qe(Rd,Vb);let BR=Rd;var Ah={},Um={},DQ={exports:{}},MQ={exports:{}};(function(t){function e(r){"@babel/helpers - typeof";return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(MQ);var W8=MQ.exports;(function(t){var e=W8.default;function r(i){if(typeof WeakMap!="function")return null;var a=new WeakMap,s=new WeakMap;return(r=function(c){return c?s:a})(i)}function n(i,a){if(!a&&i&&i.__esModule)return i;if(i===null||e(i)!="object"&&typeof i!="function")return{default:i};var s=r(a);if(s&&s.has(i))return s.get(i);var o={__proto__:null},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in i)if(u!=="default"&&Object.prototype.hasOwnProperty.call(i,u)){var f=c?Object.getOwnPropertyDescriptor(i,u):null;f&&(f.get||f.set)?Object.defineProperty(o,u,f):o[u]=i[u]}return o.default=i,s&&s.set(i,o),o}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(DQ);var Ro=DQ.exports,$Q={exports:{}};(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})($Q);var yr=$Q.exports,tI={exports:{}},pL;function Dn(){return pL||(pL=1,function(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(this,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(tI)),tI.exports}var rI={exports:{}},nI={exports:{}},gL;function z0e(){return gL||(gL=1,function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(nI)),nI.exports}var mL;function hc(){return mL||(mL=1,function(t){var e=z0e();function r(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,e(n,i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(rI)),rI.exports}var iI,yL;function kQ(){if(yL)return iI;yL=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return iI=t,iI}var aI,vL;function Ii(){if(vL)return aI;vL=1;var t=Array.isArray;return aI=t,aI}var sI,bL;function LQ(){if(bL)return sI;bL=1;var t=typeof ke=="object"&&ke&&ke.Object===Object&&ke;return sI=t,sI}var oI,wL;function sl(){if(wL)return oI;wL=1;var t=LQ(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return oI=r,oI}var cI,_L;function s1(){if(_L)return cI;_L=1;var t=sl(),e=t.Symbol;return cI=e,cI}var uI,EL;function V0e(){if(EL)return uI;EL=1;var t=s1(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(s){var o=r.call(s,i),c=s[i];try{s[i]=void 0;var u=!0}catch{}var f=n.call(s);return u&&(o?s[i]=c:delete s[i]),f}return uI=a,uI}var lI,xL;function G0e(){if(xL)return lI;xL=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return lI=r,lI}var fI,AL;function ol(){if(AL)return fI;AL=1;var t=s1(),e=V0e(),r=G0e(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(o){return o==null?o===void 0?i:n:a&&a in Object(o)?e(o):r(o)}return fI=s,fI}var dI,SL;function pc(){if(SL)return dI;SL=1;function t(e){return e!=null&&typeof e=="object"}return dI=t,dI}var hI,IL;function Yg(){if(IL)return hI;IL=1;var t=ol(),e=pc(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return hI=n,hI}var pI,OL;function Q8(){if(OL)return pI;OL=1;var t=Ii(),e=Yg(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(t(a))return!1;var o=typeof a;return o=="number"||o=="symbol"||o=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return pI=i,pI}var gI,PL;function cl(){if(PL)return gI;PL=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return gI=t,gI}var mI,TL;function Bx(){if(TL)return mI;TL=1;var t=ol(),e=cl(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(o){if(!e(o))return!1;var c=t(o);return c==n||c==i||c==r||c==a}return mI=s,mI}var yI,CL;function K0e(){if(CL)return yI;CL=1;var t=sl(),e=t["__core-js_shared__"];return yI=e,yI}var vI,RL;function W0e(){if(RL)return vI;RL=1;var t=K0e(),e=function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!e&&e in n}return vI=r,vI}var bI,NL;function jQ(){if(NL)return bI;NL=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return bI=r,bI}var wI,DL;function Q0e(){if(DL)return wI;DL=1;var t=Bx(),e=W0e(),r=cl(),n=jQ(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,c=s.toString,u=o.hasOwnProperty,f=RegExp("^"+c.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!r(m)||e(m))return!1;var y=t(m)?f:a;return y.test(n(m))}return wI=h,wI}var _I,ML;function Y0e(){if(ML)return _I;ML=1;function t(e,r){return e==null?void 0:e[r]}return _I=t,_I}var EI,$L;function $h(){if($L)return EI;$L=1;var t=Q0e(),e=Y0e();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return EI=r,EI}var xI,kL;function qx(){if(kL)return xI;kL=1;var t=$h(),e=t(Object,"create");return xI=e,xI}var AI,LL;function J0e(){if(LL)return AI;LL=1;var t=qx();function e(){this.__data__=t?t(null):{},this.size=0}return AI=e,AI}var SI,jL;function X0e(){if(jL)return SI;jL=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return SI=t,SI}var II,UL;function Z0e(){if(UL)return II;UL=1;var t=qx(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var s=this.__data__;if(t){var o=s[a];return o===e?void 0:o}return n.call(s,a)?s[a]:void 0}return II=i,II}var OI,FL;function ege(){if(FL)return OI;FL=1;var t=qx(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return OI=n,OI}var PI,BL;function tge(){if(BL)return PI;BL=1;var t=qx(),e="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=t&&i===void 0?e:i,this}return PI=r,PI}var TI,qL;function rge(){if(qL)return TI;qL=1;var t=J0e(),e=X0e(),r=Z0e(),n=ege(),i=tge();function a(s){var o=-1,c=s==null?0:s.length;for(this.clear();++o<c;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,TI=a,TI}var CI,HL;function nge(){if(HL)return CI;HL=1;function t(){this.__data__=[],this.size=0}return CI=t,CI}var RI,zL;function Hx(){if(zL)return RI;zL=1;function t(e,r){return e===r||e!==e&&r!==r}return RI=t,RI}var NI,VL;function zx(){if(VL)return NI;VL=1;var t=Hx();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return NI=e,NI}var DI,GL;function ige(){if(GL)return DI;GL=1;var t=zx(),e=Array.prototype,r=e.splice;function n(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var o=a.length-1;return s==o?a.pop():r.call(a,s,1),--this.size,!0}return DI=n,DI}var MI,KL;function age(){if(KL)return MI;KL=1;var t=zx();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return MI=e,MI}var $I,WL;function sge(){if(WL)return $I;WL=1;var t=zx();function e(r){return t(this.__data__,r)>-1}return $I=e,$I}var kI,QL;function oge(){if(QL)return kI;QL=1;var t=zx();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return kI=e,kI}var LI,YL;function Vx(){if(YL)return LI;YL=1;var t=nge(),e=ige(),r=age(),n=sge(),i=oge();function a(s){var o=-1,c=s==null?0:s.length;for(this.clear();++o<c;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,LI=a,LI}var jI,JL;function Y8(){if(JL)return jI;JL=1;var t=$h(),e=sl(),r=t(e,"Map");return jI=r,jI}var UI,XL;function cge(){if(XL)return UI;XL=1;var t=rge(),e=Vx(),r=Y8();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return UI=n,UI}var FI,ZL;function uge(){if(ZL)return FI;ZL=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return FI=t,FI}var BI,e7;function Gx(){if(e7)return BI;e7=1;var t=uge();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return BI=e,BI}var qI,t7;function lge(){if(t7)return qI;t7=1;var t=Gx();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return qI=e,qI}var HI,r7;function fge(){if(r7)return HI;r7=1;var t=Gx();function e(r){return t(this,r).get(r)}return HI=e,HI}var zI,n7;function dge(){if(n7)return zI;n7=1;var t=Gx();function e(r){return t(this,r).has(r)}return zI=e,zI}var VI,i7;function hge(){if(i7)return VI;i7=1;var t=Gx();function e(r,n){var i=t(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return VI=e,VI}var GI,a7;function J8(){if(a7)return GI;a7=1;var t=cge(),e=lge(),r=fge(),n=dge(),i=hge();function a(s){var o=-1,c=s==null?0:s.length;for(this.clear();++o<c;){var u=s[o];this.set(u[0],u[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,GI=a,GI}var KI,s7;function X8(){if(s7)return KI;s7=1;var t=J8(),e="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,o=i?i.apply(this,s):s[0],c=a.cache;if(c.has(o))return c.get(o);var u=n.apply(this,s);return a.cache=c.set(o,u)||c,u};return a.cache=new(r.Cache||t),a}return r.Cache=t,KI=r,KI}var WI,o7;function pge(){if(o7)return WI;o7=1;var t=X8(),e=500;function r(n){var i=t(n,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return WI=r,WI}var QI,c7;function gge(){if(c7)return QI;c7=1;var t=pge(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,o,c,u){a.push(c?u.replace(r,"$1"):o||s)}),a});return QI=n,QI}var YI,u7;function kh(){if(u7)return YI;u7=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}return YI=t,YI}var JI,l7;function Z8(){if(l7)return JI;l7=1;var t=s1(),e=kh(),r=Ii(),n=Yg(),i=1/0,a=t?t.prototype:void 0,s=a?a.toString:void 0;function o(c){if(typeof c=="string")return c;if(r(c))return e(c,o)+"";if(n(c))return s?s.call(c):"";var u=c+"";return u=="0"&&1/c==-i?"-0":u}return JI=o,JI}var XI,f7;function e5(){if(f7)return XI;f7=1;var t=Z8();function e(r){return r==null?"":t(r)}return XI=e,XI}var ZI,d7;function o1(){if(d7)return ZI;d7=1;var t=Ii(),e=Q8(),r=gge(),n=e5();function i(a,s){return t(a)?a:e(a,s)?[a]:r(n(a))}return ZI=i,ZI}var eO,h7;function mge(){if(h7)return eO;h7=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return eO=t,eO}var tO,p7;function Jg(){if(p7)return tO;p7=1;var t=Yg(),e=1/0;function r(n){if(typeof n=="string"||t(n))return n;var i=n+"";return i=="0"&&1/n==-e?"-0":i}return tO=r,tO}var rO,g7;function c1(){if(g7)return rO;g7=1;var t=o1(),e=Jg();function r(n,i){i=t(i,n);for(var a=0,s=i.length;n!=null&&a<s;)n=n[e(i[a++])];return a&&a==s?n:void 0}return rO=r,rO}var nO,m7;function t5(){if(m7)return nO;m7=1;function t(e,r,n){var i=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(a);++i<a;)s[i]=e[i+r];return s}return nO=t,nO}var iO,y7;function yge(){if(y7)return iO;y7=1;var t=c1(),e=t5();function r(n,i){return i.length<2?n:t(n,e(i,0,-1))}return iO=r,iO}var aO,v7;function vge(){if(v7)return aO;v7=1;var t=kQ(),e=o1(),r=mge(),n=yge(),i=Jg();function a(s,o,c){o=e(o,s),s=n(s,o);var u=s==null?s:s[i(r(o))];return u==null?void 0:t(u,s,c)}return aO=a,aO}var sO,b7;function Uf(){if(b7)return sO;b7=1;function t(e){return e}return sO=t,sO}var oO,w7;function UQ(){if(w7)return oO;w7=1;var t=kQ(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var s=arguments,o=-1,c=e(s.length-i,0),u=Array(c);++o<c;)u[o]=s[i+o];o=-1;for(var f=Array(i+1);++o<i;)f[o]=s[o];return f[i]=a(u),t(n,this,f)}}return oO=r,oO}var cO,_7;function FQ(){if(_7)return cO;_7=1;function t(e){return function(){return e}}return cO=t,cO}var uO,E7;function BQ(){if(E7)return uO;E7=1;var t=$h(),e=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}}();return uO=e,uO}var lO,x7;function bge(){if(x7)return lO;x7=1;var t=FQ(),e=BQ(),r=Uf(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return lO=n,lO}var fO,A7;function wge(){if(A7)return fO;A7=1;var t=800,e=16,r=Date.now;function n(i){var a=0,s=0;return function(){var o=r(),c=e-(o-s);if(s=o,c>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return fO=n,fO}var dO,S7;function qQ(){if(S7)return dO;S7=1;var t=bge(),e=wge(),r=e(t);return dO=r,dO}var hO,I7;function u1(){if(I7)return hO;I7=1;var t=Uf(),e=UQ(),r=qQ();function n(i,a){return r(e(i,a,t),i+"")}return hO=n,hO}var pO,O7;function No(){if(O7)return pO;O7=1;var t=vge(),e=u1(),r=e(t);return pO=r,pO}var gO,P7;function ul(){if(P7)return gO;P7=1;function t(e){return e==null}return gO=t,gO}function _ge(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var HQ={exports:{}},On={};/** @license React v16.13.1
72
+ * react-is.production.min.js
73
+ *
74
+ * Copyright (c) Facebook, Inc. and its affiliates.
75
+ *
76
+ * This source code is licensed under the MIT license found in the
77
+ * LICENSE file in the root directory of this source tree.
78
+ */var zi=typeof Symbol=="function"&&Symbol.for,r5=zi?Symbol.for("react.element"):60103,n5=zi?Symbol.for("react.portal"):60106,Kx=zi?Symbol.for("react.fragment"):60107,Wx=zi?Symbol.for("react.strict_mode"):60108,Qx=zi?Symbol.for("react.profiler"):60114,Yx=zi?Symbol.for("react.provider"):60109,Jx=zi?Symbol.for("react.context"):60110,i5=zi?Symbol.for("react.async_mode"):60111,Xx=zi?Symbol.for("react.concurrent_mode"):60111,Zx=zi?Symbol.for("react.forward_ref"):60112,e2=zi?Symbol.for("react.suspense"):60113,Ege=zi?Symbol.for("react.suspense_list"):60120,t2=zi?Symbol.for("react.memo"):60115,r2=zi?Symbol.for("react.lazy"):60116,xge=zi?Symbol.for("react.block"):60121,Age=zi?Symbol.for("react.fundamental"):60117,Sge=zi?Symbol.for("react.responder"):60118,Ige=zi?Symbol.for("react.scope"):60119;function Fs(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case r5:switch(t=t.type,t){case i5:case Xx:case Kx:case Qx:case Wx:case e2:return t;default:switch(t=t&&t.$$typeof,t){case Jx:case Zx:case r2:case t2:case Yx:return t;default:return e}}case n5:return e}}}function zQ(t){return Fs(t)===Xx}On.AsyncMode=i5;On.ConcurrentMode=Xx;On.ContextConsumer=Jx;On.ContextProvider=Yx;On.Element=r5;On.ForwardRef=Zx;On.Fragment=Kx;On.Lazy=r2;On.Memo=t2;On.Portal=n5;On.Profiler=Qx;On.StrictMode=Wx;On.Suspense=e2;On.isAsyncMode=function(t){return zQ(t)||Fs(t)===i5};On.isConcurrentMode=zQ;On.isContextConsumer=function(t){return Fs(t)===Jx};On.isContextProvider=function(t){return Fs(t)===Yx};On.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===r5};On.isForwardRef=function(t){return Fs(t)===Zx};On.isFragment=function(t){return Fs(t)===Kx};On.isLazy=function(t){return Fs(t)===r2};On.isMemo=function(t){return Fs(t)===t2};On.isPortal=function(t){return Fs(t)===n5};On.isProfiler=function(t){return Fs(t)===Qx};On.isStrictMode=function(t){return Fs(t)===Wx};On.isSuspense=function(t){return Fs(t)===e2};On.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Kx||t===Xx||t===Qx||t===Wx||t===e2||t===Ege||typeof t=="object"&&t!==null&&(t.$$typeof===r2||t.$$typeof===t2||t.$$typeof===Yx||t.$$typeof===Jx||t.$$typeof===Zx||t.$$typeof===Age||t.$$typeof===Sge||t.$$typeof===Ige||t.$$typeof===xge)};On.typeOf=Fs;HQ.exports=On;var Oge=HQ.exports;function HR(t,e){return HR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},HR(t,e)}function VQ(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,HR(t,e)}var cf=function(e,r){if(typeof e=="function"){e(r);return}e!==null&&typeof e=="object"&&(e.current=r)},Pge=function(e){return e!==null&&typeof e=="object"&&e.hasOwnProperty("current")},GQ=function(t){VQ(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=t.call.apply(t,[this].concat(a))||this,n.prevNode=void 0,n}var r=e.prototype;return r.componentDidMount=function(){var i=Qv.findDOMNode(this);this.prevNode=i,cf(this.props.innerRef,i)},r.componentDidUpdate=function(i){var a=Qv.findDOMNode(this);this.prevNode!==a&&(this.prevNode=a,cf(this.props.innerRef,a)),i.innerRef!==this.props.innerRef&&cf(this.props.innerRef,a)},r.componentWillUnmount=function(){cf(this.props.innerRef,null),delete this.prevNode},r.render=function(){var i=this.props.children;return i},e}(Ze.Component),KQ=function(t){VQ(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=t.call.apply(t,[this].concat(a))||this,n.currentNode=void 0,n.handleRefOverride=function(o){var c=n.props,u=c.children,f=c.innerRef;cf(u.ref,o),cf(f,o),n.currentNode=o},n}var r=e.prototype;return r.componentDidUpdate=function(i){i.innerRef!==this.props.innerRef&&cf(this.props.innerRef,this.currentNode)},r.componentWillUnmount=function(){delete this.currentNode},r.render=function(){var i=this.props.children;return Ze.cloneElement(i,{ref:this.handleRefOverride})},e}(Ze.Component),Tge=["children","innerRef"],Cge=function(e){var r=e.children,n=e.innerRef,i=_ge(e,Tge),a=Ze.Children.only(r),s=Oge.isForwardRef(a)?KQ:GQ,o=a&&i&&Object.keys(i).length>0?Ze.cloneElement(a,i):a;return Ze.createElement(s,{innerRef:n},o)};const Rge=Object.freeze(Object.defineProperty({__proto__:null,Ref:Cge,RefFindNode:GQ,RefForward:KQ,handleRef:cf,isRefObject:Pge},Symbol.toStringTag,{value:"Module"})),Ff=js(Rge);function WQ(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=WQ(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function T7(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=WQ(t))&&(n&&(n+=" "),n+=e);return n}const Nge=Object.freeze(Object.defineProperty({__proto__:null,clsx:T7,default:T7},Symbol.toStringTag,{value:"Module"})),Xn=js(Nge);var mO={exports:{}},yO,C7;function Dge(){if(C7)return yO;C7=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return yO=t,yO}var vO,R7;function Mge(){if(R7)return vO;R7=1;var t=Dge();function e(){}function r(){}return r.resetWarningCache=e,vO=function(){function n(s,o,c,u,f,h){if(h!==t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},vO}var N7;function Rn(){return N7||(N7=1,mO.exports=Mge()()),mO.exports}var bO={},Fm={},wO={exports:{}},D7;function $ge(){return D7||(D7=1,function(t){function e(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(wO)),wO.exports}var _O,M7;function a5(){if(M7)return _O;M7=1;function t(e){return e===void 0}return _O=t,_O}var EO,$7;function kge(){if($7)return EO;$7=1;function t(e,r,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),r!==void 0&&(e=e>=r?e:r)),e}return EO=t,EO}var xO,k7;function Lge(){if(k7)return xO;k7=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return xO=e,xO}var AO,L7;function QQ(){if(L7)return AO;L7=1;var t=Lge(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return AO=r,AO}var SO,j7;function YQ(){if(j7)return SO;j7=1;var t=QQ(),e=cl(),r=Yg(),n=0/0,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(e(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=e(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=t(u);var h=a.test(u);return h||s.test(u)?o(u.slice(2),h?2:8):i.test(u)?n:+u}return SO=c,SO}var IO,U7;function s5(){if(U7)return IO;U7=1;var t=YQ(),e=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var a=i<0?-1:1;return a*r}return i===i?i:0}return IO=n,IO}var OO,F7;function n2(){if(F7)return OO;F7=1;var t=s5();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return OO=e,OO}var PO,B7;function jge(){if(B7)return PO;B7=1;var t=kge(),e=Z8(),r=n2(),n=e5();function i(a,s,o){return a=n(a),o=o==null?0:t(r(o),0,a.length),s=e(s),a.slice(o,o+s.length)==s}return PO=i,PO}var TO,q7;function JQ(){if(q7)return TO;q7=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=0,s=[];++n<i;){var o=e[n];r(o,n,e)&&(s[a++]=o)}return s}return TO=t,TO}var CO,H7;function Uge(){if(H7)return CO;H7=1;function t(e){return function(r,n,i){for(var a=-1,s=Object(r),o=i(r),c=o.length;c--;){var u=o[e?c:++a];if(n(s[u],u,s)===!1)break}return r}}return CO=t,CO}var RO,z7;function Fge(){if(z7)return RO;z7=1;var t=Uge(),e=t();return RO=e,RO}var NO,V7;function Bge(){if(V7)return NO;V7=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return NO=t,NO}var DO,G7;function qge(){if(G7)return DO;G7=1;var t=ol(),e=pc(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return DO=n,DO}var MO,K7;function i2(){if(K7)return MO;K7=1;var t=qge(),e=pc(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t(function(){return arguments}())?t:function(s){return e(s)&&n.call(s,"callee")&&!i.call(s,"callee")};return MO=a,MO}var ev={exports:{}},$O,W7;function Hge(){if(W7)return $O;W7=1;function t(){return!1}return $O=t,$O}ev.exports;var Q7;function a2(){return Q7||(Q7=1,function(t,e){var r=sl(),n=Hge(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,o=s?r.Buffer:void 0,c=o?o.isBuffer:void 0,u=c||n;t.exports=u}(ev,ev.exports)),ev.exports}var kO,Y7;function s2(){if(Y7)return kO;Y7=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return kO=r,kO}var LO,J7;function o5(){if(J7)return LO;J7=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return LO=e,LO}var jO,X7;function zge(){if(X7)return jO;X7=1;var t=ol(),e=o5(),r=pc(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",o="[object Error]",c="[object Function]",u="[object Map]",f="[object Number]",h="[object Object]",m="[object RegExp]",y="[object Set]",w="[object String]",v="[object WeakMap]",g="[object ArrayBuffer]",_="[object DataView]",b="[object Float32Array]",S="[object Float64Array]",A="[object Int8Array]",I="[object Int16Array]",E="[object Int32Array]",p="[object Uint8Array]",O="[object Uint8ClampedArray]",N="[object Uint16Array]",F="[object Uint32Array]",V={};V[b]=V[S]=V[A]=V[I]=V[E]=V[p]=V[O]=V[N]=V[F]=!0,V[n]=V[i]=V[g]=V[a]=V[_]=V[s]=V[o]=V[c]=V[u]=V[f]=V[h]=V[m]=V[y]=V[w]=V[v]=!1;function de(ve){return r(ve)&&e(ve.length)&&!!V[t(ve)]}return jO=de,jO}var UO,Z7;function o2(){if(Z7)return UO;Z7=1;function t(e){return function(r){return e(r)}}return UO=t,UO}var tv={exports:{}};tv.exports;var ej;function Vge(){return ej||(ej=1,function(t,e){var r=LQ(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,o=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();t.exports=o}(tv,tv.exports)),tv.exports}var FO,tj;function c2(){if(tj)return FO;tj=1;var t=zge(),e=o2(),r=Vge(),n=r&&r.isTypedArray,i=n?e(n):t;return FO=i,FO}var BO,rj;function Gge(){if(rj)return BO;rj=1;var t=Bge(),e=i2(),r=Ii(),n=a2(),i=s2(),a=c2(),s=Object.prototype,o=s.hasOwnProperty;function c(u,f){var h=r(u),m=!h&&e(u),y=!h&&!m&&n(u),w=!h&&!m&&!y&&a(u),v=h||m||y||w,g=v?t(u.length,String):[],_=g.length;for(var b in u)(f||o.call(u,b))&&!(v&&(b=="length"||y&&(b=="offset"||b=="parent")||w&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||i(b,_)))&&g.push(b);return g}return BO=c,BO}var qO,nj;function XQ(){if(nj)return qO;nj=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return qO=e,qO}var HO,ij;function ZQ(){if(ij)return HO;ij=1;function t(e,r){return function(n){return e(r(n))}}return HO=t,HO}var zO,aj;function Kge(){if(aj)return zO;aj=1;var t=ZQ(),e=t(Object.keys,Object);return zO=e,zO}var VO,sj;function eY(){if(sj)return VO;sj=1;var t=XQ(),e=Kge(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var o in Object(a))n.call(a,o)&&o!="constructor"&&s.push(o);return s}return VO=i,VO}var GO,oj;function Bf(){if(oj)return GO;oj=1;var t=Bx(),e=o5();function r(n){return n!=null&&e(n.length)&&!t(n)}return GO=r,GO}var KO,cj;function ll(){if(cj)return KO;cj=1;var t=Gge(),e=eY(),r=Bf();function n(i){return r(i)?t(i):e(i)}return KO=n,KO}var WO,uj;function c5(){if(uj)return WO;uj=1;var t=Fge(),e=ll();function r(n,i){return n&&t(n,i,e)}return WO=r,WO}var QO,lj;function Wge(){if(lj)return QO;lj=1;var t=Bf();function e(r,n){return function(i,a){if(i==null)return i;if(!t(i))return r(i,a);for(var s=i.length,o=n?s:-1,c=Object(i);(n?o--:++o<s)&&a(c[o],o,c)!==!1;);return i}}return QO=e,QO}var YO,fj;function l1(){if(fj)return YO;fj=1;var t=c5(),e=Wge(),r=e(t);return YO=r,YO}var JO,dj;function Qge(){if(dj)return JO;dj=1;var t=l1();function e(r,n){var i=[];return t(r,function(a,s,o){n(a,s,o)&&i.push(a)}),i}return JO=e,JO}var XO,hj;function Yge(){if(hj)return XO;hj=1;var t=Vx();function e(){this.__data__=new t,this.size=0}return XO=e,XO}var ZO,pj;function Jge(){if(pj)return ZO;pj=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return ZO=t,ZO}var e3,gj;function Xge(){if(gj)return e3;gj=1;function t(e){return this.__data__.get(e)}return e3=t,e3}var t3,mj;function Zge(){if(mj)return t3;mj=1;function t(e){return this.__data__.has(e)}return t3=t,t3}var r3,yj;function eme(){if(yj)return r3;yj=1;var t=Vx(),e=Y8(),r=J8(),n=200;function i(a,s){var o=this.__data__;if(o instanceof t){var c=o.__data__;if(!e||c.length<n-1)return c.push([a,s]),this.size=++o.size,this;o=this.__data__=new r(c)}return o.set(a,s),this.size=o.size,this}return r3=i,r3}var n3,vj;function tY(){if(vj)return n3;vj=1;var t=Vx(),e=Yge(),r=Jge(),n=Xge(),i=Zge(),a=eme();function s(o){var c=this.__data__=new t(o);this.size=c.size}return s.prototype.clear=e,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=i,s.prototype.set=a,n3=s,n3}var i3,bj;function tme(){if(bj)return i3;bj=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return i3=e,i3}var a3,wj;function rme(){if(wj)return a3;wj=1;function t(e){return this.__data__.has(e)}return a3=t,a3}var s3,_j;function u2(){if(_j)return s3;_j=1;var t=J8(),e=tme(),r=rme();function n(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,s3=n,s3}var o3,Ej;function rY(){if(Ej)return o3;Ej=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}return o3=t,o3}var c3,xj;function l2(){if(xj)return c3;xj=1;function t(e,r){return e.has(r)}return c3=t,c3}var u3,Aj;function nY(){if(Aj)return u3;Aj=1;var t=u2(),e=rY(),r=l2(),n=1,i=2;function a(s,o,c,u,f,h){var m=c&n,y=s.length,w=o.length;if(y!=w&&!(m&&w>y))return!1;var v=h.get(s),g=h.get(o);if(v&&g)return v==o&&g==s;var _=-1,b=!0,S=c&i?new t:void 0;for(h.set(s,o),h.set(o,s);++_<y;){var A=s[_],I=o[_];if(u)var E=m?u(I,A,_,o,s,h):u(A,I,_,s,o,h);if(E!==void 0){if(E)continue;b=!1;break}if(S){if(!e(o,function(p,O){if(!r(S,O)&&(A===p||f(A,p,c,u,h)))return S.push(O)})){b=!1;break}}else if(!(A===I||f(A,I,c,u,h))){b=!1;break}}return h.delete(s),h.delete(o),b}return u3=a,u3}var l3,Sj;function nme(){if(Sj)return l3;Sj=1;var t=sl(),e=t.Uint8Array;return l3=e,l3}var f3,Ij;function ime(){if(Ij)return f3;Ij=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return f3=t,f3}var d3,Oj;function u5(){if(Oj)return d3;Oj=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return d3=t,d3}var h3,Pj;function ame(){if(Pj)return h3;Pj=1;var t=s1(),e=nme(),r=Hx(),n=nY(),i=ime(),a=u5(),s=1,o=2,c="[object Boolean]",u="[object Date]",f="[object Error]",h="[object Map]",m="[object Number]",y="[object RegExp]",w="[object Set]",v="[object String]",g="[object Symbol]",_="[object ArrayBuffer]",b="[object DataView]",S=t?t.prototype:void 0,A=S?S.valueOf:void 0;function I(E,p,O,N,F,V,de){switch(O){case b:if(E.byteLength!=p.byteLength||E.byteOffset!=p.byteOffset)return!1;E=E.buffer,p=p.buffer;case _:return!(E.byteLength!=p.byteLength||!V(new e(E),new e(p)));case c:case u:case m:return r(+E,+p);case f:return E.name==p.name&&E.message==p.message;case y:case v:return E==p+"";case h:var ve=i;case w:var U=N&s;if(ve||(ve=a),E.size!=p.size&&!U)return!1;var L=de.get(E);if(L)return L==p;N|=o,de.set(E,p);var Q=n(ve(E),ve(p),N,F,V,de);return de.delete(E),Q;case g:if(A)return A.call(E)==A.call(p)}return!1}return h3=I,h3}var p3,Tj;function iY(){if(Tj)return p3;Tj=1;function t(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}return p3=t,p3}var g3,Cj;function sme(){if(Cj)return g3;Cj=1;var t=iY(),e=Ii();function r(n,i,a){var s=i(n);return e(n)?s:t(s,a(n))}return g3=r,g3}var m3,Rj;function ome(){if(Rj)return m3;Rj=1;function t(){return[]}return m3=t,m3}var y3,Nj;function cme(){if(Nj)return y3;Nj=1;var t=JQ(),e=ome(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(o){return n.call(s,o)}))}:e;return y3=a,y3}var v3,Dj;function ume(){if(Dj)return v3;Dj=1;var t=sme(),e=cme(),r=ll();function n(i){return t(i,r,e)}return v3=n,v3}var b3,Mj;function lme(){if(Mj)return b3;Mj=1;var t=ume(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,o,c,u,f){var h=o&e,m=t(a),y=m.length,w=t(s),v=w.length;if(y!=v&&!h)return!1;for(var g=y;g--;){var _=m[g];if(!(h?_ in s:n.call(s,_)))return!1}var b=f.get(a),S=f.get(s);if(b&&S)return b==s&&S==a;var A=!0;f.set(a,s),f.set(s,a);for(var I=h;++g<y;){_=m[g];var E=a[_],p=s[_];if(c)var O=h?c(p,E,_,s,a,f):c(E,p,_,a,s,f);if(!(O===void 0?E===p||u(E,p,o,c,f):O)){A=!1;break}I||(I=_=="constructor")}if(A&&!I){var N=a.constructor,F=s.constructor;N!=F&&"constructor"in a&&"constructor"in s&&!(typeof N=="function"&&N instanceof N&&typeof F=="function"&&F instanceof F)&&(A=!1)}return f.delete(a),f.delete(s),A}return b3=i,b3}var w3,$j;function fme(){if($j)return w3;$j=1;var t=$h(),e=sl(),r=t(e,"DataView");return w3=r,w3}var _3,kj;function dme(){if(kj)return _3;kj=1;var t=$h(),e=sl(),r=t(e,"Promise");return _3=r,_3}var E3,Lj;function aY(){if(Lj)return E3;Lj=1;var t=$h(),e=sl(),r=t(e,"Set");return E3=r,E3}var x3,jj;function hme(){if(jj)return x3;jj=1;var t=$h(),e=sl(),r=t(e,"WeakMap");return x3=r,x3}var A3,Uj;function sY(){if(Uj)return A3;Uj=1;var t=fme(),e=Y8(),r=dme(),n=aY(),i=hme(),a=ol(),s=jQ(),o="[object Map]",c="[object Object]",u="[object Promise]",f="[object Set]",h="[object WeakMap]",m="[object DataView]",y=s(t),w=s(e),v=s(r),g=s(n),_=s(i),b=a;return(t&&b(new t(new ArrayBuffer(1)))!=m||e&&b(new e)!=o||r&&b(r.resolve())!=u||n&&b(new n)!=f||i&&b(new i)!=h)&&(b=function(S){var A=a(S),I=A==c?S.constructor:void 0,E=I?s(I):"";if(E)switch(E){case y:return m;case w:return o;case v:return u;case g:return f;case _:return h}return A}),A3=b,A3}var S3,Fj;function pme(){if(Fj)return S3;Fj=1;var t=tY(),e=nY(),r=ame(),n=lme(),i=sY(),a=Ii(),s=a2(),o=c2(),c=1,u="[object Arguments]",f="[object Array]",h="[object Object]",m=Object.prototype,y=m.hasOwnProperty;function w(v,g,_,b,S,A){var I=a(v),E=a(g),p=I?f:i(v),O=E?f:i(g);p=p==u?h:p,O=O==u?h:O;var N=p==h,F=O==h,V=p==O;if(V&&s(v)){if(!s(g))return!1;I=!0,N=!1}if(V&&!N)return A||(A=new t),I||o(v)?e(v,g,_,b,S,A):r(v,g,p,_,b,S,A);if(!(_&c)){var de=N&&y.call(v,"__wrapped__"),ve=F&&y.call(g,"__wrapped__");if(de||ve){var U=de?v.value():v,L=ve?g.value():g;return A||(A=new t),S(U,L,_,b,A)}}return V?(A||(A=new t),n(v,g,_,b,S,A)):!1}return S3=w,S3}var I3,Bj;function l5(){if(Bj)return I3;Bj=1;var t=pme(),e=pc();function r(n,i,a,s,o){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:t(n,i,a,s,r,o)}return I3=r,I3}var O3,qj;function gme(){if(qj)return O3;qj=1;var t=tY(),e=l5(),r=1,n=2;function i(a,s,o,c){var u=o.length,f=u,h=!c;if(a==null)return!f;for(a=Object(a);u--;){var m=o[u];if(h&&m[2]?m[1]!==a[m[0]]:!(m[0]in a))return!1}for(;++u<f;){m=o[u];var y=m[0],w=a[y],v=m[1];if(h&&m[2]){if(w===void 0&&!(y in a))return!1}else{var g=new t;if(c)var _=c(w,v,y,a,s,g);if(!(_===void 0?e(v,w,r|n,c,g):_))return!1}}return!0}return O3=i,O3}var P3,Hj;function oY(){if(Hj)return P3;Hj=1;var t=cl();function e(r){return r===r&&!t(r)}return P3=e,P3}var T3,zj;function mme(){if(zj)return T3;zj=1;var t=oY(),e=ll();function r(n){for(var i=e(n),a=i.length;a--;){var s=i[a],o=n[s];i[a]=[s,o,t(o)]}return i}return T3=r,T3}var C3,Vj;function cY(){if(Vj)return C3;Vj=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return C3=t,C3}var R3,Gj;function yme(){if(Gj)return R3;Gj=1;var t=gme(),e=mme(),r=cY();function n(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return R3=n,R3}var N3,Kj;function vme(){if(Kj)return N3;Kj=1;var t=c1();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return N3=e,N3}var D3,Wj;function bme(){if(Wj)return D3;Wj=1;function t(e,r){return e!=null&&r in Object(e)}return D3=t,D3}var M3,Qj;function uY(){if(Qj)return M3;Qj=1;var t=o1(),e=i2(),r=Ii(),n=s2(),i=o5(),a=Jg();function s(o,c,u){c=t(c,o);for(var f=-1,h=c.length,m=!1;++f<h;){var y=a(c[f]);if(!(m=o!=null&&u(o,y)))break;o=o[y]}return m||++f!=h?m:(h=o==null?0:o.length,!!h&&i(h)&&n(y,h)&&(r(o)||e(o)))}return M3=s,M3}var $3,Yj;function lY(){if(Yj)return $3;Yj=1;var t=bme(),e=uY();function r(n,i){return n!=null&&e(n,i,t)}return $3=r,$3}var k3,Jj;function wme(){if(Jj)return k3;Jj=1;var t=l5(),e=vme(),r=lY(),n=Q8(),i=oY(),a=cY(),s=Jg(),o=1,c=2;function u(f,h){return n(f)&&i(h)?a(s(f),h):function(m){var y=e(m,f);return y===void 0&&y===h?r(m,f):t(h,y,o|c)}}return k3=u,k3}var L3,Xj;function _me(){if(Xj)return L3;Xj=1;function t(e){return function(r){return r==null?void 0:r[e]}}return L3=t,L3}var j3,Zj;function Eme(){if(Zj)return j3;Zj=1;var t=c1();function e(r){return function(n){return t(n,r)}}return j3=e,j3}var U3,eU;function xme(){if(eU)return U3;eU=1;var t=_me(),e=Eme(),r=Q8(),n=Jg();function i(a){return r(a)?t(n(a)):e(a)}return U3=i,U3}var F3,tU;function qf(){if(tU)return F3;tU=1;var t=yme(),e=wme(),r=Uf(),n=Ii(),i=xme();function a(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?e(s[0],s[1]):t(s):i(s)}return F3=a,F3}var B3,rU;function Ame(){if(rU)return B3;rU=1;var t=JQ(),e=Qge(),r=qf(),n=Ii();function i(a,s){var o=n(a)?t:e;return o(a,r(s,3))}return B3=i,B3}var q3,nU;function fY(){if(nU)return q3;nU=1;var t=eY(),e=sY(),r=i2(),n=Ii(),i=Bf(),a=a2(),s=XQ(),o=c2(),c="[object Map]",u="[object Set]",f=Object.prototype,h=f.hasOwnProperty;function m(y){if(y==null)return!0;if(i(y)&&(n(y)||typeof y=="string"||typeof y.splice=="function"||a(y)||o(y)||r(y)))return!y.length;var w=e(y);if(w==c||w==u)return!y.size;if(s(y))return!t(y).length;for(var v in y)if(h.call(y,v))return!1;return!0}return q3=m,q3}var H3,iU;function dY(){if(iU)return H3;iU=1;function t(e,r,n,i){for(var a=e.length,s=n+(i?1:-1);i?s--:++s<a;)if(r(e[s],s,e))return s;return-1}return H3=t,H3}var z3,aU;function Sme(){if(aU)return z3;aU=1;function t(e){return e!==e}return z3=t,z3}var V3,sU;function Ime(){if(sU)return V3;sU=1;function t(e,r,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===r)return i;return-1}return V3=t,V3}var G3,oU;function f2(){if(oU)return G3;oU=1;var t=dY(),e=Sme(),r=Ime();function n(i,a,s){return a===a?r(i,a,s):t(i,e,s)}return G3=n,G3}var K3,cU;function f5(){if(cU)return K3;cU=1;var t=f2();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return K3=e,K3}var W3,uU;function d5(){if(uU)return W3;uU=1;function t(e,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(r,e[i]))return!0;return!1}return W3=t,W3}var Q3,lU;function Ome(){if(lU)return Q3;lU=1;var t=u2(),e=f5(),r=d5(),n=kh(),i=o2(),a=l2(),s=Math.min;function o(c,u,f){for(var h=f?r:e,m=c[0].length,y=c.length,w=y,v=Array(y),g=1/0,_=[];w--;){var b=c[w];w&&u&&(b=n(b,i(u))),g=s(b.length,g),v[w]=!f&&(u||m>=120&&b.length>=120)?new t(w&&b):void 0}b=c[0];var S=-1,A=v[0];e:for(;++S<m&&_.length<g;){var I=b[S],E=u?u(I):I;if(I=f||I!==0?I:0,!(A?a(A,E):h(_,E,f))){for(w=y;--w;){var p=v[w];if(!(p?a(p,E):h(c[w],E,f)))continue e}A&&A.push(E),_.push(I)}}return _}return Q3=o,Q3}var Y3,fU;function h5(){if(fU)return Y3;fU=1;var t=Bf(),e=pc();function r(n){return e(n)&&t(n)}return Y3=r,Y3}var J3,dU;function Pme(){if(dU)return J3;dU=1;var t=h5();function e(r){return t(r)?r:[]}return J3=e,J3}var X3,hU;function Tme(){if(hU)return X3;hU=1;var t=kh(),e=Ome(),r=u1(),n=Pme(),i=r(function(a){var s=t(a,n);return s.length&&s[0]===a[0]?e(s):[]});return X3=i,X3}var Z3,pU;function Cme(){if(pU)return Z3;pU=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n,i){return n!=null&&e.call(n,i)}return Z3=r,Z3}var eP,gU;function hY(){if(gU)return eP;gU=1;var t=Cme(),e=uY();function r(n,i){return n!=null&&e(n,i,t)}return eP=r,eP}var tP,mU;function pY(){if(mU)return tP;mU=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i&&r(e[n],n,e)!==!1;);return e}return tP=t,tP}var rP,yU;function Rme(){if(yU)return rP;yU=1;var t=Uf();function e(r){return typeof r=="function"?r:t}return rP=e,rP}var nP,vU;function gY(){if(vU)return nP;vU=1;var t=pY(),e=l1(),r=Rme(),n=Ii();function i(a,s){var o=n(a)?t:e;return o(a,r(s))}return nP=i,nP}var iP,bU;function Nme(){return bU||(bU=1,iP=gY()),iP}var wU;function Dme(){if(wU)return Fm;wU=1;var t=yr;Fm.__esModule=!0,Fm.default=void 0;var e=t(Dn()),r=t($ge()),n=t(hc()),i=t(a5());t(jge()),t(Ame()),t(fY()),t(ll()),t(Tme()),t(hY()),t(Nme());var a=t(No()),s=t(Ze),o=function(h){return"default"+(h[0].toUpperCase()+h.slice(1))},c=function(h,m,y,w){w===void 0&&(w=!1);var v=m[h];if(v!==void 0)return v;if(w){var g=m[o(h)];if(g!==void 0)return g;if(y){var _=y[h];if(_!==void 0)return _}}if(h==="checked")return!1;if(h==="value")return m.multiple?[]:""},u=function(f){(0,n.default)(h,f);function h(){for(var m,y=arguments.length,w=new Array(y),v=0;v<y;v++)w[v]=arguments[v];m=f.call.apply(f,[this].concat(w))||this;var g=m.constructor,_=g.autoControlledProps,b=g.getAutoControlledStateFromProps,S=(0,a.default)((0,r.default)(m),"getInitialAutoControlledState",m.props)||{},A=_.reduce(function(I,E){return I[E]=c(E,m.props,S,!0),I},{});return m.state=(0,e.default)({},S,A,{autoControlledProps:_,getAutoControlledStateFromProps:b}),m}return h.getDerivedStateFromProps=function(y,w){var v=w.autoControlledProps,g=w.getAutoControlledStateFromProps,_=v.reduce(function(S,A){var I=!(0,i.default)(y[A]);return I&&(S[A]=y[A]),S},{});if(g){var b=g(y,(0,e.default)({},w,_),w);return(0,e.default)({},_,b)}return _},h.getAutoControlledStateFromProps=function(){return null},h}(s.default.Component);return Fm.default=u,Fm}var uu={},aP,_U;function Mme(){if(_U)return aP;_U=1;var t=qf(),e=Bf(),r=ll();function n(i){return function(a,s,o){var c=Object(a);if(!e(a)){var u=t(s,3);a=r(a),s=function(h){return u(c[h],h,c)}}var f=i(a,s,o);return f>-1?c[u?a[f]:f]:void 0}}return aP=n,aP}var sP,EU;function $me(){if(EU)return sP;EU=1;var t=dY(),e=qf(),r=n2(),n=Math.max;function i(a,s,o){var c=a==null?0:a.length;if(!c)return-1;var u=o==null?0:r(o);return u<0&&(u=n(c+u,0)),t(a,e(s,3),u)}return sP=i,sP}var oP,xU;function kme(){if(xU)return oP;xU=1;var t=Mme(),e=$me(),r=t(e);return oP=r,oP}var cP,AU;function Lme(){if(AU)return cP;AU=1;var t=l1();function e(r,n){var i;return t(r,function(a,s,o){return i=n(a,s,o),!i}),!!i}return cP=e,cP}var uP,SU;function p5(){if(SU)return uP;SU=1;var t=Hx(),e=Bf(),r=s2(),n=cl();function i(a,s,o){if(!n(o))return!1;var c=typeof s;return(c=="number"?e(o)&&r(s,o.length):c=="string"&&s in o)?t(o[s],a):!1}return uP=i,uP}var lP,IU;function mY(){if(IU)return lP;IU=1;var t=rY(),e=qf(),r=Lme(),n=Ii(),i=p5();function a(s,o,c){var u=n(s)?t:r;return c&&i(s,o,c)&&(o=void 0),u(s,e(o,3))}return lP=a,lP}var OU;function jme(){if(OU)return uu;OU=1;var t=yr;uu.__esModule=!0,uu.isNil=uu.findByType=uu.someByType=void 0;var e=t(kme()),r=t(mY()),n=Ze,i=function(c,u){return(0,r.default)(n.Children.toArray(c),{type:u})};uu.someByType=i;var a=function(c,u){return(0,e.default)(n.Children.toArray(c),{type:u})};uu.findByType=a;var s=function(c){return c==null||Array.isArray(c)&&c.length===0};return uu.isNil=s,uu}var Qi={},_p={},PU;function g5(){if(PU)return _p;PU=1,_p.__esModule=!0,_p.numberToWord=e,_p.numberToWordMap=void 0;var t={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};_p.numberToWordMap=t;function e(r){var n=typeof r;return n==="string"||n==="number"?t[r]||r:""}return _p}var TU;function Ume(){if(TU)return Qi;TU=1,Qi.__esModule=!0,Qi.useWidthProp=Qi.useVerticalAlignProp=Qi.useTextAlignProp=Qi.useMultipleProp=Qi.useKeyOrValueAndKey=Qi.useValueAndKey=Qi.useKeyOnly=void 0;var t=g5(),e=function(u,f){return u&&f};Qi.useKeyOnly=e;var r=function(u,f){return u&&u!==!0&&u+" "+f};Qi.useValueAndKey=r;var n=function(u,f){return u&&(u===!0?f:u+" "+f)};Qi.useKeyOrValueAndKey=n;var i=function(u,f){return!u||u===!0?null:u.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(h){return h.replace("-"," ")+" "+f}).join(" ")};Qi.useMultipleProp=i;var a=function(u){return u==="justified"?"justified":r(u,"aligned")};Qi.useTextAlignProp=a;var s=function(u){return r(u,"aligned")};Qi.useVerticalAlignProp=s;var o=function(u,f,h){if(f===void 0&&(f=""),h===void 0&&(h=!1),h&&u==="equal")return"equal width";var m=typeof u;return(m==="string"||m==="number")&&f?(0,t.numberToWord)(u)+" "+f:(0,t.numberToWord)(u)};return Qi.useWidthProp=o,Qi}var Sn={},fP,CU;function yY(){if(CU)return fP;CU=1;var t=u2(),e=f5(),r=d5(),n=kh(),i=o2(),a=l2(),s=200;function o(c,u,f,h){var m=-1,y=e,w=!0,v=c.length,g=[],_=u.length;if(!v)return g;f&&(u=n(u,i(f))),h?(y=r,w=!1):u.length>=s&&(y=a,w=!1,u=new t(u));e:for(;++m<v;){var b=c[m],S=f==null?b:f(b);if(b=h||b!==0?b:0,w&&S===S){for(var A=_;A--;)if(u[A]===S)continue e;g.push(b)}else y(u,S,h)||g.push(b)}return g}return fP=o,fP}var dP,RU;function Fme(){if(RU)return dP;RU=1;var t=s1(),e=i2(),r=Ii(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return dP=i,dP}var hP,NU;function m5(){if(NU)return hP;NU=1;var t=iY(),e=Fme();function r(n,i,a,s,o){var c=-1,u=n.length;for(a||(a=e),o||(o=[]);++c<u;){var f=n[c];i>0&&a(f)?i>1?r(f,i-1,a,s,o):t(o,f):s||(o[o.length]=f)}return o}return hP=r,hP}var pP,DU;function Bme(){if(DU)return pP;DU=1;var t=yY(),e=m5(),r=u1(),n=h5(),i=r(function(a,s){return n(a)?t(a,e(s,1,n,!0)):[]});return pP=i,pP}var gP,MU;function qme(){if(MU)return gP;MU=1;var t=t5();function e(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:t(r,n,i)}return gP=e,gP}var mP,$U;function Hme(){if($U)return mP;$U=1;var t=f2();function e(r,n){for(var i=r.length;i--&&t(n,r[i],0)>-1;);return i}return mP=e,mP}var yP,kU;function zme(){if(kU)return yP;kU=1;var t=f2();function e(r,n){for(var i=-1,a=r.length;++i<a&&t(n,r[i],0)>-1;);return i}return yP=e,yP}var vP,LU;function Vme(){if(LU)return vP;LU=1;function t(e){return e.split("")}return vP=t,vP}var bP,jU;function Gme(){if(jU)return bP;jU=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="\\u200d",o=RegExp("["+s+t+i+a+"]");function c(u){return o.test(u)}return bP=c,bP}var wP,UU;function Kme(){if(UU)return wP;UU=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="["+t+"]",o="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+o+"|"+c+")",f="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",y="\\u200d",w=u+"?",v="["+a+"]?",g="(?:"+y+"(?:"+[f,h,m].join("|")+")"+v+w+")*",_=v+w+g,b="(?:"+[f+o+"?",o,h,m,s].join("|")+")",S=RegExp(c+"(?="+c+")|"+b+_,"g");function A(I){return I.match(S)||[]}return wP=A,wP}var _P,FU;function Wme(){if(FU)return _P;FU=1;var t=Vme(),e=Gme(),r=Kme();function n(i){return e(i)?r(i):t(i)}return _P=n,_P}var EP,BU;function Qme(){if(BU)return EP;BU=1;var t=Z8(),e=QQ(),r=qme(),n=Hme(),i=zme(),a=Wme(),s=e5();function o(c,u,f){if(c=s(c),c&&(f||u===void 0))return e(c);if(!c||!(u=t(u)))return c;var h=a(c),m=a(u),y=i(h,m),w=n(h,m)+1;return r(h,y,w).join("")}return EP=o,EP}var xP,qU;function Yme(){if(qU)return xP;qU=1;var t=BQ();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return xP=e,xP}var AP,HU;function Jme(){if(HU)return AP;HU=1;var t=Yme(),e=Hx(),r=Object.prototype,n=r.hasOwnProperty;function i(a,s,o){var c=a[s];(!(n.call(a,s)&&e(c,o))||o===void 0&&!(s in a))&&t(a,s,o)}return AP=i,AP}var SP,zU;function Xme(){if(zU)return SP;zU=1;var t=Jme(),e=o1(),r=s2(),n=cl(),i=Jg();function a(s,o,c,u){if(!n(s))return s;o=e(o,s);for(var f=-1,h=o.length,m=h-1,y=s;y!=null&&++f<h;){var w=i(o[f]),v=c;if(w==="__proto__"||w==="constructor"||w==="prototype")return s;if(f!=m){var g=y[w];v=u?u(g,w,y):void 0,v===void 0&&(v=n(g)?g:r(o[f+1])?[]:{})}t(y,w,v),y=y[w]}return s}return SP=a,SP}var IP,VU;function Zme(){if(VU)return IP;VU=1;var t=c1(),e=Xme(),r=o1();function n(i,a,s){for(var o=-1,c=a.length,u={};++o<c;){var f=a[o],h=t(i,f);s(h,f)&&e(u,r(f,i),h)}return u}return IP=n,IP}var OP,GU;function eye(){if(GU)return OP;GU=1;var t=Zme(),e=lY();function r(n,i){return t(n,i,function(a,s){return e(n,s)})}return OP=r,OP}var PP,KU;function tye(){if(KU)return PP;KU=1;var t=m5();function e(r){var n=r==null?0:r.length;return n?t(r,1):[]}return PP=e,PP}var TP,WU;function rye(){if(WU)return TP;WU=1;var t=tye(),e=UQ(),r=qQ();function n(i){return r(e(i,void 0,t),i+"")}return TP=n,TP}var CP,QU;function y5(){if(QU)return CP;QU=1;var t=eye(),e=rye(),r=e(function(n,i){return n==null?{}:t(n,i)});return CP=r,CP}var RP,YU;function vY(){if(YU)return RP;YU=1;var t=ZQ(),e=t(Object.getPrototypeOf,Object);return RP=e,RP}var NP,JU;function d2(){if(JU)return NP;JU=1;var t=ol(),e=vY(),r=pc(),n="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,o=a.hasOwnProperty,c=s.call(Object);function u(f){if(!r(f)||t(f)!=n)return!1;var h=e(f);if(h===null)return!0;var m=o.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&s.call(m)==c}return NP=u,NP}var DP,XU;function nye(){if(XU)return DP;XU=1;var t=Yg();function e(r,n,i){for(var a=-1,s=r.length;++a<s;){var o=r[a],c=n(o);if(c!=null&&(u===void 0?c===c&&!t(c):i(c,u)))var u=c,f=o}return f}return DP=e,DP}var MP,ZU;function iye(){if(ZU)return MP;ZU=1;function t(e,r){return e<r}return MP=t,MP}var $P,eF;function aye(){if(eF)return $P;eF=1;var t=nye(),e=iye(),r=Uf();function n(i){return i&&i.length?t(i,r,e):void 0}return $P=n,$P}var kP,tF;function sye(){if(tF)return kP;tF=1;function t(e,r){for(var n,i=-1,a=e.length;++i<a;){var s=r(e[i]);s!==void 0&&(n=n===void 0?s:n+s)}return n}return kP=t,kP}var LP,rF;function oye(){if(rF)return LP;rF=1;var t=sye(),e=Uf();function r(n){return n&&n.length?t(n,e):0}return LP=r,LP}var jP,nF;function bY(){if(nF)return jP;nF=1;var t=l1(),e=Bf();function r(n,i){var a=-1,s=e(n)?Array(n.length):[];return t(n,function(o,c,u){s[++a]=i(o,c,u)}),s}return jP=r,jP}var UP,iF;function h2(){if(iF)return UP;iF=1;var t=kh(),e=qf(),r=bY(),n=Ii();function i(a,s){var o=n(a)?t:r;return o(a,e(s,3))}return UP=i,UP}var FP,aF;function cye(){if(aF)return FP;aF=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return FP=t,FP}var BP,sF;function uye(){if(sF)return BP;sF=1;var t=Yg();function e(r,n){if(r!==n){var i=r!==void 0,a=r===null,s=r===r,o=t(r),c=n!==void 0,u=n===null,f=n===n,h=t(n);if(!u&&!h&&!o&&r>n||o&&c&&f&&!u&&!h||a&&c&&f||!i&&f||!s)return 1;if(!a&&!o&&!h&&r<n||h&&i&&s&&!a&&!o||u&&i&&s||!c&&s||!f)return-1}return 0}return BP=e,BP}var qP,oF;function lye(){if(oF)return qP;oF=1;var t=uye();function e(r,n,i){for(var a=-1,s=r.criteria,o=n.criteria,c=s.length,u=i.length;++a<c;){var f=t(s[a],o[a]);if(f){if(a>=u)return f;var h=i[a];return f*(h=="desc"?-1:1)}}return r.index-n.index}return qP=e,qP}var HP,cF;function fye(){if(cF)return HP;cF=1;var t=kh(),e=c1(),r=qf(),n=bY(),i=cye(),a=o2(),s=lye(),o=Uf(),c=Ii();function u(f,h,m){h.length?h=t(h,function(v){return c(v)?function(g){return e(g,v.length===1?v[0]:v)}:v}):h=[o];var y=-1;h=t(h,a(r));var w=n(f,function(v,g,_){var b=t(h,function(S){return S(v)});return{criteria:b,index:++y,value:v}});return i(w,function(v,g){return s(v,g,m)})}return HP=u,HP}var zP,uF;function dye(){if(uF)return zP;uF=1;var t=m5(),e=fye(),r=u1(),n=p5(),i=r(function(a,s){if(a==null)return[];var o=s.length;return o>1&&n(a,s[0],s[1])?s=[]:o>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),e(a,t(s,1),[])});return zP=i,zP}var VP,lF;function hye(){if(lF)return VP;lF=1;var t=t5(),e=n2();function r(n,i,a){return n&&n.length?(i=a||i===void 0?1:e(i),t(n,0,i<0?0:i)):[]}return VP=r,VP}var Bm={},fF;function wY(){if(fF)return Bm;fF=1,Bm.__esModule=!0,Bm.default=void 0;var t=function(){return 0},e=t;return Bm.default=e,Bm}var dF;function pye(){if(dF)return Sn;dF=1;var t=yr;Sn.__esModule=!0,Sn.ref=Sn.refObject=Sn.deprecate=Sn.collectionShorthand=Sn.itemShorthand=Sn.contentShorthand=Sn.multipleProp=Sn.demand=Sn.givenProps=Sn.every=Sn.disallow=Sn.suggest=Sn.domNode=void 0;var e=t(Bme()),r=t(Qme()),n=t(cl()),i=t(y5()),a=t(ll()),s=t(d2()),o=t(ul()),c=t(aye()),u=t(oye()),f=t(h2()),h=t(dye()),m=t(hye()),y=t(X8()),w=t(Rn()),v=t(wY()),g=function(){var L;return(L=Object.prototype.toString).call.apply(L,arguments)},_=function(L,Q){if(L[Q]!==void 0&&!(typeof Element>"u")&&!(L[Q]instanceof Element))return new Error('Invalid prop "'+Q+'" supplied, expected a DOM node.')};Sn.domNode=_;var b=function(L){if(!Array.isArray(L))throw new Error("Invalid argument supplied to suggest, expected an instance of array.");var Q=(0,y.default)(function(j){var B=j.split(" ");return(0,m.default)((0,h.default)((0,f.default)(L,function(H){var M=H.split(" "),q=(0,u.default)((0,f.default)((0,f.default)(B,function($){return(0,f.default)(M,function(G){return(0,v.default)($,G)})}),c.default)),k=(0,u.default)((0,f.default)((0,f.default)(M,function($){return(0,f.default)(B,function(G){return(0,v.default)($,G)})}),c.default));return{suggestion:H,score:q+k}}),["score","suggestion"]),3)}),ne=L.reduce(function(j,B){return j[B.split(" ").sort().join(" ")]=!0,j},{});return function(j,B,H){var M=j[B];if(!(!M||ne[M])){var q=M.split(" ").sort().join(" ");if(!ne[q]){var k=Q(M);if(!k.some(function($){return $.score===0}))return new Error(["Invalid prop `"+B+"` of value `"+M+"` supplied to `"+H+"`.",`
79
+
80
+ Instead of \``+M+"`, did you mean:",k.map(function($){return`
81
+ - `+$.suggestion}).join(""),`
82
+ `].join(""))}}}};Sn.suggest=b;var S=function(L){return function(Q,ne,j){if(!Array.isArray(L))throw new Error(["Invalid argument supplied to disallow, expected an instance of array."," See `"+ne+"` prop in `"+j+"`."].join(""));if(!((0,o.default)(Q[ne])||Q[ne]===!1)){var B=L.reduce(function(H,M){return!(0,o.default)(Q[M])&&Q[M]!==!1?[].concat(H,[M]):H},[]);if(B.length>0)return new Error(["Prop `"+ne+"` in `"+j+"` conflicts with props: `"+B.join("`, `")+"`.","They cannot be defined together, choose one or the other."].join(" "))}}};Sn.disallow=S;var A=function(L){return function(Q,ne,j){for(var B=arguments.length,H=new Array(B>3?B-3:0),M=3;M<B;M++)H[M-3]=arguments[M];if(!Array.isArray(L))throw new Error(["Invalid argument supplied to every, expected an instance of array.","See `"+ne+"` prop in `"+j+"`."].join(" "));var q=[];return L.forEach(function(k){if(typeof k!="function")throw new Error('every() argument "validators" should contain functions, found: '+g(k)+".");var $=k.apply(void 0,[Q,ne,j].concat(H));$&&q.push($)}),q[0]}};Sn.every=A;var I=function(L,Q){return function(ne,j,B){for(var H=arguments.length,M=new Array(H>3?H-3:0),q=3;q<H;q++)M[q-3]=arguments[q];if(!(0,s.default)(L))throw new Error(["Invalid argument supplied to givenProps, expected an object.","See `"+j+"` prop in `"+B+"`."].join(" "));if(typeof Q!="function")throw new Error(["Invalid argument supplied to givenProps, expected a function.","See `"+j+"` prop in `"+B+"`."].join(" "));var k=(0,a.default)(L).every(function(pe){var Y=L[pe];return typeof Y=="function"?!Y.apply(void 0,[ne,pe,B].concat(M)):Y===ne[j]});if(k){var $=Q.apply(void 0,[ne,j,B].concat(M));if($){var G="{ "+(0,a.default)((0,i.default)((0,a.default)(L),ne)).map(function(pe){var Y=ne[pe],te=Y;return typeof Y=="string"?te='"'+Y+'"':Array.isArray(Y)?te="["+Y.join(", ")+"]":(0,n.default)(Y)&&(te="{...}"),pe+": "+te}).join(", ")+" }";return $.message="Given props "+G+": "+$.message,$}}}};Sn.givenProps=I;var E=function(L){return function(Q,ne,j){if(!Array.isArray(L))throw new Error(["Invalid `requiredProps` argument supplied to require, expected an instance of array."," See `"+ne+"` prop in `"+j+"`."].join(""));if(Q[ne]!==void 0){var B=L.filter(function(H){return Q[H]===void 0});if(B.length>0)return new Error("`"+ne+"` prop in `"+j+"` requires props: `"+B.join("`, `")+"`.")}}};Sn.demand=E;var p=function(L){return function(Q,ne,j){if(!Array.isArray(L))throw new Error(["Invalid argument supplied to some, expected an instance of array.","See `"+ne+"` prop in `"+j+"`."].join(" "));var B=Q[ne];if(!((0,o.default)(B)||B===!1)){var H=B.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(q){return(0,r.default)(q).replace("-"," ")}),M=(0,e.default)(H,L);if(M.length>0)return new Error("`"+ne+"` prop in `"+j+"` has invalid values: `"+M.join("`, `")+"`.")}}};Sn.multipleProp=p;var O=function(){return A([S(["children"]),w.default.node]).apply(void 0,arguments)};Sn.contentShorthand=O;var N=function(){return A([S(["children"]),w.default.oneOfType([w.default.func,w.default.node,w.default.object,w.default.arrayOf(w.default.oneOfType([w.default.node,w.default.object]))])]).apply(void 0,arguments)};Sn.itemShorthand=N;var F=function(){return A([S(["children"]),w.default.arrayOf(N)]).apply(void 0,arguments)};Sn.collectionShorthand=F;var V=function(L,Q){return function(ne,j,B){if(typeof L!="string")throw new Error(["Invalid `help` argument supplied to deprecate, expected a string.","See `"+j+"` prop in `"+B+"`."].join(" "));if(ne[j]!==void 0){var H=new Error("The `"+j+"` prop in `"+B+"` is deprecated.");if(L&&(H.message+=" "+L),Q)if(typeof Q=="function"){for(var M=arguments.length,q=new Array(M>3?M-3:0),k=3;k<M;k++)q[k-3]=arguments[k];var $=Q.apply(void 0,[ne,j,B].concat(q));$&&(H.message=H.message+" "+$.message)}else throw new Error(["Invalid argument supplied to deprecate, expected a function.","See `"+j+"` prop in `"+B+"`."].join(" "));return H}}};Sn.deprecate=V;var de=w.default.shape({current:w.default.object});Sn.refObject=de;var ve=w.default.oneOfType([w.default.func,de]);return Sn.ref=ve,Sn}var qm={},jw={exports:{}},Hm={},GP={exports:{}};/*!
83
+ Copyright (c) 2015 Jed Watson.
84
+ Based on code that is Copyright 2013-2015, Facebook, Inc.
85
+ All rights reserved.
86
+ */var hF;function gye(){return hF||(hF=1,function(t){(function(){var e=!!(typeof window<"u"&&window.document&&window.document.createElement),r={canUseDOM:e,canUseWorkers:typeof Worker<"u",canUseEventListeners:e&&!!(window.addEventListener||window.attachEvent),canUseViewport:e&&!!window.screen};t.exports?t.exports=r:window.ExecutionEnvironment=r})()}(GP)),GP.exports}var pF;function mye(){if(pF)return Hm;pF=1,Object.defineProperty(Hm,"__esModule",{value:!0});var t=gye();Rn();var e=Ze;function r(E){return(r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(E)}function n(E,p){if(!(E instanceof p))throw new TypeError("Cannot call a class as a function")}function i(E,p){for(var O=0;O<p.length;O++){var N=p[O];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(E,N.key,N)}}function a(E,p,O){return p&&i(E.prototype,p),O&&i(E,O),E}function s(E,p,O){return p in E?Object.defineProperty(E,p,{value:O,enumerable:!0,configurable:!0,writable:!0}):E[p]=O,E}function o(E,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(p&&p.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),p&&u(E,p)}function c(E){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)})(E)}function u(E,p){return(u=Object.setPrototypeOf||function(O,N){return O.__proto__=N,O})(E,p)}function f(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function h(E,p){return!p||typeof p!="object"&&typeof p!="function"?f(E):p}var m=function(){function E(p){n(this,E),s(this,"handlers",void 0),this.handlers=p.slice(0)}return a(E,[{key:"addHandlers",value:function(p){for(var O=this.handlers.slice(0),N=p.length,F=0;F<N;F+=1)O.push(p[F]);return new E(O)}},{key:"dispatchEvent",value:function(p,O){var N=this.handlers.length-1;if(O){for(var F=N;F>=0;F-=1)this.handlers[F].called||(this.handlers[F].called=!0,this.handlers[F](p));for(var V=N;V>=0;V-=1)this.handlers[V].called=!1}else(0,this.handlers[N])(p)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(p){for(var O=[],N=this.handlers.length,F=0;F<N;F+=1){var V=this.handlers[F];p.indexOf(V)===-1&&O.push(V)}return new E(O)}}]),E}();function y(E){var p=new Map;return E.forEach(function(O,N){p.set(N,O)}),p}function w(E){return Array.isArray(E)?E:[E]}var v=function(E){return E!==null&&r(E)==="object"&&E.hasOwnProperty("current")};function g(E){return E==="document"?document:E==="window"?window:v(E)?E.current||document:E||document}var _=function(){function E(p,O){n(this,E),s(this,"handlerSets",void 0),s(this,"poolName",void 0),this.handlerSets=O,this.poolName=p}return a(E,[{key:"addHandlers",value:function(p,O){var N=y(this.handlerSets);if(N.has(p)){var F=N.get(p);N.set(p,F.addHandlers(O))}else N.set(p,new m(O));return new E(this.poolName,N)}},{key:"dispatchEvent",value:function(p,O){var N=this.handlerSets.get(p),F=this.poolName==="default";N&&N.dispatchEvent(O,F)}},{key:"hasHandlers",value:function(p){if(!p)return this.handlerSets.size>0;var O=this.handlerSets.get(p);return!!O&&O.hasHandlers()}},{key:"removeHandlers",value:function(p,O){var N=y(this.handlerSets);if(!N.has(p))return new E(this.poolName,N);var F=N.get(p).removeHandlers(O);return F.hasHandlers()?N.set(p,F):N.delete(p),new E(this.poolName,N)}}]),E}();s(_,"createByType",function(E,p,O){var N=new Map;return N.set(p,new m(O)),new _(E,N)});var b=function(){function E(p){var O=this;n(this,E),s(this,"handlers",new Map),s(this,"pools",new Map),s(this,"target",void 0),s(this,"createEmitter",function(N){return function(F){O.pools.forEach(function(V){V.dispatchEvent(N,F)})}}),this.target=p}return a(E,[{key:"addHandlers",value:function(p,O,N){if(this.pools.has(p)){var F=this.pools.get(p);this.pools.set(p,F.addHandlers(O,N))}else this.pools.set(p,_.createByType(p,O,N));this.handlers.has(O)||this.addTargetHandler(O)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(p,O,N){if(this.pools.has(p)){var F=this.pools.get(p).removeHandlers(O,N);F.hasHandlers()?this.pools.set(p,F):this.pools.delete(p);var V=!1;this.pools.forEach(function(de){return V=V||de.hasHandlers(O)}),V||this.removeTargetHandler(O)}}},{key:"addTargetHandler",value:function(p){var O=this.createEmitter(p);this.handlers.set(p,O),this.target.addEventListener(p,O,!0)}},{key:"removeTargetHandler",value:function(p){this.handlers.has(p)&&(this.target.removeEventListener(p,this.handlers.get(p),!0),this.handlers.delete(p))}}]),E}(),S=function(){function E(){var p=this;n(this,E),s(this,"targets",new Map),s(this,"getTarget",function(O){var N=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],F=g(O);if(p.targets.has(F))return p.targets.get(F);if(!N)return null;var V=new b(F);return p.targets.set(F,V),V}),s(this,"removeTarget",function(O){p.targets.delete(g(O))})}return a(E,[{key:"sub",value:function(p,O){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.canUseDOM){var F=N.target,V=F===void 0?document:F,de=N.pool,ve=de===void 0?"default":de;this.getTarget(V).addHandlers(ve,p,w(O))}}},{key:"unsub",value:function(p,O){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t.canUseDOM){var F=N.target,V=F===void 0?document:F,de=N.pool,ve=de===void 0?"default":de,U=this.getTarget(V,!1);U&&(U.removeHandlers(ve,p,w(O)),U.hasHandlers()||this.removeTarget(V))}}}]),E}(),A=new S,I=function(E){function p(){return n(this,p),h(this,c(p).apply(this,arguments))}return o(p,e.PureComponent),a(p,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(O){this.unsubscribe(O),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(O){var N=O.name,F=O.on,V=O.pool,de=O.target;A.sub(N,F,{pool:V,target:de})}},{key:"unsubscribe",value:function(O){var N=O.name,F=O.on,V=O.pool,de=O.target;A.unsub(N,F,{pool:V,target:de})}},{key:"render",value:function(){return null}}]),p}();return s(I,"defaultProps",{pool:"default",target:"document"}),I.propTypes={},Hm.instance=A,Hm.default=I,Hm}var gF;function v5(){if(gF)return jw.exports;gF=1;var t;return t=mye(),jw.exports=t.default,jw.exports.instance=t.instance,jw.exports}var mF;function yye(){if(mF)return qm;mF=1,qm.__esModule=!0,qm.default=void 0;var t=v5(),e=t.instance;return qm.default=e,qm}var Yi={},KP,yF;function vye(){if(yF)return KP;yF=1;function t(){}return KP=t,KP}var WP,vF;function bye(){if(vF)return WP;vF=1;var t=aY(),e=vye(),r=u5(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return WP=i,WP}var QP,bF;function wye(){if(bF)return QP;bF=1;var t=u2(),e=f5(),r=d5(),n=l2(),i=bye(),a=u5(),s=200;function o(c,u,f){var h=-1,m=e,y=c.length,w=!0,v=[],g=v;if(f)w=!1,m=r;else if(y>=s){var _=u?null:i(c);if(_)return a(_);w=!1,m=n,g=new t}else g=u?[]:v;e:for(;++h<y;){var b=c[h],S=u?u(b):b;if(b=f||b!==0?b:0,w&&S===S){for(var A=g.length;A--;)if(g[A]===S)continue e;u&&g.push(S),v.push(b)}else m(g,S,f)||(g!==v&&g.push(S),v.push(b))}return v}return QP=o,QP}var YP,wF;function _Y(){if(wF)return YP;wF=1;var t=wye();function e(r){return r&&r.length?t(r):[]}return YP=e,YP}var JP,_F;function _ye(){if(_F)return JP;_F=1;var t=ol(),e=pc(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return JP=n,JP}var XP,EF;function EY(){if(EF)return XP;EF=1;var t=ol(),e=Ii(),r=pc(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return XP=i,XP}var ZP,xF;function Eye(){if(xF)return ZP;xF=1;var t=ol(),e=pc(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return ZP=n,ZP}var AF;function xye(){if(AF)return Yi;AF=1;var t=Ro,e=yr;Yi.__esModule=!0,Yi.createShorthand=y,Yi.createShorthandFactory=w,Yi.createHTMLParagraph=Yi.createHTMLLabel=Yi.createHTMLInput=Yi.createHTMLImage=Yi.createHTMLIframe=Yi.createHTMLDivision=void 0;var r=e(Dn()),n=e(_Y()),i=e(Ii()),a=e(d2()),s=e(Bx()),o=e(_ye()),c=e(EY()),u=e(Eye()),f=e(ul()),h=e(Xn),m=t(Ze);function y(I,E,p,O){if(O===void 0&&(O={}),typeof I!="function"&&typeof I!="string")throw new Error("createShorthand() Component must be a string or function.");if((0,f.default)(p)||(0,u.default)(p))return null;var N=(0,c.default)(p),F=(0,o.default)(p),V=(0,s.default)(p),de=m.isValidElement(p),ve=(0,a.default)(p),U=N||F||(0,i.default)(p);if(!V&&!de&&!ve&&!U)return null;var L=O,Q=L.defaultProps,ne=Q===void 0?{}:Q,j=de&&p.props||ve&&p||U&&E(p),B=O,H=B.overrideProps,M=H===void 0?{}:H;M=(0,s.default)(M)?M((0,r.default)({},ne,j)):M;var q=(0,r.default)({},ne,j,M);if(ne.className||M.className||j.className){var k=(0,h.default)(ne.className,M.className,j.className);q.className=(0,n.default)(k.split(" ")).join(" ")}if((ne.style||M.style||j.style)&&(q.style=(0,r.default)({},ne.style,j.style,M.style)),(0,f.default)(q.key)){var $=q.childKey,G=O,pe=G.autoGenerateKey,Y=pe===void 0?!0:pe;(0,f.default)($)?Y&&(N||F)&&(q.key=p):(q.key=typeof $=="function"?$(q):$,delete q.childKey)}if(de)return m.cloneElement(p,q);if(typeof q.children=="function")return q.children(I,(0,r.default)({},q,{children:void 0}));if(U||ve)return m.createElement(I,q);if(V)return p(I,q,q.children)}function w(I,E){if(typeof I!="function"&&typeof I!="string")throw new Error("createShorthandFactory() Component must be a string or function.");return function(p,O){return y(I,E,p,O)}}var v=w("div",function(I){return{children:I}});Yi.createHTMLDivision=v;var g=w("iframe",function(I){return{src:I}});Yi.createHTMLIframe=g;var _=w("img",function(I){return{src:I}});Yi.createHTMLImage=_;var b=w("input",function(I){return{type:I}});Yi.createHTMLInput=b;var S=w("label",function(I){return{children:I}});Yi.createHTMLLabel=S;var A=w("p",function(I){return{children:I}});return Yi.createHTMLParagraph=A,Yi}var zm={},SF;function Aye(){if(SF)return zm;SF=1,zm.__esModule=!0,zm.default=void 0;var t=function(n,i){var a=n.handledProps,s=a===void 0?[]:a;return Object.keys(i).reduce(function(o,c){return c==="childKey"||s.indexOf(c)===-1&&(o[c]=i[c]),o},{})},e=t;return zm.default=e,zm}var Vm={},IF;function Sye(){if(IF)return Vm;IF=1,Vm.__esModule=!0,Vm.default=void 0;function t(r,n,i){var a=r.defaultProps,s=a===void 0?{}:a;if(n.as&&n.as!==s.as)return n.as;if(i){var o=i();if(o)return o}return n.href?"a":s.as||"div"}var e=t;return Vm.default=e,Vm}var Ps={},eT,OF;function Iye(){if(OF)return eT;OF=1;var t=kh();function e(r,n){return t(n,function(i){return r[i]})}return eT=e,eT}var tT,PF;function xY(){if(PF)return tT;PF=1;var t=Iye(),e=ll();function r(n){return n==null?[]:t(n,e(n))}return tT=r,tT}var rT,TF;function b5(){if(TF)return rT;TF=1;var t=f2(),e=Bf(),r=EY(),n=n2(),i=xY(),a=Math.max;function s(o,c,u,f){o=e(o)?o:i(o),u=u&&!f?n(u):0;var h=o.length;return u<0&&(u=a(h+u,0)),r(o)?u<=h&&o.indexOf(c,u)>-1:!!h&&t(o,c,u)>-1}return rT=s,rT}var CF;function Oye(){if(CF)return Ps;CF=1;var t=yr;Ps.__esModule=!0,Ps.partitionHTMLProps=Ps.htmlImageProps=Ps.htmlInputProps=Ps.htmlInputEvents=Ps.htmlInputAttrs=void 0;var e=t(b5()),r=t(gY()),n=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"];Ps.htmlInputAttrs=n;var i=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"];Ps.htmlInputEvents=i;var a=[].concat(n,i);Ps.htmlInputProps=a;var s=["alt","height","src","srcSet","width","loading"];Ps.htmlImageProps=s;var o=function(u,f){f===void 0&&(f={});var h=f,m=h.htmlProps,y=m===void 0?a:m,w=h.includeAria,v=w===void 0?!0:w,g={},_={};return(0,r.default)(u,function(b,S){var A=v&&(/^aria-.*$/.test(S)||S==="role"),I=(0,e.default)(y,S)||A?g:_;I[S]=b}),[g,_]};return Ps.partitionHTMLProps=o,Ps}var Gm={},RF;function AY(){if(RF)return Gm;RF=1;var t=yr;Gm.__esModule=!0,Gm.default=void 0;var e=t(ul()),r=typeof document=="object"&&document!==null,n=typeof window=="object"&&window!==null&&window.self===window,i=function s(){return(0,e.default)(s.override)?r&&n:s.override},a=i;return Gm.default=a,Gm}var Km={},nT,NF;function Pye(){if(NF)return nT;NF=1;var t=Math.max,e=Math.min;function r(n,i,a){return n>=e(i,a)&&n<t(i,a)}return nT=r,nT}var iT,DF;function Tye(){if(DF)return iT;DF=1;var t=Pye(),e=s5(),r=YQ();function n(i,a,s){return a=e(a),s===void 0?(s=a,a=0):s=e(s),i=r(i),t(i,a,s)}return iT=n,iT}var aT,MF;function Cye(){if(MF)return aT;MF=1;function t(e){return e&&e.length?e[0]:void 0}return aT=t,aT}var sT,$F;function Rye(){return $F||($F=1,sT=Cye()),sT}var kF;function Nye(){if(kF)return Km;kF=1;var t=yr;Km.__esModule=!0,Km.default=void 0;var e=t(Tye()),r=t(Rye()),n=t(No()),i=t(ul()),a=t(mY()),s=function(u,f){if((0,a.default)([f,u],i.default))return!1;if(f.target&&((0,n.default)(f.target,"setAttribute","data-suir-click-target",!0),document.querySelector("[data-suir-click-target=true]")))return(0,n.default)(f.target,"removeAttribute","data-suir-click-target"),u.contains(f.target);var h=f.clientX,m=f.clientY;if((0,a.default)([h,m],i.default))return!1;var y=u.getClientRects();if(!u.offsetWidth||!u.offsetHeight||!y||!y.length)return!1;var w=(0,r.default)(y),v=w.top,g=w.bottom,_=w.left,b=w.right;return(0,a.default)([v,g,_,b],i.default)?!1:(0,e.default)(m,v,g+.001)&&(0,e.default)(h,_,b+.001)},o=s;return Km.default=o,Km}var Uw={},Wm={},ka={},LF;function SY(){if(LF)return ka;LF=1,ka.__esModule=!0,ka.createLastItem=ka.createNextItem=ka.createPageFactory=ka.createPrevItem=ka.createFirstPage=ka.createEllipsisItem=void 0;var t=function(o){return{active:!1,type:"ellipsisItem",value:o}};ka.createEllipsisItem=t;var e=function(){return{active:!1,type:"firstItem",value:1}};ka.createFirstPage=e;var r=function(o){return{active:!1,type:"prevItem",value:Math.max(1,o-1)}};ka.createPrevItem=r;var n=function(o){return function(c){return{active:o===c,type:"pageItem",value:c}}};ka.createPageFactory=n;var i=function(o,c){return{active:!1,type:"nextItem",value:Math.min(o+1,c)}};ka.createNextItem=i;var a=function(o){return{active:!1,type:"lastItem",value:o}};return ka.createLastItem=a,ka}var hd={},oT,jF;function Dye(){if(jF)return oT;jF=1;var t=Math.ceil,e=Math.max;function r(n,i,a,s){for(var o=-1,c=e(t((i-n)/(a||1)),0),u=Array(c);c--;)u[s?c:++o]=n,n+=a;return u}return oT=r,oT}var cT,UF;function Mye(){if(UF)return cT;UF=1;var t=Dye(),e=p5(),r=s5();function n(i){return function(a,s,o){return o&&typeof o!="number"&&e(a,s,o)&&(s=o=void 0),a=r(a),s===void 0?(s=a,a=0):s=r(s),o=o===void 0?a<s?1:-1:r(o),t(a,s,o,i)}}return cT=n,cT}var uT,FF;function $ye(){if(FF)return uT;FF=1;var t=Mye(),e=t();return uT=e,uT}var pd={},BF;function kye(){if(BF)return pd;BF=1,pd.__esModule=!0,pd.createInnerSuffix=pd.createInnerPrefix=void 0;var t=SY(),e=function(i,a,s){var o=a-1,c=o!==i+1,u=c?t.createEllipsisItem:s;return u(o)};pd.createInnerPrefix=e;var r=function(i,a,s){var o=i+1,c=o!==a-1,u=c?t.createEllipsisItem:s;return u(o)};return pd.createInnerSuffix=r,pd}var qF;function Lye(){if(qF)return hd;qF=1;var t=yr;hd.__esModule=!0,hd.createComplexRange=hd.createSimpleRange=void 0;var e=t($ye()),r=t(h2()),n=kye(),i=function(o,c,u){return(0,r.default)((0,e.default)(o,c+1),u)};hd.createSimpleRange=i;var a=function(o,c){var u=o.activePage,f=o.boundaryRange,h=o.hideEllipsis,m=o.siblingRange,y=o.totalPages,w=h?0:1,v=f,g=i(1,v,c),_=y+1-f,b=i(_,y,c),S=Math.min(Math.max(u-m,v+w+1),_-w-2*m-1),A=S+2*m,I=i(S,A,c);return[].concat(g,[!h&&(0,n.createInnerPrefix)(v,S,c)],I,[!h&&(0,n.createInnerSuffix)(A,_,c)],b).filter(Boolean)};return hd.createComplexRange=a,hd}var gd={},HF;function jye(){if(HF)return gd;HF=1,gd.__esModule=!0,gd.typifyOptions=gd.isSimplePagination=void 0;var t=function(n){var i=n.boundaryRange,a=n.hideEllipsis,s=n.siblingRange,o=n.totalPages,c=2*i,u=a?0:2,f=2*s;return 1+u+f+c>=o};gd.isSimplePagination=t;var e=function(n){var i=n.activePage,a=n.boundaryRange,s=n.hideEllipsis,o=n.siblingRange,c=n.totalPages;return{activePage:+i,boundaryRange:+a,hideEllipsis:!!s,siblingRange:+o,totalPages:+c}};return gd.typifyOptions=e,gd}var zF;function Uye(){if(zF)return Wm;zF=1,Wm.__esModule=!0,Wm.default=void 0;var t=SY(),e=Lye(),r=jye(),n=function(s){var o=(0,r.typifyOptions)(s),c=o.activePage,u=o.totalPages,f=(0,t.createPageFactory)(c),h=(0,r.isSimplePagination)(o)?(0,e.createSimpleRange)(1,u,f):(0,e.createComplexRange)(o,f);return[(0,t.createFirstPage)(),(0,t.createPrevItem)(c)].concat(h,[(0,t.createNextItem)(c,u),(0,t.createLastItem)(u)])},i=n;return Wm.default=i,Wm}var VF;function Fye(){if(VF)return Uw;VF=1;var t=yr;Uw.__esModule=!0;var e=t(Uye());return Uw.default=e.default,Uw}var mt={},GF;function Bye(){if(GF)return mt;GF=1;var t=yr;mt.__esModule=!0,mt.ALL_ICONS_IN_ALL_CONTEXTS=mt.COMPONENT_CONTEXT_SPECIFIC_ICONS=mt.ICONS_AND_ALIASES=mt.ICON_ALIASES=mt.ICONS=mt.BRANDS=mt.WRITING=mt.VEHICLES=mt.USERS_PEOPLE=mt.STATUS=mt.SPORTS=mt.SPINNERS=mt.SHAPES=mt.PAYMENTS_SHOPPING=mt.OBJECTS=mt.MEDICAL=mt.MAPS=mt.LOGISTICS=mt.INTERFACES=mt.IMAGES=mt.HEALTH=mt.HANDS_GESTURES=mt.GENDERS=mt.FILES=mt.EDITORS=mt.DESIGN=mt.DATE_TIME=mt.CURRENCY=mt.COMPUTERS=mt.COMMUNICATION=mt.CODE=mt.CHESS=mt.BUSINESS=mt.AUDIO_VIDEO=mt.ARROWS=mt.ACCESSIBILITY=mt.TRANSITIONS=mt.STATIC_TRANSITIONS=mt.DIRECTIONAL_TRANSITIONS=mt.WIDTHS=mt.VISIBILITY=mt.VERTICAL_ALIGNMENTS=mt.TEXT_ALIGNMENTS=mt.SIZES=mt.FLOATS=mt.COLORS=void 0;var e=t(_Y()),r=t(xY()),n=t(ll()),i=g5(),a=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","black"];mt.COLORS=a;var s=["left","right"];mt.FLOATS=s;var o=["mini","tiny","small","medium","large","big","huge","massive"];mt.SIZES=o;var c=["left","center","right","justified"];mt.TEXT_ALIGNMENTS=c;var u=["bottom","middle","top"];mt.VERTICAL_ALIGNMENTS=u;var f=["mobile","tablet","computer","large screen","widescreen"];mt.VISIBILITY=f;var h=[].concat((0,n.default)(i.numberToWordMap),(0,n.default)(i.numberToWordMap).map(Number),(0,r.default)(i.numberToWordMap));mt.WIDTHS=h;var m=["browse","browse right","drop","fade","fade up","fade down","fade left","fade right","fly up","fly down","fly left","fly right","horizontal flip","vertical flip","scale","slide up","slide down","slide left","slide right","swing up","swing down","swing left","swing right","zoom"];mt.DIRECTIONAL_TRANSITIONS=m;var y=["jiggle","flash","shake","pulse","tada","bounce","glow"];mt.STATIC_TRANSITIONS=y;var w=[].concat(m,y);mt.TRANSITIONS=w;var v=["american sign language interpreting","assistive listening systems","audio description","blind","braille","closed captioning","closed captioning outline","deaf","low vision","phone volume","question circle","question circle outline","sign language","tty","universal access","wheelchair"];mt.ACCESSIBILITY=v;var g=["angle double down","angle double left","angle double right","angle double up","angle down","angle left","angle right","angle up","arrow alternate circle down","arrow alternate circle down outline","arrow alternate circle left","arrow alternate circle left outline","arrow alternate circle right","arrow alternate circle right outline","arrow alternate circle up","arrow alternate circle up outline","arrow circle down","arrow circle left","arrow circle right","arrow circle up","arrow down","arrow left","arrow right","arrow up","arrows alternate","arrows alternate horizontal","arrows alternate vertical","caret down","caret left","caret right","caret square down","caret square down outline","caret square left","caret square left outline","caret square right","caret square right outline","caret square up","caret square up outline","caret up","cart arrow down","chart line","chevron circle down","chevron circle left","chevron circle right","chevron circle up","chevron down","chevron left","chevron right","chevron up","cloud download","cloud upload","download","exchange","expand arrows alternate","external alternate","external square alternate","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","history","level down alternate","level up alternate","location arrow","long arrow alternate down","long arrow alternate left","long arrow alternate right","long arrow alternate up","mouse pointer","play","random","recycle","redo","redo alternate","reply","reply all","retweet","share","share square","share square outline","sign-in","sign-out","sign-in alternate","sign-out alternate","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","sync","sync alternate","text height","text width","undo","undo alternate","upload","zoom-in","zoom-out"];mt.ARROWS=g;var _=["audio description","backward","circle","circle outline","closed captioning","closed captioning outline","compress","eject","expand","expand arrows alternate","fast backward","fast forward","file audio","file audio outline","file video","file video outline","film","forward","headphones","microphone","microphone slash","music","pause","pause circle","pause circle outline","phone volume","play","play circle","play circle outline","podcast","random","redo","redo alternate","rss","rss square","step backward","step forward","stop","stop circle","stop circle outline","sync","sync alternate","undo","undo alternate","video","volume down","volume off","volume up"];mt.AUDIO_VIDEO=_;var b=["address book","address book outline","address card","address card outline","archive","balance scale","birthday cake","book","briefcase","building","building outline","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","certificate","chart area","chart bar","chart bar outline","chart line","chart pie","clipboard","clipboard outline","coffee","columns","compass","compass outline","copy","copy outline","copyright","copyright outline","cut","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","eraser","fax","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","globe","industry","paperclip","paste","pen square","pencil alternate","percent","phone","phone square","phone volume","registered","registered outline","save","save outline","sitemap","sticky note","sticky note outline","suitcase","table","tag","tags","tasks","thumbtack","trademark"];mt.BUSINESS=b;var S=["chess","chess bishop","chess board","chess king","chess knight","chess pawn","chess queen","chess rook","square full"];mt.CHESS=S;var A=["archive","barcode","bath","bug","code","code branch","coffee","file","file outline","file alternate","file alternate outline","file code","file code outline","filter","fire extinguisher","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","microchip","qrcode","shield alternate","sitemap","terminal","user secret","window close","window close outline","window maximize","window maximize outline","window minimize","window minimize outline","window restore","window restore outline"];mt.CODE=A;var I=["address book","address book outline","address card","address card outline","american sign language interpreting","assistive listening systems","at","bell","bell outline","bell slash","bell slash outline","bullhorn","comment","comment outline","comment alternate","comment alternate outline","comments","comments outline","envelope","envelope outline","envelope open","envelope open outline","envelope square","fax","inbox","language","microphone","microphone slash","mobile","mobile alternate","paper plane","paper plane outline","phone","phone square","phone volume","rss","rss square","tty","wifi"];mt.COMMUNICATION=I;var E=["desktop","download","hdd","hdd outline","headphones","keyboard","keyboard outline","laptop","microchip","mobile","mobile alternate","plug","power off","print","save","save outline","server","tablet","tablet alternate","tv","upload"];mt.COMPUTERS=E;var p=["dollar sign","euro sign","lira sign","money bill alternate","money bill alternate outline","pound sign","ruble sign","rupee sign","shekel sign","won sign","yen sign"];mt.CURRENCY=p;var O=["bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","clock","clock outline","hourglass","hourglass outline","hourglass end","hourglass half","hourglass start","stopwatch"];mt.DATE_TIME=O;var N=["adjust","clone","clone outline","copy","copy outline","crop","crosshairs","cut","edit","edit outline","eraser","eye","eye dropper","eye slash","eye slash outline","object group","object group outline","object ungroup","object ungroup outline","paint brush","paste","pencil alternate","save","save outline","tint"];mt.DESIGN=N;var F=["align center","align justify","align left","align right","bold","clipboard","clipboard outline","clone","clone outline","columns","copy","copy outline","cut","edit","edit outline","eraser","file","file outline","file alternate","file alternate outline","font","heading","i cursor","indent","italic","linkify","list","list alternate","list alternate outline","list ol","list ul","outdent","paper plane","paper plane outline","paperclip","paragraph","paste","pencil alternate","print","quote left","quote right","redo","redo alternate","reply","reply all","share","strikethrough","subscript","superscript","sync","sync alternate","table","tasks","text height","text width","th","th large","th list","trash","trash alternate","trash alternate outline","underline","undo","undo alternate","unlink"];mt.EDITORS=F;var V=["archive","clone","clone outline","copy","copy outline","cut","file","file outline","file alternate","file alternate outline","file archive","file archive outline","file audio","file audio outline","file code","file code outline","file excel","file excel outline","file image","file image outline","file pdf","file pdf outline","file powerpoint","file powerpoint outline","file video","file video outline","file word","file word outline","folder","folder outline","folder open","folder open outline","paste","save","save outline","sticky note","sticky note outline"];mt.FILES=V;var de=["genderless","mars","mars double","mars stroke","mars stroke horizontal","mars stroke vertical","mercury","neuter","transgender","transgender alternate","venus","venus double","venus mars"];mt.GENDERS=de;var ve=["hand lizard","hand lizard outline","hand paper","hand paper outline","hand peace","hand peace outline","hand point down","hand point down outline","hand point left","hand point left outline","hand point right","hand point right outline","hand point up","hand point up outline","hand pointer","hand pointer outline","hand rock","hand rock outline","hand scissors","hand scissors outline","hand spock","hand spock outline","handshake","handshake outline","thumbs down","thumbs down outline","thumbs up","thumbs up outline"];mt.HANDS_GESTURES=ve;var U=["ambulance","h square","heart","heart outline","heartbeat","hospital","hospital outline","medkit","plus square","plus square outline","stethoscope","user md","wheelchair"];mt.HEALTH=U;var L=["adjust","bolt","camera","camera retro","clone","clone outline","compress","expand","eye","eye dropper","eye slash","eye slash outline","file image","file image outline","film","id badge","id badge outline","id card","id card outline","image","image outline","images","images outline","sliders horizontal","tint"];mt.IMAGES=L;var Q=["ban","barcode","bars","beer","bell","bell outline","bell slash","bell slash outline","bug","bullhorn","bullseye","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","certificate","check","check circle","check circle outline","check square","check square outline","circle","circle outline","clipboard","clipboard outline","clone","clone outline","cloud","cloud download","cloud upload","coffee","cog","cogs","copy","copy outline","cut","database","dot circle","dot circle outline","download","edit","edit outline","ellipsis horizontal","ellipsis vertical","envelope","envelope outline","envelope open","envelope open outline","eraser","exclamation","exclamation circle","exclamation triangle","external alternate","external square alternate","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","filter","flag","flag outline","flag checkered","folder","folder outline","folder open","folder open outline","frown","frown outline","hashtag","heart","heart outline","history","home","i cursor","info","info circle","language","magic","meh","meh outline","microphone","microphone slash","minus","minus circle","minus square","minus square outline","paste","pencil alternate","plus","plus circle","plus square","plus square outline","qrcode","question","question circle","question circle outline","quote left","quote right","redo","redo alternate","reply","reply all","rss","rss square","save","save outline","search","search minus","search plus","share","share alternate","share alternate square","share square","share square outline","shield alternate","sign-in","sign-out","signal","sitemap","sliders horizontal","smile","smile outline","sort","sort alphabet down","sort alphabet up","sort amount down","sort amount up","sort down","sort numeric down","sort numeric up","sort up","star","star outline","star half","star half outline","sync","sync alternate","thumbs down","thumbs down outline","thumbs up","thumbs up outline","times","times circle","times circle outline","toggle off","toggle on","trash","trash alternate","trash alternate outline","trophy","undo","undo alternate","upload","user","user outline","user circle","user circle outline","wifi"];mt.INTERFACES=Q;var ne=["box","boxes","clipboard check","clipboard list","dolly","dolly flatbed","pallet","shipping fast","truck","warehouse"];mt.LOGISTICS=ne;var j=["ambulance","anchor","balance scale","bath","bed","beer","bell","bell outline","bell slash","bell slash outline","bicycle","binoculars","birthday cake","blind","bomb","book","bookmark","bookmark outline","briefcase","building","building outline","car","coffee","crosshairs","dollar sign","eye","eye slash","eye slash outline","fighter jet","fire","fire extinguisher","flag","flag outline","flag checkered","flask","gamepad","gavel","gift","glass martini","globe","graduation cap","h square","heart","heart outline","heartbeat","home","hospital","hospital outline","image","image outline","images","images outline","industry","info","info circle","key","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","location arrow","low vision","magnet","male","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","money bill alternate","money bill alternate outline","motorcycle","music","newspaper","newspaper outline","paw","phone","phone square","phone volume","plane","plug","plus","plus square","plus square outline","print","recycle","road","rocket","search","search minus","search plus","ship","shopping bag","shopping basket","shopping cart","shower","street view","subway","suitcase","tag","tags","taxi","thumbtack","ticket alternate","tint","train","tree","trophy","truck","tty","umbrella","university","utensil spoon","utensils","wheelchair","wifi","wrench"];mt.MAPS=j;var B=["ambulance","band aid","dna","first aid","heart","heart outline","heartbeat","hospital","hospital outline","hospital symbol","pills","plus","stethoscope","syringe","thermometer","user md","weight"];mt.MEDICAL=B;var H=["ambulance","anchor","archive","balance scale","bath","bed","beer","bell","bell outline","bicycle","binoculars","birthday cake","bomb","book","bookmark","bookmark outline","briefcase","bug","building","building outline","bullhorn","bullseye","bus","calculator","calendar","calendar outline","calendar alternate","calendar alternate outline","camera","camera retro","car","clipboard","clipboard outline","cloud","coffee","cog","cogs","compass","compass outline","copy","copy outline","cube","cubes","cut","envelope","envelope outline","envelope open","envelope open outline","eraser","eye","eye dropper","fax","fighter jet","file","file outline","file alternate","file alternate outline","film","fire","fire extinguisher","flag","flag outline","flag checkered","flask","futbol","futbol outline","gamepad","gavel","gem","gem outline","gift","glass martini","globe","graduation cap","hdd","hdd outline","headphones","heart","heart outline","home","hospital","hospital outline","hourglass","hourglass outline","image","image outline","images","images outline","industry","key","keyboard","keyboard outline","laptop","leaf","lemon","lemon outline","life ring","life ring outline","lightbulb","lightbulb outline","lock","lock open","magic","magnet","map","map outline","map marker","map marker alternate","map pin","map signs","medkit","microchip","microphone","mobile","mobile alternate","money bill alternate","money bill alternate outline","moon","moon outline","motorcycle","newspaper","newspaper outline","paint brush","paper plane","paper plane outline","paperclip","paste","paw","pencil alternate","phone","plane","plug","print","puzzle piece","road","rocket","save","save outline","search","shield alternate","shopping bag","shopping basket","shopping cart","shower","snowflake","snowflake outline","space shuttle","star","star outline","sticky note","sticky note outline","stopwatch","subway","suitcase","sun","sun outline","tablet","tablet alternate","tachometer alternate","tag","tags","taxi","thumbtack","ticket alternate","train","trash","trash alternate","trash alternate outline","tree","trophy","truck","tv","umbrella","university","unlock","unlock alternate","utensil spoon","utensils","wheelchair","wrench"];mt.OBJECTS=H;var M=["bell","bell outline","bookmark","bookmark outline","bullhorn","camera","camera retro","cart arrow down","cart plus","certificate","credit card","credit card outline","gem","gem outline","gift","handshake","handshake outline","heart","heart outline","key","shopping bag","shopping basket","shopping cart","star","star outline","tag","tags","thumbs down","thumbs down outline","thumbs up","thumbs up outline","trophy"];mt.PAYMENTS_SHOPPING=M;var q=["bookmark","bookmark outline","calendar","calendar outline","certificate","circle","circle outline","cloud","comment","comment outline","file","file outline","folder","folder outline","heart","heart outline","map marker","play","square","square outline","star","star outline"];mt.SHAPES=q;var k=["asterisk","certificate","circle notch","cog","compass","compass outline","crosshairs","life ring","life ring outline","snowflake","snowflake outline","spinner","sun","sun outline","sync"];mt.SPINNERS=k;var $=["baseball ball","basketball ball","bowling ball","football ball","futbol","futbol outline","golf ball","hockey puck","quidditch","table tennis","volleyball ball"];mt.SPORTS=$;var G=["ban","battery empty","battery full","battery half","battery quarter","battery three quarters","bell","bell outline","bell slash","bell slash outline","calendar","calendar outline","calendar alternate","calendar alternate outline","calendar check","calendar check outline","calendar minus","calendar minus outline","calendar plus","calendar plus outline","calendar times","calendar times outline","cart arrow down","cart plus","exclamation","exclamation circle","exclamation triangle","eye","eye slash","eye slash outline","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","info","info circle","lock","lock open","minus","minus circle","minus square","minus square outline","plus","plus circle","plus square","plus square outline","question","question circle","question circle outline","shield alternate","shopping cart","sign in alternate","sign out alternate","thermometer empty","thermometer full","thermometer half","thermometer quarter","thermometer three quarters","thumbs down","thumbs down outline","thumbs up","thumbs up outline","toggle off","toggle on","unlock","unlock alternate"];mt.STATUS=G;var pe=["address book","address book outline","address card","address card outline","bed","blind","child","female","frown","frown outline","id badge","id badge outline","id card","id card outline","male","meh","meh outline","power off","smile","smile outline","street view","user","user outline","user circle","user circle outline","user md","user plus","user secret","user times","users","wheelchair"];mt.USERS_PEOPLE=pe;var Y=["ambulance","bicycle","bus","car","fighter jet","motorcycle","paper plane","paper plane outline","plane","rocket","ship","shopping cart","space shuttle","subway","taxi","train","truck","wheelchair"];mt.VEHICLES=Y;var te=["archive","book","bookmark","bookmark outline","edit","edit outline","envelope","envelope outline","envelope open","envelope open outline","eraser","file","file outline","file alternate","file alternate outline","folder","folder outline","folder open","folder open outline","keyboard","keyboard outline","newspaper","newspaper outline","paper plane","paper plane outline","paperclip","paragraph","pen square","pencil alternate","quote left","quote right","sticky note","sticky note outline","thumbtack"];mt.WRITING=te;var ce=["500px","accessible","accusoft","adn","adversal","affiliatetheme","algolia","amazon","amazon pay","amilia","android","angellist","angrycreative","angular","app store","app store ios","apper","apple","apple pay","asymmetrik","audible","autoprefixer","avianex","aviato","aws","bandcamp","behance","behance square","bimobject","bitbucket","bitcoin","bity","black tie","blackberry","blogger","blogger b","bluetooth","bluetooth b","btc","buromobelexperte","buysellads","cc amazon pay","cc amex","cc apple pay","cc diners club","cc discover","cc jcb","cc mastercard","cc paypal","cc stripe","cc visa","centercode","chrome","cloudscale","cloudsmith","cloudversify","codepen","codiepie","connectdevelop","contao","cpanel","creative commons","css3","css3 alternate","cuttlefish","d and d","dashcube","delicious","deploydog","deskpro","deviantart","digg","digital ocean","discord","discourse","dochub","docker","draft2digital","dribbble","dribbble square","dropbox","drupal","dyalog","earlybirds","edge","elementor","ember","empire","envira","erlang","ethereum","etsy","expeditedssl","facebook","facebook f","facebook messenger","facebook square","firefox","first order","firstdraft","flickr","flipboard","fly","font awesome","font awesome alternate","font awesome flag","fonticons","fonticons fi","fort awesome","fort awesome alternate","forumbee","foursquare","free code camp","freebsd","get pocket","gg","gg circle","git","git square","github","github alternate","github square","gitkraken","gitlab","gitter","glide","glide g","gofore","goodreads","goodreads g","google","google drive","google play","google plus","google plus g","google plus square","google wallet","gratipay","grav","gripfire","grunt","gulp","hacker news","hacker news square","hips","hire a helper","hooli","hotjar","houzz","html5","hubspot","imdb","instagram","internet explorer","ioxhost","itunes","itunes note","jenkins","joget","joomla","js","js square","jsfiddle","keycdn","kickstarter","kickstarter k","korvue","laravel","lastfm","lastfm square","leanpub","less","linechat","linkedin","linkedin alternate","linode","linux","lyft","magento","maxcdn","medapps","medium","medium m","medrt","meetup","microsoft","mix","mixcloud","mizuni","modx","monero","napster","nintendo switch","node","node js","npm","ns8","nutritionix","odnoklassniki","odnoklassniki square","opencart","openid","opera","optin monster","osi","page4","pagelines","palfed","patreon","paypal","periscope","phabricator","phoenix framework","php","pied piper","pied piper alternate","pied piper pp","pinterest","pinterest p","pinterest square","playstation","product hunt","pushed","python","qq","quinscape","quora","ravelry","react","rebel","redriver","reddit","reddit alien","reddit square","rendact","renren","replyd","resolving","rocketchat","rockrms","safari","sass","schlix","scribd","searchengin","sellcast","sellsy","servicestack","shirtsinbulk","simplybuilt","sistrix","skyatlas","skype","slack","slack hash","slideshare","snapchat","snapchat ghost","snapchat square","soundcloud","speakap","spotify","stack exchange","stack overflow","staylinked","steam","steam square","steam symbol","sticker mule","strava","stripe","stripe s","studiovinari","stumbleupon","stumbleupon circle","superpowers","supple","telegram","telegram plane","tencent weibo","themeisle","trello","tripadvisor","tumblr","tumblr square","twitch","twitter","twitter square","typo3","uber","uikit","uniregistry","untappd","usb","ussunnah","vaadin","viacoin","viadeo","viadeo square","viber","vimeo","vimeo square","vimeo v","vine","vk","vnv","vuejs","wechat","weibo","weixin","whatsapp","whatsapp square","whmcs","wikipedia w","windows","wordpress","wordpress simple","wpbeginner","wpexplorer","wpforms","xbox","xing","xing square","y combinator","yahoo","yandex","yandex international","yelp","yoast","youtube","youtube square"];mt.BRANDS=ce;var T=(0,e.default)([].concat(v,g,_,b,S,A,I,E,p,O,N,F,V,de,ve,U,L,Q,ne,j,B,H,M,q,k,$,G,pe,Y,te,ce));mt.ICONS=T;var le=["chess rock","ordered list","unordered list","user doctor","shield","puzzle","add circle","add square","add to calendar","add to cart","add user","add","alarm mute","alarm","ald","als","announcement","area chart","area graph","arrow down cart","asexual","asl interpreting","asl","assistive listening devices","attach","attention","balance","bar","bathtub","battery four","battery high","battery low","battery one","battery three","battery two","battery zero","birthday","block layout","bluetooth alternative","broken chain","browser","call square","call","cancel","cart","cc","chain","chat","checked calendar","checkmark","circle notched","close","cny","cocktail","commenting","computer","configure","content","deafness","delete calendar","delete","detective","discussions","doctor","dollar","dont","drivers license","dropdown","emergency","envira gallery","erase","eur","euro","eyedropper","factory","favorite","feed","female homosexual","file text","file text outline","find","first aid","fork","game","gay","gbp","google plus circle","google plus official","grab","graduation","grid layout","group","h","hand victory","handicap","hard of hearing","header","help circle","help","heterosexual","hide","hotel","hourglass four","hourglass full","hourglass one","hourglass three","hourglass two","idea","ils","in cart","inr","intergender","intersex","jpy","krw","lab","law","legal","lesbian","lightning","like","line graph","linkedin square","linkify","lira","list layout","magnify","mail forward","mail outline","mail square","mail","male homosexual","man","marker","mars alternate","mars horizontal","mars vertical","microsoft edge","military","ms edge","mute","new pied piper","non binary transgender","numbered list","options","other gender horizontal","other gender vertical","other gender","payment","paypal card","pencil square","photo","picture","pie chart","pie graph","pied piper hat","pin","plus cart","point","pointing down","pointing left","pointing right","pointing up","pound","power cord","power","privacy","r circle","rain","record","refresh","remove circle","remove from calendar","remove user","remove","repeat","rmb","rouble","rub","ruble","rupee","s15","selected radio","send","setting","settings","shekel","sheqel","shipping","shop","shuffle","shutdown","sidebar","signing","signup","sliders","soccer","sort alphabet ascending","sort alphabet descending","sort ascending","sort content ascending","sort content descending","sort descending","sort numeric ascending","sort numeric descending","sound","spy","stripe card","student","talk","target","teletype","television","text cursor","text telephone","theme","thermometer","thumb tack","time","tm","toggle down","toggle left","toggle right","toggle up","translate","travel","treatment","triangle down","triangle left","triangle right","triangle up","try","unhide","unlinkify","unmute","usd","user cancel","user close","user delete","user x","vcard","video camera","video play","volume control phone","wait","warning circle","warning sign","warning","wi-fi","winner","wizard","woman","won","wordpress beginner","wordpress forms","world","write square","x","yen","zip","zoom in","zoom out","zoom","bitbucket square","checkmark box","circle thin","cloud download","cloud upload","compose","conversation","credit card alternative","currency","dashboard","diamond","disk","exchange","external share","external square","external","facebook official","food","hourglass zero","level down","level up","log out","meanpath","money","move","pencil","protect","radio","remove bookmark","resize horizontal","resize vertical","sign in","sign out","spoon","star half empty","star half full","ticket","times rectangle","write","youtube play"];mt.ICON_ALIASES=le;var ze=(0,e.default)([].concat(T,le));mt.ICONS_AND_ALIASES=ze;var et=["left dropdown"];mt.COMPONENT_CONTEXT_SPECIFIC_ICONS=et;var yt=(0,e.default)([].concat(ze,et));return mt.ALL_ICONS_IN_ALL_CONTEXTS=yt,mt}var Qm={},KF;function qye(){if(KF)return Qm;KF=1,Qm.__esModule=!0,Qm.default=void 0;var t=function(r){return typeof r=="number"||typeof r=="string"?[r,r]:r};return Qm.default=t,Qm}var Ym={},WF;function Hye(){if(WF)return Ym;WF=1,Ym.__esModule=!0,Ym.default=void 0;var t=function(r,n){return typeof r=="number"||typeof r=="string"?r:r[n]};return Ym.default=t,Ym}var Jm={},lT,QF;function zye(){if(QF)return lT;QF=1;var t=l5();function e(r,n){return t(r,n)}return lT=e,lT}var fT,YF;function Vye(){if(YF)return fT;YF=1;var t=cl(),e=Object.create,r=function(){function n(){}return function(i){if(!t(i))return{};if(e)return e(i);n.prototype=i;var a=new n;return n.prototype=void 0,a}}();return fT=r,fT}var dT,JF;function Gye(){if(JF)return dT;JF=1;var t=pY(),e=Vye(),r=c5(),n=qf(),i=vY(),a=Ii(),s=a2(),o=Bx(),c=cl(),u=c2();function f(h,m,y){var w=a(h),v=w||s(h)||u(h);if(m=n(m,4),y==null){var g=h&&h.constructor;v?y=w?new g:[]:c(h)?y=o(g)?e(i(h)):{}:y={}}return(v?t:r)(h,function(_,b,S){return m(y,_,b,S)}),y}return dT=f,dT}var XF;function Kye(){if(XF)return Jm;XF=1;var t=yr;Jm.__esModule=!0,Jm.default=void 0;var e=t(zye()),r=t(hY()),n=t(Gye()),i=function(s,o){return(0,n.default)(s,function(c,u,f){(0,r.default)(o,f)?(0,e.default)(u,o[f])||(c[f]=o[f]):c[f]="[DELETED]"},{})};return Jm.default=i,Jm}var Ec={},Xm={},ZF;function Wye(){if(ZF)return Xm;ZF=1;var t=yr;Xm.__esModule=!0,Xm.default=void 0;var e=t(Ze),r=t(AY()),n=(0,r.default)()?e.default.useLayoutEffect:e.default.useEffect,i=n;return Xm.default=i,Xm}var eB;function Qye(){if(eB)return Ec;eB=1;var t=yr;Ec.__esModule=!0,Ec.computeClassNames=a,Ec.computeClassNamesDifference=s,Ec.default=h,Ec.NodeRegistry=Ec.handleClassNamesChange=void 0;var e=Ff,r=t(Ze),n=t(Wye()),i=/\s+/;function a(m){var y=[];return m?(m.forEach(function(w){if(typeof w.current=="string"){var v=w.current.split(i);v.forEach(function(g){y.push(g)})}}),y.filter(function(w,v,g){return w.length>0&&g.indexOf(w)===v})):[]}function s(m,y){return[y.filter(function(w){return m.indexOf(w)===-1}),m.filter(function(w){return y.indexOf(w)===-1})]}var o=new Map,c=function(y,w){var v=a(w),g=s(o.get(y)||[],v),_=g[0],b=g[1];y&&(_.forEach(function(S){return y.classList.add(S)}),b.forEach(function(S){return y.classList.remove(S)})),o.set(y,v)};Ec.handleClassNamesChange=c;var u=function(){var y=this;this.add=function(w,v){if(y.nodes.has(w)){var g=y.nodes.get(w);g.add(v);return}var _=new Set;_.add(v),y.nodes.set(w,_)},this.del=function(w,v){if(y.nodes.has(w)){var g=y.nodes.get(w);if(g.size===1){y.nodes.delete(w);return}g.delete(v)}},this.emit=function(w,v){v(w,y.nodes.get(w))},this.nodes=new Map};Ec.NodeRegistry=u;var f=new u;function h(m,y){var w=r.default.useRef(),v=r.default.useRef(!1);(0,n.default)(function(){if(w.current=y,v.current){var g=(0,e.isRefObject)(m)?m.current:m;f.emit(g,c)}v.current=!0},[y]),(0,n.default)(function(){var g=(0,e.isRefObject)(m)?m.current:m;return f.add(g,w),f.emit(g,c),function(){f.del(g,w),f.emit(g,c)}},[m])}return Ec}var tB;function qn(){return tB||(tB=1,function(t){var e=Ro,r=yr;t.__esModule=!0;var n={useKeyOnly:!0,useKeyOrValueAndKey:!0,useValueAndKey:!0,useMultipleProp:!0,useTextAlignProp:!0,useVerticalAlignProp:!0,useWidthProp:!0,htmlInputAttrs:!0,htmlInputEvents:!0,htmlInputProps:!0,htmlImageProps:!0,partitionHTMLProps:!0,numberToWordMap:!0,numberToWord:!0,ModernAutoControlledComponent:!0,childrenUtils:!0,customPropTypes:!0,eventStack:!0,getUnhandledProps:!0,getElementType:!0,isBrowser:!0,doesNodeContainClick:!0,leven:!0,createPaginationItems:!0,SUI:!0,normalizeOffset:!0,normalizeTransitionDuration:!0,objectDiff:!0,useClassNamesOnNode:!0};t.SUI=t.customPropTypes=t.childrenUtils=t.numberToWord=t.numberToWordMap=t.partitionHTMLProps=t.htmlImageProps=t.htmlInputProps=t.htmlInputEvents=t.htmlInputAttrs=t.useWidthProp=t.useVerticalAlignProp=t.useTextAlignProp=t.useMultipleProp=t.useValueAndKey=t.useKeyOrValueAndKey=t.useKeyOnly=void 0;var i=r(Dme());t.ModernAutoControlledComponent=i.default;var a=e(jme());t.childrenUtils=a;var s=Ume();t.useKeyOnly=s.useKeyOnly,t.useKeyOrValueAndKey=s.useKeyOrValueAndKey,t.useValueAndKey=s.useValueAndKey,t.useMultipleProp=s.useMultipleProp,t.useTextAlignProp=s.useTextAlignProp,t.useVerticalAlignProp=s.useVerticalAlignProp,t.useWidthProp=s.useWidthProp;var o=e(pye());t.customPropTypes=o;var c=r(yye());t.eventStack=c.default;var u=xye();Object.keys(u).forEach(function(p){p==="default"||p==="__esModule"||Object.prototype.hasOwnProperty.call(n,p)||(t[p]=u[p])});var f=r(Aye());t.getUnhandledProps=f.default;var h=r(Sye());t.getElementType=h.default;var m=Oye();t.htmlInputAttrs=m.htmlInputAttrs,t.htmlInputEvents=m.htmlInputEvents,t.htmlInputProps=m.htmlInputProps,t.htmlImageProps=m.htmlImageProps,t.partitionHTMLProps=m.partitionHTMLProps;var y=r(AY());t.isBrowser=y.default;var w=r(Nye());t.doesNodeContainClick=w.default;var v=r(wY());t.leven=v.default;var g=r(Fye());t.createPaginationItems=g.default;var _=e(Bye());t.SUI=_;var b=g5();t.numberToWordMap=b.numberToWordMap,t.numberToWord=b.numberToWord;var S=r(qye());t.normalizeOffset=S.default;var A=r(Hye());t.normalizeTransitionDuration=A.default;var I=r(Kye());t.objectDiff=I.default;var E=r(Qye());t.useClassNamesOnNode=E.default}(bO)),bO}var Zm={},hT,rB;function w5(){if(rB)return hT;rB=1;var t=yY(),e=u1(),r=h5(),n=e(function(i,a){return r(i)?t(i,a):[]});return hT=n,hT}var ey={},nB;function Yye(){if(nB)return ey;nB=1;var t=yr;ey.__esModule=!0,ey.default=void 0;var e=t(Dn());t(w5());var r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(o){var c=o.children,u=o.className,f=o.content,h=o.size,m=(0,r.default)(h,"icons",u),y=(0,i.getUnhandledProps)(a,o),w=(0,i.getElementType)(a,o);return n.default.createElement(w,(0,e.default)({},y,{className:m}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content","size"],a.propTypes={},a.defaultProps={as:"i"};var s=a;return ey.default=s,ey}var iB;function _5(){if(iB)return Zm;iB=1;var t=Ro,e=yr;Zm.__esModule=!0,Zm.default=void 0;var r=e(Dn()),n=e(hc());e(w5());var i=e(No()),a=e(ul()),s=e(Xn);e(Rn());var o=t(Ze),c=qn(),u=e(Yye()),f=function(m){(0,n.default)(y,m);function y(){for(var v,g=arguments.length,_=new Array(g),b=0;b<g;b++)_[b]=arguments[b];return v=m.call.apply(m,[this].concat(_))||this,v.handleClick=function(S){var A=v.props.disabled;if(A){S.preventDefault();return}(0,i.default)(v.props,"onClick",S,v.props)},v}var w=y.prototype;return w.getIconAriaOptions=function(){var g={},_=this.props,b=_["aria-label"],S=_["aria-hidden"];return(0,a.default)(b)?g["aria-hidden"]="true":g["aria-label"]=b,(0,a.default)(S)||(g["aria-hidden"]=S),g},w.render=function(){var g=this.props,_=g.bordered,b=g.circular,S=g.className,A=g.color,I=g.corner,E=g.disabled,p=g.fitted,O=g.flipped,N=g.inverted,F=g.link,V=g.loading,de=g.name,ve=g.rotated,U=g.size,L=(0,s.default)(A,de,U,(0,c.useKeyOnly)(_,"bordered"),(0,c.useKeyOnly)(b,"circular"),(0,c.useKeyOnly)(E,"disabled"),(0,c.useKeyOnly)(p,"fitted"),(0,c.useKeyOnly)(N,"inverted"),(0,c.useKeyOnly)(F,"link"),(0,c.useKeyOnly)(V,"loading"),(0,c.useKeyOrValueAndKey)(I,"corner"),(0,c.useValueAndKey)(O,"flipped"),(0,c.useValueAndKey)(ve,"rotated"),"icon",S),Q=(0,c.getUnhandledProps)(y,this.props),ne=(0,c.getElementType)(y,this.props),j=this.getIconAriaOptions();return o.default.createElement(ne,(0,r.default)({},Q,j,{className:L,onClick:this.handleClick}))},y}(o.PureComponent);f.handledProps=["aria-hidden","aria-label","as","bordered","circular","className","color","corner","disabled","fitted","flipped","inverted","link","loading","name","rotated","size"],f.propTypes={},f.defaultProps={as:"i"},f.Group=u.default,f.create=(0,c.createShorthandFactory)(f,function(m){return{name:m}});var h=f;return Zm.default=h,Zm}var ty={},ry={},Fw={},ny={},Bw={},iy={},pT,aB;function Jye(){if(aB)return pT;aB=1;for(var t=function(o){return o!==null&&!Array.isArray(o)&&typeof o=="object"},e={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"},r=0;r<24;r+=1)e[112+r]="F"+(r+1);for(var n=0;n<26;n+=1){var i=n+65;e[i]=[String.fromCharCode(i+32),String.fromCharCode(i)]}var a={codes:e,getCode:function(o){return t(o)?o.keyCode||o.which||this[o.key]:this[o]},getKey:function(o){var c=t(o);if(c&&o.key)return o.key;var u=e[c?o.keyCode||o.which:o];return Array.isArray(u)&&(c?u=u[o.shiftKey?1:0]:u=u[0]),u},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};return a.Spacebar=a[" "],a.Digit0=a[0],a.Digit1=a[1],a.Digit2=a[2],a.Digit3=a[3],a.Digit4=a[4],a.Digit5=a[5],a.Digit6=a[6],a.Digit7=a[7],a.Digit8=a[8],a.Digit9=a[9],a.Tilde=a["~"],a.GraveAccent=a["`"],a.ExclamationPoint=a["!"],a.AtSign=a["@"],a.PoundSign=a["#"],a.PercentSign=a["%"],a.Caret=a["^"],a.Ampersand=a["&"],a.PlusSign=a["+"],a.MinusSign=a["-"],a.EqualsSign=a["="],a.DivisionSign=a["/"],a.MultiplicationSign=a["*"],a.Comma=a[","],a.Decimal=a["."],a.Colon=a[":"],a.Semicolon=a[";"],a.Pipe=a["|"],a.BackSlash=a["\\"],a.QuestionMark=a["?"],a.SingleQuote=a["'"],a.DoubleQuote=a['"'],a.LeftCurlyBrace=a["{"],a.RightCurlyBrace=a["}"],a.LeftParenthesis=a["("],a.RightParenthesis=a[")"],a.LeftAngleBracket=a["<"],a.RightAngleBracket=a[">"],a.LeftSquareBracket=a["["],a.RightSquareBracket=a["]"],pT=a,pT}var qw={},gT={exports:{}},_n={};/**
87
+ * @license React
88
+ * react-is.production.min.js
89
+ *
90
+ * Copyright (c) Facebook, Inc. and its affiliates.
91
+ *
92
+ * This source code is licensed under the MIT license found in the
93
+ * LICENSE file in the root directory of this source tree.
94
+ */var sB;function Xye(){if(sB)return _n;sB=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),o=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function v(g){if(typeof g=="object"&&g!==null){var _=g.$$typeof;switch(_){case t:switch(g=g.type,g){case r:case i:case n:case u:case f:return g;default:switch(g=g&&g.$$typeof,g){case o:case s:case c:case m:case h:case a:return g;default:return _}}case e:return _}}}return _n.ContextConsumer=s,_n.ContextProvider=a,_n.Element=t,_n.ForwardRef=c,_n.Fragment=r,_n.Lazy=m,_n.Memo=h,_n.Portal=e,_n.Profiler=i,_n.StrictMode=n,_n.Suspense=u,_n.SuspenseList=f,_n.isAsyncMode=function(){return!1},_n.isConcurrentMode=function(){return!1},_n.isContextConsumer=function(g){return v(g)===s},_n.isContextProvider=function(g){return v(g)===a},_n.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},_n.isForwardRef=function(g){return v(g)===c},_n.isFragment=function(g){return v(g)===r},_n.isLazy=function(g){return v(g)===m},_n.isMemo=function(g){return v(g)===h},_n.isPortal=function(g){return v(g)===e},_n.isProfiler=function(g){return v(g)===i},_n.isStrictMode=function(g){return v(g)===n},_n.isSuspense=function(g){return v(g)===u},_n.isSuspenseList=function(g){return v(g)===f},_n.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===i||g===n||g===u||g===f||g===y||typeof g=="object"&&g!==null&&(g.$$typeof===m||g.$$typeof===h||g.$$typeof===a||g.$$typeof===s||g.$$typeof===c||g.$$typeof===w||g.getModuleId!==void 0)},_n.typeOf=v,_n}var oB;function Zye(){return oB||(oB=1,gT.exports=Xye()),gT.exports}var cB;function eve(){if(cB)return qw;cB=1;var t=Ro,e=yr;qw.__esModule=!0,qw.default=i;var r=e(Ze),n=t(Zye());function i(a){if(a&&(r.default.Children.only(a),n.isFragment(a)))throw new Error('An "React.Fragment" cannot be used as a `trigger`.')}return qw}var ay={},uB;function tve(){if(uB)return ay;uB=1;var t=Ro,e=yr;ay.__esModule=!0,ay.default=void 0;var r=e(hc()),n=e(No()),i=Ff;e(Rn());var a=t(Ze),s=Qv,o=qn(),c=function(f){(0,r.default)(h,f);function h(){for(var y,w=arguments.length,v=new Array(w),g=0;g<w;g++)v[g]=arguments[g];return y=f.call.apply(f,[this].concat(v))||this,y.handleRef=function(_){(0,i.handleRef)(y.props.innerRef,_)},y}var m=h.prototype;return m.componentDidMount=function(){(0,n.default)(this.props,"onMount",null,this.props)},m.componentWillUnmount=function(){(0,n.default)(this.props,"onUnmount",null,this.props)},m.render=function(){if(!(0,o.isBrowser)())return null;var w=this.props,v=w.children,g=w.mountNode,_=g===void 0?document.body:g;return(0,s.createPortal)(a.default.createElement(i.Ref,{innerRef:this.handleRef},v),_)},h}(a.Component);c.handledProps=["children","innerRef","mountNode","onMount","onUnmount"],c.propTypes={};var u=c;return ay.default=u,ay}var lB;function rve(){if(lB)return iy;lB=1;var t=yr;iy.__esModule=!0,iy.default=void 0;var e=t(Dn()),r=t(hc()),n=t(No()),i=t(v5()),a=Ff,s=t(Jye());t(Rn());var o=t(Ze),c=qn();t(eve());var u=t(tve()),f=function(m){(0,r.default)(y,m);function y(){for(var v,g=arguments.length,_=new Array(g),b=0;b<g;b++)_[b]=arguments[b];return v=m.call.apply(m,[this].concat(_))||this,v.contentRef=o.default.createRef(),v.triggerRef=o.default.createRef(),v.latestDocumentMouseDownEvent=null,v.handleDocumentMouseDown=function(S){v.latestDocumentMouseDownEvent=S},v.handleDocumentClick=function(S){var A=v.props.closeOnDocumentClick,I=v.latestDocumentMouseDownEvent;v.latestDocumentMouseDownEvent=null,!(!v.contentRef.current||(0,c.doesNodeContainClick)(v.triggerRef.current,S)||I&&(0,c.doesNodeContainClick)(v.contentRef.current,I)||(0,c.doesNodeContainClick)(v.contentRef.current,S))&&A&&v.close(S)},v.handleEscape=function(S){v.props.closeOnEscape&&s.default.getCode(S)===s.default.Escape&&v.close(S)},v.handlePortalMouseLeave=function(S){var A=v.props,I=A.closeOnPortalMouseLeave,E=A.mouseLeaveDelay;I&&S.target===v.contentRef.current&&(v.mouseLeaveTimer=v.closeWithTimeout(S,E))},v.handlePortalMouseEnter=function(){var S=v.props.closeOnPortalMouseLeave;S&&clearTimeout(v.mouseLeaveTimer)},v.handleTriggerBlur=function(S){for(var A=v.props,I=A.trigger,E=A.closeOnTriggerBlur,p=arguments.length,O=new Array(p>1?p-1:0),N=1;N<p;N++)O[N-1]=arguments[N];n.default.apply(void 0,[I,"props.onBlur",S].concat(O));var F=S.relatedTarget||document.activeElement,V=(0,n.default)(v.contentRef.current,"contains",F);!E||V||v.close(S)},v.handleTriggerClick=function(S){for(var A=v.props,I=A.trigger,E=A.closeOnTriggerClick,p=A.openOnTriggerClick,O=v.state.open,N=arguments.length,F=new Array(N>1?N-1:0),V=1;V<N;V++)F[V-1]=arguments[V];n.default.apply(void 0,[I,"props.onClick",S].concat(F)),O&&E?v.close(S):!O&&p&&v.open(S)},v.handleTriggerFocus=function(S){for(var A=v.props,I=A.trigger,E=A.openOnTriggerFocus,p=arguments.length,O=new Array(p>1?p-1:0),N=1;N<p;N++)O[N-1]=arguments[N];n.default.apply(void 0,[I,"props.onFocus",S].concat(O)),E&&v.open(S)},v.handleTriggerMouseLeave=function(S){clearTimeout(v.mouseEnterTimer);for(var A=v.props,I=A.trigger,E=A.closeOnTriggerMouseLeave,p=A.mouseLeaveDelay,O=arguments.length,N=new Array(O>1?O-1:0),F=1;F<O;F++)N[F-1]=arguments[F];n.default.apply(void 0,[I,"props.onMouseLeave",S].concat(N)),E&&(v.mouseLeaveTimer=v.closeWithTimeout(S,p))},v.handleTriggerMouseEnter=function(S){clearTimeout(v.mouseLeaveTimer);for(var A=v.props,I=A.trigger,E=A.mouseEnterDelay,p=A.openOnTriggerMouseEnter,O=arguments.length,N=new Array(O>1?O-1:0),F=1;F<O;F++)N[F-1]=arguments[F];n.default.apply(void 0,[I,"props.onMouseEnter",S].concat(N)),p&&(v.mouseEnterTimer=v.openWithTimeout(S,E))},v.open=function(S){(0,n.default)(v.props,"onOpen",S,(0,e.default)({},v.props,{open:!0})),v.setState({open:!0})},v.openWithTimeout=function(S,A){var I=(0,e.default)({},S);return setTimeout(function(){return v.open(I)},A||0)},v.close=function(S){v.setState({open:!1}),(0,n.default)(v.props,"onClose",S,(0,e.default)({},v.props,{open:!1}))},v.closeWithTimeout=function(S,A){var I=(0,e.default)({},S);return setTimeout(function(){return v.close(I)},A||0)},v.handleMount=function(){(0,n.default)(v.props,"onMount",null,v.props)},v.handleUnmount=function(){(0,n.default)(v.props,"onUnmount",null,v.props)},v.handleTriggerRef=function(S){v.triggerRef.current=S,(0,a.handleRef)(v.props.triggerRef,S)},v}var w=y.prototype;return w.componentWillUnmount=function(){clearTimeout(this.mouseEnterTimer),clearTimeout(this.mouseLeaveTimer)},w.render=function(){var g=this.props,_=g.children,b=g.eventPool,S=g.mountNode,A=g.trigger,I=this.state.open;return o.default.createElement(o.default.Fragment,null,I&&o.default.createElement(o.default.Fragment,null,o.default.createElement(u.default,{innerRef:this.contentRef,mountNode:S,onMount:this.handleMount,onUnmount:this.handleUnmount},_),o.default.createElement(i.default,{name:"mouseleave",on:this.handlePortalMouseLeave,pool:b,target:this.contentRef}),o.default.createElement(i.default,{name:"mouseenter",on:this.handlePortalMouseEnter,pool:b,target:this.contentRef}),o.default.createElement(i.default,{name:"mousedown",on:this.handleDocumentMouseDown,pool:b}),o.default.createElement(i.default,{name:"click",on:this.handleDocumentClick,pool:b}),o.default.createElement(i.default,{name:"keydown",on:this.handleEscape,pool:b})),A&&o.default.createElement(a.Ref,{innerRef:this.handleTriggerRef},o.default.cloneElement(A,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseEnter:this.handleTriggerMouseEnter})))},y}(c.ModernAutoControlledComponent);f.handledProps=["children","closeOnDocumentClick","closeOnEscape","closeOnPortalMouseLeave","closeOnTriggerBlur","closeOnTriggerClick","closeOnTriggerMouseLeave","defaultOpen","eventPool","mountNode","mouseEnterDelay","mouseLeaveDelay","onClose","onMount","onOpen","onUnmount","open","openOnTriggerClick","openOnTriggerFocus","openOnTriggerMouseEnter","trigger","triggerRef"],f.propTypes={},f.defaultProps={closeOnDocumentClick:!0,closeOnEscape:!0,eventPool:"default",openOnTriggerClick:!0},f.autoControlledProps=["open"],f.Inner=u.default;var h=f;return iy.default=h,iy}var fB;function E5(){if(fB)return Bw;fB=1;var t=yr;Bw.__esModule=!0;var e=t(rve());return Bw.default=e.default,Bw}var sy={},dB;function nve(){if(dB)return sy;dB=1;var t=yr;sy.__esModule=!0,sy.default=void 0;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(o){var c=o.blurring,u=o.className,f=o.children,h=o.content,m=o.dimmed,y=(0,r.default)((0,i.useKeyOnly)(c,"blurring"),(0,i.useKeyOnly)(m,"dimmed"),"dimmable",u),w=(0,i.getUnhandledProps)(a,o),v=(0,i.getElementType)(a,o);return n.default.createElement(v,(0,e.default)({},w,{className:y}),i.childrenUtils.isNil(f)?h:f)}a.handledProps=["as","blurring","children","className","content","dimmed"],a.propTypes={};var s=a;return sy.default=s,sy}var oy={},hB;function ive(){if(hB)return oy;hB=1;var t=Ro,e=yr;oy.__esModule=!0,oy.default=void 0;var r=e(Dn()),n=e(hc()),i=e(No()),a=Ff,s=e(Xn);e(Rn());var o=t(Ze),c=qn(),u=function(f){(0,n.default)(h,f);function h(){for(var y,w=arguments.length,v=new Array(w),g=0;g<w;g++)v[g]=arguments[g];return y=f.call.apply(f,[this].concat(v))||this,y.containerRef=(0,o.createRef)(),y.contentRef=(0,o.createRef)(),y.handleClick=function(_){var b=y.contentRef.current;(0,i.default)(y.props,"onClick",_,y.props),!(b&&b!==_.target&&(0,c.doesNodeContainClick)(b,_))&&(0,i.default)(y.props,"onClickOutside",_,y.props)},y}var m=h.prototype;return m.componentDidMount=function(){var w=this.props.active;this.toggleStyles(w)},m.componentDidUpdate=function(w){var v=this.props.active,g=w.active;g!==v&&this.toggleStyles(v)},m.toggleStyles=function(w){var v=this.containerRef.current;!v||!v.style||(w?v.style.setProperty("display","flex","important"):v.style.removeProperty("display"))},m.render=function(){var w=this.props,v=w.active,g=w.children,_=w.className,b=w.content,S=w.disabled,A=w.inverted,I=w.page,E=w.simple,p=w.verticalAlign,O=(0,s.default)("ui",(0,c.useKeyOnly)(v,"active transition visible"),(0,c.useKeyOnly)(S,"disabled"),(0,c.useKeyOnly)(A,"inverted"),(0,c.useKeyOnly)(I,"page"),(0,c.useKeyOnly)(E,"simple"),(0,c.useVerticalAlignProp)(p),"dimmer",_),N=(0,c.getUnhandledProps)(h,this.props),F=(0,c.getElementType)(h,this.props),V=c.childrenUtils.isNil(g)?b:g;return o.default.createElement(a.Ref,{innerRef:this.containerRef},o.default.createElement(F,(0,r.default)({},N,{className:O,onClick:this.handleClick}),V&&o.default.createElement("div",{className:"content",ref:this.contentRef},V)))},h}(o.Component);return oy.default=u,u.handledProps=["active","as","children","className","content","disabled","inverted","onClick","onClickOutside","page","simple","verticalAlign"],u.propTypes={},oy}var pB;function ave(){if(pB)return ny;pB=1;var t=Ro,e=yr;ny.__esModule=!0,ny.default=void 0;var r=e(Dn()),n=e(hc());e(Rn());var i=t(Ze),a=qn(),s=e(E5()),o=e(nve()),c=e(ive()),u=function(f){(0,n.default)(h,f);function h(){for(var y,w=arguments.length,v=new Array(w),g=0;g<w;g++)v[g]=arguments[g];return y=f.call.apply(f,[this].concat(v))||this,y.handlePortalMount=function(){(0,a.isBrowser)()&&(document.body.classList.add("dimmed"),document.body.classList.add("dimmable"))},y.handlePortalUnmount=function(){(0,a.isBrowser)()&&(document.body.classList.remove("dimmed"),document.body.classList.remove("dimmable"))},y}var m=h.prototype;return m.render=function(){var w=this.props,v=w.active,g=w.page,_=(0,a.getUnhandledProps)(h,this.props);return g?i.default.createElement(s.default,{closeOnEscape:!1,closeOnDocumentClick:!1,onMount:this.handlePortalMount,onUnmount:this.handlePortalUnmount,open:v,openOnTriggerClick:!1},i.default.createElement(c.default,(0,r.default)({},_,{active:v,page:g}))):i.default.createElement(c.default,(0,r.default)({},_,{active:v,page:g}))},h}(i.Component);return ny.default=u,u.handledProps=["active","page"],u.propTypes={},u.Dimmable=o.default,u.Inner=c.default,u.create=(0,a.createShorthandFactory)(u,function(f){return{content:f}}),ny}var gB;function sve(){if(gB)return Fw;gB=1;var t=yr;Fw.__esModule=!0;var e=t(ave());return Fw.default=e.default,Fw}var cy={},mB;function ove(){if(mB)return cy;mB=1;var t=yr;cy.__esModule=!0,cy.default=void 0;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(o){var c=o.children,u=o.className,f=o.content,h=o.size,m=(0,r.default)("ui",h,u,"images"),y=(0,i.getUnhandledProps)(a,o),w=(0,i.getElementType)(a,o);return n.default.createElement(w,(0,e.default)({},y,{className:m}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content","size"],a.propTypes={};var s=a;return cy.default=s,cy}var yB;function cve(){if(yB)return ry;yB=1;var t=yr;ry.__esModule=!0,ry.default=void 0;var e=t(Dn()),r=t(ul()),n=t(Xn);t(Rn());var i=t(Ze),a=qn(),s=t(sve()),o=t(IY()),c=t(ove());function u(h){var m=h.avatar,y=h.bordered,w=h.centered,v=h.children,g=h.circular,_=h.className,b=h.content,S=h.dimmer,A=h.disabled,I=h.floated,E=h.fluid,p=h.hidden,O=h.href,N=h.inline,F=h.label,V=h.rounded,de=h.size,ve=h.spaced,U=h.verticalAlign,L=h.wrapped,Q=h.ui,ne=(0,n.default)((0,a.useKeyOnly)(Q,"ui"),de,(0,a.useKeyOnly)(m,"avatar"),(0,a.useKeyOnly)(y,"bordered"),(0,a.useKeyOnly)(g,"circular"),(0,a.useKeyOnly)(w,"centered"),(0,a.useKeyOnly)(A,"disabled"),(0,a.useKeyOnly)(E,"fluid"),(0,a.useKeyOnly)(p,"hidden"),(0,a.useKeyOnly)(N,"inline"),(0,a.useKeyOnly)(V,"rounded"),(0,a.useKeyOrValueAndKey)(ve,"spaced"),(0,a.useValueAndKey)(I,"floated"),(0,a.useVerticalAlignProp)(U,"aligned"),"image",_),j=(0,a.getUnhandledProps)(u,h),B=(0,a.partitionHTMLProps)(j,{htmlProps:a.htmlImageProps}),H=B[0],M=B[1],q=(0,a.getElementType)(u,h,function(){if(!(0,r.default)(S)||!(0,r.default)(F)||!(0,r.default)(L)||!a.childrenUtils.isNil(v))return"div"});return a.childrenUtils.isNil(v)?a.childrenUtils.isNil(b)?q==="img"?i.default.createElement(q,(0,e.default)({},M,H,{className:ne})):i.default.createElement(q,(0,e.default)({},M,{className:ne,href:O}),s.default.create(S,{autoGenerateKey:!1}),o.default.create(F,{autoGenerateKey:!1}),i.default.createElement("img",H)):i.default.createElement(q,(0,e.default)({},j,{className:ne}),b):i.default.createElement(q,(0,e.default)({},j,{className:ne}),v)}u.handledProps=["as","avatar","bordered","centered","children","circular","className","content","dimmer","disabled","floated","fluid","hidden","href","inline","label","rounded","size","spaced","ui","verticalAlign","wrapped"],u.Group=c.default,u.propTypes={},u.defaultProps={as:"img",ui:!0},u.create=(0,a.createShorthandFactory)(u,function(h){return{src:h}});var f=u;return ry.default=f,ry}var uy={},vB;function uve(){if(vB)return uy;vB=1;var t=yr;uy.__esModule=!0,uy.default=void 0;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(o){var c=o.children,u=o.className,f=o.content,h=(0,r.default)("detail",u),m=(0,i.getUnhandledProps)(a,o),y=(0,i.getElementType)(a,o);return n.default.createElement(y,(0,e.default)({},m,{className:h}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(o){return{content:o}});var s=a;return uy.default=s,uy}var ly={},bB;function lve(){if(bB)return ly;bB=1;var t=yr;ly.__esModule=!0,ly.default=void 0;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(o){var c=o.children,u=o.circular,f=o.className,h=o.color,m=o.content,y=o.size,w=o.tag,v=(0,r.default)("ui",h,y,(0,i.useKeyOnly)(u,"circular"),(0,i.useKeyOnly)(w,"tag"),"labels",f),g=(0,i.getUnhandledProps)(a,o),_=(0,i.getElementType)(a,o);return n.default.createElement(_,(0,e.default)({},g,{className:v}),i.childrenUtils.isNil(c)?m:c)}a.handledProps=["as","children","circular","className","color","content","size","tag"],a.propTypes={};var s=a;return ly.default=s,ly}var wB;function IY(){if(wB)return ty;wB=1;var t=Ro,e=yr;ty.__esModule=!0,ty.default=void 0;var r=e(Dn()),n=e(hc()),i=e(a5()),a=e(No()),s=e(Xn);e(Rn());var o=t(Ze),c=qn(),u=e(_5()),f=e(cve()),h=e(uve()),m=e(lve()),y=function(w){(0,n.default)(v,w);function v(){for(var _,b=arguments.length,S=new Array(b),A=0;A<b;A++)S[A]=arguments[A];return _=w.call.apply(w,[this].concat(S))||this,_.handleClick=function(I){var E=_.props.onClick;E&&E(I,_.props)},_.handleIconOverrides=function(I){return{onClick:function(p){(0,a.default)(I,"onClick",p),(0,a.default)(_.props,"onRemove",p,_.props)}}},_}var g=v.prototype;return g.render=function(){var b=this.props,S=b.active,A=b.attached,I=b.basic,E=b.children,p=b.circular,O=b.className,N=b.color,F=b.content,V=b.corner,de=b.detail,ve=b.empty,U=b.floating,L=b.horizontal,Q=b.icon,ne=b.image,j=b.onRemove,B=b.pointing,H=b.prompt,M=b.removeIcon,q=b.ribbon,k=b.size,$=b.tag,G=B===!0&&"pointing"||(B==="left"||B==="right")&&B+" pointing"||(B==="above"||B==="below")&&"pointing "+B,pe=(0,s.default)("ui",N,G,k,(0,c.useKeyOnly)(S,"active"),(0,c.useKeyOnly)(I,"basic"),(0,c.useKeyOnly)(p,"circular"),(0,c.useKeyOnly)(ve,"empty"),(0,c.useKeyOnly)(U,"floating"),(0,c.useKeyOnly)(L,"horizontal"),(0,c.useKeyOnly)(ne===!0,"image"),(0,c.useKeyOnly)(H,"prompt"),(0,c.useKeyOnly)($,"tag"),(0,c.useKeyOrValueAndKey)(V,"corner"),(0,c.useKeyOrValueAndKey)(q,"ribbon"),(0,c.useValueAndKey)(A,"attached"),"label",O),Y=(0,c.getUnhandledProps)(v,this.props),te=(0,c.getElementType)(v,this.props);if(!c.childrenUtils.isNil(E))return o.default.createElement(te,(0,r.default)({},Y,{className:pe,onClick:this.handleClick}),E);var ce=(0,i.default)(M)?"delete":M;return o.default.createElement(te,(0,r.default)({className:pe,onClick:this.handleClick},Y),u.default.create(Q,{autoGenerateKey:!1}),typeof ne!="boolean"&&f.default.create(ne,{autoGenerateKey:!1}),F,h.default.create(de,{autoGenerateKey:!1}),j&&u.default.create(ce,{autoGenerateKey:!1,overrideProps:this.handleIconOverrides}))},v}(o.Component);return ty.default=y,y.handledProps=["active","as","attached","basic","children","circular","className","color","content","corner","detail","empty","floating","horizontal","icon","image","onClick","onRemove","pointing","prompt","removeIcon","ribbon","size","tag"],y.propTypes={},y.Detail=h.default,y.Group=m.default,y.create=(0,c.createShorthandFactory)(y,function(w){return{content:w}}),ty}var fy={},_B;function fve(){if(_B)return fy;_B=1;var t=yr;fy.__esModule=!0,fy.default=void 0;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(o){var c=o.children,u=o.className,f=o.content,h=o.hidden,m=o.visible,y=(0,r.default)((0,i.useKeyOnly)(m,"visible"),(0,i.useKeyOnly)(h,"hidden"),"content",u),w=(0,i.getUnhandledProps)(a,o),v=(0,i.getElementType)(a,o);return n.default.createElement(v,(0,e.default)({},w,{className:y}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content","hidden","visible"],a.propTypes={};var s=a;return fy.default=s,fy}var dy={},EB;function dve(){if(EB)return dy;EB=1;var t=yr;dy.__esModule=!0,dy.default=void 0;var e=t(Dn()),r=t(h2()),n=t(ul()),i=t(Xn);t(Rn());var a=t(Ze),s=qn(),o=t(x5());function c(f){var h=f.attached,m=f.basic,y=f.buttons,w=f.children,v=f.className,g=f.color,_=f.compact,b=f.content,S=f.floated,A=f.fluid,I=f.icon,E=f.inverted,p=f.labeled,O=f.negative,N=f.positive,F=f.primary,V=f.secondary,de=f.size,ve=f.toggle,U=f.vertical,L=f.widths,Q=(0,i.default)("ui",g,de,(0,s.useKeyOnly)(m,"basic"),(0,s.useKeyOnly)(_,"compact"),(0,s.useKeyOnly)(A,"fluid"),(0,s.useKeyOnly)(I,"icon"),(0,s.useKeyOnly)(E,"inverted"),(0,s.useKeyOnly)(p,"labeled"),(0,s.useKeyOnly)(O,"negative"),(0,s.useKeyOnly)(N,"positive"),(0,s.useKeyOnly)(F,"primary"),(0,s.useKeyOnly)(V,"secondary"),(0,s.useKeyOnly)(ve,"toggle"),(0,s.useKeyOnly)(U,"vertical"),(0,s.useKeyOrValueAndKey)(h,"attached"),(0,s.useValueAndKey)(S,"floated"),(0,s.useWidthProp)(L),"buttons",v),ne=(0,s.getUnhandledProps)(c,f),j=(0,s.getElementType)(c,f);return(0,n.default)(y)?a.default.createElement(j,(0,e.default)({},ne,{className:Q}),s.childrenUtils.isNil(w)?b:w):a.default.createElement(j,(0,e.default)({},ne,{className:Q}),(0,r.default)(y,function(B){return o.default.create(B)}))}c.handledProps=["as","attached","basic","buttons","children","className","color","compact","content","floated","fluid","icon","inverted","labeled","negative","positive","primary","secondary","size","toggle","vertical","widths"],c.propTypes={};var u=c;return dy.default=u,dy}var hy={},xB;function hve(){if(xB)return hy;xB=1;var t=yr;hy.__esModule=!0,hy.default=void 0;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(o){var c=o.className,u=o.text,f=(0,r.default)("or",c),h=(0,i.getUnhandledProps)(a,o),m=(0,i.getElementType)(a,o);return n.default.createElement(m,(0,e.default)({},h,{className:f,"data-text":u}))}a.handledProps=["as","className","text"],a.propTypes={};var s=a;return hy.default=s,hy}var AB;function x5(){if(AB)return Um;AB=1;var t=Ro,e=yr;Um.__esModule=!0,Um.default=void 0;var r=e(Dn()),n=e(hc()),i=e(No()),a=e(ul()),s=Ff,o=e(Xn);e(Rn());var c=t(Ze),u=qn(),f=e(_5()),h=e(IY()),m=e(fve()),y=e(dve()),w=e(hve()),v=function(_){(0,n.default)(b,_);function b(){for(var A,I=arguments.length,E=new Array(I),p=0;p<I;p++)E[p]=arguments[p];return A=_.call.apply(_,[this].concat(E))||this,A.ref=(0,c.createRef)(),A.computeElementType=function(){var O=A.props,N=O.attached,F=O.label;if(!(0,a.default)(N)||!(0,a.default)(F))return"div"},A.computeTabIndex=function(O){var N=A.props,F=N.disabled,V=N.tabIndex;if(!(0,a.default)(V))return V;if(F)return-1;if(O==="div")return 0},A.focus=function(O){return(0,i.default)(A.ref.current,"focus",O)},A.handleClick=function(O){var N=A.props.disabled;if(N){O.preventDefault();return}(0,i.default)(A.props,"onClick",O,A.props)},A.hasIconClass=function(){var O=A.props,N=O.labelPosition,F=O.children,V=O.content,de=O.icon;return de===!0?!0:de&&(N||u.childrenUtils.isNil(F)&&(0,a.default)(V))},A}var S=b.prototype;return S.computeButtonAriaRole=function(I){var E=this.props.role;if(!(0,a.default)(E))return E;if(I!=="button")return"button"},S.render=function(){var I=this.props,E=I.active,p=I.animated,O=I.attached,N=I.basic,F=I.children,V=I.circular,de=I.className,ve=I.color,U=I.compact,L=I.content,Q=I.disabled,ne=I.floated,j=I.fluid,B=I.icon,H=I.inverted,M=I.label,q=I.labelPosition,k=I.loading,$=I.negative,G=I.positive,pe=I.primary,Y=I.secondary,te=I.size,ce=I.toggle,T=I.type,le=(0,o.default)(ve,te,(0,u.useKeyOnly)(E,"active"),(0,u.useKeyOnly)(N,"basic"),(0,u.useKeyOnly)(V,"circular"),(0,u.useKeyOnly)(U,"compact"),(0,u.useKeyOnly)(j,"fluid"),(0,u.useKeyOnly)(this.hasIconClass(),"icon"),(0,u.useKeyOnly)(H,"inverted"),(0,u.useKeyOnly)(k,"loading"),(0,u.useKeyOnly)($,"negative"),(0,u.useKeyOnly)(G,"positive"),(0,u.useKeyOnly)(pe,"primary"),(0,u.useKeyOnly)(Y,"secondary"),(0,u.useKeyOnly)(ce,"toggle"),(0,u.useKeyOrValueAndKey)(p,"animated"),(0,u.useKeyOrValueAndKey)(O,"attached")),ze=(0,o.default)((0,u.useKeyOrValueAndKey)(q||!!M,"labeled")),et=(0,o.default)((0,u.useKeyOnly)(Q,"disabled"),(0,u.useValueAndKey)(ne,"floated")),yt=(0,u.getUnhandledProps)(b,this.props),vt=(0,u.getElementType)(b,this.props,this.computeElementType),gt=this.computeTabIndex(vt);if(!(0,a.default)(M)){var Ut=(0,o.default)("ui",le,"button",de),Xt=(0,o.default)("ui",ze,"button",de,et),Sr=h.default.create(M,{defaultProps:{basic:!0,pointing:q==="left"?"right":"left"},autoGenerateKey:!1});return c.default.createElement(vt,(0,r.default)({},yt,{className:Xt,onClick:this.handleClick}),q==="left"&&Sr,c.default.createElement(s.Ref,{innerRef:this.ref},c.default.createElement("button",{className:Ut,"aria-pressed":ce?!!E:void 0,disabled:Q,type:T,tabIndex:gt},f.default.create(B,{autoGenerateKey:!1})," ",L)),(q==="right"||!q)&&Sr)}var Ct=(0,o.default)("ui",le,et,ze,"button",de),Pt=!u.childrenUtils.isNil(F),kt=this.computeButtonAriaRole(vt);return c.default.createElement(s.Ref,{innerRef:this.ref},c.default.createElement(vt,(0,r.default)({},yt,{className:Ct,"aria-pressed":ce?!!E:void 0,disabled:Q&&vt==="button"||void 0,onClick:this.handleClick,role:kt,type:T,tabIndex:gt}),Pt&&F,!Pt&&f.default.create(B,{autoGenerateKey:!1}),!Pt&&L))},b}(c.Component);v.handledProps=["active","animated","as","attached","basic","children","circular","className","color","compact","content","disabled","floated","fluid","icon","inverted","label","labelPosition","loading","negative","onClick","positive","primary","role","secondary","size","tabIndex","toggle","type"],v.propTypes={},v.defaultProps={as:"button"},v.Content=m.default,v.Group=y.default,v.Or=w.default,v.create=(0,u.createShorthandFactory)(v,function(_){return{content:_}});var g=v;return Um.default=g,Um}(function(t){var e=ke&&ke.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;var r=x5();Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return e(r).default}})})(Ah);var Pf={},Sg={},mT={},Tt={},zR={exports:{}},OY={},Eo={},Ig={},Xg={},Ar={},Og={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(b){if(super(),!t.IDENTIFIER.test(b))throw new Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((S,A)=>`${S}${A}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((S,A)=>(A instanceof r&&(S[A.str]=(S[A.str]||0)+1),S),{})}}t._Code=n,t.nil=new n("");function i(_,...b){const S=[_[0]];let A=0;for(;A<b.length;)o(S,b[A]),S.push(_[++A]);return new n(S)}t._=i;const a=new n("+");function s(_,...b){const S=[y(_[0])];let A=0;for(;A<b.length;)S.push(a),o(S,b[A]),S.push(a,y(_[++A]));return c(S),new n(S)}t.str=s;function o(_,b){b instanceof n?_.push(...b._items):b instanceof r?_.push(b):_.push(h(b))}t.addCodeArg=o;function c(_){let b=1;for(;b<_.length-1;){if(_[b]===a){const S=u(_[b-1],_[b+1]);if(S!==void 0){_.splice(b-1,3,S);continue}_[b++]="+"}b++}}function u(_,b){if(b==='""')return _;if(_==='""')return b;if(typeof _=="string")return b instanceof r||_[_.length-1]!=='"'?void 0:typeof b!="string"?`${_.slice(0,-1)}${b}"`:b[0]==='"'?_.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(_ instanceof r))return`"${_}${b.slice(1)}`}function f(_,b){return b.emptyStr()?_:_.emptyStr()?b:s`${_}${b}`}t.strConcat=f;function h(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:y(Array.isArray(_)?_.join(","):_)}function m(_){return new n(y(_))}t.stringify=m;function y(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=y;function w(_){return typeof _=="string"&&t.IDENTIFIER.test(_)?new n(`.${_}`):i`[${_}]`}t.getProperty=w;function v(_){if(typeof _=="string"&&t.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}t.getEsmExportName=v;function g(_){return new n(_.toString())}t.regexpCode=g})(Og);var VR={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Og;class r extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class i{constructor({prefixes:u,parent:f}={}){this._names={},this._prefixes=u,this._parent=f}toName(u){return u instanceof e.Name?u:this.name(u)}name(u){return new e.Name(this._newName(u))}_newName(u){const f=this._names[u]||this._nameGroup(u);return`${u}${f.index++}`}_nameGroup(u){var f,h;if(!((h=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||h===void 0)&&h.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}t.Scope=i;class a extends e.Name{constructor(u,f){super(f),this.prefix=u}setValue(u,{property:f,itemIndex:h}){this.value=u,this.scopePath=(0,e._)`.${new e.Name(f)}[${h}]`}}t.ValueScopeName=a;const s=(0,e._)`\n`;class o extends i{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?s:e.nil}}get(){return this._scope}name(u){return new a(u,this._newName(u))}value(u,f){var h;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(u),{prefix:y}=m,w=(h=f.key)!==null&&h!==void 0?h:f.ref;let v=this._values[y];if(v){const b=v.get(w);if(b)return b}else v=this._values[y]=new Map;v.set(w,m);const g=this._scope[y]||(this._scope[y]=[]),_=g.length;return g[_]=f.ref,m.setValue(f,{property:y,itemIndex:_}),m}getValue(u,f){const h=this._values[u];if(h)return h.get(f)}scopeRefs(u,f=this._values){return this._reduceValues(f,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,e._)`${u}${h.scopePath}`})}scopeCode(u=this._values,f,h){return this._reduceValues(u,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},f,h)}_reduceValues(u,f,h={},m){let y=e.nil;for(const w in u){const v=u[w];if(!v)continue;const g=h[w]=h[w]||new Map;v.forEach(_=>{if(g.has(_))return;g.set(_,n.Started);let b=f(_);if(b){const S=this.opts.es5?t.varKinds.var:t.varKinds.const;y=(0,e._)`${y}${S} ${_} = ${b};${this.opts._n}`}else if(b=m==null?void 0:m(_))y=(0,e._)`${y}${b}${this.opts._n}`;else throw new r(_);g.set(_,n.Completed)})}return y}}t.ValueScope=o})(VR);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Og,r=VR;var n=Og;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var i=VR;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames($,G){return this}}class s extends a{constructor($,G,pe){super(),this.varKind=$,this.name=G,this.rhs=pe}render({es5:$,_n:G}){const pe=$?r.varKinds.var:this.varKind,Y=this.rhs===void 0?"":` = ${this.rhs}`;return`${pe} ${this.name}${Y};`+G}optimizeNames($,G){if($[this.name.str])return this.rhs&&(this.rhs=U(this.rhs,$,G)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends a{constructor($,G,pe){super(),this.lhs=$,this.rhs=G,this.sideEffects=pe}render({_n:$}){return`${this.lhs} = ${this.rhs};`+$}optimizeNames($,G){if(!(this.lhs instanceof e.Name&&!$[this.lhs.str]&&!this.sideEffects))return this.rhs=U(this.rhs,$,G),this}get names(){const $=this.lhs instanceof e.Name?{}:{...this.lhs.names};return ve($,this.rhs)}}class c extends o{constructor($,G,pe,Y){super($,pe,Y),this.op=G}render({_n:$}){return`${this.lhs} ${this.op}= ${this.rhs};`+$}}class u extends a{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`${this.label}:`+$}}class f extends a{constructor($){super(),this.label=$,this.names={}}render({_n:$}){return`break${this.label?` ${this.label}`:""};`+$}}class h extends a{constructor($){super(),this.error=$}render({_n:$}){return`throw ${this.error};`+$}get names(){return this.error.names}}class m extends a{constructor($){super(),this.code=$}render({_n:$}){return`${this.code};`+$}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames($,G){return this.code=U(this.code,$,G),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class y extends a{constructor($=[]){super(),this.nodes=$}render($){return this.nodes.reduce((G,pe)=>G+pe.render($),"")}optimizeNodes(){const{nodes:$}=this;let G=$.length;for(;G--;){const pe=$[G].optimizeNodes();Array.isArray(pe)?$.splice(G,1,...pe):pe?$[G]=pe:$.splice(G,1)}return $.length>0?this:void 0}optimizeNames($,G){const{nodes:pe}=this;let Y=pe.length;for(;Y--;){const te=pe[Y];te.optimizeNames($,G)||(L($,te.names),pe.splice(Y,1))}return pe.length>0?this:void 0}get names(){return this.nodes.reduce(($,G)=>de($,G.names),{})}}class w extends y{render($){return"{"+$._n+super.render($)+"}"+$._n}}class v extends y{}class g extends w{}g.kind="else";class _ extends w{constructor($,G){super(G),this.condition=$}render($){let G=`if(${this.condition})`+super.render($);return this.else&&(G+="else "+this.else.render($)),G}optimizeNodes(){super.optimizeNodes();const $=this.condition;if($===!0)return this.nodes;let G=this.else;if(G){const pe=G.optimizeNodes();G=this.else=Array.isArray(pe)?new g(pe):pe}if(G)return $===!1?G instanceof _?G:G.nodes:this.nodes.length?this:new _(Q($),G instanceof _?[G]:G.nodes);if(!($===!1||!this.nodes.length))return this}optimizeNames($,G){var pe;if(this.else=(pe=this.else)===null||pe===void 0?void 0:pe.optimizeNames($,G),!!(super.optimizeNames($,G)||this.else))return this.condition=U(this.condition,$,G),this}get names(){const $=super.names;return ve($,this.condition),this.else&&de($,this.else.names),$}}_.kind="if";class b extends w{}b.kind="for";class S extends b{constructor($){super(),this.iteration=$}render($){return`for(${this.iteration})`+super.render($)}optimizeNames($,G){if(super.optimizeNames($,G))return this.iteration=U(this.iteration,$,G),this}get names(){return de(super.names,this.iteration.names)}}class A extends b{constructor($,G,pe,Y){super(),this.varKind=$,this.name=G,this.from=pe,this.to=Y}render($){const G=$.es5?r.varKinds.var:this.varKind,{name:pe,from:Y,to:te}=this;return`for(${G} ${pe}=${Y}; ${pe}<${te}; ${pe}++)`+super.render($)}get names(){const $=ve(super.names,this.from);return ve($,this.to)}}class I extends b{constructor($,G,pe,Y){super(),this.loop=$,this.varKind=G,this.name=pe,this.iterable=Y}render($){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render($)}optimizeNames($,G){if(super.optimizeNames($,G))return this.iterable=U(this.iterable,$,G),this}get names(){return de(super.names,this.iterable.names)}}class E extends w{constructor($,G,pe){super(),this.name=$,this.args=G,this.async=pe}render($){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render($)}}E.kind="func";class p extends y{render($){return"return "+super.render($)}}p.kind="return";class O extends w{render($){let G="try"+super.render($);return this.catch&&(G+=this.catch.render($)),this.finally&&(G+=this.finally.render($)),G}optimizeNodes(){var $,G;return super.optimizeNodes(),($=this.catch)===null||$===void 0||$.optimizeNodes(),(G=this.finally)===null||G===void 0||G.optimizeNodes(),this}optimizeNames($,G){var pe,Y;return super.optimizeNames($,G),(pe=this.catch)===null||pe===void 0||pe.optimizeNames($,G),(Y=this.finally)===null||Y===void 0||Y.optimizeNames($,G),this}get names(){const $=super.names;return this.catch&&de($,this.catch.names),this.finally&&de($,this.finally.names),$}}class N extends w{constructor($){super(),this.error=$}render($){return`catch(${this.error})`+super.render($)}}N.kind="catch";class F extends w{render($){return"finally"+super.render($)}}F.kind="finally";class V{constructor($,G={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...G,_n:G.lines?`
95
+ `:""},this._extScope=$,this._scope=new r.Scope({parent:$}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name($){return this._scope.name($)}scopeName($){return this._extScope.name($)}scopeValue($,G){const pe=this._extScope.value($,G);return(this._values[pe.prefix]||(this._values[pe.prefix]=new Set)).add(pe),pe}getScopeValue($,G){return this._extScope.getValue($,G)}scopeRefs($){return this._extScope.scopeRefs($,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def($,G,pe,Y){const te=this._scope.toName(G);return pe!==void 0&&Y&&(this._constants[te.str]=pe),this._leafNode(new s($,te,pe)),te}const($,G,pe){return this._def(r.varKinds.const,$,G,pe)}let($,G,pe){return this._def(r.varKinds.let,$,G,pe)}var($,G,pe){return this._def(r.varKinds.var,$,G,pe)}assign($,G,pe){return this._leafNode(new o($,G,pe))}add($,G){return this._leafNode(new c($,t.operators.ADD,G))}code($){return typeof $=="function"?$():$!==e.nil&&this._leafNode(new m($)),this}object(...$){const G=["{"];for(const[pe,Y]of $)G.length>1&&G.push(","),G.push(pe),(pe!==Y||this.opts.es5)&&(G.push(":"),(0,e.addCodeArg)(G,Y));return G.push("}"),new e._Code(G)}if($,G,pe){if(this._blockNode(new _($)),G&&pe)this.code(G).else().code(pe).endIf();else if(G)this.code(G).endIf();else if(pe)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf($){return this._elseNode(new _($))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for($,G){return this._blockNode($),G&&this.code(G).endFor(),this}for($,G){return this._for(new S($),G)}forRange($,G,pe,Y,te=this.opts.es5?r.varKinds.var:r.varKinds.let){const ce=this._scope.toName($);return this._for(new A(te,ce,G,pe),()=>Y(ce))}forOf($,G,pe,Y=r.varKinds.const){const te=this._scope.toName($);if(this.opts.es5){const ce=G instanceof e.Name?G:this.var("_arr",G);return this.forRange("_i",0,(0,e._)`${ce}.length`,T=>{this.var(te,(0,e._)`${ce}[${T}]`),pe(te)})}return this._for(new I("of",Y,te,G),()=>pe(te))}forIn($,G,pe,Y=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf($,(0,e._)`Object.keys(${G})`,pe);const te=this._scope.toName($);return this._for(new I("in",Y,te,G),()=>pe(te))}endFor(){return this._endBlockNode(b)}label($){return this._leafNode(new u($))}break($){return this._leafNode(new f($))}return($){const G=new p;if(this._blockNode(G),this.code($),G.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(p)}try($,G,pe){if(!G&&!pe)throw new Error('CodeGen: "try" without "catch" and "finally"');const Y=new O;if(this._blockNode(Y),this.code($),G){const te=this.name("e");this._currNode=Y.catch=new N(te),G(te)}return pe&&(this._currNode=Y.finally=new F,this.code(pe)),this._endBlockNode(N,F)}throw($){return this._leafNode(new h($))}block($,G){return this._blockStarts.push(this._nodes.length),$&&this.code($).endBlock(G),this}endBlock($){const G=this._blockStarts.pop();if(G===void 0)throw new Error("CodeGen: not in self-balancing block");const pe=this._nodes.length-G;if(pe<0||$!==void 0&&pe!==$)throw new Error(`CodeGen: wrong number of nodes: ${pe} vs ${$} expected`);return this._nodes.length=G,this}func($,G=e.nil,pe,Y){return this._blockNode(new E($,G,pe)),Y&&this.code(Y).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize($=1){for(;$-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode($){return this._currNode.nodes.push($),this}_blockNode($){this._currNode.nodes.push($),this._nodes.push($)}_endBlockNode($,G){const pe=this._currNode;if(pe instanceof $||G&&pe instanceof G)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${G?`${$.kind}/${G.kind}`:$.kind}"`)}_elseNode($){const G=this._currNode;if(!(G instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=G.else=$,this}get _root(){return this._nodes[0]}get _currNode(){const $=this._nodes;return $[$.length-1]}set _currNode($){const G=this._nodes;G[G.length-1]=$}}t.CodeGen=V;function de(k,$){for(const G in $)k[G]=(k[G]||0)+($[G]||0);return k}function ve(k,$){return $ instanceof e._CodeOrName?de(k,$.names):k}function U(k,$,G){if(k instanceof e.Name)return pe(k);if(!Y(k))return k;return new e._Code(k._items.reduce((te,ce)=>(ce instanceof e.Name&&(ce=pe(ce)),ce instanceof e._Code?te.push(...ce._items):te.push(ce),te),[]));function pe(te){const ce=G[te.str];return ce===void 0||$[te.str]!==1?te:(delete $[te.str],ce)}function Y(te){return te instanceof e._Code&&te._items.some(ce=>ce instanceof e.Name&&$[ce.str]===1&&G[ce.str]!==void 0)}}function L(k,$){for(const G in $)k[G]=(k[G]||0)-($[G]||0)}function Q(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,e._)`!${q(k)}`}t.not=Q;const ne=M(t.operators.AND);function j(...k){return k.reduce(ne)}t.and=j;const B=M(t.operators.OR);function H(...k){return k.reduce(B)}t.or=H;function M(k){return($,G)=>$===e.nil?G:G===e.nil?$:(0,e._)`${q($)} ${k} ${q(G)}`}function q(k){return k instanceof e.Name?k:(0,e._)`(${k})`}})(Ar);var ln={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const e=Ar,r=Og;function n(E){const p={};for(const O of E)p[O]=!0;return p}t.toHash=n;function i(E,p){return typeof p=="boolean"?p:Object.keys(p).length===0?!0:(a(E,p),!s(p,E.self.RULES.all))}t.alwaysValidSchema=i;function a(E,p=E.schema){const{opts:O,self:N}=E;if(!O.strictSchema||typeof p=="boolean")return;const F=N.RULES.keywords;for(const V in p)F[V]||I(E,`unknown keyword: "${V}"`)}t.checkUnknownRules=a;function s(E,p){if(typeof E=="boolean")return!E;for(const O in E)if(p[O])return!0;return!1}t.schemaHasRules=s;function o(E,p){if(typeof E=="boolean")return!E;for(const O in E)if(O!=="$ref"&&p.all[O])return!0;return!1}t.schemaHasRulesButRef=o;function c({topSchemaRef:E,schemaPath:p},O,N,F){if(!F){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${E}${p}${(0,e.getProperty)(N)}`}t.schemaRefOrVal=c;function u(E){return m(decodeURIComponent(E))}t.unescapeFragment=u;function f(E){return encodeURIComponent(h(E))}t.escapeFragment=f;function h(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=h;function m(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=m;function y(E,p){if(Array.isArray(E))for(const O of E)p(O);else p(E)}t.eachItem=y;function w({mergeNames:E,mergeToName:p,mergeValues:O,resultToName:N}){return(F,V,de,ve)=>{const U=de===void 0?V:de instanceof e.Name?(V instanceof e.Name?E(F,V,de):p(F,V,de),de):V instanceof e.Name?(p(F,de,V),V):O(V,de);return ve===e.Name&&!(U instanceof e.Name)?N(F,U):U}}t.mergeEvaluated={props:w({mergeNames:(E,p,O)=>E.if((0,e._)`${O} !== true && ${p} !== undefined`,()=>{E.if((0,e._)`${p} === true`,()=>E.assign(O,!0),()=>E.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${p})`))}),mergeToName:(E,p,O)=>E.if((0,e._)`${O} !== true`,()=>{p===!0?E.assign(O,!0):(E.assign(O,(0,e._)`${O} || {}`),g(E,O,p))}),mergeValues:(E,p)=>E===!0?!0:{...E,...p},resultToName:v}),items:w({mergeNames:(E,p,O)=>E.if((0,e._)`${O} !== true && ${p} !== undefined`,()=>E.assign(O,(0,e._)`${p} === true ? true : ${O} > ${p} ? ${O} : ${p}`)),mergeToName:(E,p,O)=>E.if((0,e._)`${O} !== true`,()=>E.assign(O,p===!0?!0:(0,e._)`${O} > ${p} ? ${O} : ${p}`)),mergeValues:(E,p)=>E===!0?!0:Math.max(E,p),resultToName:(E,p)=>E.var("items",p)})};function v(E,p){if(p===!0)return E.var("props",!0);const O=E.var("props",(0,e._)`{}`);return p!==void 0&&g(E,O,p),O}t.evaluatedPropsToName=v;function g(E,p,O){Object.keys(O).forEach(N=>E.assign((0,e._)`${p}${(0,e.getProperty)(N)}`,!0))}t.setEvaluated=g;const _={};function b(E,p){return E.scopeValue("func",{ref:p,code:_[p.code]||(_[p.code]=new r._Code(p.code))})}t.useFunc=b;var S;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(S=t.Type||(t.Type={}));function A(E,p,O){if(E instanceof e.Name){const N=p===S.Num;return O?N?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:N?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(E).toString():"/"+h(E)}t.getErrorPath=A;function I(E,p,O=E.opts.strictSchema){if(O){if(p=`strict mode: ${p}`,O===!0)throw new Error(p);E.self.logger.warn(p)}}t.checkStrictMode=I})(ln);var gc={};Object.defineProperty(gc,"__esModule",{value:!0});const ga=Ar,pve={data:new ga.Name("data"),valCxt:new ga.Name("valCxt"),instancePath:new ga.Name("instancePath"),parentData:new ga.Name("parentData"),parentDataProperty:new ga.Name("parentDataProperty"),rootData:new ga.Name("rootData"),dynamicAnchors:new ga.Name("dynamicAnchors"),vErrors:new ga.Name("vErrors"),errors:new ga.Name("errors"),this:new ga.Name("this"),self:new ga.Name("self"),scope:new ga.Name("scope"),json:new ga.Name("json"),jsonPos:new ga.Name("jsonPos"),jsonLen:new ga.Name("jsonLen"),jsonPart:new ga.Name("jsonPart")};gc.default=pve;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=Ar,r=ln,n=gc;t.keywordError={message:({keyword:g})=>(0,e.str)`must pass "${g}" keyword validation`},t.keyword$DataError={message:({keyword:g,schemaType:_})=>_?(0,e.str)`"${g}" keyword must be ${_} ($data)`:(0,e.str)`"${g}" keyword is invalid ($data)`};function i(g,_=t.keywordError,b,S){const{it:A}=g,{gen:I,compositeRule:E,allErrors:p}=A,O=h(g,_,b);S??(E||p)?c(I,O):u(A,(0,e._)`[${O}]`)}t.reportError=i;function a(g,_=t.keywordError,b){const{it:S}=g,{gen:A,compositeRule:I,allErrors:E}=S,p=h(g,_,b);c(A,p),I||E||u(S,n.default.vErrors)}t.reportExtraError=a;function s(g,_){g.assign(n.default.errors,_),g.if((0,e._)`${n.default.vErrors} !== null`,()=>g.if(_,()=>g.assign((0,e._)`${n.default.vErrors}.length`,_),()=>g.assign(n.default.vErrors,null)))}t.resetErrorsCount=s;function o({gen:g,keyword:_,schemaValue:b,data:S,errsCount:A,it:I}){if(A===void 0)throw new Error("ajv implementation error");const E=g.name("err");g.forRange("i",A,n.default.errors,p=>{g.const(E,(0,e._)`${n.default.vErrors}[${p}]`),g.if((0,e._)`${E}.instancePath === undefined`,()=>g.assign((0,e._)`${E}.instancePath`,(0,e.strConcat)(n.default.instancePath,I.errorPath))),g.assign((0,e._)`${E}.schemaPath`,(0,e.str)`${I.errSchemaPath}/${_}`),I.opts.verbose&&(g.assign((0,e._)`${E}.schema`,b),g.assign((0,e._)`${E}.data`,S))})}t.extendErrors=o;function c(g,_){const b=g.const("err",_);g.if((0,e._)`${n.default.vErrors} === null`,()=>g.assign(n.default.vErrors,(0,e._)`[${b}]`),(0,e._)`${n.default.vErrors}.push(${b})`),g.code((0,e._)`${n.default.errors}++`)}function u(g,_){const{gen:b,validateName:S,schemaEnv:A}=g;A.$async?b.throw((0,e._)`new ${g.ValidationError}(${_})`):(b.assign((0,e._)`${S}.errors`,_),b.return(!1))}const f={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function h(g,_,b){const{createErrors:S}=g.it;return S===!1?(0,e._)`{}`:m(g,_,b)}function m(g,_,b={}){const{gen:S,it:A}=g,I=[y(A,b),w(g,b)];return v(g,_,I),S.object(...I)}function y({errorPath:g},{instancePath:_}){const b=_?(0,e.str)`${g}${(0,r.getErrorPath)(_,r.Type.Str)}`:g;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,b)]}function w({keyword:g,it:{errSchemaPath:_}},{schemaPath:b,parentSchema:S}){let A=S?_:(0,e.str)`${_}/${g}`;return b&&(A=(0,e.str)`${A}${(0,r.getErrorPath)(b,r.Type.Str)}`),[f.schemaPath,A]}function v(g,{params:_,message:b},S){const{keyword:A,data:I,schemaValue:E,it:p}=g,{opts:O,propertyName:N,topSchemaRef:F,schemaPath:V}=p;S.push([f.keyword,A],[f.params,typeof _=="function"?_(g):_||(0,e._)`{}`]),O.messages&&S.push([f.message,typeof b=="function"?b(g):b]),O.verbose&&S.push([f.schema,E],[f.parentSchema,(0,e._)`${F}${V}`],[n.default.data,I]),N&&S.push([f.propertyName,N])}})(Xg);Object.defineProperty(Ig,"__esModule",{value:!0});Ig.boolOrEmptySchema=Ig.topBoolOrEmptySchema=void 0;const gve=Xg,mve=Ar,yve=gc,vve={message:"boolean schema is false"};function bve(t){const{gen:e,schema:r,validateName:n}=t;r===!1?PY(t,!1):typeof r=="object"&&r.$async===!0?e.return(yve.default.data):(e.assign((0,mve._)`${n}.errors`,null),e.return(!0))}Ig.topBoolOrEmptySchema=bve;function wve(t,e){const{gen:r,schema:n}=t;n===!1?(r.var(e,!1),PY(t)):r.var(e,!0)}Ig.boolOrEmptySchema=wve;function PY(t,e){const{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,gve.reportError)(i,vve,void 0,e)}var f1={},Sh={};Object.defineProperty(Sh,"__esModule",{value:!0});Sh.getRules=Sh.isJSONType=void 0;const _ve=["string","number","integer","boolean","null","object","array"],Eve=new Set(_ve);function xve(t){return typeof t=="string"&&Eve.has(t)}Sh.isJSONType=xve;function Ave(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Sh.getRules=Ave;var Qu={};Object.defineProperty(Qu,"__esModule",{value:!0});Qu.shouldUseRule=Qu.shouldUseGroup=Qu.schemaHasRulesForType=void 0;function Sve({schema:t,self:e},r){const n=e.RULES.types[r];return n&&n!==!0&&TY(t,n)}Qu.schemaHasRulesForType=Sve;function TY(t,e){return e.rules.some(r=>CY(t,r))}Qu.shouldUseGroup=TY;function CY(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Qu.shouldUseRule=CY;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const e=Sh,r=Qu,n=Xg,i=Ar,a=ln;var s;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(s=t.DataType||(t.DataType={}));function o(S){const A=c(S.type);if(A.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!A.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&A.push("null")}return A}t.getSchemaTypes=o;function c(S){const A=Array.isArray(S)?S:S?[S]:[];if(A.every(e.isJSONType))return A;throw new Error("type must be JSONType or JSONType[]: "+A.join(","))}t.getJSONTypes=c;function u(S,A){const{gen:I,data:E,opts:p}=S,O=h(A,p.coerceTypes),N=A.length>0&&!(O.length===0&&A.length===1&&(0,r.schemaHasRulesForType)(S,A[0]));if(N){const F=v(A,E,p.strictNumbers,s.Wrong);I.if(F,()=>{O.length?m(S,A,O):_(S)})}return N}t.coerceAndCheckDataType=u;const f=new Set(["string","number","integer","boolean","null"]);function h(S,A){return A?S.filter(I=>f.has(I)||A==="array"&&I==="array"):[]}function m(S,A,I){const{gen:E,data:p,opts:O}=S,N=E.let("dataType",(0,i._)`typeof ${p}`),F=E.let("coerced",(0,i._)`undefined`);O.coerceTypes==="array"&&E.if((0,i._)`${N} == 'object' && Array.isArray(${p}) && ${p}.length == 1`,()=>E.assign(p,(0,i._)`${p}[0]`).assign(N,(0,i._)`typeof ${p}`).if(v(A,p,O.strictNumbers),()=>E.assign(F,p))),E.if((0,i._)`${F} !== undefined`);for(const de of I)(f.has(de)||de==="array"&&O.coerceTypes==="array")&&V(de);E.else(),_(S),E.endIf(),E.if((0,i._)`${F} !== undefined`,()=>{E.assign(p,F),y(S,F)});function V(de){switch(de){case"string":E.elseIf((0,i._)`${N} == "number" || ${N} == "boolean"`).assign(F,(0,i._)`"" + ${p}`).elseIf((0,i._)`${p} === null`).assign(F,(0,i._)`""`);return;case"number":E.elseIf((0,i._)`${N} == "boolean" || ${p} === null
96
+ || (${N} == "string" && ${p} && ${p} == +${p})`).assign(F,(0,i._)`+${p}`);return;case"integer":E.elseIf((0,i._)`${N} === "boolean" || ${p} === null
97
+ || (${N} === "string" && ${p} && ${p} == +${p} && !(${p} % 1))`).assign(F,(0,i._)`+${p}`);return;case"boolean":E.elseIf((0,i._)`${p} === "false" || ${p} === 0 || ${p} === null`).assign(F,!1).elseIf((0,i._)`${p} === "true" || ${p} === 1`).assign(F,!0);return;case"null":E.elseIf((0,i._)`${p} === "" || ${p} === 0 || ${p} === false`),E.assign(F,null);return;case"array":E.elseIf((0,i._)`${N} === "string" || ${N} === "number"
98
+ || ${N} === "boolean" || ${p} === null`).assign(F,(0,i._)`[${p}]`)}}}function y({gen:S,parentData:A,parentDataProperty:I},E){S.if((0,i._)`${A} !== undefined`,()=>S.assign((0,i._)`${A}[${I}]`,E))}function w(S,A,I,E=s.Correct){const p=E===s.Correct?i.operators.EQ:i.operators.NEQ;let O;switch(S){case"null":return(0,i._)`${A} ${p} null`;case"array":O=(0,i._)`Array.isArray(${A})`;break;case"object":O=(0,i._)`${A} && typeof ${A} == "object" && !Array.isArray(${A})`;break;case"integer":O=N((0,i._)`!(${A} % 1) && !isNaN(${A})`);break;case"number":O=N();break;default:return(0,i._)`typeof ${A} ${p} ${S}`}return E===s.Correct?O:(0,i.not)(O);function N(F=i.nil){return(0,i.and)((0,i._)`typeof ${A} == "number"`,F,I?(0,i._)`isFinite(${A})`:i.nil)}}t.checkDataType=w;function v(S,A,I,E){if(S.length===1)return w(S[0],A,I,E);let p;const O=(0,a.toHash)(S);if(O.array&&O.object){const N=(0,i._)`typeof ${A} != "object"`;p=O.null?N:(0,i._)`!${A} || ${N}`,delete O.null,delete O.array,delete O.object}else p=i.nil;O.number&&delete O.integer;for(const N in O)p=(0,i.and)(p,w(N,A,I,E));return p}t.checkDataTypes=v;const g={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:A})=>typeof S=="string"?(0,i._)`{type: ${S}}`:(0,i._)`{type: ${A}}`};function _(S){const A=b(S);(0,n.reportError)(A,g)}t.reportTypeError=_;function b(S){const{gen:A,data:I,schema:E}=S,p=(0,a.schemaRefOrVal)(S,E,"type");return{gen:A,keyword:"type",data:I,schema:E.type,schemaCode:p,schemaValue:p,parentSchema:E,params:{},it:S}}})(f1);var p2={};Object.defineProperty(p2,"__esModule",{value:!0});p2.assignDefaults=void 0;const Ep=Ar,Ive=ln;function Ove(t,e){const{properties:r,items:n}=t.schema;if(e==="object"&&r)for(const i in r)SB(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,a)=>SB(t,a,i.default))}p2.assignDefaults=Ove;function SB(t,e,r){const{gen:n,compositeRule:i,data:a,opts:s}=t;if(r===void 0)return;const o=(0,Ep._)`${a}${(0,Ep.getProperty)(e)}`;if(i){(0,Ive.checkStrictMode)(t,`default is ignored for: ${o}`);return}let c=(0,Ep._)`${o} === undefined`;s.useDefaults==="empty"&&(c=(0,Ep._)`${c} || ${o} === null || ${o} === ""`),n.if(c,(0,Ep._)`${o} = ${(0,Ep.stringify)(r)}`)}var Bc={},Gr={};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.validateUnion=Gr.validateArray=Gr.usePattern=Gr.callValidateCode=Gr.schemaProperties=Gr.allSchemaProperties=Gr.noPropertyInData=Gr.propertyInData=Gr.isOwnProperty=Gr.hasPropFunc=Gr.reportMissingProp=Gr.checkMissingProp=Gr.checkReportMissingProp=void 0;const Vn=Ar,A5=ln,Tl=gc,Pve=ln;function Tve(t,e){const{gen:r,data:n,it:i}=t;r.if(I5(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Vn._)`${e}`},!0),t.error()})}Gr.checkReportMissingProp=Tve;function Cve({gen:t,data:e,it:{opts:r}},n,i){return(0,Vn.or)(...n.map(a=>(0,Vn.and)(I5(t,e,a,r.ownProperties),(0,Vn._)`${i} = ${a}`)))}Gr.checkMissingProp=Cve;function Rve(t,e){t.setParams({missingProperty:e},!0),t.error()}Gr.reportMissingProp=Rve;function RY(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Vn._)`Object.prototype.hasOwnProperty`})}Gr.hasPropFunc=RY;function S5(t,e,r){return(0,Vn._)`${RY(t)}.call(${e}, ${r})`}Gr.isOwnProperty=S5;function Nve(t,e,r,n){const i=(0,Vn._)`${e}${(0,Vn.getProperty)(r)} !== undefined`;return n?(0,Vn._)`${i} && ${S5(t,e,r)}`:i}Gr.propertyInData=Nve;function I5(t,e,r,n){const i=(0,Vn._)`${e}${(0,Vn.getProperty)(r)} === undefined`;return n?(0,Vn.or)(i,(0,Vn.not)(S5(t,e,r))):i}Gr.noPropertyInData=I5;function NY(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Gr.allSchemaProperties=NY;function Dve(t,e){return NY(e).filter(r=>!(0,A5.alwaysValidSchema)(t,e[r]))}Gr.schemaProperties=Dve;function Mve({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:s},o,c,u){const f=u?(0,Vn._)`${t}, ${e}, ${n}${i}`:e,h=[[Tl.default.instancePath,(0,Vn.strConcat)(Tl.default.instancePath,a)],[Tl.default.parentData,s.parentData],[Tl.default.parentDataProperty,s.parentDataProperty],[Tl.default.rootData,Tl.default.rootData]];s.opts.dynamicRef&&h.push([Tl.default.dynamicAnchors,Tl.default.dynamicAnchors]);const m=(0,Vn._)`${f}, ${r.object(...h)}`;return c!==Vn.nil?(0,Vn._)`${o}.call(${c}, ${m})`:(0,Vn._)`${o}(${m})`}Gr.callValidateCode=Mve;const $ve=(0,Vn._)`new RegExp`;function kve({gen:t,it:{opts:e}},r){const n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,a=i(r,n);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Vn._)`${i.code==="new RegExp"?$ve:(0,Pve.useFunc)(t,i)}(${r}, ${n})`})}Gr.usePattern=kve;function Lve(t){const{gen:e,data:r,keyword:n,it:i}=t,a=e.name("valid");if(i.allErrors){const o=e.let("valid",!0);return s(()=>e.assign(o,!1)),o}return e.var(a,!0),s(()=>e.break()),a;function s(o){const c=e.const("len",(0,Vn._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:A5.Type.Num},a),e.if((0,Vn.not)(a),o)})}}Gr.validateArray=Lve;function jve(t){const{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,A5.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;const s=e.let("valid",!1),o=e.name("_valid");e.block(()=>r.forEach((c,u)=>{const f=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},o);e.assign(s,(0,Vn._)`${s} || ${o}`),t.mergeValidEvaluated(f,o)||e.if((0,Vn.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}Gr.validateUnion=jve;Object.defineProperty(Bc,"__esModule",{value:!0});Bc.validateKeywordUsage=Bc.validSchemaType=Bc.funcKeywordCode=Bc.macroKeywordCode=void 0;const Fa=Ar,Od=gc,Uve=Gr,Fve=Xg;function Bve(t,e){const{gen:r,keyword:n,schema:i,parentSchema:a,it:s}=t,o=e.macro.call(s.self,i,a,s),c=DY(r,n,o);s.opts.validateSchema!==!1&&s.self.validateSchema(o,!0);const u=r.name("valid");t.subschema({schema:o,schemaPath:Fa.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Bc.macroKeywordCode=Bve;function qve(t,e){var r;const{gen:n,keyword:i,schema:a,parentSchema:s,$data:o,it:c}=t;zve(c,e);const u=!o&&e.compile?e.compile.call(c.self,a,s,c):e.validate,f=DY(n,i,u),h=n.let("valid");t.block$data(h,m),t.ok((r=e.valid)!==null&&r!==void 0?r:h);function m(){if(e.errors===!1)v(),e.modifying&&IB(t),g(()=>t.error());else{const _=e.async?y():w();e.modifying&&IB(t),g(()=>Hve(t,_))}}function y(){const _=n.let("ruleErrs",null);return n.try(()=>v((0,Fa._)`await `),b=>n.assign(h,!1).if((0,Fa._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(_,(0,Fa._)`${b}.errors`),()=>n.throw(b))),_}function w(){const _=(0,Fa._)`${f}.errors`;return n.assign(_,null),v(Fa.nil),_}function v(_=e.async?(0,Fa._)`await `:Fa.nil){const b=c.opts.passContext?Od.default.this:Od.default.self,S=!("compile"in e&&!o||e.schema===!1);n.assign(h,(0,Fa._)`${_}${(0,Uve.callValidateCode)(t,f,b,S)}`,e.modifying)}function g(_){var b;n.if((0,Fa.not)((b=e.valid)!==null&&b!==void 0?b:h),_)}}Bc.funcKeywordCode=qve;function IB(t){const{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Fa._)`${n.parentData}[${n.parentDataProperty}]`))}function Hve(t,e){const{gen:r}=t;r.if((0,Fa._)`Array.isArray(${e})`,()=>{r.assign(Od.default.vErrors,(0,Fa._)`${Od.default.vErrors} === null ? ${e} : ${Od.default.vErrors}.concat(${e})`).assign(Od.default.errors,(0,Fa._)`${Od.default.vErrors}.length`),(0,Fve.extendErrors)(t)},()=>t.error())}function zve({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function DY(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Fa.stringify)(r)})}function Vve(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Bc.validSchemaType=Vve;function Gve({schema:t,opts:e,self:r,errSchemaPath:n},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");const s=i.dependencies;if(s!=null&&s.some(o=>!Object.prototype.hasOwnProperty.call(t,o)))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[a])){const c=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Bc.validateKeywordUsage=Gve;var _f={};Object.defineProperty(_f,"__esModule",{value:!0});_f.extendSubschemaMode=_f.extendSubschemaData=_f.getSubschema=void 0;const Lc=Ar,MY=ln;function Kve(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:s}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const o=t.schema[e];return r===void 0?{schema:o,schemaPath:(0,Lc._)`${t.schemaPath}${(0,Lc.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[r],schemaPath:(0,Lc._)`${t.schemaPath}${(0,Lc.getProperty)(e)}${(0,Lc.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,MY.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:s,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}_f.getSubschema=Kve;function Wve(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:o}=e;if(r!==void 0){const{errorPath:u,dataPathArr:f,opts:h}=e,m=o.let("data",(0,Lc._)`${e.data}${(0,Lc.getProperty)(r)}`,!0);c(m),t.errorPath=(0,Lc.str)`${u}${(0,MY.getErrorPath)(r,n,h.jsPropertySyntax)}`,t.parentDataProperty=(0,Lc._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){const u=i instanceof Lc.Name?i:o.let("data",i,!0);c(u),s!==void 0&&(t.propertyName=s)}a&&(t.dataTypes=a);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}_f.extendSubschemaData=Wve;function Qve(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}_f.extendSubschemaMode=Qve;var ia={},O5=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var s=a[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r},$Y={exports:{}},uf=$Y.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};M_(e,n,i,t,"",t)};uf.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};uf.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};uf.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};uf.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function M_(t,e,r,n,i,a,s,o,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,a,s,o,c,u);for(var f in n){var h=n[f];if(Array.isArray(h)){if(f in uf.arrayKeywords)for(var m=0;m<h.length;m++)M_(t,e,r,h[m],i+"/"+f+"/"+m,a,i,f,n,m)}else if(f in uf.propsKeywords){if(h&&typeof h=="object")for(var y in h)M_(t,e,r,h[y],i+"/"+f+"/"+Yve(y),a,i,f,n,y)}else(f in uf.keywords||t.allKeys&&!(f in uf.skipKeywords))&&M_(t,e,r,h,i+"/"+f,a,i,f,n)}r(n,i,a,s,o,c,u)}}function Yve(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var Jve=$Y.exports;Object.defineProperty(ia,"__esModule",{value:!0});ia.getSchemaRefs=ia.resolveUrl=ia.normalizeId=ia._getFullPath=ia.getFullPath=ia.inlineRef=void 0;const Xve=ln,Zve=O5,ebe=Jve,tbe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function rbe(t,e=!0){return typeof t=="boolean"?!0:e===!0?!GR(t):e?kY(t)<=e:!1}ia.inlineRef=rbe;const nbe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function GR(t){for(const e in t){if(nbe.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(GR)||typeof r=="object"&&GR(r))return!0}return!1}function kY(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!tbe.has(r)&&(typeof t[r]=="object"&&(0,Xve.eachItem)(t[r],n=>e+=kY(n)),e===1/0))return 1/0}return e}function LY(t,e="",r){r!==!1&&(e=p0(e));const n=t.parse(e);return jY(t,n)}ia.getFullPath=LY;function jY(t,e){return t.serialize(e).split("#")[0]+"#"}ia._getFullPath=jY;const ibe=/#\/?$/;function p0(t){return t?t.replace(ibe,""):""}ia.normalizeId=p0;function abe(t,e,r){return r=p0(r),t.resolve(e,r)}ia.resolveUrl=abe;const sbe=/^[a-z_][-a-z0-9._]*$/i;function obe(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,i=p0(t[r]||e),a={"":i},s=LY(n,i,!1),o={},c=new Set;return ebe(t,{allKeys:!0},(h,m,y,w)=>{if(w===void 0)return;const v=s+m;let g=a[w];typeof h[r]=="string"&&(g=_.call(this,h[r])),b.call(this,h.$anchor),b.call(this,h.$dynamicAnchor),a[m]=g;function _(S){const A=this.opts.uriResolver.resolve;if(S=p0(g?A(g,S):S),c.has(S))throw f(S);c.add(S);let I=this.refs[S];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?u(h,I.schema,S):S!==p0(v)&&(S[0]==="#"?(u(h,o[S],S),o[S]=h):this.refs[S]=v),S}function b(S){if(typeof S=="string"){if(!sbe.test(S))throw new Error(`invalid anchor "${S}"`);_.call(this,`#${S}`)}}}),o;function u(h,m,y){if(m!==void 0&&!Zve(h,m))throw f(y)}function f(h){return new Error(`reference "${h}" resolves to more than one schema`)}}ia.getSchemaRefs=obe;Object.defineProperty(Eo,"__esModule",{value:!0});Eo.getData=Eo.KeywordCxt=Eo.validateFunctionCode=void 0;const UY=Ig,OB=f1,P5=Qu,DE=f1,cbe=p2,xv=Bc,yT=_f,Zt=Ar,Er=gc,ube=ia,Yu=ln,py=Xg;function lbe(t){if(qY(t)&&(HY(t),BY(t))){hbe(t);return}FY(t,()=>(0,UY.topBoolOrEmptySchema)(t))}Eo.validateFunctionCode=lbe;function FY({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},a){i.code.es5?t.func(e,(0,Zt._)`${Er.default.data}, ${Er.default.valCxt}`,n.$async,()=>{t.code((0,Zt._)`"use strict"; ${PB(r,i)}`),dbe(t,i),t.code(a)}):t.func(e,(0,Zt._)`${Er.default.data}, ${fbe(i)}`,n.$async,()=>t.code(PB(r,i)).code(a))}function fbe(t){return(0,Zt._)`{${Er.default.instancePath}="", ${Er.default.parentData}, ${Er.default.parentDataProperty}, ${Er.default.rootData}=${Er.default.data}${t.dynamicRef?(0,Zt._)`, ${Er.default.dynamicAnchors}={}`:Zt.nil}}={}`}function dbe(t,e){t.if(Er.default.valCxt,()=>{t.var(Er.default.instancePath,(0,Zt._)`${Er.default.valCxt}.${Er.default.instancePath}`),t.var(Er.default.parentData,(0,Zt._)`${Er.default.valCxt}.${Er.default.parentData}`),t.var(Er.default.parentDataProperty,(0,Zt._)`${Er.default.valCxt}.${Er.default.parentDataProperty}`),t.var(Er.default.rootData,(0,Zt._)`${Er.default.valCxt}.${Er.default.rootData}`),e.dynamicRef&&t.var(Er.default.dynamicAnchors,(0,Zt._)`${Er.default.valCxt}.${Er.default.dynamicAnchors}`)},()=>{t.var(Er.default.instancePath,(0,Zt._)`""`),t.var(Er.default.parentData,(0,Zt._)`undefined`),t.var(Er.default.parentDataProperty,(0,Zt._)`undefined`),t.var(Er.default.rootData,Er.default.data),e.dynamicRef&&t.var(Er.default.dynamicAnchors,(0,Zt._)`{}`)})}function hbe(t){const{schema:e,opts:r,gen:n}=t;FY(t,()=>{r.$comment&&e.$comment&&VY(t),vbe(t),n.let(Er.default.vErrors,null),n.let(Er.default.errors,0),r.unevaluated&&pbe(t),zY(t),_be(t)})}function pbe(t){const{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,Zt._)`${r}.evaluated`),e.if((0,Zt._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Zt._)`${t.evaluated}.props`,(0,Zt._)`undefined`)),e.if((0,Zt._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Zt._)`${t.evaluated}.items`,(0,Zt._)`undefined`))}function PB(t,e){const r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,Zt._)`/*# sourceURL=${r} */`:Zt.nil}function gbe(t,e){if(qY(t)&&(HY(t),BY(t))){mbe(t,e);return}(0,UY.boolOrEmptySchema)(t,e)}function BY({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const r in t)if(e.RULES.all[r])return!0;return!1}function qY(t){return typeof t.schema!="boolean"}function mbe(t,e){const{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&VY(t),bbe(t),wbe(t);const a=n.const("_errs",Er.default.errors);zY(t,a),n.var(e,(0,Zt._)`${a} === ${Er.default.errors}`)}function HY(t){(0,Yu.checkUnknownRules)(t),ybe(t)}function zY(t,e){if(t.opts.jtd)return TB(t,[],!1,e);const r=(0,OB.getSchemaTypes)(t.schema),n=(0,OB.coerceAndCheckDataType)(t,r);TB(t,r,!n,e)}function ybe(t){const{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Yu.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function vbe(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Yu.checkStrictMode)(t,"default is ignored in the schema root")}function bbe(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,ube.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function wbe(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function VY({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){const a=r.$comment;if(i.$comment===!0)t.code((0,Zt._)`${Er.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){const s=(0,Zt.str)`${n}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code((0,Zt._)`${Er.default.self}.opts.$comment(${a}, ${s}, ${o}.schema)`)}}function _be(t){const{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=t;r.$async?e.if((0,Zt._)`${Er.default.errors} === 0`,()=>e.return(Er.default.data),()=>e.throw((0,Zt._)`new ${i}(${Er.default.vErrors})`)):(e.assign((0,Zt._)`${n}.errors`,Er.default.vErrors),a.unevaluated&&Ebe(t),e.return((0,Zt._)`${Er.default.errors} === 0`))}function Ebe({gen:t,evaluated:e,props:r,items:n}){r instanceof Zt.Name&&t.assign((0,Zt._)`${e}.props`,r),n instanceof Zt.Name&&t.assign((0,Zt._)`${e}.items`,n)}function TB(t,e,r,n){const{gen:i,schema:a,data:s,allErrors:o,opts:c,self:u}=t,{RULES:f}=u;if(a.$ref&&(c.ignoreKeywordsWithRef||!(0,Yu.schemaHasRulesButRef)(a,f))){i.block(()=>WY(t,"$ref",f.all.$ref.definition));return}c.jtd||xbe(t,e),i.block(()=>{for(const m of f.rules)h(m);h(f.post)});function h(m){(0,P5.shouldUseGroup)(a,m)&&(m.type?(i.if((0,DE.checkDataType)(m.type,s,c.strictNumbers)),CB(t,m),e.length===1&&e[0]===m.type&&r&&(i.else(),(0,DE.reportTypeError)(t)),i.endIf()):CB(t,m),o||i.if((0,Zt._)`${Er.default.errors} === ${n||0}`))}}function CB(t,e){const{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,cbe.assignDefaults)(t,e.type),r.block(()=>{for(const a of e.rules)(0,P5.shouldUseRule)(n,a)&&WY(t,a.keyword,a.definition,e.type)})}function xbe(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Abe(t,e),t.opts.allowUnionTypes||Sbe(t,e),Ibe(t,t.dataTypes))}function Abe(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{GY(t.dataTypes,r)||T5(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Pbe(t,e)}}function Sbe(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&T5(t,"use allowUnionTypes to allow union type keyword")}function Ibe(t,e){const r=t.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,P5.shouldUseRule)(t.schema,i)){const{type:a}=i.definition;a.length&&!a.some(s=>Obe(e,s))&&T5(t,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function Obe(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function GY(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Pbe(t,e){const r=[];for(const n of t.dataTypes)GY(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function T5(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Yu.checkStrictMode)(t,e,t.opts.strictTypes)}class KY{constructor(e,r,n){if((0,xv.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Yu.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",QY(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,xv.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Er.default.errors))}result(e,r,n){this.failResult((0,Zt.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,Zt.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:r}=this;this.fail((0,Zt._)`${r} !== undefined && (${(0,Zt.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?py.reportExtraError:py.reportError)(this,this.def.error,r)}$dataError(){(0,py.reportError)(this,this.def.$dataError||py.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,py.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=Zt.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=Zt.nil,r=Zt.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:a,def:s}=this;n.if((0,Zt.or)((0,Zt._)`${i} === undefined`,r)),e!==Zt.nil&&n.assign(e,!0),(a.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==Zt.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:r,schemaType:n,def:i,it:a}=this;return(0,Zt.or)(s(),o());function s(){if(n.length){if(!(r instanceof Zt.Name))throw new Error("ajv implementation error");const c=Array.isArray(n)?n:[n];return(0,Zt._)`${(0,DE.checkDataTypes)(c,r,a.opts.strictNumbers,DE.DataType.Wrong)}`}return Zt.nil}function o(){if(i.validateSchema){const c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,Zt._)`!${c}(${r})`}return Zt.nil}}subschema(e,r){const n=(0,yT.getSubschema)(this.it,e);(0,yT.extendSubschemaData)(n,this.it,e),(0,yT.extendSubschemaMode)(n,e);const i={...this.it,...n,items:void 0,props:void 0};return gbe(i,r),i}mergeEvaluated(e,r){const{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Yu.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Yu.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,Zt.Name)),!0}}Eo.KeywordCxt=KY;function WY(t,e,r,n){const i=new KY(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,xv.funcKeywordCode)(i,r):"macro"in r?(0,xv.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,xv.funcKeywordCode)(i,r)}const Tbe=/^\/(?:[^~]|~0|~1)*$/,Cbe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function QY(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,a;if(t==="")return Er.default.rootData;if(t[0]==="/"){if(!Tbe.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,a=Er.default.rootData}else{const u=Cbe.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);const f=+u[1];if(i=u[2],i==="#"){if(f>=e)throw new Error(c("property/index",f));return n[e-f]}if(f>e)throw new Error(c("data",f));if(a=r[e-f],!i)return a}let s=a;const o=i.split("/");for(const u of o)u&&(a=(0,Zt._)`${a}${(0,Zt.getProperty)((0,Yu.unescapeJsonPointer)(u))}`,s=(0,Zt._)`${s} && ${a}`);return s;function c(u,f){return`Cannot access ${u} ${f} levels up, current level is ${e}`}}Eo.getData=QY;var d1={};Object.defineProperty(d1,"__esModule",{value:!0});class Rbe extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}d1.default=Rbe;var h1={};Object.defineProperty(h1,"__esModule",{value:!0});const vT=ia;class Nbe extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,vT.resolveUrl)(e,r,n),this.missingSchema=(0,vT.normalizeId)((0,vT.getFullPath)(e,this.missingRef))}}h1.default=Nbe;var ps={};Object.defineProperty(ps,"__esModule",{value:!0});ps.resolveSchema=ps.getCompilingSchema=ps.resolveRef=ps.compileSchema=ps.SchemaEnv=void 0;const qo=Ar,Dbe=d1,md=gc,ac=ia,RB=ln,Mbe=Eo;class g2{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,ac.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}ps.SchemaEnv=g2;function C5(t){const e=YY.call(this,t);if(e)return e;const r=(0,ac.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,s=new qo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a});let o;t.$async&&(o=s.scopeValue("Error",{ref:Dbe.default,code:(0,qo._)`require("ajv/dist/runtime/validation_error").default`}));const c=s.scopeName("validate");t.validateName=c;const u={gen:s,allErrors:this.opts.allErrors,data:md.default.data,parentData:md.default.parentData,parentDataProperty:md.default.parentDataProperty,dataNames:[md.default.data],dataPathArr:[qo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,qo.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:o,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:qo.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,qo._)`""`,opts:this.opts,self:this};let f;try{this._compilations.add(t),(0,Mbe.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);const h=s.toString();f=`${s.scopeRefs(md.default.scope)}return ${h}`,this.opts.code.process&&(f=this.opts.code.process(f,t));const y=new Function(`${md.default.self}`,`${md.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:y}),y.errors=null,y.schema=t.schema,y.schemaEnv=t,t.$async&&(y.$async=!0),this.opts.code.source===!0&&(y.source={validateName:c,validateCode:h,scopeValues:s._values}),this.opts.unevaluated){const{props:w,items:v}=u;y.evaluated={props:w instanceof qo.Name?void 0:w,items:v instanceof qo.Name?void 0:v,dynamicProps:w instanceof qo.Name,dynamicItems:v instanceof qo.Name},y.source&&(y.source.evaluated=(0,qo.stringify)(y.evaluated))}return t.validate=y,t}catch(h){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),h}finally{this._compilations.delete(t)}}ps.compileSchema=C5;function $be(t,e,r){var n;r=(0,ac.resolveUrl)(this.opts.uriResolver,e,r);const i=t.refs[r];if(i)return i;let a=jbe.call(this,t,r);if(a===void 0){const s=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:o}=this.opts;s&&(a=new g2({schema:s,schemaId:o,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=kbe.call(this,a)}ps.resolveRef=$be;function kbe(t){return(0,ac.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:C5.call(this,t)}function YY(t){for(const e of this._compilations)if(Lbe(e,t))return e}ps.getCompilingSchema=YY;function Lbe(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function jbe(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||m2.call(this,t,e)}function m2(t,e){const r=this.opts.uriResolver.parse(e),n=(0,ac._getFullPath)(this.opts.uriResolver,r);let i=(0,ac.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return bT.call(this,r,t);const a=(0,ac.normalizeId)(n),s=this.refs[a]||this.schemas[a];if(typeof s=="string"){const o=m2.call(this,t,s);return typeof(o==null?void 0:o.schema)!="object"?void 0:bT.call(this,r,o)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||C5.call(this,s),a===(0,ac.normalizeId)(e)){const{schema:o}=s,{schemaId:c}=this.opts,u=o[c];return u&&(i=(0,ac.resolveUrl)(this.opts.uriResolver,i,u)),new g2({schema:o,schemaId:c,root:t,baseId:i})}return bT.call(this,r,s)}}ps.resolveSchema=m2;const Ube=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function bT(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const o of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const c=r[(0,RB.unescapeFragment)(o)];if(c===void 0)return;r=c;const u=typeof r=="object"&&r[this.opts.schemaId];!Ube.has(o)&&u&&(e=(0,ac.resolveUrl)(this.opts.uriResolver,e,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,RB.schemaHasRulesButRef)(r,this.RULES)){const o=(0,ac.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=m2.call(this,n,o)}const{schemaId:s}=this.opts;if(a=a||new g2({schema:r,schemaId:s,root:n,baseId:e}),a.schema!==a.root.schema)return a}const Fbe="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Bbe="Meta-schema for $data reference (JSON AnySchema extension proposal)",qbe="object",Hbe=["$data"],zbe={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Vbe=!1,Gbe={$id:Fbe,description:Bbe,type:qbe,required:Hbe,properties:zbe,additionalProperties:Vbe};var R5={},KR={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(t,e){(function(r,n){n(e)})(ke,function(r){function n(){for(var ue=arguments.length,Z=Array(ue),ge=0;ge<ue;ge++)Z[ge]=arguments[ge];if(Z.length>1){Z[0]=Z[0].slice(0,-1);for(var Me=Z.length-1,Le=1;Le<Me;++Le)Z[Le]=Z[Le].slice(1,-1);return Z[Me]=Z[Me].slice(1),Z.join("")}else return Z[0]}function i(ue){return"(?:"+ue+")"}function a(ue){return ue===void 0?"undefined":ue===null?"null":Object.prototype.toString.call(ue).split(" ").pop().split("]").shift().toLowerCase()}function s(ue){return ue.toUpperCase()}function o(ue){return ue!=null?ue instanceof Array?ue:typeof ue.length!="number"||ue.split||ue.setInterval||ue.call?[ue]:Array.prototype.slice.call(ue):[]}function c(ue,Z){var ge=ue;if(Z)for(var Me in Z)ge[Me]=Z[Me];return ge}function u(ue){var Z="[A-Za-z]",ge="[0-9]",Me=n(ge,"[A-Fa-f]"),Le=i(i("%[EFef]"+Me+"%"+Me+Me+"%"+Me+Me)+"|"+i("%[89A-Fa-f]"+Me+"%"+Me+Me)+"|"+i("%"+Me+Me)),wt="[\\:\\/\\?\\#\\[\\]\\@]",St="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",hr=n(wt,St),ur=ue?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Jr=ue?"[\\uE000-\\uF8FF]":"[]",pr=n(Z,ge,"[\\-\\.\\_\\~]",ur);i(Z+n(Z,ge,"[\\+\\-\\.]")+"*"),i(i(Le+"|"+n(pr,St,"[\\:]"))+"*");var vr=i(i("25[0-5]")+"|"+i("2[0-4]"+ge)+"|"+i("1"+ge+ge)+"|"+i("0?[1-9]"+ge)+"|0?0?"+ge),rn=i(vr+"\\."+vr+"\\."+vr+"\\."+vr),sr=i(Me+"{1,4}"),$r=i(i(sr+"\\:"+sr)+"|"+rn),fn=i(i(sr+"\\:")+"{6}"+$r),kr=i("\\:\\:"+i(sr+"\\:")+"{5}"+$r),Kn=i(i(sr)+"?\\:\\:"+i(sr+"\\:")+"{4}"+$r),_i=i(i(i(sr+"\\:")+"{0,1}"+sr)+"?\\:\\:"+i(sr+"\\:")+"{3}"+$r),Wn=i(i(i(sr+"\\:")+"{0,2}"+sr)+"?\\:\\:"+i(sr+"\\:")+"{2}"+$r),Ei=i(i(i(sr+"\\:")+"{0,3}"+sr)+"?\\:\\:"+sr+"\\:"+$r),xi=i(i(i(sr+"\\:")+"{0,4}"+sr)+"?\\:\\:"+$r),ei=i(i(i(sr+"\\:")+"{0,5}"+sr)+"?\\:\\:"+sr),kn=i(i(i(sr+"\\:")+"{0,6}"+sr)+"?\\:\\:"),Gi=i([fn,kr,Kn,_i,Wn,Ei,xi,ei,kn].join("|")),Oi=i(i(pr+"|"+Le)+"+");i("[vV]"+Me+"+\\."+n(pr,St,"[\\:]")+"+"),i(i(Le+"|"+n(pr,St))+"*");var fa=i(Le+"|"+n(pr,St,"[\\:\\@]"));return i(i(Le+"|"+n(pr,St,"[\\@]"))+"+"),i(i(fa+"|"+n("[\\/\\?]",Jr))+"*"),{NOT_SCHEME:new RegExp(n("[^]",Z,ge,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",pr,St),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",pr,St),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",pr,St),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",pr,St),"g"),NOT_QUERY:new RegExp(n("[^\\%]",pr,St,"[\\:\\@\\/\\?]",Jr),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",pr,St,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",pr,St),"g"),UNRESERVED:new RegExp(pr,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",pr,hr),"g"),PCT_ENCODED:new RegExp(Le,"g"),IPV4ADDRESS:new RegExp("^("+rn+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Gi+")"+i(i("\\%25|\\%(?!"+Me+"{2})")+"("+Oi+")")+"?\\]?$")}}var f=u(!1),h=u(!0),m=function(){function ue(Z,ge){var Me=[],Le=!0,wt=!1,St=void 0;try{for(var hr=Z[Symbol.iterator](),ur;!(Le=(ur=hr.next()).done)&&(Me.push(ur.value),!(ge&&Me.length===ge));Le=!0);}catch(Jr){wt=!0,St=Jr}finally{try{!Le&&hr.return&&hr.return()}finally{if(wt)throw St}}return Me}return function(Z,ge){if(Array.isArray(Z))return Z;if(Symbol.iterator in Object(Z))return ue(Z,ge);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(ue){if(Array.isArray(ue)){for(var Z=0,ge=Array(ue.length);Z<ue.length;Z++)ge[Z]=ue[Z];return ge}else return Array.from(ue)},w=2147483647,v=36,g=1,_=26,b=38,S=700,A=72,I=128,E="-",p=/^xn--/,O=/[^\0-\x7E]/,N=/[\x2E\u3002\uFF0E\uFF61]/g,F={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},V=v-g,de=Math.floor,ve=String.fromCharCode;function U(ue){throw new RangeError(F[ue])}function L(ue,Z){for(var ge=[],Me=ue.length;Me--;)ge[Me]=Z(ue[Me]);return ge}function Q(ue,Z){var ge=ue.split("@"),Me="";ge.length>1&&(Me=ge[0]+"@",ue=ge[1]),ue=ue.replace(N,".");var Le=ue.split("."),wt=L(Le,Z).join(".");return Me+wt}function ne(ue){for(var Z=[],ge=0,Me=ue.length;ge<Me;){var Le=ue.charCodeAt(ge++);if(Le>=55296&&Le<=56319&&ge<Me){var wt=ue.charCodeAt(ge++);(wt&64512)==56320?Z.push(((Le&1023)<<10)+(wt&1023)+65536):(Z.push(Le),ge--)}else Z.push(Le)}return Z}var j=function(Z){return String.fromCodePoint.apply(String,y(Z))},B=function(Z){return Z-48<10?Z-22:Z-65<26?Z-65:Z-97<26?Z-97:v},H=function(Z,ge){return Z+22+75*(Z<26)-((ge!=0)<<5)},M=function(Z,ge,Me){var Le=0;for(Z=Me?de(Z/S):Z>>1,Z+=de(Z/ge);Z>V*_>>1;Le+=v)Z=de(Z/V);return de(Le+(V+1)*Z/(Z+b))},q=function(Z){var ge=[],Me=Z.length,Le=0,wt=I,St=A,hr=Z.lastIndexOf(E);hr<0&&(hr=0);for(var ur=0;ur<hr;++ur)Z.charCodeAt(ur)>=128&&U("not-basic"),ge.push(Z.charCodeAt(ur));for(var Jr=hr>0?hr+1:0;Jr<Me;){for(var pr=Le,vr=1,rn=v;;rn+=v){Jr>=Me&&U("invalid-input");var sr=B(Z.charCodeAt(Jr++));(sr>=v||sr>de((w-Le)/vr))&&U("overflow"),Le+=sr*vr;var $r=rn<=St?g:rn>=St+_?_:rn-St;if(sr<$r)break;var fn=v-$r;vr>de(w/fn)&&U("overflow"),vr*=fn}var kr=ge.length+1;St=M(Le-pr,kr,pr==0),de(Le/kr)>w-wt&&U("overflow"),wt+=de(Le/kr),Le%=kr,ge.splice(Le++,0,wt)}return String.fromCodePoint.apply(String,ge)},k=function(Z){var ge=[];Z=ne(Z);var Me=Z.length,Le=I,wt=0,St=A,hr=!0,ur=!1,Jr=void 0;try{for(var pr=Z[Symbol.iterator](),vr;!(hr=(vr=pr.next()).done);hr=!0){var rn=vr.value;rn<128&&ge.push(ve(rn))}}catch(Ye){ur=!0,Jr=Ye}finally{try{!hr&&pr.return&&pr.return()}finally{if(ur)throw Jr}}var sr=ge.length,$r=sr;for(sr&&ge.push(E);$r<Me;){var fn=w,kr=!0,Kn=!1,_i=void 0;try{for(var Wn=Z[Symbol.iterator](),Ei;!(kr=(Ei=Wn.next()).done);kr=!0){var xi=Ei.value;xi>=Le&&xi<fn&&(fn=xi)}}catch(Ye){Kn=!0,_i=Ye}finally{try{!kr&&Wn.return&&Wn.return()}finally{if(Kn)throw _i}}var ei=$r+1;fn-Le>de((w-wt)/ei)&&U("overflow"),wt+=(fn-Le)*ei,Le=fn;var kn=!0,Gi=!1,Oi=void 0;try{for(var fa=Z[Symbol.iterator](),Hs;!(kn=(Hs=fa.next()).done);kn=!0){var X=Hs.value;if(X<Le&&++wt>w&&U("overflow"),X==Le){for(var me=wt,re=v;;re+=v){var Ee=re<=St?g:re>=St+_?_:re-St;if(me<Ee)break;var be=me-Ee,Ie=v-Ee;ge.push(ve(H(Ee+be%Ie,0))),me=de(be/Ie)}ge.push(ve(H(me,0))),St=M(wt,ei,$r==sr),wt=0,++$r}}}catch(Ye){Gi=!0,Oi=Ye}finally{try{!kn&&fa.return&&fa.return()}finally{if(Gi)throw Oi}}++wt,++Le}return ge.join("")},$=function(Z){return Q(Z,function(ge){return p.test(ge)?q(ge.slice(4).toLowerCase()):ge})},G=function(Z){return Q(Z,function(ge){return O.test(ge)?"xn--"+k(ge):ge})},pe={version:"2.1.0",ucs2:{decode:ne,encode:j},decode:q,encode:k,toASCII:G,toUnicode:$},Y={};function te(ue){var Z=ue.charCodeAt(0),ge=void 0;return Z<16?ge="%0"+Z.toString(16).toUpperCase():Z<128?ge="%"+Z.toString(16).toUpperCase():Z<2048?ge="%"+(Z>>6|192).toString(16).toUpperCase()+"%"+(Z&63|128).toString(16).toUpperCase():ge="%"+(Z>>12|224).toString(16).toUpperCase()+"%"+(Z>>6&63|128).toString(16).toUpperCase()+"%"+(Z&63|128).toString(16).toUpperCase(),ge}function ce(ue){for(var Z="",ge=0,Me=ue.length;ge<Me;){var Le=parseInt(ue.substr(ge+1,2),16);if(Le<128)Z+=String.fromCharCode(Le),ge+=3;else if(Le>=194&&Le<224){if(Me-ge>=6){var wt=parseInt(ue.substr(ge+4,2),16);Z+=String.fromCharCode((Le&31)<<6|wt&63)}else Z+=ue.substr(ge,6);ge+=6}else if(Le>=224){if(Me-ge>=9){var St=parseInt(ue.substr(ge+4,2),16),hr=parseInt(ue.substr(ge+7,2),16);Z+=String.fromCharCode((Le&15)<<12|(St&63)<<6|hr&63)}else Z+=ue.substr(ge,9);ge+=9}else Z+=ue.substr(ge,3),ge+=3}return Z}function T(ue,Z){function ge(Me){var Le=ce(Me);return Le.match(Z.UNRESERVED)?Le:Me}return ue.scheme&&(ue.scheme=String(ue.scheme).replace(Z.PCT_ENCODED,ge).toLowerCase().replace(Z.NOT_SCHEME,"")),ue.userinfo!==void 0&&(ue.userinfo=String(ue.userinfo).replace(Z.PCT_ENCODED,ge).replace(Z.NOT_USERINFO,te).replace(Z.PCT_ENCODED,s)),ue.host!==void 0&&(ue.host=String(ue.host).replace(Z.PCT_ENCODED,ge).toLowerCase().replace(Z.NOT_HOST,te).replace(Z.PCT_ENCODED,s)),ue.path!==void 0&&(ue.path=String(ue.path).replace(Z.PCT_ENCODED,ge).replace(ue.scheme?Z.NOT_PATH:Z.NOT_PATH_NOSCHEME,te).replace(Z.PCT_ENCODED,s)),ue.query!==void 0&&(ue.query=String(ue.query).replace(Z.PCT_ENCODED,ge).replace(Z.NOT_QUERY,te).replace(Z.PCT_ENCODED,s)),ue.fragment!==void 0&&(ue.fragment=String(ue.fragment).replace(Z.PCT_ENCODED,ge).replace(Z.NOT_FRAGMENT,te).replace(Z.PCT_ENCODED,s)),ue}function le(ue){return ue.replace(/^0*(.*)/,"$1")||"0"}function ze(ue,Z){var ge=ue.match(Z.IPV4ADDRESS)||[],Me=m(ge,2),Le=Me[1];return Le?Le.split(".").map(le).join("."):ue}function et(ue,Z){var ge=ue.match(Z.IPV6ADDRESS)||[],Me=m(ge,3),Le=Me[1],wt=Me[2];if(Le){for(var St=Le.toLowerCase().split("::").reverse(),hr=m(St,2),ur=hr[0],Jr=hr[1],pr=Jr?Jr.split(":").map(le):[],vr=ur.split(":").map(le),rn=Z.IPV4ADDRESS.test(vr[vr.length-1]),sr=rn?7:8,$r=vr.length-sr,fn=Array(sr),kr=0;kr<sr;++kr)fn[kr]=pr[kr]||vr[$r+kr]||"";rn&&(fn[sr-1]=ze(fn[sr-1],Z));var Kn=fn.reduce(function(ei,kn,Gi){if(!kn||kn==="0"){var Oi=ei[ei.length-1];Oi&&Oi.index+Oi.length===Gi?Oi.length++:ei.push({index:Gi,length:1})}return ei},[]),_i=Kn.sort(function(ei,kn){return kn.length-ei.length})[0],Wn=void 0;if(_i&&_i.length>1){var Ei=fn.slice(0,_i.index),xi=fn.slice(_i.index+_i.length);Wn=Ei.join(":")+"::"+xi.join(":")}else Wn=fn.join(":");return wt&&(Wn+="%"+wt),Wn}else return ue}var yt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,vt="".match(/(){0}/)[1]===void 0;function gt(ue){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ge={},Me=Z.iri!==!1?h:f;Z.reference==="suffix"&&(ue=(Z.scheme?Z.scheme+":":"")+"//"+ue);var Le=ue.match(yt);if(Le){vt?(ge.scheme=Le[1],ge.userinfo=Le[3],ge.host=Le[4],ge.port=parseInt(Le[5],10),ge.path=Le[6]||"",ge.query=Le[7],ge.fragment=Le[8],isNaN(ge.port)&&(ge.port=Le[5])):(ge.scheme=Le[1]||void 0,ge.userinfo=ue.indexOf("@")!==-1?Le[3]:void 0,ge.host=ue.indexOf("//")!==-1?Le[4]:void 0,ge.port=parseInt(Le[5],10),ge.path=Le[6]||"",ge.query=ue.indexOf("?")!==-1?Le[7]:void 0,ge.fragment=ue.indexOf("#")!==-1?Le[8]:void 0,isNaN(ge.port)&&(ge.port=ue.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Le[4]:void 0)),ge.host&&(ge.host=et(ze(ge.host,Me),Me)),ge.scheme===void 0&&ge.userinfo===void 0&&ge.host===void 0&&ge.port===void 0&&!ge.path&&ge.query===void 0?ge.reference="same-document":ge.scheme===void 0?ge.reference="relative":ge.fragment===void 0?ge.reference="absolute":ge.reference="uri",Z.reference&&Z.reference!=="suffix"&&Z.reference!==ge.reference&&(ge.error=ge.error||"URI is not a "+Z.reference+" reference.");var wt=Y[(Z.scheme||ge.scheme||"").toLowerCase()];if(!Z.unicodeSupport&&(!wt||!wt.unicodeSupport)){if(ge.host&&(Z.domainHost||wt&&wt.domainHost))try{ge.host=pe.toASCII(ge.host.replace(Me.PCT_ENCODED,ce).toLowerCase())}catch(St){ge.error=ge.error||"Host's domain name can not be converted to ASCII via punycode: "+St}T(ge,f)}else T(ge,Me);wt&&wt.parse&&wt.parse(ge,Z)}else ge.error=ge.error||"URI can not be parsed.";return ge}function Ut(ue,Z){var ge=Z.iri!==!1?h:f,Me=[];return ue.userinfo!==void 0&&(Me.push(ue.userinfo),Me.push("@")),ue.host!==void 0&&Me.push(et(ze(String(ue.host),ge),ge).replace(ge.IPV6ADDRESS,function(Le,wt,St){return"["+wt+(St?"%25"+St:"")+"]"})),(typeof ue.port=="number"||typeof ue.port=="string")&&(Me.push(":"),Me.push(String(ue.port))),Me.length?Me.join(""):void 0}var Xt=/^\.\.?\//,Sr=/^\/\.(\/|$)/,Ct=/^\/\.\.(\/|$)/,Pt=/^\/?(?:.|\n)*?(?=\/|$)/;function kt(ue){for(var Z=[];ue.length;)if(ue.match(Xt))ue=ue.replace(Xt,"");else if(ue.match(Sr))ue=ue.replace(Sr,"/");else if(ue.match(Ct))ue=ue.replace(Ct,"/"),Z.pop();else if(ue==="."||ue==="..")ue="";else{var ge=ue.match(Pt);if(ge){var Me=ge[0];ue=ue.slice(Me.length),Z.push(Me)}else throw new Error("Unexpected dot segment condition")}return Z.join("")}function Rt(ue){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ge=Z.iri?h:f,Me=[],Le=Y[(Z.scheme||ue.scheme||"").toLowerCase()];if(Le&&Le.serialize&&Le.serialize(ue,Z),ue.host&&!ge.IPV6ADDRESS.test(ue.host)){if(Z.domainHost||Le&&Le.domainHost)try{ue.host=Z.iri?pe.toUnicode(ue.host):pe.toASCII(ue.host.replace(ge.PCT_ENCODED,ce).toLowerCase())}catch(hr){ue.error=ue.error||"Host's domain name can not be converted to "+(Z.iri?"Unicode":"ASCII")+" via punycode: "+hr}}T(ue,ge),Z.reference!=="suffix"&&ue.scheme&&(Me.push(ue.scheme),Me.push(":"));var wt=Ut(ue,Z);if(wt!==void 0&&(Z.reference!=="suffix"&&Me.push("//"),Me.push(wt),ue.path&&ue.path.charAt(0)!=="/"&&Me.push("/")),ue.path!==void 0){var St=ue.path;!Z.absolutePath&&(!Le||!Le.absolutePath)&&(St=kt(St)),wt===void 0&&(St=St.replace(/^\/\//,"/%2F")),Me.push(St)}return ue.query!==void 0&&(Me.push("?"),Me.push(ue.query)),ue.fragment!==void 0&&(Me.push("#"),Me.push(ue.fragment)),Me.join("")}function Kt(ue,Z){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Me=arguments[3],Le={};return Me||(ue=gt(Rt(ue,ge),ge),Z=gt(Rt(Z,ge),ge)),ge=ge||{},!ge.tolerant&&Z.scheme?(Le.scheme=Z.scheme,Le.userinfo=Z.userinfo,Le.host=Z.host,Le.port=Z.port,Le.path=kt(Z.path||""),Le.query=Z.query):(Z.userinfo!==void 0||Z.host!==void 0||Z.port!==void 0?(Le.userinfo=Z.userinfo,Le.host=Z.host,Le.port=Z.port,Le.path=kt(Z.path||""),Le.query=Z.query):(Z.path?(Z.path.charAt(0)==="/"?Le.path=kt(Z.path):((ue.userinfo!==void 0||ue.host!==void 0||ue.port!==void 0)&&!ue.path?Le.path="/"+Z.path:ue.path?Le.path=ue.path.slice(0,ue.path.lastIndexOf("/")+1)+Z.path:Le.path=Z.path,Le.path=kt(Le.path)),Le.query=Z.query):(Le.path=ue.path,Z.query!==void 0?Le.query=Z.query:Le.query=ue.query),Le.userinfo=ue.userinfo,Le.host=ue.host,Le.port=ue.port),Le.scheme=ue.scheme),Le.fragment=Z.fragment,Le}function Ft(ue,Z,ge){var Me=c({scheme:"null"},ge);return Rt(Kt(gt(ue,Me),gt(Z,Me),Me,!0),Me)}function Gt(ue,Z){return typeof ue=="string"?ue=Rt(gt(ue,Z),Z):a(ue)==="object"&&(ue=gt(Rt(ue,Z),Z)),ue}function Dt(ue,Z,ge){return typeof ue=="string"?ue=Rt(gt(ue,ge),ge):a(ue)==="object"&&(ue=Rt(ue,ge)),typeof Z=="string"?Z=Rt(gt(Z,ge),ge):a(Z)==="object"&&(Z=Rt(Z,ge)),ue===Z}function Nt(ue,Z){return ue&&ue.toString().replace(!Z||!Z.iri?f.ESCAPE:h.ESCAPE,te)}function zt(ue,Z){return ue&&ue.toString().replace(!Z||!Z.iri?f.PCT_ENCODED:h.PCT_ENCODED,ce)}var Mt={scheme:"http",domainHost:!0,parse:function(Z,ge){return Z.host||(Z.error=Z.error||"HTTP URIs must have a host."),Z},serialize:function(Z,ge){var Me=String(Z.scheme).toLowerCase()==="https";return(Z.port===(Me?443:80)||Z.port==="")&&(Z.port=void 0),Z.path||(Z.path="/"),Z}},cr={scheme:"https",domainHost:Mt.domainHost,parse:Mt.parse,serialize:Mt.serialize};function tr(ue){return typeof ue.secure=="boolean"?ue.secure:String(ue.scheme).toLowerCase()==="wss"}var ar={scheme:"ws",domainHost:!0,parse:function(Z,ge){var Me=Z;return Me.secure=tr(Me),Me.resourceName=(Me.path||"/")+(Me.query?"?"+Me.query:""),Me.path=void 0,Me.query=void 0,Me},serialize:function(Z,ge){if((Z.port===(tr(Z)?443:80)||Z.port==="")&&(Z.port=void 0),typeof Z.secure=="boolean"&&(Z.scheme=Z.secure?"wss":"ws",Z.secure=void 0),Z.resourceName){var Me=Z.resourceName.split("?"),Le=m(Me,2),wt=Le[0],St=Le[1];Z.path=wt&&wt!=="/"?wt:void 0,Z.query=St,Z.resourceName=void 0}return Z.fragment=void 0,Z}},nr={scheme:"wss",domainHost:ar.domainHost,parse:ar.parse,serialize:ar.serialize},br={},En="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",tn="[0-9A-Fa-f]",li=i(i("%[EFef]"+tn+"%"+tn+tn+"%"+tn+tn)+"|"+i("%[89A-Fa-f]"+tn+"%"+tn+tn)+"|"+i("%"+tn+tn)),Mn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",$n="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Zn=n($n,'[\\"\\\\]'),Tr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ur=new RegExp(En,"g"),Ir=new RegExp(li,"g"),_e=new RegExp(n("[^]",Mn,"[\\.]",'[\\"]',Zn),"g"),ee=new RegExp(n("[^]",En,Tr),"g"),ye=ee;function Re(ue){var Z=ce(ue);return Z.match(Ur)?Z:ue}var He={scheme:"mailto",parse:function(Z,ge){var Me=Z,Le=Me.to=Me.path?Me.path.split(","):[];if(Me.path=void 0,Me.query){for(var wt=!1,St={},hr=Me.query.split("&"),ur=0,Jr=hr.length;ur<Jr;++ur){var pr=hr[ur].split("=");switch(pr[0]){case"to":for(var vr=pr[1].split(","),rn=0,sr=vr.length;rn<sr;++rn)Le.push(vr[rn]);break;case"subject":Me.subject=zt(pr[1],ge);break;case"body":Me.body=zt(pr[1],ge);break;default:wt=!0,St[zt(pr[0],ge)]=zt(pr[1],ge);break}}wt&&(Me.headers=St)}Me.query=void 0;for(var $r=0,fn=Le.length;$r<fn;++$r){var kr=Le[$r].split("@");if(kr[0]=zt(kr[0]),ge.unicodeSupport)kr[1]=zt(kr[1],ge).toLowerCase();else try{kr[1]=pe.toASCII(zt(kr[1],ge).toLowerCase())}catch(Kn){Me.error=Me.error||"Email address's domain name can not be converted to ASCII via punycode: "+Kn}Le[$r]=kr.join("@")}return Me},serialize:function(Z,ge){var Me=Z,Le=o(Z.to);if(Le){for(var wt=0,St=Le.length;wt<St;++wt){var hr=String(Le[wt]),ur=hr.lastIndexOf("@"),Jr=hr.slice(0,ur).replace(Ir,Re).replace(Ir,s).replace(_e,te),pr=hr.slice(ur+1);try{pr=ge.iri?pe.toUnicode(pr):pe.toASCII(zt(pr,ge).toLowerCase())}catch($r){Me.error=Me.error||"Email address's domain name can not be converted to "+(ge.iri?"Unicode":"ASCII")+" via punycode: "+$r}Le[wt]=Jr+"@"+pr}Me.path=Le.join(",")}var vr=Z.headers=Z.headers||{};Z.subject&&(vr.subject=Z.subject),Z.body&&(vr.body=Z.body);var rn=[];for(var sr in vr)vr[sr]!==br[sr]&&rn.push(sr.replace(Ir,Re).replace(Ir,s).replace(ee,te)+"="+vr[sr].replace(Ir,Re).replace(Ir,s).replace(ye,te));return rn.length&&(Me.query=rn.join("&")),Me}},Je=/^([^\:]+)\:(.*)/,ot={scheme:"urn",parse:function(Z,ge){var Me=Z.path&&Z.path.match(Je),Le=Z;if(Me){var wt=ge.scheme||Le.scheme||"urn",St=Me[1].toLowerCase(),hr=Me[2],ur=wt+":"+(ge.nid||St),Jr=Y[ur];Le.nid=St,Le.nss=hr,Le.path=void 0,Jr&&(Le=Jr.parse(Le,ge))}else Le.error=Le.error||"URN can not be parsed.";return Le},serialize:function(Z,ge){var Me=ge.scheme||Z.scheme||"urn",Le=Z.nid,wt=Me+":"+(ge.nid||Le),St=Y[wt];St&&(Z=St.serialize(Z,ge));var hr=Z,ur=Z.nss;return hr.path=(Le||ge.nid)+":"+ur,hr}},dt=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Et={scheme:"urn:uuid",parse:function(Z,ge){var Me=Z;return Me.uuid=Me.nss,Me.nss=void 0,!ge.tolerant&&(!Me.uuid||!Me.uuid.match(dt))&&(Me.error=Me.error||"UUID is not valid."),Me},serialize:function(Z,ge){var Me=Z;return Me.nss=(Z.uuid||"").toLowerCase(),Me}};Y[Mt.scheme]=Mt,Y[cr.scheme]=cr,Y[ar.scheme]=ar,Y[nr.scheme]=nr,Y[He.scheme]=He,Y[ot.scheme]=ot,Y[Et.scheme]=Et,r.SCHEMES=Y,r.pctEncChar=te,r.pctDecChars=ce,r.parse=gt,r.removeDotSegments=kt,r.serialize=Rt,r.resolveComponents=Kt,r.resolve=Ft,r.normalize=Gt,r.equal=Dt,r.escapeComponent=Nt,r.unescapeComponent=zt,Object.defineProperty(r,"__esModule",{value:!0})})})(KR,KR.exports);var Kbe=KR.exports;Object.defineProperty(R5,"__esModule",{value:!0});const JY=Kbe;JY.code='require("ajv/dist/runtime/uri").default';R5.default=JY;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Eo;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Ar;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=d1,i=h1,a=Sh,s=ps,o=Ar,c=ia,u=f1,f=ln,h=Gbe,m=R5,y=(H,M)=>new RegExp(H,M);y.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=200;function S(H){var M,q,k,$,G,pe,Y,te,ce,T,le,ze,et,yt,vt,gt,Ut,Xt,Sr,Ct,Pt,kt,Rt,Kt,Ft;const Gt=H.strict,Dt=(M=H.code)===null||M===void 0?void 0:M.optimize,Nt=Dt===!0||Dt===void 0?1:Dt||0,zt=(k=(q=H.code)===null||q===void 0?void 0:q.regExp)!==null&&k!==void 0?k:y,Mt=($=H.uriResolver)!==null&&$!==void 0?$:m.default;return{strictSchema:(pe=(G=H.strictSchema)!==null&&G!==void 0?G:Gt)!==null&&pe!==void 0?pe:!0,strictNumbers:(te=(Y=H.strictNumbers)!==null&&Y!==void 0?Y:Gt)!==null&&te!==void 0?te:!0,strictTypes:(T=(ce=H.strictTypes)!==null&&ce!==void 0?ce:Gt)!==null&&T!==void 0?T:"log",strictTuples:(ze=(le=H.strictTuples)!==null&&le!==void 0?le:Gt)!==null&&ze!==void 0?ze:"log",strictRequired:(yt=(et=H.strictRequired)!==null&&et!==void 0?et:Gt)!==null&&yt!==void 0?yt:!1,code:H.code?{...H.code,optimize:Nt,regExp:zt}:{optimize:Nt,regExp:zt},loopRequired:(vt=H.loopRequired)!==null&&vt!==void 0?vt:b,loopEnum:(gt=H.loopEnum)!==null&&gt!==void 0?gt:b,meta:(Ut=H.meta)!==null&&Ut!==void 0?Ut:!0,messages:(Xt=H.messages)!==null&&Xt!==void 0?Xt:!0,inlineRefs:(Sr=H.inlineRefs)!==null&&Sr!==void 0?Sr:!0,schemaId:(Ct=H.schemaId)!==null&&Ct!==void 0?Ct:"$id",addUsedSchema:(Pt=H.addUsedSchema)!==null&&Pt!==void 0?Pt:!0,validateSchema:(kt=H.validateSchema)!==null&&kt!==void 0?kt:!0,validateFormats:(Rt=H.validateFormats)!==null&&Rt!==void 0?Rt:!0,unicodeRegExp:(Kt=H.unicodeRegExp)!==null&&Kt!==void 0?Kt:!0,int32range:(Ft=H.int32range)!==null&&Ft!==void 0?Ft:!0,uriResolver:Mt}}class A{constructor(M={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,M=this.opts={...M,...S(M)};const{es5:q,lines:k}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:v,es5:q,lines:k}),this.logger=de(M.logger);const $=M.validateFormats;M.validateFormats=!1,this.RULES=(0,a.getRules)(),I.call(this,g,M,"NOT SUPPORTED"),I.call(this,_,M,"DEPRECATED","warn"),this._metaOpts=F.call(this),M.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),M.keywords&&N.call(this,M.keywords),typeof M.meta=="object"&&this.addMetaSchema(M.meta),p.call(this),M.validateFormats=$}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:M,meta:q,schemaId:k}=this.opts;let $=h;k==="id"&&($={...h},$.id=$.$id,delete $.$id),q&&M&&this.addMetaSchema($,$[k],!1)}defaultMeta(){const{meta:M,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof M=="object"?M[q]||M:void 0}validate(M,q){let k;if(typeof M=="string"){if(k=this.getSchema(M),!k)throw new Error(`no schema with key or ref "${M}"`)}else k=this.compile(M);const $=k(q);return"$async"in k||(this.errors=k.errors),$}compile(M,q){const k=this._addSchema(M,q);return k.validate||this._compileSchemaEnv(k)}compileAsync(M,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return $.call(this,M,q);async function $(T,le){await G.call(this,T.$schema);const ze=this._addSchema(T,le);return ze.validate||pe.call(this,ze)}async function G(T){T&&!this.getSchema(T)&&await $.call(this,{$ref:T},!0)}async function pe(T){try{return this._compileSchemaEnv(T)}catch(le){if(!(le instanceof i.default))throw le;return Y.call(this,le),await te.call(this,le.missingSchema),pe.call(this,T)}}function Y({missingSchema:T,missingRef:le}){if(this.refs[T])throw new Error(`AnySchema ${T} is loaded but ${le} cannot be resolved`)}async function te(T){const le=await ce.call(this,T);this.refs[T]||await G.call(this,le.$schema),this.refs[T]||this.addSchema(le,T,q)}async function ce(T){const le=this._loading[T];if(le)return le;try{return await(this._loading[T]=k(T))}finally{delete this._loading[T]}}}addSchema(M,q,k,$=this.opts.validateSchema){if(Array.isArray(M)){for(const pe of M)this.addSchema(pe,void 0,k,$);return this}let G;if(typeof M=="object"){const{schemaId:pe}=this.opts;if(G=M[pe],G!==void 0&&typeof G!="string")throw new Error(`schema ${pe} must be string`)}return q=(0,c.normalizeId)(q||G),this._checkUnique(q),this.schemas[q]=this._addSchema(M,k,q,$,!0),this}addMetaSchema(M,q,k=this.opts.validateSchema){return this.addSchema(M,q,!0,k),this}validateSchema(M,q){if(typeof M=="boolean")return!0;let k;if(k=M.$schema,k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const $=this.validate(k,M);if(!$&&q){const G="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(G);else throw new Error(G)}return $}getSchema(M){let q;for(;typeof(q=E.call(this,M))=="string";)M=q;if(q===void 0){const{schemaId:k}=this.opts,$=new s.SchemaEnv({schema:{},schemaId:k});if(q=s.resolveSchema.call(this,$,M),!q)return;this.refs[M]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(M){if(M instanceof RegExp)return this._removeAllSchemas(this.schemas,M),this._removeAllSchemas(this.refs,M),this;switch(typeof M){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=E.call(this,M);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[M],delete this.refs[M],this}case"object":{const q=M;this._cache.delete(q);let k=M[this.opts.schemaId];return k&&(k=(0,c.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(M){for(const q of M)this.addKeyword(q);return this}addKeyword(M,q){let k;if(typeof M=="string")k=M,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=k);else if(typeof M=="object"&&q===void 0){if(q=M,k=q.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(U.call(this,k,q),!q)return(0,f.eachItem)(k,G=>L.call(this,G)),this;ne.call(this,q);const $={...q,type:(0,u.getJSONTypes)(q.type),schemaType:(0,u.getJSONTypes)(q.schemaType)};return(0,f.eachItem)(k,$.type.length===0?G=>L.call(this,G,$):G=>$.type.forEach(pe=>L.call(this,G,$,pe))),this}getKeyword(M){const q=this.RULES.all[M];return typeof q=="object"?q.definition:!!q}removeKeyword(M){const{RULES:q}=this;delete q.keywords[M],delete q.all[M];for(const k of q.rules){const $=k.rules.findIndex(G=>G.keyword===M);$>=0&&k.rules.splice($,1)}return this}addFormat(M,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[M]=q,this}errorsText(M=this.errors,{separator:q=", ",dataVar:k="data"}={}){return!M||M.length===0?"No errors":M.map($=>`${k}${$.instancePath} ${$.message}`).reduce(($,G)=>$+q+G)}$dataMetaSchema(M,q){const k=this.RULES.all;M=JSON.parse(JSON.stringify(M));for(const $ of q){const G=$.split("/").slice(1);let pe=M;for(const Y of G)pe=pe[Y];for(const Y in k){const te=k[Y];if(typeof te!="object")continue;const{$data:ce}=te.definition,T=pe[Y];ce&&T&&(pe[Y]=B(T))}}return M}_removeAllSchemas(M,q){for(const k in M){const $=M[k];(!q||q.test(k))&&(typeof $=="string"?delete M[k]:$&&!$.meta&&(this._cache.delete($.schema),delete M[k]))}}_addSchema(M,q,k,$=this.opts.validateSchema,G=this.opts.addUsedSchema){let pe;const{schemaId:Y}=this.opts;if(typeof M=="object")pe=M[Y];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof M!="boolean")throw new Error("schema must be object or boolean")}let te=this._cache.get(M);if(te!==void 0)return te;k=(0,c.normalizeId)(pe||k);const ce=c.getSchemaRefs.call(this,M,k);return te=new s.SchemaEnv({schema:M,schemaId:Y,meta:q,baseId:k,localRefs:ce}),this._cache.set(te.schema,te),G&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=te),$&&this.validateSchema(M,!0),te}_checkUnique(M){if(this.schemas[M]||this.refs[M])throw new Error(`schema with key or id "${M}" already exists`)}_compileSchemaEnv(M){if(M.meta?this._compileMetaSchema(M):s.compileSchema.call(this,M),!M.validate)throw new Error("ajv implementation error");return M.validate}_compileMetaSchema(M){const q=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,M)}finally{this.opts=q}}}t.default=A,A.ValidationError=n.default,A.MissingRefError=i.default;function I(H,M,q,k="error"){for(const $ in H){const G=$;G in M&&this.logger[k](`${q}: option ${$}. ${H[G]}`)}}function E(H){return H=(0,c.normalizeId)(H),this.schemas[H]||this.refs[H]}function p(){const H=this.opts.schemas;if(H)if(Array.isArray(H))this.addSchema(H);else for(const M in H)this.addSchema(H[M],M)}function O(){for(const H in this.opts.formats){const M=this.opts.formats[H];M&&this.addFormat(H,M)}}function N(H){if(Array.isArray(H)){this.addVocabulary(H);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const M in H){const q=H[M];q.keyword||(q.keyword=M),this.addKeyword(q)}}function F(){const H={...this.opts};for(const M of w)delete H[M];return H}const V={log(){},warn(){},error(){}};function de(H){if(H===!1)return V;if(H===void 0)return console;if(H.log&&H.warn&&H.error)return H;throw new Error("logger must implement log, warn and error methods")}const ve=/^[a-z_$][a-z0-9_$:-]*$/i;function U(H,M){const{RULES:q}=this;if((0,f.eachItem)(H,k=>{if(q.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!ve.test(k))throw new Error(`Keyword ${k} has invalid name`)}),!!M&&M.$data&&!("code"in M||"validate"in M))throw new Error('$data keyword must have "code" or "validate" function')}function L(H,M,q){var k;const $=M==null?void 0:M.post;if(q&&$)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:G}=this;let pe=$?G.post:G.rules.find(({type:te})=>te===q);if(pe||(pe={type:q,rules:[]},G.rules.push(pe)),G.keywords[H]=!0,!M)return;const Y={keyword:H,definition:{...M,type:(0,u.getJSONTypes)(M.type),schemaType:(0,u.getJSONTypes)(M.schemaType)}};M.before?Q.call(this,pe,Y,M.before):pe.rules.push(Y),G.all[H]=Y,(k=M.implements)===null||k===void 0||k.forEach(te=>this.addKeyword(te))}function Q(H,M,q){const k=H.rules.findIndex($=>$.keyword===q);k>=0?H.rules.splice(k,0,M):(H.rules.push(M),this.logger.warn(`rule ${q} is not defined`))}function ne(H){let{metaSchema:M}=H;M!==void 0&&(H.$data&&this.opts.$data&&(M=B(M)),H.validateSchema=this.compile(M,!0))}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function B(H){return{anyOf:[H,j]}}})(OY);var N5={},D5={},M5={};Object.defineProperty(M5,"__esModule",{value:!0});const Wbe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};M5.default=Wbe;var Ih={};Object.defineProperty(Ih,"__esModule",{value:!0});Ih.callRef=Ih.getValidate=void 0;const Qbe=h1,NB=Gr,us=Ar,xp=gc,DB=ps,Hw=ln,Ybe={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:a,validateName:s,opts:o,self:c}=n,{root:u}=a;if((r==="#"||r==="#/")&&i===u.baseId)return h();const f=DB.resolveRef.call(c,u,i,r);if(f===void 0)throw new Qbe.default(n.opts.uriResolver,i,r);if(f instanceof DB.SchemaEnv)return m(f);return y(f);function h(){if(a===u)return $_(t,s,a,a.$async);const w=e.scopeValue("root",{ref:u});return $_(t,(0,us._)`${w}.validate`,u,u.$async)}function m(w){const v=XY(t,w);$_(t,v,w,w.$async)}function y(w){const v=e.scopeValue("schema",o.code.source===!0?{ref:w,code:(0,us.stringify)(w)}:{ref:w}),g=e.name("valid"),_=t.subschema({schema:w,dataTypes:[],schemaPath:us.nil,topSchemaRef:v,errSchemaPath:r},g);t.mergeEvaluated(_),t.ok(g)}}};function XY(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,us._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Ih.getValidate=XY;function $_(t,e,r,n){const{gen:i,it:a}=t,{allErrors:s,schemaEnv:o,opts:c}=a,u=c.passContext?xp.default.this:us.nil;n?f():h();function f(){if(!o.$async)throw new Error("async schema referenced by sync schema");const w=i.let("valid");i.try(()=>{i.code((0,us._)`await ${(0,NB.callValidateCode)(t,e,u)}`),y(e),s||i.assign(w,!0)},v=>{i.if((0,us._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),m(v),s||i.assign(w,!1)}),t.ok(w)}function h(){t.result((0,NB.callValidateCode)(t,e,u),()=>y(e),()=>m(e))}function m(w){const v=(0,us._)`${w}.errors`;i.assign(xp.default.vErrors,(0,us._)`${xp.default.vErrors} === null ? ${v} : ${xp.default.vErrors}.concat(${v})`),i.assign(xp.default.errors,(0,us._)`${xp.default.vErrors}.length`)}function y(w){var v;if(!a.opts.unevaluated)return;const g=(v=r==null?void 0:r.validate)===null||v===void 0?void 0:v.evaluated;if(a.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(a.props=Hw.mergeEvaluated.props(i,g.props,a.props));else{const _=i.var("props",(0,us._)`${w}.evaluated.props`);a.props=Hw.mergeEvaluated.props(i,_,a.props,us.Name)}if(a.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(a.items=Hw.mergeEvaluated.items(i,g.items,a.items));else{const _=i.var("items",(0,us._)`${w}.evaluated.items`);a.items=Hw.mergeEvaluated.items(i,_,a.items,us.Name)}}}Ih.callRef=$_;Ih.default=Ybe;Object.defineProperty(D5,"__esModule",{value:!0});const Jbe=M5,Xbe=Ih,Zbe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Jbe.default,Xbe.default];D5.default=Zbe;var $5={},k5={};Object.defineProperty(k5,"__esModule",{value:!0});const ME=Ar,Cl=ME.operators,$E={maximum:{okStr:"<=",ok:Cl.LTE,fail:Cl.GT},minimum:{okStr:">=",ok:Cl.GTE,fail:Cl.LT},exclusiveMaximum:{okStr:"<",ok:Cl.LT,fail:Cl.GTE},exclusiveMinimum:{okStr:">",ok:Cl.GT,fail:Cl.LTE}},e1e={message:({keyword:t,schemaCode:e})=>(0,ME.str)`must be ${$E[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ME._)`{comparison: ${$E[t].okStr}, limit: ${e}}`},t1e={keyword:Object.keys($E),type:"number",schemaType:"number",$data:!0,error:e1e,code(t){const{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,ME._)`${r} ${$E[e].fail} ${n} || isNaN(${r})`)}};k5.default=t1e;var L5={};Object.defineProperty(L5,"__esModule",{value:!0});const Av=Ar,r1e={message:({schemaCode:t})=>(0,Av.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Av._)`{multipleOf: ${t}}`},n1e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r1e,code(t){const{gen:e,data:r,schemaCode:n,it:i}=t,a=i.opts.multipleOfPrecision,s=e.let("res"),o=a?(0,Av._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,Av._)`${s} !== parseInt(${s})`;t.fail$data((0,Av._)`(${n} === 0 || (${s} = ${r}/${n}, ${o}))`)}};L5.default=n1e;var j5={},U5={};Object.defineProperty(U5,"__esModule",{value:!0});function ZY(t){const e=t.length;let r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}U5.default=ZY;ZY.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(j5,"__esModule",{value:!0});const Pd=Ar,i1e=ln,a1e=U5,s1e={message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,Pd.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Pd._)`{limit: ${t}}`},o1e={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s1e,code(t){const{keyword:e,data:r,schemaCode:n,it:i}=t,a=e==="maxLength"?Pd.operators.GT:Pd.operators.LT,s=i.opts.unicode===!1?(0,Pd._)`${r}.length`:(0,Pd._)`${(0,i1e.useFunc)(t.gen,a1e.default)}(${r})`;t.fail$data((0,Pd._)`${s} ${a} ${n}`)}};j5.default=o1e;var F5={};Object.defineProperty(F5,"__esModule",{value:!0});const c1e=Gr,kE=Ar,u1e={message:({schemaCode:t})=>(0,kE.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,kE._)`{pattern: ${t}}`},l1e={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:u1e,code(t){const{data:e,$data:r,schema:n,schemaCode:i,it:a}=t,s=a.opts.unicodeRegExp?"u":"",o=r?(0,kE._)`(new RegExp(${i}, ${s}))`:(0,c1e.usePattern)(t,n);t.fail$data((0,kE._)`!${o}.test(${e})`)}};F5.default=l1e;var B5={};Object.defineProperty(B5,"__esModule",{value:!0});const Sv=Ar,f1e={message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Sv.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Sv._)`{limit: ${t}}`},d1e={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:f1e,code(t){const{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Sv.operators.GT:Sv.operators.LT;t.fail$data((0,Sv._)`Object.keys(${r}).length ${i} ${n}`)}};B5.default=d1e;var q5={};Object.defineProperty(q5,"__esModule",{value:!0});const gy=Gr,Iv=Ar,h1e=ln,p1e={message:({params:{missingProperty:t}})=>(0,Iv.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Iv._)`{missingProperty: ${t}}`},g1e={keyword:"required",type:"object",schemaType:"array",$data:!0,error:p1e,code(t){const{gen:e,schema:r,schemaCode:n,data:i,$data:a,it:s}=t,{opts:o}=s;if(!a&&r.length===0)return;const c=r.length>=o.loopRequired;if(s.allErrors?u():f(),o.strictRequired){const y=t.parentSchema.properties,{definedProperties:w}=t.it;for(const v of r)if((y==null?void 0:y[v])===void 0&&!w.has(v)){const g=s.schemaEnv.baseId+s.errSchemaPath,_=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,h1e.checkStrictMode)(s,_,s.opts.strictRequired)}}function u(){if(c||a)t.block$data(Iv.nil,h);else for(const y of r)(0,gy.checkReportMissingProp)(t,y)}function f(){const y=e.let("missing");if(c||a){const w=e.let("valid",!0);t.block$data(w,()=>m(y,w)),t.ok(w)}else e.if((0,gy.checkMissingProp)(t,r,y)),(0,gy.reportMissingProp)(t,y),e.else()}function h(){e.forOf("prop",n,y=>{t.setParams({missingProperty:y}),e.if((0,gy.noPropertyInData)(e,i,y,o.ownProperties),()=>t.error())})}function m(y,w){t.setParams({missingProperty:y}),e.forOf(y,n,()=>{e.assign(w,(0,gy.propertyInData)(e,i,y,o.ownProperties)),e.if((0,Iv.not)(w),()=>{t.error(),e.break()})},Iv.nil)}}};q5.default=g1e;var H5={};Object.defineProperty(H5,"__esModule",{value:!0});const Ov=Ar,m1e={message({keyword:t,schemaCode:e}){const r=t==="maxItems"?"more":"fewer";return(0,Ov.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Ov._)`{limit: ${t}}`},y1e={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:m1e,code(t){const{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Ov.operators.GT:Ov.operators.LT;t.fail$data((0,Ov._)`${r}.length ${i} ${n}`)}};H5.default=y1e;var z5={},p1={};Object.defineProperty(p1,"__esModule",{value:!0});const eJ=O5;eJ.code='require("ajv/dist/runtime/equal").default';p1.default=eJ;Object.defineProperty(z5,"__esModule",{value:!0});const wT=f1,Ji=Ar,v1e=ln,b1e=p1,w1e={message:({params:{i:t,j:e}})=>(0,Ji.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ji._)`{i: ${t}, j: ${e}}`},_1e={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:w1e,code(t){const{gen:e,data:r,$data:n,schema:i,parentSchema:a,schemaCode:s,it:o}=t;if(!n&&!i)return;const c=e.let("valid"),u=a.items?(0,wT.getSchemaTypes)(a.items):[];t.block$data(c,f,(0,Ji._)`${s} === false`),t.ok(c);function f(){const w=e.let("i",(0,Ji._)`${r}.length`),v=e.let("j");t.setParams({i:w,j:v}),e.assign(c,!0),e.if((0,Ji._)`${w} > 1`,()=>(h()?m:y)(w,v))}function h(){return u.length>0&&!u.some(w=>w==="object"||w==="array")}function m(w,v){const g=e.name("item"),_=(0,wT.checkDataTypes)(u,g,o.opts.strictNumbers,wT.DataType.Wrong),b=e.const("indices",(0,Ji._)`{}`);e.for((0,Ji._)`;${w}--;`,()=>{e.let(g,(0,Ji._)`${r}[${w}]`),e.if(_,(0,Ji._)`continue`),u.length>1&&e.if((0,Ji._)`typeof ${g} == "string"`,(0,Ji._)`${g} += "_"`),e.if((0,Ji._)`typeof ${b}[${g}] == "number"`,()=>{e.assign(v,(0,Ji._)`${b}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Ji._)`${b}[${g}] = ${w}`)})}function y(w,v){const g=(0,v1e.useFunc)(e,b1e.default),_=e.name("outer");e.label(_).for((0,Ji._)`;${w}--;`,()=>e.for((0,Ji._)`${v} = ${w}; ${v}--;`,()=>e.if((0,Ji._)`${g}(${r}[${w}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(_)})))}}};z5.default=_1e;var V5={};Object.defineProperty(V5,"__esModule",{value:!0});const WR=Ar,E1e=ln,x1e=p1,A1e={message:"must be equal to constant",params:({schemaCode:t})=>(0,WR._)`{allowedValue: ${t}}`},S1e={keyword:"const",$data:!0,error:A1e,code(t){const{gen:e,data:r,$data:n,schemaCode:i,schema:a}=t;n||a&&typeof a=="object"?t.fail$data((0,WR._)`!${(0,E1e.useFunc)(e,x1e.default)}(${r}, ${i})`):t.fail((0,WR._)`${a} !== ${r}`)}};V5.default=S1e;var G5={};Object.defineProperty(G5,"__esModule",{value:!0});const rv=Ar,I1e=ln,O1e=p1,P1e={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,rv._)`{allowedValues: ${t}}`},T1e={keyword:"enum",schemaType:"array",$data:!0,error:P1e,code(t){const{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:s}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");const o=i.length>=s.opts.loopEnum;let c;const u=()=>c??(c=(0,I1e.useFunc)(e,O1e.default));let f;if(o||n)f=e.let("valid"),t.block$data(f,h);else{if(!Array.isArray(i))throw new Error("ajv implementation error");const y=e.const("vSchema",a);f=(0,rv.or)(...i.map((w,v)=>m(y,v)))}t.pass(f);function h(){e.assign(f,!1),e.forOf("v",a,y=>e.if((0,rv._)`${u()}(${r}, ${y})`,()=>e.assign(f,!0).break()))}function m(y,w){const v=i[w];return typeof v=="object"&&v!==null?(0,rv._)`${u()}(${r}, ${y}[${w}])`:(0,rv._)`${r} === ${v}`}}};G5.default=T1e;Object.defineProperty($5,"__esModule",{value:!0});const C1e=k5,R1e=L5,N1e=j5,D1e=F5,M1e=B5,$1e=q5,k1e=H5,L1e=z5,j1e=V5,U1e=G5,F1e=[C1e.default,R1e.default,N1e.default,D1e.default,M1e.default,$1e.default,k1e.default,L1e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},j1e.default,U1e.default];$5.default=F1e;var K5={},Zg={};Object.defineProperty(Zg,"__esModule",{value:!0});Zg.validateAdditionalItems=void 0;const Td=Ar,QR=ln,B1e={message:({params:{len:t}})=>(0,Td.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Td._)`{limit: ${t}}`},q1e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:B1e,code(t){const{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,QR.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}tJ(t,n)}};function tJ(t,e){const{gen:r,schema:n,data:i,keyword:a,it:s}=t;s.items=!0;const o=r.const("len",(0,Td._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Td._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,QR.alwaysValidSchema)(s,n)){const u=r.var("valid",(0,Td._)`${o} <= ${e.length}`);r.if((0,Td.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,o,f=>{t.subschema({keyword:a,dataProp:f,dataPropType:QR.Type.Num},u),s.allErrors||r.if((0,Td.not)(u),()=>r.break())})}}Zg.validateAdditionalItems=tJ;Zg.default=q1e;var W5={},em={};Object.defineProperty(em,"__esModule",{value:!0});em.validateTuple=void 0;const MB=Ar,k_=ln,H1e=Gr,z1e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return rJ(t,"additionalItems",e);r.items=!0,!(0,k_.alwaysValidSchema)(r,e)&&t.ok((0,H1e.validateArray)(t))}};function rJ(t,e,r=t.schema){const{gen:n,parentSchema:i,data:a,keyword:s,it:o}=t;f(i),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=k_.mergeEvaluated.items(n,r.length,o.items));const c=n.name("valid"),u=n.const("len",(0,MB._)`${a}.length`);r.forEach((h,m)=>{(0,k_.alwaysValidSchema)(o,h)||(n.if((0,MB._)`${u} > ${m}`,()=>t.subschema({keyword:s,schemaProp:m,dataProp:m},c)),t.ok(c))});function f(h){const{opts:m,errSchemaPath:y}=o,w=r.length,v=w===h.minItems&&(w===h.maxItems||h[e]===!1);if(m.strictTuples&&!v){const g=`"${s}" is ${w}-tuple, but minItems or maxItems/${e} are not specified or different at path "${y}"`;(0,k_.checkStrictMode)(o,g,m.strictTuples)}}}em.validateTuple=rJ;em.default=z1e;Object.defineProperty(W5,"__esModule",{value:!0});const V1e=em,G1e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,V1e.validateTuple)(t,"items")};W5.default=G1e;var Q5={};Object.defineProperty(Q5,"__esModule",{value:!0});const $B=Ar,K1e=ln,W1e=Gr,Q1e=Zg,Y1e={message:({params:{len:t}})=>(0,$B.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,$B._)`{limit: ${t}}`},J1e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Y1e,code(t){const{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,K1e.alwaysValidSchema)(n,e)&&(i?(0,Q1e.validateAdditionalItems)(t,i):t.ok((0,W1e.validateArray)(t)))}};Q5.default=J1e;var Y5={};Object.defineProperty(Y5,"__esModule",{value:!0});const mo=Ar,zw=ln,X1e={message:({params:{min:t,max:e}})=>e===void 0?(0,mo.str)`must contain at least ${t} valid item(s)`:(0,mo.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,mo._)`{minContains: ${t}}`:(0,mo._)`{minContains: ${t}, maxContains: ${e}}`},Z1e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:X1e,code(t){const{gen:e,schema:r,parentSchema:n,data:i,it:a}=t;let s,o;const{minContains:c,maxContains:u}=n;a.opts.next?(s=c===void 0?1:c,o=u):s=1;const f=e.const("len",(0,mo._)`${i}.length`);if(t.setParams({min:s,max:o}),o===void 0&&s===0){(0,zw.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&s>o){(0,zw.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,zw.alwaysValidSchema)(a,r)){let v=(0,mo._)`${f} >= ${s}`;o!==void 0&&(v=(0,mo._)`${v} && ${f} <= ${o}`),t.pass(v);return}a.items=!0;const h=e.name("valid");o===void 0&&s===1?y(h,()=>e.if(h,()=>e.break())):s===0?(e.let(h,!0),o!==void 0&&e.if((0,mo._)`${i}.length > 0`,m)):(e.let(h,!1),m()),t.result(h,()=>t.reset());function m(){const v=e.name("_valid"),g=e.let("count",0);y(v,()=>e.if(v,()=>w(g)))}function y(v,g){e.forRange("i",0,f,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:zw.Type.Num,compositeRule:!0},v),g()})}function w(v){e.code((0,mo._)`${v}++`),o===void 0?e.if((0,mo._)`${v} >= ${s}`,()=>e.assign(h,!0).break()):(e.if((0,mo._)`${v} > ${o}`,()=>e.assign(h,!1).break()),s===1?e.assign(h,!0):e.if((0,mo._)`${v} >= ${s}`,()=>e.assign(h,!0)))}}};Y5.default=Z1e;var nJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=Ar,r=ln,n=Gr;t.error={message:({params:{property:c,depsCount:u,deps:f}})=>{const h=u===1?"property":"properties";return(0,e.str)`must have ${h} ${f} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:f,missingProperty:h}})=>(0,e._)`{property: ${c},
99
+ missingProperty: ${h},
100
+ depsCount: ${u},
101
+ deps: ${f}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(c){const[u,f]=a(c);s(c,u),o(c,f)}};function a({schema:c}){const u={},f={};for(const h in c){if(h==="__proto__")continue;const m=Array.isArray(c[h])?u:f;m[h]=c[h]}return[u,f]}function s(c,u=c.schema){const{gen:f,data:h,it:m}=c;if(Object.keys(u).length===0)return;const y=f.let("missing");for(const w in u){const v=u[w];if(v.length===0)continue;const g=(0,n.propertyInData)(f,h,w,m.opts.ownProperties);c.setParams({property:w,depsCount:v.length,deps:v.join(", ")}),m.allErrors?f.if(g,()=>{for(const _ of v)(0,n.checkReportMissingProp)(c,_)}):(f.if((0,e._)`${g} && (${(0,n.checkMissingProp)(c,v,y)})`),(0,n.reportMissingProp)(c,y),f.else())}}t.validatePropertyDeps=s;function o(c,u=c.schema){const{gen:f,data:h,keyword:m,it:y}=c,w=f.name("valid");for(const v in u)(0,r.alwaysValidSchema)(y,u[v])||(f.if((0,n.propertyInData)(f,h,v,y.opts.ownProperties),()=>{const g=c.subschema({keyword:m,schemaProp:v},w);c.mergeValidEvaluated(g,w)},()=>f.var(w,!0)),c.ok(w))}t.validateSchemaDeps=o,t.default=i})(nJ);var J5={};Object.defineProperty(J5,"__esModule",{value:!0});const iJ=Ar,ewe=ln,twe={message:"property name must be valid",params:({params:t})=>(0,iJ._)`{propertyName: ${t.propertyName}}`},rwe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:twe,code(t){const{gen:e,schema:r,data:n,it:i}=t;if((0,ewe.alwaysValidSchema)(i,r))return;const a=e.name("valid");e.forIn("key",n,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},a),e.if((0,iJ.not)(a),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(a)}};J5.default=rwe;var y2={};Object.defineProperty(y2,"__esModule",{value:!0});const Vw=Gr,Ho=Ar,nwe=gc,Gw=ln,iwe={message:"must NOT have additional properties",params:({params:t})=>(0,Ho._)`{additionalProperty: ${t.additionalProperty}}`},awe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:iwe,code(t){const{gen:e,schema:r,parentSchema:n,data:i,errsCount:a,it:s}=t;if(!a)throw new Error("ajv implementation error");const{allErrors:o,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Gw.alwaysValidSchema)(s,r))return;const u=(0,Vw.allSchemaProperties)(n.properties),f=(0,Vw.allSchemaProperties)(n.patternProperties);h(),t.ok((0,Ho._)`${a} === ${nwe.default.errors}`);function h(){e.forIn("key",i,g=>{!u.length&&!f.length?w(g):e.if(m(g),()=>w(g))})}function m(g){let _;if(u.length>8){const b=(0,Gw.schemaRefOrVal)(s,n.properties,"properties");_=(0,Vw.isOwnProperty)(e,b,g)}else u.length?_=(0,Ho.or)(...u.map(b=>(0,Ho._)`${g} === ${b}`)):_=Ho.nil;return f.length&&(_=(0,Ho.or)(_,...f.map(b=>(0,Ho._)`${(0,Vw.usePattern)(t,b)}.test(${g})`))),(0,Ho.not)(_)}function y(g){e.code((0,Ho._)`delete ${i}[${g}]`)}function w(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){y(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),o||e.break();return}if(typeof r=="object"&&!(0,Gw.alwaysValidSchema)(s,r)){const _=e.name("valid");c.removeAdditional==="failing"?(v(g,_,!1),e.if((0,Ho.not)(_),()=>{t.reset(),y(g)})):(v(g,_),o||e.if((0,Ho.not)(_),()=>e.break()))}}function v(g,_,b){const S={keyword:"additionalProperties",dataProp:g,dataPropType:Gw.Type.Str};b===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(S,_)}}};y2.default=awe;var X5={};Object.defineProperty(X5,"__esModule",{value:!0});const swe=Eo,kB=Gr,_T=ln,LB=y2,owe={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:n,data:i,it:a}=t;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&LB.default.code(new swe.KeywordCxt(a,LB.default,"additionalProperties"));const s=(0,kB.allSchemaProperties)(r);for(const h of s)a.definedProperties.add(h);a.opts.unevaluated&&s.length&&a.props!==!0&&(a.props=_T.mergeEvaluated.props(e,(0,_T.toHash)(s),a.props));const o=s.filter(h=>!(0,_T.alwaysValidSchema)(a,r[h]));if(o.length===0)return;const c=e.name("valid");for(const h of o)u(h)?f(h):(e.if((0,kB.propertyInData)(e,i,h,a.opts.ownProperties)),f(h),a.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(c);function u(h){return a.opts.useDefaults&&!a.compositeRule&&r[h].default!==void 0}function f(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},c)}}};X5.default=owe;var Z5={};Object.defineProperty(Z5,"__esModule",{value:!0});const jB=Gr,Kw=Ar,UB=ln,FB=ln,cwe={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:n,parentSchema:i,it:a}=t,{opts:s}=a,o=(0,jB.allSchemaProperties)(r),c=o.filter(v=>(0,UB.alwaysValidSchema)(a,r[v]));if(o.length===0||c.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;const u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,f=e.name("valid");a.props!==!0&&!(a.props instanceof Kw.Name)&&(a.props=(0,FB.evaluatedPropsToName)(e,a.props));const{props:h}=a;m();function m(){for(const v of o)u&&y(v),a.allErrors?w(v):(e.var(f,!0),w(v),e.if(f))}function y(v){for(const g in u)new RegExp(v).test(g)&&(0,UB.checkStrictMode)(a,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function w(v){e.forIn("key",n,g=>{e.if((0,Kw._)`${(0,jB.usePattern)(t,v)}.test(${g})`,()=>{const _=c.includes(v);_||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:FB.Type.Str},f),a.opts.unevaluated&&h!==!0?e.assign((0,Kw._)`${h}[${g}]`,!0):!_&&!a.allErrors&&e.if((0,Kw.not)(f),()=>e.break())})})}}};Z5.default=cwe;var e4={};Object.defineProperty(e4,"__esModule",{value:!0});const uwe=ln,lwe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:n}=t;if((0,uwe.alwaysValidSchema)(n,r)){t.fail();return}const i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};e4.default=lwe;var t4={};Object.defineProperty(t4,"__esModule",{value:!0});const fwe=Gr,dwe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fwe.validateUnion,error:{message:"must match a schema in anyOf"}};t4.default=dwe;var r4={};Object.defineProperty(r4,"__esModule",{value:!0});const L_=Ar,hwe=ln,pwe={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,L_._)`{passingSchemas: ${t.passing}}`},gwe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:pwe,code(t){const{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const a=r,s=e.let("valid",!1),o=e.let("passing",null),c=e.name("_valid");t.setParams({passing:o}),e.block(u),t.result(s,()=>t.reset(),()=>t.error(!0));function u(){a.forEach((f,h)=>{let m;(0,hwe.alwaysValidSchema)(i,f)?e.var(c,!0):m=t.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},c),h>0&&e.if((0,L_._)`${c} && ${s}`).assign(s,!1).assign(o,(0,L_._)`[${o}, ${h}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(o,h),m&&t.mergeEvaluated(m,L_.Name)})})}}};r4.default=gwe;var n4={};Object.defineProperty(n4,"__esModule",{value:!0});const mwe=ln,ywe={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=e.name("valid");r.forEach((a,s)=>{if((0,mwe.alwaysValidSchema)(n,a))return;const o=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(o)})}};n4.default=ywe;var i4={};Object.defineProperty(i4,"__esModule",{value:!0});const LE=Ar,aJ=ln,vwe={message:({params:t})=>(0,LE.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,LE._)`{failingKeyword: ${t.ifClause}}`},bwe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:vwe,code(t){const{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,aJ.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=BB(n,"then"),a=BB(n,"else");if(!i&&!a)return;const s=e.let("valid",!0),o=e.name("_valid");if(c(),t.reset(),i&&a){const f=e.let("ifClause");t.setParams({ifClause:f}),e.if(o,u("then",f),u("else",f))}else i?e.if(o,u("then")):e.if((0,LE.not)(o),u("else"));t.pass(s,()=>t.error(!0));function c(){const f=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(f)}function u(f,h){return()=>{const m=t.subschema({keyword:f},o);e.assign(s,o),t.mergeValidEvaluated(m,s),h?e.assign(h,(0,LE._)`${f}`):t.setParams({ifClause:f})}}}};function BB(t,e){const r=t.schema[e];return r!==void 0&&!(0,aJ.alwaysValidSchema)(t,r)}i4.default=bwe;var a4={};Object.defineProperty(a4,"__esModule",{value:!0});const wwe=ln,_we={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,wwe.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};a4.default=_we;Object.defineProperty(K5,"__esModule",{value:!0});const Ewe=Zg,xwe=W5,Awe=em,Swe=Q5,Iwe=Y5,Owe=nJ,Pwe=J5,Twe=y2,Cwe=X5,Rwe=Z5,Nwe=e4,Dwe=t4,Mwe=r4,$we=n4,kwe=i4,Lwe=a4;function jwe(t=!1){const e=[Nwe.default,Dwe.default,Mwe.default,$we.default,kwe.default,Lwe.default,Pwe.default,Twe.default,Owe.default,Cwe.default,Rwe.default];return t?e.push(xwe.default,Swe.default):e.push(Ewe.default,Awe.default),e.push(Iwe.default),e}K5.default=jwe;var s4={},o4={};Object.defineProperty(o4,"__esModule",{value:!0});const gi=Ar,Uwe={message:({schemaCode:t})=>(0,gi.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,gi._)`{format: ${t}}`},Fwe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Uwe,code(t,e){const{gen:r,data:n,$data:i,schema:a,schemaCode:s,it:o}=t,{opts:c,errSchemaPath:u,schemaEnv:f,self:h}=o;if(!c.validateFormats)return;i?m():y();function m(){const w=r.scopeValue("formats",{ref:h.formats,code:c.code.formats}),v=r.const("fDef",(0,gi._)`${w}[${s}]`),g=r.let("fType"),_=r.let("format");r.if((0,gi._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,gi._)`${v}.type || "string"`).assign(_,(0,gi._)`${v}.validate`),()=>r.assign(g,(0,gi._)`"string"`).assign(_,v)),t.fail$data((0,gi.or)(b(),S()));function b(){return c.strictSchema===!1?gi.nil:(0,gi._)`${s} && !${_}`}function S(){const A=f.$async?(0,gi._)`(${v}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,gi._)`${_}(${n})`,I=(0,gi._)`(typeof ${_} == "function" ? ${A} : ${_}.test(${n}))`;return(0,gi._)`${_} && ${_} !== true && ${g} === ${e} && !${I}`}}function y(){const w=h.formats[a];if(!w){b();return}if(w===!0)return;const[v,g,_]=S(w);v===e&&t.pass(A());function b(){if(c.strictSchema===!1){h.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${a}" ignored in schema at path "${u}"`}}function S(I){const E=I instanceof RegExp?(0,gi.regexpCode)(I):c.code.formats?(0,gi._)`${c.code.formats}${(0,gi.getProperty)(a)}`:void 0,p=r.scopeValue("formats",{key:a,ref:I,code:E});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,gi._)`${p}.validate`]:["string",I,p]}function A(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!f.$async)throw new Error("async format in sync schema");return(0,gi._)`await ${_}(${n})`}return typeof g=="function"?(0,gi._)`${_}(${n})`:(0,gi._)`${_}.test(${n})`}}}};o4.default=Fwe;Object.defineProperty(s4,"__esModule",{value:!0});const Bwe=o4,qwe=[Bwe.default];s4.default=qwe;var Pg={};Object.defineProperty(Pg,"__esModule",{value:!0});Pg.contentVocabulary=Pg.metadataVocabulary=void 0;Pg.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Pg.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(N5,"__esModule",{value:!0});const Hwe=D5,zwe=$5,Vwe=K5,Gwe=s4,qB=Pg,Kwe=[Hwe.default,zwe.default,(0,Vwe.default)(),Gwe.default,qB.metadataVocabulary,qB.contentVocabulary];N5.default=Kwe;var c4={},sJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))})(sJ);Object.defineProperty(c4,"__esModule",{value:!0});const Dp=Ar,YR=sJ,HB=ps,Wwe=ln,Qwe={message:({params:{discrError:t,tagName:e}})=>t===YR.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Dp._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Ywe={keyword:"discriminator",type:"object",schemaType:"object",error:Qwe,code(t){const{gen:e,data:r,schema:n,parentSchema:i,it:a}=t,{oneOf:s}=i;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const c=e.let("valid",!1),u=e.const("tag",(0,Dp._)`${r}${(0,Dp.getProperty)(o)}`);e.if((0,Dp._)`typeof ${u} == "string"`,()=>f(),()=>t.error(!1,{discrError:YR.DiscrError.Tag,tag:u,tagName:o})),t.ok(c);function f(){const y=m();e.if(!1);for(const w in y)e.elseIf((0,Dp._)`${u} === ${w}`),e.assign(c,h(y[w]));e.else(),t.error(!1,{discrError:YR.DiscrError.Mapping,tag:u,tagName:o}),e.endIf()}function h(y){const w=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:y},w);return t.mergeEvaluated(v,Dp.Name),w}function m(){var y;const w={},v=_(i);let g=!0;for(let A=0;A<s.length;A++){let I=s[A];I!=null&&I.$ref&&!(0,Wwe.schemaHasRulesButRef)(I,a.self.RULES)&&(I=HB.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,I==null?void 0:I.$ref),I instanceof HB.SchemaEnv&&(I=I.schema));const E=(y=I==null?void 0:I.properties)===null||y===void 0?void 0:y[o];if(typeof E!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);g=g&&(v||_(I)),b(E,A)}if(!g)throw new Error(`discriminator: "${o}" must be required`);return w;function _({required:A}){return Array.isArray(A)&&A.includes(o)}function b(A,I){if(A.const)S(A.const,I);else if(A.enum)for(const E of A.enum)S(E,I);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function S(A,I){if(typeof A!="string"||A in w)throw new Error(`discriminator: "${o}" values must be unique strings`);w[A]=I}}}};c4.default=Ywe;const Jwe="http://json-schema.org/draft-07/schema#",Xwe="http://json-schema.org/draft-07/schema#",Zwe="Core schema meta-schema",e_e={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},t_e=["object","boolean"],r_e={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},n_e={$schema:Jwe,$id:Xwe,title:Zwe,definitions:e_e,type:t_e,properties:r_e,default:!0};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const r=OY,n=N5,i=c4,a=n_e,s=["/properties"],o="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(w,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.exports=e=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=Eo;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var f=Ar;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var h=d1;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var m=h1;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(zR,zR.exports);var oJ=zR.exports,JR={exports:{}},XR={exports:{}},ZR={exports:{}},e6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Ar,n=["undefined","string","number","object","function","boolean","symbol"];function i(){return{keyword:"typeof",schemaType:["string","array"],code(a){const{data:s,schema:o,schemaValue:c}=a;a.fail(typeof o=="string"?(0,r._)`typeof ${s} != ${o}`:(0,r._)`${c}.indexOf(typeof ${s}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}e.default=i,t.exports=i})(e6,e6.exports);var i_e=e6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(i_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(ZR,ZR.exports);var a_e=ZR.exports,t6={exports:{}},r6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer<"u"&&(r.Buffer=Buffer),typeof Promise<"u"&&(r.Promise=Promise);const n=Object.assign(i,{CONSTRUCTORS:r});function i(){return{keyword:"instanceof",schemaType:["string","array"],compile(s){if(typeof s=="string"){const o=a(s);return c=>c instanceof o}if(Array.isArray(s)){const o=s.map(a);return c=>{for(const u of o)if(c instanceof u)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function a(s){const o=r[s];if(o)return o;throw new Error(`invalid "instanceof" keyword value ${s}`)}e.default=n,t.exports=n})(r6,r6.exports);var s_e=r6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(s_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(t6,t6.exports);var o_e=t6.exports,n6={exports:{}},i6={exports:{}},v2={};Object.defineProperty(v2,"__esModule",{value:!0});function c_e(t){return()=>({keyword:t,type:"number",schemaType:"array",macro:function([r,n]){return e(r,n),t==="range"?{minimum:r,maximum:n}:{exclusiveMinimum:r,exclusiveMaximum:n}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function e(r,n){if(r>n||t==="exclusiveRange"&&r===n)throw new Error("There are no numbers in range")}}v2.default=c_e;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(v2).default)("range");e.default=i,t.exports=i})(i6,i6.exports);var u_e=i6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(u_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(n6,n6.exports);var l_e=n6.exports,a6={exports:{}},s6={exports:{}};(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(v2).default)("exclusiveRange");e.default=i,t.exports=i})(s6,s6.exports);var f_e=s6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(f_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(a6,a6.exports);var d_e=a6.exports,o6={exports:{}},c6={exports:{}},rl={};Object.defineProperty(rl,"__esModule",{value:!0});rl.usePattern=rl.metaSchemaRef=void 0;const h_e=Ar,p_e="http://json-schema.org/schema";function g_e({defaultMeta:t}={}){return t===!1?{}:{$ref:t||p_e}}rl.metaSchemaRef=g_e;function m_e({gen:t,it:{opts:e}},r,n=e.unicodeRegExp?"u":""){const i=new RegExp(r,n);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,h_e._)`new RegExp(${r}, ${n})`})}rl.usePattern=m_e;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Ar,n=rl,i={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},a=/^\/(.*)\/([gimuy]*)$/;function s(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(o){const{data:c,schema:u}=o,f=h(u);o.pass((0,r._)`${f}.test(${c})`);function h(m){if(typeof m=="object")return(0,n.usePattern)(o,m.pattern,m.flags);const y=a.exec(m);if(y)return(0,n.usePattern)(o,y[1],y[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},i]}}}e.default=s,t.exports=s})(c6,c6.exports);var y_e=c6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(y_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(o6,o6.exports);var v_e=o6.exports,u6={exports:{}},l6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Ar,n={trimStart:c=>c.trimStart(),trimEnd:c=>c.trimEnd(),trimLeft:c=>c.trimStart(),trimRight:c=>c.trimEnd(),trim:c=>c.trim(),toLowerCase:c=>c.toLowerCase(),toUpperCase:c=>c.toUpperCase(),toEnumCase:(c,u)=>(u==null?void 0:u.hash[o(c)])||c},i=Object.assign(a,{transform:n});function a(){return{keyword:"transform",schemaType:"array",before:"enum",code(c){const{gen:u,data:f,schema:h,parentSchema:m,it:y}=c,{parentData:w,parentDataProperty:v}=y,g=h;if(!g.length)return;let _;if(g.includes("toEnumCase")){const S=s(m);_=u.scopeValue("obj",{ref:S,code:(0,r.stringify)(S)})}u.if((0,r._)`typeof ${f} == "string" && ${w} !== undefined`,()=>{u.assign(f,b(g.slice())),u.assign((0,r._)`${w}[${v}]`,f)});function b(S){if(!S.length)return f;const A=S.pop();if(!(A in n))throw new Error(`transform: unknown transformation ${A}`);const I=u.scopeValue("func",{ref:n[A],code:(0,r._)`require("ajv-keywords/dist/definitions/transform").transform${(0,r.getProperty)(A)}`}),E=b(S);return _&&A==="toEnumCase"?(0,r._)`${I}(${E}, ${_})`:(0,r._)`${I}(${E})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}function s(c){const u={hash:{}};if(!c.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const f of c.enum){if(typeof f!="string")continue;const h=o(f);if(u.hash[h])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');u.hash[h]=f}return u}function o(c){return c.toLowerCase()}e.default=i,t.exports=i})(l6,l6.exports);var b_e=l6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(b_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(u6,u6.exports);var w_e=u6.exports,f6={exports:{}},d6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=O5,n=["number","integer","string","boolean","null"];function i(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(s,o){const c=a(s,o);return u=>{if(u.length<=1)return!0;for(let f=0;f<s.length;f++){const h=s[f];if(c[f]){const m={};for(const y of u){if(!y||typeof y!="object")continue;let w=y[h];if(!(w&&typeof w=="object")){if(typeof w=="string"&&(w='"'+w),m[w])return!1;m[w]=!0}}}else for(let m=u.length;m--;){const y=u[m];if(!(!y||typeof y!="object"))for(let w=m;w--;){const v=u[w];if(v&&typeof v=="object"&&r(y[h],v[h]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}e.default=i;function a(s,o){return s.map(c=>{var u,f,h;const m=(h=(f=(u=o.items)===null||u===void 0?void 0:u.properties)===null||f===void 0?void 0:f[c])===null||h===void 0?void 0:h.type;return Array.isArray(m)?!m.includes("object")&&!m.includes("array"):n.includes(m)})}t.exports=i})(d6,d6.exports);var __e=d6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(__e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(f6,f6.exports);var E_e=f6.exports,h6={exports:{}},p6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});function r(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(n,i){if(!n)return!0;const a=Object.keys(i.properties);return a.length===0?!0:{required:a}},dependencies:["properties"]}}e.default=r,t.exports=r})(p6,p6.exports);var x_e=p6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(x_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(h6,h6.exports);var A_e=h6.exports,g6={exports:{}},m6={exports:{}},b2={};Object.defineProperty(b2,"__esModule",{value:!0});function S_e(t){return()=>({keyword:t,type:"object",schemaType:"array",macro(e){return e.length===0?!0:e.length===1?{required:e}:{[t==="anyRequired"?"anyOf":"oneOf"]:e.map(n=>({required:[n]}))}},metaSchema:{type:"array",items:{type:"string"}}})}b2.default=S_e;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(b2).default)("anyRequired");e.default=i,t.exports=i})(m6,m6.exports);var I_e=m6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(I_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(g6,g6.exports);var O_e=g6.exports,y6={exports:{}},v6={exports:{}};(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const i=(0,r(b2).default)("oneRequired");e.default=i,t.exports=i})(v6,v6.exports);var P_e=v6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(P_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(y6,y6.exports);var T_e=y6.exports,b6={exports:{}},w6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Ar,n=rl,i={message:({params:{missingPattern:s}})=>(0,r.str)`should have property matching pattern '${s}'`,params:({params:{missingPattern:s}})=>(0,r._)`{missingPattern: ${s}}`};function a(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:i,code(s){const{gen:o,schema:c,data:u}=s;if(c.length===0)return;const f=o.let("valid",!0);for(const m of c)h(m);function h(m){const y=o.let("matched",!1);o.forIn("key",u,w=>{o.assign(y,(0,r._)`${(0,n.usePattern)(s,m)}.test(${w})`),o.if(y,()=>o.break())}),s.setParams({missingPattern:m}),o.assign(f,(0,r.and)(f,y)),s.pass(f)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}e.default=a,t.exports=a})(w6,w6.exports);var C_e=w6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(C_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(b6,b6.exports);var R_e=b6.exports,_6={exports:{}},E6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});function r(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(n){return n.length===0?!0:n.length===1?{not:{required:n}}:{not:{anyOf:n.map(i=>({required:[i]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}e.default=r,t.exports=r})(E6,E6.exports);var N_e=E6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(N_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(_6,_6.exports);var D_e=_6.exports,x6={exports:{}},A6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=rl;function n(s){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(o){const c=[];for(const u in o)c.push(i(u,o[u]));return{allOf:c}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,r.metaSchemaRef)(s)}}}e.default=n;function i(s,o){const c=s.split("/"),u={};let f=u;for(let h=1;h<c.length;h++){let m=c[h];const y=h===c.length-1;m=a(m);const w=f.properties={};let v;if(/[0-9]+/.test(m)){let g=+m;for(v=f.items=[],f.type=["object","array"];g--;)v.push({})}else f.type="object";f=y?o:{},w[m]=f,v&&v.push(f)}return u}function a(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}t.exports=n})(A6,A6.exports);var M_e=A6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(M_e),i=(a,s)=>a.addKeyword((0,n.default)(s));e.default=i,t.exports=i})(x6,x6.exports);var $_e=x6.exports,S6={exports:{}},I6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Ar;function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(a){const{schema:s,data:o}=a,c=s.map(f=>(0,r._)`(${u(f)}) === undefined`);a.fail((0,r.or)(...c));function u(f){if(f==="")throw new Error("empty JSON pointer not allowed");const h=f.split("/");let m=o;const y=h.map((w,v)=>v?m=(0,r._)`${m}${(0,r.getProperty)(i(w))}`:m);return(0,r.and)(...y)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}e.default=n;function i(a){return a.replace(/~1/g,"/").replace(/~0/g,"~")}t.exports=n})(I6,I6.exports);var k_e=I6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(k_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(S6,S6.exports);var L_e=S6.exports,O6={exports:{}},P6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r={},n={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:f=>{var h;const m=(h=f==null?void 0:f.max)!==null&&h!==void 0?h:2;return()=>Math.floor(Math.random()*m)},seq:f=>{var h;const m=(h=f==null?void 0:f.name)!==null&&h!==void 0?h:"";return r[m]||(r[m]=0),()=>r[m]++}},i=Object.assign(a,{DEFAULTS:n});function a(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(f,h,m){if(!m.opts.useDefaults||m.compositeRule)return()=>!0;const y={};for(const v in f)y[v]=s(f[v]);const w=m.opts.useDefaults==="empty";return v=>{for(const g in f)(v[g]===void 0||w&&(v[g]===null||v[g]===""))&&(v[g]=y[g]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function s(f){return typeof f=="object"?o(f):c(f)}function o({func:f,args:h}){const m=n[f];return u(f,m),m(h)}function c(f=""){const h=n[f];return u(f,h),h()}function u(f,h){if(!h)throw new Error(`invalid "dynamicDefaults" keyword property value: ${f}`)}e.default=i,t.exports=i})(P6,P6.exports);var j_e=P6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(j_e),i=a=>a.addKeyword((0,n.default)());e.default=i,t.exports=i})(O6,O6.exports);var U_e=O6.exports,T6={exports:{}},C6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Ar,n=rl,i={message:({params:{schemaProp:s}})=>s?(0,r.str)`should match case "${s}" schema`:(0,r.str)`should match default case schema`,params:({params:{schemaProp:s}})=>s?(0,r._)`{failingCase: ${s}}`:(0,r._)`{failingDefault: true}`};function a(s){const o=(0,n.metaSchemaRef)(s);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:i,dependencies:["selectCases"],code(c){const{gen:u,schemaCode:f,parentSchema:h}=c;c.block$data(r.nil,()=>{const m=u.let("valid",!0),y=u.name("_valid"),w=u.const("value",(0,r._)`${f} === null ? "null" : ${f}`);u.if(!1);for(const v in h.selectCases){c.setParams({schemaProp:v}),u.elseIf((0,r._)`"" + ${w} == ${v}`);const g=c.subschema({keyword:"selectCases",schemaProp:v},y);c.mergeEvaluated(g,r.Name),u.assign(m,y)}if(u.else(),h.selectDefault!==void 0){c.setParams({schemaProp:void 0});const v=c.subschema({keyword:"selectDefault"},y);c.mergeEvaluated(v,r.Name),u.assign(m,y)}u.endIf(),c.pass(m)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:o}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:o}]}e.default=a,t.exports=a})(C6,C6.exports);var F_e=C6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(F_e),i=(a,s)=>((0,n.default)(s).forEach(o=>a.addKeyword(o)),a);e.default=i,t.exports=i})(T6,T6.exports);var B_e=T6.exports;(function(t,e){var r=ke&&ke.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(a_e),i=r(o_e),a=r(l_e),s=r(d_e),o=r(v_e),c=r(w_e),u=r(E_e),f=r(A_e),h=r(O_e),m=r(T_e),y=r(R_e),w=r(D_e),v=r($_e),g=r(L_e),_=r(U_e),b=r(B_e),S={typeof:n.default,instanceof:i.default,range:a.default,exclusiveRange:s.default,regexp:o.default,transform:c.default,uniqueItemProperties:u.default,allRequired:f.default,anyRequired:h.default,oneRequired:m.default,patternRequired:y.default,prohibited:w.default,deepProperties:v.default,deepRequired:g.default,dynamicDefaults:_.default,select:b.default};e.default=S,t.exports=S})(XR,XR.exports);var q_e=XR.exports;(function(t,e){var r=ke&&ke.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0});const n=r(q_e),i=(s,o)=>{if(Array.isArray(o)){for(const c of o)a(c)(s);return s}if(o)return a(o)(s),s;for(o in n.default)a(o)(s);return s};i.get=a;function a(s){const o=n.default[s];if(!o)throw new Error("Unknown keyword "+s);return o}e.default=i,t.exports=i,t.exports.default=i})(JR,JR.exports);var H_e=JR.exports,R6={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=oJ,n=Ar,i=Og,a=Eo,s=Xg,o=gc,c="errorMessage",u=new r.Name("emUsed"),f={required:"missingProperty",dependencies:"property",dependentRequired:"property"},h=/\$\{[^}]+\}/,m=/\$\{([^}]+)\}/g,y=/^""\s*\+\s*|\s*\+\s*""$/g;function w(g){return{keyword:c,schemaType:["string","object"],post:!0,code(_){const{gen:b,data:S,schema:A,schemaValue:I,it:E}=_;if(E.createErrors===!1)return;const p=A,O=n.strConcat(o.default.instancePath,E.errorPath);b.if(r._`${o.default.errors} > 0`,()=>{if(typeof p=="object"){const[k,$]=F(p);$&&V($),k&&de(k),ve(N(p))}const q=typeof p=="string"?p:p._;q&&U(q),g.keepErrors||L()});function N({properties:q,items:k}){const $={};if(q){$.props={};for(const G in q)$.props[G]=[]}if(k){$.items={};for(let G=0;G<k.length;G++)$.items[G]=[]}return $}function F(q){let k,$;for(const G in q){if(G==="properties"||G==="items")continue;const pe=q[G];if(typeof pe=="object"){k||(k={});const Y=k[G]={};for(const te in pe)Y[te]=[]}else $||($={}),$[G]=[]}return[k,$]}function V(q){const k=b.const("emErrors",r.stringify(q)),$=b.const("templates",B(q,A));b.forOf("err",o.default.vErrors,te=>b.if(Q(te,k),()=>b.code(r._`${k}[${te}.keyword].push(${te})`).assign(r._`${te}.${u}`,!0)));const{singleError:G}=g;if(G){const te=b.let("message",r._`""`),ce=b.let("paramsErrors",r._`[]`);pe(T=>{b.if(te,()=>b.code(r._`${te} += ${typeof G=="string"?G:";"}`)),b.code(r._`${te} += ${Y(T)}`),b.assign(ce,r._`${ce}.concat(${k}[${T}])`)}),s.reportError(_,{message:te,params:r._`{errors: ${ce}}`})}else pe(te=>s.reportError(_,{message:Y(te),params:r._`{errors: ${k}[${te}]}`}));function pe(te){b.forIn("key",k,ce=>b.if(r._`${k}[${ce}].length`,()=>te(ce)))}function Y(te){return r._`${te} in ${$} ? ${$}[${te}]() : ${I}[${te}]`}}function de(q){const k=b.const("emErrors",r.stringify(q)),$=[];for(const ce in q)$.push([ce,B(q[ce],A[ce])]);const G=b.const("templates",b.object(...$)),pe=b.scopeValue("obj",{ref:f,code:r.stringify(f)}),Y=b.let("emPropParams"),te=b.let("emParamsErrors");b.forOf("err",o.default.vErrors,ce=>b.if(Q(ce,k),()=>{b.assign(Y,r._`${pe}[${ce}.keyword]`),b.assign(te,r._`${k}[${ce}.keyword][${ce}.params[${Y}]]`),b.if(te,()=>b.code(r._`${te}.push(${ce})`).assign(r._`${ce}.${u}`,!0))})),b.forIn("key",k,ce=>b.forIn("keyProp",r._`${k}[${ce}]`,T=>{b.assign(te,r._`${k}[${ce}][${T}]`),b.if(r._`${te}.length`,()=>{const le=b.const("tmpl",r._`${G}[${ce}] && ${G}[${ce}][${T}]`);s.reportError(_,{message:r._`${le} ? ${le}() : ${I}[${ce}][${T}]`,params:r._`{errors: ${te}}`})})}))}function ve(q){const{props:k,items:$}=q;if(!k&&!$)return;const G=r._`typeof ${S} == "object"`,pe=r._`Array.isArray(${S})`,Y=b.let("emErrors");let te,ce;const T=b.let("templates");k&&$?(te=b.let("emChildKwd"),b.if(G),b.if(pe,()=>{le($,A.items),b.assign(te,r.str`items`)},()=>{le(k,A.properties),b.assign(te,r.str`properties`)}),ce=r._`[${te}]`):$?(b.if(pe),le($,A.items),ce=r._`.items`):k&&(b.if(n.and(G,n.not(pe))),le(k,A.properties),ce=r._`.properties`),b.forOf("err",o.default.vErrors,ze=>ne(ze,Y,et=>b.code(r._`${Y}[${et}].push(${ze})`).assign(r._`${ze}.${u}`,!0))),b.forIn("key",Y,ze=>b.if(r._`${Y}[${ze}].length`,()=>{s.reportError(_,{message:r._`${ze} in ${T} ? ${T}[${ze}]() : ${I}${ce}[${ze}]`,params:r._`{errors: ${Y}[${ze}]}`}),b.assign(r._`${o.default.vErrors}[${o.default.errors}-1].instancePath`,r._`${O} + "/" + ${ze}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),b.endIf();function le(ze,et){b.assign(Y,r.stringify(ze)),b.assign(T,B(ze,et))}}function U(q){const k=b.const("emErrs",r._`[]`);b.forOf("err",o.default.vErrors,$=>b.if(j($),()=>b.code(r._`${k}.push(${$})`).assign(r._`${$}.${u}`,!0))),b.if(r._`${k}.length`,()=>s.reportError(_,{message:H(q),params:r._`{errors: ${k}}`}))}function L(){const q=b.const("emErrs",r._`[]`);b.forOf("err",o.default.vErrors,k=>b.if(r._`!${k}.${u}`,()=>b.code(r._`${q}.push(${k})`))),b.assign(o.default.vErrors,q).assign(o.default.errors,r._`${q}.length`)}function Q(q,k){return n.and(r._`${q}.keyword !== ${c}`,r._`!${q}.${u}`,r._`${q}.instancePath === ${O}`,r._`${q}.keyword in ${k}`,r._`${q}.schemaPath.indexOf(${E.errSchemaPath}) === 0`,r._`/^\\/[^\\/]*$/.test(${q}.schemaPath.slice(${E.errSchemaPath.length}))`)}function ne(q,k,$){b.if(n.and(r._`${q}.keyword !== ${c}`,r._`!${q}.${u}`,r._`${q}.instancePath.indexOf(${O}) === 0`),()=>{const G=b.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:r._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),pe=b.const("emMatches",r._`${G}.exec(${q}.instancePath.slice(${O}.length))`),Y=b.const("emChild",r._`${pe} && ${pe}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);b.if(r._`${Y} !== undefined && ${Y} in ${k}`,()=>$(Y))})}function j(q){return n.and(r._`${q}.keyword !== ${c}`,r._`!${q}.${u}`,n.or(r._`${q}.instancePath === ${O}`,n.and(r._`${q}.instancePath.indexOf(${O}) === 0`,r._`${q}.instancePath[${O}.length] === "/"`)),r._`${q}.schemaPath.indexOf(${E.errSchemaPath}) === 0`,r._`${q}.schemaPath[${E.errSchemaPath}.length] === "/"`)}function B(q,k){const $=[];for(const G in q){const pe=k[G];h.test(pe)&&$.push([G,M(pe)])}return b.object(...$)}function H(q){return h.test(q)?new i._Code(i.safeStringify(q).replace(m,(k,$)=>`" + JSON.stringify(${a.getData($,E)}) + "`).replace(y,"")):r.stringify(q)}function M(q){return r._`function(){return ${H(q)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const v=(g,_={})=>{if(!g.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(g.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return g.addKeyword(w(_))};e.default=v,t.exports=v,t.exports.default=v})(R6,R6.exports);var z_e=R6.exports,u4=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.validateType=Tt.generateLazyValidator=Tt.Ajv=void 0;const cJ=u4(oJ);Tt.Ajv=cJ.default;const V_e=u4(H_e),G_e=u4(z_e);function K_e(t,e){let r=null;const n=(i,a)=>{if(!r){const s=new cJ.default({$data:!0,allErrors:!0});(0,V_e.default)(s),(0,G_e.default)(s,{singleError:!0}),e==null||e.forEach(o=>s.addKeyword(o)),r=s.compile(t),Object.defineProperty(n,"errors",{get(){return r==null?void 0:r.errors}})}return r(i,a)};return n}Tt.generateLazyValidator=K_e;function W_e(t,e){return t.validate(e)}Tt.validateType=W_e;var ET={},zB;function uJ(){return zB||(zB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=t.ChainName=void 0;const e=Tt,r=Bs();var n;(function(a){a.ETHEREUM_MAINNET="Ethereum Mainnet",a.ETHEREUM_ROPSTEN="Ropsten",a.ETHEREUM_RINKEBY="Rinkeby",a.ETHEREUM_GOERLI="Goerli",a.ETHEREUM_KOVAN="Kovan",a.ETHEREUM_SEPOLIA="Sepolia",a.MATIC_MAINNET="Polygon",a.MATIC_MUMBAI="Mumbai"})(n=t.ChainName||(t.ChainName={}));function i(a){switch(a){case n.ETHEREUM_MAINNET:return r.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return r.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return r.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return r.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return r.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return r.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return r.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return r.ChainId.MATIC_MUMBAI;default:return null}}t.getChainId=i,function(a){a.schema={type:"string",enum:Object.values(a)},a.validate=(0,e.generateLazyValidator)(a.schema)}(n=t.ChainName||(t.ChainName={}))}(ET)),ET}var Do={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;const e=Tt;(function(r){r.ETHEREUM="ETHEREUM",r.MATIC="MATIC"})(t.Network||(t.Network={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.Network||(t.Network={}))})(Do);var VB;function Bs(){return VB||(VB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getNetwork=t.getNetworkMapping=t.getURNProtocol=t.getChainName=t.ChainId=void 0;const e=Tt,r=uJ(),n=Do;var i;(function(u){u[u.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",u[u.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",u[u.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",u[u.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",u[u.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",u[u.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",u[u.MATIC_MAINNET=137]="MATIC_MAINNET",u[u.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(i=t.ChainId||(t.ChainId={}));function a(u){switch(u){case i.ETHEREUM_MAINNET:return r.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return r.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return r.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return r.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return r.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return r.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return r.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return r.ChainName.MATIC_MUMBAI;default:return null}}t.getChainName=a;function s(u){switch(u){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai"}}t.getURNProtocol=s;function o(u){switch(u){case i.ETHEREUM_MAINNET:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.ETHEREUM_ROPSTEN:return{[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_RINKEBY:return{[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_GOERLI:return{[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_KOVAN:return{[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_SEPOLIA:return{[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.MATIC_MAINNET:return{[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.MATIC_MUMBAI:return{[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI}}}t.getNetworkMapping=o;function c(u){switch(u){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:return n.Network.MATIC}}t.getNetwork=c,function(u){u.schema={type:"number",enum:Object.values(u)},u.validate=(0,e.generateLazyValidator)(u.schema)}(i=t.ChainId||(t.ChainId={}))}(mT)),mT}var sc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderType=void 0;const e=Tt;(function(r){r.INJECTED="injected",r.MAGIC="magic",r.FORTMATIC="formatic",r.NETWORK="network",r.WALLET_CONNECT="wallet_connect",r.WALLET_CONNECT_V2="wallet_connect_v2",r.WALLET_LINK="wallet_link",r.METAMASK_MOBILE="metamask_mobile"})(t.ProviderType||(t.ProviderType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.ProviderType||(t.ProviderType={}))})(sc);var l4={},w2={},f4={exports:{}},g0=typeof Reflect=="object"?Reflect:null,GB=g0&&typeof g0.apply=="function"?g0.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},j_;g0&&typeof g0.ownKeys=="function"?j_=g0.ownKeys:Object.getOwnPropertySymbols?j_=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:j_=function(e){return Object.getOwnPropertyNames(e)};function Q_e(t){console&&console.warn&&console.warn(t)}var lJ=Number.isNaN||function(e){return e!==e};function Cn(){Cn.init.call(this)}f4.exports=Cn;f4.exports.once=Z_e;Cn.EventEmitter=Cn;Cn.prototype._events=void 0;Cn.prototype._eventsCount=0;Cn.prototype._maxListeners=void 0;var KB=10;function _2(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Cn,"defaultMaxListeners",{enumerable:!0,get:function(){return KB},set:function(t){if(typeof t!="number"||t<0||lJ(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");KB=t}});Cn.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Cn.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||lJ(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function fJ(t){return t._maxListeners===void 0?Cn.defaultMaxListeners:t._maxListeners}Cn.prototype.getMaxListeners=function(){return fJ(this)};Cn.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var s;if(r.length>0&&(s=r[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=a[e];if(c===void 0)return!1;if(typeof c=="function")GB(c,this,r);else for(var u=c.length,f=mJ(c,u),n=0;n<u;++n)GB(f[n],this,r);return!0};function dJ(t,e,r,n){var i,a,s;if(_2(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),s=a[e]),s===void 0)s=a[e]=r,++t._eventsCount;else if(typeof s=="function"?s=a[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),i=fJ(t),i>0&&s.length>i&&!s.warned){s.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=t,o.type=e,o.count=s.length,Q_e(o)}return t}Cn.prototype.addListener=function(e,r){return dJ(this,e,r,!1)};Cn.prototype.on=Cn.prototype.addListener;Cn.prototype.prependListener=function(e,r){return dJ(this,e,r,!0)};function Y_e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function hJ(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=Y_e.bind(n);return i.listener=r,n.wrapFn=i,i}Cn.prototype.once=function(e,r){return _2(r),this.on(e,hJ(this,e,r)),this};Cn.prototype.prependOnceListener=function(e,r){return _2(r),this.prependListener(e,hJ(this,e,r)),this};Cn.prototype.removeListener=function(e,r){var n,i,a,s,o;if(_2(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(a=-1,s=n.length-1;s>=0;s--)if(n[s]===r||n[s].listener===r){o=n[s].listener,a=s;break}if(a<0)return this;a===0?n.shift():J_e(n,a),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,o||r)}return this};Cn.prototype.off=Cn.prototype.removeListener;Cn.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var a=Object.keys(n),s;for(i=0;i<a.length;++i)s=a[i],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function pJ(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?X_e(i):mJ(i,i.length)}Cn.prototype.listeners=function(e){return pJ(this,e,!0)};Cn.prototype.rawListeners=function(e){return pJ(this,e,!1)};Cn.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):gJ.call(t,e)};Cn.prototype.listenerCount=gJ;function gJ(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Cn.prototype.eventNames=function(){return this._eventsCount>0?j_(this._events):[]};function mJ(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function J_e(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function X_e(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function Z_e(t,e){return new Promise(function(r,n){function i(s){t.removeListener(e,a),n(s)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}yJ(t,e,a,{once:!0}),e!=="error"&&eEe(t,i,{once:!0})})}function eEe(t,e,r){typeof t.on=="function"&&yJ(t,"error",e,r)}function yJ(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(a){n.once&&t.removeEventListener(e,i),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var Es=f4.exports;const d4=Df(Es);var Pv;(function(t){t.Update="Web3ReactUpdate",t.Error="Web3ReactError",t.Deactivate="Web3ReactDeactivate"})(Pv||(Pv={}));function tEe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var E2=function(t){tEe(e,t);function e(n){var i,a=n===void 0?{}:n,s=a.supportedChainIds;return i=t.call(this)||this,i.supportedChainIds=s,i}var r=e.prototype;return r.emitUpdate=function(i){this.emit(Pv.Update,i)},r.emitError=function(i){this.emit(Pv.Error,i)},r.emitDeactivate=function(){this.emit(Pv.Deactivate)},e}(Es.EventEmitter);const rEe=Object.freeze(Object.defineProperty({__proto__:null,AbstractConnector:E2},Symbol.toStringTag,{value:"Module"})),vJ=js(rEe);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractConnector=void 0;const e=vJ;Object.defineProperty(t,"AbstractConnector",{enumerable:!0,get:function(){return e.AbstractConnector}})})(w2);var x2={},Lh={},bJ={},wJ={},_J={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SceneUpdate=t.SCENE_UPDATE=void 0;const e=Tt;t.SCENE_UPDATE="SCENE_UPDATE",function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[t.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.SceneUpdate||(t.SceneUpdate={}))})(_J);var EJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Update=t.UPDATE=void 0;const e=Tt;t.UPDATE="update",function(r){r.schema={type:"object",properties:{type:{type:"string",enum:[t.UPDATE]}},required:["type"]},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.Update||(t.Update={}))})(EJ);(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(_J,t),r(EJ,t)})(wJ);var xJ={},AJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectType=void 0;const e=Tt;(function(r){r.SCENE="scene",r.SMART_ITEM="smart-item",r.PORTABLE_EXPERIENCE="portable-experience",r.LIBRARY="library"})(t.ProjectType||(t.ProjectType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.ProjectType||(t.ProjectType={}))})(AJ);var SJ={},g1={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Rarity=void 0;const e=Tt;(function(r){r.UNIQUE="unique",r.MYTHIC="mythic",r.LEGENDARY="legendary",r.EPIC="epic",r.RARE="rare",r.UNCOMMON="uncommon",r.COMMON="common"})(t.Rarity||(t.Rarity={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema);const n={[r.UNIQUE]:1,[r.MYTHIC]:10,[r.LEGENDARY]:100,[r.EPIC]:1e3,[r.RARE]:5e3,[r.UNCOMMON]:1e4,[r.COMMON]:1e5},i={[r.UNIQUE]:"#FFE617",[r.MYTHIC]:"#FB7DE3",[r.LEGENDARY]:"#A657ED",[r.EPIC]:"#6397F2",[r.RARE]:"#3AD682",[r.UNCOMMON]:"#FF8563",[r.COMMON]:"#D4E0E0"},a={[r.UNIQUE]:"#FFB626",[r.MYTHIC]:"#FF63E1",[r.LEGENDARY]:"#842DDA",[r.EPIC]:"#3D85E6",[r.RARE]:"#36CF75",[r.UNCOMMON]:"#ED6D4F",[r.COMMON]:"#ABC1C1"};function s(u){return n[u]}r.getMaxSupply=s;function o(u){return a[u]}r.getColor=o;function c(u){return[i[u],a[u]]}r.getGradient=c}(t.Rarity||(t.Rarity={}))})(g1);var Hf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableCategory=void 0;const e=Tt;(function(r){r.EYEBROWS="eyebrows",r.EYES="eyes",r.FACIAL_HAIR="facial_hair",r.HAIR="hair",r.BODY_SHAPE="body_shape",r.MOUTH="mouth",r.UPPER_BODY="upper_body",r.LOWER_BODY="lower_body",r.FEET="feet",r.EARRING="earring",r.EYEWEAR="eyewear",r.HAT="hat",r.HELMET="helmet",r.MASK="mask",r.TIARA="tiara",r.TOP_HEAD="top_head",r.SKIN="skin",r.HANDS_WEAR="hands_wear"})(t.WearableCategory||(t.WearableCategory={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.WearableCategory||(t.WearableCategory={}))})(Hf);var A2={},S2={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BodyShape=void 0;const e=Tt;(function(r){r.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",r.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(t.BodyShape||(t.BodyShape={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.BodyShape||(t.BodyShape={}))})(S2);var I2={},h4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BodyPartCategory=void 0;const e=Tt;(function(r){r.HEAD="head",r.HANDS="hands"})(t.BodyPartCategory||(t.BodyPartCategory={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.BodyPartCategory||(t.BodyPartCategory={}))})(h4);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.HideableWearableCategory=void 0;const e=Hf,r=Tt,n=h4;(function(i){i.schema={oneOf:[Object.assign({},e.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,r.generateLazyValidator)(i.schema)})(t.HideableWearableCategory||(t.HideableWearableCategory={}))})(I2);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableRepresentation=void 0;const e=Tt,r=S2,n=I2;(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,e.generateLazyValidator)(i.schema)})(t.WearableRepresentation||(t.WearableRepresentation={}))})(A2);var O2={},IJ={},p4={},jh={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.IPFSv1=t.IPFSv2=t.EthAddress=t.Color3=void 0;const e=Tt;(function(r){r.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,e.generateLazyValidator)(r.schema);r.validate=i=>n(i)})(t.Color3||(t.Color3={})),function(r){r.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)}(t.EthAddress||(t.EthAddress={})),function(r){r.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)}(t.IPFSv2||(t.IPFSv2={})),function(r){r.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(r.schema.pattern);r.validate=i=>n.test(i)}(t.IPFSv1||(t.IPFSv1={}))})(jh);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Avatar=t.Link=t.LinkUrl=t.AvatarInfo=t.Snapshots=void 0;const e=Hf,r=jh,n=Tt;var i;(function(c){c.schema={type:"object",required:["face256","body"],properties:{face256:r.IPFSv2.schema,body:r.IPFSv2.schema}},c.validate=(0,n.generateLazyValidator)(c.schema)})(i=t.Snapshots||(t.Snapshots={}));var a;(function(c){c.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:e.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},c.validate=(0,n.generateLazyValidator)(c.schema)})(a=t.AvatarInfo||(t.AvatarInfo={}));var s;(function(c){c.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const u=new RegExp(c.schema.pattern,"i");c.validate=f=>u.test(f)})(s=t.LinkUrl||(t.LinkUrl={}));var o;(function(c){c.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(o=t.Link||(t.Link={})),function(c){c.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:o.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:r.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:a.schema},additionalProperties:!0},c.validate=(0,n.generateLazyValidator)(c.schema)}(t.Avatar||(t.Avatar={}))})(p4);var OJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Profile=void 0;const e=Tt,r=p4;(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:r.Avatar.schema}},additionalProperties:!0},n.validate=(0,e.generateLazyValidator)(n.schema)})(t.Profile||(t.Profile={}))})(OJ);(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(p4,t),r(OJ,t)})(IJ);var PJ={},g4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureToggles=t.portableExperiencesToggles=t.toggles=void 0;const e=Tt;t.toggles=["enabled","disabled"],t.portableExperiencesToggles=[...t.toggles,"hideUi"],function(r){r.schema={type:"object",properties:{voiceChat:{type:"string",enum:t.toggles,nullable:!0},portableExperiences:{type:"string",enum:t.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${t.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${t.toggles.join(", ")}`,required:[]},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.FeatureToggles||(t.FeatureToggles={}))})(g4);var m4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorldConfiguration=void 0;const e=Tt;(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.WorldConfiguration||(t.WorldConfiguration={}))})(m4);var y4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SceneParcels=void 0;const e=Tt;(function(r){r.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},r.schemaValidator=(0,e.generateLazyValidator)(r.schema),r.validate=n=>r.schemaValidator(n)&&n.parcels.includes(n.base)})(t.SceneParcels||(t.SceneParcels={}))})(y4);var TJ={},tm={};Object.defineProperty(tm,"__esModule",{value:!0});tm.displayableProperties=void 0;tm.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var v4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Source=void 0;const e=Tt;(function(r){r.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.Source||(t.Source={}))})(v4);var b4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SpawnPoint=void 0;const e=Tt;(function(r){r.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.SpawnPoint||(t.SpawnPoint={}))})(b4);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Scene=t.RequiredPermission=void 0;const e=Tt,r=tm,n=g4,i=y4,a=v4,s=b4,o=m4;var c;(function(u){u.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",u.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",u.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",u.USE_WEB3_API="USE_WEB3_API",u.USE_FETCH="USE_FETCH",u.USE_WEBSOCKET="USE_WEBSOCKET",u.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(c=t.RequiredPermission||(t.RequiredPermission={})),function(u){u.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},r.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},a.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:s.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(c)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},o.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:c.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},u.validate=(0,e.generateLazyValidator)(u.schema)}(t.Scene||(t.Scene={}))})(TJ);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SpawnPoint=t.Source=t.RequiredPermission=t.Scene=t.SceneParcels=t.WorldConfiguration=t.FeatureToggles=void 0;var e=g4;Object.defineProperty(t,"FeatureToggles",{enumerable:!0,get:function(){return e.FeatureToggles}});var r=m4;Object.defineProperty(t,"WorldConfiguration",{enumerable:!0,get:function(){return r.WorldConfiguration}});var n=y4;Object.defineProperty(t,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=TJ;Object.defineProperty(t,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(t,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var a=v4;Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return a.Source}});var s=b4;Object.defineProperty(t,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(PJ);var xT={},w4={},_4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Locale=void 0;const e=Tt;(function(r){r.EN="en",r.ES="es"})(t.Locale||(t.Locale={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.Locale||(t.Locale={}))})(_4);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.I18N=void 0;const e=Tt,r=_4;(function(n){n.schema={type:"object",properties:{code:r.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,e.generateLazyValidator)(n.schema)})(t.I18N||(t.I18N={}))})(w4);var E4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Metrics=void 0;const e=Tt;(function(r){r.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.Metrics||(t.Metrics={}))})(E4);var P2={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isStandard=t.standardProperties=void 0;const e=g1,r=Tt;t.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:e.Rarity.schema};const n={type:"object",properties:Object.assign({},t.standardProperties),required:["collectionAddress","rarity"]},i=(0,r.generateLazyValidator)(n);function a(s){return i(s)}t.isStandard=a})(P2);var T2={},x4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleProof=void 0;const e=Tt;(function(r){r.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.MerkleProof||(t.MerkleProof={}))})(x4);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.isThirdParty=t.thirdPartyProps=void 0;const e=Tt,r=x4;t.thirdPartyProps={merkleProof:r.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const n={type:"object",properties:Object.assign({},t.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},i={keyword:"_containsHashingKeys",validate:(o,c)=>{var u;const f=c;return!((u=f==null?void 0:f.merkleProof)===null||u===void 0)&&u.hashingKeys?f.merkleProof.hashingKeys.every(h=>f.hasOwnProperty(h)):!1},errors:!1},a=(0,e.generateLazyValidator)(n,[i]);function s(o){return a(o)}t.isThirdParty=s})(T2);var CJ={},RJ={},Ju={};Object.defineProperty(Ju,"__esModule",{value:!0});Ju.isBaseAvatar=Ju.requiredBaseItemProps=Ju.baseItemProperties=void 0;const nEe=w4,iEe=E4,aEe=tm;Ju.baseItemProperties=Object.assign(Object.assign({},aEe.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:nEe.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},iEe.Metrics.schema),{nullable:!0})});Ju.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function sEe(t){if(!t||!t.id)return!1;const e=t.id.split(":"),r=e[1]==="decentraland",n=e[3]==="base-avatars";return e.length===5&&r&&n}Ju.isBaseAvatar=sEe;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Wearable=void 0;const e=Tt,r=Hf,n=A2,i=Ju,a=P2,s=T2,o=I2;(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),s.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:o.HideableWearableCategory.schema},hides:{type:"array",items:o.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const u={keyword:"_isThirdParty",validate:(h,m)=>!h||(0,s.isThirdParty)(m),errors:!1},f={keyword:"_isBaseAvatar",validate:(h,m)=>!h||(0,i.isBaseAvatar)(m),errors:!1};c.validate=(0,e.generateLazyValidator)(c.schema,[u,f])})(t.Wearable||(t.Wearable={}))})(RJ);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.HideableWearableCategory=t.BodyPartCategory=t.WearableCategory=t.Wearable=t.WearableRepresentation=void 0;var e=A2;Object.defineProperty(t,"WearableRepresentation",{enumerable:!0,get:function(){return e.WearableRepresentation}});var r=RJ;Object.defineProperty(t,"Wearable",{enumerable:!0,get:function(){return r.Wearable}});var n=Hf;Object.defineProperty(t,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=h4;Object.defineProperty(t,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=I2;Object.defineProperty(t,"HideableWearableCategory",{enumerable:!0,get:function(){return a.HideableWearableCategory}})})(CJ);var AT={},ST={},A4={},S4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmoteCategory=void 0;const e=Tt;(function(r){r.DANCE="dance",r.STUNT="stunt",r.GREETINGS="greetings",r.FUN="fun",r.POSES="poses",r.REACTIONS="reactions",r.HORROR="horror",r.MISCELLANEOUS="miscellaneous"})(t.EmoteCategory||(t.EmoteCategory={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.EmoteCategory||(t.EmoteCategory={}))})(S4);var I4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmoteRepresentationADR74=void 0;const e=Tt,r=S2;(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,e.generateLazyValidator)(n.schema)})(t.EmoteRepresentationADR74||(t.EmoteRepresentationADR74={}))})(I4);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmoteDataADR74=void 0;const e=S4,r=Tt,n=I4;(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:e.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,r.generateLazyValidator)(i.schema)})(t.EmoteDataADR74||(t.EmoteDataADR74={}))})(A4);var WB;function oEe(){return WB||(WB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emote=void 0;const e=DJ(),r=Tt,n=Ju,i=P2,a=T2,s=A4;(function(o){o.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),a.thirdPartyProps),{emoteDataADR74:s.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const c={keyword:"_isThirdParty",validate:(u,f)=>!u||(0,e.isThirdParty)(f),errors:!1};o.validate=(0,r.generateLazyValidator)(o.schema,[c])})(t.Emote||(t.Emote={}))}(ST)),ST}var NJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmotePlayMode=void 0;const e=Tt;(function(r){r.SIMPLE="simple",r.LOOP="loop"})(t.EmotePlayMode||(t.EmotePlayMode={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.EmotePlayMode||(t.EmotePlayMode={}))})(NJ);var QB;function cEe(){return QB||(QB=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EmotePlayMode=t.EmoteCategory=t.EmoteDataADR74=t.EmoteRepresentationADR74=t.Emote=void 0;var e=oEe();Object.defineProperty(t,"Emote",{enumerable:!0,get:function(){return e.Emote}});var r=I4;Object.defineProperty(t,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return r.EmoteRepresentationADR74}});var n=A4;Object.defineProperty(t,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=S4;Object.defineProperty(t,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var a=NJ;Object.defineProperty(t,"EmotePlayMode",{enumerable:!0,get:function(){return a.EmotePlayMode}})}(AT)),AT}var YB;function DJ(){return YB||(YB=1,function(t){var e=ke&&ke.__createBinding||(Object.create?function(u,f,h,m){m===void 0&&(m=h);var y=Object.getOwnPropertyDescriptor(f,h);(!y||("get"in y?!f.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return f[h]}}),Object.defineProperty(u,m,y)}:function(u,f,h,m){m===void 0&&(m=h),u[m]=f[h]}),r=ke&&ke.__exportStar||function(u,f){for(var h in u)h!=="default"&&!Object.prototype.hasOwnProperty.call(f,h)&&e(f,u,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.isThirdParty=t.isStandard=t.BodyShape=t.Metrics=t.Locale=t.I18N=void 0;var n=w4;Object.defineProperty(t,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=_4;Object.defineProperty(t,"Locale",{enumerable:!0,get:function(){return i.Locale}});var a=E4;Object.defineProperty(t,"Metrics",{enumerable:!0,get:function(){return a.Metrics}});var s=S2;Object.defineProperty(t,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var o=P2;Object.defineProperty(t,"isStandard",{enumerable:!0,get:function(){return o.isStandard}});var c=T2;Object.defineProperty(t,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),r(CJ,t),r(cEe(),t)}(xT)),xT}var MJ={};(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(x4,t)})(MJ);var $J={},C2={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AuthChain=t.AuthLink=t.AuthLinkType=void 0;const e=Tt;var r;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(r=t.AuthLinkType||(t.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(r)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:r.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,e.generateLazyValidator)(i.schema)})(n=t.AuthLink||(t.AuthLink={})),function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,e.generateLazyValidator)(i.schema)}(t.AuthChain||(t.AuthChain={}))})(C2);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PointerChangesSyncDeployment=t.SnapshotSyncDeployment=void 0;const e=jh,r=C2,n=Tt;(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:e.IPFSv1.schema}},{properties:{entityId:e.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(t.SnapshotSyncDeployment||(t.SnapshotSyncDeployment={})),function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:r.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:e.IPFSv1.schema}},{properties:{entityId:e.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)}(t.PointerChangesSyncDeployment||(t.PointerChangesSyncDeployment={}))})($J);var kJ={},O4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMapping=void 0;const e=jh,r=Tt;(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[e.IPFSv1.schema,e.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(t.ContentMapping||(t.ContentMapping={}))})(O4);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Entity=t.EntityType=void 0;const e=jh,r=O4,n=Tt;(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(t.EntityType||(t.EntityType={})),function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[e.IPFSv1.schema,e.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:r.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)}(t.Entity||(t.Entity={}))})(kJ);var LJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeploymentWithAuthChain=void 0;const e=C2,r=Tt;(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:e.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,r.generateLazyValidator)(n.schema)})(t.DeploymentWithAuthChain||(t.DeploymentWithAuthChain={}))})(LJ);var jJ={},UJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Outfits=t.Outfit=void 0;const e=Hf,r=jh,n=Tt;var i;(function(a){a.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:r.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:r.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:r.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:e.WearableCategory.schema}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)})(i=t.Outfit||(t.Outfit={})),function(a){a.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},a.validate=(0,n.generateLazyValidator)(a.schema)}(t.Outfits||(t.Outfits={}))})(UJ);(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(UJ,t)})(jJ);(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(IJ,t),r(PJ,t),r(DJ(),t),r(tm,t),r(MJ,t),r($J,t),r(kJ,t),r(LJ,t),r(jJ,t)})(O2);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WearableJson=void 0;const e=g1,r=Hf,n=A2,i=Tt,a=O2;(function(s){s.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},e.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:r.WearableCategory.schema},hides:{type:"array",items:r.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:r.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:a.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(t.WearableJson||(t.WearableJson={}))})(SJ);(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(AJ,t),r(SJ,t)})(xJ);(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(wJ,t),r(xJ,t)})(bJ);var FJ={},R2={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ListingStatus=void 0;const e=Tt;(function(r){r.OPEN="open",r.SOLD="sold",r.CANCELLED="cancelled"})(t.ListingStatus||(t.ListingStatus={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.ListingStatus||(t.ListingStatus={}))})(R2);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Bid=t.BidSortBy=void 0;const e=Tt,r=Bs(),n=R2,i=Do;(function(a){a.RECENTLY_OFFERED="recently_offered",a.RECENTLY_UPDATED="recently_updated",a.MOST_EXPENSIVE="most_expensive"})(t.BidSortBy||(t.BidSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.Bid||(t.Bid={}))})(FJ);var BJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Account=t.AccountSortBy=void 0;const e=Tt;(function(r){r.MOST_SALES="most_sales",r.MOST_PURCHASES="most_purchases",r.MOST_SPENT="most_spent",r.MOST_EARNED="most_earned",r.MOST_ROYALTIES="most_royalties",r.MOST_COLLECTIONS="most_collections"})(t.AccountSortBy||(t.AccountSortBy={})),function(r){r.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.Account||(t.Account={}))})(BJ);var qJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=t.CollectionSortBy=void 0;const e=Tt,r=Bs(),n=Do;(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(t.CollectionSortBy||(t.CollectionSortBy={})),function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,e.generateLazyValidator)(i.schema)}(t.Collection||(t.Collection={}))})(qJ);var HJ={},m1={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.NFTCategory=void 0;const e=Tt;(function(r){r.PARCEL="parcel",r.ESTATE="estate",r.WEARABLE="wearable",r.ENS="ens",r.EMOTE="emote"})(t.NFTCategory||(t.NFTCategory={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.NFTCategory||(t.NFTCategory={}))})(m1);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.ContractSortBy=void 0;const e=Tt,r=Bs(),n=Do,i=m1;(function(a){a.NAME="name"})(t.ContractSortBy||(t.ContractSortBy={})),function(a){a.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:r.ChainId.schema},required:["name","address","category","network","chainId"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.Contract||(t.Contract={}))})(HJ);var zJ={},P4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.NFT=t.NFTSortBy=void 0;const e=Tt,r=Bs(),n=O2,i=Do,a=m1,s=g1,o=Hf;(function(c){c.NAME="name",c.NEWEST="newest",c.RECENTLY_LISTED="recently_listed",c.RECENTLY_SOLD="recently_sold",c.CHEAPEST="cheapest",c.RENTAL_LISTING_DATE="rental_listing_date",c.RENTAL_DATE="rented_date",c.MAX_RENTAL_PRICE="max_rental_price",c.MIN_RENTAL_PRICE="min_rental_price"})(t.NFTSortBy||(t.NFTSortBy={})),function(c){c.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:o.WearableCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:a.NFTCategory.schema,network:i.Network.schema,chainId:r.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},c.validate=(0,e.generateLazyValidator)(c.schema)}(t.NFT||(t.NFT={}))})(P4);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Item=t.ItemSortBy=void 0;const e=Tt,r=Bs(),n=Do,i=P4,a=m1;(function(s){s.NAME="name",s.NEWEST="newest",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_SOLD="recently_sold",s.RECENTLY_LISTED="recently_listed",s.CHEAPEST="cheapest"})(t.ItemSortBy||(t.ItemSortBy={})),function(s){s.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:a.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:r.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},s.validate=(0,e.generateLazyValidator)(s.schema)}(t.Item||(t.Item={}))})(zJ);var VJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MetaTransaction=void 0;const e=Tt;(function(r){r.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.MetaTransaction||(t.MetaTransaction={}))})(VJ);var GJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Mint=t.MintSortBy=void 0;const e=Tt,r=Bs(),n=Do;(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(t.MintSortBy||(t.MintSortBy={})),function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:r.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,e.generateLazyValidator)(i.schema)}(t.Mint||(t.Mint={}))})(GJ);var KJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CatalogSortDirection=t.CatalogSortBy=void 0,function(e){e.NEWEST="newest",e.RECENTLY_SOLD="recently_sold",e.CHEAPEST="cheapest",e.MOST_EXPENSIVE="most_expensive",e.RECENTLY_LISTED="recently_listed"}(t.CatalogSortBy||(t.CatalogSortBy={})),function(e){e.ASC="asc",e.DESC="desc"}(t.CatalogSortDirection||(t.CatalogSortDirection={}))})(KJ);var WJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Order=t.OrderSortBy=void 0;const e=Tt,r=Bs(),n=R2,i=Do;(function(a){a.RECENTLY_LISTED="recently_listed",a.RECENTLY_UPDATED="recently_updated",a.CHEAPEST="cheapest",a.ISSUED_ID_ASC="issued_id_asc",a.ISSUED_ID_DESC="issued_id_desc",a.OLDEST="oldest"})(t.OrderSortBy||(t.OrderSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:r.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.Order||(t.Order={}))})(WJ);var T4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SaleType=void 0;const e=Tt;(function(r){r.ORDER="order",r.BID="bid",r.MINT="mint"})(t.SaleType||(t.SaleType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.SaleType||(t.SaleType={}))})(T4);var QJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Sale=t.SaleSortBy=void 0;const e=Tt,r=Bs(),n=T4,i=Do;(function(a){a.RECENTLY_SOLD="recently_sold",a.MOST_EXPENSIVE="most_expensive"})(t.SaleSortBy||(t.SaleSortBy={})),function(a){a.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:r.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.Sale||(t.Sale={}))})(QJ);var YJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RentalListingCreation=t.PeriodCreation=t.RentalsListingsSortBy=t.RentalsListingsFilterByCategory=t.RentalsListingSortDirection=t.RentalStatus=void 0;const e=Tt,r=Bs(),n=Do;(function(a){a.OPEN="open",a.CANCELLED="cancelled",a.EXECUTED="executed",a.CLAIMED="claimed"})(t.RentalStatus||(t.RentalStatus={})),function(a){a.ASC="asc",a.DESC="desc"}(t.RentalsListingSortDirection||(t.RentalsListingSortDirection={})),function(a){a.PARCEL="parcel",a.ESTATE="estate"}(t.RentalsListingsFilterByCategory||(t.RentalsListingsFilterByCategory={})),function(a){a.LAND_CREATION_DATE="land_creation_date",a.RENTAL_LISTING_DATE="rental_listing_date",a.RENTAL_DATE="rented_date",a.NAME="name",a.MAX_RENTAL_PRICE="max_rental_price",a.MIN_RENTAL_PRICE="min_rental_price"}(t.RentalsListingsSortBy||(t.RentalsListingsSortBy={}));var i;(function(a){a.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},a.validate=(0,e.generateLazyValidator)(a.schema)})(i=t.PeriodCreation||(t.PeriodCreation={})),function(a){a.schema={type:"object",properties:{network:n.Network.schema,chainId:r.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},a.validate=(0,e.generateLazyValidator)(a.schema)}(t.RentalListingCreation||(t.RentalListingCreation={}))})(YJ);var JJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsDayDataSortBy=void 0,function(e){e.DATE="date",e.MOST_SALES="most_sales"}(t.AnalyticsDayDataSortBy||(t.AnalyticsDayDataSortBy={}))})(JJ);var XJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Store=void 0;const e=Tt;(function(r){r.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},r.validate=(0,e.generateLazyValidator)(r.schema)})(t.Store||(t.Store={}))})(XJ);var ZJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.GenderFilterOption=t.WearableGender=void 0;const e=Tt;(function(r){r.MALE="male",r.FEMALE="female"})(t.WearableGender||(t.WearableGender={})),function(r){r.MALE="male",r.FEMALE="female",r.UNISEX="unisex"}(t.GenderFilterOption||(t.GenderFilterOption={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.WearableGender||(t.WearableGender={}))})(ZJ);var eX={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.World=t.isInsideWorldLimits=t.getWorld=void 0;const e=Tt;function r(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}t.getWorld=r;function n(i,a){const s=r().validWorldRanges;for(const o of s)if(i>=o.xMin&&i<=o.xMax&&a>=o.yMin&&a<=o.yMax)return!0;return!1}t.isInsideWorldLimits=n,function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,e.generateLazyValidator)(i.schema)}(t.World||(t.World={}))})(eX);var tX={},rX={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewCamera=void 0;const e=Tt;(function(r){r.STATIC="static",r.INTERACTIVE="interactive"})(t.PreviewCamera||(t.PreviewCamera={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewCamera||(t.PreviewCamera={}))})(rX);var nX={};Object.defineProperty(nX,"__esModule",{value:!0});var iX={};Object.defineProperty(iX,"__esModule",{value:!0});var aX={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewEmoteEventType=void 0;const e=Tt;(function(r){r.ANIMATION_PLAY="animation_play",r.ANIMATION_PAUSE="animation_pause",r.ANIMATION_LOOP="animation_loop",r.ANIMATION_END="animation_end",r.ANIMATION_PLAYING="animation_playing"})(t.PreviewEmoteEventType||(t.PreviewEmoteEventType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewEmoteEventType||(t.PreviewEmoteEventType={}))})(aX);var sX={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewEmote=void 0;const e=Tt;(function(r){r.IDLE="idle",r.CLAP="clap",r.DAB="dab",r.DANCE="dance",r.FASHION="fashion",r.FASHION_2="fashion-2",r.FASHION_3="fashion-3",r.FASHION_4="fashion-4",r.LOVE="love",r.MONEY="money",r.FIST_PUMP="fist-pump",r.HEAD_EXPLODE="head-explode"})(t.PreviewEmote||(t.PreviewEmote={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewEmote||(t.PreviewEmote={}))})(sX);var oX={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sendMessage=t.PreviewMessageType=void 0;const e=Tt;(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(t.PreviewMessageType||(t.PreviewMessageType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,e.generateLazyValidator)(n.schema)}(t.PreviewMessageType||(t.PreviewMessageType={}));const r=(n,i,a,s="*")=>{const o={type:i,payload:a};n.postMessage(o,s)};t.sendMessage=r})(oX);var cX={};Object.defineProperty(cX,"__esModule",{value:!0});var uX={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewProjection=void 0;const e=Tt;(function(r){r.ORTHOGRAPHIC="orthographic",r.PERSPECTIVE="perspective"})(t.PreviewProjection||(t.PreviewProjection={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewProjection||(t.PreviewProjection={}))})(uX);var lX={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.PreviewType=void 0;const e=Tt;(function(r){r.TEXTURE="texture",r.WEARABLE="wearable",r.AVATAR="avatar"})(t.PreviewType||(t.PreviewType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,e.generateLazyValidator)(r.schema)}(t.PreviewType||(t.PreviewType={}))})(lX);var fX={};Object.defineProperty(fX,"__esModule",{value:!0});var dX={};Object.defineProperty(dX,"__esModule",{value:!0});var hX={};Object.defineProperty(hX,"__esModule",{value:!0});var pX={};Object.defineProperty(pX,"__esModule",{value:!0});var gX={};Object.defineProperty(gX,"__esModule",{value:!0});var mX={};Object.defineProperty(mX,"__esModule",{value:!0});var yX={};Object.defineProperty(yX,"__esModule",{value:!0});var vX={};Object.defineProperty(vX,"__esModule",{value:!0});(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(rX,t),r(nX,t),r(iX,t),r(aX,t),r(sX,t),r(oX,t),r(cX,t),r(uX,t),r(lX,t),r(fX,t),r(dX,t),r(hX,t),r(pX,t),r(gX,t),r(mX,t),r(yX,t),r(vX,t)})(tX);(function(t){var e=ke&&ke.__createBinding||(Object.create?function(U,L,Q,ne){ne===void 0&&(ne=Q);var j=Object.getOwnPropertyDescriptor(L,Q);(!j||("get"in j?!L.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return L[Q]}}),Object.defineProperty(U,ne,j)}:function(U,L,Q,ne){ne===void 0&&(ne=Q),U[ne]=L[Q]}),r=ke&&ke.__setModuleDefault||(Object.create?function(U,L){Object.defineProperty(U,"default",{enumerable:!0,value:L})}:function(U,L){U.default=L}),n=ke&&ke.__importStar||function(U){if(U&&U.__esModule)return U;var L={};if(U!=null)for(var Q in U)Q!=="default"&&Object.prototype.hasOwnProperty.call(U,Q)&&e(L,U,Q);return r(L,U),L},i=ke&&ke.__exportStar||function(U,L){for(var Q in U)Q!=="default"&&!Object.prototype.hasOwnProperty.call(L,Q)&&e(L,U,Q)};Object.defineProperty(t,"__esModule",{value:!0}),t.sdk=t.isInsideWorldLimits=t.getWorld=t.World=t.GenderFilterOption=t.WearableGender=t.Store=t.AnalyticsDayDataSortBy=t.PeriodCreation=t.RentalListingCreation=t.RentalsListingsSortBy=t.RentalsListingsFilterByCategory=t.RentalsListingSortDirection=t.RentalStatus=t.SaleSortBy=t.Sale=t.SaleType=t.Rarity=t.ProviderType=t.OrderSortBy=t.Order=t.CatalogSortDirection=t.CatalogSortBy=t.NFTSortBy=t.NFT=t.NFTCategory=t.Network=t.MintSortBy=t.Mint=t.MetaTransaction=t.ListingStatus=t.ItemSortBy=t.Item=t.ContractSortBy=t.Contract=t.CollectionSortBy=t.Collection=t.getChainId=t.ChainName=t.getURNProtocol=t.getChainName=t.ChainId=t.AccountSortBy=t.Account=t.BidSortBy=t.Bid=void 0;const a=n(bJ);t.sdk=a,i(Tt,t);var s=FJ;Object.defineProperty(t,"Bid",{enumerable:!0,get:function(){return s.Bid}}),Object.defineProperty(t,"BidSortBy",{enumerable:!0,get:function(){return s.BidSortBy}});var o=BJ;Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return o.Account}}),Object.defineProperty(t,"AccountSortBy",{enumerable:!0,get:function(){return o.AccountSortBy}});var c=Bs();Object.defineProperty(t,"ChainId",{enumerable:!0,get:function(){return c.ChainId}}),Object.defineProperty(t,"getChainName",{enumerable:!0,get:function(){return c.getChainName}}),Object.defineProperty(t,"getURNProtocol",{enumerable:!0,get:function(){return c.getURNProtocol}});var u=uJ();Object.defineProperty(t,"ChainName",{enumerable:!0,get:function(){return u.ChainName}}),Object.defineProperty(t,"getChainId",{enumerable:!0,get:function(){return u.getChainId}});var f=qJ;Object.defineProperty(t,"Collection",{enumerable:!0,get:function(){return f.Collection}}),Object.defineProperty(t,"CollectionSortBy",{enumerable:!0,get:function(){return f.CollectionSortBy}});var h=HJ;Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return h.Contract}}),Object.defineProperty(t,"ContractSortBy",{enumerable:!0,get:function(){return h.ContractSortBy}});var m=zJ;Object.defineProperty(t,"Item",{enumerable:!0,get:function(){return m.Item}}),Object.defineProperty(t,"ItemSortBy",{enumerable:!0,get:function(){return m.ItemSortBy}});var y=R2;Object.defineProperty(t,"ListingStatus",{enumerable:!0,get:function(){return y.ListingStatus}});var w=VJ;Object.defineProperty(t,"MetaTransaction",{enumerable:!0,get:function(){return w.MetaTransaction}});var v=GJ;Object.defineProperty(t,"Mint",{enumerable:!0,get:function(){return v.Mint}}),Object.defineProperty(t,"MintSortBy",{enumerable:!0,get:function(){return v.MintSortBy}});var g=Do;Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return g.Network}});var _=m1;Object.defineProperty(t,"NFTCategory",{enumerable:!0,get:function(){return _.NFTCategory}});var b=P4;Object.defineProperty(t,"NFT",{enumerable:!0,get:function(){return b.NFT}}),Object.defineProperty(t,"NFTSortBy",{enumerable:!0,get:function(){return b.NFTSortBy}});var S=KJ;Object.defineProperty(t,"CatalogSortBy",{enumerable:!0,get:function(){return S.CatalogSortBy}}),Object.defineProperty(t,"CatalogSortDirection",{enumerable:!0,get:function(){return S.CatalogSortDirection}});var A=WJ;Object.defineProperty(t,"Order",{enumerable:!0,get:function(){return A.Order}}),Object.defineProperty(t,"OrderSortBy",{enumerable:!0,get:function(){return A.OrderSortBy}});var I=sc;Object.defineProperty(t,"ProviderType",{enumerable:!0,get:function(){return I.ProviderType}});var E=g1;Object.defineProperty(t,"Rarity",{enumerable:!0,get:function(){return E.Rarity}});var p=T4;Object.defineProperty(t,"SaleType",{enumerable:!0,get:function(){return p.SaleType}});var O=QJ;Object.defineProperty(t,"Sale",{enumerable:!0,get:function(){return O.Sale}}),Object.defineProperty(t,"SaleSortBy",{enumerable:!0,get:function(){return O.SaleSortBy}});var N=YJ;Object.defineProperty(t,"RentalStatus",{enumerable:!0,get:function(){return N.RentalStatus}}),Object.defineProperty(t,"RentalsListingSortDirection",{enumerable:!0,get:function(){return N.RentalsListingSortDirection}}),Object.defineProperty(t,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return N.RentalsListingsFilterByCategory}}),Object.defineProperty(t,"RentalsListingsSortBy",{enumerable:!0,get:function(){return N.RentalsListingsSortBy}}),Object.defineProperty(t,"RentalListingCreation",{enumerable:!0,get:function(){return N.RentalListingCreation}}),Object.defineProperty(t,"PeriodCreation",{enumerable:!0,get:function(){return N.PeriodCreation}});var F=JJ;Object.defineProperty(t,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return F.AnalyticsDayDataSortBy}});var V=XJ;Object.defineProperty(t,"Store",{enumerable:!0,get:function(){return V.Store}});var de=ZJ;Object.defineProperty(t,"WearableGender",{enumerable:!0,get:function(){return de.WearableGender}}),Object.defineProperty(t,"GenderFilterOption",{enumerable:!0,get:function(){return de.GenderFilterOption}});var ve=eX;Object.defineProperty(t,"World",{enumerable:!0,get:function(){return ve.World}}),Object.defineProperty(t,"getWorld",{enumerable:!0,get:function(){return ve.getWorld}}),Object.defineProperty(t,"isInsideWorldLimits",{enumerable:!0,get:function(){return ve.isInsideWorldLimits}}),i(tX,t),i(O2,t),i(jh,t),i(C2,t),i(O4,t)})(Lh);var Io={};Object.defineProperty(Io,"__esModule",{value:!0});Io.getRpcUrls=Io.getConfiguration=void 0;const Tn=Bs(),Ua=sc,uEe=Object.freeze({storageKey:"decentraland-connect-storage-key",[Ua.ProviderType.INJECTED]:{},[Ua.ProviderType.FORTMATIC]:{apiKeys:{[Tn.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[Tn.ChainId.ETHEREUM_ROPSTEN]:"pk_test_5B728BEFE5C10911",[Tn.ChainId.ETHEREUM_RINKEBY]:"pk_test_5B728BEFE5C10911",[Tn.ChainId.ETHEREUM_KOVAN]:"pk_test_5B728BEFE5C10911",[Tn.ChainId.ETHEREUM_GOERLI]:"pk_test_5B728BEFE5C10911",[Tn.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:Mp(Ua.ProviderType.FORTMATIC)},[Ua.ProviderType.NETWORK]:{urls:Mp(Ua.ProviderType.NETWORK)},[Ua.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:Mp(Ua.ProviderType.WALLET_LINK)},[Ua.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:Mp(Ua.ProviderType.WALLET_CONNECT_V2),chains:{[Tn.ChainId.ETHEREUM_MAINNET]:{chains:[Tn.ChainId.ETHEREUM_MAINNET],optionalChains:[Tn.ChainId.MATIC_MAINNET]},[Tn.ChainId.ETHEREUM_GOERLI]:{chains:[Tn.ChainId.ETHEREUM_GOERLI],optionalChains:[Tn.ChainId.MATIC_MUMBAI]},[Tn.ChainId.ETHEREUM_SEPOLIA]:{chains:[Tn.ChainId.ETHEREUM_SEPOLIA],optionalChains:[Tn.ChainId.MATIC_MUMBAI]}}},[Ua.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:Mp(Ua.ProviderType.MAGIC),chains:[Tn.ChainId.ETHEREUM_MAINNET,Tn.ChainId.ETHEREUM_GOERLI,Tn.ChainId.ETHEREUM_SEPOLIA,Tn.ChainId.MATIC_MAINNET,Tn.ChainId.MATIC_MUMBAI]}});function lEe(){return uEe}Io.getConfiguration=lEe;function Mp(t){const e={[Tn.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[Tn.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[Tn.ChainId.ETHEREUM_ROPSTEN]:"https://rpc.decentraland.org/ropsten",[Tn.ChainId.ETHEREUM_RINKEBY]:"https://rpc.decentraland.org/rinkeby",[Tn.ChainId.ETHEREUM_GOERLI]:"https://rpc.decentraland.org/goerli",[Tn.ChainId.ETHEREUM_KOVAN]:"https://rpc.decentraland.org/kovan",[Tn.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[Tn.ChainId.MATIC_MUMBAI]:"https://rpc.decentraland.org/mumbai"};let r="";switch(t){case Ua.ProviderType.WALLET_LINK:r="walletlink";break;case Ua.ProviderType.FORTMATIC:r="fortmatic";break;case Ua.ProviderType.MAGIC:r="magic";break;case Ua.ProviderType.WALLET_CONNECT_V2:r="walletconnect-v2";break}if(r)for(const n in e)e[n]+=`?project=${r}`;return e}Io.getRpcUrls=Mp;var IT,JB;function fEe(){return JB||(JB=1,IT=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:a})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,i){if(1&i&&(n=r(n)),8&i||4&i&&typeof n=="object"&&n&&n.__esModule)return n;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:n}),2&i&&typeof n!="string")for(var s in n)r.d(a,s,(function(o){return n[o]}).bind(null,s));return a},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=3)}([function(t,e){t.exports=function(r){return r&&r.__esModule?r:{default:r}}},function(t,e){t.exports=function(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){function n(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(e,"__esModule",{value:!0}),e.sendAsyncWrapper=function(i,a){var s=this;return new Promise(function(o,c){s.sendAsync({jsonrpc:"2.0",id:n(),method:i,params:a||[]},function(u,f){u?c(u):o(f.result)})})},e.sendFortmaticAsyncWrapper=function(i){var a=this;return new Promise(function(s,o){a.getProvider().sendFortmaticAsync(i,function(c,u){c?o(c):s(u?u.result:{})})})},e.randomId=n,e.findExistingResponse=function(i,a){for(var s=0;s<i.length;s++)if(i[s].id===a)return i[s];return null}},function(t,e,r){t.exports=r(4)},function(t,e,r){var n=r(0),i=n(r(1)),a=n(r(5)),s=r(2),o="fm_composeSend",c="fm_logout",u="fm_get_balances",f="fm_get_transactions",h="fm_is_logged_in",m="fm_accountSettings",y="fm_deposit",w="fm_get_user",v="fm_configure",g={};t.exports=function b(S,A,I){var E=this;if((0,i.default)(this,b),this.fortmaticClient="https://x2.fortmatic.com",!S)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=S,this.options=I,this.ethNetwork=A,this.queryParams=btoa(JSON.stringify({API_KEY:S,ETH_NETWORK:A})),this.transactions={send:function(p,O){var N=new _(o,{to:p.to,value:p.amount});E.getProvider().sendFortmaticAsync(N,O)}},this.getProvider=function(){return g["fortmatic-".concat(E.queryParams)]||(g["fortmatic-".concat(E.queryParams)]=new a.default(E.fortmaticClient,{API_KEY:S,ETH_NETWORK:A})),g["fortmatic-".concat(E.queryParams)]},this.user={login:function(){return E.getProvider().enable()},logout:function(){E.getProvider().account=null,E.getProvider().network=null;var p=new _(c);return s.sendFortmaticAsyncWrapper.call(E,p)},getUser:function(){var p=new _(w);return s.sendFortmaticAsyncWrapper.call(E,p)},getBalances:function(){var p=new _(u);return s.sendFortmaticAsyncWrapper.call(E,p)},getTransactions:function(){var p=new _(f);return s.sendFortmaticAsyncWrapper.call(E,p)},isLoggedIn:function(){var p=new _(h);return s.sendFortmaticAsyncWrapper.call(E,p)},settings:function(){var p=new _(m);return s.sendFortmaticAsyncWrapper.call(E,p)},deposit:function(p){var O=new _(y,p);return s.sendFortmaticAsyncWrapper.call(E,O)}},this.configure=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=new _(v);return O.params=[p],s.sendFortmaticAsyncWrapper.call(E,O)}};var _=function b(S,A){(0,i.default)(this,b),this.id=(0,s.randomId)(),this.method=S,this.params=A?[A]:[{}]}},function(t,e,r){var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(6)),a=n(r(9)),s=n(r(1)),o=n(r(10)),c=r(11),u=n(r(12)),f=r(2),h=function(){function m(y,w){if((0,s.default)(this,m),this.fortmaticClient=y,this.requests={},this.queue=[],this.account=null,this.network=null,this.isFortmatic=!0,this.overlayReady=!1,this.isLoggedIn=!1,this.postMessages={FORTMATIC_HANDLE_BATCH_REQUEST:"FORTMATIC_HANDLE_BATCH_REQUEST",FORTMATIC_HANDLE_REQUEST:"FORTMATIC_HANDLE_REQUEST",FORTMATIC_HANDLE_FORTMATIC_REQUEST:"FORTMATIC_HANDLE_FORTMATIC_REQUEST",FORTMATIC_HANDLE_RESPONSE:"FORTMATIC_HANDLE_RESPONSE",FORTMATIC_OVERLAY_READY:"FORTMATIC_OVERLAY_READY",FORTMATIC_SHOW_OVERLAY:"FORTMATIC_SHOW_OVERLAY",FORTMATIC_HIDE_OVERLAY:"FORTMATIC_HIDE_OVERLAY",FORTMATIC_USER_DENIED:"FORTMATIC_USER_DENIED",FORTMATIC_USER_LOGOUT:"FORTMATIC_USER_LOGOUT",FORTMATIC_UNAUTHORIZED_API_KEY:"FORTMATIC_UNAUTHORIZED_API_KEY"},!w.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:w.API_KEY,ETH_NETWORK:w.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:c.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,o.default)(m,[{key:"constructPostMessage",value:function(){var y=this;Object.keys(this.postMessages).map(function(w){y.postMessages[w]+="-".concat(y.queryParams)})}},{key:"createOverlay",value:function(){var y=this;return new Promise(function(w,v){var g=function(){if(function(){var A=!0,I=!1,E=void 0;try{for(var p,O=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(A=(p=O.next()).done);A=!0)if(p.value.src.includes(y.queryParams))return!1}catch(N){I=!0,E=N}finally{try{A||O.return==null||O.return()}finally{if(I)throw E}}return!0}()){var _=document.createElement("style");_.innerHTML=u.default.css,_.type="text/css",document.head.appendChild(_);var b=document.createElement("iframe");b.className="fortmatic-iframe",b.src="".concat(y.fortmaticClient,"/send?params=").concat(y.queryParams),document.body.appendChild(b);var S=document.createElement("img");S.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(S),w({iframe:b})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?g():window.addEventListener("load",g.bind(y),!1)})}},{key:"showOverlay",value:function(){var y=(0,a.default)(i.default.mark(function w(){return i.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.overlay;case 2:v.sent.iframe.style.display="block";case 4:case"end":return v.stop()}},w,this)}));return function(){return y.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var y=(0,a.default)(i.default.mark(function w(){return i.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.overlay;case 2:v.sent.iframe.style.display="none";case 4:case"end":return v.stop()}},w,this)}));return function(){return y.apply(this,arguments)}}()},{key:"sendAsync",value:function(y,w){y.length>0?this.enqueue({payload:{id:(0,f.randomId)(),batch:y.map(function(v){return v.id=(0,f.randomId)(),v}),method:"eth_batchRequest"},cb:w}):this.enqueue({payload:y,cb:w})}},{key:"sendFortmaticAsync",value:function(y,w){this.enqueue({payload:y,cb:w,isNative:!0})}},{key:"send",value:function(y,w){if(typeof y=="string")return f.sendAsyncWrapper.call(this,y,w);if(!w){console.warn("Non-async web3 methods will be deprecated in web3 > 1.0, and are not supported by the Fortmatic provider. An async method to be used instead."),this.sendAsync(y,function(){});var v={};switch(y.method){case"eth_accounts":v=this.account?[this.account]:[];break;case"eth_coinbase":v=this.account;break;case"net_version":v=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":v=!0;break;default:v={}}return{id:y.id,jsonrpc:y.jsonrpc,result:v}}this.sendAsync(y,w)}},{key:"enqueue",value:function(y){this.queue.push(y),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var y=(0,a.default)(i.default.mark(function w(){var v,g,_,b=this;return i.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(this.queue.length!==0){S.next=2;break}return S.abrupt("return");case 2:if(!(v=this.queue.shift())){S.next=11;break}return g=v.payload,_=v.cb,g.id=(0,f.randomId)(),S.next=9,this.postMessage(v.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,v.payload);case 9:g.batch&&g.batch.length>0?(g.batch.forEach(function(A){b.requests[A.id]={parentId:g.id,payload:A,cb:function(I,E){var p=b.requests[g.id].batchResponse;if(I&&I.response&&!(0,f.findExistingResponse)(p,I.response.id))throw p.push({jsonrpc:"2.0",id:I.response.id,error:{code:I.response.code,message:I.response.message}}),b.requests[g.id].cb(null,p),I.response;if(E&&E.result&&!(0,f.findExistingResponse)(p,E.id))return p.push(E);throw new Error("Fortmatic: unexpected callback behavior")}}}),this.requests[g.id]={payload:g,cb:_,batchResponse:[]}):this.requests[g.id]={payload:g,cb:_},this.dequeue();case 11:case"end":return S.stop()}},w,this)}));return function(){return y.apply(this,arguments)}}()},{key:"postMessage",value:function(){var y=(0,a.default)(i.default.mark(function w(v,g){var _;return i.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.overlay;case 2:if(!(_=b.sent).iframe.contentWindow){b.next=7;break}_.iframe.contentWindow.postMessage({msgType:v,payload:g},"*"),b.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return b.stop()}},w,this)}));return function(w,v){return y.apply(this,arguments)}}()},{key:"enable",value:function(){return f.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var y=this;window.addEventListener("message",function(w){if(w.origin===y.fortmaticClient){var v=w.data.response?w.data.response.id:null;switch(w.data.msgType){case y.postMessages.FORTMATIC_OVERLAY_READY:y.overlayReady=!0,y.dequeue();break;case y.postMessages.FORTMATIC_HANDLE_RESPONSE:try{y.requests[v].cb(null,w.data.response);var g=y.requests[v].parentId;g&&y.requests[g].payload.batch.length===y.requests[g].batchResponse.length&&y.requests[g].cb(null,y.requests[g].batchResponse),y.requests[v].payload.method==="eth_accounts"?y.account=w.data.response.result[0]:y.requests[v].payload.method==="eth_coinbase"?y.account=w.data.response.result:y.requests[v].payload.method==="net_version"&&(y.network=w.data.response.result)}catch{}y.isLoggedIn=!0,y.dequeue();break;case y.postMessages.FORTMATIC_HIDE_OVERLAY:y.hideOverlay();break;case y.postMessages.FORTMATIC_SHOW_OVERLAY:y.showOverlay();break;case y.postMessages.FORTMATIC_USER_LOGOUT:y.account=null,y.network=null,y.isLoggedIn=!1;break;case y.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw y.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case y.postMessages.FORTMATIC_USER_DENIED:if(v){var _=w.data.response&&w.data.response.message?w.data.response.message:"Fortmatic: Modal was closed without executing action!",b=w.data.response&&w.data.response.code?w.data.response.code:1;y.requests[v].cb({message:_,code:b,response:w.data.response})}else y.queue.forEach(function(S){return S.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})});y.dequeue()}}})}}]),m}();e.default=h},function(t,e,r){t.exports=r(7)},function(t,e,r){var n=function(){return this||typeof self=="object"&&self}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,a=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(8),i)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch{n.regeneratorRuntime=void 0}},function(t,e){(function(r){var n,i=Object.prototype,a=i.hasOwnProperty,s=typeof Symbol=="function"?Symbol:{},o=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag",f=typeof t=="object",h=r.regeneratorRuntime;if(h)f&&(t.exports=h);else{(h=r.regeneratorRuntime=f?t.exports:{}).wrap=I;var m="suspendedStart",y="suspendedYield",w="executing",v="completed",g={},_={};_[o]=function(){return this};var b=Object.getPrototypeOf,S=b&&b(b(Q([])));S&&S!==i&&a.call(S,o)&&(_=S);var A=N.prototype=p.prototype=Object.create(_);O.prototype=A.constructor=N,N.constructor=O,N[u]=O.displayName="GeneratorFunction",h.isGeneratorFunction=function(j){var B=typeof j=="function"&&j.constructor;return!!B&&(B===O||(B.displayName||B.name)==="GeneratorFunction")},h.mark=function(j){return Object.setPrototypeOf?Object.setPrototypeOf(j,N):(j.__proto__=N,u in j||(j[u]="GeneratorFunction")),j.prototype=Object.create(A),j},h.awrap=function(j){return{__await:j}},F(V.prototype),V.prototype[c]=function(){return this},h.AsyncIterator=V,h.async=function(j,B,H,M){var q=new V(I(j,B,H,M));return h.isGeneratorFunction(B)?q:q.next().then(function(k){return k.done?k.value:q.next()})},F(A),A[u]="Generator",A[o]=function(){return this},A.toString=function(){return"[object Generator]"},h.keys=function(j){var B=[];for(var H in j)B.push(H);return B.reverse(),function M(){for(;B.length;){var q=B.pop();if(q in j)return M.value=q,M.done=!1,M}return M.done=!0,M}},h.values=Q,L.prototype={constructor:L,reset:function(j){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(U),!j)for(var B in this)B.charAt(0)==="t"&&a.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=n)},stop:function(){this.done=!0;var j=this.tryEntries[0].completion;if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function(j){if(this.done)throw j;var B=this;function H(pe,Y){return k.type="throw",k.arg=j,B.next=pe,Y&&(B.method="next",B.arg=n),!!Y}for(var M=this.tryEntries.length-1;M>=0;--M){var q=this.tryEntries[M],k=q.completion;if(q.tryLoc==="root")return H("end");if(q.tryLoc<=this.prev){var $=a.call(q,"catchLoc"),G=a.call(q,"finallyLoc");if($&&G){if(this.prev<q.catchLoc)return H(q.catchLoc,!0);if(this.prev<q.finallyLoc)return H(q.finallyLoc)}else if($){if(this.prev<q.catchLoc)return H(q.catchLoc,!0)}else{if(!G)throw new Error("try statement without catch or finally");if(this.prev<q.finallyLoc)return H(q.finallyLoc)}}}},abrupt:function(j,B){for(var H=this.tryEntries.length-1;H>=0;--H){var M=this.tryEntries[H];if(M.tryLoc<=this.prev&&a.call(M,"finallyLoc")&&this.prev<M.finallyLoc){var q=M;break}}q&&(j==="break"||j==="continue")&&q.tryLoc<=B&&B<=q.finallyLoc&&(q=null);var k=q?q.completion:{};return k.type=j,k.arg=B,q?(this.method="next",this.next=q.finallyLoc,g):this.complete(k)},complete:function(j,B){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&B&&(this.next=B),g},finish:function(j){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.finallyLoc===j)return this.complete(H.completion,H.afterLoc),U(H),g}},catch:function(j){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.tryLoc===j){var M=H.completion;if(M.type==="throw"){var q=M.arg;U(H)}return q}}throw new Error("illegal catch attempt")},delegateYield:function(j,B,H){return this.delegate={iterator:Q(j),resultName:B,nextLoc:H},this.method==="next"&&(this.arg=n),g}}}function I(j,B,H,M){var q=B&&B.prototype instanceof p?B:p,k=Object.create(q.prototype),$=new L(M||[]);return k._invoke=function(G,pe,Y){var te=m;return function(ce,T){if(te===w)throw new Error("Generator is already running");if(te===v){if(ce==="throw")throw T;return ne()}for(Y.method=ce,Y.arg=T;;){var le=Y.delegate;if(le){var ze=de(le,Y);if(ze){if(ze===g)continue;return ze}}if(Y.method==="next")Y.sent=Y._sent=Y.arg;else if(Y.method==="throw"){if(te===m)throw te=v,Y.arg;Y.dispatchException(Y.arg)}else Y.method==="return"&&Y.abrupt("return",Y.arg);te=w;var et=E(G,pe,Y);if(et.type==="normal"){if(te=Y.done?v:y,et.arg===g)continue;return{value:et.arg,done:Y.done}}et.type==="throw"&&(te=v,Y.method="throw",Y.arg=et.arg)}}}(j,H,$),k}function E(j,B,H){try{return{type:"normal",arg:j.call(B,H)}}catch(M){return{type:"throw",arg:M}}}function p(){}function O(){}function N(){}function F(j){["next","throw","return"].forEach(function(B){j[B]=function(H){return this._invoke(B,H)}})}function V(j){var B;this._invoke=function(H,M){function q(){return new Promise(function(k,$){(function G(pe,Y,te,ce){var T=E(j[pe],j,Y);if(T.type!=="throw"){var le=T.arg,ze=le.value;return ze&&typeof ze=="object"&&a.call(ze,"__await")?Promise.resolve(ze.__await).then(function(et){G("next",et,te,ce)},function(et){G("throw",et,te,ce)}):Promise.resolve(ze).then(function(et){le.value=et,te(le)},function(et){return G("throw",et,te,ce)})}ce(T.arg)})(H,M,k,$)})}return B=B?B.then(q,q):q()}}function de(j,B){var H=j.iterator[B.method];if(H===n){if(B.delegate=null,B.method==="throw"){if(j.iterator.return&&(B.method="return",B.arg=n,de(j,B),B.method==="throw"))return g;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var M=E(H,j.iterator,B.arg);if(M.type==="throw")return B.method="throw",B.arg=M.arg,B.delegate=null,g;var q=M.arg;return q?q.done?(B[j.resultName]=q.value,B.next=j.nextLoc,B.method!=="return"&&(B.method="next",B.arg=n),B.delegate=null,g):q:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,g)}function ve(j){var B={tryLoc:j[0]};1 in j&&(B.catchLoc=j[1]),2 in j&&(B.finallyLoc=j[2],B.afterLoc=j[3]),this.tryEntries.push(B)}function U(j){var B=j.completion||{};B.type="normal",delete B.arg,j.completion=B}function L(j){this.tryEntries=[{tryLoc:"root"}],j.forEach(ve,this),this.reset(!0)}function Q(j){if(j){var B=j[o];if(B)return B.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length)){var H=-1,M=function q(){for(;++H<j.length;)if(a.call(j,H))return q.value=j[H],q.done=!1,q;return q.value=n,q.done=!0,q};return M.next=M}}return{next:ne}}function ne(){return{value:n,done:!0}}})(function(){return this||typeof self=="object"&&self}()||Function("return this")())},function(t,e){function r(n,i,a,s,o,c,u){try{var f=n[c](u),h=f.value}catch(m){return void a(m)}f.done?i(h):Promise.resolve(h).then(s,o)}t.exports=function(n){return function(){var i=this,a=arguments;return new Promise(function(s,o){var c=n.apply(i,a);function u(h){r(c,s,o,u,f,"next",h)}function f(h){r(c,s,o,u,f,"throw",h)}u(void 0)})}}},function(t,e){function r(n,i){for(var a=0;a<i.length;a++){var s=i[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(n,s.key,s)}}t.exports=function(n,i,a){return i&&r(n.prototype,i),a&&r(n,a),n}},function(t){t.exports={name:"fortmatic",version:"1.1.3",description:"Fortmatic Javascript SDK",main:"lib/fortmatic.js",scripts:{build:"WEBPACK_ENV=production webpack","build:dev":"WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",test:"nyc --reporter=lcov --reporter=text-summary ava"},author:"Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",license:"MIT",repository:{type:"git",url:"https://github.com/fortmatic/fortmatic-js"},keywords:["Auth","Login","Web3","Crypto","Ethereum","MetaMask","Wallet","Blockchain","Dapp"],homepage:"https://www.fortmatic.com",ava:{require:["@babel/register"],files:["test/**/*.spec.js"],babel:{testOptions:{presets:["@babel/env"],plugins:["@babel/plugin-proposal-function-bind","@babel/plugin-transform-runtime"]}},verbose:!0},nyc:{all:!1,"check-coverage":!0,"per-file":!0,lines:80,statements:80,functions:80,branches:80,include:["src/**/*.js"],exclude:["*/style.js"],require:[],reporter:["html","lcov"]},dependencies:{"@babel/runtime":"7.3.4"},devDependencies:{"@babel/core":"7.3.4","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.2.0","@babel/plugin-transform-runtime":"7.3.4","@babel/preset-env":"7.3.4","@babel/register":"7.0.0",ava:"2.2.0","babel-eslint":"10.0.1","babel-loader":"8.0.5",eslint:"5.9.0",lodash:"4.17.11",nyc:"13.1.0",sinon:"7.1.1",webpack:"4.26.1","webpack-cli":"3.1.2"}}},function(t,e,r){e.css=`
102
+ .fortmatic-iframe {
103
+ display: none;
104
+ position: fixed;
105
+ top: 0;
106
+ right: 0;
107
+ width: 100%;
108
+ height: 100%;
109
+ border: none;
110
+ border-radius: 0;
111
+ z-index: 2147483647;
112
+ }
113
+ `}])),IT}var dEe=ke&&ke.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),hEe=ke&&ke.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pEe=ke&&ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&dEe(e,t,r);return hEe(e,t),e};Object.defineProperty(x2,"__esModule",{value:!0});x2.FortmaticConnector=void 0;const gEe=vJ,mEe=Lh,yEe=Io;class vEe extends gEe.AbstractConnector{constructor(e){const r=yEe.getConfiguration()[mEe.ProviderType.FORTMATIC],n=Object.keys(r.apiKeys).map(i=>Number(i));if(!n.includes(e))throw new Error(`Invariant error: Unsupported chainId ${e}`);super({supportedChainIds:n}),this.apiKey=r.apiKeys[e],this.chainId=e,this.rpcUrl=r.urls[e]}async activate(){if(!this.fortmatic){const{default:r}=await Promise.resolve().then(()=>pEe(fEe()));this.fortmatic=new r(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const e=await this.fortmatic.getProvider().enable().then(r=>r[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:e}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(e=>e[0])}deactivate(){}async close(){await this.fortmatic.user.logout(),this.emitDeactivate()}}x2.FortmaticConnector=vEe;var N2={};function N6(){return N6=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},N6.apply(this,arguments)}function C4(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function D6(t){return D6=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},D6(t)}function jE(t,e){return jE=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},jE(t,e)}function bEe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function U_(t,e,r){return bEe()?U_=Reflect.construct:U_=function(i,a,s){var o=[null];o.push.apply(o,a);var c=Function.bind.apply(i,o),u=new c;return s&&jE(u,s.prototype),u},U_.apply(null,arguments)}function wEe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function UE(t){var e=typeof Map=="function"?new Map:void 0;return UE=function(n){if(n===null||!wEe(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return U_(n,arguments,D6(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),jE(i,n)},UE(t)}function Ww(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function Ap(t,e){try{var r=t()}catch(n){return e(n)}return r&&r.then?r.then(void 0,e):r}function xc(t){return t.hasOwnProperty("result")?t.result:t}var F_=function(t){C4(e,t);function e(){var r;return r=t.call(this)||this,r.name=r.constructor.name,r.message="No Ethereum provider was found on window.ethereum.",r}return e}(UE(Error)),bX=function(t){C4(e,t);function e(){var r;return r=t.call(this)||this,r.name=r.constructor.name,r.message="The user rejected the request.",r}return e}(UE(Error)),_Ee=function(t){C4(e,t);function e(n){var i;return i=t.call(this,n)||this,i.handleNetworkChanged=i.handleNetworkChanged.bind(Ww(i)),i.handleChainChanged=i.handleChainChanged.bind(Ww(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(Ww(i)),i.handleClose=i.handleClose.bind(Ww(i)),i}var r=e.prototype;return r.handleChainChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},r.handleAccountsChanged=function(i){i.length===0?this.emitDeactivate():this.emitUpdate({account:i[0]})},r.handleClose=function(i,a){this.emitDeactivate()},r.handleNetworkChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},r.activate=function(){try{var i=function(f){if(a)return f;function h(){return N6({provider:window.ethereum},o?{account:o}:{})}var m=function(){if(!o)return Promise.resolve(window.ethereum.enable().then(function(y){return y&&xc(y)[0]})).then(function(y){o=y})}();return m&&m.then?m.then(h):h(m)},a=!1,s=this;if(!window.ethereum)throw new F_;window.ethereum.on&&(window.ethereum.on("chainChanged",s.handleChainChanged),window.ethereum.on("accountsChanged",s.handleAccountsChanged),window.ethereum.on("close",s.handleClose),window.ethereum.on("networkChanged",s.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var o,c=Ap(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(u){return xc(u)[0]})).then(function(u){o=u})},function(u){if(u.code===4001)throw new bX});return Promise.resolve(c&&c.then?c.then(i):i(c))}catch(u){return Promise.reject(u)}},r.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(i){return Promise.reject(i)}},r.getChainId=function(){try{var i=function(){function c(){if(!a)try{a=xc(window.ethereum.send({method:"net_version"}))}catch{}return a||(window.ethereum.isDapper?a=xc(window.ethereum.cachedResults.net_version):a=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),a}var u=function(){if(!a){var f=Ap(function(){return Promise.resolve(window.ethereum.send("net_version").then(xc)).then(function(h){a=h})},function(){});if(f&&f.then)return f.then(function(){})}}();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new F_;var a,s=Ap(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(xc)).then(function(o){a=o})},function(){});return Promise.resolve(s&&s.then?s.then(i):i(s))}catch(o){return Promise.reject(o)}},r.getAccount=function(){try{var i=function(){function c(){return a||(a=xc(window.ethereum.send({method:"eth_accounts"}))[0]),a}var u=function(){if(!a){var f=Ap(function(){return Promise.resolve(window.ethereum.enable().then(function(h){return xc(h)[0]})).then(function(h){a=h})},function(){});if(f&&f.then)return f.then(function(){})}}();return u&&u.then?u.then(c):c(u)};if(!window.ethereum)throw new F_;var a,s=Ap(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(o){return xc(o)[0]})).then(function(o){a=o})},function(){});return Promise.resolve(s&&s.then?s.then(i):i(s))}catch(o){return Promise.reject(o)}},r.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},r.isAuthorized=function(){try{return window.ethereum?Promise.resolve(Ap(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(i){return xc(i).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(i){return Promise.reject(i)}},e}(E2);const EEe=Object.freeze(Object.defineProperty({__proto__:null,InjectedConnector:_Ee,NoEthereumProviderError:F_,UserRejectedRequestError:bX},Symbol.toStringTag,{value:"Module"})),xEe=js(EEe);Object.defineProperty(N2,"__esModule",{value:!0});N2.InjectedConnector=void 0;const AEe=xEe;class SEe extends AEe.InjectedConnector{constructor(e){super({supportedChainIds:[e]})}}N2.InjectedConnector=SEe;var D2={},IEe="Invariant failed";function XB(t,e){if(!t)throw new Error(IEe)}function wX(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,cb(t,e)}function M6(t){return M6=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},M6(t)}function cb(t,e){return cb=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},cb(t,e)}function OEe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function B_(t,e,r){return OEe()?B_=Reflect.construct:B_=function(i,a,s){var o=[null];o.push.apply(o,a);var c=Function.bind.apply(i,o),u=new c;return s&&cb(u,s.prototype),u},B_.apply(null,arguments)}function PEe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function $6(t){var e=typeof Map=="function"?new Map:void 0;return $6=function(n){if(n===null||!PEe(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return B_(n,arguments,M6(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),cb(i,n)},$6(t)}var q_=function(t){wX(e,t);function e(r,n,i){var a;return a=t.call(this)||this,a.code=n,a.data=i,a.name=a.constructor.name,a.message=r,a}return e}($6(Error)),TEe=function(e,r){var n=this,i=this;this.isMetaMask=!1,this.sendAsync=function(s,o){console.log("sendAsync",s.method,s.params),i.request(s.method,s.params).then(function(c){return o(null,{jsonrpc:"2.0",id:s.id,result:c})}).catch(function(c){return o(c,null)})},this.request=function(s,o){try{return typeof s!="string"&&(o=s.params,s=s.method),Promise.resolve(fetch(n.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:s,params:o}),headers:{"Content-Type":"application/json"}})).then(function(c){if(!c.ok)throw new q_(c.status+": "+c.statusText,-32e3);return Promise.resolve(c.json()).then(function(u){if("error"in u){var f,h,m;throw new q_(u==null||(f=u.error)==null?void 0:f.message,u==null||(h=u.error)==null?void 0:h.code,u==null||(m=u.error)==null?void 0:m.data)}else{if("result"in u)return u.result;throw new q_("Received unexpected JSON-RPC response to "+s+" request.",-32e3,u)}})})}catch(c){return Promise.reject(c)}},this.chainId=e,this.url=r;var a=new URL(r);this.host=a.host,this.path=a.pathname},CEe=function(t){wX(e,t);function e(n){var i,a=n.urls,s=n.defaultChainId;return s||Object.keys(a).length===1||XB(!1),i=t.call(this,{supportedChainIds:Object.keys(a).map(function(o){return Number(o)})})||this,i.currentChainId=s||Number(Object.keys(a)[0]),i.providers=Object.keys(a).reduce(function(o,c){return o[Number(c)]=new TEe(Number(c),a[Number(c)]),o},{}),i}var r=e.prototype;return r.activate=function(){try{var i=this;return Promise.resolve({provider:i.providers[i.currentChainId],chainId:i.currentChainId,account:null})}catch(a){return Promise.reject(a)}},r.getProvider=function(){try{var i=this;return Promise.resolve(i.providers[i.currentChainId])}catch(a){return Promise.reject(a)}},r.getChainId=function(){try{var i=this;return Promise.resolve(i.currentChainId)}catch(a){return Promise.reject(a)}},r.getAccount=function(){return Promise.resolve(null)},r.deactivate=function(){},r.changeChainId=function(i){Object.keys(this.providers).includes(i.toString())||XB(!1),this.currentChainId=i,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:i})},e}(E2);const REe=Object.freeze(Object.defineProperty({__proto__:null,NetworkConnector:CEe,RequestError:q_},Symbol.toStringTag,{value:"Module"})),NEe=js(REe);Object.defineProperty(D2,"__esModule",{value:!0});D2.NetworkConnector=void 0;const DEe=sc,MEe=NEe,$Ee=Io;class kEe extends MEe.NetworkConnector{constructor(e){super({urls:$Ee.getConfiguration()[DEe.ProviderType.NETWORK].urls,defaultChainId:e})}}D2.NetworkConnector=kEe;var M2={};const LEe="modulepreload",jEe=function(t){return"/"+t},ZB={},ub=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=jEe(a),a in ZB)return;ZB[a]=!0;const s=a.endsWith(".css"),o=s?'[rel="stylesheet"]':"";if(!!n)for(let f=i.length-1;f>=0;f--){const h=i[f];if(h.href===a&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${o}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":LEe,s||(u.as="script",u.crossOrigin=""),u.href=a,document.head.appendChild(u),s)return new Promise((f,h)=>{u.addEventListener("load",f),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})};function k6(){return k6=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},k6.apply(this,arguments)}function UEe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,L6(t,e)}function L6(t,e){return L6=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},L6(t,e)}function eq(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var FEe=1,BEe=function(t){UEe(e,t);function e(n){var i,a=n.url,s=n.appName,o=n.appLogoUrl,c=n.darkMode,u=n.supportedChainIds;return i=t.call(this,{supportedChainIds:u})||this,i.url=a,i.appName=s,i.appLogoUrl=o,i.darkMode=c||!1,i.handleChainChanged=i.handleChainChanged.bind(eq(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(eq(i)),i}var r=e.prototype;return r.activate=function(){try{var i=this,a=function(){return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(c){var u=c[0];return i.provider.on("chainChanged",i.handleChainChanged),i.provider.on("accountsChanged",i.handleAccountsChanged),{provider:i.provider,account:u}})},s=function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)i.provider=window.ethereum;else{var o=function(){if(!i.walletLink)return Promise.resolve(ub(()=>import("./index-0bf5e711.js").then(c=>c.i),[]).then(function(c){var u;return(u=c==null?void 0:c.default)!=null?u:c})).then(function(c){i.walletLink=new c(k6({appName:i.appName,darkMode:i.darkMode},i.appLogoUrl?{appLogoUrl:i.appLogoUrl}:{})),i.provider=i.walletLink.makeWeb3Provider(i.url,FEe)})}();if(o&&o.then)return o.then(function(){})}}();return Promise.resolve(s&&s.then?s.then(a):a(s))}catch(o){return Promise.reject(o)}},r.getProvider=function(){try{var i=this;return Promise.resolve(i.provider)}catch(a){return Promise.reject(a)}},r.getChainId=function(){try{var i=this;return Promise.resolve(i.provider.chainId)}catch(a){return Promise.reject(a)}},r.getAccount=function(){try{var i=this;return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(a){return a[0]})}catch(a){return Promise.reject(a)}},r.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},r.close=function(){try{var i=this;return i.provider.close(),i.emitDeactivate(),Promise.resolve()}catch(a){return Promise.reject(a)}},r.handleChainChanged=function(i){this.emitUpdate({chainId:i})},r.handleAccountsChanged=function(i){this.emitUpdate({account:i[0]})},e}(E2);const qEe=Object.freeze(Object.defineProperty({__proto__:null,WalletLinkConnector:BEe},Symbol.toStringTag,{value:"Module"})),HEe=js(qEe);Object.defineProperty(M2,"__esModule",{value:!0});M2.WalletLinkConnector=void 0;const zEe=Lh,VEe=HEe,GEe=Io;class KEe extends VEe.WalletLinkConnector{constructor(e){const r=GEe.getConfiguration()[zEe.ProviderType.WALLET_LINK];super({url:r.urls[e],appName:r.appName,supportedChainIds:[e]})}}M2.WalletLinkConnector=KEe;var $2={},R4={},k2={},Mr={},_X={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(o,c){var u=o>>>16&65535,f=o&65535,h=c>>>16&65535,m=c&65535;return f*m+(u*m+f*h<<16>>>0)|0}t.mul=Math.imul||e;function r(o,c){return o+c|0}t.add=r;function n(o,c){return o-c|0}t.sub=n;function i(o,c){return o<<c|o>>>32-c}t.rotl=i;function a(o,c){return o<<32-c|o>>>c}t.rotr=a;function s(o){return typeof o=="number"&&isFinite(o)&&Math.floor(o)===o}t.isInteger=Number.isInteger||s,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(o){return t.isInteger(o)&&o>=-t.MAX_SAFE_INTEGER&&o<=t.MAX_SAFE_INTEGER}})(_X);Object.defineProperty(Mr,"__esModule",{value:!0});var EX=_X;function WEe(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}Mr.readInt16BE=WEe;function QEe(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}Mr.readUint16BE=QEe;function YEe(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}Mr.readInt16LE=YEe;function JEe(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}Mr.readUint16LE=JEe;function xX(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}Mr.writeUint16BE=xX;Mr.writeInt16BE=xX;function AX(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}Mr.writeUint16LE=AX;Mr.writeInt16LE=AX;function j6(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}Mr.readInt32BE=j6;function U6(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}Mr.readUint32BE=U6;function F6(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}Mr.readInt32LE=F6;function B6(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}Mr.readUint32LE=B6;function FE(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}Mr.writeUint32BE=FE;Mr.writeInt32BE=FE;function BE(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}Mr.writeUint32LE=BE;Mr.writeInt32LE=BE;function XEe(t,e){e===void 0&&(e=0);var r=j6(t,e),n=j6(t,e+4);return r*4294967296+n-(n>>31)*4294967296}Mr.readInt64BE=XEe;function ZEe(t,e){e===void 0&&(e=0);var r=U6(t,e),n=U6(t,e+4);return r*4294967296+n}Mr.readUint64BE=ZEe;function exe(t,e){e===void 0&&(e=0);var r=F6(t,e),n=F6(t,e+4);return n*4294967296+r-(r>>31)*4294967296}Mr.readInt64LE=exe;function txe(t,e){e===void 0&&(e=0);var r=B6(t,e),n=B6(t,e+4);return n*4294967296+r}Mr.readUint64LE=txe;function SX(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),FE(t/4294967296>>>0,e,r),FE(t>>>0,e,r+4),e}Mr.writeUint64BE=SX;Mr.writeInt64BE=SX;function IX(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),BE(t>>>0,e,r),BE(t/4294967296>>>0,e,r+4),e}Mr.writeUint64LE=IX;Mr.writeInt64LE=IX;function rxe(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,a=t/8+r-1;a>=r;a--)n+=e[a]*i,i*=256;return n}Mr.readUintBE=rxe;function nxe(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,a=r;a<r+t/8;a++)n+=e[a]*i,i*=256;return n}Mr.readUintLE=nxe;function ixe(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!EX.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var i=1,a=t/8+n-1;a>=n;a--)r[a]=e/i&255,i*=256;return r}Mr.writeUintBE=ixe;function axe(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!EX.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,a=n;a<n+t/8;a++)r[a]=e/i&255,i*=256;return r}Mr.writeUintLE=axe;function sxe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e)}Mr.readFloat32BE=sxe;function oxe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat32(e,!0)}Mr.readFloat32LE=oxe;function cxe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e)}Mr.readFloat64BE=cxe;function uxe(t,e){e===void 0&&(e=0);var r=new DataView(t.buffer,t.byteOffset,t.byteLength);return r.getFloat64(e,!0)}Mr.readFloat64LE=uxe;function lxe(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t),e}Mr.writeFloat32BE=lxe;function fxe(t,e,r){e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat32(r,t,!0),e}Mr.writeFloat32LE=fxe;function dxe(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t),e}Mr.writeFloat64BE=dxe;function hxe(t,e,r){e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0);var n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.setFloat64(r,t,!0),e}Mr.writeFloat64LE=hxe;var qs={};Object.defineProperty(qs,"__esModule",{value:!0});function pxe(t){for(var e=0;e<t.length;e++)t[e]=0;return t}qs.wipe=pxe;Object.defineProperty(k2,"__esModule",{value:!0});var ma=Mr,q6=qs,gxe=20;function mxe(t,e,r){for(var n=1634760805,i=857760878,a=2036477234,s=1797285236,o=r[3]<<24|r[2]<<16|r[1]<<8|r[0],c=r[7]<<24|r[6]<<16|r[5]<<8|r[4],u=r[11]<<24|r[10]<<16|r[9]<<8|r[8],f=r[15]<<24|r[14]<<16|r[13]<<8|r[12],h=r[19]<<24|r[18]<<16|r[17]<<8|r[16],m=r[23]<<24|r[22]<<16|r[21]<<8|r[20],y=r[27]<<24|r[26]<<16|r[25]<<8|r[24],w=r[31]<<24|r[30]<<16|r[29]<<8|r[28],v=e[3]<<24|e[2]<<16|e[1]<<8|e[0],g=e[7]<<24|e[6]<<16|e[5]<<8|e[4],_=e[11]<<24|e[10]<<16|e[9]<<8|e[8],b=e[15]<<24|e[14]<<16|e[13]<<8|e[12],S=n,A=i,I=a,E=s,p=o,O=c,N=u,F=f,V=h,de=m,ve=y,U=w,L=v,Q=g,ne=_,j=b,B=0;B<gxe;B+=2)S=S+p|0,L^=S,L=L>>>32-16|L<<16,V=V+L|0,p^=V,p=p>>>32-12|p<<12,A=A+O|0,Q^=A,Q=Q>>>32-16|Q<<16,de=de+Q|0,O^=de,O=O>>>32-12|O<<12,I=I+N|0,ne^=I,ne=ne>>>32-16|ne<<16,ve=ve+ne|0,N^=ve,N=N>>>32-12|N<<12,E=E+F|0,j^=E,j=j>>>32-16|j<<16,U=U+j|0,F^=U,F=F>>>32-12|F<<12,I=I+N|0,ne^=I,ne=ne>>>32-8|ne<<8,ve=ve+ne|0,N^=ve,N=N>>>32-7|N<<7,E=E+F|0,j^=E,j=j>>>32-8|j<<8,U=U+j|0,F^=U,F=F>>>32-7|F<<7,A=A+O|0,Q^=A,Q=Q>>>32-8|Q<<8,de=de+Q|0,O^=de,O=O>>>32-7|O<<7,S=S+p|0,L^=S,L=L>>>32-8|L<<8,V=V+L|0,p^=V,p=p>>>32-7|p<<7,S=S+O|0,j^=S,j=j>>>32-16|j<<16,ve=ve+j|0,O^=ve,O=O>>>32-12|O<<12,A=A+N|0,L^=A,L=L>>>32-16|L<<16,U=U+L|0,N^=U,N=N>>>32-12|N<<12,I=I+F|0,Q^=I,Q=Q>>>32-16|Q<<16,V=V+Q|0,F^=V,F=F>>>32-12|F<<12,E=E+p|0,ne^=E,ne=ne>>>32-16|ne<<16,de=de+ne|0,p^=de,p=p>>>32-12|p<<12,I=I+F|0,Q^=I,Q=Q>>>32-8|Q<<8,V=V+Q|0,F^=V,F=F>>>32-7|F<<7,E=E+p|0,ne^=E,ne=ne>>>32-8|ne<<8,de=de+ne|0,p^=de,p=p>>>32-7|p<<7,A=A+N|0,L^=A,L=L>>>32-8|L<<8,U=U+L|0,N^=U,N=N>>>32-7|N<<7,S=S+O|0,j^=S,j=j>>>32-8|j<<8,ve=ve+j|0,O^=ve,O=O>>>32-7|O<<7;ma.writeUint32LE(S+n|0,t,0),ma.writeUint32LE(A+i|0,t,4),ma.writeUint32LE(I+a|0,t,8),ma.writeUint32LE(E+s|0,t,12),ma.writeUint32LE(p+o|0,t,16),ma.writeUint32LE(O+c|0,t,20),ma.writeUint32LE(N+u|0,t,24),ma.writeUint32LE(F+f|0,t,28),ma.writeUint32LE(V+h|0,t,32),ma.writeUint32LE(de+m|0,t,36),ma.writeUint32LE(ve+y|0,t,40),ma.writeUint32LE(U+w|0,t,44),ma.writeUint32LE(L+v|0,t,48),ma.writeUint32LE(Q+g|0,t,52),ma.writeUint32LE(ne+_|0,t,56),ma.writeUint32LE(j+b|0,t,60)}function OX(t,e,r,n,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var a,s;if(i===0){if(e.length!==8&&e.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");a=new Uint8Array(16),s=a.length-e.length,a.set(e,s)}else{if(e.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");a=e,s=i}for(var o=new Uint8Array(64),c=0;c<r.length;c+=64){mxe(o,a,t);for(var u=c;u<c+64&&u<r.length;u++)n[u]=r[u]^o[u-c];vxe(a,0,s)}return q6.wipe(o),i===0&&q6.wipe(a),n}k2.streamXOR=OX;function yxe(t,e,r,n){return n===void 0&&(n=0),q6.wipe(r),OX(t,e,r,r,n)}k2.stream=yxe;function vxe(t,e,r){for(var n=1;r--;)n=n+(t[e]&255)|0,t[e]=n&255,n>>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var PX={},zf={};Object.defineProperty(zf,"__esModule",{value:!0});function bxe(t,e,r){return~(t-1)&e|t-1&r}zf.select=bxe;function wxe(t,e){return(t|0)-(e|0)-1>>>31&1}zf.lessOrEqual=wxe;function TX(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return 1&r-1>>>8}zf.compare=TX;function _xe(t,e){return t.length===0||e.length===0?!1:TX(t,e)!==0}zf.equal=_xe;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=zf,r=qs;t.DIGEST_LENGTH=16;var n=function(){function s(o){this.digestLength=t.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 c=o[0]|o[1]<<8;this._r[0]=c&8191;var u=o[2]|o[3]<<8;this._r[1]=(c>>>13|u<<3)&8191;var f=o[4]|o[5]<<8;this._r[2]=(u>>>10|f<<6)&7939;var h=o[6]|o[7]<<8;this._r[3]=(f>>>7|h<<9)&8191;var m=o[8]|o[9]<<8;this._r[4]=(h>>>4|m<<12)&255,this._r[5]=m>>>1&8190;var y=o[10]|o[11]<<8;this._r[6]=(m>>>14|y<<2)&8191;var w=o[12]|o[13]<<8;this._r[7]=(y>>>11|w<<5)&8065;var v=o[14]|o[15]<<8;this._r[8]=(w>>>8|v<<8)&8191,this._r[9]=v>>>5&127,this._pad[0]=o[16]|o[17]<<8,this._pad[1]=o[18]|o[19]<<8,this._pad[2]=o[20]|o[21]<<8,this._pad[3]=o[22]|o[23]<<8,this._pad[4]=o[24]|o[25]<<8,this._pad[5]=o[26]|o[27]<<8,this._pad[6]=o[28]|o[29]<<8,this._pad[7]=o[30]|o[31]<<8}return s.prototype._blocks=function(o,c,u){for(var f=this._fin?0:2048,h=this._h[0],m=this._h[1],y=this._h[2],w=this._h[3],v=this._h[4],g=this._h[5],_=this._h[6],b=this._h[7],S=this._h[8],A=this._h[9],I=this._r[0],E=this._r[1],p=this._r[2],O=this._r[3],N=this._r[4],F=this._r[5],V=this._r[6],de=this._r[7],ve=this._r[8],U=this._r[9];u>=16;){var L=o[c+0]|o[c+1]<<8;h+=L&8191;var Q=o[c+2]|o[c+3]<<8;m+=(L>>>13|Q<<3)&8191;var ne=o[c+4]|o[c+5]<<8;y+=(Q>>>10|ne<<6)&8191;var j=o[c+6]|o[c+7]<<8;w+=(ne>>>7|j<<9)&8191;var B=o[c+8]|o[c+9]<<8;v+=(j>>>4|B<<12)&8191,g+=B>>>1&8191;var H=o[c+10]|o[c+11]<<8;_+=(B>>>14|H<<2)&8191;var M=o[c+12]|o[c+13]<<8;b+=(H>>>11|M<<5)&8191;var q=o[c+14]|o[c+15]<<8;S+=(M>>>8|q<<8)&8191,A+=q>>>5|f;var k=0,$=k;$+=h*I,$+=m*(5*U),$+=y*(5*ve),$+=w*(5*de),$+=v*(5*V),k=$>>>13,$&=8191,$+=g*(5*F),$+=_*(5*N),$+=b*(5*O),$+=S*(5*p),$+=A*(5*E),k+=$>>>13,$&=8191;var G=k;G+=h*E,G+=m*I,G+=y*(5*U),G+=w*(5*ve),G+=v*(5*de),k=G>>>13,G&=8191,G+=g*(5*V),G+=_*(5*F),G+=b*(5*N),G+=S*(5*O),G+=A*(5*p),k+=G>>>13,G&=8191;var pe=k;pe+=h*p,pe+=m*E,pe+=y*I,pe+=w*(5*U),pe+=v*(5*ve),k=pe>>>13,pe&=8191,pe+=g*(5*de),pe+=_*(5*V),pe+=b*(5*F),pe+=S*(5*N),pe+=A*(5*O),k+=pe>>>13,pe&=8191;var Y=k;Y+=h*O,Y+=m*p,Y+=y*E,Y+=w*I,Y+=v*(5*U),k=Y>>>13,Y&=8191,Y+=g*(5*ve),Y+=_*(5*de),Y+=b*(5*V),Y+=S*(5*F),Y+=A*(5*N),k+=Y>>>13,Y&=8191;var te=k;te+=h*N,te+=m*O,te+=y*p,te+=w*E,te+=v*I,k=te>>>13,te&=8191,te+=g*(5*U),te+=_*(5*ve),te+=b*(5*de),te+=S*(5*V),te+=A*(5*F),k+=te>>>13,te&=8191;var ce=k;ce+=h*F,ce+=m*N,ce+=y*O,ce+=w*p,ce+=v*E,k=ce>>>13,ce&=8191,ce+=g*I,ce+=_*(5*U),ce+=b*(5*ve),ce+=S*(5*de),ce+=A*(5*V),k+=ce>>>13,ce&=8191;var T=k;T+=h*V,T+=m*F,T+=y*N,T+=w*O,T+=v*p,k=T>>>13,T&=8191,T+=g*E,T+=_*I,T+=b*(5*U),T+=S*(5*ve),T+=A*(5*de),k+=T>>>13,T&=8191;var le=k;le+=h*de,le+=m*V,le+=y*F,le+=w*N,le+=v*O,k=le>>>13,le&=8191,le+=g*p,le+=_*E,le+=b*I,le+=S*(5*U),le+=A*(5*ve),k+=le>>>13,le&=8191;var ze=k;ze+=h*ve,ze+=m*de,ze+=y*V,ze+=w*F,ze+=v*N,k=ze>>>13,ze&=8191,ze+=g*O,ze+=_*p,ze+=b*E,ze+=S*I,ze+=A*(5*U),k+=ze>>>13,ze&=8191;var et=k;et+=h*U,et+=m*ve,et+=y*de,et+=w*V,et+=v*F,k=et>>>13,et&=8191,et+=g*N,et+=_*O,et+=b*p,et+=S*E,et+=A*I,k+=et>>>13,et&=8191,k=(k<<2)+k|0,k=k+$|0,$=k&8191,k=k>>>13,G+=k,h=$,m=G,y=pe,w=Y,v=te,g=ce,_=T,b=le,S=ze,A=et,c+=16,u-=16}this._h[0]=h,this._h[1]=m,this._h[2]=y,this._h[3]=w,this._h[4]=v,this._h[5]=g,this._h[6]=_,this._h[7]=b,this._h[8]=S,this._h[9]=A},s.prototype.finish=function(o,c){c===void 0&&(c=0);var u=new Uint16Array(10),f,h,m,y;if(this._leftover){for(y=this._leftover,this._buffer[y++]=1;y<16;y++)this._buffer[y]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(f=this._h[1]>>>13,this._h[1]&=8191,y=2;y<10;y++)this._h[y]+=f,f=this._h[y]>>>13,this._h[y]&=8191;for(this._h[0]+=f*5,f=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=f,f=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=f,u[0]=this._h[0]+5,f=u[0]>>>13,u[0]&=8191,y=1;y<10;y++)u[y]=this._h[y]+f,f=u[y]>>>13,u[y]&=8191;for(u[9]-=8192,h=(f^1)-1,y=0;y<10;y++)u[y]&=h;for(h=~h,y=0;y<10;y++)this._h[y]=this._h[y]&h|u[y];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,m=this._h[0]+this._pad[0],this._h[0]=m&65535,y=1;y<8;y++)m=(this._h[y]+this._pad[y]|0)+(m>>>16)|0,this._h[y]=m&65535;return o[c+0]=this._h[0]>>>0,o[c+1]=this._h[0]>>>8,o[c+2]=this._h[1]>>>0,o[c+3]=this._h[1]>>>8,o[c+4]=this._h[2]>>>0,o[c+5]=this._h[2]>>>8,o[c+6]=this._h[3]>>>0,o[c+7]=this._h[3]>>>8,o[c+8]=this._h[4]>>>0,o[c+9]=this._h[4]>>>8,o[c+10]=this._h[5]>>>0,o[c+11]=this._h[5]>>>8,o[c+12]=this._h[6]>>>0,o[c+13]=this._h[6]>>>8,o[c+14]=this._h[7]>>>0,o[c+15]=this._h[7]>>>8,this._finished=!0,this},s.prototype.update=function(o){var c=0,u=o.length,f;if(this._leftover){f=16-this._leftover,f>u&&(f=u);for(var h=0;h<f;h++)this._buffer[this._leftover+h]=o[c+h];if(u-=f,c+=f,this._leftover+=f,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(u>=16&&(f=u-u%16,this._blocks(o,c,f),c+=f,u-=f),u){for(var h=0;h<u;h++)this._buffer[this._leftover+h]=o[c+h];this._leftover+=u}return this},s.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var o=new Uint8Array(16);return this.finish(o),o},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}();t.Poly1305=n;function i(s,o){var c=new n(s);c.update(o);var u=c.digest();return c.clean(),u}t.oneTimeAuth=i;function a(s,o){return s.length!==t.DIGEST_LENGTH||o.length!==t.DIGEST_LENGTH?!1:e.equal(s,o)}t.equal=a})(PX);(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=k2,r=PX,n=qs,i=Mr,a=zf;t.KEY_LENGTH=32,t.NONCE_LENGTH=12,t.TAG_LENGTH=16;var s=new Uint8Array(16),o=function(){function c(u){if(this.nonceLength=t.NONCE_LENGTH,this.tagLength=t.TAG_LENGTH,u.length!==t.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(u)}return c.prototype.seal=function(u,f,h,m){if(u.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var y=new Uint8Array(16);y.set(u,y.length-u.length);var w=new Uint8Array(32);e.stream(this._key,y,w,4);var v=f.length+this.tagLength,g;if(m){if(m.length!==v)throw new Error("ChaCha20Poly1305: incorrect destination length");g=m}else g=new Uint8Array(v);return e.streamXOR(this._key,y,f,g,4),this._authenticate(g.subarray(g.length-this.tagLength,g.length),w,g.subarray(0,g.length-this.tagLength),h),n.wipe(y),g},c.prototype.open=function(u,f,h,m){if(u.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(f.length<this.tagLength)return null;var y=new Uint8Array(16);y.set(u,y.length-u.length);var w=new Uint8Array(32);e.stream(this._key,y,w,4);var v=new Uint8Array(this.tagLength);if(this._authenticate(v,w,f.subarray(0,f.length-this.tagLength),h),!a.equal(v,f.subarray(f.length-this.tagLength,f.length)))return null;var g=f.length-this.tagLength,_;if(m){if(m.length!==g)throw new Error("ChaCha20Poly1305: incorrect destination length");_=m}else _=new Uint8Array(g);return e.streamXOR(this._key,y,f.subarray(0,f.length-this.tagLength),_,4),n.wipe(y),_},c.prototype.clean=function(){return n.wipe(this._key),this},c.prototype._authenticate=function(u,f,h,m){var y=new r.Poly1305(f);m&&(y.update(m),m.length%16>0&&y.update(s.subarray(m.length%16))),y.update(h),h.length%16>0&&y.update(s.subarray(h.length%16));var w=new Uint8Array(8);m&&i.writeUint64LE(m.length,w),y.update(w),i.writeUint64LE(h.length,w),y.update(w);for(var v=y.digest(),g=0;g<v.length;g++)u[g]=v[g];y.clean(),n.wipe(v),n.wipe(w)},c}();t.ChaCha20Poly1305=o})(R4);var CX={},y1={},N4={};Object.defineProperty(N4,"__esModule",{value:!0});function Exe(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}N4.isSerializableHash=Exe;Object.defineProperty(y1,"__esModule",{value:!0});var Ac=N4,xxe=zf,Axe=qs,RX=function(){function t(e,r){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var i=0;i<n.length;i++)n[i]^=54;this._inner.update(n);for(var i=0;i<n.length;i++)n[i]^=106;this._outer.update(n),Ac.isSerializableHash(this._inner)&&Ac.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Axe.wipe(n)}return t.prototype.reset=function(){if(!Ac.isSerializableHash(this._inner)||!Ac.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},t.prototype.clean=function(){Ac.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Ac.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},t.prototype.update=function(e){return this._inner.update(e),this},t.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)},t.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},t.prototype.saveState=function(){if(!Ac.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},t.prototype.restoreState=function(e){if(!Ac.isSerializableHash(this._inner)||!Ac.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},t.prototype.cleanSavedState=function(e){if(!Ac.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();y1.HMAC=RX;function Sxe(t,e,r){var n=new RX(t,e);n.update(r);var i=n.digest();return n.clean(),i}y1.hmac=Sxe;y1.equal=xxe.equal;Object.defineProperty(CX,"__esModule",{value:!0});var tq=y1,rq=qs,Ixe=function(){function t(e,r,n,i){n===void 0&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var a=tq.hmac(this._hash,n,r);this._hmac=new tq.HMAC(e,a),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(e===0)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},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n<r.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[n]=this._buffer[this._bufpos++];return r},t.prototype.clean=function(){this._hmac.clean(),rq.wipe(this._buffer),rq.wipe(this._counter),this._bufpos=0},t}(),Oxe=CX.HKDF=Ixe,rm={},L2={},j2={};Object.defineProperty(j2,"__esModule",{value:!0});j2.BrowserRandomSource=void 0;const nq=65536;class Pxe{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&e.getRandomValues!==void 0&&(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 n=0;n<r.length;n+=nq)this._crypto.getRandomValues(r.subarray(n,n+Math.min(r.length-n,nq)));return r}}j2.BrowserRandomSource=Pxe;function H6(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var U2={};const Txe={},Cxe=Object.freeze(Object.defineProperty({__proto__:null,default:Txe},Symbol.toStringTag,{value:"Module"})),NX=js(Cxe);Object.defineProperty(U2,"__esModule",{value:!0});U2.NodeRandomSource=void 0;const Rxe=qs;class Nxe{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof H6<"u"){const e=NX;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 n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=r[i];return(0,Rxe.wipe)(r),n}}U2.NodeRandomSource=Nxe;Object.defineProperty(L2,"__esModule",{value:!0});L2.SystemRandomSource=void 0;const Dxe=j2,Mxe=U2;class $xe{constructor(){if(this.isAvailable=!1,this.name="",this._source=new Dxe.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new Mxe.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}L2.SystemRandomSource=$xe;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const e=L2,r=Mr,n=qs;t.defaultRandomSource=new e.SystemRandomSource;function i(u,f=t.defaultRandomSource){return f.randomBytes(u)}t.randomBytes=i;function a(u=t.defaultRandomSource){const f=i(4,u),h=(0,r.readUint32LE)(f);return(0,n.wipe)(f),h}t.randomUint32=a;const s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function o(u,f=s,h=t.defaultRandomSource){if(f.length<2)throw new Error("randomString charset is too short");if(f.length>256)throw new Error("randomString charset is too long");let m="";const y=f.length,w=256-256%y;for(;u>0;){const v=i(Math.ceil(u*256/w),h);for(let g=0;g<v.length&&u>0;g++){const _=v[g];_<w&&(m+=f.charAt(_%y),u--)}(0,n.wipe)(v)}return m}t.randomString=o;function c(u,f=s,h=t.defaultRandomSource){const m=Math.ceil(u/(Math.log(f.length)/Math.LN2));return o(m,f,h)}t.randomStringForEntropy=c})(rm);var F2={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Mr,r=qs;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var n=function(){function o(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.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 o.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},o.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},o.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},o.prototype.update=function(c,u){if(u===void 0&&(u=c.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var f=0;if(this._bytesHashed+=u,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&u>0;)this._buffer[this._bufferLength++]=c[f++],u--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(f=a(this._temp,this._state,c,f,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=c[f++],u--;return this},o.prototype.finish=function(c){if(!this._finished){var u=this._bytesHashed,f=this._bufferLength,h=u/536870912|0,m=u<<3,y=u%64<56?64:128;this._buffer[f]=128;for(var w=f+1;w<y-8;w++)this._buffer[w]=0;e.writeUint32BE(h,this._buffer,y-8),e.writeUint32BE(m,this._buffer,y-4),a(this._temp,this._state,this._buffer,0,y),this._finished=!0}for(var w=0;w<this.digestLength/4;w++)e.writeUint32BE(this._state[w],c,w*4);return this},o.prototype.digest=function(){var c=new Uint8Array(this.digestLength);return this.finish(c),c},o.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}},o.prototype.restoreState=function(c){return this._state.set(c.state),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},o.prototype.cleanSavedState=function(c){r.wipe(c.state),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},o}();t.SHA256=n;var i=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 a(o,c,u,f,h){for(;h>=64;){for(var m=c[0],y=c[1],w=c[2],v=c[3],g=c[4],_=c[5],b=c[6],S=c[7],A=0;A<16;A++){var I=f+A*4;o[A]=e.readUint32BE(u,I)}for(var A=16;A<64;A++){var E=o[A-2],p=(E>>>17|E<<32-17)^(E>>>19|E<<32-19)^E>>>10;E=o[A-15];var O=(E>>>7|E<<32-7)^(E>>>18|E<<32-18)^E>>>3;o[A]=(p+o[A-7]|0)+(O+o[A-16]|0)}for(var A=0;A<64;A++){var p=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&_^~g&b)|0)+(S+(i[A]+o[A]|0)|0)|0,O=((m>>>2|m<<32-2)^(m>>>13|m<<32-13)^(m>>>22|m<<32-22))+(m&y^m&w^y&w)|0;S=b,b=_,_=g,g=v+p|0,v=w,w=y,y=m,m=p+O|0}c[0]+=m,c[1]+=y,c[2]+=w,c[3]+=v,c[4]+=g,c[5]+=_,c[6]+=b,c[7]+=S,f+=64,h-=64}return f}function s(o){var c=new n;c.update(o);var u=c.digest();return c.clean(),u}t.hash=s})(F2);var D4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const e=rm,r=qs;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(A){const I=new Float64Array(16);if(A)for(let E=0;E<A.length;E++)I[E]=A[E];return I}const i=new Uint8Array(32);i[0]=9;const a=n([56129,1]);function s(A){let I=1;for(let E=0;E<16;E++){let p=A[E]+I+65535;I=Math.floor(p/65536),A[E]=p-I*65536}A[0]+=I-1+37*(I-1)}function o(A,I,E){const p=~(E-1);for(let O=0;O<16;O++){const N=p&(A[O]^I[O]);A[O]^=N,I[O]^=N}}function c(A,I){const E=n(),p=n();for(let O=0;O<16;O++)p[O]=I[O];s(p),s(p),s(p);for(let O=0;O<2;O++){E[0]=p[0]-65517;for(let F=1;F<15;F++)E[F]=p[F]-65535-(E[F-1]>>16&1),E[F-1]&=65535;E[15]=p[15]-32767-(E[14]>>16&1);const N=E[15]>>16&1;E[14]&=65535,o(p,E,1-N)}for(let O=0;O<16;O++)A[2*O]=p[O]&255,A[2*O+1]=p[O]>>8}function u(A,I){for(let E=0;E<16;E++)A[E]=I[2*E]+(I[2*E+1]<<8);A[15]&=32767}function f(A,I,E){for(let p=0;p<16;p++)A[p]=I[p]+E[p]}function h(A,I,E){for(let p=0;p<16;p++)A[p]=I[p]-E[p]}function m(A,I,E){let p,O,N=0,F=0,V=0,de=0,ve=0,U=0,L=0,Q=0,ne=0,j=0,B=0,H=0,M=0,q=0,k=0,$=0,G=0,pe=0,Y=0,te=0,ce=0,T=0,le=0,ze=0,et=0,yt=0,vt=0,gt=0,Ut=0,Xt=0,Sr=0,Ct=E[0],Pt=E[1],kt=E[2],Rt=E[3],Kt=E[4],Ft=E[5],Gt=E[6],Dt=E[7],Nt=E[8],zt=E[9],Mt=E[10],cr=E[11],tr=E[12],ar=E[13],nr=E[14],br=E[15];p=I[0],N+=p*Ct,F+=p*Pt,V+=p*kt,de+=p*Rt,ve+=p*Kt,U+=p*Ft,L+=p*Gt,Q+=p*Dt,ne+=p*Nt,j+=p*zt,B+=p*Mt,H+=p*cr,M+=p*tr,q+=p*ar,k+=p*nr,$+=p*br,p=I[1],F+=p*Ct,V+=p*Pt,de+=p*kt,ve+=p*Rt,U+=p*Kt,L+=p*Ft,Q+=p*Gt,ne+=p*Dt,j+=p*Nt,B+=p*zt,H+=p*Mt,M+=p*cr,q+=p*tr,k+=p*ar,$+=p*nr,G+=p*br,p=I[2],V+=p*Ct,de+=p*Pt,ve+=p*kt,U+=p*Rt,L+=p*Kt,Q+=p*Ft,ne+=p*Gt,j+=p*Dt,B+=p*Nt,H+=p*zt,M+=p*Mt,q+=p*cr,k+=p*tr,$+=p*ar,G+=p*nr,pe+=p*br,p=I[3],de+=p*Ct,ve+=p*Pt,U+=p*kt,L+=p*Rt,Q+=p*Kt,ne+=p*Ft,j+=p*Gt,B+=p*Dt,H+=p*Nt,M+=p*zt,q+=p*Mt,k+=p*cr,$+=p*tr,G+=p*ar,pe+=p*nr,Y+=p*br,p=I[4],ve+=p*Ct,U+=p*Pt,L+=p*kt,Q+=p*Rt,ne+=p*Kt,j+=p*Ft,B+=p*Gt,H+=p*Dt,M+=p*Nt,q+=p*zt,k+=p*Mt,$+=p*cr,G+=p*tr,pe+=p*ar,Y+=p*nr,te+=p*br,p=I[5],U+=p*Ct,L+=p*Pt,Q+=p*kt,ne+=p*Rt,j+=p*Kt,B+=p*Ft,H+=p*Gt,M+=p*Dt,q+=p*Nt,k+=p*zt,$+=p*Mt,G+=p*cr,pe+=p*tr,Y+=p*ar,te+=p*nr,ce+=p*br,p=I[6],L+=p*Ct,Q+=p*Pt,ne+=p*kt,j+=p*Rt,B+=p*Kt,H+=p*Ft,M+=p*Gt,q+=p*Dt,k+=p*Nt,$+=p*zt,G+=p*Mt,pe+=p*cr,Y+=p*tr,te+=p*ar,ce+=p*nr,T+=p*br,p=I[7],Q+=p*Ct,ne+=p*Pt,j+=p*kt,B+=p*Rt,H+=p*Kt,M+=p*Ft,q+=p*Gt,k+=p*Dt,$+=p*Nt,G+=p*zt,pe+=p*Mt,Y+=p*cr,te+=p*tr,ce+=p*ar,T+=p*nr,le+=p*br,p=I[8],ne+=p*Ct,j+=p*Pt,B+=p*kt,H+=p*Rt,M+=p*Kt,q+=p*Ft,k+=p*Gt,$+=p*Dt,G+=p*Nt,pe+=p*zt,Y+=p*Mt,te+=p*cr,ce+=p*tr,T+=p*ar,le+=p*nr,ze+=p*br,p=I[9],j+=p*Ct,B+=p*Pt,H+=p*kt,M+=p*Rt,q+=p*Kt,k+=p*Ft,$+=p*Gt,G+=p*Dt,pe+=p*Nt,Y+=p*zt,te+=p*Mt,ce+=p*cr,T+=p*tr,le+=p*ar,ze+=p*nr,et+=p*br,p=I[10],B+=p*Ct,H+=p*Pt,M+=p*kt,q+=p*Rt,k+=p*Kt,$+=p*Ft,G+=p*Gt,pe+=p*Dt,Y+=p*Nt,te+=p*zt,ce+=p*Mt,T+=p*cr,le+=p*tr,ze+=p*ar,et+=p*nr,yt+=p*br,p=I[11],H+=p*Ct,M+=p*Pt,q+=p*kt,k+=p*Rt,$+=p*Kt,G+=p*Ft,pe+=p*Gt,Y+=p*Dt,te+=p*Nt,ce+=p*zt,T+=p*Mt,le+=p*cr,ze+=p*tr,et+=p*ar,yt+=p*nr,vt+=p*br,p=I[12],M+=p*Ct,q+=p*Pt,k+=p*kt,$+=p*Rt,G+=p*Kt,pe+=p*Ft,Y+=p*Gt,te+=p*Dt,ce+=p*Nt,T+=p*zt,le+=p*Mt,ze+=p*cr,et+=p*tr,yt+=p*ar,vt+=p*nr,gt+=p*br,p=I[13],q+=p*Ct,k+=p*Pt,$+=p*kt,G+=p*Rt,pe+=p*Kt,Y+=p*Ft,te+=p*Gt,ce+=p*Dt,T+=p*Nt,le+=p*zt,ze+=p*Mt,et+=p*cr,yt+=p*tr,vt+=p*ar,gt+=p*nr,Ut+=p*br,p=I[14],k+=p*Ct,$+=p*Pt,G+=p*kt,pe+=p*Rt,Y+=p*Kt,te+=p*Ft,ce+=p*Gt,T+=p*Dt,le+=p*Nt,ze+=p*zt,et+=p*Mt,yt+=p*cr,vt+=p*tr,gt+=p*ar,Ut+=p*nr,Xt+=p*br,p=I[15],$+=p*Ct,G+=p*Pt,pe+=p*kt,Y+=p*Rt,te+=p*Kt,ce+=p*Ft,T+=p*Gt,le+=p*Dt,ze+=p*Nt,et+=p*zt,yt+=p*Mt,vt+=p*cr,gt+=p*tr,Ut+=p*ar,Xt+=p*nr,Sr+=p*br,N+=38*G,F+=38*pe,V+=38*Y,de+=38*te,ve+=38*ce,U+=38*T,L+=38*le,Q+=38*ze,ne+=38*et,j+=38*yt,B+=38*vt,H+=38*gt,M+=38*Ut,q+=38*Xt,k+=38*Sr,O=1,p=N+O+65535,O=Math.floor(p/65536),N=p-O*65536,p=F+O+65535,O=Math.floor(p/65536),F=p-O*65536,p=V+O+65535,O=Math.floor(p/65536),V=p-O*65536,p=de+O+65535,O=Math.floor(p/65536),de=p-O*65536,p=ve+O+65535,O=Math.floor(p/65536),ve=p-O*65536,p=U+O+65535,O=Math.floor(p/65536),U=p-O*65536,p=L+O+65535,O=Math.floor(p/65536),L=p-O*65536,p=Q+O+65535,O=Math.floor(p/65536),Q=p-O*65536,p=ne+O+65535,O=Math.floor(p/65536),ne=p-O*65536,p=j+O+65535,O=Math.floor(p/65536),j=p-O*65536,p=B+O+65535,O=Math.floor(p/65536),B=p-O*65536,p=H+O+65535,O=Math.floor(p/65536),H=p-O*65536,p=M+O+65535,O=Math.floor(p/65536),M=p-O*65536,p=q+O+65535,O=Math.floor(p/65536),q=p-O*65536,p=k+O+65535,O=Math.floor(p/65536),k=p-O*65536,p=$+O+65535,O=Math.floor(p/65536),$=p-O*65536,N+=O-1+37*(O-1),O=1,p=N+O+65535,O=Math.floor(p/65536),N=p-O*65536,p=F+O+65535,O=Math.floor(p/65536),F=p-O*65536,p=V+O+65535,O=Math.floor(p/65536),V=p-O*65536,p=de+O+65535,O=Math.floor(p/65536),de=p-O*65536,p=ve+O+65535,O=Math.floor(p/65536),ve=p-O*65536,p=U+O+65535,O=Math.floor(p/65536),U=p-O*65536,p=L+O+65535,O=Math.floor(p/65536),L=p-O*65536,p=Q+O+65535,O=Math.floor(p/65536),Q=p-O*65536,p=ne+O+65535,O=Math.floor(p/65536),ne=p-O*65536,p=j+O+65535,O=Math.floor(p/65536),j=p-O*65536,p=B+O+65535,O=Math.floor(p/65536),B=p-O*65536,p=H+O+65535,O=Math.floor(p/65536),H=p-O*65536,p=M+O+65535,O=Math.floor(p/65536),M=p-O*65536,p=q+O+65535,O=Math.floor(p/65536),q=p-O*65536,p=k+O+65535,O=Math.floor(p/65536),k=p-O*65536,p=$+O+65535,O=Math.floor(p/65536),$=p-O*65536,N+=O-1+37*(O-1),A[0]=N,A[1]=F,A[2]=V,A[3]=de,A[4]=ve,A[5]=U,A[6]=L,A[7]=Q,A[8]=ne,A[9]=j,A[10]=B,A[11]=H,A[12]=M,A[13]=q,A[14]=k,A[15]=$}function y(A,I){m(A,I,I)}function w(A,I){const E=n();for(let p=0;p<16;p++)E[p]=I[p];for(let p=253;p>=0;p--)y(E,E),p!==2&&p!==4&&m(E,E,I);for(let p=0;p<16;p++)A[p]=E[p]}function v(A,I){const E=new Uint8Array(32),p=new Float64Array(80),O=n(),N=n(),F=n(),V=n(),de=n(),ve=n();for(let ne=0;ne<31;ne++)E[ne]=A[ne];E[31]=A[31]&127|64,E[0]&=248,u(p,I);for(let ne=0;ne<16;ne++)N[ne]=p[ne];O[0]=V[0]=1;for(let ne=254;ne>=0;--ne){const j=E[ne>>>3]>>>(ne&7)&1;o(O,N,j),o(F,V,j),f(de,O,F),h(O,O,F),f(F,N,V),h(N,N,V),y(V,de),y(ve,O),m(O,F,O),m(F,N,de),f(de,O,F),h(O,O,F),y(N,O),h(F,V,ve),m(O,F,a),f(O,O,V),m(F,F,O),m(O,V,ve),m(V,N,p),y(N,de),o(O,N,j),o(F,V,j)}for(let ne=0;ne<16;ne++)p[ne+16]=O[ne],p[ne+32]=F[ne],p[ne+48]=N[ne],p[ne+64]=V[ne];const U=p.subarray(32),L=p.subarray(16);w(U,U),m(L,L,U);const Q=new Uint8Array(32);return c(Q,L),Q}t.scalarMult=v;function g(A){return v(A,i)}t.scalarMultBase=g;function _(A){if(A.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const I=new Uint8Array(A);return{publicKey:g(I),secretKey:I}}t.generateKeyPairFromSeed=_;function b(A){const I=(0,e.randomBytes)(32,A),E=_(I);return(0,r.wipe)(I),E}t.generateKeyPair=b;function S(A,I,E=!1){if(A.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(I.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const p=v(A,I);if(E){let O=0;for(let N=0;N<p.length;N++)O|=p[N];if(O===0)throw new Error("X25519: invalid shared key")}return p}t.sharedKey=S})(D4);function M4(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function DX(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?M4(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function z6(t,e){e||(e=t.reduce((i,a)=>i+a.length,0));const r=DX(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return M4(r)}function kxe(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var a=t.charAt(i),s=a.charCodeAt(0);if(r[s]!==255)throw new TypeError(a+" is ambiguous");r[s]=i}var o=t.length,c=t.charAt(0),u=Math.log(o)/Math.log(256),f=Math.log(256)/Math.log(o);function h(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var v=0,g=0,_=0,b=w.length;_!==b&&w[_]===0;)_++,v++;for(var S=(b-_)*f+1>>>0,A=new Uint8Array(S);_!==b;){for(var I=w[_],E=0,p=S-1;(I!==0||E<g)&&p!==-1;p--,E++)I+=256*A[p]>>>0,A[p]=I%o>>>0,I=I/o>>>0;if(I!==0)throw new Error("Non-zero carry");g=E,_++}for(var O=S-g;O!==S&&A[O]===0;)O++;for(var N=c.repeat(v);O<S;++O)N+=t.charAt(A[O]);return N}function m(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var v=0;if(w[v]!==" "){for(var g=0,_=0;w[v]===c;)g++,v++;for(var b=(w.length-v)*u+1>>>0,S=new Uint8Array(b);w[v];){var A=r[w.charCodeAt(v)];if(A===255)return;for(var I=0,E=b-1;(A!==0||I<_)&&E!==-1;E--,I++)A+=o*S[E]>>>0,S[E]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");_=I,v++}if(w[v]!==" "){for(var p=b-_;p!==b&&S[p]===0;)p++;for(var O=new Uint8Array(g+(b-p)),N=g;p!==b;)O[N++]=S[p++];return O}}}function y(w){var v=m(w);if(v)return v;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:m,decode:y}}var Lxe=kxe,jxe=Lxe;const Uxe=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},Fxe=t=>new TextEncoder().encode(t),Bxe=t=>new TextDecoder().decode(t);class qxe{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Hxe{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){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))}else throw Error("Can only multibase decode strings")}or(e){return MX(this,e)}}class zxe{constructor(e){this.decoders=e}or(e){return MX(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const MX=(t,e)=>new zxe({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class Vxe{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new qxe(e,r,n),this.decoder=new Hxe(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const B2=({name:t,prefix:e,encode:r,decode:n})=>new Vxe(t,e,r,n),v1=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=jxe(r,e);return B2({prefix:t,name:e,encode:n,decode:a=>Uxe(i(a))})},Gxe=(t,e,r,n)=>{const i={};for(let f=0;f<e.length;++f)i[e[f]]=f;let a=t.length;for(;t[a-1]==="=";)--a;const s=new Uint8Array(a*r/8|0);let o=0,c=0,u=0;for(let f=0;f<a;++f){const h=i[t[f]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|h,o+=r,o>=8&&(o-=8,s[u++]=255&c>>o)}if(o>=r||255&c<<8-o)throw new SyntaxError("Unexpected end of data");return s},Kxe=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let a="",s=0,o=0;for(let c=0;c<t.length;++c)for(o=o<<8|t[c],s+=8;s>r;)s-=r,a+=e[i&o>>s];if(s&&(a+=e[i&o<<r-s]),n)for(;a.length*r&7;)a+="=";return a},ua=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>B2({prefix:e,name:t,encode(i){return Kxe(i,n,r)},decode(i){return Gxe(i,n,r,t)}}),Wxe=B2({prefix:"\0",name:"identity",encode:t=>Bxe(t),decode:t=>Fxe(t)}),Qxe=Object.freeze(Object.defineProperty({__proto__:null,identity:Wxe},Symbol.toStringTag,{value:"Module"})),Yxe=ua({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Jxe=Object.freeze(Object.defineProperty({__proto__:null,base2:Yxe},Symbol.toStringTag,{value:"Module"})),Xxe=ua({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Zxe=Object.freeze(Object.defineProperty({__proto__:null,base8:Xxe},Symbol.toStringTag,{value:"Module"})),e2e=v1({prefix:"9",name:"base10",alphabet:"0123456789"}),t2e=Object.freeze(Object.defineProperty({__proto__:null,base10:e2e},Symbol.toStringTag,{value:"Module"})),r2e=ua({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),n2e=ua({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),i2e=Object.freeze(Object.defineProperty({__proto__:null,base16:r2e,base16upper:n2e},Symbol.toStringTag,{value:"Module"})),a2e=ua({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),s2e=ua({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),o2e=ua({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),c2e=ua({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),u2e=ua({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),l2e=ua({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),f2e=ua({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),d2e=ua({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),h2e=ua({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),p2e=Object.freeze(Object.defineProperty({__proto__:null,base32:a2e,base32hex:u2e,base32hexpad:f2e,base32hexpadupper:d2e,base32hexupper:l2e,base32pad:o2e,base32padupper:c2e,base32upper:s2e,base32z:h2e},Symbol.toStringTag,{value:"Module"})),g2e=v1({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),m2e=v1({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),y2e=Object.freeze(Object.defineProperty({__proto__:null,base36:g2e,base36upper:m2e},Symbol.toStringTag,{value:"Module"})),v2e=v1({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),b2e=v1({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),w2e=Object.freeze(Object.defineProperty({__proto__:null,base58btc:v2e,base58flickr:b2e},Symbol.toStringTag,{value:"Module"})),_2e=ua({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),E2e=ua({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),x2e=ua({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),A2e=ua({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),S2e=Object.freeze(Object.defineProperty({__proto__:null,base64:_2e,base64pad:E2e,base64url:x2e,base64urlpad:A2e},Symbol.toStringTag,{value:"Module"})),$X=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),I2e=$X.reduce((t,e,r)=>(t[r]=e,t),[]),O2e=$X.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function P2e(t){return t.reduce((e,r)=>(e+=I2e[r],e),"")}function T2e(t){const e=[];for(const r of t){const n=O2e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const C2e=B2({prefix:"🚀",name:"base256emoji",encode:P2e,decode:T2e}),R2e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:C2e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const iq={...Qxe,...Jxe,...Zxe,...t2e,...i2e,...p2e,...y2e,...w2e,...S2e,...R2e};function kX(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const aq=kX("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),OT=kX("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=DX(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),LX={utf8:aq,"utf-8":aq,hex:iq.base16,latin1:OT,ascii:OT,binary:OT,...iq};function ms(t,e="utf8"){const r=LX[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?M4(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}function Ya(t,e="utf8"){const r=LX[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}var sq=globalThis&&globalThis.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))},N2e=function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type="browser"}return t}(),D2e=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return t}(),M2e=function(){function t(e,r,n,i){this.name=e,this.version=r,this.os=n,this.bot=i,this.type="bot-device"}return t}(),$2e=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),k2e=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),L2e=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,j2e=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,oq=3,U2e=[["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",L2e]],cq=[["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 F2e(t){return t?uq(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new k2e:typeof navigator<"u"?uq(navigator.userAgent):H2e()}function B2e(t){return t!==""&&U2e.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var a=i.exec(t);return!!a&&[n,a]},!1)}function uq(t){var e=B2e(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new $2e;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<oq&&(i=sq(sq([],i,!0),z2e(oq-i.length),!0)):i=[];var a=i.join("."),s=q2e(t),o=j2e.exec(t);return o&&o[1]?new M2e(r,a,s,o[1]):new N2e(r,a,s)}function q2e(t){for(var e=0,r=cq.length;e<r;e++){var n=cq[e],i=n[0],a=n[1],s=a.exec(t);if(s)return i}return null}function H2e(){var t=typeof process<"u"&&process.version;return t?new D2e(process.version.slice(1)):null}function z2e(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}var Jt={};/*! *****************************************************************************
114
+ Copyright (c) Microsoft Corporation.
115
+
116
+ Permission to use, copy, modify, and/or distribute this software for any
117
+ purpose with or without fee is hereby granted.
118
+
119
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
120
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
121
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
122
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
123
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
124
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
125
+ PERFORMANCE OF THIS SOFTWARE.
126
+ ***************************************************************************** */var V6=function(t,e){return V6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},V6(t,e)};function V2e(t,e){V6(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var G6=function(){return G6=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},G6.apply(this,arguments)};function G2e(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function K2e(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function W2e(t,e){return function(r,n){e(r,n,t)}}function Q2e(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Y2e(t,e,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(f){try{u(n.next(f))}catch(h){s(h)}}function c(f){try{u(n.throw(f))}catch(h){s(h)}}function u(f){f.done?a(f.value):i(f.value).then(o,c)}u((n=n.apply(t,e||[])).next())})}function J2e(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(f){return c([u,f])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(f){u=[6,f],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function X2e(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function Z2e(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function K6(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function jX(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function eAe(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(jX(arguments[e]));return t}function tAe(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var a=arguments[e],s=0,o=a.length;s<o;s++,i++)n[i]=a[s];return n}function lb(t){return this instanceof lb?(this.v=t,this):new lb(t)}function rAe(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,a=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(m){n[m]&&(i[m]=function(y){return new Promise(function(w,v){a.push([m,y,w,v])>1||o(m,y)})})}function o(m,y){try{c(n[m](y))}catch(w){h(a[0][3],w)}}function c(m){m.value instanceof lb?Promise.resolve(m.value.v).then(u,f):h(a[0][2],m)}function u(m){o("next",m)}function f(m){o("throw",m)}function h(m,y){m(y),a.shift(),a.length&&o(a[0][0],a[0][1])}}function nAe(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,a){e[i]=t[i]?function(s){return(r=!r)?{value:lb(t[i](s)),done:i==="return"}:a?a(s):s}:a}}function iAe(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof K6=="function"?K6(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=t[a]&&function(s){return new Promise(function(o,c){s=t[a](s),i(o,c,s.done,s.value)})}}function i(a,s,o,c){Promise.resolve(c).then(function(u){a({value:u,done:o})},s)}}function aAe(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function sAe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function oAe(t){return t&&t.__esModule?t:{default:t}}function cAe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function uAe(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const lAe=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return G6},__asyncDelegator:nAe,__asyncGenerator:rAe,__asyncValues:iAe,__await:lb,__awaiter:Y2e,__classPrivateFieldGet:cAe,__classPrivateFieldSet:uAe,__createBinding:X2e,__decorate:K2e,__exportStar:Z2e,__extends:V2e,__generator:J2e,__importDefault:oAe,__importStar:sAe,__makeTemplateObject:aAe,__metadata:Q2e,__param:W2e,__read:jX,__rest:G2e,__spread:eAe,__spreadArrays:tAe,__values:K6},Symbol.toStringTag,{value:"Module"})),Mo=js(lAe);var PT={},my={},lq;function fAe(){if(lq)return my;lq=1,Object.defineProperty(my,"__esModule",{value:!0}),my.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return my.delay=t,my}var yd={},TT={},vd={},fq;function dAe(){return fq||(fq=1,Object.defineProperty(vd,"__esModule",{value:!0}),vd.ONE_THOUSAND=vd.ONE_HUNDRED=void 0,vd.ONE_HUNDRED=100,vd.ONE_THOUSAND=1e3),vd}var CT={},dq;function hAe(){return dq||(dq=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(CT)),CT}var hq;function UX(){return hq||(hq=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Mo;e.__exportStar(dAe(),t),e.__exportStar(hAe(),t)}(TT)),TT}var pq;function pAe(){if(pq)return yd;pq=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.fromMiliseconds=yd.toMiliseconds=void 0;const t=UX();function e(n){return n*t.ONE_THOUSAND}yd.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return yd.fromMiliseconds=r,yd}var gq;function gAe(){return gq||(gq=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Mo;e.__exportStar(fAe(),t),e.__exportStar(pAe(),t)}(PT)),PT}var Sp={},mq;function mAe(){if(mq)return Sp;mq=1,Object.defineProperty(Sp,"__esModule",{value:!0}),Sp.Watch=void 0;class t{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 n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const i=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:i})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return Sp.Watch=t,Sp.default=t,Sp}var RT={},yy={},yq;function yAe(){if(yq)return yy;yq=1,Object.defineProperty(yy,"__esModule",{value:!0}),yy.IWatch=void 0;class t{}return yy.IWatch=t,yy}var vq;function vAe(){return vq||(vq=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Mo.__exportStar(yAe(),t)}(RT)),RT}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Mo;e.__exportStar(gAe(),t),e.__exportStar(mAe(),t),e.__exportStar(vAe(),t),e.__exportStar(UX(),t)})(Jt);var jn={};Object.defineProperty(jn,"__esModule",{value:!0});jn.getLocalStorage=jn.getLocalStorageOrThrow=jn.getCrypto=jn.getCryptoOrThrow=BX=jn.getLocation=jn.getLocationOrThrow=$4=jn.getNavigator=jn.getNavigatorOrThrow=FX=jn.getDocument=jn.getDocumentOrThrow=jn.getFromWindowOrThrow=jn.getFromWindow=void 0;function Uh(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}jn.getFromWindow=Uh;function nm(t){const e=Uh(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}jn.getFromWindowOrThrow=nm;function bAe(){return nm("document")}jn.getDocumentOrThrow=bAe;function wAe(){return Uh("document")}var FX=jn.getDocument=wAe;function _Ae(){return nm("navigator")}jn.getNavigatorOrThrow=_Ae;function EAe(){return Uh("navigator")}var $4=jn.getNavigator=EAe;function xAe(){return nm("location")}jn.getLocationOrThrow=xAe;function AAe(){return Uh("location")}var BX=jn.getLocation=AAe;function SAe(){return nm("crypto")}jn.getCryptoOrThrow=SAe;function IAe(){return Uh("crypto")}jn.getCrypto=IAe;function OAe(){return nm("localStorage")}jn.getLocalStorageOrThrow=OAe;function PAe(){return Uh("localStorage")}jn.getLocalStorage=PAe;var k4={};Object.defineProperty(k4,"__esModule",{value:!0});var qX=k4.getWindowMetadata=void 0;const bq=jn;function TAe(){let t,e;try{t=bq.getDocumentOrThrow(),e=bq.getLocationOrThrow()}catch{return null}function r(){const h=t.getElementsByTagName("link"),m=[];for(let y=0;y<h.length;y++){const w=h[y],v=w.getAttribute("rel");if(v&&v.toLowerCase().indexOf("icon")>-1){const g=w.getAttribute("href");if(g)if(g.toLowerCase().indexOf("https:")===-1&&g.toLowerCase().indexOf("http:")===-1&&g.indexOf("//")!==0){let _=e.protocol+"//"+e.host;if(g.indexOf("/")===0)_+=g;else{const b=e.pathname.split("/");b.pop();const S=b.join("/");_+=S+"/"+g}m.push(_)}else if(g.indexOf("//")===0){const _=e.protocol+g;m.push(_)}else m.push(g)}}return m}function n(...h){const m=t.getElementsByTagName("meta");for(let y=0;y<m.length;y++){const w=m[y],v=["itemprop","property","name"].map(g=>w.getAttribute(g)).filter(g=>g?h.includes(g):!1);if(v.length&&v){const g=w.getAttribute("content");if(g)return g}}return""}function i(){let h=n("name","og:site_name","og:title","twitter:title");return h||(h=t.title),h}function a(){return n("description","og:description","twitter:description","keywords")}const s=i(),o=a(),c=e.origin,u=r();return{description:o,url:c,icons:u,name:s}}qX=k4.getWindowMetadata=TAe;var fb={},CAe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),HX="%[a-f0-9]{2}",wq=new RegExp("("+HX+")|([^%]+?)","gi"),_q=new RegExp("("+HX+")+","gi");function W6(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],W6(r),W6(n))}function RAe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(wq)||[],r=1;r<e.length;r++)t=W6(e,r).join(""),e=t.match(wq)||[];return t}}function NAe(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},r=_q.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch{var n=RAe(r[0]);n!==r[0]&&(e[r[0]]=n)}r=_q.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var s=i[a];t=t.replace(new RegExp(s,"g"),e[s])}return t}var DAe=function(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch{return NAe(t)}},MAe=(t,e)=>{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]},$Ae=function(t,e){for(var r={},n=Object.keys(t),i=Array.isArray(e),a=0;a<n.length;a++){var s=n[a],o=t[s];(i?e.indexOf(s)!==-1:e(s,o,t))&&(r[s]=o)}return r};(function(t){const e=CAe,r=DAe,n=MAe,i=$Ae,a=b=>b==null,s=Symbol("encodeFragmentIdentifier");function o(b){switch(b.arrayFormat){case"index":return S=>(A,I)=>{const E=A.length;return I===void 0||b.skipNull&&I===null||b.skipEmptyString&&I===""?A:I===null?[...A,[f(S,b),"[",E,"]"].join("")]:[...A,[f(S,b),"[",f(E,b),"]=",f(I,b)].join("")]};case"bracket":return S=>(A,I)=>I===void 0||b.skipNull&&I===null||b.skipEmptyString&&I===""?A:I===null?[...A,[f(S,b),"[]"].join("")]:[...A,[f(S,b),"[]=",f(I,b)].join("")];case"colon-list-separator":return S=>(A,I)=>I===void 0||b.skipNull&&I===null||b.skipEmptyString&&I===""?A:I===null?[...A,[f(S,b),":list="].join("")]:[...A,[f(S,b),":list=",f(I,b)].join("")];case"comma":case"separator":case"bracket-separator":{const S=b.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(I,E)=>E===void 0||b.skipNull&&E===null||b.skipEmptyString&&E===""?I:(E=E===null?"":E,I.length===0?[[f(A,b),S,f(E,b)].join("")]:[[I,f(E,b)].join(b.arrayFormatSeparator)])}default:return S=>(A,I)=>I===void 0||b.skipNull&&I===null||b.skipEmptyString&&I===""?A:I===null?[...A,f(S,b)]:[...A,[f(S,b),"=",f(I,b)].join("")]}}function c(b){let S;switch(b.arrayFormat){case"index":return(A,I,E)=>{if(S=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!S){E[A]=I;return}E[A]===void 0&&(E[A]={}),E[A][S[1]]=I};case"bracket":return(A,I,E)=>{if(S=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!S){E[A]=I;return}if(E[A]===void 0){E[A]=[I];return}E[A]=[].concat(E[A],I)};case"colon-list-separator":return(A,I,E)=>{if(S=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!S){E[A]=I;return}if(E[A]===void 0){E[A]=[I];return}E[A]=[].concat(E[A],I)};case"comma":case"separator":return(A,I,E)=>{const p=typeof I=="string"&&I.includes(b.arrayFormatSeparator),O=typeof I=="string"&&!p&&h(I,b).includes(b.arrayFormatSeparator);I=O?h(I,b):I;const N=p||O?I.split(b.arrayFormatSeparator).map(F=>h(F,b)):I===null?I:h(I,b);E[A]=N};case"bracket-separator":return(A,I,E)=>{const p=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!p){E[A]=I&&h(I,b);return}const O=I===null?[]:I.split(b.arrayFormatSeparator).map(N=>h(N,b));if(E[A]===void 0){E[A]=O;return}E[A]=[].concat(E[A],O)};default:return(A,I,E)=>{if(E[A]===void 0){E[A]=I;return}E[A]=[].concat(E[A],I)}}}function u(b){if(typeof b!="string"||b.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function f(b,S){return S.encode?S.strict?e(b):encodeURIComponent(b):b}function h(b,S){return S.decode?r(b):b}function m(b){return Array.isArray(b)?b.sort():typeof b=="object"?m(Object.keys(b)).sort((S,A)=>Number(S)-Number(A)).map(S=>b[S]):b}function y(b){const S=b.indexOf("#");return S!==-1&&(b=b.slice(0,S)),b}function w(b){let S="";const A=b.indexOf("#");return A!==-1&&(S=b.slice(A)),S}function v(b){b=y(b);const S=b.indexOf("?");return S===-1?"":b.slice(S+1)}function g(b,S){return S.parseNumbers&&!Number.isNaN(Number(b))&&typeof b=="string"&&b.trim()!==""?b=Number(b):S.parseBooleans&&b!==null&&(b.toLowerCase()==="true"||b.toLowerCase()==="false")&&(b=b.toLowerCase()==="true"),b}function _(b,S){S=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},S),u(S.arrayFormatSeparator);const A=c(S),I=Object.create(null);if(typeof b!="string"||(b=b.trim().replace(/^[?#&]/,""),!b))return I;for(const E of b.split("&")){if(E==="")continue;let[p,O]=n(S.decode?E.replace(/\+/g," "):E,"=");O=O===void 0?null:["comma","separator","bracket-separator"].includes(S.arrayFormat)?O:h(O,S),A(h(p,S),O,I)}for(const E of Object.keys(I)){const p=I[E];if(typeof p=="object"&&p!==null)for(const O of Object.keys(p))p[O]=g(p[O],S);else I[E]=g(p,S)}return S.sort===!1?I:(S.sort===!0?Object.keys(I).sort():Object.keys(I).sort(S.sort)).reduce((E,p)=>{const O=I[p];return O&&typeof O=="object"&&!Array.isArray(O)?E[p]=m(O):E[p]=O,E},Object.create(null))}t.extract=v,t.parse=_,t.stringify=(b,S)=>{if(!b)return"";S=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},S),u(S.arrayFormatSeparator);const A=O=>S.skipNull&&a(b[O])||S.skipEmptyString&&b[O]==="",I=o(S),E={};for(const O of Object.keys(b))A(O)||(E[O]=b[O]);const p=Object.keys(E);return S.sort!==!1&&p.sort(S.sort),p.map(O=>{const N=b[O];return N===void 0?"":N===null?f(O,S):Array.isArray(N)?N.length===0&&S.arrayFormat==="bracket-separator"?f(O,S)+"[]":N.reduce(I(O),[]).join("&"):f(O,S)+"="+f(N,S)}).filter(O=>O.length>0).join("&")},t.parseUrl=(b,S)=>{S=Object.assign({decode:!0},S);const[A,I]=n(b,"#");return Object.assign({url:A.split("?")[0]||"",query:_(v(b),S)},S&&S.parseFragmentIdentifier&&I?{fragmentIdentifier:h(I,S)}:{})},t.stringifyUrl=(b,S)=>{S=Object.assign({encode:!0,strict:!0,[s]:!0},S);const A=y(b.url).split("?")[0]||"",I=t.extract(b.url),E=t.parse(I,{sort:!1}),p=Object.assign(E,b.query);let O=t.stringify(p,S);O&&(O=`?${O}`);let N=w(b.url);return b.fragmentIdentifier&&(N=`#${S[s]?f(b.fragmentIdentifier,S):b.fragmentIdentifier}`),`${A}${O}${N}`},t.pick=(b,S,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[s]:!1},A);const{url:I,query:E,fragmentIdentifier:p}=t.parseUrl(b,A);return t.stringifyUrl({url:I,query:i(E,S),fragmentIdentifier:p},A)},t.exclude=(b,S,A)=>{const I=Array.isArray(S)?E=>!S.includes(E):(E,p)=>!S(E,p);return t.pick(b,I,A)}})(fb);const kAe={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"}},LAe=":";function jAe(t){const[e,r]=t.split(LAe);return{namespace:e,reference:r}}function UAe(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const i=t[n];r.push(...i.accounts)}),r}function zX(t,e){return t.includes(":")?[t]:e.chains||[]}const VX="base10",Qa="base16",Q6="base64pad",L4="utf8",GX=0,Fh=1,FAe=0,Eq=1,Y6=12,j4=32;function BAe(){const t=D4.generateKeyPair();return{privateKey:Ya(t.secretKey,Qa),publicKey:Ya(t.publicKey,Qa)}}function J6(){const t=rm.randomBytes(j4);return Ya(t,Qa)}function qAe(t,e){const r=D4.sharedKey(ms(t,Qa),ms(e,Qa),!0),n=new Oxe(F2.SHA256,r).expand(j4);return Ya(n,Qa)}function HAe(t){const e=F2.hash(ms(t,Qa));return Ya(e,Qa)}function m0(t){const e=F2.hash(ms(t,L4));return Ya(e,Qa)}function zAe(t){return ms(`${t}`,VX)}function b1(t){return Number(Ya(t,VX))}function VAe(t){const e=zAe(typeof t.type<"u"?t.type:GX);if(b1(e)===Fh&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?ms(t.senderPublicKey,Qa):void 0,n=typeof t.iv<"u"?ms(t.iv,Qa):rm.randomBytes(Y6),i=new R4.ChaCha20Poly1305(ms(t.symKey,Qa)).seal(n,ms(t.message,L4));return KAe({type:e,sealed:i,iv:n,senderPublicKey:r})}function GAe(t){const e=new R4.ChaCha20Poly1305(ms(t.symKey,Qa)),{sealed:r,iv:n}=qE(t.encoded),i=e.open(n,r);if(i===null)throw new Error("Failed to decrypt");return Ya(i,L4)}function KAe(t){if(b1(t.type)===Fh){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Ya(z6([t.type,t.senderPublicKey,t.iv,t.sealed]),Q6)}return Ya(z6([t.type,t.iv,t.sealed]),Q6)}function qE(t){const e=ms(t,Q6),r=e.slice(FAe,Eq),n=Eq;if(b1(r)===Fh){const o=n+j4,c=o+Y6,u=e.slice(n,o),f=e.slice(o,c),h=e.slice(c);return{type:r,sealed:h,iv:f,senderPublicKey:u}}const i=n+Y6,a=e.slice(n,i),s=e.slice(i);return{type:r,sealed:s,iv:a}}function WAe(t,e){const r=qE(t);return KX({type:b1(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Ya(r.senderPublicKey,Qa):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function KX(t){const e=(t==null?void 0:t.type)||GX;if(e===Fh){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function xq(t){return t.type===Fh&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var QAe=Object.defineProperty,Aq=Object.getOwnPropertySymbols,YAe=Object.prototype.hasOwnProperty,JAe=Object.prototype.propertyIsEnumerable,Sq=(t,e,r)=>e in t?QAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Iq=(t,e)=>{for(var r in e||(e={}))YAe.call(e,r)&&Sq(t,r,e[r]);if(Aq)for(var r of Aq(e))JAe.call(e,r)&&Sq(t,r,e[r]);return t};const XAe="ReactNative",$s={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},ZAe="js";function U4(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function w1(){return!FX()&&!!$4()&&navigator.product===XAe}function _1(){return!U4()&&!!$4()}function E1(){return w1()?$s.reactNative:U4()?$s.node:_1()?$s.browser:$s.unknown}function eSe(t,e){let r=fb.parse(t);return r=Iq(Iq({},r),e),t=fb.stringify(r),t}function tSe(){return qX()||{name:"",description:"",url:"",icons:[""]}}function rSe(){if(E1()===$s.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:r,Version:n}=global.Platform;return[r,n].join("-")}const t=F2e();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function nSe(){var t;const e=E1();return e===$s.browser?[e,((t=BX())==null?void 0:t.host)||"unknown"].join(":"):e}function iSe(t,e,r){const n=rSe(),i=nSe();return[[t,e].join("-"),[ZAe,r].join("-"),n,i].join("/")}function aSe({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:a,useOnCloseEvent:s}){const o=r.split("?"),c=iSe(t,e,n),u={auth:i,ua:c,projectId:a,useOnCloseEvent:s||void 0},f=eSe(o[1]||"",u);return o[0]+"?"+f}function Bd(t,e){return t.filter(r=>e.includes(r)).length===t.length}function WX(t){return Object.fromEntries(t.entries())}function QX(t){return new Map(Object.entries(t))}function $p(t=Jt.FIVE_MINUTES,e){const r=Jt.toMiliseconds(t||Jt.FIVE_MINUTES);let n,i,a;return{resolve:s=>{a&&n&&(clearTimeout(a),n(s))},reject:s=>{a&&i&&(clearTimeout(a),i(s))},done:()=>new Promise((s,o)=>{a=setTimeout(()=>{o(new Error(e))},r),n=s,i=o})}}function db(t,e,r){return new Promise(async(n,i)=>{const a=setTimeout(()=>i(new Error(r)),e);try{const s=await t;n(s)}catch(s){i(s)}clearTimeout(a)})}function YX(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function sSe(t){return YX("topic",t)}function oSe(t){return YX("id",t)}function JX(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function rc(t,e){return Jt.fromMiliseconds((e||Date.now())+Jt.toMiliseconds(t))}function jl(t){return Date.now()>=Jt.toMiliseconds(t)}function Si(t,e){return`${t}${e?`:${e}`:""}`}function NT(t=[],e=[]){return[...new Set([...t,...e])]}async function cSe({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let i=n==null?void 0:n.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const a=`${i}/wc?requestId=${t}&sessionTopic=${e}`,s=E1();s===$s.browser?a.startsWith("https://")?window.open(a,"_blank","noreferrer noopener"):window.open(a,"_self","noreferrer noopener"):s===$s.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(a)}catch(n){console.error(n)}}const uSe="irn";function X6(t){return(t==null?void 0:t.relay)||{protocol:uSe}}function H_(t){const e=kAe[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var lSe=Object.defineProperty,Oq=Object.getOwnPropertySymbols,fSe=Object.prototype.hasOwnProperty,dSe=Object.prototype.propertyIsEnumerable,Pq=(t,e,r)=>e in t?lSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,hSe=(t,e)=>{for(var r in e||(e={}))fSe.call(e,r)&&Pq(t,r,e[r]);if(Oq)for(var r of Oq(e))dSe.call(e,r)&&Pq(t,r,e[r]);return t};function pSe(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const a=i.replace(n,""),s=t[i];r[a]=s}}),r}function gSe(t){t=t.includes("wc://")?t.replace("wc://",""):t,t=t.includes("wc:")?t.replace("wc:",""):t;const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),a=typeof r<"u"?t.substring(r):"",s=fb.parse(a);return{protocol:n,topic:mSe(i[0]),version:parseInt(i[1],10),symKey:s.symKey,relay:pSe(s)}}function mSe(t){return t.startsWith("//")?t.substring(2):t}function ySe(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(i=>{const a=r+e+i;t[i]&&(n[a]=t[i])}),n}function vSe(t){return`${t.protocol}:${t.topic}@${t.version}?`+fb.stringify(hSe({symKey:t.symKey},ySe(t.relay)))}function im(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function bSe(t){const e=[];return Object.values(t).forEach(r=>{e.push(...im(r.accounts))}),e}function wSe(t,e){const r=[];return Object.values(t).forEach(n=>{im(n.accounts).includes(e)&&r.push(...n.methods)}),r}function _Se(t,e){const r=[];return Object.values(t).forEach(n=>{im(n.accounts).includes(e)&&r.push(...n.events)}),r}function ESe(t,e){const r=z_(t,e);if(r)throw new Error(r.message);const n={};for(const[i,a]of Object.entries(t))n[i]={methods:a.methods,events:a.events,chains:a.accounts.map(s=>`${s.split(":")[0]}:${s.split(":")[1]}`)};return n}function F4(t){return t.includes(":")}function nv(t){return F4(t)?t.split(":")[0]:t}const xSe={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}},ASe={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 Ot(t,e){const{message:r,code:n}=ASe[t];return{message:e?`${r} ${e}`:r,code:n}}function vi(t,e){const{message:r,code:n}=xSe[t];return{message:e?`${r} ${e}`:r,code:n}}function Kc(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function y0(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Ha(t){return typeof t>"u"}function Bi(t,e){return e&&Ha(t)?!0:typeof t=="string"&&!!t.trim().length}function B4(t,e){return e&&Ha(t)?!0:typeof t=="number"&&!isNaN(t)}function SSe(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let a=!0;return Bd(i,n)?(n.forEach(s=>{const{accounts:o,methods:c,events:u}=t.namespaces[s],f=im(o),h=r[s];(!Bd(zX(s,h),f)||!Bd(h.methods,c)||!Bd(h.events,u))&&(a=!1)}),a):!1}function HE(t){return Bi(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function ISe(t){if(Bi(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&HE(r)}}return!1}function OSe(t){if(Bi(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function PSe(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function TSe(t){return t==null?void 0:t.topic}function CSe(t,e){let r=null;return Bi(t==null?void 0:t.publicKey,!1)||(r=Ot("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function Tq(t){let e=!0;return Kc(t)?t.length&&(e=t.every(r=>Bi(r,!1))):e=!1,e}function RSe(t,e,r){let n=null;return Kc(e)&&e.length?e.forEach(i=>{n||HE(i)||(n=vi("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):HE(t)||(n=vi("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"] }`)),n}function NSe(t,e,r){let n=null;return Object.entries(t).forEach(([i,a])=>{if(n)return;const s=RSe(i,zX(i,a),`${e} ${r}`);s&&(n=s)}),n}function DSe(t,e){let r=null;return Kc(t)?t.forEach(n=>{r||ISe(n)||(r=vi("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=vi("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function MSe(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=DSe(n==null?void 0:n.accounts,`${e} namespace`);i&&(r=i)}),r}function $Se(t,e){let r=null;return Tq(t==null?void 0:t.methods)?Tq(t==null?void 0:t.events)||(r=vi("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=vi("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function XX(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=$Se(n,`${e}, namespace`);i&&(r=i)}),r}function kSe(t,e,r){let n=null;if(t&&y0(t)){const i=XX(t,e);i&&(n=i);const a=NSe(t,e,r);a&&(n=a)}else n=Ot("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function z_(t,e){let r=null;if(t&&y0(t)){const n=XX(t,e);n&&(r=n);const i=MSe(t,e);i&&(r=i)}else r=Ot("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function ZX(t){return Bi(t.protocol,!0)}function LSe(t,e){let r=!1;return e&&!t?r=!0:t&&Kc(t)&&t.length&&t.forEach(n=>{r=ZX(n)}),r}function jSe(t){return typeof t=="number"}function ss(t){return typeof t<"u"&&typeof t!==null}function USe(t){return!(!t||typeof t!="object"||!t.code||!B4(t.code,!1)||!t.message||!Bi(t.message,!1))}function FSe(t){return!(Ha(t)||!Bi(t.method,!1))}function BSe(t){return!(Ha(t)||Ha(t.result)&&Ha(t.error)||!B4(t.id,!1)||!Bi(t.jsonrpc,!1))}function qSe(t){return!(Ha(t)||!Bi(t.name,!1))}function Cq(t,e){return!(!HE(e)||!bSe(t).includes(e))}function HSe(t,e,r){return Bi(r,!1)?wSe(t,e).includes(r):!1}function zSe(t,e,r){return Bi(r,!1)?_Se(t,e).includes(r):!1}function Rq(t,e,r){let n=null;const i=VSe(t),a=GSe(e),s=Object.keys(i),o=Object.keys(a),c=Nq(Object.keys(t)),u=Nq(Object.keys(e)),f=c.filter(h=>!u.includes(h));return f.length&&(n=Ot("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.
127
+ Required: ${f.toString()}
128
+ Received: ${Object.keys(e).toString()}`)),Bd(s,o)||(n=Ot("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.
129
+ Required: ${s.toString()}
130
+ Approved: ${o.toString()}`)),Object.keys(e).forEach(h=>{if(!h.includes(":")||n)return;const m=im(e[h].accounts);m.includes(h)||(n=Ot("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${h}
131
+ Required: ${h}
132
+ Approved: ${m.toString()}`))}),s.forEach(h=>{n||(Bd(i[h].methods,a[h].methods)?Bd(i[h].events,a[h].events)||(n=Ot("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${h}`)):n=Ot("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${h}`))}),n}function VSe(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function Nq(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function GSe(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=im(t[r].accounts);n==null||n.forEach(i=>{e[i]={accounts:t[r].accounts.filter(a=>a.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function KSe(t,e){return B4(t,!1)&&t<=e.max&&t>=e.min}function Dq(){const t=E1();return new Promise(e=>{switch(t){case $s.browser:e(WSe());break;case $s.reactNative:e(QSe());break;case $s.node:e(YSe());break;default:e(!0)}})}function WSe(){return _1()&&(navigator==null?void 0:navigator.onLine)}async function QSe(){if(w1()&&typeof global<"u"&&global!=null&&global.NetInfo){const t=await(global==null?void 0:global.NetInfo.fetch());return t==null?void 0:t.isConnected}return!0}function YSe(){return!0}function JSe(t){switch(E1()){case $s.browser:XSe(t);break;case $s.reactNative:ZSe(t);break}}function XSe(t){!w1()&&_1()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function ZSe(t){w1()&&typeof global<"u"&&global!=null&&global.NetInfo&&(global==null||global.NetInfo.addEventListener(e=>t(e==null?void 0:e.isConnected)))}const DT={};let Qw=class{static get(e){return DT[e]}static set(e,r){DT[e]=r}static delete(e){delete DT[e]}};var q2={},x1={};Object.defineProperty(x1,"__esModule",{value:!0});function eIe(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return JSON.parse(t)}catch{return t}}x1.safeJsonParse=eIe;function tIe(t){return typeof t=="string"?t:JSON.stringify(t,(e,r)=>typeof r>"u"?null:r)}x1.safeJsonStringify=tIe;var vy={exports:{}},Mq;function rIe(){return Mq||(Mq=1,function(){let t;function e(){}t=e,t.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},t.prototype.setItem=function(r,n){this[r]=String(n)},t.prototype.removeItem=function(r){delete this[r]},t.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},t.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof ke<"u"&&ke.localStorage?vy.exports=ke.localStorage:typeof window<"u"&&window.localStorage?vy.exports=window.localStorage:vy.exports=new e}()),vy.exports}var MT={},by={},$q;function nIe(){if($q)return by;$q=1,Object.defineProperty(by,"__esModule",{value:!0}),by.IKeyValueStorage=void 0;class t{}return by.IKeyValueStorage=t,by}var wy={},kq;function iIe(){if(kq)return wy;kq=1,Object.defineProperty(wy,"__esModule",{value:!0}),wy.parseEntry=void 0;const t=x1;function e(r){var n;return[r[0],t.safeJsonParse((n=r[1])!==null&&n!==void 0?n:"")]}return wy.parseEntry=e,wy}var Lq;function aIe(){return Lq||(Lq=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Mo;e.__exportStar(nIe(),t),e.__exportStar(iIe(),t)}(MT)),MT}Object.defineProperty(q2,"__esModule",{value:!0});q2.KeyValueStorage=void 0;const kp=Mo,jq=x1,sIe=kp.__importDefault(rIe()),oIe=aIe();class eZ{constructor(){this.localStorage=sIe.default}getKeys(){return kp.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return kp.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(oIe.parseEntry)})}getItem(e){return kp.__awaiter(this,void 0,void 0,function*(){const r=this.localStorage.getItem(e);if(r!==null)return jq.safeJsonParse(r)})}setItem(e,r){return kp.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(e,jq.safeJsonStringify(r))})}removeItem(e){return kp.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(e)})}}q2.KeyValueStorage=eZ;var cIe=q2.default=eZ,am={},_y={},$T={},Ey={};let Bh=class{};const uIe=Object.freeze(Object.defineProperty({__proto__:null,IEvents:Bh},Symbol.toStringTag,{value:"Module"})),lIe=js(uIe);var Uq;function fIe(){if(Uq)return Ey;Uq=1,Object.defineProperty(Ey,"__esModule",{value:!0}),Ey.IHeartBeat=void 0;const t=lIe;class e extends t.IEvents{constructor(n){super()}}return Ey.IHeartBeat=e,Ey}var Fq;function tZ(){return Fq||(Fq=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Mo.__exportStar(fIe(),t)}($T)),$T}var kT={},bd={},Bq;function dIe(){if(Bq)return bd;Bq=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.HEARTBEAT_EVENTS=bd.HEARTBEAT_INTERVAL=void 0;const t=Jt;return bd.HEARTBEAT_INTERVAL=t.FIVE_SECONDS,bd.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},bd}var qq;function rZ(){return qq||(qq=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Mo.__exportStar(dIe(),t)}(kT)),kT}var Hq;function hIe(){if(Hq)return _y;Hq=1,Object.defineProperty(_y,"__esModule",{value:!0}),_y.HeartBeat=void 0;const t=Mo,e=Es,r=Jt,n=tZ(),i=rZ();class a extends n.IHeartBeat{constructor(o){super(o),this.events=new e.EventEmitter,this.interval=i.HEARTBEAT_INTERVAL,this.interval=(o==null?void 0:o.interval)||i.HEARTBEAT_INTERVAL}static init(o){return t.__awaiter(this,void 0,void 0,function*(){const c=new a(o);return yield c.init(),c})}init(){return t.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(o,c){this.events.on(o,c)}once(o,c){this.events.once(o,c)}off(o,c){this.events.off(o,c)}removeListener(o,c){this.events.removeListener(o,c)}initialize(){return t.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),r.toMiliseconds(this.interval))})}pulse(){this.events.emit(i.HEARTBEAT_EVENTS.pulse)}}return _y.HeartBeat=a,_y}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Mo;e.__exportStar(hIe(),t),e.__exportStar(tZ(),t),e.__exportStar(rZ(),t)})(am);var an={},LT,zq;function pIe(){if(zq)return LT;zq=1;function t(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}LT=e;function e(r,n,i){var a=i&&i.stringify||t,s=1;if(typeof r=="object"&&r!==null){var o=n.length+s;if(o===1)return r;var c=new Array(o);c[0]=a(r);for(var u=1;u<o;u++)c[u]=a(n[u]);return c.join(" ")}if(typeof r!="string")return r;var f=n.length;if(f===0)return r;for(var h="",m=1-s,y=-1,w=r&&r.length||0,v=0;v<w;){if(r.charCodeAt(v)===37&&v+1<w){switch(y=y>-1?y:0,r.charCodeAt(v+1)){case 100:case 102:if(m>=f||n[m]==null)break;y<v&&(h+=r.slice(y,v)),h+=Number(n[m]),y=v+2,v++;break;case 105:if(m>=f||n[m]==null)break;y<v&&(h+=r.slice(y,v)),h+=Math.floor(Number(n[m])),y=v+2,v++;break;case 79:case 111:case 106:if(m>=f||n[m]===void 0)break;y<v&&(h+=r.slice(y,v));var g=typeof n[m];if(g==="string"){h+="'"+n[m]+"'",y=v+2,v++;break}if(g==="function"){h+=n[m].name||"<anonymous>",y=v+2,v++;break}h+=a(n[m]),y=v+2,v++;break;case 115:if(m>=f)break;y<v&&(h+=r.slice(y,v)),h+=String(n[m]),y=v+2,v++;break;case 37:y<v&&(h+=r.slice(y,v)),h+="%",y=v+2,v++,m--;break}++m}++v}return y===-1?r:(y<w&&(h+=r.slice(y)),h)}return LT}var jT,Vq;function gIe(){if(Vq)return jT;Vq=1;const t=pIe();jT=i;const e=I().console||{},r={mapHttpRequest:w,mapHttpResponse:w,wrapRequestSerializer:v,wrapResponseSerializer:v,wrapErrorSerializer:v,req:w,res:w,err:m};function n(E,p){return Array.isArray(E)?E.filter(function(N){return N!=="!stdSerializers.err"}):E===!0?Object.keys(p):!1}function i(E){E=E||{},E.browser=E.browser||{};const p=E.browser.transmit;if(p&&typeof p.send!="function")throw Error("pino: transmit option must have a send function");const O=E.browser.write||e;E.browser.write&&(E.browser.asObject=!0);const N=E.serializers||{},F=n(E.browser.serialize,N);let V=E.browser.serialize;Array.isArray(E.browser.serialize)&&E.browser.serialize.indexOf("!stdSerializers.err")>-1&&(V=!1);const de=["error","fatal","warn","info","debug","trace"];typeof O=="function"&&(O.error=O.fatal=O.warn=O.info=O.debug=O.trace=O),E.enabled===!1&&(E.level="silent");const ve=E.level||"info",U=Object.create(O);U.log||(U.log=g),Object.defineProperty(U,"levelVal",{get:Q}),Object.defineProperty(U,"level",{get:ne,set:j});const L={transmit:p,serialize:F,asObject:E.browser.asObject,levels:de,timestamp:y(E)};U.levels=i.levels,U.level=ve,U.setMaxListeners=U.getMaxListeners=U.emit=U.addListener=U.on=U.prependListener=U.once=U.prependOnceListener=U.removeListener=U.removeAllListeners=U.listeners=U.listenerCount=U.eventNames=U.write=U.flush=g,U.serializers=N,U._serialize=F,U._stdErrSerialize=V,U.child=B,p&&(U._logEvent=h());function Q(){return this.level==="silent"?1/0:this.levels.values[this.level]}function ne(){return this._level}function j(H){if(H!=="silent"&&!this.levels.values[H])throw Error("unknown level "+H);this._level=H,a(L,U,"error","log"),a(L,U,"fatal","error"),a(L,U,"warn","error"),a(L,U,"info","log"),a(L,U,"debug","log"),a(L,U,"trace","log")}function B(H,M){if(!H)throw new Error("missing bindings for child Pino");M=M||{},F&&H.serializers&&(M.serializers=H.serializers);const q=M.serializers;if(F&&q){var k=Object.assign({},N,q),$=E.browser.serialize===!0?Object.keys(k):F;delete H.serializers,c([H],$,k,this._stdErrSerialize)}function G(pe){this._childLevel=(pe._childLevel|0)+1,this.error=u(pe,H,"error"),this.fatal=u(pe,H,"fatal"),this.warn=u(pe,H,"warn"),this.info=u(pe,H,"info"),this.debug=u(pe,H,"debug"),this.trace=u(pe,H,"trace"),k&&(this.serializers=k,this._serialize=$),p&&(this._logEvent=h([].concat(pe._logEvent.bindings,H)))}return G.prototype=this,new G(this)}return U}i.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"}},i.stdSerializers=r,i.stdTimeFunctions=Object.assign({},{nullTime:_,epochTime:b,unixTime:S,isoTime:A});function a(E,p,O,N){const F=Object.getPrototypeOf(p);p[O]=p.levelVal>p.levels.values[O]?g:F[O]?F[O]:e[O]||e[N]||g,s(E,p,O)}function s(E,p,O){!E.transmit&&p[O]===g||(p[O]=function(N){return function(){const V=E.timestamp(),de=new Array(arguments.length),ve=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var U=0;U<de.length;U++)de[U]=arguments[U];if(E.serialize&&!E.asObject&&c(de,this._serialize,this.serializers,this._stdErrSerialize),E.asObject?N.call(ve,o(this,O,de,V)):N.apply(ve,de),E.transmit){const L=E.transmit.level||p.level,Q=i.levels.values[L],ne=i.levels.values[O];if(ne<Q)return;f(this,{ts:V,methodLevel:O,methodValue:ne,transmitLevel:L,transmitValue:i.levels.values[E.transmit.level||p.level],send:E.transmit.send,val:p.levelVal},de)}}}(p[O]))}function o(E,p,O,N){E._serialize&&c(O,E._serialize,E.serializers,E._stdErrSerialize);const F=O.slice();let V=F[0];const de={};N&&(de.time=N),de.level=i.levels.values[p];let ve=(E._childLevel|0)+1;if(ve<1&&(ve=1),V!==null&&typeof V=="object"){for(;ve--&&typeof F[0]=="object";)Object.assign(de,F.shift());V=F.length?t(F.shift(),F):void 0}else typeof V=="string"&&(V=t(F.shift(),F));return V!==void 0&&(de.msg=V),de}function c(E,p,O,N){for(const F in E)if(N&&E[F]instanceof Error)E[F]=i.stdSerializers.err(E[F]);else if(typeof E[F]=="object"&&!Array.isArray(E[F]))for(const V in E[F])p&&p.indexOf(V)>-1&&V in O&&(E[F][V]=O[V](E[F][V]))}function u(E,p,O){return function(){const N=new Array(1+arguments.length);N[0]=p;for(var F=1;F<N.length;F++)N[F]=arguments[F-1];return E[O].apply(this,N)}}function f(E,p,O){const N=p.send,F=p.ts,V=p.methodLevel,de=p.methodValue,ve=p.val,U=E._logEvent.bindings;c(O,E._serialize||Object.keys(E.serializers),E.serializers,E._stdErrSerialize===void 0?!0:E._stdErrSerialize),E._logEvent.ts=F,E._logEvent.messages=O.filter(function(L){return U.indexOf(L)===-1}),E._logEvent.level.label=V,E._logEvent.level.value=de,N(V,E._logEvent,ve),E._logEvent=h(U)}function h(E){return{ts:0,messages:[],bindings:E||[],level:{label:"",value:0}}}function m(E){const p={type:E.constructor.name,msg:E.message,stack:E.stack};for(const O in E)p[O]===void 0&&(p[O]=E[O]);return p}function y(E){return typeof E.timestamp=="function"?E.timestamp:E.timestamp===!1?_:b}function w(){return{}}function v(E){return E}function g(){}function _(){return!1}function b(){return Date.now()}function S(){return Math.round(Date.now()/1e3)}function A(){return new Date(Date.now()).toISOString()}function I(){function E(p){return typeof p<"u"&&p}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 E(self)||E(window)||E(this)||{}}}return jT}var wd={},Gq;function nZ(){return Gq||(Gq=1,Object.defineProperty(wd,"__esModule",{value:!0}),wd.PINO_CUSTOM_CONTEXT_KEY=wd.PINO_LOGGER_DEFAULTS=void 0,wd.PINO_LOGGER_DEFAULTS={level:"info"},wd.PINO_CUSTOM_CONTEXT_KEY="custom_context"),wd}var La={},Kq;function mIe(){if(Kq)return La;Kq=1,Object.defineProperty(La,"__esModule",{value:!0}),La.generateChildLogger=La.formatChildLoggerContext=La.getLoggerContext=La.setBrowserLoggerContext=La.getBrowserLoggerContext=La.getDefaultLoggerOptions=void 0;const t=nZ();function e(o){return Object.assign(Object.assign({},o),{level:(o==null?void 0:o.level)||t.PINO_LOGGER_DEFAULTS.level})}La.getDefaultLoggerOptions=e;function r(o,c=t.PINO_CUSTOM_CONTEXT_KEY){return o[c]||""}La.getBrowserLoggerContext=r;function n(o,c,u=t.PINO_CUSTOM_CONTEXT_KEY){return o[u]=c,o}La.setBrowserLoggerContext=n;function i(o,c=t.PINO_CUSTOM_CONTEXT_KEY){let u="";return typeof o.bindings>"u"?u=r(o,c):u=o.bindings().context||"",u}La.getLoggerContext=i;function a(o,c,u=t.PINO_CUSTOM_CONTEXT_KEY){const f=i(o,u);return f.trim()?`${f}/${c}`:c}La.formatChildLoggerContext=a;function s(o,c,u=t.PINO_CUSTOM_CONTEXT_KEY){const f=a(o,c,u),h=o.child({context:f});return n(h,f,u)}return La.generateChildLogger=s,La}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pino=void 0;const e=Mo,r=e.__importDefault(gIe());Object.defineProperty(t,"pino",{enumerable:!0,get:function(){return r.default}}),e.__exportStar(nZ(),t),e.__exportStar(mIe(),t)})(an);class yIe extends Bh{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}let vIe=class extends Bh{constructor(e,r){super(),this.core=e,this.logger=r,this.records=new Map}};class bIe{constructor(e,r){this.logger=e,this.core=r}}let wIe=class extends Bh{constructor(e,r){super(),this.relayer=e,this.logger=r}},_Ie=class extends Bh{constructor(e){super()}},EIe=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}},xIe=class extends Bh{constructor(e,r){super(),this.relayer=e,this.logger=r}},AIe=class extends Bh{constructor(e,r){super(),this.core=e,this.logger=r}},SIe=class{constructor(e,r){this.projectId=e,this.logger=r}},IIe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},OIe=class{constructor(e){this.client=e}};const PIe=t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),TIe=t=>{const e=/([\[:])?(\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,r=t.replace(e,'$1"$2n"$3');return JSON.parse(r,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function q4(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return TIe(t)}catch{return t}}function hb(t){return typeof t=="string"?t:PIe(t)||""}var H4={},iZ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Mr,r=qs;t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var n=function(){function o(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.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 o.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},o.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},o.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},o.prototype.update=function(c,u){if(u===void 0&&(u=c.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var f=0;if(this._bytesHashed+=u,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&u>0;)this._buffer[this._bufferLength++]=c[f++],u--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(u>=this.blockSize&&(f=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,c,f,u),u%=this.blockSize);u>0;)this._buffer[this._bufferLength++]=c[f++],u--;return this},o.prototype.finish=function(c){if(!this._finished){var u=this._bytesHashed,f=this._bufferLength,h=u/536870912|0,m=u<<3,y=u%128<112?128:256;this._buffer[f]=128;for(var w=f+1;w<y-8;w++)this._buffer[w]=0;e.writeUint32BE(h,this._buffer,y-8),e.writeUint32BE(m,this._buffer,y-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,y),this._finished=!0}for(var w=0;w<this.digestLength/8;w++)e.writeUint32BE(this._stateHi[w],c,w*8),e.writeUint32BE(this._stateLo[w],c,w*8+4);return this},o.prototype.digest=function(){var c=new Uint8Array(this.digestLength);return this.finish(c),c},o.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}},o.prototype.restoreState=function(c){return this._stateHi.set(c.stateHi),this._stateLo.set(c.stateLo),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},o.prototype.cleanSavedState=function(c){r.wipe(c.stateHi),r.wipe(c.stateLo),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},o}();t.SHA512=n;var i=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 a(o,c,u,f,h,m,y){for(var w=u[0],v=u[1],g=u[2],_=u[3],b=u[4],S=u[5],A=u[6],I=u[7],E=f[0],p=f[1],O=f[2],N=f[3],F=f[4],V=f[5],de=f[6],ve=f[7],U,L,Q,ne,j,B,H,M;y>=128;){for(var q=0;q<16;q++){var k=8*q+m;o[q]=e.readUint32BE(h,k),c[q]=e.readUint32BE(h,k+4)}for(var q=0;q<80;q++){var $=w,G=v,pe=g,Y=_,te=b,ce=S,T=A,le=I,ze=E,et=p,yt=O,vt=N,gt=F,Ut=V,Xt=de,Sr=ve;if(U=I,L=ve,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=(b>>>14|F<<32-14)^(b>>>18|F<<32-18)^(F>>>41-32|b<<32-(41-32)),L=(F>>>14|b<<32-14)^(F>>>18|b<<32-18)^(b>>>41-32|F<<32-(41-32)),j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,U=b&S^~b&A,L=F&V^~F&de,j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,U=i[q*2],L=i[q*2+1],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,U=o[q%16],L=c[q%16],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,Q=H&65535|M<<16,ne=j&65535|B<<16,U=Q,L=ne,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=(w>>>28|E<<32-28)^(E>>>34-32|w<<32-(34-32))^(E>>>39-32|w<<32-(39-32)),L=(E>>>28|w<<32-28)^(w>>>34-32|E<<32-(34-32))^(w>>>39-32|E<<32-(39-32)),j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,U=w&v^w&g^v&g,L=E&p^E&O^p&O,j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,le=H&65535|M<<16,Sr=j&65535|B<<16,U=Y,L=vt,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=Q,L=ne,j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,Y=H&65535|M<<16,vt=j&65535|B<<16,v=$,g=G,_=pe,b=Y,S=te,A=ce,I=T,w=le,p=ze,O=et,N=yt,F=vt,V=gt,de=Ut,ve=Xt,E=Sr,q%16===15)for(var k=0;k<16;k++)U=o[k],L=c[k],j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=o[(k+9)%16],L=c[(k+9)%16],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,Q=o[(k+1)%16],ne=c[(k+1)%16],U=(Q>>>1|ne<<32-1)^(Q>>>8|ne<<32-8)^Q>>>7,L=(ne>>>1|Q<<32-1)^(ne>>>8|Q<<32-8)^(ne>>>7|Q<<32-7),j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,Q=o[(k+14)%16],ne=c[(k+14)%16],U=(Q>>>19|ne<<32-19)^(ne>>>61-32|Q<<32-(61-32))^Q>>>6,L=(ne>>>19|Q<<32-19)^(Q>>>61-32|ne<<32-(61-32))^(ne>>>6|Q<<32-6),j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,o[k]=H&65535|M<<16,c[k]=j&65535|B<<16}U=w,L=E,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=u[0],L=f[0],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,u[0]=w=H&65535|M<<16,f[0]=E=j&65535|B<<16,U=v,L=p,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=u[1],L=f[1],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,u[1]=v=H&65535|M<<16,f[1]=p=j&65535|B<<16,U=g,L=O,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=u[2],L=f[2],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,u[2]=g=H&65535|M<<16,f[2]=O=j&65535|B<<16,U=_,L=N,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=u[3],L=f[3],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,u[3]=_=H&65535|M<<16,f[3]=N=j&65535|B<<16,U=b,L=F,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=u[4],L=f[4],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,u[4]=b=H&65535|M<<16,f[4]=F=j&65535|B<<16,U=S,L=V,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=u[5],L=f[5],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,u[5]=S=H&65535|M<<16,f[5]=V=j&65535|B<<16,U=A,L=de,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=u[6],L=f[6],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,u[6]=A=H&65535|M<<16,f[6]=de=j&65535|B<<16,U=I,L=ve,j=L&65535,B=L>>>16,H=U&65535,M=U>>>16,U=u[7],L=f[7],j+=L&65535,B+=L>>>16,H+=U&65535,M+=U>>>16,B+=j>>>16,H+=B>>>16,M+=H>>>16,u[7]=I=H&65535|M<<16,f[7]=ve=j&65535|B<<16,m+=128,y-=128}return m}function s(o){var c=new n;c.update(o);var u=c.digest();return c.clean(),u}t.hash=s})(iZ);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertSecretKeyToX25519=t.convertPublicKeyToX25519=t.verify=t.sign=t.extractPublicKeyFromSecretKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.SEED_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=t.SIGNATURE_LENGTH=void 0;const e=rm,r=iZ,n=qs;t.SIGNATURE_LENGTH=64,t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=64,t.SEED_LENGTH=32;function i(Y){const te=new Float64Array(16);if(Y)for(let ce=0;ce<Y.length;ce++)te[ce]=Y[ce];return te}const a=new Uint8Array(32);a[0]=9;const s=i(),o=i([1]),c=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),m=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function y(Y,te){for(let ce=0;ce<16;ce++)Y[ce]=te[ce]|0}function w(Y){let te=1;for(let ce=0;ce<16;ce++){let T=Y[ce]+te+65535;te=Math.floor(T/65536),Y[ce]=T-te*65536}Y[0]+=te-1+37*(te-1)}function v(Y,te,ce){const T=~(ce-1);for(let le=0;le<16;le++){const ze=T&(Y[le]^te[le]);Y[le]^=ze,te[le]^=ze}}function g(Y,te){const ce=i(),T=i();for(let le=0;le<16;le++)T[le]=te[le];w(T),w(T),w(T);for(let le=0;le<2;le++){ce[0]=T[0]-65517;for(let et=1;et<15;et++)ce[et]=T[et]-65535-(ce[et-1]>>16&1),ce[et-1]&=65535;ce[15]=T[15]-32767-(ce[14]>>16&1);const ze=ce[15]>>16&1;ce[14]&=65535,v(T,ce,1-ze)}for(let le=0;le<16;le++)Y[2*le]=T[le]&255,Y[2*le+1]=T[le]>>8}function _(Y,te){let ce=0;for(let T=0;T<32;T++)ce|=Y[T]^te[T];return(1&ce-1>>>8)-1}function b(Y,te){const ce=new Uint8Array(32),T=new Uint8Array(32);return g(ce,Y),g(T,te),_(ce,T)}function S(Y){const te=new Uint8Array(32);return g(te,Y),te[0]&1}function A(Y,te){for(let ce=0;ce<16;ce++)Y[ce]=te[2*ce]+(te[2*ce+1]<<8);Y[15]&=32767}function I(Y,te,ce){for(let T=0;T<16;T++)Y[T]=te[T]+ce[T]}function E(Y,te,ce){for(let T=0;T<16;T++)Y[T]=te[T]-ce[T]}function p(Y,te,ce){let T,le,ze=0,et=0,yt=0,vt=0,gt=0,Ut=0,Xt=0,Sr=0,Ct=0,Pt=0,kt=0,Rt=0,Kt=0,Ft=0,Gt=0,Dt=0,Nt=0,zt=0,Mt=0,cr=0,tr=0,ar=0,nr=0,br=0,En=0,tn=0,li=0,Mn=0,$n=0,Zn=0,Tr=0,Ur=ce[0],Ir=ce[1],_e=ce[2],ee=ce[3],ye=ce[4],Re=ce[5],He=ce[6],Je=ce[7],ot=ce[8],dt=ce[9],Et=ce[10],ue=ce[11],Z=ce[12],ge=ce[13],Me=ce[14],Le=ce[15];T=te[0],ze+=T*Ur,et+=T*Ir,yt+=T*_e,vt+=T*ee,gt+=T*ye,Ut+=T*Re,Xt+=T*He,Sr+=T*Je,Ct+=T*ot,Pt+=T*dt,kt+=T*Et,Rt+=T*ue,Kt+=T*Z,Ft+=T*ge,Gt+=T*Me,Dt+=T*Le,T=te[1],et+=T*Ur,yt+=T*Ir,vt+=T*_e,gt+=T*ee,Ut+=T*ye,Xt+=T*Re,Sr+=T*He,Ct+=T*Je,Pt+=T*ot,kt+=T*dt,Rt+=T*Et,Kt+=T*ue,Ft+=T*Z,Gt+=T*ge,Dt+=T*Me,Nt+=T*Le,T=te[2],yt+=T*Ur,vt+=T*Ir,gt+=T*_e,Ut+=T*ee,Xt+=T*ye,Sr+=T*Re,Ct+=T*He,Pt+=T*Je,kt+=T*ot,Rt+=T*dt,Kt+=T*Et,Ft+=T*ue,Gt+=T*Z,Dt+=T*ge,Nt+=T*Me,zt+=T*Le,T=te[3],vt+=T*Ur,gt+=T*Ir,Ut+=T*_e,Xt+=T*ee,Sr+=T*ye,Ct+=T*Re,Pt+=T*He,kt+=T*Je,Rt+=T*ot,Kt+=T*dt,Ft+=T*Et,Gt+=T*ue,Dt+=T*Z,Nt+=T*ge,zt+=T*Me,Mt+=T*Le,T=te[4],gt+=T*Ur,Ut+=T*Ir,Xt+=T*_e,Sr+=T*ee,Ct+=T*ye,Pt+=T*Re,kt+=T*He,Rt+=T*Je,Kt+=T*ot,Ft+=T*dt,Gt+=T*Et,Dt+=T*ue,Nt+=T*Z,zt+=T*ge,Mt+=T*Me,cr+=T*Le,T=te[5],Ut+=T*Ur,Xt+=T*Ir,Sr+=T*_e,Ct+=T*ee,Pt+=T*ye,kt+=T*Re,Rt+=T*He,Kt+=T*Je,Ft+=T*ot,Gt+=T*dt,Dt+=T*Et,Nt+=T*ue,zt+=T*Z,Mt+=T*ge,cr+=T*Me,tr+=T*Le,T=te[6],Xt+=T*Ur,Sr+=T*Ir,Ct+=T*_e,Pt+=T*ee,kt+=T*ye,Rt+=T*Re,Kt+=T*He,Ft+=T*Je,Gt+=T*ot,Dt+=T*dt,Nt+=T*Et,zt+=T*ue,Mt+=T*Z,cr+=T*ge,tr+=T*Me,ar+=T*Le,T=te[7],Sr+=T*Ur,Ct+=T*Ir,Pt+=T*_e,kt+=T*ee,Rt+=T*ye,Kt+=T*Re,Ft+=T*He,Gt+=T*Je,Dt+=T*ot,Nt+=T*dt,zt+=T*Et,Mt+=T*ue,cr+=T*Z,tr+=T*ge,ar+=T*Me,nr+=T*Le,T=te[8],Ct+=T*Ur,Pt+=T*Ir,kt+=T*_e,Rt+=T*ee,Kt+=T*ye,Ft+=T*Re,Gt+=T*He,Dt+=T*Je,Nt+=T*ot,zt+=T*dt,Mt+=T*Et,cr+=T*ue,tr+=T*Z,ar+=T*ge,nr+=T*Me,br+=T*Le,T=te[9],Pt+=T*Ur,kt+=T*Ir,Rt+=T*_e,Kt+=T*ee,Ft+=T*ye,Gt+=T*Re,Dt+=T*He,Nt+=T*Je,zt+=T*ot,Mt+=T*dt,cr+=T*Et,tr+=T*ue,ar+=T*Z,nr+=T*ge,br+=T*Me,En+=T*Le,T=te[10],kt+=T*Ur,Rt+=T*Ir,Kt+=T*_e,Ft+=T*ee,Gt+=T*ye,Dt+=T*Re,Nt+=T*He,zt+=T*Je,Mt+=T*ot,cr+=T*dt,tr+=T*Et,ar+=T*ue,nr+=T*Z,br+=T*ge,En+=T*Me,tn+=T*Le,T=te[11],Rt+=T*Ur,Kt+=T*Ir,Ft+=T*_e,Gt+=T*ee,Dt+=T*ye,Nt+=T*Re,zt+=T*He,Mt+=T*Je,cr+=T*ot,tr+=T*dt,ar+=T*Et,nr+=T*ue,br+=T*Z,En+=T*ge,tn+=T*Me,li+=T*Le,T=te[12],Kt+=T*Ur,Ft+=T*Ir,Gt+=T*_e,Dt+=T*ee,Nt+=T*ye,zt+=T*Re,Mt+=T*He,cr+=T*Je,tr+=T*ot,ar+=T*dt,nr+=T*Et,br+=T*ue,En+=T*Z,tn+=T*ge,li+=T*Me,Mn+=T*Le,T=te[13],Ft+=T*Ur,Gt+=T*Ir,Dt+=T*_e,Nt+=T*ee,zt+=T*ye,Mt+=T*Re,cr+=T*He,tr+=T*Je,ar+=T*ot,nr+=T*dt,br+=T*Et,En+=T*ue,tn+=T*Z,li+=T*ge,Mn+=T*Me,$n+=T*Le,T=te[14],Gt+=T*Ur,Dt+=T*Ir,Nt+=T*_e,zt+=T*ee,Mt+=T*ye,cr+=T*Re,tr+=T*He,ar+=T*Je,nr+=T*ot,br+=T*dt,En+=T*Et,tn+=T*ue,li+=T*Z,Mn+=T*ge,$n+=T*Me,Zn+=T*Le,T=te[15],Dt+=T*Ur,Nt+=T*Ir,zt+=T*_e,Mt+=T*ee,cr+=T*ye,tr+=T*Re,ar+=T*He,nr+=T*Je,br+=T*ot,En+=T*dt,tn+=T*Et,li+=T*ue,Mn+=T*Z,$n+=T*ge,Zn+=T*Me,Tr+=T*Le,ze+=38*Nt,et+=38*zt,yt+=38*Mt,vt+=38*cr,gt+=38*tr,Ut+=38*ar,Xt+=38*nr,Sr+=38*br,Ct+=38*En,Pt+=38*tn,kt+=38*li,Rt+=38*Mn,Kt+=38*$n,Ft+=38*Zn,Gt+=38*Tr,le=1,T=ze+le+65535,le=Math.floor(T/65536),ze=T-le*65536,T=et+le+65535,le=Math.floor(T/65536),et=T-le*65536,T=yt+le+65535,le=Math.floor(T/65536),yt=T-le*65536,T=vt+le+65535,le=Math.floor(T/65536),vt=T-le*65536,T=gt+le+65535,le=Math.floor(T/65536),gt=T-le*65536,T=Ut+le+65535,le=Math.floor(T/65536),Ut=T-le*65536,T=Xt+le+65535,le=Math.floor(T/65536),Xt=T-le*65536,T=Sr+le+65535,le=Math.floor(T/65536),Sr=T-le*65536,T=Ct+le+65535,le=Math.floor(T/65536),Ct=T-le*65536,T=Pt+le+65535,le=Math.floor(T/65536),Pt=T-le*65536,T=kt+le+65535,le=Math.floor(T/65536),kt=T-le*65536,T=Rt+le+65535,le=Math.floor(T/65536),Rt=T-le*65536,T=Kt+le+65535,le=Math.floor(T/65536),Kt=T-le*65536,T=Ft+le+65535,le=Math.floor(T/65536),Ft=T-le*65536,T=Gt+le+65535,le=Math.floor(T/65536),Gt=T-le*65536,T=Dt+le+65535,le=Math.floor(T/65536),Dt=T-le*65536,ze+=le-1+37*(le-1),le=1,T=ze+le+65535,le=Math.floor(T/65536),ze=T-le*65536,T=et+le+65535,le=Math.floor(T/65536),et=T-le*65536,T=yt+le+65535,le=Math.floor(T/65536),yt=T-le*65536,T=vt+le+65535,le=Math.floor(T/65536),vt=T-le*65536,T=gt+le+65535,le=Math.floor(T/65536),gt=T-le*65536,T=Ut+le+65535,le=Math.floor(T/65536),Ut=T-le*65536,T=Xt+le+65535,le=Math.floor(T/65536),Xt=T-le*65536,T=Sr+le+65535,le=Math.floor(T/65536),Sr=T-le*65536,T=Ct+le+65535,le=Math.floor(T/65536),Ct=T-le*65536,T=Pt+le+65535,le=Math.floor(T/65536),Pt=T-le*65536,T=kt+le+65535,le=Math.floor(T/65536),kt=T-le*65536,T=Rt+le+65535,le=Math.floor(T/65536),Rt=T-le*65536,T=Kt+le+65535,le=Math.floor(T/65536),Kt=T-le*65536,T=Ft+le+65535,le=Math.floor(T/65536),Ft=T-le*65536,T=Gt+le+65535,le=Math.floor(T/65536),Gt=T-le*65536,T=Dt+le+65535,le=Math.floor(T/65536),Dt=T-le*65536,ze+=le-1+37*(le-1),Y[0]=ze,Y[1]=et,Y[2]=yt,Y[3]=vt,Y[4]=gt,Y[5]=Ut,Y[6]=Xt,Y[7]=Sr,Y[8]=Ct,Y[9]=Pt,Y[10]=kt,Y[11]=Rt,Y[12]=Kt,Y[13]=Ft,Y[14]=Gt,Y[15]=Dt}function O(Y,te){p(Y,te,te)}function N(Y,te){const ce=i();let T;for(T=0;T<16;T++)ce[T]=te[T];for(T=253;T>=0;T--)O(ce,ce),T!==2&&T!==4&&p(ce,ce,te);for(T=0;T<16;T++)Y[T]=ce[T]}function F(Y,te){const ce=i();let T;for(T=0;T<16;T++)ce[T]=te[T];for(T=250;T>=0;T--)O(ce,ce),T!==1&&p(ce,ce,te);for(T=0;T<16;T++)Y[T]=ce[T]}function V(Y,te){const ce=i(),T=i(),le=i(),ze=i(),et=i(),yt=i(),vt=i(),gt=i(),Ut=i();E(ce,Y[1],Y[0]),E(Ut,te[1],te[0]),p(ce,ce,Ut),I(T,Y[0],Y[1]),I(Ut,te[0],te[1]),p(T,T,Ut),p(le,Y[3],te[3]),p(le,le,u),p(ze,Y[2],te[2]),I(ze,ze,ze),E(et,T,ce),E(yt,ze,le),I(vt,ze,le),I(gt,T,ce),p(Y[0],et,yt),p(Y[1],gt,vt),p(Y[2],vt,yt),p(Y[3],et,gt)}function de(Y,te,ce){for(let T=0;T<4;T++)v(Y[T],te[T],ce)}function ve(Y,te){const ce=i(),T=i(),le=i();N(le,te[2]),p(ce,te[0],le),p(T,te[1],le),g(Y,T),Y[31]^=S(ce)<<7}function U(Y,te,ce){y(Y[0],s),y(Y[1],o),y(Y[2],o),y(Y[3],s);for(let T=255;T>=0;--T){const le=ce[T/8|0]>>(T&7)&1;de(Y,te,le),V(te,Y),V(Y,Y),de(Y,te,le)}}function L(Y,te){const ce=[i(),i(),i(),i()];y(ce[0],f),y(ce[1],h),y(ce[2],o),p(ce[3],f,h),U(Y,ce,te)}function Q(Y){if(Y.length!==t.SEED_LENGTH)throw new Error(`ed25519: seed must be ${t.SEED_LENGTH} bytes`);const te=(0,r.hash)(Y);te[0]&=248,te[31]&=127,te[31]|=64;const ce=new Uint8Array(32),T=[i(),i(),i(),i()];L(T,te),ve(ce,T);const le=new Uint8Array(64);return le.set(Y),le.set(ce,32),{publicKey:ce,secretKey:le}}t.generateKeyPairFromSeed=Q;function ne(Y){const te=(0,e.randomBytes)(32,Y),ce=Q(te);return(0,n.wipe)(te),ce}t.generateKeyPair=ne;function j(Y){if(Y.length!==t.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${t.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(Y.subarray(32))}t.extractPublicKeyFromSecretKey=j;const B=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 H(Y,te){let ce,T,le,ze;for(T=63;T>=32;--T){for(ce=0,le=T-32,ze=T-12;le<ze;++le)te[le]+=ce-16*te[T]*B[le-(T-32)],ce=Math.floor((te[le]+128)/256),te[le]-=ce*256;te[le]+=ce,te[T]=0}for(ce=0,le=0;le<32;le++)te[le]+=ce-(te[31]>>4)*B[le],ce=te[le]>>8,te[le]&=255;for(le=0;le<32;le++)te[le]-=ce*B[le];for(T=0;T<32;T++)te[T+1]+=te[T]>>8,Y[T]=te[T]&255}function M(Y){const te=new Float64Array(64);for(let ce=0;ce<64;ce++)te[ce]=Y[ce];for(let ce=0;ce<64;ce++)Y[ce]=0;H(Y,te)}function q(Y,te){const ce=new Float64Array(64),T=[i(),i(),i(),i()],le=(0,r.hash)(Y.subarray(0,32));le[0]&=248,le[31]&=127,le[31]|=64;const ze=new Uint8Array(64);ze.set(le.subarray(32),32);const et=new r.SHA512;et.update(ze.subarray(32)),et.update(te);const yt=et.digest();et.clean(),M(yt),L(T,yt),ve(ze,T),et.reset(),et.update(ze.subarray(0,32)),et.update(Y.subarray(32)),et.update(te);const vt=et.digest();M(vt);for(let gt=0;gt<32;gt++)ce[gt]=yt[gt];for(let gt=0;gt<32;gt++)for(let Ut=0;Ut<32;Ut++)ce[gt+Ut]+=vt[gt]*le[Ut];return H(ze.subarray(32),ce),ze}t.sign=q;function k(Y,te){const ce=i(),T=i(),le=i(),ze=i(),et=i(),yt=i(),vt=i();return y(Y[2],o),A(Y[1],te),O(le,Y[1]),p(ze,le,c),E(le,le,Y[2]),I(ze,Y[2],ze),O(et,ze),O(yt,et),p(vt,yt,et),p(ce,vt,le),p(ce,ce,ze),F(ce,ce),p(ce,ce,le),p(ce,ce,ze),p(ce,ce,ze),p(Y[0],ce,ze),O(T,Y[0]),p(T,T,ze),b(T,le)&&p(Y[0],Y[0],m),O(T,Y[0]),p(T,T,ze),b(T,le)?-1:(S(Y[0])===te[31]>>7&&E(Y[0],s,Y[0]),p(Y[3],Y[0],Y[1]),0)}function $(Y,te,ce){const T=new Uint8Array(32),le=[i(),i(),i(),i()],ze=[i(),i(),i(),i()];if(ce.length!==t.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${t.SIGNATURE_LENGTH} bytes`);if(k(ze,Y))return!1;const et=new r.SHA512;et.update(ce.subarray(0,32)),et.update(Y),et.update(te);const yt=et.digest();return M(yt),U(le,ze,yt),L(ze,ce.subarray(32)),V(le,ze),ve(T,le),!_(ce,T)}t.verify=$;function G(Y){let te=[i(),i(),i(),i()];if(k(te,Y))throw new Error("Ed25519: invalid public key");let ce=i(),T=i(),le=te[1];I(ce,o,le),E(T,o,le),N(T,T),p(ce,ce,T);let ze=new Uint8Array(32);return g(ze,ce),ze}t.convertPublicKeyToX25519=G;function pe(Y){const te=(0,r.hash)(Y.subarray(0,32));te[0]&=248,te[31]&=127,te[31]|=64;const ce=new Uint8Array(te.subarray(0,32));return(0,n.wipe)(te),ce}t.convertSecretKeyToX25519=pe})(H4);const CIe="EdDSA",RIe="JWT",aZ=".",sZ="base64url",NIe="utf8",DIe="utf8",MIe=":",$Ie="did",kIe="key",Wq="base58btc",LIe="z",jIe="K36",UIe=32;function zE(t){return Ya(ms(hb(t),NIe),sZ)}function oZ(t){const e=ms(jIe,Wq),r=LIe+Ya(z6([e,t]),Wq);return[$Ie,kIe,r].join(MIe)}function FIe(t){return Ya(t,sZ)}function BIe(t){return ms([zE(t.header),zE(t.payload)].join(aZ),DIe)}function qIe(t){return[zE(t.header),zE(t.payload),FIe(t.signature)].join(aZ)}function Qq(t=rm.randomBytes(UIe)){return H4.generateKeyPairFromSeed(t)}async function HIe(t,e,r,n,i=Jt.fromMiliseconds(Date.now())){const a={alg:CIe,typ:RIe},s=oZ(n.publicKey),o=i+r,c={iss:s,sub:t,aud:e,iat:i,exp:o},u=BIe({header:a,payload:c}),f=H4.sign(n.secretKey,u);return qIe({header:a,payload:c,signature:f})}const zIe="PARSE_ERROR",VIe="INVALID_REQUEST",GIe="METHOD_NOT_FOUND",KIe="INVALID_PARAMS",cZ="INTERNAL_ERROR",z4="SERVER_ERROR",WIe=[-32700,-32600,-32601,-32602,-32603],Tv={[zIe]:{code:-32700,message:"Parse error"},[VIe]:{code:-32600,message:"Invalid Request"},[GIe]:{code:-32601,message:"Method not found"},[KIe]:{code:-32602,message:"Invalid params"},[cZ]:{code:-32603,message:"Internal error"},[z4]:{code:-32e3,message:"Server error"}},uZ=z4;function QIe(t){return WIe.includes(t)}function Yq(t){return Object.keys(Tv).includes(t)?Tv[t]:Tv[uZ]}function YIe(t){const e=Object.values(Tv).find(r=>r.code===t);return e||Tv[uZ]}function lZ(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var fZ={},lu={},Jq;function JIe(){if(Jq)return lu;Jq=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.isBrowserCryptoAvailable=lu.getSubtleCrypto=lu.getBrowerCrypto=void 0;function t(){return(ke==null?void 0:ke.crypto)||(ke==null?void 0:ke.msCrypto)||{}}lu.getBrowerCrypto=t;function e(){const n=t();return n.subtle||n.webkitSubtle}lu.getSubtleCrypto=e;function r(){return!!t()&&!!e()}return lu.isBrowserCryptoAvailable=r,lu}var fu={},Xq;function XIe(){if(Xq)return fu;Xq=1,Object.defineProperty(fu,"__esModule",{value:!0}),fu.isBrowser=fu.isNode=fu.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}fu.isReactNative=t;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}fu.isNode=e;function r(){return!t()&&!e()}return fu.isBrowser=r,fu}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Mo;e.__exportStar(JIe(),t),e.__exportStar(XIe(),t)})(fZ);function V4(t=3){const e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function dZ(t=6){return BigInt(V4(t))}function v0(t,e,r){return{id:r||V4(),jsonrpc:"2.0",method:t,params:e}}function G4(t,e){return{id:t,jsonrpc:"2.0",result:e}}function H2(t,e,r){return{id:t,jsonrpc:"2.0",error:ZIe(e,r)}}function ZIe(t,e){return typeof t>"u"?Yq(cZ):(typeof t=="string"&&(t=Object.assign(Object.assign({},Yq(z4)),{message:t})),typeof e<"u"&&(t.data=e),QIe(t.code)&&(t=YIe(t.code)),t)}class eOe{}class tOe extends eOe{constructor(){super()}}class rOe extends tOe{constructor(e){super()}}const nOe="^https?:",iOe="^wss?:";function aOe(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function hZ(t,e){const r=aOe(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function Zq(t){return hZ(t,nOe)}function eH(t){return hZ(t,iOe)}function sOe(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function pZ(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function K4(t){return pZ(t)&&"method"in t}function z2(t){return pZ(t)&&(_u(t)||nc(t))}function _u(t){return"result"in t}function nc(t){return"error"in t}class fl extends rOe{constructor(e){super(e),this.events=new Es.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.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)}async request(e,r){return this.requestStrict(v0(e.method,e.params||[],e.id||dZ().toString()),r)}async requestStrict(e,r){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(a){i(a)}this.events.on(`${e.id}`,a=>{nc(a)?i(a.error):n(a.result)});try{await this.connection.send(e,r)}catch(a){i(a)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),z2(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.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 oOe=()=>typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),cOe=()=>typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",tH=t=>t.split("?")[0],rH=10,uOe=oOe();class lOe{constructor(e){if(this.url=e,this.events=new Es.EventEmitter,this.registering=!1,!eH(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)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e,r){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(hb(e))}catch(n){this.onError(e.id,n)}}register(e=this.url){if(!eH(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((n,i)=>{this.events.once("register_error",a=>{this.resetMaxListeners(),i(a)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,n)=>{const i=fZ.isReactNative()?void 0:{rejectUnauthorized:!sOe(e)},a=new uOe(e,[],i);cOe()?a.onerror=s=>{const o=s;n(this.emitError(o.error))}:a.on("error",s=>{n(this.emitError(s))}),a.onopen=()=>{this.onOpen(a),r(a)}})}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=typeof e.data=="string"?q4(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),a=H2(e,i);this.events.emit("payload",a)}parseError(e,r=this.url){return lZ(e,tH(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>rH&&this.events.setMaxListeners(rH)}emitError(e){const r=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${tH(this.url)}`));return this.events.emit("register_error",r),r}}var VE={exports:{}};VE.exports;(function(t,e){var r=200,n="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,o="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",h="[object Date]",m="[object Error]",y="[object Function]",w="[object GeneratorFunction]",v="[object Map]",g="[object Number]",_="[object Null]",b="[object Object]",S="[object Promise]",A="[object Proxy]",I="[object RegExp]",E="[object Set]",p="[object String]",O="[object Symbol]",N="[object Undefined]",F="[object WeakMap]",V="[object ArrayBuffer]",de="[object DataView]",ve="[object Float32Array]",U="[object Float64Array]",L="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",j="[object Uint8Array]",B="[object Uint8ClampedArray]",H="[object Uint16Array]",M="[object Uint32Array]",q=/[\\^$.*+?()[\]{}|]/g,k=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,G={};G[ve]=G[U]=G[L]=G[Q]=G[ne]=G[j]=G[B]=G[H]=G[M]=!0,G[o]=G[c]=G[V]=G[f]=G[de]=G[h]=G[m]=G[y]=G[v]=G[g]=G[b]=G[I]=G[E]=G[p]=G[F]=!1;var pe=typeof ke=="object"&&ke&&ke.Object===Object&&ke,Y=typeof self=="object"&&self&&self.Object===Object&&self,te=pe||Y||Function("return this")(),ce=e&&!e.nodeType&&e,T=ce&&!0&&t&&!t.nodeType&&t,le=T&&T.exports===ce,ze=le&&pe.process,et=function(){try{return ze&&ze.binding&&ze.binding("util")}catch{}}(),yt=et&&et.isTypedArray;function vt(fe,$e){for(var nt=-1,Ge=fe==null?0:fe.length,Kr=0,lr=[];++nt<Ge;){var dn=fe[nt];$e(dn,nt,fe)&&(lr[Kr++]=dn)}return lr}function gt(fe,$e){for(var nt=-1,Ge=$e.length,Kr=fe.length;++nt<Ge;)fe[Kr+nt]=$e[nt];return fe}function Ut(fe,$e){for(var nt=-1,Ge=fe==null?0:fe.length;++nt<Ge;)if($e(fe[nt],nt,fe))return!0;return!1}function Xt(fe,$e){for(var nt=-1,Ge=Array(fe);++nt<fe;)Ge[nt]=$e(nt);return Ge}function Sr(fe){return function($e){return fe($e)}}function Ct(fe,$e){return fe.has($e)}function Pt(fe,$e){return fe==null?void 0:fe[$e]}function kt(fe){var $e=-1,nt=Array(fe.size);return fe.forEach(function(Ge,Kr){nt[++$e]=[Kr,Ge]}),nt}function Rt(fe,$e){return function(nt){return fe($e(nt))}}function Kt(fe){var $e=-1,nt=Array(fe.size);return fe.forEach(function(Ge){nt[++$e]=Ge}),nt}var Ft=Array.prototype,Gt=Function.prototype,Dt=Object.prototype,Nt=te["__core-js_shared__"],zt=Gt.toString,Mt=Dt.hasOwnProperty,cr=function(){var fe=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return fe?"Symbol(src)_1."+fe:""}(),tr=Dt.toString,ar=RegExp("^"+zt.call(Mt).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nr=le?te.Buffer:void 0,br=te.Symbol,En=te.Uint8Array,tn=Dt.propertyIsEnumerable,li=Ft.splice,Mn=br?br.toStringTag:void 0,$n=Object.getOwnPropertySymbols,Zn=nr?nr.isBuffer:void 0,Tr=Rt(Object.keys,Object),Ur=Br(te,"DataView"),Ir=Br(te,"Map"),_e=Br(te,"Promise"),ee=Br(te,"Set"),ye=Br(te,"WeakMap"),Re=Br(Object,"create"),He=Lt(Ur),Je=Lt(Ir),ot=Lt(_e),dt=Lt(ee),Et=Lt(ye),ue=br?br.prototype:void 0,Z=ue?ue.valueOf:void 0;function ge(fe){var $e=-1,nt=fe==null?0:fe.length;for(this.clear();++$e<nt;){var Ge=fe[$e];this.set(Ge[0],Ge[1])}}function Me(){this.__data__=Re?Re(null):{},this.size=0}function Le(fe){var $e=this.has(fe)&&delete this.__data__[fe];return this.size-=$e?1:0,$e}function wt(fe){var $e=this.__data__;if(Re){var nt=$e[fe];return nt===n?void 0:nt}return Mt.call($e,fe)?$e[fe]:void 0}function St(fe){var $e=this.__data__;return Re?$e[fe]!==void 0:Mt.call($e,fe)}function hr(fe,$e){var nt=this.__data__;return this.size+=this.has(fe)?0:1,nt[fe]=Re&&$e===void 0?n:$e,this}ge.prototype.clear=Me,ge.prototype.delete=Le,ge.prototype.get=wt,ge.prototype.has=St,ge.prototype.set=hr;function ur(fe){var $e=-1,nt=fe==null?0:fe.length;for(this.clear();++$e<nt;){var Ge=fe[$e];this.set(Ge[0],Ge[1])}}function Jr(){this.__data__=[],this.size=0}function pr(fe){var $e=this.__data__,nt=re($e,fe);if(nt<0)return!1;var Ge=$e.length-1;return nt==Ge?$e.pop():li.call($e,nt,1),--this.size,!0}function vr(fe){var $e=this.__data__,nt=re($e,fe);return nt<0?void 0:$e[nt][1]}function rn(fe){return re(this.__data__,fe)>-1}function sr(fe,$e){var nt=this.__data__,Ge=re(nt,fe);return Ge<0?(++this.size,nt.push([fe,$e])):nt[Ge][1]=$e,this}ur.prototype.clear=Jr,ur.prototype.delete=pr,ur.prototype.get=vr,ur.prototype.has=rn,ur.prototype.set=sr;function $r(fe){var $e=-1,nt=fe==null?0:fe.length;for(this.clear();++$e<nt;){var Ge=fe[$e];this.set(Ge[0],Ge[1])}}function fn(){this.size=0,this.__data__={hash:new ge,map:new(Ir||ur),string:new ge}}function kr(fe){var $e=gn(this,fe).delete(fe);return this.size-=$e?1:0,$e}function Kn(fe){return gn(this,fe).get(fe)}function _i(fe){return gn(this,fe).has(fe)}function Wn(fe,$e){var nt=gn(this,fe),Ge=nt.size;return nt.set(fe,$e),this.size+=nt.size==Ge?0:1,this}$r.prototype.clear=fn,$r.prototype.delete=kr,$r.prototype.get=Kn,$r.prototype.has=_i,$r.prototype.set=Wn;function Ei(fe){var $e=-1,nt=fe==null?0:fe.length;for(this.__data__=new $r;++$e<nt;)this.add(fe[$e])}function xi(fe){return this.__data__.set(fe,n),this}function ei(fe){return this.__data__.has(fe)}Ei.prototype.add=Ei.prototype.push=xi,Ei.prototype.has=ei;function kn(fe){var $e=this.__data__=new ur(fe);this.size=$e.size}function Gi(){this.__data__=new ur,this.size=0}function Oi(fe){var $e=this.__data__,nt=$e.delete(fe);return this.size=$e.size,nt}function fa(fe){return this.__data__.get(fe)}function Hs(fe){return this.__data__.has(fe)}function X(fe,$e){var nt=this.__data__;if(nt instanceof ur){var Ge=nt.__data__;if(!Ir||Ge.length<r-1)return Ge.push([fe,$e]),this.size=++nt.size,this;nt=this.__data__=new $r(Ge)}return nt.set(fe,$e),this.size=nt.size,this}kn.prototype.clear=Gi,kn.prototype.delete=Oi,kn.prototype.get=fa,kn.prototype.has=Hs,kn.prototype.set=X;function me(fe,$e){var nt=yn(fe),Ge=!nt&&Ai(fe),Kr=!nt&&!Ge&&ti(fe),lr=!nt&&!Ge&&!Kr&&di(fe),dn=nt||Ge||Kr||lr,ir=dn?Xt(fe.length,String):[],gr=ir.length;for(var ie in fe)($e||Mt.call(fe,ie))&&!(dn&&(ie=="length"||Kr&&(ie=="offset"||ie=="parent")||lr&&(ie=="buffer"||ie=="byteLength"||ie=="byteOffset")||he(ie,gr)))&&ir.push(ie);return ir}function re(fe,$e){for(var nt=fe.length;nt--;)if(Yt(fe[nt][0],$e))return nt;return-1}function Ee(fe,$e,nt){var Ge=$e(fe);return yn(fe)?Ge:gt(Ge,nt(fe))}function be(fe){return fe==null?fe===void 0?N:_:Mn&&Mn in Object(fe)?P(fe):xt(fe)}function Ie(fe){return $i(fe)&&be(fe)==o}function Ye(fe,$e,nt,Ge,Kr){return fe===$e?!0:fe==null||$e==null||!$i(fe)&&!$i($e)?fe!==fe&&$e!==$e:ut(fe,$e,nt,Ge,Ye,Kr)}function ut(fe,$e,nt,Ge,Kr,lr){var dn=yn(fe),ir=yn($e),gr=dn?c:K(fe),ie=ir?c:K($e);gr=gr==o?b:gr,ie=ie==o?b:ie;var C=gr==b,se=ie==b,we=gr==ie;if(we&&ti(fe)){if(!ti($e))return!1;dn=!0,C=!1}if(we&&!C)return lr||(lr=new kn),dn||di(fe)?Ht(fe,$e,nt,Ge,Kr,lr):Or(fe,$e,gr,nt,Ge,Kr,lr);if(!(nt&i)){var oe=C&&Mt.call(fe,"__wrapped__"),Ae=se&&Mt.call($e,"__wrapped__");if(oe||Ae){var Oe=oe?fe.value():fe,Pe=Ae?$e.value():$e;return lr||(lr=new kn),Kr(Oe,Pe,nt,Ge,lr)}}return we?(lr||(lr=new kn),Vr(fe,$e,nt,Ge,Kr,lr)):!1}function We(fe){if(!Xa(fe)||Ce(fe))return!1;var $e=on(fe)?ar:k;return $e.test(Lt(fe))}function Ve(fe){return $i(fe)&&fi(fe.length)&&!!G[be(fe)]}function ht(fe){if(!tt(fe))return Tr(fe);var $e=[];for(var nt in Object(fe))Mt.call(fe,nt)&&nt!="constructor"&&$e.push(nt);return $e}function Ht(fe,$e,nt,Ge,Kr,lr){var dn=nt&i,ir=fe.length,gr=$e.length;if(ir!=gr&&!(dn&&gr>ir))return!1;var ie=lr.get(fe);if(ie&&lr.get($e))return ie==$e;var C=-1,se=!0,we=nt&a?new Ei:void 0;for(lr.set(fe,$e),lr.set($e,fe);++C<ir;){var oe=fe[C],Ae=$e[C];if(Ge)var Oe=dn?Ge(Ae,oe,C,$e,fe,lr):Ge(oe,Ae,C,fe,$e,lr);if(Oe!==void 0){if(Oe)continue;se=!1;break}if(we){if(!Ut($e,function(Pe,Ue){if(!Ct(we,Ue)&&(oe===Pe||Kr(oe,Pe,nt,Ge,lr)))return we.push(Ue)})){se=!1;break}}else if(!(oe===Ae||Kr(oe,Ae,nt,Ge,lr))){se=!1;break}}return lr.delete(fe),lr.delete($e),se}function Or(fe,$e,nt,Ge,Kr,lr,dn){switch(nt){case de:if(fe.byteLength!=$e.byteLength||fe.byteOffset!=$e.byteOffset)return!1;fe=fe.buffer,$e=$e.buffer;case V:return!(fe.byteLength!=$e.byteLength||!lr(new En(fe),new En($e)));case f:case h:case g:return Yt(+fe,+$e);case m:return fe.name==$e.name&&fe.message==$e.message;case I:case p:return fe==$e+"";case v:var ir=kt;case E:var gr=Ge&i;if(ir||(ir=Kt),fe.size!=$e.size&&!gr)return!1;var ie=dn.get(fe);if(ie)return ie==$e;Ge|=a,dn.set(fe,$e);var C=Ht(ir(fe),ir($e),Ge,Kr,lr,dn);return dn.delete(fe),C;case O:if(Z)return Z.call(fe)==Z.call($e)}return!1}function Vr(fe,$e,nt,Ge,Kr,lr){var dn=nt&i,ir=Fr(fe),gr=ir.length,ie=Fr($e),C=ie.length;if(gr!=C&&!dn)return!1;for(var se=gr;se--;){var we=ir[se];if(!(dn?we in $e:Mt.call($e,we)))return!1}var oe=lr.get(fe);if(oe&&lr.get($e))return oe==$e;var Ae=!0;lr.set(fe,$e),lr.set($e,fe);for(var Oe=dn;++se<gr;){we=ir[se];var Pe=fe[we],Ue=$e[we];if(Ge)var Ke=dn?Ge(Ue,Pe,we,$e,fe,lr):Ge(Pe,Ue,we,fe,$e,lr);if(!(Ke===void 0?Pe===Ue||Kr(Pe,Ue,nt,Ge,lr):Ke)){Ae=!1;break}Oe||(Oe=we=="constructor")}if(Ae&&!Oe){var qe=fe.constructor,pt=$e.constructor;qe!=pt&&"constructor"in fe&&"constructor"in $e&&!(typeof qe=="function"&&qe instanceof qe&&typeof pt=="function"&&pt instanceof pt)&&(Ae=!1)}return lr.delete(fe),lr.delete($e),Ae}function Fr(fe){return Ee(fe,Za,D)}function gn(fe,$e){var nt=fe.__data__;return Se($e)?nt[typeof $e=="string"?"string":"hash"]:nt.map}function Br(fe,$e){var nt=Pt(fe,$e);return We(nt)?nt:void 0}function P(fe){var $e=Mt.call(fe,Mn),nt=fe[Mn];try{fe[Mn]=void 0;var Ge=!0}catch{}var Kr=tr.call(fe);return Ge&&($e?fe[Mn]=nt:delete fe[Mn]),Kr}var D=$n?function(fe){return fe==null?[]:(fe=Object(fe),vt($n(fe),function($e){return tn.call(fe,$e)}))}:Xr,K=be;(Ur&&K(new Ur(new ArrayBuffer(1)))!=de||Ir&&K(new Ir)!=v||_e&&K(_e.resolve())!=S||ee&&K(new ee)!=E||ye&&K(new ye)!=F)&&(K=function(fe){var $e=be(fe),nt=$e==b?fe.constructor:void 0,Ge=nt?Lt(nt):"";if(Ge)switch(Ge){case He:return de;case Je:return v;case ot:return S;case dt:return E;case Et:return F}return $e});function he(fe,$e){return $e=$e??s,!!$e&&(typeof fe=="number"||$.test(fe))&&fe>-1&&fe%1==0&&fe<$e}function Se(fe){var $e=typeof fe;return $e=="string"||$e=="number"||$e=="symbol"||$e=="boolean"?fe!=="__proto__":fe===null}function Ce(fe){return!!cr&&cr in fe}function tt(fe){var $e=fe&&fe.constructor,nt=typeof $e=="function"&&$e.prototype||Dt;return fe===nt}function xt(fe){return tr.call(fe)}function Lt(fe){if(fe!=null){try{return zt.call(fe)}catch{}try{return fe+""}catch{}}return""}function Yt(fe,$e){return fe===$e||fe!==fe&&$e!==$e}var Ai=Ie(function(){return arguments}())?Ie:function(fe){return $i(fe)&&Mt.call(fe,"callee")&&!tn.call(fe,"callee")},yn=Array.isArray;function At(fe){return fe!=null&&fi(fe.length)&&!on(fe)}var ti=Zn||wr;function vn(fe,$e){return Ye(fe,$e)}function on(fe){if(!Xa(fe))return!1;var $e=be(fe);return $e==y||$e==w||$e==u||$e==A}function fi(fe){return typeof fe=="number"&&fe>-1&&fe%1==0&&fe<=s}function Xa(fe){var $e=typeof fe;return fe!=null&&($e=="object"||$e=="function")}function $i(fe){return fe!=null&&typeof fe=="object"}var di=yt?Sr(yt):Ve;function Za(fe){return At(fe)?me(fe):ht(fe)}function Xr(){return[]}function wr(){return!1}t.exports=vn})(VE,VE.exports);var fOe=VE.exports;const dOe=Df(fOe);function hOe(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var a=t.charAt(i),s=a.charCodeAt(0);if(r[s]!==255)throw new TypeError(a+" is ambiguous");r[s]=i}var o=t.length,c=t.charAt(0),u=Math.log(o)/Math.log(256),f=Math.log(256)/Math.log(o);function h(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var v=0,g=0,_=0,b=w.length;_!==b&&w[_]===0;)_++,v++;for(var S=(b-_)*f+1>>>0,A=new Uint8Array(S);_!==b;){for(var I=w[_],E=0,p=S-1;(I!==0||E<g)&&p!==-1;p--,E++)I+=256*A[p]>>>0,A[p]=I%o>>>0,I=I/o>>>0;if(I!==0)throw new Error("Non-zero carry");g=E,_++}for(var O=S-g;O!==S&&A[O]===0;)O++;for(var N=c.repeat(v);O<S;++O)N+=t.charAt(A[O]);return N}function m(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var v=0;if(w[v]!==" "){for(var g=0,_=0;w[v]===c;)g++,v++;for(var b=(w.length-v)*u+1>>>0,S=new Uint8Array(b);w[v];){var A=r[w.charCodeAt(v)];if(A===255)return;for(var I=0,E=b-1;(A!==0||I<_)&&E!==-1;E--,I++)A+=o*S[E]>>>0,S[E]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");_=I,v++}if(w[v]!==" "){for(var p=b-_;p!==b&&S[p]===0;)p++;for(var O=new Uint8Array(g+(b-p)),N=g;p!==b;)O[N++]=S[p++];return O}}}function y(w){var v=m(w);if(v)return v;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:m,decode:y}}var pOe=hOe,gOe=pOe;const gZ=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},mOe=t=>new TextEncoder().encode(t),yOe=t=>new TextDecoder().decode(t);class vOe{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class bOe{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){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))}else throw Error("Can only multibase decode strings")}or(e){return mZ(this,e)}}class wOe{constructor(e){this.decoders=e}or(e){return mZ(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const mZ=(t,e)=>new wOe({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let _Oe=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new vOe(e,r,n),this.decoder=new bOe(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const V2=({name:t,prefix:e,encode:r,decode:n})=>new _Oe(t,e,r,n),A1=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=gOe(r,e);return V2({prefix:t,name:e,encode:n,decode:a=>gZ(i(a))})},EOe=(t,e,r,n)=>{const i={};for(let f=0;f<e.length;++f)i[e[f]]=f;let a=t.length;for(;t[a-1]==="=";)--a;const s=new Uint8Array(a*r/8|0);let o=0,c=0,u=0;for(let f=0;f<a;++f){const h=i[t[f]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|h,o+=r,o>=8&&(o-=8,s[u++]=255&c>>o)}if(o>=r||255&c<<8-o)throw new SyntaxError("Unexpected end of data");return s},xOe=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let a="",s=0,o=0;for(let c=0;c<t.length;++c)for(o=o<<8|t[c],s+=8;s>r;)s-=r,a+=e[i&o>>s];if(s&&(a+=e[i&o<<r-s]),n)for(;a.length*r&7;)a+="=";return a},la=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>V2({prefix:e,name:t,encode(i){return xOe(i,n,r)},decode(i){return EOe(i,n,r,t)}}),AOe=V2({prefix:"\0",name:"identity",encode:t=>yOe(t),decode:t=>mOe(t)});var SOe=Object.freeze({__proto__:null,identity:AOe});const IOe=la({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var OOe=Object.freeze({__proto__:null,base2:IOe});const POe=la({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var TOe=Object.freeze({__proto__:null,base8:POe});const COe=A1({prefix:"9",name:"base10",alphabet:"0123456789"});var ROe=Object.freeze({__proto__:null,base10:COe});const NOe=la({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),DOe=la({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var MOe=Object.freeze({__proto__:null,base16:NOe,base16upper:DOe});const $Oe=la({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),kOe=la({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),LOe=la({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),jOe=la({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),UOe=la({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),FOe=la({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),BOe=la({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),qOe=la({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),HOe=la({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var zOe=Object.freeze({__proto__:null,base32:$Oe,base32upper:kOe,base32pad:LOe,base32padupper:jOe,base32hex:UOe,base32hexupper:FOe,base32hexpad:BOe,base32hexpadupper:qOe,base32z:HOe});const VOe=A1({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),GOe=A1({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var KOe=Object.freeze({__proto__:null,base36:VOe,base36upper:GOe});const WOe=A1({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),QOe=A1({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var YOe=Object.freeze({__proto__:null,base58btc:WOe,base58flickr:QOe});const JOe=la({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),XOe=la({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),ZOe=la({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),e3e=la({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var t3e=Object.freeze({__proto__:null,base64:JOe,base64pad:XOe,base64url:ZOe,base64urlpad:e3e});const yZ=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),r3e=yZ.reduce((t,e,r)=>(t[r]=e,t),[]),n3e=yZ.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function i3e(t){return t.reduce((e,r)=>(e+=r3e[r],e),"")}function a3e(t){const e=[];for(const r of t){const n=n3e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const s3e=V2({prefix:"🚀",name:"base256emoji",encode:i3e,decode:a3e});var o3e=Object.freeze({__proto__:null,base256emoji:s3e}),c3e=vZ,nH=128,u3e=127,l3e=~u3e,f3e=Math.pow(2,31);function vZ(t,e,r){e=e||[],r=r||0;for(var n=r;t>=f3e;)e[r++]=t&255|nH,t/=128;for(;t&l3e;)e[r++]=t&255|nH,t>>>=7;return e[r]=t|0,vZ.bytes=r-n+1,e}var d3e=Z6,h3e=128,iH=127;function Z6(t,n){var r=0,n=n||0,i=0,a=n,s,o=t.length;do{if(a>=o)throw Z6.bytes=0,new RangeError("Could not decode varint");s=t[a++],r+=i<28?(s&iH)<<i:(s&iH)*Math.pow(2,i),i+=7}while(s>=h3e);return Z6.bytes=a-n,r}var p3e=Math.pow(2,7),g3e=Math.pow(2,14),m3e=Math.pow(2,21),y3e=Math.pow(2,28),v3e=Math.pow(2,35),b3e=Math.pow(2,42),w3e=Math.pow(2,49),_3e=Math.pow(2,56),E3e=Math.pow(2,63),x3e=function(t){return t<p3e?1:t<g3e?2:t<m3e?3:t<y3e?4:t<v3e?5:t<b3e?6:t<w3e?7:t<_3e?8:t<E3e?9:10},A3e={encode:c3e,decode:d3e,encodingLength:x3e},bZ=A3e;const aH=(t,e,r=0)=>(bZ.encode(t,e,r),e),sH=t=>bZ.encodingLength(t),eN=(t,e)=>{const r=e.byteLength,n=sH(t),i=n+sH(r),a=new Uint8Array(i+r);return aH(t,a,0),aH(r,a,n),a.set(e,i),new S3e(t,r,e,a)};let S3e=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}};const wZ=({name:t,code:e,encode:r})=>new I3e(t,e,r);let I3e=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?eN(this.code,r):r.then(n=>eN(this.code,n))}else throw Error("Unknown type, must be binary type")}};const _Z=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),O3e=wZ({name:"sha2-256",code:18,encode:_Z("SHA-256")}),P3e=wZ({name:"sha2-512",code:19,encode:_Z("SHA-512")});var T3e=Object.freeze({__proto__:null,sha256:O3e,sha512:P3e});const EZ=0,C3e="identity",xZ=gZ,R3e=t=>eN(EZ,xZ(t)),N3e={code:EZ,name:C3e,encode:xZ,digest:R3e};var D3e=Object.freeze({__proto__:null,identity:N3e});new TextEncoder,new TextDecoder;const oH={...SOe,...OOe,...TOe,...ROe,...MOe,...zOe,...KOe,...YOe,...t3e,...o3e};({...T3e,...D3e});function AZ(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function M3e(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?AZ(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function SZ(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const cH=SZ("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),UT=SZ("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=M3e(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),$3e={utf8:cH,"utf-8":cH,hex:oH.base16,latin1:UT,ascii:UT,binary:UT,...oH};function k3e(t,e="utf8"){const r=$3e[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?AZ(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}const IZ="wc",L3e=2,W4="core",Tf=`${IZ}@2:${W4}:`,j3e={name:W4,logger:"error"},U3e={database:":memory:"},F3e="crypto",uH="client_ed25519_seed",B3e=Jt.ONE_DAY,q3e="keychain",H3e="0.3",z3e="messages",V3e="0.3",G3e=Jt.SIX_HOURS,K3e="publisher",OZ="irn",W3e="error",PZ="wss://relay.walletconnect.com",lH="wss://relay.walletconnect.org",Q3e="relayer",Oa={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},Y3e="_subscription",du={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},J3e=Jt.ONE_SECOND,X3e="2.10.4",Z3e=1e4,ePe="0.3",tPe="WALLETCONNECT_CLIENT_ID",Qo={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},rPe="subscription",nPe="0.3",iPe=Jt.FIVE_SECONDS*1e3,aPe="pairing",sPe="0.3",xy={wc_pairingDelete:{req:{ttl:Jt.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Jt.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Jt.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Jt.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Jt.ONE_DAY,prompt:!1,tag:0},res:{ttl:Jt.ONE_DAY,prompt:!1,tag:0}}},iv={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},Sc={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},oPe="history",cPe="0.3",uPe="expirer",ao={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},lPe="0.3",FT="verify-api",Qp="https://verify.walletconnect.com",tN="https://verify.walletconnect.org",fPe=[Qp,tN];let dPe=class{constructor(e,r){this.core=e,this.logger=r,this.keychain=new Map,this.name=q3e,this.version=H3e,this.initialized=!1,this.storagePrefix=Tf,this.init=async()=>{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()},this.get=n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:a}=Ot("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(a)}return i},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=e,this.logger=an.generateChildLogger(r,this.name)}get context(){return an.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,WX(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?QX(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}}},hPe=class{constructor(e,r,n){this.core=e,this.logger=r,this.name=F3e,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=i=>(this.isInitialized(),this.keychain.has(i)),this.getClientId=async()=>{this.isInitialized();const i=await this.getClientSeed(),a=Qq(i);return oZ(a.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=BAe();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const a=await this.getClientSeed(),s=Qq(a),o=J6();return await HIe(o,i,B3e,s)},this.generateSharedKey=(i,a,s)=>{this.isInitialized();const o=this.getPrivateKey(i),c=qAe(o,a);return this.setSymKey(c,s)},this.setSymKey=async(i,a)=>{this.isInitialized();const s=a||HAe(i);return await this.keychain.set(s,i),s},this.deleteKeyPair=async i=>{this.isInitialized(),await this.keychain.del(i)},this.deleteSymKey=async i=>{this.isInitialized(),await this.keychain.del(i)},this.encode=async(i,a,s)=>{this.isInitialized();const o=KX(s),c=hb(a);if(xq(o)){const m=o.senderPublicKey,y=o.receiverPublicKey;i=await this.generateSharedKey(m,y)}const u=this.getSymKey(i),{type:f,senderPublicKey:h}=o;return VAe({type:f,symKey:u,message:c,senderPublicKey:h})},this.decode=async(i,a,s)=>{this.isInitialized();const o=WAe(a,s);if(xq(o)){const c=o.receiverPublicKey,u=o.senderPublicKey;i=await this.generateSharedKey(c,u)}try{const c=this.getSymKey(i),u=GAe({symKey:c,encoded:a});return q4(u)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}},this.getPayloadType=i=>{const a=qE(i);return b1(a.type)},this.getPayloadSenderPublicKey=i=>{const a=qE(i);return a.senderPublicKey?Ya(a.senderPublicKey,Qa):void 0},this.core=e,this.logger=an.generateChildLogger(r,this.name),this.keychain=n||new dPe(this.core,this.logger)}get context(){return an.getLoggerContext(this.logger)}async setPrivateKey(e,r){return await this.keychain.set(e,r),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(uH)}catch{e=J6(),await this.keychain.set(uH,e)}return k3e(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}}},pPe=class extends bIe{constructor(e,r){super(e,r),this.logger=e,this.core=r,this.messages=new Map,this.name=z3e,this.version=V3e,this.initialized=!1,this.storagePrefix=Tf,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,i)=>{this.isInitialized();const a=m0(i);let s=this.messages.get(n);return typeof s>"u"&&(s={}),typeof s[a]<"u"||(s[a]=i,this.messages.set(n,s),await this.persist()),a},this.get=n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i},this.has=(n,i)=>{this.isInitialized();const a=this.get(n),s=m0(i);return typeof a[s]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=an.generateChildLogger(e,this.name),this.core=r}get context(){return an.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,WX(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?QX(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}}},gPe=class extends wIe{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.events=new Es.EventEmitter,this.name=K3e,this.queue=new Map,this.publishTimeout=Jt.toMiliseconds(Jt.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(n,i,a)=>{var s;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:a}});try{const o=(a==null?void 0:a.ttl)||G3e,c=X6(a),u=(a==null?void 0:a.prompt)||!1,f=(a==null?void 0:a.tag)||0,h=(a==null?void 0:a.id)||dZ().toString(),m={topic:n,message:i,opts:{ttl:o,relay:c,prompt:u,tag:f,id:h}},y=setTimeout(()=>this.queue.set(h,m),this.publishTimeout);try{await await db(this.rpcPublish(n,i,o,c,u,f,h),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(h),this.relayer.events.emit(Oa.publish,m)}catch(w){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,(s=a==null?void 0:a.internal)!=null&&s.throwOnFailedPublish)throw this.removeRequestFromQueue(h),w;return}finally{clearTimeout(y)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:a}})}catch(o){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(o),o}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.relayer=e,this.logger=an.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return an.getLoggerContext(this.logger)}rpcPublish(e,r,n,i,a,s,o){var c,u,f,h;const m={method:H_(i.protocol).publish,params:{topic:e,message:r,ttl:n,prompt:a,tag:s},id:o};return Ha((c=m.params)==null?void 0:c.prompt)&&((u=m.params)==null||delete u.prompt),Ha((f=m.params)==null?void 0:f.tag)&&((h=m.params)==null||delete h.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:m}),this.relayer.request(m)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:r,message:n,opts:i}=e;await this.publish(r,n,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(am.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Oa.connection_stalled);return}this.checkQueue()}),this.relayer.on(Oa.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}};class mPe{constructor(){this.map=new Map,this.set=(e,r)=>{const n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,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"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,r))return;const i=n.filter(a=>a!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var yPe=Object.defineProperty,vPe=Object.defineProperties,bPe=Object.getOwnPropertyDescriptors,fH=Object.getOwnPropertySymbols,wPe=Object.prototype.hasOwnProperty,_Pe=Object.prototype.propertyIsEnumerable,dH=(t,e,r)=>e in t?yPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ay=(t,e)=>{for(var r in e||(e={}))wPe.call(e,r)&&dH(t,r,e[r]);if(fH)for(var r of fH(e))_Pe.call(e,r)&&dH(t,r,e[r]);return t},BT=(t,e)=>vPe(t,bPe(e));let EPe=class extends xIe{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,this.subscriptions=new Map,this.topicMap=new mPe,this.events=new Es.EventEmitter,this.name=rPe,this.version=nPe,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Tf,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const a=X6(i),s={topic:n,relay:a};this.pending.set(n,s);const o=await this.rpcSubscribe(n,a);return this.onSubscribe(o,s),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}}),o}catch(a){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(a),a}},this.unsubscribe=async(n,i)=>{await this.restartToComplete(),this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((i,a)=>{const s=new Jt.Watch;s.start(this.pendingSubscriptionWatchLabel);const o=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(o),s.stop(this.pendingSubscriptionWatchLabel),i(!0)),s.elapsed(this.pendingSubscriptionWatchLabel)>=iPe&&(clearInterval(o),s.stop(this.pendingSubscriptionWatchLabel),a(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=an.generateChildLogger(r,this.name),this.clientId=""}get context(){return an.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 n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,r){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,r)))}async unsubscribeById(e,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}});try{const i=X6(n);await this.rpcUnsubscribe(e,r,i);const a=vi("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,a),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,r){const n={method:H_(r.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await db(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Oa.connection_stalled)}return m0(e+this.clientId)}async rpcBatchSubscribe(e){if(!e.length)return;const r=e[0].relay,n={method:H_(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await db(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Oa.connection_stalled)}}rpcUnsubscribe(e,r,n){const i={method:H_(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,BT(Ay({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,Ay({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(e,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.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,Ay({},r)),this.topicMap.set(r.topic,e),this.events.emit(Qo.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:n}=Ot("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Qo.deleted,BT(Ay({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Qo.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r<e;r++){const n=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(n)}}this.events.emit(Qo.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:r}=Ot("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){if(!e.length)return;const r=await this.rpcBatchSubscribe(e);Kc(r)&&this.onBatchSubscribe(r.map((n,i)=>BT(Ay({},e[i]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const e=[];this.pending.forEach(r=>{e.push(r)}),await this.batchSubscribe(e)}registerEventListeners(){this.relayer.core.heartbeat.on(am.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(Oa.connect,async()=>{await this.onConnect()}),this.relayer.on(Oa.disconnect,()=>{this.onDisconnect()}),this.events.on(Qo.created,async e=>{const r=Qo.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()}),this.events.on(Qo.deleted,async e=>{const r=Qo.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const r=setInterval(()=>{this.restartInProgress||(clearInterval(r),e())},this.pollingInterval)})}};var xPe=Object.defineProperty,hH=Object.getOwnPropertySymbols,APe=Object.prototype.hasOwnProperty,SPe=Object.prototype.propertyIsEnumerable,pH=(t,e,r)=>e in t?xPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,IPe=(t,e)=>{for(var r in e||(e={}))APe.call(e,r)&&pH(t,r,e[r]);if(hH)for(var r of hH(e))SPe.call(e,r)&&pH(t,r,e[r]);return t};let OPe=class extends _Ie{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new Es.EventEmitter,this.name=Q3e,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.onPayloadHandler=r=>{this.onProviderPayload(r)},this.onConnectHandler=()=>{this.events.emit(Oa.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=r=>{this.logger.error(r),this.events.emit(Oa.error,r),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(du.payload,this.onPayloadHandler),this.provider.on(du.connect,this.onConnectHandler),this.provider.on(du.disconnect,this.onDisconnectHandler),this.provider.on(du.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?an.generateChildLogger(e.logger,this.name):an.pino(an.getDefaultLoggerOptions({level:e.logger||W3e})),this.messages=new pPe(this.logger,e.core),this.subscriber=new EPe(this,this.logger),this.publisher=new gPe(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||PZ,this.projectId=e.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${lH}...`),await this.restartTransport(lH)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},Z3e)}get context(){return an.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(e,r,n){this.isInitialized(),await this.publisher.publish(e,r,n),await this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now()})}async subscribe(e,r){var n;this.isInitialized();let i=((n=this.subscriber.topicMap.get(e))==null?void 0:n[0])||"";if(i)return i;let a;const s=o=>{o.topic===e&&(this.subscriber.off(Qo.created,s),a())};return await Promise.all([new Promise(o=>{a=o,this.subscriber.on(Qo.created,s)}),new Promise(async o=>{i=await this.subscriber.subscribe(e,r),o()})]),i}async unsubscribe(e,r){this.isInitialized(),await this.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)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await db(this.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(e){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(r=>{if(!this.initialized)return r();this.subscriber.once(Qo.resubscribed,()=>{r()})}),new Promise(async(r,n)=>{try{await db(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(i){n(i);return}r()})])}catch(r){this.logger.error(r);const n=r;if(!this.isConnectionStalled(n.message))throw r;this.provider.events.emit(du.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(e){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await Dq())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(e){return this.staleConnectionErrors.some(r=>e.includes(r))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new fl(new lOe(aSe({sdkVersion:X3e,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:r,message:n}=e;await this.messages.set(r,n)}async shouldIgnoreMessageEvent(e){const{topic:r,message:n}=e;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(r))return this.logger.debug(`Ignoring message for non-subscribed topic ${r}`),!0;const i=this.messages.has(r,n);return i&&this.logger.debug(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),K4(e)){if(!e.method.endsWith(Y3e))return;const r=e.params,{topic:n,message:i,publishedAt:a}=r.data,s={topic:n,message:i,publishedAt:a};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(IPe({type:"event",event:r.id},s)),this.events.emit(r.id,s),await this.acknowledgePayload(e),await this.onMessageEvent(s)}else z2(e)&&this.events.emit(Oa.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(Oa.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const r=G4(e.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(du.payload,this.onPayloadHandler),this.provider.off(du.connect,this.onConnectHandler),this.provider.off(du.disconnect,this.onDisconnectHandler),this.provider.off(du.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Oa.connection_stalled,()=>{this.restartTransport().catch(r=>this.logger.error(r))});let e=await Dq();JSe(async r=>{this.initialized&&e!==r&&(e=r,r?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(n=>this.logger.error(n))))})}onProviderDisconnect(){this.events.emit(Oa.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(async()=>{await this.restartTransport().catch(e=>this.logger.error(e))},Jt.toMiliseconds(J3e)))}isInitialized(){if(!this.initialized){const{message:e}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(e=>{const r=setInterval(()=>{this.connected&&(clearInterval(r),e())},this.connectionStatusPollingInterval)});await this.restartTransport()}}};var PPe=Object.defineProperty,gH=Object.getOwnPropertySymbols,TPe=Object.prototype.hasOwnProperty,CPe=Object.prototype.propertyIsEnumerable,mH=(t,e,r)=>e in t?PPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yH=(t,e)=>{for(var r in e||(e={}))TPe.call(e,r)&&mH(t,r,e[r]);if(gH)for(var r of gH(e))CPe.call(e,r)&&mH(t,r,e[r]);return t};let G2=class extends EIe{constructor(e,r,n,i=Tf,a=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,this.map=new Map,this.version=ePe,this.cached=[],this.initialized=!1,this.storagePrefix=Tf,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(s=>{this.getKey&&s!==null&&!Ha(s)?this.map.set(this.getKey(s),s):PSe(s)?this.map.set(s.id,s):TSe(s)&&this.map.set(s.topic,s)}),this.cached=[],this.initialized=!0)},this.set=async(s,o)=>{this.isInitialized(),this.map.has(s)?await this.update(s,o):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:s,value:o}),this.map.set(s,o),await this.persist())},this.get=s=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:s}),this.getData(s)),this.getAll=s=>(this.isInitialized(),s?this.values.filter(o=>Object.keys(s).every(c=>dOe(o[c],s[c]))):this.values),this.update=async(s,o)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:s,update:o});const c=yH(yH({},this.getData(s)),o);this.map.set(s,c),await this.persist()},this.delete=async(s,o)=>{this.isInitialized(),this.map.has(s)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:s,reason:o}),this.map.delete(s),await this.persist())},this.logger=an.generateChildLogger(r,this.name),this.storagePrefix=i,this.getKey=a}get context(){return an.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())}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const r=this.map.get(e);if(!r){const{message:n}=Ot("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:r}=Ot("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}}},RPe=class{constructor(e,r){this.core=e,this.logger=r,this.name=aPe,this.version=sPe,this.events=new d4,this.initialized=!1,this.storagePrefix=Tf,this.ignoredPayloadTypes=[Fh],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=J6(),i=await this.core.crypto.setSymKey(n),a=rc(Jt.FIVE_MINUTES),s={protocol:OZ},o={topic:i,expiry:a,relay:s,active:!1},c=vSe({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:n,relay:s});return await this.pairings.set(i,o),await this.core.relayer.subscribe(i),this.core.expirer.set(i,a),{topic:i,uri:c}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:i,symKey:a,relay:s}=gSe(n.uri);let o;if(this.pairings.keys.includes(i)&&(o=this.pairings.get(i),o.active))throw new Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);this.core.crypto.keychain.has(i)||(await this.core.crypto.setSymKey(a,i),await this.core.relayer.subscribe(i,{relay:s}));const c=rc(Jt.FIVE_MINUTES),u={topic:i,relay:s,expiry:c,active:!1};return await this.pairings.set(i,u),this.core.expirer.set(i,c),n.activatePairing&&await this.activate({topic:i}),this.events.emit(iv.create,u),u},this.activate=async({topic:n})=>{this.isInitialized();const i=rc(Jt.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:i}),this.core.expirer.set(n,i)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:i}=n;if(this.pairings.keys.includes(i)){const a=await this.sendRequest(i,"wc_pairingPing",{}),{done:s,resolve:o,reject:c}=$p();this.events.once(Si("pairing_ping",a),({error:u})=>{u?c(u):o()}),await s()}},this.updateExpiry=async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})},this.updateMetadata=async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",vi("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(n,i,a)=>{const s=v0(i,a),o=await this.core.crypto.encode(n,s),c=xy[i].req;return this.core.history.set(n,s),this.core.relayer.publish(n,o,c),s.id},this.sendResult=async(n,i,a)=>{const s=G4(n,a),o=await this.core.crypto.encode(i,s),c=await this.core.history.get(i,n),u=xy[c.request.method].res;await this.core.relayer.publish(i,o,u),await this.core.history.resolve(s)},this.sendError=async(n,i,a)=>{const s=H2(n,a),o=await this.core.crypto.encode(i,s),c=await this.core.history.get(i,n),u=xy[c.request.method]?xy[c.request.method].res:xy.unregistered_method.res;await this.core.relayer.publish(i,o,u),await this.core.history.resolve(s)},this.deletePairing=async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,vi("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(i=>jl(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=n=>{const{topic:i,payload:a}=n;switch(a.method){case"wc_pairingPing":return this.onPairingPingRequest(i,a);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,a);default:return this.onUnknownRpcMethodRequest(i,a)}},this.onRelayEventResponse=async n=>{const{topic:i,payload:a}=n,s=(await this.core.history.get(i,a.id)).request.method;switch(s){case"wc_pairingPing":return this.onPairingPingResponse(i,a);default:return this.onUnknownRpcMethodResponse(s)}},this.onPairingPingRequest=async(n,i)=>{const{id:a}=i;try{this.isValidPing({topic:n}),await this.sendResult(a,n,!0),this.events.emit(iv.ping,{id:a,topic:n})}catch(s){await this.sendError(a,n,s),this.logger.error(s)}},this.onPairingPingResponse=(n,i)=>{const{id:a}=i;setTimeout(()=>{_u(i)?this.events.emit(Si("pairing_ping",a),{}):nc(i)&&this.events.emit(Si("pairing_ping",a),{error:i.error})},500)},this.onPairingDeleteRequest=async(n,i)=>{const{id:a}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(iv.delete,{id:a,topic:n})}catch(s){await this.sendError(a,n,s),this.logger.error(s)}},this.onUnknownRpcMethodRequest=async(n,i)=>{const{id:a,method:s}=i;try{if(this.registeredMethods.includes(s))return;const o=vi("WC_METHOD_UNSUPPORTED",s);await this.sendError(a,n,o),this.logger.error(o)}catch(o){await this.sendError(a,n,o),this.logger.error(o)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(vi("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!ss(n)){const{message:i}=Ot("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(i)}if(!OSe(n.uri)){const{message:i}=Ot("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(i)}},this.isValidPing=async n=>{if(!ss(n)){const{message:a}=Ot("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(a)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidDisconnect=async n=>{if(!ss(n)){const{message:a}=Ot("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(a)}const{topic:i}=n;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async n=>{if(!Bi(n,!1)){const{message:i}=Ot("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=Ot("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(jl(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=Ot("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}},this.core=e,this.logger=an.generateChildLogger(r,this.name),this.pairings=new G2(this.core,this.logger,this.name,this.storagePrefix)}get context(){return an.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Oa.message,async e=>{const{topic:r,message:n}=e;if(!this.pairings.keys.includes(r)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const i=await this.core.crypto.decode(r,n);try{K4(i)?(this.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):z2(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:r,payload:i}),this.core.history.delete(r,i.id))}catch(a){this.logger.error(a)}})}registerExpirerEvents(){this.core.expirer.on(ao.expired,async e=>{const{topic:r}=JX(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(iv.expire,{topic:r}))})}},NPe=class extends vIe{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.records=new Map,this.events=new Es.EventEmitter,this.name=oPe,this.version=cPe,this.cached=[],this.initialized=!1,this.storagePrefix=Tf,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,i,a)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:a}),this.records.has(i.id))return;const s={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:a,expiry:rc(Jt.THIRTY_DAYS)};this.records.set(s.id,s),this.events.emit(Sc.created,s)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=nc(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.events.emit(Sc.updated,i))},this.get=async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i)),this.delete=(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(a=>{if(a.topic===n){if(typeof i<"u"&&a.id!==i)return;this.records.delete(a.id),this.events.emit(Sc.deleted,a)}})},this.exists=async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1),this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=an.generateChildLogger(r,this.name)}get context(){return an.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 n={topic:r.topic,request:v0(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const r=this.records.get(e);if(!r){const{message:n}=Ot("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Sc.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:r}=Ot("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Sc.created,e=>{const r=Sc.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(Sc.updated,e=>{const r=Sc.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.events.on(Sc.deleted,e=>{const r=Sc.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e}),this.persist()}),this.core.heartbeat.on(am.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{Jt.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}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}}},DPe=class extends AIe{constructor(e,r){super(e,r),this.core=e,this.logger=r,this.expirations=new Map,this.events=new Es.EventEmitter,this.name=uPe,this.version=lPe,this.cached=[],this.initialized=!1,this.storagePrefix=Tf,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(n,i)=>{this.isInitialized();const a=this.formatTarget(n),s={target:a,expiry:i};this.expirations.set(a,s),this.checkExpiry(a,s),this.events.emit(ao.created,{target:a,expiration:s})},this.get=n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)},this.del=n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),a=this.getExpiration(i);this.expirations.delete(i),this.events.emit(ao.deleted,{target:i,expiration:a})}},this.on=(n,i)=>{this.events.on(n,i)},this.once=(n,i)=>{this.events.once(n,i)},this.off=(n,i)=>{this.events.off(n,i)},this.removeListener=(n,i)=>{this.events.removeListener(n,i)},this.logger=an.generateChildLogger(r,this.name)}get context(){return an.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(typeof e=="string")return sSe(e);if(typeof e=="number")return oSe(e);const{message:r}=Ot("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(ao.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:r}=Ot("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:n}=Ot("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(e,r){const{expiry:n}=r;Jt.toMiliseconds(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(ao.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(am.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(ao.created,e=>{const r=ao.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(ao.expired,e=>{const r=ao.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(ao.deleted,e=>{const r=ao.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}}},MPe=class extends SIe{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,this.name=FT,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async n=>{if(this.verifyDisabled||w1()||!_1())return;const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{await this.createIframe()}catch(a){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(a)}if(!this.initialized){this.removeIframe(),this.verifyUrl=tN;try{await this.createIframe()}catch(a){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(a),this.verifyDisabled=!0}}},this.register=async n=>{this.initialized?this.sendPost(n.attestationId):(this.addToQueue(n.attestationId),await this.init())},this.resolve=async n=>{if(this.isDevEnv)return"";const i=this.getVerifyUrl(n==null?void 0:n.verifyUrl);let a;try{a=await this.fetchAttestation(n.attestationId,i)}catch(s){this.logger.info(`failed to resolve attestation: ${n.attestationId} from url: ${i}`),this.logger.info(s),a=await this.fetchAttestation(n.attestationId,tN)}return a},this.fetchAttestation=async(n,i)=>{this.logger.info(`resolving attestation: ${n} from url: ${i}`);const a=this.startAbortTimer(Jt.ONE_SECOND*2),s=await fetch(`${i}/attestation/${n}`,{signal:this.abortController.signal});return clearTimeout(a),s.status===200?await s.json():void 0},this.addToQueue=n=>{this.queue.push(n)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(n=>this.sendPost(n)),this.queue=[])},this.sendPost=n=>{var i;try{if(!this.iframe)return;(i=this.iframe.contentWindow)==null||i.postMessage(n,"*"),this.logger.info(`postMessage sent: ${n} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let n;const i=a=>{a.data==="verify_ready"&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",i),n())};await Promise.race([new Promise(a=>{if(document.getElementById(FT))return a();window.addEventListener("message",i);const s=document.createElement("iframe");s.id=FT,s.src=`${this.verifyUrl}/${this.projectId}`,s.style.display="none",document.body.append(s),this.iframe=s,n=a}),new Promise((a,s)=>setTimeout(()=>{window.removeEventListener("message",i),s("verify iframe load timeout")},Jt.toMiliseconds(Jt.FIVE_SECONDS)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=n=>{let i=n||Qp;return fPe.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${Qp}`),i=Qp),i},this.logger=an.generateChildLogger(r,this.name),this.verifyUrl=Qp,this.abortController=new AbortController,this.isDevEnv=U4()&&{}.IS_VITEST}get context(){return an.getLoggerContext(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),Jt.toMiliseconds(e))}};var $Pe=Object.defineProperty,vH=Object.getOwnPropertySymbols,kPe=Object.prototype.hasOwnProperty,LPe=Object.prototype.propertyIsEnumerable,bH=(t,e,r)=>e in t?$Pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,wH=(t,e)=>{for(var r in e||(e={}))kPe.call(e,r)&&bH(t,r,e[r]);if(vH)for(var r of vH(e))LPe.call(e,r)&&bH(t,r,e[r]);return t};let jPe=class TZ extends yIe{constructor(e){super(e),this.protocol=IZ,this.version=L3e,this.name=W4,this.events=new Es.EventEmitter,this.initialized=!1,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||PZ,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const r=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:an.pino(an.getDefaultLoggerOptions({level:(e==null?void 0:e.logger)||j3e.logger}));this.logger=an.generateChildLogger(r,this.name),this.heartbeat=new am.HeartBeat,this.crypto=new hPe(this,this.logger,e==null?void 0:e.keychain),this.history=new NPe(this,this.logger),this.expirer=new DPe(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new cIe(wH(wH({},U3e),e==null?void 0:e.storageOptions)),this.relayer=new OPe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new RPe(this,this.logger),this.verify=new MPe(this.projectId||"",this.logger)}static async init(e){const r=new TZ(e);await r.initialize();const n=await r.crypto.getClientId();return await r.storage.setItem(tPe,n),r}get context(){return an.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}};const UPe=jPe,CZ="wc",RZ=2,NZ="client",Q4=`${CZ}@${RZ}:${NZ}:`,qT={name:NZ,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},_H="WALLETCONNECT_DEEPLINK_CHOICE",FPe="proposal",DZ="Proposal expired",BPe="session",Yw=Jt.SEVEN_DAYS,qPe="engine",Sy={wc_sessionPropose:{req:{ttl:Jt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Jt.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Jt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Jt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Jt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Jt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Jt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Jt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Jt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Jt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Jt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Jt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Jt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Jt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Jt.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Jt.THIRTY_SECONDS,prompt:!1,tag:1115}}},HT={min:Jt.FIVE_MINUTES,max:Jt.SEVEN_DAYS},hu={idle:"IDLE",active:"ACTIVE"},HPe="request",zPe=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var VPe=Object.defineProperty,GPe=Object.defineProperties,KPe=Object.getOwnPropertyDescriptors,EH=Object.getOwnPropertySymbols,WPe=Object.prototype.hasOwnProperty,QPe=Object.prototype.propertyIsEnumerable,xH=(t,e,r)=>e in t?VPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,as=(t,e)=>{for(var r in e||(e={}))WPe.call(e,r)&&xH(t,r,e[r]);if(EH)for(var r of EH(e))QPe.call(e,r)&&xH(t,r,e[r]);return t},Iy=(t,e)=>GPe(t,KPe(e));class YPe extends OIe{constructor(e){super(e),this.name=qPe,this.events=new d4,this.initialized=!1,this.ignoredPayloadTypes=[Fh],this.requestQueue={state:hu.idle,queue:[]},this.sessionRequestQueue={state:hu.idle,queue:[]},this.requestQueueDelay=Jt.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Sy)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},Jt.toMiliseconds(this.requestQueueDelay)))},this.connect=async r=>{await this.isInitialized();const n=Iy(as({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:i,requiredNamespaces:a,optionalNamespaces:s,sessionProperties:o,relays:c}=n;let u=i,f,h=!1;if(u&&(h=this.client.core.pairing.pairings.get(u).active),!u||!h){const{topic:S,uri:A}=await this.client.core.pairing.create();u=S,f=A}const m=await this.client.core.crypto.generateKeyPair(),y=as({requiredNamespaces:a,optionalNamespaces:s,relays:c??[{protocol:OZ}],proposer:{publicKey:m,metadata:this.client.metadata}},o&&{sessionProperties:o}),{reject:w,resolve:v,done:g}=$p(Jt.FIVE_MINUTES,DZ);if(this.events.once(Si("session_connect"),async({error:S,session:A})=>{if(S)w(S);else if(A){A.self.publicKey=m;const I=Iy(as({},A),{requiredNamespaces:A.requiredNamespaces,optionalNamespaces:A.optionalNamespaces});await this.client.session.set(A.topic,I),await this.setExpiry(A.topic,A.expiry),u&&await this.client.core.pairing.updateMetadata({topic:u,metadata:A.peer.metadata}),v(I)}}),!u){const{message:S}=Ot("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(S)}const _=await this.sendRequest({topic:u,method:"wc_sessionPropose",params:y}),b=rc(Jt.FIVE_MINUTES);return await this.setProposal(_,as({id:_,expiry:b},y)),{uri:f,approval:g}},this.pair=async r=>(await this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{await this.isInitialized(),await this.isValidApprove(r);const{id:n,relayProtocol:i,namespaces:a,sessionProperties:s}=r,o=this.client.proposal.get(n);let{pairingTopic:c,proposer:u,requiredNamespaces:f,optionalNamespaces:h}=o;c=c||"",y0(f)||(f=ESe(a,"approve()"));const m=await this.client.core.crypto.generateKeyPair(),y=u.publicKey,w=await this.client.core.crypto.generateSharedKey(m,y);c&&n&&(await this.client.core.pairing.updateMetadata({topic:c,metadata:u.metadata}),await this.sendResult({id:n,topic:c,result:{relay:{protocol:i??"irn"},responderPublicKey:m}}),await this.client.proposal.delete(n,vi("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:c}));const v=as({relay:{protocol:i??"irn"},namespaces:a,requiredNamespaces:f,optionalNamespaces:h,pairingTopic:c,controller:{publicKey:m,metadata:this.client.metadata},expiry:rc(Yw)},s&&{sessionProperties:s});await this.client.core.relayer.subscribe(w),await this.sendRequest({topic:w,method:"wc_sessionSettle",params:v,throwOnFailedPublish:!0});const g=Iy(as({},v),{topic:w,pairingTopic:c,acknowledged:!1,self:v.controller,peer:{publicKey:u.publicKey,metadata:u.metadata},controller:m});return await this.client.session.set(w,g),await this.setExpiry(w,rc(Yw)),{topic:w,acknowledged:()=>new Promise(_=>setTimeout(()=>_(this.client.session.get(w)),500))}},this.reject=async r=>{await this.isInitialized(),await this.isValidReject(r);const{id:n,reason:i}=r,{pairingTopic:a}=this.client.proposal.get(n);a&&(await this.sendError(n,a,i),await this.client.proposal.delete(n,vi("USER_DISCONNECTED")))},this.update=async r=>{await this.isInitialized(),await this.isValidUpdate(r);const{topic:n,namespaces:i}=r,a=await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i}}),{done:s,resolve:o,reject:c}=$p();return this.events.once(Si("session_update",a),({error:u})=>{u?c(u):o()}),await this.client.session.update(n,{namespaces:i}),{acknowledged:s}},this.extend=async r=>{await this.isInitialized(),await this.isValidExtend(r);const{topic:n}=r,i=await this.sendRequest({topic:n,method:"wc_sessionExtend",params:{}}),{done:a,resolve:s,reject:o}=$p();return this.events.once(Si("session_extend",i),({error:c})=>{c?o(c):s()}),await this.setExpiry(n,rc(Yw)),{acknowledged:a}},this.request=async r=>{await this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:i,topic:a,expiry:s}=r,o=V4(),{done:c,resolve:u,reject:f}=$p(s,"Request expired. Please try again.");return this.events.once(Si("session_request",o),({error:h,result:m})=>{h?f(h):u(m)}),await Promise.all([new Promise(async h=>{await this.sendRequest({clientRpcId:o,topic:a,method:"wc_sessionRequest",params:{request:i,chainId:n},expiry:s,throwOnFailedPublish:!0}).catch(m=>f(m)),this.client.events.emit("session_request_sent",{topic:a,request:i,chainId:n,id:o}),h()}),new Promise(async h=>{const m=await this.client.core.storage.getItem(_H);cSe({id:o,topic:a,wcDeepLink:m}),h()}),c()]).then(h=>h[2])},this.respond=async r=>{await this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:i}=r,{id:a}=i;_u(i)?await this.sendResult({id:a,topic:n,result:i.result,throwOnFailedPublish:!0}):nc(i)&&await this.sendError(a,n,i.error),this.cleanupAfterResponse(r)},this.ping=async r=>{await this.isInitialized(),await this.isValidPing(r);const{topic:n}=r;if(this.client.session.keys.includes(n)){const i=await this.sendRequest({topic:n,method:"wc_sessionPing",params:{}}),{done:a,resolve:s,reject:o}=$p();this.events.once(Si("session_ping",i),({error:c})=>{c?o(c):s()}),await a()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{await this.isInitialized(),await this.isValidEmit(r);const{topic:n,event:i,chainId:a}=r;await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:a}})},this.disconnect=async r=>{await this.isInitialized(),await this.isValidDisconnect(r);const{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest({topic:n,method:"wc_sessionDelete",params:vi("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>SSe(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async r=>{if(r.pairingTopic)try{const n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(a=>{var s,o;return((s=a.peerMetadata)==null?void 0:s.url)&&((o=a.peerMetadata)==null?void 0:o.url)===r.peer.metadata.url&&a.topic&&a.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(a=>this.client.core.pairing.disconnect({topic:a.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async(r,n)=>{const{self:i}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),this.client.session.delete(r,vi("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(i.publicKey)&&await this.client.core.crypto.deleteKeyPair(i.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),n||this.client.core.expirer.del(r),this.client.core.storage.removeItem(_H).catch(a=>this.client.logger.warn(a))},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,vi("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(a=>a.id!==r),i&&(this.sessionRequestQueue.state=hu.idle)},this.setExpiry=async(r,n)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:n}),this.client.core.expirer.set(r,n)},this.setProposal=async(r,n)=>{await this.client.proposal.set(r,n),this.client.core.expirer.set(r,n.expiry)},this.setPendingSessionRequest=async r=>{const n=Sy.wc_sessionRequest.req.ttl,{id:i,topic:a,params:s,verifyContext:o}=r;await this.client.pendingRequest.set(i,{id:i,topic:a,params:s,verifyContext:o}),n&&this.client.core.expirer.set(i,rc(n))},this.sendRequest=async r=>{const{topic:n,method:i,params:a,expiry:s,relayRpcId:o,clientRpcId:c,throwOnFailedPublish:u}=r,f=v0(i,a,c);if(_1()&&zPe.includes(i)){const y=m0(JSON.stringify(f));this.client.core.verify.register({attestationId:y})}const h=await this.client.core.crypto.encode(n,f),m=Sy[i].req;return s&&(m.ttl=s),o&&(m.id=o),this.client.core.history.set(n,f),u?(m.internal=Iy(as({},m.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,h,m)):this.client.core.relayer.publish(n,h,m).catch(y=>this.client.logger.error(y)),f.id},this.sendResult=async r=>{const{id:n,topic:i,result:a,throwOnFailedPublish:s}=r,o=G4(n,a),c=await this.client.core.crypto.encode(i,o),u=await this.client.core.history.get(i,n),f=Sy[u.request.method].res;s?(f.internal=Iy(as({},f.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,c,f)):this.client.core.relayer.publish(i,c,f).catch(h=>this.client.logger.error(h)),await this.client.core.history.resolve(o)},this.sendError=async(r,n,i)=>{const a=H2(r,i),s=await this.client.core.crypto.encode(n,a),o=await this.client.core.history.get(n,r),c=Sy[o.request.method].res;this.client.core.relayer.publish(n,s,c),await this.client.core.history.resolve(a)},this.cleanup=async()=>{const r=[],n=[];this.client.session.getAll().forEach(i=>{jl(i.expiry)&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{jl(i.expiry)&&n.push(i.id)}),await Promise.all([...r.map(i=>this.deleteSession(i)),...n.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=async r=>{this.requestQueue.queue.push(r),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===hu.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=hu.active;const r=this.requestQueue.queue.shift();if(r)try{this.processRequest(r),await new Promise(n=>setTimeout(n,300))}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=hu.idle},this.processRequest=r=>{const{topic:n,payload:i}=r,a=i.method;switch(a){case"wc_sessionPropose":return this.onSessionProposeRequest(n,i);case"wc_sessionSettle":return this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return this.onSessionExtendRequest(n,i);case"wc_sessionPing":return this.onSessionPingRequest(n,i);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return this.onSessionRequest(n,i);case"wc_sessionEvent":return this.onSessionEventRequest(n,i);default:return this.client.logger.info(`Unsupported request method ${a}`)}},this.onRelayEventResponse=async r=>{const{topic:n,payload:i}=r,a=(await this.client.core.history.get(n,i.id)).request.method;switch(a){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${a}`)}},this.onRelayEventUnknownPayload=r=>{const{topic:n}=r,{message:i}=Ot("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)},this.onSessionProposeRequest=async(r,n)=>{const{params:i,id:a}=n;try{this.isValidConnect(as({},n.params));const s=rc(Jt.FIVE_MINUTES),o=as({id:a,pairingTopic:r,expiry:s},i);await this.setProposal(a,o);const c=m0(JSON.stringify(n)),u=await this.getVerifyContext(c,o.proposer.metadata);this.client.events.emit("session_proposal",{id:a,params:o,verifyContext:u})}catch(s){await this.sendError(a,r,s),this.client.logger.error(s)}},this.onSessionProposeResponse=async(r,n)=>{const{id:i}=n;if(_u(n)){const{result:a}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:a});const s=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:s});const o=s.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:o});const c=a.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:c});const u=await this.client.core.crypto.generateSharedKey(o,c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:u});const f=await this.client.core.relayer.subscribe(u);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:f}),await this.client.core.pairing.activate({topic:r})}else nc(n)&&(await this.client.proposal.delete(i,vi("USER_DISCONNECTED")),this.events.emit(Si("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{const{id:i,params:a}=n;try{this.isValidSessionSettleRequest(a);const{relay:s,controller:o,expiry:c,namespaces:u,requiredNamespaces:f,optionalNamespaces:h,sessionProperties:m,pairingTopic:y}=n.params,w=as({topic:r,relay:s,expiry:c,namespaces:u,acknowledged:!0,pairingTopic:y,requiredNamespaces:f,optionalNamespaces:h,controller:o.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:o.publicKey,metadata:o.metadata}},m&&{sessionProperties:m});await this.sendResult({id:n.id,topic:r,result:!0}),this.events.emit(Si("session_connect"),{session:w}),this.cleanupDuplicatePairings(w)}catch(s){await this.sendError(i,r,s),this.client.logger.error(s)}},this.onSessionSettleResponse=async(r,n)=>{const{id:i}=n;_u(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(Si("session_approve",i),{})):nc(n)&&(await this.client.session.delete(r,vi("USER_DISCONNECTED")),this.events.emit(Si("session_approve",i),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:i,id:a}=n;try{const s=`${r}_session_update`,o=Qw.get(s);if(o&&this.isRequestOutOfSync(o,a)){this.client.logger.info(`Discarding out of sync request - ${a}`);return}this.isValidUpdate(as({topic:r},i)),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult({id:a,topic:r,result:!0}),this.client.events.emit("session_update",{id:a,topic:r,params:i}),Qw.set(s,a)}catch(s){await this.sendError(a,r,s),this.client.logger.error(s)}},this.isRequestOutOfSync=(r,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(r.toString().slice(0,-3)),this.onSessionUpdateResponse=(r,n)=>{const{id:i}=n;_u(n)?this.events.emit(Si("session_update",i),{}):nc(n)&&this.events.emit(Si("session_update",i),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,rc(Yw)),await this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_extend",{id:i,topic:r})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionExtendResponse=(r,n)=>{const{id:i}=n;_u(n)?this.events.emit(Si("session_extend",i),{}):nc(n)&&this.events.emit(Si("session_extend",i),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{const{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_ping",{id:i,topic:r})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionPingResponse=(r,n)=>{const{id:i}=n;setTimeout(()=>{_u(n)?this.events.emit(Si("session_ping",i),{}):nc(n)&&this.events.emit(Si("session_ping",i),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),await Promise.all([new Promise(a=>{this.client.core.relayer.once(Oa.publish,async()=>{a(await this.deleteSession(r))})}),this.sendResult({id:i,topic:r,result:!0})]),this.client.events.emit("session_delete",{id:i,topic:r})}catch(a){this.client.logger.error(a)}},this.onSessionRequest=async(r,n)=>{const{id:i,params:a}=n;try{this.isValidRequest(as({topic:r},a));const s=m0(JSON.stringify(v0("wc_sessionRequest",a,i))),o=this.client.session.get(r),c=await this.getVerifyContext(s,o.peer.metadata),u={id:i,topic:r,params:a,verifyContext:c};await this.setPendingSessionRequest(u),this.addSessionRequestToSessionRequestQueue(u),this.processSessionRequestQueue()}catch(s){await this.sendError(i,r,s),this.client.logger.error(s)}},this.onSessionRequestResponse=(r,n)=>{const{id:i}=n;_u(n)?this.events.emit(Si("session_request",i),{result:n.result}):nc(n)&&this.events.emit(Si("session_request",i),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{const{id:i,params:a}=n;try{const s=`${r}_session_event_${a.event.name}`,o=Qw.get(s);if(o&&this.isRequestOutOfSync(o,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(as({topic:r},a)),this.client.events.emit("session_event",{id:i,topic:r,params:a}),Qw.set(s,i)}catch(s){await this.sendError(i,r,s),this.client.logger.error(s)}},this.addSessionRequestToSessionRequestQueue=r=>{this.sessionRequestQueue.queue.push(r)},this.cleanupAfterResponse=r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=hu.idle,this.processSessionRequestQueue()},Jt.toMiliseconds(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===hu.active){this.client.logger.info("session request queue is already active.");return}const r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=hu.active,this.client.events.emit("session_request",r)}catch(n){this.client.logger.error(n)}},this.onPairingCreated=r=>{if(r.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===r.topic);n&&this.onSessionProposeRequest(r.topic,v0("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer},n.id))},this.isValidConnect=async r=>{if(!ss(r)){const{message:c}=Ot("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(c)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:a,sessionProperties:s,relays:o}=r;if(Ha(n)||await this.isValidPairingTopic(n),!LSe(o,!0)){const{message:c}=Ot("MISSING_OR_INVALID",`connect() relays: ${o}`);throw new Error(c)}!Ha(i)&&y0(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!Ha(a)&&y0(a)!==0&&this.validateNamespaces(a,"optionalNamespaces"),Ha(s)||this.validateSessionProps(s,"sessionProperties")},this.validateNamespaces=(r,n)=>{const i=kSe(r,"connect()",n);if(i)throw new Error(i.message)},this.isValidApprove=async r=>{if(!ss(r))throw new Error(Ot("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:i,relayProtocol:a,sessionProperties:s}=r;await this.isValidProposalId(n);const o=this.client.proposal.get(n),c=z_(i,"approve()");if(c)throw new Error(c.message);const u=Rq(o.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!Bi(a,!0)){const{message:f}=Ot("MISSING_OR_INVALID",`approve() relayProtocol: ${a}`);throw new Error(f)}Ha(s)||this.validateSessionProps(s,"sessionProperties")},this.isValidReject=async r=>{if(!ss(r)){const{message:a}=Ot("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(a)}const{id:n,reason:i}=r;if(await this.isValidProposalId(n),!USe(i)){const{message:a}=Ot("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidSessionSettleRequest=r=>{if(!ss(r)){const{message:u}=Ot("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(u)}const{relay:n,controller:i,namespaces:a,expiry:s}=r;if(!ZX(n)){const{message:u}=Ot("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(u)}const o=CSe(i,"onSessionSettleRequest()");if(o)throw new Error(o.message);const c=z_(a,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(jl(s)){const{message:u}=Ot("EXPIRED","onSessionSettleRequest()");throw new Error(u)}},this.isValidUpdate=async r=>{if(!ss(r)){const{message:c}=Ot("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(c)}const{topic:n,namespaces:i}=r;await this.isValidSessionTopic(n);const a=this.client.session.get(n),s=z_(i,"update()");if(s)throw new Error(s.message);const o=Rq(a.requiredNamespaces,i,"update()");if(o)throw new Error(o.message)},this.isValidExtend=async r=>{if(!ss(r)){const{message:i}=Ot("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionTopic(n)},this.isValidRequest=async r=>{if(!ss(r)){const{message:c}=Ot("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(c)}const{topic:n,request:i,chainId:a,expiry:s}=r;await this.isValidSessionTopic(n);const{namespaces:o}=this.client.session.get(n);if(!Cq(o,a)){const{message:c}=Ot("MISSING_OR_INVALID",`request() chainId: ${a}`);throw new Error(c)}if(!FSe(i)){const{message:c}=Ot("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!HSe(o,a,i.method)){const{message:c}=Ot("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(s&&!KSe(s,HT)){const{message:c}=Ot("MISSING_OR_INVALID",`request() expiry: ${s}. Expiry must be a number (in seconds) between ${HT.min} and ${HT.max}`);throw new Error(c)}},this.isValidRespond=async r=>{if(!ss(r)){const{message:a}=Ot("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(a)}const{topic:n,response:i}=r;if(await this.isValidSessionTopic(n),!BSe(i)){const{message:a}=Ot("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidPing=async r=>{if(!ss(r)){const{message:i}=Ot("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async r=>{if(!ss(r)){const{message:o}=Ot("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(o)}const{topic:n,event:i,chainId:a}=r;await this.isValidSessionTopic(n);const{namespaces:s}=this.client.session.get(n);if(!Cq(s,a)){const{message:o}=Ot("MISSING_OR_INVALID",`emit() chainId: ${a}`);throw new Error(o)}if(!qSe(i)){const{message:o}=Ot("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(o)}if(!zSe(s,a,i.name)){const{message:o}=Ot("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(o)}},this.isValidDisconnect=async r=>{if(!ss(r)){const{message:i}=Ot("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(i)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(r,n)=>{const i={verified:{verifyUrl:n.verifyUrl||Qp,validation:"UNKNOWN",origin:n.url||""}};try{const a=await this.client.core.verify.resolve({attestationId:r,verifyUrl:n.verifyUrl});a&&(i.verified.origin=a.origin,i.verified.isScam=a.isScam,i.verified.validation=a.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(a){this.client.logger.info(a)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(r,n)=>{Object.values(r).forEach(i=>{if(!Bi(i,!1)){const{message:a}=Ot("MISSING_OR_INVALID",`${n} must be in Record<string, string> format. Received: ${JSON.stringify(i)}`);throw new Error(a)}})}}async isInitialized(){if(!this.initialized){const{message:e}=Ot("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Oa.message,async e=>{const{topic:r,message:n}=e;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const i=await this.client.core.crypto.decode(r,n);try{K4(i)?(this.client.core.history.set(r,i),this.onRelayEventRequest({topic:r,payload:i})):z2(i)?(await this.client.core.history.resolve(i),await this.onRelayEventResponse({topic:r,payload:i}),this.client.core.history.delete(r,i.id)):this.onRelayEventUnknownPayload({topic:r,payload:i})}catch(a){this.client.logger.error(a)}})}registerExpirerEvents(){this.client.core.expirer.on(ao.expired,async e=>{const{topic:r,id:n}=JX(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Ot("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession(r,!0),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(iv.create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!Bi(e,!1)){const{message:r}=Ot("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}=Ot("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(jl(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=Ot("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!Bi(e,!1)){const{message:r}=Ot("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(r)}if(!this.client.session.keys.includes(e)){const{message:r}=Ot("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(r)}if(jl(this.client.session.get(e).expiry)){await this.deleteSession(e);const{message:r}=Ot("EXPIRED",`session topic: ${e}`);throw new Error(r)}}async isValidSessionOrPairingTopic(e){if(this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Bi(e,!1)){const{message:r}=Ot("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{const{message:r}=Ot("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}async isValidProposalId(e){if(!jSe(e)){const{message:r}=Ot("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){const{message:r}=Ot("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(jl(this.client.proposal.get(e).expiry)){await this.deleteProposal(e);const{message:r}=Ot("EXPIRED",`proposal id: ${e}`);throw new Error(r)}}}class JPe extends G2{constructor(e,r){super(e,r,FPe,Q4),this.core=e,this.logger=r}}class XPe extends G2{constructor(e,r){super(e,r,BPe,Q4),this.core=e,this.logger=r}}class ZPe extends G2{constructor(e,r){super(e,r,HPe,Q4,n=>n.id),this.core=e,this.logger=r}}let eTe=class MZ extends IIe{constructor(e){super(e),this.protocol=CZ,this.version=RZ,this.name=qT.name,this.events=new Es.EventEmitter,this.on=(n,i)=>this.events.on(n,i),this.once=(n,i)=>this.events.once(n,i),this.off=(n,i)=>this.events.off(n,i),this.removeListener=(n,i)=>this.events.removeListener(n,i),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}},this.update=async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}},this.request=async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}},this.find=n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(e==null?void 0:e.name)||qT.name,this.metadata=(e==null?void 0:e.metadata)||tSe();const r=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:an.pino(an.getDefaultLoggerOptions({level:(e==null?void 0:e.logger)||qT.logger}));this.core=(e==null?void 0:e.core)||new UPe(e),this.logger=an.generateChildLogger(r,this.name),this.session=new XPe(this.core,this.logger),this.proposal=new JPe(this.core,this.logger),this.pendingRequest=new ZPe(this.core,this.logger),this.engine=new YPe(this)}static async init(e){const r=new MZ(e);return await r.initialize(),r}get context(){return an.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}};var rN={exports:{}};(function(t,e){var r=typeof self<"u"?self:ke,n=function(){function a(){this.fetch=!1,this.DOMException=r.DOMException}return a.prototype=r,new a}();(function(a){(function(s){var o={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(U){return U&&DataView.prototype.isPrototypeOf(U)}if(o.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(U){return U&&u.indexOf(Object.prototype.toString.call(U))>-1};function h(U){if(typeof U!="string"&&(U=String(U)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(U))throw new TypeError("Invalid character in header field name");return U.toLowerCase()}function m(U){return typeof U!="string"&&(U=String(U)),U}function y(U){var L={next:function(){var Q=U.shift();return{done:Q===void 0,value:Q}}};return o.iterable&&(L[Symbol.iterator]=function(){return L}),L}function w(U){this.map={},U instanceof w?U.forEach(function(L,Q){this.append(Q,L)},this):Array.isArray(U)?U.forEach(function(L){this.append(L[0],L[1])},this):U&&Object.getOwnPropertyNames(U).forEach(function(L){this.append(L,U[L])},this)}w.prototype.append=function(U,L){U=h(U),L=m(L);var Q=this.map[U];this.map[U]=Q?Q+", "+L:L},w.prototype.delete=function(U){delete this.map[h(U)]},w.prototype.get=function(U){return U=h(U),this.has(U)?this.map[U]:null},w.prototype.has=function(U){return this.map.hasOwnProperty(h(U))},w.prototype.set=function(U,L){this.map[h(U)]=m(L)},w.prototype.forEach=function(U,L){for(var Q in this.map)this.map.hasOwnProperty(Q)&&U.call(L,this.map[Q],Q,this)},w.prototype.keys=function(){var U=[];return this.forEach(function(L,Q){U.push(Q)}),y(U)},w.prototype.values=function(){var U=[];return this.forEach(function(L){U.push(L)}),y(U)},w.prototype.entries=function(){var U=[];return this.forEach(function(L,Q){U.push([Q,L])}),y(U)},o.iterable&&(w.prototype[Symbol.iterator]=w.prototype.entries);function v(U){if(U.bodyUsed)return Promise.reject(new TypeError("Already read"));U.bodyUsed=!0}function g(U){return new Promise(function(L,Q){U.onload=function(){L(U.result)},U.onerror=function(){Q(U.error)}})}function _(U){var L=new FileReader,Q=g(L);return L.readAsArrayBuffer(U),Q}function b(U){var L=new FileReader,Q=g(L);return L.readAsText(U),Q}function S(U){for(var L=new Uint8Array(U),Q=new Array(L.length),ne=0;ne<L.length;ne++)Q[ne]=String.fromCharCode(L[ne]);return Q.join("")}function A(U){if(U.slice)return U.slice(0);var L=new Uint8Array(U.byteLength);return L.set(new Uint8Array(U)),L.buffer}function I(){return this.bodyUsed=!1,this._initBody=function(U){this._bodyInit=U,U?typeof U=="string"?this._bodyText=U:o.blob&&Blob.prototype.isPrototypeOf(U)?this._bodyBlob=U:o.formData&&FormData.prototype.isPrototypeOf(U)?this._bodyFormData=U:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(U)?this._bodyText=U.toString():o.arrayBuffer&&o.blob&&c(U)?(this._bodyArrayBuffer=A(U.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(U)||f(U))?this._bodyArrayBuffer=A(U):this._bodyText=U=Object.prototype.toString.call(U):this._bodyText="",this.headers.get("content-type")||(typeof U=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(U)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var U=v(this);if(U)return U;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?v(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var U=v(this);if(U)return U;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(S(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(N)}),this.json=function(){return this.text().then(JSON.parse)},this}var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function p(U){var L=U.toUpperCase();return E.indexOf(L)>-1?L:U}function O(U,L){L=L||{};var Q=L.body;if(U instanceof O){if(U.bodyUsed)throw new TypeError("Already read");this.url=U.url,this.credentials=U.credentials,L.headers||(this.headers=new w(U.headers)),this.method=U.method,this.mode=U.mode,this.signal=U.signal,!Q&&U._bodyInit!=null&&(Q=U._bodyInit,U.bodyUsed=!0)}else this.url=String(U);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new w(L.headers)),this.method=p(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Q)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Q)}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function N(U){var L=new FormData;return U.trim().split("&").forEach(function(Q){if(Q){var ne=Q.split("="),j=ne.shift().replace(/\+/g," "),B=ne.join("=").replace(/\+/g," ");L.append(decodeURIComponent(j),decodeURIComponent(B))}}),L}function F(U){var L=new w,Q=U.replace(/\r?\n[\t ]+/g," ");return Q.split(/\r?\n/).forEach(function(ne){var j=ne.split(":"),B=j.shift().trim();if(B){var H=j.join(":").trim();L.append(B,H)}}),L}I.call(O.prototype);function V(U,L){L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in L?L.statusText:"OK",this.headers=new w(L.headers),this.url=L.url||"",this._initBody(U)}I.call(V.prototype),V.prototype.clone=function(){return new V(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},V.error=function(){var U=new V(null,{status:0,statusText:""});return U.type="error",U};var de=[301,302,303,307,308];V.redirect=function(U,L){if(de.indexOf(L)===-1)throw new RangeError("Invalid status code");return new V(null,{status:L,headers:{location:U}})},s.DOMException=a.DOMException;try{new s.DOMException}catch{s.DOMException=function(L,Q){this.message=L,this.name=Q;var ne=Error(L);this.stack=ne.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function ve(U,L){return new Promise(function(Q,ne){var j=new O(U,L);if(j.signal&&j.signal.aborted)return ne(new s.DOMException("Aborted","AbortError"));var B=new XMLHttpRequest;function H(){B.abort()}B.onload=function(){var M={status:B.status,statusText:B.statusText,headers:F(B.getAllResponseHeaders()||"")};M.url="responseURL"in B?B.responseURL:M.headers.get("X-Request-URL");var q="response"in B?B.response:B.responseText;Q(new V(q,M))},B.onerror=function(){ne(new TypeError("Network request failed"))},B.ontimeout=function(){ne(new TypeError("Network request failed"))},B.onabort=function(){ne(new s.DOMException("Aborted","AbortError"))},B.open(j.method,j.url,!0),j.credentials==="include"?B.withCredentials=!0:j.credentials==="omit"&&(B.withCredentials=!1),"responseType"in B&&o.blob&&(B.responseType="blob"),j.headers.forEach(function(M,q){B.setRequestHeader(q,M)}),j.signal&&(j.signal.addEventListener("abort",H),B.onreadystatechange=function(){B.readyState===4&&j.signal.removeEventListener("abort",H)}),B.send(typeof j._bodyInit>"u"?null:j._bodyInit)})}return ve.polyfill=!0,a.fetch||(a.fetch=ve,a.Headers=w,a.Request=O,a.Response=V),s.Headers=w,s.Request=O,s.Response=V,s.fetch=ve,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(rN,rN.exports);var tTe=rN.exports;const AH=Df(tTe),rTe={Accept:"application/json","Content-Type":"application/json"},nTe="POST",SH={headers:rTe,method:nTe},IH=10;class Vf{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new Es.EventEmitter,this.isAvailable=!1,this.registering=!1,!Zq(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)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,r){this.isAvailable||await this.register();try{const n=hb(e),a=await(await AH(this.url,Object.assign(Object.assign({},SH),{body:n}))).json();this.onPayload({data:a})}catch(n){this.onError(e.id,n)}}async register(e=this.url){if(!Zq(e))throw new Error(`Provided URL is not compatible with HTTP 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((n,i)=>{this.events.once("register_error",a=>{this.resetMaxListeners(),i(a)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));n()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const r=hb({id:1,jsonrpc:"2.0",method:"test",params:[]});await AH(e,Object.assign(Object.assign({},SH),{body:r}))}this.onOpen()}catch(r){const n=this.parseError(r);throw this.events.emit("register_error",n),this.onClose(),n}}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=typeof e.data=="string"?q4(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const n=this.parseError(r),i=n.message||n.toString(),a=H2(e,i);this.events.emit("payload",a)}parseError(e,r=this.url){return lZ(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>IH&&this.events.setMaxListeners(IH)}}const OH="error",iTe="wss://relay.walletconnect.com",aTe="wc",sTe="universal_provider",PH=`${aTe}@2:${sTe}:`,oTe="https://rpc.walletconnect.com/v1/",dl={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Oy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},nN={exports:{}};/**
133
+ * @license
134
+ * Lodash <https://lodash.com/>
135
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
136
+ * Released under MIT license <https://lodash.com/license>
137
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
138
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
139
+ */(function(t,e){(function(){var r,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",o="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",h=1,m=2,y=4,w=1,v=2,g=1,_=2,b=4,S=8,A=16,I=32,E=64,p=128,O=256,N=512,F=30,V="...",de=800,ve=16,U=1,L=2,Q=3,ne=1/0,j=9007199254740991,B=17976931348623157e292,H=0/0,M=4294967295,q=M-1,k=M>>>1,$=[["ary",p],["bind",g],["bindKey",_],["curry",S],["curryRight",A],["flip",N],["partial",I],["partialRight",E],["rearg",O]],G="[object Arguments]",pe="[object Array]",Y="[object AsyncFunction]",te="[object Boolean]",ce="[object Date]",T="[object DOMException]",le="[object Error]",ze="[object Function]",et="[object GeneratorFunction]",yt="[object Map]",vt="[object Number]",gt="[object Null]",Ut="[object Object]",Xt="[object Promise]",Sr="[object Proxy]",Ct="[object RegExp]",Pt="[object Set]",kt="[object String]",Rt="[object Symbol]",Kt="[object Undefined]",Ft="[object WeakMap]",Gt="[object WeakSet]",Dt="[object ArrayBuffer]",Nt="[object DataView]",zt="[object Float32Array]",Mt="[object Float64Array]",cr="[object Int8Array]",tr="[object Int16Array]",ar="[object Int32Array]",nr="[object Uint8Array]",br="[object Uint8ClampedArray]",En="[object Uint16Array]",tn="[object Uint32Array]",li=/\b__p \+= '';/g,Mn=/\b(__p \+=) '' \+/g,$n=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Zn=/&(?:amp|lt|gt|quot|#39);/g,Tr=/[&<>"']/g,Ur=RegExp(Zn.source),Ir=RegExp(Tr.source),_e=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,ye=/<%=([\s\S]+?)%>/g,Re=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,He=/^\w*$/,Je=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ot=/[\\^$.*+?()[\]{}|]/g,dt=RegExp(ot.source),Et=/^\s+/,ue=/\s/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ge=/\{\n\/\* \[wrapped with (.+)\] \*/,Me=/,? & /,Le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wt=/[()=,{}\[\]\/\s]/,St=/\\(\\)?/g,hr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ur=/\w*$/,Jr=/^[-+]0x[0-9a-f]+$/i,pr=/^0b[01]+$/i,vr=/^\[object .+?Constructor\]$/,rn=/^0o[0-7]+$/i,sr=/^(?:0|[1-9]\d*)$/,$r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fn=/($^)/,kr=/['\n\r\u2028\u2029\\]/g,Kn="\\ud800-\\udfff",_i="\\u0300-\\u036f",Wn="\\ufe20-\\ufe2f",Ei="\\u20d0-\\u20ff",xi=_i+Wn+Ei,ei="\\u2700-\\u27bf",kn="a-z\\xdf-\\xf6\\xf8-\\xff",Gi="\\xac\\xb1\\xd7\\xf7",Oi="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fa="\\u2000-\\u206f",Hs=" \\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",X="A-Z\\xc0-\\xd6\\xd8-\\xde",me="\\ufe0e\\ufe0f",re=Gi+Oi+fa+Hs,Ee="['’]",be="["+Kn+"]",Ie="["+re+"]",Ye="["+xi+"]",ut="\\d+",We="["+ei+"]",Ve="["+kn+"]",ht="[^"+Kn+re+ut+ei+kn+X+"]",Ht="\\ud83c[\\udffb-\\udfff]",Or="(?:"+Ye+"|"+Ht+")",Vr="[^"+Kn+"]",Fr="(?:\\ud83c[\\udde6-\\uddff]){2}",gn="[\\ud800-\\udbff][\\udc00-\\udfff]",Br="["+X+"]",P="\\u200d",D="(?:"+Ve+"|"+ht+")",K="(?:"+Br+"|"+ht+")",he="(?:"+Ee+"(?:d|ll|m|re|s|t|ve))?",Se="(?:"+Ee+"(?:D|LL|M|RE|S|T|VE))?",Ce=Or+"?",tt="["+me+"]?",xt="(?:"+P+"(?:"+[Vr,Fr,gn].join("|")+")"+tt+Ce+")*",Lt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ai=tt+Ce+xt,yn="(?:"+[We,Fr,gn].join("|")+")"+Ai,At="(?:"+[Vr+Ye+"?",Ye,Fr,gn,be].join("|")+")",ti=RegExp(Ee,"g"),vn=RegExp(Ye,"g"),on=RegExp(Ht+"(?="+Ht+")|"+At+Ai,"g"),fi=RegExp([Br+"?"+Ve+"+"+he+"(?="+[Ie,Br,"$"].join("|")+")",K+"+"+Se+"(?="+[Ie,Br+D,"$"].join("|")+")",Br+"?"+D+"+"+he,Br+"+"+Se,Yt,Lt,ut,yn].join("|"),"g"),Xa=RegExp("["+P+Kn+xi+me+"]"),$i=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,di=["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"],Za=-1,Xr={};Xr[zt]=Xr[Mt]=Xr[cr]=Xr[tr]=Xr[ar]=Xr[nr]=Xr[br]=Xr[En]=Xr[tn]=!0,Xr[G]=Xr[pe]=Xr[Dt]=Xr[te]=Xr[Nt]=Xr[ce]=Xr[le]=Xr[ze]=Xr[yt]=Xr[vt]=Xr[Ut]=Xr[Ct]=Xr[Pt]=Xr[kt]=Xr[Ft]=!1;var wr={};wr[G]=wr[pe]=wr[Dt]=wr[Nt]=wr[te]=wr[ce]=wr[zt]=wr[Mt]=wr[cr]=wr[tr]=wr[ar]=wr[yt]=wr[vt]=wr[Ut]=wr[Ct]=wr[Pt]=wr[kt]=wr[Rt]=wr[nr]=wr[br]=wr[En]=wr[tn]=!0,wr[le]=wr[ze]=wr[Ft]=!1;var fe={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},$e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ge={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Kr=parseFloat,lr=parseInt,dn=typeof Oy=="object"&&Oy&&Oy.Object===Object&&Oy,ir=typeof self=="object"&&self&&self.Object===Object&&self,gr=dn||ir||Function("return this")(),ie=e&&!e.nodeType&&e,C=ie&&!0&&t&&!t.nodeType&&t,se=C&&C.exports===ie,we=se&&dn.process,oe=function(){try{var je=C&&C.require&&C.require("util").types;return je||we&&we.binding&&we.binding("util")}catch{}}(),Ae=oe&&oe.isArrayBuffer,Oe=oe&&oe.isDate,Pe=oe&&oe.isMap,Ue=oe&&oe.isRegExp,Ke=oe&&oe.isSet,qe=oe&&oe.isTypedArray;function pt(je,rt,Xe){switch(Xe.length){case 0:return je.call(rt);case 1:return je.call(rt,Xe[0]);case 2:return je.call(rt,Xe[0],Xe[1]);case 3:return je.call(rt,Xe[0],Xe[1],Xe[2])}return je.apply(rt,Xe)}function er(je,rt,Xe,$t){for(var Cr=-1,mn=je==null?0:je.length;++Cr<mn;){var Ci=je[Cr];rt($t,Ci,Xe(Ci),je)}return $t}function Vt(je,rt){for(var Xe=-1,$t=je==null?0:je.length;++Xe<$t&&rt(je[Xe],Xe,je)!==!1;);return je}function Wr(je,rt){for(var Xe=je==null?0:je.length;Xe--&&rt(je[Xe],Xe,je)!==!1;);return je}function xn(je,rt){for(var Xe=-1,$t=je==null?0:je.length;++Xe<$t;)if(!rt(je[Xe],Xe,je))return!1;return!0}function cn(je,rt){for(var Xe=-1,$t=je==null?0:je.length,Cr=0,mn=[];++Xe<$t;){var Ci=je[Xe];rt(Ci,Xe,je)&&(mn[Cr++]=Ci)}return mn}function Dr(je,rt){var Xe=je==null?0:je.length;return!!Xe&&$o(je,rt,0)>-1}function Qr(je,rt,Xe){for(var $t=-1,Cr=je==null?0:je.length;++$t<Cr;)if(Xe(rt,je[$t]))return!0;return!1}function _r(je,rt){for(var Xe=-1,$t=je==null?0:je.length,Cr=Array($t);++Xe<$t;)Cr[Xe]=rt(je[Xe],Xe,je);return Cr}function ki(je,rt){for(var Xe=-1,$t=rt.length,Cr=je.length;++Xe<$t;)je[Cr+Xe]=rt[Xe];return je}function zs(je,rt,Xe,$t){var Cr=-1,mn=je==null?0:je.length;for($t&&mn&&(Xe=je[++Cr]);++Cr<mn;)Xe=rt(Xe,je[Cr],Cr,je);return Xe}function mc(je,rt,Xe,$t){var Cr=je==null?0:je.length;for($t&&Cr&&(Xe=je[--Cr]);Cr--;)Xe=rt(Xe,je[Cr],Cr,je);return Xe}function Pi(je,rt){for(var Xe=-1,$t=je==null?0:je.length;++Xe<$t;)if(rt(je[Xe],Xe,je))return!0;return!1}var Vs=hl("length");function Ti(je){return je.split("")}function si(je){return je.match(Le)||[]}function bn(je,rt,Xe){var $t;return Xe(je,function(Cr,mn,Ci){if(rt(Cr,mn,Ci))return $t=mn,!1}),$t}function Xc(je,rt,Xe,$t){for(var Cr=je.length,mn=Xe+($t?1:-1);$t?mn--:++mn<Cr;)if(rt(je[mn],mn,je))return mn;return-1}function $o(je,rt,Xe){return rt===rt?tp(je,rt,Xe):Xc(je,Yf,Xe)}function zh(je,rt,Xe,$t){for(var Cr=Xe-1,mn=je.length;++Cr<mn;)if($t(je[Cr],rt))return Cr;return-1}function Yf(je){return je!==je}function Jf(je,rt){var Xe=je==null?0:je.length;return Xe?gl(je,rt)/Xe:H}function hl(je){return function(rt){return rt==null?r:rt[je]}}function pl(je){return function(rt){return je==null?r:je[rt]}}function Xf(je,rt,Xe,$t,Cr){return Cr(je,function(mn,Ci,Nn){Xe=$t?($t=!1,mn):rt(Xe,mn,Ci,Nn)}),Xe}function Vh(je,rt){var Xe=je.length;for(je.sort(rt);Xe--;)je[Xe]=je[Xe].value;return je}function gl(je,rt){for(var Xe,$t=-1,Cr=je.length;++$t<Cr;){var mn=rt(je[$t]);mn!==r&&(Xe=Xe===r?mn:Xe+mn)}return Xe}function ml(je,rt){for(var Xe=-1,$t=Array(je);++Xe<je;)$t[Xe]=rt(Xe);return $t}function Gh(je,rt){return _r(rt,function(Xe){return[Xe,je[Xe]]})}function Zf(je){return je&&je.slice(0,nd(je)+1).replace(Et,"")}function Li(je){return function(rt){return je(rt)}}function yl(je,rt){return _r(rt,function(Xe){return je[Xe]})}function yc(je,rt){return je.has(rt)}function ed(je,rt){for(var Xe=-1,$t=je.length;++Xe<$t&&$o(rt,je[Xe],0)>-1;);return Xe}function td(je,rt){for(var Xe=je.length;Xe--&&$o(rt,je[Xe],0)>-1;);return Xe}function Kh(je,rt){for(var Xe=je.length,$t=0;Xe--;)je[Xe]===rt&&++$t;return $t}var Wh=pl(fe),Qh=pl($e);function Yh(je){return"\\"+Ge[je]}function Jh(je,rt){return je==null?r:je[rt]}function ko(je){return Xa.test(je)}function Xh(je){return $i.test(je)}function Zh(je){for(var rt,Xe=[];!(rt=je.next()).done;)Xe.push(rt.value);return Xe}function vl(je){var rt=-1,Xe=Array(je.size);return je.forEach(function($t,Cr){Xe[++rt]=[Cr,$t]}),Xe}function rd(je,rt){return function(Xe){return je(rt(Xe))}}function xs(je,rt){for(var Xe=-1,$t=je.length,Cr=0,mn=[];++Xe<$t;){var Ci=je[Xe];(Ci===rt||Ci===f)&&(je[Xe]=f,mn[Cr++]=Xe)}return mn}function Zc(je){var rt=-1,Xe=Array(je.size);return je.forEach(function($t){Xe[++rt]=$t}),Xe}function ep(je){var rt=-1,Xe=Array(je.size);return je.forEach(function($t){Xe[++rt]=[$t,$t]}),Xe}function tp(je,rt,Xe){for(var $t=Xe-1,Cr=je.length;++$t<Cr;)if(je[$t]===rt)return $t;return-1}function rp(je,rt,Xe){for(var $t=Xe+1;$t--;)if(je[$t]===rt)return $t;return $t}function Lo(je){return ko(je)?ute(je):Vs(je)}function da(je){return ko(je)?lte(je):Ti(je)}function nd(je){for(var rt=je.length;rt--&&ue.test(je.charAt(rt)););return rt}var np=pl(nt);function ute(je){for(var rt=on.lastIndex=0;on.test(je);)++rt;return rt}function lte(je){return je.match(on)||[]}function fte(je){return je.match(fi)||[]}var dte=function je(rt){rt=rt==null?gr:ip.defaults(gr.Object(),rt,ip.pick(gr,di));var Xe=rt.Array,$t=rt.Date,Cr=rt.Error,mn=rt.Function,Ci=rt.Math,Nn=rt.Object,dA=rt.RegExp,hte=rt.String,Gs=rt.TypeError,R1=Xe.prototype,pte=mn.prototype,ap=Nn.prototype,N1=rt["__core-js_shared__"],D1=pte.toString,An=ap.hasOwnProperty,gte=0,MD=function(){var l=/[^.]+$/.exec(N1&&N1.keys&&N1.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),M1=ap.toString,mte=D1.call(Nn),yte=gr._,vte=dA("^"+D1.call(An).replace(ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$1=se?rt.Buffer:r,bl=rt.Symbol,k1=rt.Uint8Array,$D=$1?$1.allocUnsafe:r,L1=rd(Nn.getPrototypeOf,Nn),kD=Nn.create,LD=ap.propertyIsEnumerable,j1=R1.splice,jD=bl?bl.isConcatSpreadable:r,cm=bl?bl.iterator:r,id=bl?bl.toStringTag:r,U1=function(){try{var l=ud(Nn,"defineProperty");return l({},"",{}),l}catch{}}(),bte=rt.clearTimeout!==gr.clearTimeout&&rt.clearTimeout,wte=$t&&$t.now!==gr.Date.now&&$t.now,_te=rt.setTimeout!==gr.setTimeout&&rt.setTimeout,F1=Ci.ceil,B1=Ci.floor,hA=Nn.getOwnPropertySymbols,Ete=$1?$1.isBuffer:r,UD=rt.isFinite,xte=R1.join,Ate=rd(Nn.keys,Nn),Ri=Ci.max,ha=Ci.min,Ste=$t.now,Ite=rt.parseInt,FD=Ci.random,Ote=R1.reverse,pA=ud(rt,"DataView"),um=ud(rt,"Map"),gA=ud(rt,"Promise"),sp=ud(rt,"Set"),lm=ud(rt,"WeakMap"),fm=ud(Nn,"create"),q1=lm&&new lm,op={},Pte=ld(pA),Tte=ld(um),Cte=ld(gA),Rte=ld(sp),Nte=ld(lm),H1=bl?bl.prototype:r,dm=H1?H1.valueOf:r,BD=H1?H1.toString:r;function J(l){if(oi(l)&&!Nr(l)&&!(l instanceof Zr)){if(l instanceof Ks)return l;if(An.call(l,"__wrapped__"))return qM(l)}return new Ks(l)}var cp=function(){function l(){}return function(d){if(!ri(d))return{};if(kD)return kD(d);l.prototype=d;var x=new l;return l.prototype=r,x}}();function z1(){}function Ks(l,d){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!d,this.__index__=0,this.__values__=r}J.templateSettings={escape:_e,evaluate:ee,interpolate:ye,variable:"",imports:{_:J}},J.prototype=z1.prototype,J.prototype.constructor=J,Ks.prototype=cp(z1.prototype),Ks.prototype.constructor=Ks;function Zr(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=M,this.__views__=[]}function Dte(){var l=new Zr(this.__wrapped__);return l.__actions__=es(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=es(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=es(this.__views__),l}function Mte(){if(this.__filtered__){var l=new Zr(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function $te(){var l=this.__wrapped__.value(),d=this.__dir__,x=Nr(l),R=d<0,z=x?l.length:0,ae=Kre(0,z,this.__views__),xe=ae.start,De=ae.end,Fe=De-xe,at=R?De:xe-1,st=this.__iteratees__,lt=st.length,It=0,Wt=ha(Fe,this.__takeCount__);if(!x||!R&&z==Fe&&Wt==Fe)return fM(l,this.__actions__);var fr=[];e:for(;Fe--&&It<Wt;){at+=d;for(var qr=-1,dr=l[at];++qr<lt;){var Yr=st[qr],nn=Yr.iteratee,Is=Yr.type,$a=nn(dr);if(Is==L)dr=$a;else if(!$a){if(Is==U)continue e;break e}}fr[It++]=dr}return fr}Zr.prototype=cp(z1.prototype),Zr.prototype.constructor=Zr;function ad(l){var d=-1,x=l==null?0:l.length;for(this.clear();++d<x;){var R=l[d];this.set(R[0],R[1])}}function kte(){this.__data__=fm?fm(null):{},this.size=0}function Lte(l){var d=this.has(l)&&delete this.__data__[l];return this.size-=d?1:0,d}function jte(l){var d=this.__data__;if(fm){var x=d[l];return x===c?r:x}return An.call(d,l)?d[l]:r}function Ute(l){var d=this.__data__;return fm?d[l]!==r:An.call(d,l)}function Fte(l,d){var x=this.__data__;return this.size+=this.has(l)?0:1,x[l]=fm&&d===r?c:d,this}ad.prototype.clear=kte,ad.prototype.delete=Lte,ad.prototype.get=jte,ad.prototype.has=Ute,ad.prototype.set=Fte;function eu(l){var d=-1,x=l==null?0:l.length;for(this.clear();++d<x;){var R=l[d];this.set(R[0],R[1])}}function Bte(){this.__data__=[],this.size=0}function qte(l){var d=this.__data__,x=V1(d,l);if(x<0)return!1;var R=d.length-1;return x==R?d.pop():j1.call(d,x,1),--this.size,!0}function Hte(l){var d=this.__data__,x=V1(d,l);return x<0?r:d[x][1]}function zte(l){return V1(this.__data__,l)>-1}function Vte(l,d){var x=this.__data__,R=V1(x,l);return R<0?(++this.size,x.push([l,d])):x[R][1]=d,this}eu.prototype.clear=Bte,eu.prototype.delete=qte,eu.prototype.get=Hte,eu.prototype.has=zte,eu.prototype.set=Vte;function tu(l){var d=-1,x=l==null?0:l.length;for(this.clear();++d<x;){var R=l[d];this.set(R[0],R[1])}}function Gte(){this.size=0,this.__data__={hash:new ad,map:new(um||eu),string:new ad}}function Kte(l){var d=nw(this,l).delete(l);return this.size-=d?1:0,d}function Wte(l){return nw(this,l).get(l)}function Qte(l){return nw(this,l).has(l)}function Yte(l,d){var x=nw(this,l),R=x.size;return x.set(l,d),this.size+=x.size==R?0:1,this}tu.prototype.clear=Gte,tu.prototype.delete=Kte,tu.prototype.get=Wte,tu.prototype.has=Qte,tu.prototype.set=Yte;function sd(l){var d=-1,x=l==null?0:l.length;for(this.__data__=new tu;++d<x;)this.add(l[d])}function Jte(l){return this.__data__.set(l,c),this}function Xte(l){return this.__data__.has(l)}sd.prototype.add=sd.prototype.push=Jte,sd.prototype.has=Xte;function jo(l){var d=this.__data__=new eu(l);this.size=d.size}function Zte(){this.__data__=new eu,this.size=0}function ere(l){var d=this.__data__,x=d.delete(l);return this.size=d.size,x}function tre(l){return this.__data__.get(l)}function rre(l){return this.__data__.has(l)}function nre(l,d){var x=this.__data__;if(x instanceof eu){var R=x.__data__;if(!um||R.length<i-1)return R.push([l,d]),this.size=++x.size,this;x=this.__data__=new tu(R)}return x.set(l,d),this.size=x.size,this}jo.prototype.clear=Zte,jo.prototype.delete=ere,jo.prototype.get=tre,jo.prototype.has=rre,jo.prototype.set=nre;function qD(l,d){var x=Nr(l),R=!x&&fd(l),z=!x&&!R&&Al(l),ae=!x&&!R&&!z&&dp(l),xe=x||R||z||ae,De=xe?ml(l.length,hte):[],Fe=De.length;for(var at in l)(d||An.call(l,at))&&!(xe&&(at=="length"||z&&(at=="offset"||at=="parent")||ae&&(at=="buffer"||at=="byteLength"||at=="byteOffset")||au(at,Fe)))&&De.push(at);return De}function HD(l){var d=l.length;return d?l[IA(0,d-1)]:r}function ire(l,d){return iw(es(l),od(d,0,l.length))}function are(l){return iw(es(l))}function mA(l,d,x){(x!==r&&!Uo(l[d],x)||x===r&&!(d in l))&&ru(l,d,x)}function hm(l,d,x){var R=l[d];(!(An.call(l,d)&&Uo(R,x))||x===r&&!(d in l))&&ru(l,d,x)}function V1(l,d){for(var x=l.length;x--;)if(Uo(l[x][0],d))return x;return-1}function sre(l,d,x,R){return wl(l,function(z,ae,xe){d(R,z,x(z),xe)}),R}function zD(l,d){return l&&bc(d,ji(d),l)}function ore(l,d){return l&&bc(d,rs(d),l)}function ru(l,d,x){d=="__proto__"&&U1?U1(l,d,{configurable:!0,enumerable:!0,value:x,writable:!0}):l[d]=x}function yA(l,d){for(var x=-1,R=d.length,z=Xe(R),ae=l==null;++x<R;)z[x]=ae?r:JA(l,d[x]);return z}function od(l,d,x){return l===l&&(x!==r&&(l=l<=x?l:x),d!==r&&(l=l>=d?l:d)),l}function Ws(l,d,x,R,z,ae){var xe,De=d&h,Fe=d&m,at=d&y;if(x&&(xe=z?x(l,R,z,ae):x(l)),xe!==r)return xe;if(!ri(l))return l;var st=Nr(l);if(st){if(xe=Qre(l),!De)return es(l,xe)}else{var lt=pa(l),It=lt==ze||lt==et;if(Al(l))return pM(l,De);if(lt==Ut||lt==G||It&&!z){if(xe=Fe||It?{}:DM(l),!De)return Fe?jre(l,ore(xe,l)):Lre(l,zD(xe,l))}else{if(!wr[lt])return z?l:{};xe=Yre(l,lt,De)}}ae||(ae=new jo);var Wt=ae.get(l);if(Wt)return Wt;ae.set(l,xe),c$(l)?l.forEach(function(dr){xe.add(Ws(dr,d,x,dr,l,ae))}):s$(l)&&l.forEach(function(dr,Yr){xe.set(Yr,Ws(dr,d,x,Yr,l,ae))});var fr=at?Fe?LA:kA:Fe?rs:ji,qr=st?r:fr(l);return Vt(qr||l,function(dr,Yr){qr&&(Yr=dr,dr=l[Yr]),hm(xe,Yr,Ws(dr,d,x,Yr,l,ae))}),xe}function cre(l){var d=ji(l);return function(x){return VD(x,l,d)}}function VD(l,d,x){var R=x.length;if(l==null)return!R;for(l=Nn(l);R--;){var z=x[R],ae=d[z],xe=l[z];if(xe===r&&!(z in l)||!ae(xe))return!1}return!0}function GD(l,d,x){if(typeof l!="function")throw new Gs(s);return wm(function(){l.apply(r,x)},d)}function pm(l,d,x,R){var z=-1,ae=Dr,xe=!0,De=l.length,Fe=[],at=d.length;if(!De)return Fe;x&&(d=_r(d,Li(x))),R?(ae=Qr,xe=!1):d.length>=i&&(ae=yc,xe=!1,d=new sd(d));e:for(;++z<De;){var st=l[z],lt=x==null?st:x(st);if(st=R||st!==0?st:0,xe&&lt===lt){for(var It=at;It--;)if(d[It]===lt)continue e;Fe.push(st)}else ae(d,lt,R)||Fe.push(st)}return Fe}var wl=bM(vc),KD=bM(bA,!0);function ure(l,d){var x=!0;return wl(l,function(R,z,ae){return x=!!d(R,z,ae),x}),x}function G1(l,d,x){for(var R=-1,z=l.length;++R<z;){var ae=l[R],xe=d(ae);if(xe!=null&&(De===r?xe===xe&&!Ss(xe):x(xe,De)))var De=xe,Fe=ae}return Fe}function lre(l,d,x,R){var z=l.length;for(x=Lr(x),x<0&&(x=-x>z?0:z+x),R=R===r||R>z?z:Lr(R),R<0&&(R+=z),R=x>R?0:l$(R);x<R;)l[x++]=d;return l}function WD(l,d){var x=[];return wl(l,function(R,z,ae){d(R,z,ae)&&x.push(R)}),x}function Ki(l,d,x,R,z){var ae=-1,xe=l.length;for(x||(x=Xre),z||(z=[]);++ae<xe;){var De=l[ae];d>0&&x(De)?d>1?Ki(De,d-1,x,R,z):ki(z,De):R||(z[z.length]=De)}return z}var vA=wM(),QD=wM(!0);function vc(l,d){return l&&vA(l,d,ji)}function bA(l,d){return l&&QD(l,d,ji)}function K1(l,d){return cn(d,function(x){return su(l[x])})}function cd(l,d){d=El(d,l);for(var x=0,R=d.length;l!=null&&x<R;)l=l[wc(d[x++])];return x&&x==R?l:r}function YD(l,d,x){var R=d(l);return Nr(l)?R:ki(R,x(l))}function Da(l){return l==null?l===r?Kt:gt:id&&id in Nn(l)?Gre(l):ane(l)}function wA(l,d){return l>d}function fre(l,d){return l!=null&&An.call(l,d)}function dre(l,d){return l!=null&&d in Nn(l)}function hre(l,d,x){return l>=ha(d,x)&&l<Ri(d,x)}function _A(l,d,x){for(var R=x?Qr:Dr,z=l[0].length,ae=l.length,xe=ae,De=Xe(ae),Fe=1/0,at=[];xe--;){var st=l[xe];xe&&d&&(st=_r(st,Li(d))),Fe=ha(st.length,Fe),De[xe]=!x&&(d||z>=120&&st.length>=120)?new sd(xe&&st):r}st=l[0];var lt=-1,It=De[0];e:for(;++lt<z&&at.length<Fe;){var Wt=st[lt],fr=d?d(Wt):Wt;if(Wt=x||Wt!==0?Wt:0,!(It?yc(It,fr):R(at,fr,x))){for(xe=ae;--xe;){var qr=De[xe];if(!(qr?yc(qr,fr):R(l[xe],fr,x)))continue e}It&&It.push(fr),at.push(Wt)}}return at}function pre(l,d,x,R){return vc(l,function(z,ae,xe){d(R,x(z),ae,xe)}),R}function gm(l,d,x){d=El(d,l),l=LM(l,d);var R=l==null?l:l[wc(Ys(d))];return R==null?r:pt(R,l,x)}function JD(l){return oi(l)&&Da(l)==G}function gre(l){return oi(l)&&Da(l)==Dt}function mre(l){return oi(l)&&Da(l)==ce}function mm(l,d,x,R,z){return l===d?!0:l==null||d==null||!oi(l)&&!oi(d)?l!==l&&d!==d:yre(l,d,x,R,mm,z)}function yre(l,d,x,R,z,ae){var xe=Nr(l),De=Nr(d),Fe=xe?pe:pa(l),at=De?pe:pa(d);Fe=Fe==G?Ut:Fe,at=at==G?Ut:at;var st=Fe==Ut,lt=at==Ut,It=Fe==at;if(It&&Al(l)){if(!Al(d))return!1;xe=!0,st=!1}if(It&&!st)return ae||(ae=new jo),xe||dp(l)?CM(l,d,x,R,z,ae):zre(l,d,Fe,x,R,z,ae);if(!(x&w)){var Wt=st&&An.call(l,"__wrapped__"),fr=lt&&An.call(d,"__wrapped__");if(Wt||fr){var qr=Wt?l.value():l,dr=fr?d.value():d;return ae||(ae=new jo),z(qr,dr,x,R,ae)}}return It?(ae||(ae=new jo),Vre(l,d,x,R,z,ae)):!1}function vre(l){return oi(l)&&pa(l)==yt}function EA(l,d,x,R){var z=x.length,ae=z,xe=!R;if(l==null)return!ae;for(l=Nn(l);z--;){var De=x[z];if(xe&&De[2]?De[1]!==l[De[0]]:!(De[0]in l))return!1}for(;++z<ae;){De=x[z];var Fe=De[0],at=l[Fe],st=De[1];if(xe&&De[2]){if(at===r&&!(Fe in l))return!1}else{var lt=new jo;if(R)var It=R(at,st,Fe,l,d,lt);if(!(It===r?mm(st,at,w|v,R,lt):It))return!1}}return!0}function XD(l){if(!ri(l)||ene(l))return!1;var d=su(l)?vte:vr;return d.test(ld(l))}function bre(l){return oi(l)&&Da(l)==Ct}function wre(l){return oi(l)&&pa(l)==Pt}function _re(l){return oi(l)&&lw(l.length)&&!!Xr[Da(l)]}function ZD(l){return typeof l=="function"?l:l==null?ns:typeof l=="object"?Nr(l)?rM(l[0],l[1]):tM(l):_$(l)}function xA(l){if(!bm(l))return Ate(l);var d=[];for(var x in Nn(l))An.call(l,x)&&x!="constructor"&&d.push(x);return d}function Ere(l){if(!ri(l))return ine(l);var d=bm(l),x=[];for(var R in l)R=="constructor"&&(d||!An.call(l,R))||x.push(R);return x}function AA(l,d){return l<d}function eM(l,d){var x=-1,R=ts(l)?Xe(l.length):[];return wl(l,function(z,ae,xe){R[++x]=d(z,ae,xe)}),R}function tM(l){var d=UA(l);return d.length==1&&d[0][2]?$M(d[0][0],d[0][1]):function(x){return x===l||EA(x,l,d)}}function rM(l,d){return BA(l)&&MM(d)?$M(wc(l),d):function(x){var R=JA(x,l);return R===r&&R===d?XA(x,l):mm(d,R,w|v)}}function W1(l,d,x,R,z){l!==d&&vA(d,function(ae,xe){if(z||(z=new jo),ri(ae))xre(l,d,xe,x,W1,R,z);else{var De=R?R(HA(l,xe),ae,xe+"",l,d,z):r;De===r&&(De=ae),mA(l,xe,De)}},rs)}function xre(l,d,x,R,z,ae,xe){var De=HA(l,x),Fe=HA(d,x),at=xe.get(Fe);if(at){mA(l,x,at);return}var st=ae?ae(De,Fe,x+"",l,d,xe):r,lt=st===r;if(lt){var It=Nr(Fe),Wt=!It&&Al(Fe),fr=!It&&!Wt&&dp(Fe);st=Fe,It||Wt||fr?Nr(De)?st=De:hi(De)?st=es(De):Wt?(lt=!1,st=pM(Fe,!0)):fr?(lt=!1,st=gM(Fe,!0)):st=[]:_m(Fe)||fd(Fe)?(st=De,fd(De)?st=f$(De):(!ri(De)||su(De))&&(st=DM(Fe))):lt=!1}lt&&(xe.set(Fe,st),z(st,Fe,R,ae,xe),xe.delete(Fe)),mA(l,x,st)}function nM(l,d){var x=l.length;if(x)return d+=d<0?x:0,au(d,x)?l[d]:r}function iM(l,d,x){d.length?d=_r(d,function(ae){return Nr(ae)?function(xe){return cd(xe,ae.length===1?ae[0]:ae)}:ae}):d=[ns];var R=-1;d=_r(d,Li(or()));var z=eM(l,function(ae,xe,De){var Fe=_r(d,function(at){return at(ae)});return{criteria:Fe,index:++R,value:ae}});return Vh(z,function(ae,xe){return kre(ae,xe,x)})}function Are(l,d){return aM(l,d,function(x,R){return XA(l,R)})}function aM(l,d,x){for(var R=-1,z=d.length,ae={};++R<z;){var xe=d[R],De=cd(l,xe);x(De,xe)&&ym(ae,El(xe,l),De)}return ae}function Sre(l){return function(d){return cd(d,l)}}function SA(l,d,x,R){var z=R?zh:$o,ae=-1,xe=d.length,De=l;for(l===d&&(d=es(d)),x&&(De=_r(l,Li(x)));++ae<xe;)for(var Fe=0,at=d[ae],st=x?x(at):at;(Fe=z(De,st,Fe,R))>-1;)De!==l&&j1.call(De,Fe,1),j1.call(l,Fe,1);return l}function sM(l,d){for(var x=l?d.length:0,R=x-1;x--;){var z=d[x];if(x==R||z!==ae){var ae=z;au(z)?j1.call(l,z,1):TA(l,z)}}return l}function IA(l,d){return l+B1(FD()*(d-l+1))}function Ire(l,d,x,R){for(var z=-1,ae=Ri(F1((d-l)/(x||1)),0),xe=Xe(ae);ae--;)xe[R?ae:++z]=l,l+=x;return xe}function OA(l,d){var x="";if(!l||d<1||d>j)return x;do d%2&&(x+=l),d=B1(d/2),d&&(l+=l);while(d);return x}function zr(l,d){return zA(kM(l,d,ns),l+"")}function Ore(l){return HD(hp(l))}function Pre(l,d){var x=hp(l);return iw(x,od(d,0,x.length))}function ym(l,d,x,R){if(!ri(l))return l;d=El(d,l);for(var z=-1,ae=d.length,xe=ae-1,De=l;De!=null&&++z<ae;){var Fe=wc(d[z]),at=x;if(Fe==="__proto__"||Fe==="constructor"||Fe==="prototype")return l;if(z!=xe){var st=De[Fe];at=R?R(st,Fe,De):r,at===r&&(at=ri(st)?st:au(d[z+1])?[]:{})}hm(De,Fe,at),De=De[Fe]}return l}var oM=q1?function(l,d){return q1.set(l,d),l}:ns,Tre=U1?function(l,d){return U1(l,"toString",{configurable:!0,enumerable:!1,value:eS(d),writable:!0})}:ns;function Cre(l){return iw(hp(l))}function Qs(l,d,x){var R=-1,z=l.length;d<0&&(d=-d>z?0:z+d),x=x>z?z:x,x<0&&(x+=z),z=d>x?0:x-d>>>0,d>>>=0;for(var ae=Xe(z);++R<z;)ae[R]=l[R+d];return ae}function Rre(l,d){var x;return wl(l,function(R,z,ae){return x=d(R,z,ae),!x}),!!x}function Q1(l,d,x){var R=0,z=l==null?R:l.length;if(typeof d=="number"&&d===d&&z<=k){for(;R<z;){var ae=R+z>>>1,xe=l[ae];xe!==null&&!Ss(xe)&&(x?xe<=d:xe<d)?R=ae+1:z=ae}return z}return PA(l,d,ns,x)}function PA(l,d,x,R){var z=0,ae=l==null?0:l.length;if(ae===0)return 0;d=x(d);for(var xe=d!==d,De=d===null,Fe=Ss(d),at=d===r;z<ae;){var st=B1((z+ae)/2),lt=x(l[st]),It=lt!==r,Wt=lt===null,fr=lt===lt,qr=Ss(lt);if(xe)var dr=R||fr;else at?dr=fr&&(R||It):De?dr=fr&&It&&(R||!Wt):Fe?dr=fr&&It&&!Wt&&(R||!qr):Wt||qr?dr=!1:dr=R?lt<=d:lt<d;dr?z=st+1:ae=st}return ha(ae,q)}function cM(l,d){for(var x=-1,R=l.length,z=0,ae=[];++x<R;){var xe=l[x],De=d?d(xe):xe;if(!x||!Uo(De,Fe)){var Fe=De;ae[z++]=xe===0?0:xe}}return ae}function uM(l){return typeof l=="number"?l:Ss(l)?H:+l}function As(l){if(typeof l=="string")return l;if(Nr(l))return _r(l,As)+"";if(Ss(l))return BD?BD.call(l):"";var d=l+"";return d=="0"&&1/l==-ne?"-0":d}function _l(l,d,x){var R=-1,z=Dr,ae=l.length,xe=!0,De=[],Fe=De;if(x)xe=!1,z=Qr;else if(ae>=i){var at=d?null:qre(l);if(at)return Zc(at);xe=!1,z=yc,Fe=new sd}else Fe=d?[]:De;e:for(;++R<ae;){var st=l[R],lt=d?d(st):st;if(st=x||st!==0?st:0,xe&&lt===lt){for(var It=Fe.length;It--;)if(Fe[It]===lt)continue e;d&&Fe.push(lt),De.push(st)}else z(Fe,lt,x)||(Fe!==De&&Fe.push(lt),De.push(st))}return De}function TA(l,d){return d=El(d,l),l=LM(l,d),l==null||delete l[wc(Ys(d))]}function lM(l,d,x,R){return ym(l,d,x(cd(l,d)),R)}function Y1(l,d,x,R){for(var z=l.length,ae=R?z:-1;(R?ae--:++ae<z)&&d(l[ae],ae,l););return x?Qs(l,R?0:ae,R?ae+1:z):Qs(l,R?ae+1:0,R?z:ae)}function fM(l,d){var x=l;return x instanceof Zr&&(x=x.value()),zs(d,function(R,z){return z.func.apply(z.thisArg,ki([R],z.args))},x)}function CA(l,d,x){var R=l.length;if(R<2)return R?_l(l[0]):[];for(var z=-1,ae=Xe(R);++z<R;)for(var xe=l[z],De=-1;++De<R;)De!=z&&(ae[z]=pm(ae[z]||xe,l[De],d,x));return _l(Ki(ae,1),d,x)}function dM(l,d,x){for(var R=-1,z=l.length,ae=d.length,xe={};++R<z;){var De=R<ae?d[R]:r;x(xe,l[R],De)}return xe}function RA(l){return hi(l)?l:[]}function NA(l){return typeof l=="function"?l:ns}function El(l,d){return Nr(l)?l:BA(l,d)?[l]:BM(wn(l))}var Nre=zr;function xl(l,d,x){var R=l.length;return x=x===r?R:x,!d&&x>=R?l:Qs(l,d,x)}var hM=bte||function(l){return gr.clearTimeout(l)};function pM(l,d){if(d)return l.slice();var x=l.length,R=$D?$D(x):new l.constructor(x);return l.copy(R),R}function DA(l){var d=new l.constructor(l.byteLength);return new k1(d).set(new k1(l)),d}function Dre(l,d){var x=d?DA(l.buffer):l.buffer;return new l.constructor(x,l.byteOffset,l.byteLength)}function Mre(l){var d=new l.constructor(l.source,ur.exec(l));return d.lastIndex=l.lastIndex,d}function $re(l){return dm?Nn(dm.call(l)):{}}function gM(l,d){var x=d?DA(l.buffer):l.buffer;return new l.constructor(x,l.byteOffset,l.length)}function mM(l,d){if(l!==d){var x=l!==r,R=l===null,z=l===l,ae=Ss(l),xe=d!==r,De=d===null,Fe=d===d,at=Ss(d);if(!De&&!at&&!ae&&l>d||ae&&xe&&Fe&&!De&&!at||R&&xe&&Fe||!x&&Fe||!z)return 1;if(!R&&!ae&&!at&&l<d||at&&x&&z&&!R&&!ae||De&&x&&z||!xe&&z||!Fe)return-1}return 0}function kre(l,d,x){for(var R=-1,z=l.criteria,ae=d.criteria,xe=z.length,De=x.length;++R<xe;){var Fe=mM(z[R],ae[R]);if(Fe){if(R>=De)return Fe;var at=x[R];return Fe*(at=="desc"?-1:1)}}return l.index-d.index}function yM(l,d,x,R){for(var z=-1,ae=l.length,xe=x.length,De=-1,Fe=d.length,at=Ri(ae-xe,0),st=Xe(Fe+at),lt=!R;++De<Fe;)st[De]=d[De];for(;++z<xe;)(lt||z<ae)&&(st[x[z]]=l[z]);for(;at--;)st[De++]=l[z++];return st}function vM(l,d,x,R){for(var z=-1,ae=l.length,xe=-1,De=x.length,Fe=-1,at=d.length,st=Ri(ae-De,0),lt=Xe(st+at),It=!R;++z<st;)lt[z]=l[z];for(var Wt=z;++Fe<at;)lt[Wt+Fe]=d[Fe];for(;++xe<De;)(It||z<ae)&&(lt[Wt+x[xe]]=l[z++]);return lt}function es(l,d){var x=-1,R=l.length;for(d||(d=Xe(R));++x<R;)d[x]=l[x];return d}function bc(l,d,x,R){var z=!x;x||(x={});for(var ae=-1,xe=d.length;++ae<xe;){var De=d[ae],Fe=R?R(x[De],l[De],De,x,l):r;Fe===r&&(Fe=l[De]),z?ru(x,De,Fe):hm(x,De,Fe)}return x}function Lre(l,d){return bc(l,FA(l),d)}function jre(l,d){return bc(l,RM(l),d)}function J1(l,d){return function(x,R){var z=Nr(x)?er:sre,ae=d?d():{};return z(x,l,or(R,2),ae)}}function up(l){return zr(function(d,x){var R=-1,z=x.length,ae=z>1?x[z-1]:r,xe=z>2?x[2]:r;for(ae=l.length>3&&typeof ae=="function"?(z--,ae):r,xe&&Ma(x[0],x[1],xe)&&(ae=z<3?r:ae,z=1),d=Nn(d);++R<z;){var De=x[R];De&&l(d,De,R,ae)}return d})}function bM(l,d){return function(x,R){if(x==null)return x;if(!ts(x))return l(x,R);for(var z=x.length,ae=d?z:-1,xe=Nn(x);(d?ae--:++ae<z)&&R(xe[ae],ae,xe)!==!1;);return x}}function wM(l){return function(d,x,R){for(var z=-1,ae=Nn(d),xe=R(d),De=xe.length;De--;){var Fe=xe[l?De:++z];if(x(ae[Fe],Fe,ae)===!1)break}return d}}function Ure(l,d,x){var R=d&g,z=vm(l);function ae(){var xe=this&&this!==gr&&this instanceof ae?z:l;return xe.apply(R?x:this,arguments)}return ae}function _M(l){return function(d){d=wn(d);var x=ko(d)?da(d):r,R=x?x[0]:d.charAt(0),z=x?xl(x,1).join(""):d.slice(1);return R[l]()+z}}function lp(l){return function(d){return zs(b$(v$(d).replace(ti,"")),l,"")}}function vm(l){return function(){var d=arguments;switch(d.length){case 0:return new l;case 1:return new l(d[0]);case 2:return new l(d[0],d[1]);case 3:return new l(d[0],d[1],d[2]);case 4:return new l(d[0],d[1],d[2],d[3]);case 5:return new l(d[0],d[1],d[2],d[3],d[4]);case 6:return new l(d[0],d[1],d[2],d[3],d[4],d[5]);case 7:return new l(d[0],d[1],d[2],d[3],d[4],d[5],d[6])}var x=cp(l.prototype),R=l.apply(x,d);return ri(R)?R:x}}function Fre(l,d,x){var R=vm(l);function z(){for(var ae=arguments.length,xe=Xe(ae),De=ae,Fe=fp(z);De--;)xe[De]=arguments[De];var at=ae<3&&xe[0]!==Fe&&xe[ae-1]!==Fe?[]:xs(xe,Fe);if(ae-=at.length,ae<x)return IM(l,d,X1,z.placeholder,r,xe,at,r,r,x-ae);var st=this&&this!==gr&&this instanceof z?R:l;return pt(st,this,xe)}return z}function EM(l){return function(d,x,R){var z=Nn(d);if(!ts(d)){var ae=or(x,3);d=ji(d),x=function(De){return ae(z[De],De,z)}}var xe=l(d,x,R);return xe>-1?z[ae?d[xe]:xe]:r}}function xM(l){return iu(function(d){var x=d.length,R=x,z=Ks.prototype.thru;for(l&&d.reverse();R--;){var ae=d[R];if(typeof ae!="function")throw new Gs(s);if(z&&!xe&&rw(ae)=="wrapper")var xe=new Ks([],!0)}for(R=xe?R:x;++R<x;){ae=d[R];var De=rw(ae),Fe=De=="wrapper"?jA(ae):r;Fe&&qA(Fe[0])&&Fe[1]==(p|S|I|O)&&!Fe[4].length&&Fe[9]==1?xe=xe[rw(Fe[0])].apply(xe,Fe[3]):xe=ae.length==1&&qA(ae)?xe[De]():xe.thru(ae)}return function(){var at=arguments,st=at[0];if(xe&&at.length==1&&Nr(st))return xe.plant(st).value();for(var lt=0,It=x?d[lt].apply(this,at):st;++lt<x;)It=d[lt].call(this,It);return It}})}function X1(l,d,x,R,z,ae,xe,De,Fe,at){var st=d&p,lt=d&g,It=d&_,Wt=d&(S|A),fr=d&N,qr=It?r:vm(l);function dr(){for(var Yr=arguments.length,nn=Xe(Yr),Is=Yr;Is--;)nn[Is]=arguments[Is];if(Wt)var $a=fp(dr),Os=Kh(nn,$a);if(R&&(nn=yM(nn,R,z,Wt)),ae&&(nn=vM(nn,ae,xe,Wt)),Yr-=Os,Wt&&Yr<at){var pi=xs(nn,$a);return IM(l,d,X1,dr.placeholder,x,nn,pi,De,Fe,at-Yr)}var Fo=lt?x:this,cu=It?Fo[l]:l;return Yr=nn.length,De?nn=sne(nn,De):fr&&Yr>1&&nn.reverse(),st&&Fe<Yr&&(nn.length=Fe),this&&this!==gr&&this instanceof dr&&(cu=qr||vm(cu)),cu.apply(Fo,nn)}return dr}function AM(l,d){return function(x,R){return pre(x,l,d(R),{})}}function Z1(l,d){return function(x,R){var z;if(x===r&&R===r)return d;if(x!==r&&(z=x),R!==r){if(z===r)return R;typeof x=="string"||typeof R=="string"?(x=As(x),R=As(R)):(x=uM(x),R=uM(R)),z=l(x,R)}return z}}function MA(l){return iu(function(d){return d=_r(d,Li(or())),zr(function(x){var R=this;return l(d,function(z){return pt(z,R,x)})})})}function ew(l,d){d=d===r?" ":As(d);var x=d.length;if(x<2)return x?OA(d,l):d;var R=OA(d,F1(l/Lo(d)));return ko(d)?xl(da(R),0,l).join(""):R.slice(0,l)}function Bre(l,d,x,R){var z=d&g,ae=vm(l);function xe(){for(var De=-1,Fe=arguments.length,at=-1,st=R.length,lt=Xe(st+Fe),It=this&&this!==gr&&this instanceof xe?ae:l;++at<st;)lt[at]=R[at];for(;Fe--;)lt[at++]=arguments[++De];return pt(It,z?x:this,lt)}return xe}function SM(l){return function(d,x,R){return R&&typeof R!="number"&&Ma(d,x,R)&&(x=R=r),d=ou(d),x===r?(x=d,d=0):x=ou(x),R=R===r?d<x?1:-1:ou(R),Ire(d,x,R,l)}}function tw(l){return function(d,x){return typeof d=="string"&&typeof x=="string"||(d=Js(d),x=Js(x)),l(d,x)}}function IM(l,d,x,R,z,ae,xe,De,Fe,at){var st=d&S,lt=st?xe:r,It=st?r:xe,Wt=st?ae:r,fr=st?r:ae;d|=st?I:E,d&=~(st?E:I),d&b||(d&=~(g|_));var qr=[l,d,z,Wt,lt,fr,It,De,Fe,at],dr=x.apply(r,qr);return qA(l)&&jM(dr,qr),dr.placeholder=R,UM(dr,l,d)}function $A(l){var d=Ci[l];return function(x,R){if(x=Js(x),R=R==null?0:ha(Lr(R),292),R&&UD(x)){var z=(wn(x)+"e").split("e"),ae=d(z[0]+"e"+(+z[1]+R));return z=(wn(ae)+"e").split("e"),+(z[0]+"e"+(+z[1]-R))}return d(x)}}var qre=sp&&1/Zc(new sp([,-0]))[1]==ne?function(l){return new sp(l)}:nS;function OM(l){return function(d){var x=pa(d);return x==yt?vl(d):x==Pt?ep(d):Gh(d,l(d))}}function nu(l,d,x,R,z,ae,xe,De){var Fe=d&_;if(!Fe&&typeof l!="function")throw new Gs(s);var at=R?R.length:0;if(at||(d&=~(I|E),R=z=r),xe=xe===r?xe:Ri(Lr(xe),0),De=De===r?De:Lr(De),at-=z?z.length:0,d&E){var st=R,lt=z;R=z=r}var It=Fe?r:jA(l),Wt=[l,d,x,R,z,st,lt,ae,xe,De];if(It&&nne(Wt,It),l=Wt[0],d=Wt[1],x=Wt[2],R=Wt[3],z=Wt[4],De=Wt[9]=Wt[9]===r?Fe?0:l.length:Ri(Wt[9]-at,0),!De&&d&(S|A)&&(d&=~(S|A)),!d||d==g)var fr=Ure(l,d,x);else d==S||d==A?fr=Fre(l,d,De):(d==I||d==(g|I))&&!z.length?fr=Bre(l,d,x,R):fr=X1.apply(r,Wt);var qr=It?oM:jM;return UM(qr(fr,Wt),l,d)}function PM(l,d,x,R){return l===r||Uo(l,ap[x])&&!An.call(R,x)?d:l}function TM(l,d,x,R,z,ae){return ri(l)&&ri(d)&&(ae.set(d,l),W1(l,d,r,TM,ae),ae.delete(d)),l}function Hre(l){return _m(l)?r:l}function CM(l,d,x,R,z,ae){var xe=x&w,De=l.length,Fe=d.length;if(De!=Fe&&!(xe&&Fe>De))return!1;var at=ae.get(l),st=ae.get(d);if(at&&st)return at==d&&st==l;var lt=-1,It=!0,Wt=x&v?new sd:r;for(ae.set(l,d),ae.set(d,l);++lt<De;){var fr=l[lt],qr=d[lt];if(R)var dr=xe?R(qr,fr,lt,d,l,ae):R(fr,qr,lt,l,d,ae);if(dr!==r){if(dr)continue;It=!1;break}if(Wt){if(!Pi(d,function(Yr,nn){if(!yc(Wt,nn)&&(fr===Yr||z(fr,Yr,x,R,ae)))return Wt.push(nn)})){It=!1;break}}else if(!(fr===qr||z(fr,qr,x,R,ae))){It=!1;break}}return ae.delete(l),ae.delete(d),It}function zre(l,d,x,R,z,ae,xe){switch(x){case Nt:if(l.byteLength!=d.byteLength||l.byteOffset!=d.byteOffset)return!1;l=l.buffer,d=d.buffer;case Dt:return!(l.byteLength!=d.byteLength||!ae(new k1(l),new k1(d)));case te:case ce:case vt:return Uo(+l,+d);case le:return l.name==d.name&&l.message==d.message;case Ct:case kt:return l==d+"";case yt:var De=vl;case Pt:var Fe=R&w;if(De||(De=Zc),l.size!=d.size&&!Fe)return!1;var at=xe.get(l);if(at)return at==d;R|=v,xe.set(l,d);var st=CM(De(l),De(d),R,z,ae,xe);return xe.delete(l),st;case Rt:if(dm)return dm.call(l)==dm.call(d)}return!1}function Vre(l,d,x,R,z,ae){var xe=x&w,De=kA(l),Fe=De.length,at=kA(d),st=at.length;if(Fe!=st&&!xe)return!1;for(var lt=Fe;lt--;){var It=De[lt];if(!(xe?It in d:An.call(d,It)))return!1}var Wt=ae.get(l),fr=ae.get(d);if(Wt&&fr)return Wt==d&&fr==l;var qr=!0;ae.set(l,d),ae.set(d,l);for(var dr=xe;++lt<Fe;){It=De[lt];var Yr=l[It],nn=d[It];if(R)var Is=xe?R(nn,Yr,It,d,l,ae):R(Yr,nn,It,l,d,ae);if(!(Is===r?Yr===nn||z(Yr,nn,x,R,ae):Is)){qr=!1;break}dr||(dr=It=="constructor")}if(qr&&!dr){var $a=l.constructor,Os=d.constructor;$a!=Os&&"constructor"in l&&"constructor"in d&&!(typeof $a=="function"&&$a instanceof $a&&typeof Os=="function"&&Os instanceof Os)&&(qr=!1)}return ae.delete(l),ae.delete(d),qr}function iu(l){return zA(kM(l,r,VM),l+"")}function kA(l){return YD(l,ji,FA)}function LA(l){return YD(l,rs,RM)}var jA=q1?function(l){return q1.get(l)}:nS;function rw(l){for(var d=l.name+"",x=op[d],R=An.call(op,d)?x.length:0;R--;){var z=x[R],ae=z.func;if(ae==null||ae==l)return z.name}return d}function fp(l){var d=An.call(J,"placeholder")?J:l;return d.placeholder}function or(){var l=J.iteratee||tS;return l=l===tS?ZD:l,arguments.length?l(arguments[0],arguments[1]):l}function nw(l,d){var x=l.__data__;return Zre(d)?x[typeof d=="string"?"string":"hash"]:x.map}function UA(l){for(var d=ji(l),x=d.length;x--;){var R=d[x],z=l[R];d[x]=[R,z,MM(z)]}return d}function ud(l,d){var x=Jh(l,d);return XD(x)?x:r}function Gre(l){var d=An.call(l,id),x=l[id];try{l[id]=r;var R=!0}catch{}var z=M1.call(l);return R&&(d?l[id]=x:delete l[id]),z}var FA=hA?function(l){return l==null?[]:(l=Nn(l),cn(hA(l),function(d){return LD.call(l,d)}))}:iS,RM=hA?function(l){for(var d=[];l;)ki(d,FA(l)),l=L1(l);return d}:iS,pa=Da;(pA&&pa(new pA(new ArrayBuffer(1)))!=Nt||um&&pa(new um)!=yt||gA&&pa(gA.resolve())!=Xt||sp&&pa(new sp)!=Pt||lm&&pa(new lm)!=Ft)&&(pa=function(l){var d=Da(l),x=d==Ut?l.constructor:r,R=x?ld(x):"";if(R)switch(R){case Pte:return Nt;case Tte:return yt;case Cte:return Xt;case Rte:return Pt;case Nte:return Ft}return d});function Kre(l,d,x){for(var R=-1,z=x.length;++R<z;){var ae=x[R],xe=ae.size;switch(ae.type){case"drop":l+=xe;break;case"dropRight":d-=xe;break;case"take":d=ha(d,l+xe);break;case"takeRight":l=Ri(l,d-xe);break}}return{start:l,end:d}}function Wre(l){var d=l.match(ge);return d?d[1].split(Me):[]}function NM(l,d,x){d=El(d,l);for(var R=-1,z=d.length,ae=!1;++R<z;){var xe=wc(d[R]);if(!(ae=l!=null&&x(l,xe)))break;l=l[xe]}return ae||++R!=z?ae:(z=l==null?0:l.length,!!z&&lw(z)&&au(xe,z)&&(Nr(l)||fd(l)))}function Qre(l){var d=l.length,x=new l.constructor(d);return d&&typeof l[0]=="string"&&An.call(l,"index")&&(x.index=l.index,x.input=l.input),x}function DM(l){return typeof l.constructor=="function"&&!bm(l)?cp(L1(l)):{}}function Yre(l,d,x){var R=l.constructor;switch(d){case Dt:return DA(l);case te:case ce:return new R(+l);case Nt:return Dre(l,x);case zt:case Mt:case cr:case tr:case ar:case nr:case br:case En:case tn:return gM(l,x);case yt:return new R;case vt:case kt:return new R(l);case Ct:return Mre(l);case Pt:return new R;case Rt:return $re(l)}}function Jre(l,d){var x=d.length;if(!x)return l;var R=x-1;return d[R]=(x>1?"& ":"")+d[R],d=d.join(x>2?", ":" "),l.replace(Z,`{
140
+ /* [wrapped with `+d+`] */
141
+ `)}function Xre(l){return Nr(l)||fd(l)||!!(jD&&l&&l[jD])}function au(l,d){var x=typeof l;return d=d??j,!!d&&(x=="number"||x!="symbol"&&sr.test(l))&&l>-1&&l%1==0&&l<d}function Ma(l,d,x){if(!ri(x))return!1;var R=typeof d;return(R=="number"?ts(x)&&au(d,x.length):R=="string"&&d in x)?Uo(x[d],l):!1}function BA(l,d){if(Nr(l))return!1;var x=typeof l;return x=="number"||x=="symbol"||x=="boolean"||l==null||Ss(l)?!0:He.test(l)||!Re.test(l)||d!=null&&l in Nn(d)}function Zre(l){var d=typeof l;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?l!=="__proto__":l===null}function qA(l){var d=rw(l),x=J[d];if(typeof x!="function"||!(d in Zr.prototype))return!1;if(l===x)return!0;var R=jA(x);return!!R&&l===R[0]}function ene(l){return!!MD&&MD in l}var tne=N1?su:aS;function bm(l){var d=l&&l.constructor,x=typeof d=="function"&&d.prototype||ap;return l===x}function MM(l){return l===l&&!ri(l)}function $M(l,d){return function(x){return x==null?!1:x[l]===d&&(d!==r||l in Nn(x))}}function rne(l){var d=cw(l,function(R){return x.size===u&&x.clear(),R}),x=d.cache;return d}function nne(l,d){var x=l[1],R=d[1],z=x|R,ae=z<(g|_|p),xe=R==p&&x==S||R==p&&x==O&&l[7].length<=d[8]||R==(p|O)&&d[7].length<=d[8]&&x==S;if(!(ae||xe))return l;R&g&&(l[2]=d[2],z|=x&g?0:b);var De=d[3];if(De){var Fe=l[3];l[3]=Fe?yM(Fe,De,d[4]):De,l[4]=Fe?xs(l[3],f):d[4]}return De=d[5],De&&(Fe=l[5],l[5]=Fe?vM(Fe,De,d[6]):De,l[6]=Fe?xs(l[5],f):d[6]),De=d[7],De&&(l[7]=De),R&p&&(l[8]=l[8]==null?d[8]:ha(l[8],d[8])),l[9]==null&&(l[9]=d[9]),l[0]=d[0],l[1]=z,l}function ine(l){var d=[];if(l!=null)for(var x in Nn(l))d.push(x);return d}function ane(l){return M1.call(l)}function kM(l,d,x){return d=Ri(d===r?l.length-1:d,0),function(){for(var R=arguments,z=-1,ae=Ri(R.length-d,0),xe=Xe(ae);++z<ae;)xe[z]=R[d+z];z=-1;for(var De=Xe(d+1);++z<d;)De[z]=R[z];return De[d]=x(xe),pt(l,this,De)}}function LM(l,d){return d.length<2?l:cd(l,Qs(d,0,-1))}function sne(l,d){for(var x=l.length,R=ha(d.length,x),z=es(l);R--;){var ae=d[R];l[R]=au(ae,x)?z[ae]:r}return l}function HA(l,d){if(!(d==="constructor"&&typeof l[d]=="function")&&d!="__proto__")return l[d]}var jM=FM(oM),wm=_te||function(l,d){return gr.setTimeout(l,d)},zA=FM(Tre);function UM(l,d,x){var R=d+"";return zA(l,Jre(R,one(Wre(R),x)))}function FM(l){var d=0,x=0;return function(){var R=Ste(),z=ve-(R-x);if(x=R,z>0){if(++d>=de)return arguments[0]}else d=0;return l.apply(r,arguments)}}function iw(l,d){var x=-1,R=l.length,z=R-1;for(d=d===r?R:d;++x<d;){var ae=IA(x,z),xe=l[ae];l[ae]=l[x],l[x]=xe}return l.length=d,l}var BM=rne(function(l){var d=[];return l.charCodeAt(0)===46&&d.push(""),l.replace(Je,function(x,R,z,ae){d.push(z?ae.replace(St,"$1"):R||x)}),d});function wc(l){if(typeof l=="string"||Ss(l))return l;var d=l+"";return d=="0"&&1/l==-ne?"-0":d}function ld(l){if(l!=null){try{return D1.call(l)}catch{}try{return l+""}catch{}}return""}function one(l,d){return Vt($,function(x){var R="_."+x[0];d&x[1]&&!Dr(l,R)&&l.push(R)}),l.sort()}function qM(l){if(l instanceof Zr)return l.clone();var d=new Ks(l.__wrapped__,l.__chain__);return d.__actions__=es(l.__actions__),d.__index__=l.__index__,d.__values__=l.__values__,d}function cne(l,d,x){(x?Ma(l,d,x):d===r)?d=1:d=Ri(Lr(d),0);var R=l==null?0:l.length;if(!R||d<1)return[];for(var z=0,ae=0,xe=Xe(F1(R/d));z<R;)xe[ae++]=Qs(l,z,z+=d);return xe}function une(l){for(var d=-1,x=l==null?0:l.length,R=0,z=[];++d<x;){var ae=l[d];ae&&(z[R++]=ae)}return z}function lne(){var l=arguments.length;if(!l)return[];for(var d=Xe(l-1),x=arguments[0],R=l;R--;)d[R-1]=arguments[R];return ki(Nr(x)?es(x):[x],Ki(d,1))}var fne=zr(function(l,d){return hi(l)?pm(l,Ki(d,1,hi,!0)):[]}),dne=zr(function(l,d){var x=Ys(d);return hi(x)&&(x=r),hi(l)?pm(l,Ki(d,1,hi,!0),or(x,2)):[]}),hne=zr(function(l,d){var x=Ys(d);return hi(x)&&(x=r),hi(l)?pm(l,Ki(d,1,hi,!0),r,x):[]});function pne(l,d,x){var R=l==null?0:l.length;return R?(d=x||d===r?1:Lr(d),Qs(l,d<0?0:d,R)):[]}function gne(l,d,x){var R=l==null?0:l.length;return R?(d=x||d===r?1:Lr(d),d=R-d,Qs(l,0,d<0?0:d)):[]}function mne(l,d){return l&&l.length?Y1(l,or(d,3),!0,!0):[]}function yne(l,d){return l&&l.length?Y1(l,or(d,3),!0):[]}function vne(l,d,x,R){var z=l==null?0:l.length;return z?(x&&typeof x!="number"&&Ma(l,d,x)&&(x=0,R=z),lre(l,d,x,R)):[]}function HM(l,d,x){var R=l==null?0:l.length;if(!R)return-1;var z=x==null?0:Lr(x);return z<0&&(z=Ri(R+z,0)),Xc(l,or(d,3),z)}function zM(l,d,x){var R=l==null?0:l.length;if(!R)return-1;var z=R-1;return x!==r&&(z=Lr(x),z=x<0?Ri(R+z,0):ha(z,R-1)),Xc(l,or(d,3),z,!0)}function VM(l){var d=l==null?0:l.length;return d?Ki(l,1):[]}function bne(l){var d=l==null?0:l.length;return d?Ki(l,ne):[]}function wne(l,d){var x=l==null?0:l.length;return x?(d=d===r?1:Lr(d),Ki(l,d)):[]}function _ne(l){for(var d=-1,x=l==null?0:l.length,R={};++d<x;){var z=l[d];R[z[0]]=z[1]}return R}function GM(l){return l&&l.length?l[0]:r}function Ene(l,d,x){var R=l==null?0:l.length;if(!R)return-1;var z=x==null?0:Lr(x);return z<0&&(z=Ri(R+z,0)),$o(l,d,z)}function xne(l){var d=l==null?0:l.length;return d?Qs(l,0,-1):[]}var Ane=zr(function(l){var d=_r(l,RA);return d.length&&d[0]===l[0]?_A(d):[]}),Sne=zr(function(l){var d=Ys(l),x=_r(l,RA);return d===Ys(x)?d=r:x.pop(),x.length&&x[0]===l[0]?_A(x,or(d,2)):[]}),Ine=zr(function(l){var d=Ys(l),x=_r(l,RA);return d=typeof d=="function"?d:r,d&&x.pop(),x.length&&x[0]===l[0]?_A(x,r,d):[]});function One(l,d){return l==null?"":xte.call(l,d)}function Ys(l){var d=l==null?0:l.length;return d?l[d-1]:r}function Pne(l,d,x){var R=l==null?0:l.length;if(!R)return-1;var z=R;return x!==r&&(z=Lr(x),z=z<0?Ri(R+z,0):ha(z,R-1)),d===d?rp(l,d,z):Xc(l,Yf,z,!0)}function Tne(l,d){return l&&l.length?nM(l,Lr(d)):r}var Cne=zr(KM);function KM(l,d){return l&&l.length&&d&&d.length?SA(l,d):l}function Rne(l,d,x){return l&&l.length&&d&&d.length?SA(l,d,or(x,2)):l}function Nne(l,d,x){return l&&l.length&&d&&d.length?SA(l,d,r,x):l}var Dne=iu(function(l,d){var x=l==null?0:l.length,R=yA(l,d);return sM(l,_r(d,function(z){return au(z,x)?+z:z}).sort(mM)),R});function Mne(l,d){var x=[];if(!(l&&l.length))return x;var R=-1,z=[],ae=l.length;for(d=or(d,3);++R<ae;){var xe=l[R];d(xe,R,l)&&(x.push(xe),z.push(R))}return sM(l,z),x}function VA(l){return l==null?l:Ote.call(l)}function $ne(l,d,x){var R=l==null?0:l.length;return R?(x&&typeof x!="number"&&Ma(l,d,x)?(d=0,x=R):(d=d==null?0:Lr(d),x=x===r?R:Lr(x)),Qs(l,d,x)):[]}function kne(l,d){return Q1(l,d)}function Lne(l,d,x){return PA(l,d,or(x,2))}function jne(l,d){var x=l==null?0:l.length;if(x){var R=Q1(l,d);if(R<x&&Uo(l[R],d))return R}return-1}function Une(l,d){return Q1(l,d,!0)}function Fne(l,d,x){return PA(l,d,or(x,2),!0)}function Bne(l,d){var x=l==null?0:l.length;if(x){var R=Q1(l,d,!0)-1;if(Uo(l[R],d))return R}return-1}function qne(l){return l&&l.length?cM(l):[]}function Hne(l,d){return l&&l.length?cM(l,or(d,2)):[]}function zne(l){var d=l==null?0:l.length;return d?Qs(l,1,d):[]}function Vne(l,d,x){return l&&l.length?(d=x||d===r?1:Lr(d),Qs(l,0,d<0?0:d)):[]}function Gne(l,d,x){var R=l==null?0:l.length;return R?(d=x||d===r?1:Lr(d),d=R-d,Qs(l,d<0?0:d,R)):[]}function Kne(l,d){return l&&l.length?Y1(l,or(d,3),!1,!0):[]}function Wne(l,d){return l&&l.length?Y1(l,or(d,3)):[]}var Qne=zr(function(l){return _l(Ki(l,1,hi,!0))}),Yne=zr(function(l){var d=Ys(l);return hi(d)&&(d=r),_l(Ki(l,1,hi,!0),or(d,2))}),Jne=zr(function(l){var d=Ys(l);return d=typeof d=="function"?d:r,_l(Ki(l,1,hi,!0),r,d)});function Xne(l){return l&&l.length?_l(l):[]}function Zne(l,d){return l&&l.length?_l(l,or(d,2)):[]}function eie(l,d){return d=typeof d=="function"?d:r,l&&l.length?_l(l,r,d):[]}function GA(l){if(!(l&&l.length))return[];var d=0;return l=cn(l,function(x){if(hi(x))return d=Ri(x.length,d),!0}),ml(d,function(x){return _r(l,hl(x))})}function WM(l,d){if(!(l&&l.length))return[];var x=GA(l);return d==null?x:_r(x,function(R){return pt(d,r,R)})}var tie=zr(function(l,d){return hi(l)?pm(l,d):[]}),rie=zr(function(l){return CA(cn(l,hi))}),nie=zr(function(l){var d=Ys(l);return hi(d)&&(d=r),CA(cn(l,hi),or(d,2))}),iie=zr(function(l){var d=Ys(l);return d=typeof d=="function"?d:r,CA(cn(l,hi),r,d)}),aie=zr(GA);function sie(l,d){return dM(l||[],d||[],hm)}function oie(l,d){return dM(l||[],d||[],ym)}var cie=zr(function(l){var d=l.length,x=d>1?l[d-1]:r;return x=typeof x=="function"?(l.pop(),x):r,WM(l,x)});function QM(l){var d=J(l);return d.__chain__=!0,d}function uie(l,d){return d(l),l}function aw(l,d){return d(l)}var lie=iu(function(l){var d=l.length,x=d?l[0]:0,R=this.__wrapped__,z=function(ae){return yA(ae,l)};return d>1||this.__actions__.length||!(R instanceof Zr)||!au(x)?this.thru(z):(R=R.slice(x,+x+(d?1:0)),R.__actions__.push({func:aw,args:[z],thisArg:r}),new Ks(R,this.__chain__).thru(function(ae){return d&&!ae.length&&ae.push(r),ae}))});function fie(){return QM(this)}function die(){return new Ks(this.value(),this.__chain__)}function hie(){this.__values__===r&&(this.__values__=u$(this.value()));var l=this.__index__>=this.__values__.length,d=l?r:this.__values__[this.__index__++];return{done:l,value:d}}function pie(){return this}function gie(l){for(var d,x=this;x instanceof z1;){var R=qM(x);R.__index__=0,R.__values__=r,d?z.__wrapped__=R:d=R;var z=R;x=x.__wrapped__}return z.__wrapped__=l,d}function mie(){var l=this.__wrapped__;if(l instanceof Zr){var d=l;return this.__actions__.length&&(d=new Zr(this)),d=d.reverse(),d.__actions__.push({func:aw,args:[VA],thisArg:r}),new Ks(d,this.__chain__)}return this.thru(VA)}function yie(){return fM(this.__wrapped__,this.__actions__)}var vie=J1(function(l,d,x){An.call(l,x)?++l[x]:ru(l,x,1)});function bie(l,d,x){var R=Nr(l)?xn:ure;return x&&Ma(l,d,x)&&(d=r),R(l,or(d,3))}function wie(l,d){var x=Nr(l)?cn:WD;return x(l,or(d,3))}var _ie=EM(HM),Eie=EM(zM);function xie(l,d){return Ki(sw(l,d),1)}function Aie(l,d){return Ki(sw(l,d),ne)}function Sie(l,d,x){return x=x===r?1:Lr(x),Ki(sw(l,d),x)}function YM(l,d){var x=Nr(l)?Vt:wl;return x(l,or(d,3))}function JM(l,d){var x=Nr(l)?Wr:KD;return x(l,or(d,3))}var Iie=J1(function(l,d,x){An.call(l,x)?l[x].push(d):ru(l,x,[d])});function Oie(l,d,x,R){l=ts(l)?l:hp(l),x=x&&!R?Lr(x):0;var z=l.length;return x<0&&(x=Ri(z+x,0)),fw(l)?x<=z&&l.indexOf(d,x)>-1:!!z&&$o(l,d,x)>-1}var Pie=zr(function(l,d,x){var R=-1,z=typeof d=="function",ae=ts(l)?Xe(l.length):[];return wl(l,function(xe){ae[++R]=z?pt(d,xe,x):gm(xe,d,x)}),ae}),Tie=J1(function(l,d,x){ru(l,x,d)});function sw(l,d){var x=Nr(l)?_r:eM;return x(l,or(d,3))}function Cie(l,d,x,R){return l==null?[]:(Nr(d)||(d=d==null?[]:[d]),x=R?r:x,Nr(x)||(x=x==null?[]:[x]),iM(l,d,x))}var Rie=J1(function(l,d,x){l[x?0:1].push(d)},function(){return[[],[]]});function Nie(l,d,x){var R=Nr(l)?zs:Xf,z=arguments.length<3;return R(l,or(d,4),x,z,wl)}function Die(l,d,x){var R=Nr(l)?mc:Xf,z=arguments.length<3;return R(l,or(d,4),x,z,KD)}function Mie(l,d){var x=Nr(l)?cn:WD;return x(l,uw(or(d,3)))}function $ie(l){var d=Nr(l)?HD:Ore;return d(l)}function kie(l,d,x){(x?Ma(l,d,x):d===r)?d=1:d=Lr(d);var R=Nr(l)?ire:Pre;return R(l,d)}function Lie(l){var d=Nr(l)?are:Cre;return d(l)}function jie(l){if(l==null)return 0;if(ts(l))return fw(l)?Lo(l):l.length;var d=pa(l);return d==yt||d==Pt?l.size:xA(l).length}function Uie(l,d,x){var R=Nr(l)?Pi:Rre;return x&&Ma(l,d,x)&&(d=r),R(l,or(d,3))}var Fie=zr(function(l,d){if(l==null)return[];var x=d.length;return x>1&&Ma(l,d[0],d[1])?d=[]:x>2&&Ma(d[0],d[1],d[2])&&(d=[d[0]]),iM(l,Ki(d,1),[])}),ow=wte||function(){return gr.Date.now()};function Bie(l,d){if(typeof d!="function")throw new Gs(s);return l=Lr(l),function(){if(--l<1)return d.apply(this,arguments)}}function XM(l,d,x){return d=x?r:d,d=l&&d==null?l.length:d,nu(l,p,r,r,r,r,d)}function ZM(l,d){var x;if(typeof d!="function")throw new Gs(s);return l=Lr(l),function(){return--l>0&&(x=d.apply(this,arguments)),l<=1&&(d=r),x}}var KA=zr(function(l,d,x){var R=g;if(x.length){var z=xs(x,fp(KA));R|=I}return nu(l,R,d,x,z)}),e$=zr(function(l,d,x){var R=g|_;if(x.length){var z=xs(x,fp(e$));R|=I}return nu(d,R,l,x,z)});function t$(l,d,x){d=x?r:d;var R=nu(l,S,r,r,r,r,r,d);return R.placeholder=t$.placeholder,R}function r$(l,d,x){d=x?r:d;var R=nu(l,A,r,r,r,r,r,d);return R.placeholder=r$.placeholder,R}function n$(l,d,x){var R,z,ae,xe,De,Fe,at=0,st=!1,lt=!1,It=!0;if(typeof l!="function")throw new Gs(s);d=Js(d)||0,ri(x)&&(st=!!x.leading,lt="maxWait"in x,ae=lt?Ri(Js(x.maxWait)||0,d):ae,It="trailing"in x?!!x.trailing:It);function Wt(pi){var Fo=R,cu=z;return R=z=r,at=pi,xe=l.apply(cu,Fo),xe}function fr(pi){return at=pi,De=wm(Yr,d),st?Wt(pi):xe}function qr(pi){var Fo=pi-Fe,cu=pi-at,E$=d-Fo;return lt?ha(E$,ae-cu):E$}function dr(pi){var Fo=pi-Fe,cu=pi-at;return Fe===r||Fo>=d||Fo<0||lt&&cu>=ae}function Yr(){var pi=ow();if(dr(pi))return nn(pi);De=wm(Yr,qr(pi))}function nn(pi){return De=r,It&&R?Wt(pi):(R=z=r,xe)}function Is(){De!==r&&hM(De),at=0,R=Fe=z=De=r}function $a(){return De===r?xe:nn(ow())}function Os(){var pi=ow(),Fo=dr(pi);if(R=arguments,z=this,Fe=pi,Fo){if(De===r)return fr(Fe);if(lt)return hM(De),De=wm(Yr,d),Wt(Fe)}return De===r&&(De=wm(Yr,d)),xe}return Os.cancel=Is,Os.flush=$a,Os}var qie=zr(function(l,d){return GD(l,1,d)}),Hie=zr(function(l,d,x){return GD(l,Js(d)||0,x)});function zie(l){return nu(l,N)}function cw(l,d){if(typeof l!="function"||d!=null&&typeof d!="function")throw new Gs(s);var x=function(){var R=arguments,z=d?d.apply(this,R):R[0],ae=x.cache;if(ae.has(z))return ae.get(z);var xe=l.apply(this,R);return x.cache=ae.set(z,xe)||ae,xe};return x.cache=new(cw.Cache||tu),x}cw.Cache=tu;function uw(l){if(typeof l!="function")throw new Gs(s);return function(){var d=arguments;switch(d.length){case 0:return!l.call(this);case 1:return!l.call(this,d[0]);case 2:return!l.call(this,d[0],d[1]);case 3:return!l.call(this,d[0],d[1],d[2])}return!l.apply(this,d)}}function Vie(l){return ZM(2,l)}var Gie=Nre(function(l,d){d=d.length==1&&Nr(d[0])?_r(d[0],Li(or())):_r(Ki(d,1),Li(or()));var x=d.length;return zr(function(R){for(var z=-1,ae=ha(R.length,x);++z<ae;)R[z]=d[z].call(this,R[z]);return pt(l,this,R)})}),WA=zr(function(l,d){var x=xs(d,fp(WA));return nu(l,I,r,d,x)}),i$=zr(function(l,d){var x=xs(d,fp(i$));return nu(l,E,r,d,x)}),Kie=iu(function(l,d){return nu(l,O,r,r,r,d)});function Wie(l,d){if(typeof l!="function")throw new Gs(s);return d=d===r?d:Lr(d),zr(l,d)}function Qie(l,d){if(typeof l!="function")throw new Gs(s);return d=d==null?0:Ri(Lr(d),0),zr(function(x){var R=x[d],z=xl(x,0,d);return R&&ki(z,R),pt(l,this,z)})}function Yie(l,d,x){var R=!0,z=!0;if(typeof l!="function")throw new Gs(s);return ri(x)&&(R="leading"in x?!!x.leading:R,z="trailing"in x?!!x.trailing:z),n$(l,d,{leading:R,maxWait:d,trailing:z})}function Jie(l){return XM(l,1)}function Xie(l,d){return WA(NA(d),l)}function Zie(){if(!arguments.length)return[];var l=arguments[0];return Nr(l)?l:[l]}function eae(l){return Ws(l,y)}function tae(l,d){return d=typeof d=="function"?d:r,Ws(l,y,d)}function rae(l){return Ws(l,h|y)}function nae(l,d){return d=typeof d=="function"?d:r,Ws(l,h|y,d)}function iae(l,d){return d==null||VD(l,d,ji(d))}function Uo(l,d){return l===d||l!==l&&d!==d}var aae=tw(wA),sae=tw(function(l,d){return l>=d}),fd=JD(function(){return arguments}())?JD:function(l){return oi(l)&&An.call(l,"callee")&&!LD.call(l,"callee")},Nr=Xe.isArray,oae=Ae?Li(Ae):gre;function ts(l){return l!=null&&lw(l.length)&&!su(l)}function hi(l){return oi(l)&&ts(l)}function cae(l){return l===!0||l===!1||oi(l)&&Da(l)==te}var Al=Ete||aS,uae=Oe?Li(Oe):mre;function lae(l){return oi(l)&&l.nodeType===1&&!_m(l)}function fae(l){if(l==null)return!0;if(ts(l)&&(Nr(l)||typeof l=="string"||typeof l.splice=="function"||Al(l)||dp(l)||fd(l)))return!l.length;var d=pa(l);if(d==yt||d==Pt)return!l.size;if(bm(l))return!xA(l).length;for(var x in l)if(An.call(l,x))return!1;return!0}function dae(l,d){return mm(l,d)}function hae(l,d,x){x=typeof x=="function"?x:r;var R=x?x(l,d):r;return R===r?mm(l,d,r,x):!!R}function QA(l){if(!oi(l))return!1;var d=Da(l);return d==le||d==T||typeof l.message=="string"&&typeof l.name=="string"&&!_m(l)}function pae(l){return typeof l=="number"&&UD(l)}function su(l){if(!ri(l))return!1;var d=Da(l);return d==ze||d==et||d==Y||d==Sr}function a$(l){return typeof l=="number"&&l==Lr(l)}function lw(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=j}function ri(l){var d=typeof l;return l!=null&&(d=="object"||d=="function")}function oi(l){return l!=null&&typeof l=="object"}var s$=Pe?Li(Pe):vre;function gae(l,d){return l===d||EA(l,d,UA(d))}function mae(l,d,x){return x=typeof x=="function"?x:r,EA(l,d,UA(d),x)}function yae(l){return o$(l)&&l!=+l}function vae(l){if(tne(l))throw new Cr(a);return XD(l)}function bae(l){return l===null}function wae(l){return l==null}function o$(l){return typeof l=="number"||oi(l)&&Da(l)==vt}function _m(l){if(!oi(l)||Da(l)!=Ut)return!1;var d=L1(l);if(d===null)return!0;var x=An.call(d,"constructor")&&d.constructor;return typeof x=="function"&&x instanceof x&&D1.call(x)==mte}var YA=Ue?Li(Ue):bre;function _ae(l){return a$(l)&&l>=-j&&l<=j}var c$=Ke?Li(Ke):wre;function fw(l){return typeof l=="string"||!Nr(l)&&oi(l)&&Da(l)==kt}function Ss(l){return typeof l=="symbol"||oi(l)&&Da(l)==Rt}var dp=qe?Li(qe):_re;function Eae(l){return l===r}function xae(l){return oi(l)&&pa(l)==Ft}function Aae(l){return oi(l)&&Da(l)==Gt}var Sae=tw(AA),Iae=tw(function(l,d){return l<=d});function u$(l){if(!l)return[];if(ts(l))return fw(l)?da(l):es(l);if(cm&&l[cm])return Zh(l[cm]());var d=pa(l),x=d==yt?vl:d==Pt?Zc:hp;return x(l)}function ou(l){if(!l)return l===0?l:0;if(l=Js(l),l===ne||l===-ne){var d=l<0?-1:1;return d*B}return l===l?l:0}function Lr(l){var d=ou(l),x=d%1;return d===d?x?d-x:d:0}function l$(l){return l?od(Lr(l),0,M):0}function Js(l){if(typeof l=="number")return l;if(Ss(l))return H;if(ri(l)){var d=typeof l.valueOf=="function"?l.valueOf():l;l=ri(d)?d+"":d}if(typeof l!="string")return l===0?l:+l;l=Zf(l);var x=pr.test(l);return x||rn.test(l)?lr(l.slice(2),x?2:8):Jr.test(l)?H:+l}function f$(l){return bc(l,rs(l))}function Oae(l){return l?od(Lr(l),-j,j):l===0?l:0}function wn(l){return l==null?"":As(l)}var Pae=up(function(l,d){if(bm(d)||ts(d)){bc(d,ji(d),l);return}for(var x in d)An.call(d,x)&&hm(l,x,d[x])}),d$=up(function(l,d){bc(d,rs(d),l)}),dw=up(function(l,d,x,R){bc(d,rs(d),l,R)}),Tae=up(function(l,d,x,R){bc(d,ji(d),l,R)}),Cae=iu(yA);function Rae(l,d){var x=cp(l);return d==null?x:zD(x,d)}var Nae=zr(function(l,d){l=Nn(l);var x=-1,R=d.length,z=R>2?d[2]:r;for(z&&Ma(d[0],d[1],z)&&(R=1);++x<R;)for(var ae=d[x],xe=rs(ae),De=-1,Fe=xe.length;++De<Fe;){var at=xe[De],st=l[at];(st===r||Uo(st,ap[at])&&!An.call(l,at))&&(l[at]=ae[at])}return l}),Dae=zr(function(l){return l.push(r,TM),pt(h$,r,l)});function Mae(l,d){return bn(l,or(d,3),vc)}function $ae(l,d){return bn(l,or(d,3),bA)}function kae(l,d){return l==null?l:vA(l,or(d,3),rs)}function Lae(l,d){return l==null?l:QD(l,or(d,3),rs)}function jae(l,d){return l&&vc(l,or(d,3))}function Uae(l,d){return l&&bA(l,or(d,3))}function Fae(l){return l==null?[]:K1(l,ji(l))}function Bae(l){return l==null?[]:K1(l,rs(l))}function JA(l,d,x){var R=l==null?r:cd(l,d);return R===r?x:R}function qae(l,d){return l!=null&&NM(l,d,fre)}function XA(l,d){return l!=null&&NM(l,d,dre)}var Hae=AM(function(l,d,x){d!=null&&typeof d.toString!="function"&&(d=M1.call(d)),l[d]=x},eS(ns)),zae=AM(function(l,d,x){d!=null&&typeof d.toString!="function"&&(d=M1.call(d)),An.call(l,d)?l[d].push(x):l[d]=[x]},or),Vae=zr(gm);function ji(l){return ts(l)?qD(l):xA(l)}function rs(l){return ts(l)?qD(l,!0):Ere(l)}function Gae(l,d){var x={};return d=or(d,3),vc(l,function(R,z,ae){ru(x,d(R,z,ae),R)}),x}function Kae(l,d){var x={};return d=or(d,3),vc(l,function(R,z,ae){ru(x,z,d(R,z,ae))}),x}var Wae=up(function(l,d,x){W1(l,d,x)}),h$=up(function(l,d,x,R){W1(l,d,x,R)}),Qae=iu(function(l,d){var x={};if(l==null)return x;var R=!1;d=_r(d,function(ae){return ae=El(ae,l),R||(R=ae.length>1),ae}),bc(l,LA(l),x),R&&(x=Ws(x,h|m|y,Hre));for(var z=d.length;z--;)TA(x,d[z]);return x});function Yae(l,d){return p$(l,uw(or(d)))}var Jae=iu(function(l,d){return l==null?{}:Are(l,d)});function p$(l,d){if(l==null)return{};var x=_r(LA(l),function(R){return[R]});return d=or(d),aM(l,x,function(R,z){return d(R,z[0])})}function Xae(l,d,x){d=El(d,l);var R=-1,z=d.length;for(z||(z=1,l=r);++R<z;){var ae=l==null?r:l[wc(d[R])];ae===r&&(R=z,ae=x),l=su(ae)?ae.call(l):ae}return l}function Zae(l,d,x){return l==null?l:ym(l,d,x)}function ese(l,d,x,R){return R=typeof R=="function"?R:r,l==null?l:ym(l,d,x,R)}var g$=OM(ji),m$=OM(rs);function tse(l,d,x){var R=Nr(l),z=R||Al(l)||dp(l);if(d=or(d,4),x==null){var ae=l&&l.constructor;z?x=R?new ae:[]:ri(l)?x=su(ae)?cp(L1(l)):{}:x={}}return(z?Vt:vc)(l,function(xe,De,Fe){return d(x,xe,De,Fe)}),x}function rse(l,d){return l==null?!0:TA(l,d)}function nse(l,d,x){return l==null?l:lM(l,d,NA(x))}function ise(l,d,x,R){return R=typeof R=="function"?R:r,l==null?l:lM(l,d,NA(x),R)}function hp(l){return l==null?[]:yl(l,ji(l))}function ase(l){return l==null?[]:yl(l,rs(l))}function sse(l,d,x){return x===r&&(x=d,d=r),x!==r&&(x=Js(x),x=x===x?x:0),d!==r&&(d=Js(d),d=d===d?d:0),od(Js(l),d,x)}function ose(l,d,x){return d=ou(d),x===r?(x=d,d=0):x=ou(x),l=Js(l),hre(l,d,x)}function cse(l,d,x){if(x&&typeof x!="boolean"&&Ma(l,d,x)&&(d=x=r),x===r&&(typeof d=="boolean"?(x=d,d=r):typeof l=="boolean"&&(x=l,l=r)),l===r&&d===r?(l=0,d=1):(l=ou(l),d===r?(d=l,l=0):d=ou(d)),l>d){var R=l;l=d,d=R}if(x||l%1||d%1){var z=FD();return ha(l+z*(d-l+Kr("1e-"+((z+"").length-1))),d)}return IA(l,d)}var use=lp(function(l,d,x){return d=d.toLowerCase(),l+(x?y$(d):d)});function y$(l){return ZA(wn(l).toLowerCase())}function v$(l){return l=wn(l),l&&l.replace($r,Wh).replace(vn,"")}function lse(l,d,x){l=wn(l),d=As(d);var R=l.length;x=x===r?R:od(Lr(x),0,R);var z=x;return x-=d.length,x>=0&&l.slice(x,z)==d}function fse(l){return l=wn(l),l&&Ir.test(l)?l.replace(Tr,Qh):l}function dse(l){return l=wn(l),l&&dt.test(l)?l.replace(ot,"\\$&"):l}var hse=lp(function(l,d,x){return l+(x?"-":"")+d.toLowerCase()}),pse=lp(function(l,d,x){return l+(x?" ":"")+d.toLowerCase()}),gse=_M("toLowerCase");function mse(l,d,x){l=wn(l),d=Lr(d);var R=d?Lo(l):0;if(!d||R>=d)return l;var z=(d-R)/2;return ew(B1(z),x)+l+ew(F1(z),x)}function yse(l,d,x){l=wn(l),d=Lr(d);var R=d?Lo(l):0;return d&&R<d?l+ew(d-R,x):l}function vse(l,d,x){l=wn(l),d=Lr(d);var R=d?Lo(l):0;return d&&R<d?ew(d-R,x)+l:l}function bse(l,d,x){return x||d==null?d=0:d&&(d=+d),Ite(wn(l).replace(Et,""),d||0)}function wse(l,d,x){return(x?Ma(l,d,x):d===r)?d=1:d=Lr(d),OA(wn(l),d)}function _se(){var l=arguments,d=wn(l[0]);return l.length<3?d:d.replace(l[1],l[2])}var Ese=lp(function(l,d,x){return l+(x?"_":"")+d.toLowerCase()});function xse(l,d,x){return x&&typeof x!="number"&&Ma(l,d,x)&&(d=x=r),x=x===r?M:x>>>0,x?(l=wn(l),l&&(typeof d=="string"||d!=null&&!YA(d))&&(d=As(d),!d&&ko(l))?xl(da(l),0,x):l.split(d,x)):[]}var Ase=lp(function(l,d,x){return l+(x?" ":"")+ZA(d)});function Sse(l,d,x){return l=wn(l),x=x==null?0:od(Lr(x),0,l.length),d=As(d),l.slice(x,x+d.length)==d}function Ise(l,d,x){var R=J.templateSettings;x&&Ma(l,d,x)&&(d=r),l=wn(l),d=dw({},d,R,PM);var z=dw({},d.imports,R.imports,PM),ae=ji(z),xe=yl(z,ae),De,Fe,at=0,st=d.interpolate||fn,lt="__p += '",It=dA((d.escape||fn).source+"|"+st.source+"|"+(st===ye?hr:fn).source+"|"+(d.evaluate||fn).source+"|$","g"),Wt="//# sourceURL="+(An.call(d,"sourceURL")?(d.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Za+"]")+`
142
+ `;l.replace(It,function(dr,Yr,nn,Is,$a,Os){return nn||(nn=Is),lt+=l.slice(at,Os).replace(kr,Yh),Yr&&(De=!0,lt+=`' +
143
+ __e(`+Yr+`) +
144
+ '`),$a&&(Fe=!0,lt+=`';
145
+ `+$a+`;
146
+ __p += '`),nn&&(lt+=`' +
147
+ ((__t = (`+nn+`)) == null ? '' : __t) +
148
+ '`),at=Os+dr.length,dr}),lt+=`';
149
+ `;var fr=An.call(d,"variable")&&d.variable;if(!fr)lt=`with (obj) {
150
+ `+lt+`
151
+ }
152
+ `;else if(wt.test(fr))throw new Cr(o);lt=(Fe?lt.replace(li,""):lt).replace(Mn,"$1").replace($n,"$1;"),lt="function("+(fr||"obj")+`) {
153
+ `+(fr?"":`obj || (obj = {});
154
+ `)+"var __t, __p = ''"+(De?", __e = _.escape":"")+(Fe?`, __j = Array.prototype.join;
155
+ function print() { __p += __j.call(arguments, '') }
156
+ `:`;
157
+ `)+lt+`return __p
158
+ }`;var qr=w$(function(){return mn(ae,Wt+"return "+lt).apply(r,xe)});if(qr.source=lt,QA(qr))throw qr;return qr}function Ose(l){return wn(l).toLowerCase()}function Pse(l){return wn(l).toUpperCase()}function Tse(l,d,x){if(l=wn(l),l&&(x||d===r))return Zf(l);if(!l||!(d=As(d)))return l;var R=da(l),z=da(d),ae=ed(R,z),xe=td(R,z)+1;return xl(R,ae,xe).join("")}function Cse(l,d,x){if(l=wn(l),l&&(x||d===r))return l.slice(0,nd(l)+1);if(!l||!(d=As(d)))return l;var R=da(l),z=td(R,da(d))+1;return xl(R,0,z).join("")}function Rse(l,d,x){if(l=wn(l),l&&(x||d===r))return l.replace(Et,"");if(!l||!(d=As(d)))return l;var R=da(l),z=ed(R,da(d));return xl(R,z).join("")}function Nse(l,d){var x=F,R=V;if(ri(d)){var z="separator"in d?d.separator:z;x="length"in d?Lr(d.length):x,R="omission"in d?As(d.omission):R}l=wn(l);var ae=l.length;if(ko(l)){var xe=da(l);ae=xe.length}if(x>=ae)return l;var De=x-Lo(R);if(De<1)return R;var Fe=xe?xl(xe,0,De).join(""):l.slice(0,De);if(z===r)return Fe+R;if(xe&&(De+=Fe.length-De),YA(z)){if(l.slice(De).search(z)){var at,st=Fe;for(z.global||(z=dA(z.source,wn(ur.exec(z))+"g")),z.lastIndex=0;at=z.exec(st);)var lt=at.index;Fe=Fe.slice(0,lt===r?De:lt)}}else if(l.indexOf(As(z),De)!=De){var It=Fe.lastIndexOf(z);It>-1&&(Fe=Fe.slice(0,It))}return Fe+R}function Dse(l){return l=wn(l),l&&Ur.test(l)?l.replace(Zn,np):l}var Mse=lp(function(l,d,x){return l+(x?" ":"")+d.toUpperCase()}),ZA=_M("toUpperCase");function b$(l,d,x){return l=wn(l),d=x?r:d,d===r?Xh(l)?fte(l):si(l):l.match(d)||[]}var w$=zr(function(l,d){try{return pt(l,r,d)}catch(x){return QA(x)?x:new Cr(x)}}),$se=iu(function(l,d){return Vt(d,function(x){x=wc(x),ru(l,x,KA(l[x],l))}),l});function kse(l){var d=l==null?0:l.length,x=or();return l=d?_r(l,function(R){if(typeof R[1]!="function")throw new Gs(s);return[x(R[0]),R[1]]}):[],zr(function(R){for(var z=-1;++z<d;){var ae=l[z];if(pt(ae[0],this,R))return pt(ae[1],this,R)}})}function Lse(l){return cre(Ws(l,h))}function eS(l){return function(){return l}}function jse(l,d){return l==null||l!==l?d:l}var Use=xM(),Fse=xM(!0);function ns(l){return l}function tS(l){return ZD(typeof l=="function"?l:Ws(l,h))}function Bse(l){return tM(Ws(l,h))}function qse(l,d){return rM(l,Ws(d,h))}var Hse=zr(function(l,d){return function(x){return gm(x,l,d)}}),zse=zr(function(l,d){return function(x){return gm(l,x,d)}});function rS(l,d,x){var R=ji(d),z=K1(d,R);x==null&&!(ri(d)&&(z.length||!R.length))&&(x=d,d=l,l=this,z=K1(d,ji(d)));var ae=!(ri(x)&&"chain"in x)||!!x.chain,xe=su(l);return Vt(z,function(De){var Fe=d[De];l[De]=Fe,xe&&(l.prototype[De]=function(){var at=this.__chain__;if(ae||at){var st=l(this.__wrapped__),lt=st.__actions__=es(this.__actions__);return lt.push({func:Fe,args:arguments,thisArg:l}),st.__chain__=at,st}return Fe.apply(l,ki([this.value()],arguments))})}),l}function Vse(){return gr._===this&&(gr._=yte),this}function nS(){}function Gse(l){return l=Lr(l),zr(function(d){return nM(d,l)})}var Kse=MA(_r),Wse=MA(xn),Qse=MA(Pi);function _$(l){return BA(l)?hl(wc(l)):Sre(l)}function Yse(l){return function(d){return l==null?r:cd(l,d)}}var Jse=SM(),Xse=SM(!0);function iS(){return[]}function aS(){return!1}function Zse(){return{}}function eoe(){return""}function toe(){return!0}function roe(l,d){if(l=Lr(l),l<1||l>j)return[];var x=M,R=ha(l,M);d=or(d),l-=M;for(var z=ml(R,d);++x<l;)d(x);return z}function noe(l){return Nr(l)?_r(l,wc):Ss(l)?[l]:es(BM(wn(l)))}function ioe(l){var d=++gte;return wn(l)+d}var aoe=Z1(function(l,d){return l+d},0),soe=$A("ceil"),ooe=Z1(function(l,d){return l/d},1),coe=$A("floor");function uoe(l){return l&&l.length?G1(l,ns,wA):r}function loe(l,d){return l&&l.length?G1(l,or(d,2),wA):r}function foe(l){return Jf(l,ns)}function doe(l,d){return Jf(l,or(d,2))}function hoe(l){return l&&l.length?G1(l,ns,AA):r}function poe(l,d){return l&&l.length?G1(l,or(d,2),AA):r}var goe=Z1(function(l,d){return l*d},1),moe=$A("round"),yoe=Z1(function(l,d){return l-d},0);function voe(l){return l&&l.length?gl(l,ns):0}function boe(l,d){return l&&l.length?gl(l,or(d,2)):0}return J.after=Bie,J.ary=XM,J.assign=Pae,J.assignIn=d$,J.assignInWith=dw,J.assignWith=Tae,J.at=Cae,J.before=ZM,J.bind=KA,J.bindAll=$se,J.bindKey=e$,J.castArray=Zie,J.chain=QM,J.chunk=cne,J.compact=une,J.concat=lne,J.cond=kse,J.conforms=Lse,J.constant=eS,J.countBy=vie,J.create=Rae,J.curry=t$,J.curryRight=r$,J.debounce=n$,J.defaults=Nae,J.defaultsDeep=Dae,J.defer=qie,J.delay=Hie,J.difference=fne,J.differenceBy=dne,J.differenceWith=hne,J.drop=pne,J.dropRight=gne,J.dropRightWhile=mne,J.dropWhile=yne,J.fill=vne,J.filter=wie,J.flatMap=xie,J.flatMapDeep=Aie,J.flatMapDepth=Sie,J.flatten=VM,J.flattenDeep=bne,J.flattenDepth=wne,J.flip=zie,J.flow=Use,J.flowRight=Fse,J.fromPairs=_ne,J.functions=Fae,J.functionsIn=Bae,J.groupBy=Iie,J.initial=xne,J.intersection=Ane,J.intersectionBy=Sne,J.intersectionWith=Ine,J.invert=Hae,J.invertBy=zae,J.invokeMap=Pie,J.iteratee=tS,J.keyBy=Tie,J.keys=ji,J.keysIn=rs,J.map=sw,J.mapKeys=Gae,J.mapValues=Kae,J.matches=Bse,J.matchesProperty=qse,J.memoize=cw,J.merge=Wae,J.mergeWith=h$,J.method=Hse,J.methodOf=zse,J.mixin=rS,J.negate=uw,J.nthArg=Gse,J.omit=Qae,J.omitBy=Yae,J.once=Vie,J.orderBy=Cie,J.over=Kse,J.overArgs=Gie,J.overEvery=Wse,J.overSome=Qse,J.partial=WA,J.partialRight=i$,J.partition=Rie,J.pick=Jae,J.pickBy=p$,J.property=_$,J.propertyOf=Yse,J.pull=Cne,J.pullAll=KM,J.pullAllBy=Rne,J.pullAllWith=Nne,J.pullAt=Dne,J.range=Jse,J.rangeRight=Xse,J.rearg=Kie,J.reject=Mie,J.remove=Mne,J.rest=Wie,J.reverse=VA,J.sampleSize=kie,J.set=Zae,J.setWith=ese,J.shuffle=Lie,J.slice=$ne,J.sortBy=Fie,J.sortedUniq=qne,J.sortedUniqBy=Hne,J.split=xse,J.spread=Qie,J.tail=zne,J.take=Vne,J.takeRight=Gne,J.takeRightWhile=Kne,J.takeWhile=Wne,J.tap=uie,J.throttle=Yie,J.thru=aw,J.toArray=u$,J.toPairs=g$,J.toPairsIn=m$,J.toPath=noe,J.toPlainObject=f$,J.transform=tse,J.unary=Jie,J.union=Qne,J.unionBy=Yne,J.unionWith=Jne,J.uniq=Xne,J.uniqBy=Zne,J.uniqWith=eie,J.unset=rse,J.unzip=GA,J.unzipWith=WM,J.update=nse,J.updateWith=ise,J.values=hp,J.valuesIn=ase,J.without=tie,J.words=b$,J.wrap=Xie,J.xor=rie,J.xorBy=nie,J.xorWith=iie,J.zip=aie,J.zipObject=sie,J.zipObjectDeep=oie,J.zipWith=cie,J.entries=g$,J.entriesIn=m$,J.extend=d$,J.extendWith=dw,rS(J,J),J.add=aoe,J.attempt=w$,J.camelCase=use,J.capitalize=y$,J.ceil=soe,J.clamp=sse,J.clone=eae,J.cloneDeep=rae,J.cloneDeepWith=nae,J.cloneWith=tae,J.conformsTo=iae,J.deburr=v$,J.defaultTo=jse,J.divide=ooe,J.endsWith=lse,J.eq=Uo,J.escape=fse,J.escapeRegExp=dse,J.every=bie,J.find=_ie,J.findIndex=HM,J.findKey=Mae,J.findLast=Eie,J.findLastIndex=zM,J.findLastKey=$ae,J.floor=coe,J.forEach=YM,J.forEachRight=JM,J.forIn=kae,J.forInRight=Lae,J.forOwn=jae,J.forOwnRight=Uae,J.get=JA,J.gt=aae,J.gte=sae,J.has=qae,J.hasIn=XA,J.head=GM,J.identity=ns,J.includes=Oie,J.indexOf=Ene,J.inRange=ose,J.invoke=Vae,J.isArguments=fd,J.isArray=Nr,J.isArrayBuffer=oae,J.isArrayLike=ts,J.isArrayLikeObject=hi,J.isBoolean=cae,J.isBuffer=Al,J.isDate=uae,J.isElement=lae,J.isEmpty=fae,J.isEqual=dae,J.isEqualWith=hae,J.isError=QA,J.isFinite=pae,J.isFunction=su,J.isInteger=a$,J.isLength=lw,J.isMap=s$,J.isMatch=gae,J.isMatchWith=mae,J.isNaN=yae,J.isNative=vae,J.isNil=wae,J.isNull=bae,J.isNumber=o$,J.isObject=ri,J.isObjectLike=oi,J.isPlainObject=_m,J.isRegExp=YA,J.isSafeInteger=_ae,J.isSet=c$,J.isString=fw,J.isSymbol=Ss,J.isTypedArray=dp,J.isUndefined=Eae,J.isWeakMap=xae,J.isWeakSet=Aae,J.join=One,J.kebabCase=hse,J.last=Ys,J.lastIndexOf=Pne,J.lowerCase=pse,J.lowerFirst=gse,J.lt=Sae,J.lte=Iae,J.max=uoe,J.maxBy=loe,J.mean=foe,J.meanBy=doe,J.min=hoe,J.minBy=poe,J.stubArray=iS,J.stubFalse=aS,J.stubObject=Zse,J.stubString=eoe,J.stubTrue=toe,J.multiply=goe,J.nth=Tne,J.noConflict=Vse,J.noop=nS,J.now=ow,J.pad=mse,J.padEnd=yse,J.padStart=vse,J.parseInt=bse,J.random=cse,J.reduce=Nie,J.reduceRight=Die,J.repeat=wse,J.replace=_se,J.result=Xae,J.round=moe,J.runInContext=je,J.sample=$ie,J.size=jie,J.snakeCase=Ese,J.some=Uie,J.sortedIndex=kne,J.sortedIndexBy=Lne,J.sortedIndexOf=jne,J.sortedLastIndex=Une,J.sortedLastIndexBy=Fne,J.sortedLastIndexOf=Bne,J.startCase=Ase,J.startsWith=Sse,J.subtract=yoe,J.sum=voe,J.sumBy=boe,J.template=Ise,J.times=roe,J.toFinite=ou,J.toInteger=Lr,J.toLength=l$,J.toLower=Ose,J.toNumber=Js,J.toSafeInteger=Oae,J.toString=wn,J.toUpper=Pse,J.trim=Tse,J.trimEnd=Cse,J.trimStart=Rse,J.truncate=Nse,J.unescape=Dse,J.uniqueId=ioe,J.upperCase=Mse,J.upperFirst=ZA,J.each=YM,J.eachRight=JM,J.first=GM,rS(J,function(){var l={};return vc(J,function(d,x){An.call(J.prototype,x)||(l[x]=d)}),l}(),{chain:!1}),J.VERSION=n,Vt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){J[l].placeholder=J}),Vt(["drop","take"],function(l,d){Zr.prototype[l]=function(x){x=x===r?1:Ri(Lr(x),0);var R=this.__filtered__&&!d?new Zr(this):this.clone();return R.__filtered__?R.__takeCount__=ha(x,R.__takeCount__):R.__views__.push({size:ha(x,M),type:l+(R.__dir__<0?"Right":"")}),R},Zr.prototype[l+"Right"]=function(x){return this.reverse()[l](x).reverse()}}),Vt(["filter","map","takeWhile"],function(l,d){var x=d+1,R=x==U||x==Q;Zr.prototype[l]=function(z){var ae=this.clone();return ae.__iteratees__.push({iteratee:or(z,3),type:x}),ae.__filtered__=ae.__filtered__||R,ae}}),Vt(["head","last"],function(l,d){var x="take"+(d?"Right":"");Zr.prototype[l]=function(){return this[x](1).value()[0]}}),Vt(["initial","tail"],function(l,d){var x="drop"+(d?"":"Right");Zr.prototype[l]=function(){return this.__filtered__?new Zr(this):this[x](1)}}),Zr.prototype.compact=function(){return this.filter(ns)},Zr.prototype.find=function(l){return this.filter(l).head()},Zr.prototype.findLast=function(l){return this.reverse().find(l)},Zr.prototype.invokeMap=zr(function(l,d){return typeof l=="function"?new Zr(this):this.map(function(x){return gm(x,l,d)})}),Zr.prototype.reject=function(l){return this.filter(uw(or(l)))},Zr.prototype.slice=function(l,d){l=Lr(l);var x=this;return x.__filtered__&&(l>0||d<0)?new Zr(x):(l<0?x=x.takeRight(-l):l&&(x=x.drop(l)),d!==r&&(d=Lr(d),x=d<0?x.dropRight(-d):x.take(d-l)),x)},Zr.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Zr.prototype.toArray=function(){return this.take(M)},vc(Zr.prototype,function(l,d){var x=/^(?:filter|find|map|reject)|While$/.test(d),R=/^(?:head|last)$/.test(d),z=J[R?"take"+(d=="last"?"Right":""):d],ae=R||/^find/.test(d);z&&(J.prototype[d]=function(){var xe=this.__wrapped__,De=R?[1]:arguments,Fe=xe instanceof Zr,at=De[0],st=Fe||Nr(xe),lt=function(Yr){var nn=z.apply(J,ki([Yr],De));return R&&It?nn[0]:nn};st&&x&&typeof at=="function"&&at.length!=1&&(Fe=st=!1);var It=this.__chain__,Wt=!!this.__actions__.length,fr=ae&&!It,qr=Fe&&!Wt;if(!ae&&st){xe=qr?xe:new Zr(this);var dr=l.apply(xe,De);return dr.__actions__.push({func:aw,args:[lt],thisArg:r}),new Ks(dr,It)}return fr&&qr?l.apply(this,De):(dr=this.thru(lt),fr?R?dr.value()[0]:dr.value():dr)})}),Vt(["pop","push","shift","sort","splice","unshift"],function(l){var d=R1[l],x=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",R=/^(?:pop|shift)$/.test(l);J.prototype[l]=function(){var z=arguments;if(R&&!this.__chain__){var ae=this.value();return d.apply(Nr(ae)?ae:[],z)}return this[x](function(xe){return d.apply(Nr(xe)?xe:[],z)})}}),vc(Zr.prototype,function(l,d){var x=J[d];if(x){var R=x.name+"";An.call(op,R)||(op[R]=[]),op[R].push({name:d,func:x})}}),op[X1(r,_).name]=[{name:"wrapper",func:r}],Zr.prototype.clone=Dte,Zr.prototype.reverse=Mte,Zr.prototype.value=$te,J.prototype.at=lie,J.prototype.chain=fie,J.prototype.commit=die,J.prototype.next=hie,J.prototype.plant=gie,J.prototype.reverse=mie,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=yie,J.prototype.first=J.prototype.head,cm&&(J.prototype[cm]=pie),J},ip=dte();C?((C.exports=ip)._=ip,ie._=ip):gr._=ip}).call(Oy)})(nN,nN.exports);var cTe=Object.defineProperty,uTe=Object.defineProperties,lTe=Object.getOwnPropertyDescriptors,TH=Object.getOwnPropertySymbols,fTe=Object.prototype.hasOwnProperty,dTe=Object.prototype.propertyIsEnumerable,CH=(t,e,r)=>e in t?cTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Jw=(t,e)=>{for(var r in e||(e={}))fTe.call(e,r)&&CH(t,r,e[r]);if(TH)for(var r of TH(e))dTe.call(e,r)&&CH(t,r,e[r]);return t},hTe=(t,e)=>uTe(t,lTe(e));function Cf(t,e,r){var n;const i=jAe(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${oTe}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function qh(t){return t.includes(":")?t.split(":")[1]:t}function $Z(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function pTe(t,e){const r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];const n=[];return r.forEach(i=>{const a=e.namespaces[i].accounts;n.push(...a)}),n}function gTe(t={},e={}){const r=RH(t),n=RH(e);return nN.exports.merge(r,n)}function RH(t){var e,r,n,i;const a={};if(!y0(t))return a;for(const[s,o]of Object.entries(t)){const c=F4(s)?[s]:o.chains,u=o.methods||[],f=o.events||[],h=o.rpcMap||{},m=nv(s);a[m]=hTe(Jw(Jw({},a[m]),o),{chains:NT(c,(e=a[m])==null?void 0:e.chains),methods:NT(u,(r=a[m])==null?void 0:r.methods),events:NT(f,(n=a[m])==null?void 0:n.events),rpcMap:Jw(Jw({},h),(i=a[m])==null?void 0:i.rpcMap)})}return a}function mTe(t){return t.includes(":")?t.split(":")[2]:t}function yTe(t){const e={};for(const[r,n]of Object.entries(t)){const i=n.methods||[],a=n.events||[],s=n.accounts||[],o=F4(r)?[r]:n.chains?n.chains:$Z(n.accounts);e[r]={chains:o,methods:i,events:a,accounts:s}}return e}function zT(t){return typeof t=="number"?t:t.includes("0x")?parseInt(t,16):t.includes(":")?Number(t.split(":")[1]):Number(t)}const kZ={},Yn=t=>kZ[t],VT=(t,e)=>{kZ[t]=e};class vTe{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Yn("events"),this.client=Yn("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(dl.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 n;const i=qh(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[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 n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Cf(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new fl(new Vf(n,Yn("disableProviderPing")))}}class bTe{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Yn("events"),this.client=Yn("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.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(dl.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 n=r||Cf(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new fl(new Vf(n,Yn("disableProviderPing")))}setHttpProvider(e,r){const n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach(r=>{var n;const i=parseInt(qh(r));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[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}async handleSwitchChain(e){var r,n;let i=e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const a=parseInt(i,16);if(this.isChainApproved(a))this.setDefaultChain(`${a}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${a}`);else throw new Error(`Failed to switch to chain 'eip155:${a}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class wTe{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Yn("events"),this.client=Yn("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(dl.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 n;const i=qh(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[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 n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Cf(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new fl(new Vf(n,Yn("disableProviderPing")))}}class _Te{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Yn("events"),this.client=Yn("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(dl.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 n;const i=qh(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[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 n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Cf(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new fl(new Vf(n,Yn("disableProviderPing")))}}class ETe{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Yn("events"),this.client=Yn("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(dl.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 n=this.getCardanoRPCUrl(r),i=qh(r);e[i]=this.createHttpProvider(i,n)}),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 n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new fl(new Vf(n,Yn("disableProviderPing")))}}class xTe{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Yn("events"),this.client=Yn("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(dl.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 n;const i=qh(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[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 n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Cf(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new fl(new Vf(n,Yn("disableProviderPing")))}}class ATe{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Yn("events"),this.client=Yn("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(dl.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 n;const i=qh(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[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 n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Cf(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new fl(new Vf(n,Yn("disableProviderPing")))}}class STe{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Yn("events"),this.client=Yn("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 n=r||Cf(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(dl.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 n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[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 n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){const n=r||Cf(e,this.namespace);return typeof n>"u"?void 0:new fl(new Vf(n,Yn("disableProviderPing")))}}var ITe=Object.defineProperty,OTe=Object.defineProperties,PTe=Object.getOwnPropertyDescriptors,NH=Object.getOwnPropertySymbols,TTe=Object.prototype.hasOwnProperty,CTe=Object.prototype.propertyIsEnumerable,DH=(t,e,r)=>e in t?ITe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xw=(t,e)=>{for(var r in e||(e={}))TTe.call(e,r)&&DH(t,r,e[r]);if(NH)for(var r of NH(e))CTe.call(e,r)&&DH(t,r,e[r]);return t},GT=(t,e)=>OTe(t,PTe(e));class Y4{constructor(e){this.events=new d4,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:an.pino(an.getDefaultLoggerOptions({level:(e==null?void 0:e.logger)||OH})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const r=new Y4(e);return await r.initialize(),r}async request(e,r){const[n,i]=this.validateChain(r);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:Xw({},e),chainId:`${n}:${i}`,topic:this.session.topic})}sendAsync(e,r,n){this.request(e,n).then(i=>r(null,i)).catch(i=>r(i,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:vi("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.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}async pair(e){this.shouldAbortPairingAttempt=!1;let r=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(r>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await i().then(a=>{this.session=a,this.namespaces||(this.namespaces=yTe(a.namespaces),this.persist("namespaces",this.namespaces))}).catch(a=>{if(a.message!==DZ)throw a;r++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,r){try{if(!this.session)return;const[n,i]=this.validateChain(e);this.getProvider(n).setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const r=this.client.pairing.getAll();if(Kc(r)){for(const n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await eTe.init({logger:this.providerOpts.logger||OH,relayUrl:this.providerOpts.relayUrl||iTe,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.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=>nv(r)))];VT("client",this.client),VT("events",this.events),VT("disableProviderPing",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;const n=pTe(r,this.session),i=$Z(n),a=gTe(this.namespaces,this.optionalNamespaces),s=GT(Xw({},a[r]),{accounts:n,chains:i});switch(r){case"eip155":this.rpcProviders[r]=new bTe({namespace:s});break;case"solana":this.rpcProviders[r]=new wTe({namespace:s});break;case"cosmos":this.rpcProviders[r]=new _Te({namespace:s});break;case"polkadot":this.rpcProviders[r]=new vTe({namespace:s});break;case"cip34":this.rpcProviders[r]=new ETe({namespace:s});break;case"elrond":this.rpcProviders[r]=new xTe({namespace:s});break;case"multiversx":this.rpcProviders[r]=new ATe({namespace:s});break;case"near":this.rpcProviders[r]=new STe({namespace:s});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:r}=e,{event:n}=r;if(n.name==="accountsChanged"){const i=n.data;i&&Kc(i)&&this.events.emit("accountsChanged",i.map(mTe))}else if(n.name==="chainChanged"){const i=r.chainId,a=r.event.data,s=nv(i),o=zT(i)!==zT(a)?`${s}:${zT(a)}`:i;this.onChainChanged(o)}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:r})=>{var n;const{namespaces:i}=r,a=(n=this.client)==null?void 0:n.session.get(e);this.session=GT(Xw({},a),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",GT(Xw({},vi("USER_DISCONNECTED")),{data:e.topic}))}),this.on(dl.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!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((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){const{namespaces:r,optionalNamespaces:n,sessionProperties:i}=e;r&&Object.keys(r).length&&(this.namespaces=r),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=i,this.persist("namespaces",r),this.persist("optionalNamespaces",n)}validateChain(e){const[r,n]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,n];if(r&&!Object.keys(this.namespaces||{}).map(s=>nv(s)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];const i=nv(Object.keys(this.namespaces)[0]),a=this.rpcProviders[i].getDefaultChain();return[i,a]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,r=!1){var n;if(!this.namespaces)return;const[i,a]=this.validateChain(e);r||this.getProvider(i).setDefaultChain(a),((n=this.namespaces[i])!=null?n:this.namespaces[`${i}:${a}`]).defaultChain=a,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",a)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,r){this.client.core.storage.setItem(`${PH}/${e}`,r)}async getFromStore(e){return await this.client.core.storage.getItem(`${PH}/${e}`)}}const RTe=Y4,NTe="wc",DTe="ethereum_provider",MTe=`${NTe}@2:${DTe}:`,$Te="https://rpc.walletconnect.com/v1/",GE=["eth_sendTransaction","personal_sign"],LZ=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],KE=["chainChanged","accountsChanged"],jZ=["chainChanged","accountsChanged","message","disconnect","connect"];var kTe=Object.defineProperty,LTe=Object.defineProperties,jTe=Object.getOwnPropertyDescriptors,MH=Object.getOwnPropertySymbols,UTe=Object.prototype.hasOwnProperty,FTe=Object.prototype.propertyIsEnumerable,$H=(t,e,r)=>e in t?kTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,av=(t,e)=>{for(var r in e||(e={}))UTe.call(e,r)&&$H(t,r,e[r]);if(MH)for(var r of MH(e))FTe.call(e,r)&&$H(t,r,e[r]);return t},kH=(t,e)=>LTe(t,jTe(e));function WE(t){return Number(t[0].split(":")[1])}function KT(t){return`0x${t.toString(16)}`}function BTe(t){const{chains:e,optionalChains:r,methods:n,optionalMethods:i,events:a,optionalEvents:s,rpcMap:o}=t;if(!Kc(e))throw new Error("Invalid chains");const c={chains:e,methods:n||GE,events:a||KE,rpcMap:av({},e.length?{[WE(e)]:o[WE(e)]}:{})},u=a==null?void 0:a.filter(y=>!KE.includes(y)),f=n==null?void 0:n.filter(y=>!GE.includes(y));if(!r&&!s&&!i&&!(u!=null&&u.length)&&!(f!=null&&f.length))return{required:e.length?c:void 0};const h=(u==null?void 0:u.length)&&(f==null?void 0:f.length)||!r,m={chains:[...new Set(h?c.chains.concat(r||[]):r)],methods:[...new Set(c.methods.concat(i!=null&&i.length?i:LZ))],events:[...new Set(c.events.concat(s!=null&&s.length?s:jZ))],rpcMap:o};return{required:e.length?c:void 0,optional:r.length?m:void 0}}let UZ=class FZ{constructor(){this.events=new Es.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=MTe,this.on=(e,r)=>(this.events.on(e,r),this),this.once=(e,r)=>(this.events.once(e,r),this),this.removeListener=(e,r)=>(this.events.removeListener(e,r),this),this.off=(e,r)=>(this.events.off(e,r),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const r=new FZ;return await r.initialize(e),r}async request(e){return await this.signer.request(e,this.formatChainId(this.chainId))}sendAsync(e,r){this.signer.sendAsync(e,r,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:r,optional:n}=BTe(this.rpc);try{const i=await new Promise(async(s,o)=>{var c;this.rpc.showQrModal&&((c=this.modal)==null||c.subscribeModal(u=>{!u.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),o(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(kH(av({namespaces:av({},r&&{[this.namespace]:r})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(u=>{s(u)}).catch(u=>{o(new Error(u.message))})});if(!i)return;const a=UAe(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:a),this.setAccounts(a),this.events.emit("connect",{chainId:KT(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:r}=e,{event:n}=r;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const r=parseInt(e);this.chainId=r,this.events.emit("chainChanged",KT(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",kH(av({},vi("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var r,n;this.rpc.showQrModal&&((r=this.modal)==null||r.closeModal(),(n=this.modal)==null||n.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const r=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));r.length&&(this.chainId=r[0],this.events.emit("chainChanged",KT(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const r=this.parseChainId(e);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(e){const[r,n,i]=e.split(":");return{chainId:`${r}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var r,n;const i=(r=e==null?void 0:e.chains)!=null?r:[],a=(n=e==null?void 0:e.optionalChains)!=null?n:[],s=i.concat(a);if(!s.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const o=i.length?(e==null?void 0:e.methods)||GE:[],c=i.length?(e==null?void 0:e.events)||KE:[],u=(e==null?void 0:e.optionalMethods)||[],f=(e==null?void 0:e.optionalEvents)||[],h=(e==null?void 0:e.rpcMap)||this.buildRpcMap(s,e.projectId),m=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:i==null?void 0:i.map(y=>this.formatChainId(y)),optionalChains:a.map(y=>this.formatChainId(y)),methods:o,events:c,optionalMethods:u,optionalEvents:f,rpcMap:h,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:m,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,r){const n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,r)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?WE(this.rpc.chains):WE(this.rpc.optionalChains),this.signer=await RTe.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{r=require("@walletconnect/modal").WalletConnectModal}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(r)try{this.modal=new r(av({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:r,optionalChains:n,rpcMap:i}=e;r&&Kc(r)&&(this.rpc.chains=r.map(a=>this.formatChainId(a)),r.forEach(a=>{this.rpc.rpcMap[a]=(i==null?void 0:i[a])||this.getRpcUrl(a)})),n&&Kc(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(a=>this.formatChainId(a)),n.forEach(a=>{this.rpc.rpcMap[a]=(i==null?void 0:i[a])||this.getRpcUrl(a)}))}getRpcUrl(e,r){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${$Te}?chainId=eip155:${e}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:r==null?void 0:r.accounts),this.setAccounts(r==null?void 0:r.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(r=>this.parseAccount(r))}};const qTe=UZ,HTe=Object.freeze(Object.defineProperty({__proto__:null,EthereumProvider:qTe,OPTIONAL_EVENTS:jZ,OPTIONAL_METHODS:LZ,REQUIRED_EVENTS:KE,REQUIRED_METHODS:GE,default:UZ},Symbol.toStringTag,{value:"Module"})),zTe=js(HTe);var VTe=ke&&ke.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),GTe=ke&&ke.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),KTe=ke&&ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&VTe(e,t,r);return GTe(e,t),e};Object.defineProperty($2,"__esModule",{value:!0});$2.WalletConnectV2Connector=void 0;const WTe=w2,QTe=Lh,YTe=Io;class lf extends WTe.AbstractConnector{constructor(e){super({supportedChainIds:(()=>{const{chains:r,optionalChains:n}=lf.configuration.chains[e];return[...r,...n]})()}),this.desiredChainId=e,this.activate=async()=>{const r=await Promise.resolve().then(()=>KTe(zTe)).then(i=>{const{chains:a,optionalChains:s}=lf.configuration.chains[this.desiredChainId];return i.default.init({projectId:lf.configuration.projectId,rpcMap:lf.configuration.urls,chains:a,optionalChains:s,showQrModal:!0,disableProviderPing:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"3000"}},methods:["eth_sendTransaction","personal_sign"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sign","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],events:["chainChanged","accountsChanged"],optionalEvents:["disconnect"]})}),n=await r.enable();return r.on("accountsChanged",this.handleAccountsChanged),r.on("chainChanged",this.handleChainChanged),r.on("disconnect",this.handleDisconnect),this.provider=r,{chainId:r.chainId,account:n[0],provider:r}},this.getProvider=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider},this.getChainId=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.chainId},this.getAccount=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.accounts[0]},this.getWalletName=()=>{var r,n;return(n=(r=this.provider)===null||r===void 0?void 0:r.session)===null||n===void 0?void 0:n.peer.metadata.name},this.deactivate=()=>{this.provider&&(this.emitDeactivate(),this.provider.removeListener("accountsChanged",this.handleAccountsChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("disconnect",this.handleDisconnect).disconnect())},this.handleAccountsChanged=r=>{this.emitUpdate({account:r[0]})},this.handleChainChanged=r=>{this.emitUpdate({chainId:r})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");this.deactivate()}}}$2.WalletConnectV2Connector=lf;lf.configuration=YTe.getConfiguration()[QTe.ProviderType.WALLET_CONNECT_V2];lf.clearStorage=t=>{t.removeRegExp(new RegExp("^wc@2:"))};var K2={},Gf=(t=>(t.MissingApiKey="MISSING_API_KEY",t.ModalNotReady="MODAL_NOT_READY",t.MalformedResponse="MALFORMED_RESPONSE",t.InvalidArgument="INVALID_ARGUMENT",t.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",t.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",t))(Gf||{}),sm=(t=>(t.SyncWeb3Method="SYNC_WEB3_METHOD",t.DuplicateIframe="DUPLICATE_IFRAME",t.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",t.DeprecationNotice="DEPRECATION_NOTICE",t))(sm||{}),W2=(t=>(t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",t[t.MagicLinkExpired=-10001]="MagicLinkExpired",t[t.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",t[t.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",t[t.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",t[t.UpdateEmailFailed=-10004]="UpdateEmailFailed",t[t.UserRequestEditEmail=-10005]="UserRequestEditEmail",t[t.InactiveRecipient=-10010]="InactiveRecipient",t[t.AccessDeniedToUser=-10011]="AccessDeniedToUser",t[t.RedirectLoginComplete=-10015]="RedirectLoginComplete",t))(W2||{}),so=(t=>(t.MetaMask="metamask",t.CoinbaseWallet="coinbase_wallet",t))(so||{}),Cv=(t=>(t.WalletSelected="wallet_selected",t.WalletConnected="wallet_connected",t.WalletRejected="wallet_rejected",t))(Cv||{}),mr=(t=>(t.LoginWithSms="magic_auth_login_with_sms",t.LoginWithEmailOTP="magic_auth_login_with_email_otp",t.LoginWithMagicLink="magic_auth_login_with_magic_link",t.LoginWithCredential="magic_auth_login_with_credential",t.SetAuthorizationToken="magic_auth_set_authorization_token",t.GetIdToken="magic_auth_get_id_token",t.GenerateIdToken="magic_auth_generate_id_token",t.GetMetadata="magic_auth_get_metadata",t.IsLoggedIn="magic_is_logged_in",t.Logout="magic_auth_logout",t.UpdateEmail="magic_auth_update_email",t.UserSettings="magic_auth_settings",t.UserSettingsTestMode="magic_auth_settings_testing_mode",t.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",t.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",t.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",t.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",t.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",t.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",t.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",t.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",t.LogoutTestMode="magic_auth_logout_testing_mode",t.UpdateEmailTestMode="magic_auth_update_email_testing_mode",t.IntermediaryEvent="magic_intermediary_event",t.RequestAccounts="eth_requestAccounts",t.GetInfo="magic_get_info",t.ShowUI="magic_wallet",t.NFTPurchase="magic_nft_purchase",t.NFTCheckout="magic_nft_checkout",t.NFTTransfer="magic_nft_transfer",t.RequestUserInfoWithUI="mc_request_user_info",t.Disconnect="mc_disconnect",t.RecoverAccount="magic_auth_recover_account",t.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",t.MagicBoxHeartBeat="magic_box_heart_beat",t.AutoConnect="mc_auto_connect",t.Login="mc_login",t.EncryptV1="magic_auth_encrypt_v1",t.DecryptV1="magic_auth_decrypt_v1",t.ShowNFTs="magic_show_nfts",t.ShowOnRamp="magic_show_fiat_onramp",t.ShowSendTokensUI="magic_show_send_tokens_ui",t.ShowAddress="magic_show_address",t.ShowBalances="magic_show_balances",t.SendGaslessTransaction="eth_sendGaslessTransaction",t))(mr||{}),qd=(t=>(t.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",t.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",t.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",t.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",t.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",t.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",t))(qd||{}),pb=(t=>(t.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",t))(pb||{}),BZ=(t=>(t.UpdateEmail="update-email",t.MFA="mfa",t.Recovery="recovery",t))(BZ||{}),qZ=(t=>(t.Retry="retry",t))(qZ||{}),HZ=(t=>(t.EmailSent="email-sent",t.EmailNotDeliverable="email-not-deliverable",t))(HZ||{}),Yp=(t=>(t.VerifyEmailOtp="verify-email-otp",t.Cancel="cancel",t))(Yp||{}),zZ=(t=>(t.EmailOTPSent="email-otp-sent",t.InvalidEmailOtp="invalid-email-otp",t.ExpiredEmailOtp="expired-email-otp",t))(zZ||{}),QE=(t=>(t.Retry="device-retry",t))(QE||{}),VZ=(t=>(t.DeviceApproved="device-approved",t.DeviceNeedsApproval="device-needs-approval",t.DeviceVerificationLinkExpired="device-verification-link-expired",t.DeviceVerificationEmailSent="device-verification-email-sent",t))(VZ||{}),GZ=(t=>(t.Harmony="HARMONY",t))(GZ||{}),KZ=(t=>(t.PhoneNumber="phone_number",t))(KZ||{}),JTe=Object.create,Q2=Object.defineProperty,XTe=Object.defineProperties,ZTe=Object.getOwnPropertyDescriptor,eCe=Object.getOwnPropertyDescriptors,tCe=Object.getOwnPropertyNames,LH=Object.getOwnPropertySymbols,rCe=Object.getPrototypeOf,WZ=Object.prototype.hasOwnProperty,nCe=Object.prototype.propertyIsEnumerable,jH=(t,e,r)=>e in t?Q2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,J4=(t,e)=>{for(var r in e||(e={}))WZ.call(e,r)&&jH(t,r,e[r]);if(LH)for(var r of LH(e))nCe.call(e,r)&&jH(t,r,e[r]);return t},QZ=(t,e)=>XTe(t,eCe(e)),iCe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),aCe=(t,e)=>{for(var r in e)Q2(t,r,{get:e[r],enumerable:!0})},sCe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of tCe(e))!WZ.call(t,i)&&i!==r&&Q2(t,i,{get:()=>e[i],enumerable:!(n=ZTe(e,i))||n.enumerable});return t},oCe=(t,e,r)=>(r=t!=null?JTe(rCe(t)):{},sCe(e||!t||!t.__esModule?Q2(r,"default",{value:t,enumerable:!0}):r,t)),za=(t,e,r)=>new Promise((n,i)=>{var a=c=>{try{o(r.next(c))}catch(u){i(u)}},s=c=>{try{o(r.throw(c))}catch(u){i(u)}},o=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,s);o((r=r.apply(t,e)).next())}),cCe=iCe((t,e)=>{var r=Object.prototype.hasOwnProperty,n="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1));function a(u,f,h){this.fn=u,this.context=f,this.once=h||!1}function s(u,f,h,m,y){if(typeof h!="function")throw new TypeError("The listener must be a function");var w=new a(h,m||u,y),v=n?n+f:f;return u._events[v]?u._events[v].fn?u._events[v]=[u._events[v],w]:u._events[v].push(w):(u._events[v]=w,u._eventsCount++),u}function o(u,f){--u._eventsCount===0?u._events=new i:delete u._events[f]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var u=[],f,h;if(this._eventsCount===0)return u;for(h in f=this._events)r.call(f,h)&&u.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},c.prototype.listeners=function(u){var f=n?n+u:u,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,y=h.length,w=new Array(y);m<y;m++)w[m]=h[m].fn;return w},c.prototype.listenerCount=function(u){var f=n?n+u:u,h=this._events[f];return h?h.fn?1:h.length:0},c.prototype.emit=function(u,f,h,m,y,w){var v=n?n+u:u;if(!this._events[v])return!1;var g=this._events[v],_=arguments.length,b,S;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),_){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,f),!0;case 3:return g.fn.call(g.context,f,h),!0;case 4:return g.fn.call(g.context,f,h,m),!0;case 5:return g.fn.call(g.context,f,h,m,y),!0;case 6:return g.fn.call(g.context,f,h,m,y,w),!0}for(S=1,b=new Array(_-1);S<_;S++)b[S-1]=arguments[S];g.fn.apply(g.context,b)}else{var A=g.length,I;for(S=0;S<A;S++)switch(g[S].once&&this.removeListener(u,g[S].fn,void 0,!0),_){case 1:g[S].fn.call(g[S].context);break;case 2:g[S].fn.call(g[S].context,f);break;case 3:g[S].fn.call(g[S].context,f,h);break;case 4:g[S].fn.call(g[S].context,f,h,m);break;default:if(!b)for(I=1,b=new Array(_-1);I<_;I++)b[I-1]=arguments[I];g[S].fn.apply(g[S].context,b)}}return!0},c.prototype.on=function(u,f,h){return s(this,u,f,h,!1)},c.prototype.once=function(u,f,h){return s(this,u,f,h,!0)},c.prototype.removeListener=function(u,f,h,m){var y=n?n+u:u;if(!this._events[y])return this;if(!f)return o(this,y),this;var w=this._events[y];if(w.fn)w.fn===f&&(!m||w.once)&&(!h||w.context===h)&&o(this,y);else{for(var v=0,g=[],_=w.length;v<_;v++)(w[v].fn!==f||m&&!w[v].once||h&&w[v].context!==h)&&g.push(w[v]);g.length?this._events[y]=g.length===1?g[0]:g:o(this,y)}return this},c.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&o(this,f)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,typeof e<"u"&&(e.exports=c)});function uCe(t){let e={exports:{}};return t(e,e.exports),e.exports}var lCe=Number.MAX_SAFE_INTEGER||9007199254740991,X4={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:lCe,MAX_SAFE_COMPONENT_LENGTH:16},fCe=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},In=fCe,S1=uCe(function(t,e){let{MAX_SAFE_COMPONENT_LENGTH:r}=X4,n=(e=t.exports={}).re=[],i=e.src=[],a=e.t={},s=0,o=(c,u,f)=>{let h=s++;In(h,u),a[c]=h,i[h]=u,n[h]=new RegExp(u,f?"g":void 0)};o("NUMERICIDENTIFIER","0|[1-9]\\d*"),o("NUMERICIDENTIFIERLOOSE","[0-9]+"),o("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),o("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),o("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),o("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),o("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),o("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),o("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),o("BUILDIDENTIFIER","[0-9A-Za-z-]+"),o("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),o("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),o("FULL",`^${i[a.FULLPLAIN]}$`),o("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),o("LOOSE",`^${i[a.LOOSEPLAIN]}$`),o("GTLT","((?:<|>)?=?)"),o("XRANGEIDENTIFIERLOOSE",`${i[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),o("XRANGEIDENTIFIER",`${i[a.NUMERICIDENTIFIER]}|x|X|\\*`),o("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),o("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),o("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),o("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),o("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),o("COERCERTL",i[a.COERCE],!0),o("LONETILDE","(?:~>?)"),o("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",o("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),o("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),o("LONECARET","(?:\\^)"),o("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",o("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),o("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),o("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),o("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),o("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",o("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),o("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),o("STAR","(<|>)?=?\\s*\\*"),o("GTE0","^\\s*>=\\s*0.0.0\\s*$"),o("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}),UH=/^[0-9]+$/,YZ=(t,e)=>{let r=UH.test(t),n=UH.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},dCe=(t,e)=>YZ(e,t),hCe={compareIdentifiers:YZ,rcompareIdentifiers:dCe},{MAX_LENGTH:FH,MAX_SAFE_INTEGER:Zw}=X4,{re:BH,t:qH}=S1,{compareIdentifiers:Py}=hCe,Zi=class{constructor(t,e){if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof Zi){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid Version: ${t}`);if(t.length>FH)throw new TypeError(`version is longer than ${FH} characters`);In("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;let r=t.trim().match(e.loose?BH[qH.LOOSE]:BH[qH.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Zw||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Zw||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Zw||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<Zw)return i}return n}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(In("SemVer.compare",this.version,this.options,t),!(t instanceof Zi)){if(typeof t=="string"&&t===this.version)return 0;t=new Zi(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Zi||(t=new Zi(t,this.options)),Py(this.major,t.major)||Py(this.minor,t.minor)||Py(this.patch,t.patch)}comparePre(t){if(t instanceof Zi||(t=new Zi(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{let r=this.prerelease[e],n=t.prerelease[e];if(In("prerelease compare",e,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r!==n)return Py(r,n)}while(++e)}compareBuild(t){t instanceof Zi||(t=new Zi(t,this.options));let e=0;do{let r=this.build[e],n=t.build[e];if(In("prerelease compare",e,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r!==n)return Py(r,n)}while(++e)}inc(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",e),this.inc("pre",e);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error(`invalid increment argument: ${t}`)}return this.format(),this.raw=this.version,this}},pCe=(t,e,r)=>new Zi(t,r).compare(new Zi(e,r)),om=pCe,gCe=(t,e,r)=>om(t,e,r)===0,mCe=gCe,yCe=(t,e,r)=>om(t,e,r)!==0,vCe=yCe,bCe=(t,e,r)=>om(t,e,r)>0,wCe=bCe,_Ce=(t,e,r)=>om(t,e,r)>=0,ECe=_Ce,xCe=(t,e,r)=>om(t,e,r)<0,ACe=xCe,SCe=(t,e,r)=>om(t,e,r)<=0,ICe=SCe,OCe=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return mCe(t,r,n);case"!=":return vCe(t,r,n);case">":return wCe(t,r,n);case">=":return ECe(t,r,n);case"<":return ACe(t,r,n);case"<=":return ICe(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}},WT=OCe,Ty=Symbol("SemVer ANY"),gb=class{static get ANY(){return Ty}constructor(e,r){if(r&&typeof r=="object"||(r={loose:!!r,includePrerelease:!1}),e instanceof gb){if(e.loose===!!r.loose)return e;e=e.value}In("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Ty?this.value="":this.value=this.operator+this.semver.version,In("comp",this)}parse(e){let r=this.options.loose?HH[zH.COMPARATORLOOSE]:HH[zH.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Zi(n[2],this.options.loose):this.semver=Ty}toString(){return this.value}test(e){if(In("Comparator.test",e,this.options.loose),this.semver===Ty||e===Ty)return!0;if(typeof e=="string")try{e=new Zi(e,this.options)}catch{return!1}return WT(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof gb))throw new TypeError("a Comparator is required");if(r&&typeof r=="object"||(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""||new b0(e.value,r).test(this.value);if(e.operator==="")return e.value===""||new b0(this.value,r).test(e.semver);let n=!(this.operator!==">="&&this.operator!==">"||e.operator!==">="&&e.operator!==">"),i=!(this.operator!=="<="&&this.operator!=="<"||e.operator!=="<="&&e.operator!=="<"),a=this.semver.version===e.semver.version,s=!(this.operator!==">="&&this.operator!=="<="||e.operator!==">="&&e.operator!=="<="),o=WT(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),c=WT(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||a&&s||o||c}},{re:HH,t:zH}=S1,b0=class{constructor(t,e){if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof b0)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new b0(t.raw,e);if(t instanceof gb)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${t}`);this.format()}format(){return this.range=this.set.map(t=>t.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(t){let{loose:e}=this.options;t=t.trim();let r=e?xa[ta.HYPHENRANGELOOSE]:xa[ta.HYPHENRANGE];t=t.replace(r,FCe(this.options.includePrerelease)),In("hyphen replace",t),t=t.replace(xa[ta.COMPARATORTRIM],PCe),In("comparator trim",t,xa[ta.COMPARATORTRIM]),t=(t=(t=t.replace(xa[ta.TILDETRIM],TCe)).replace(xa[ta.CARETTRIM],CCe)).split(/\s+/).join(" ");let n=e?xa[ta.COMPARATORLOOSE]:xa[ta.COMPARATOR];return t.split(" ").map(i=>RCe(i,this.options)).join(" ").split(/\s+/).map(i=>UCe(i,this.options)).filter(this.options.loose?i=>!!i.match(n):()=>!0).map(i=>new gb(i,this.options))}intersects(t,e){if(!(t instanceof b0))throw new TypeError("a Range is required");return this.set.some(r=>VH(r,e)&&t.set.some(n=>VH(n,e)&&r.every(i=>n.every(a=>i.intersects(a,e)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new Zi(t,this.options)}catch{return!1}for(let e=0;e<this.set.length;e++)if(BCe(this.set[e],t,this.options))return!0;return!1}},{re:xa,t:ta,comparatorTrimReplace:PCe,tildeTrimReplace:TCe,caretTrimReplace:CCe}=S1,VH=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(a=>i.intersects(a,e)),i=n.pop();return r},RCe=(t,e)=>(In("comp",t,e),t=MCe(t,e),In("caret",t),t=NCe(t,e),In("tildes",t),t=kCe(t,e),In("xrange",t),t=jCe(t,e),In("stars",t),t),qa=t=>!t||t.toLowerCase()==="x"||t==="*",NCe=(t,e)=>t.trim().split(/\s+/).map(r=>DCe(r,e)).join(" "),DCe=(t,e)=>{let r=e.loose?xa[ta.TILDELOOSE]:xa[ta.TILDE];return t.replace(r,(n,i,a,s,o)=>{let c;return In("tilde",t,n,i,a,s,o),qa(i)?c="":qa(a)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:qa(s)?c=`>=${i}.${a}.0 <${i}.${+a+1}.0-0`:o?(In("replaceTilde pr",o),c=`>=${i}.${a}.${s}-${o} <${i}.${+a+1}.0-0`):c=`>=${i}.${a}.${s} <${i}.${+a+1}.0-0`,In("tilde return",c),c})},MCe=(t,e)=>t.trim().split(/\s+/).map(r=>$Ce(r,e)).join(" "),$Ce=(t,e)=>{In("caret",t,e);let r=e.loose?xa[ta.CARETLOOSE]:xa[ta.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,a,s,o,c)=>{let u;return In("caret",t,i,a,s,o,c),qa(a)?u="":qa(s)?u=`>=${a}.0.0${n} <${+a+1}.0.0-0`:qa(o)?u=a==="0"?`>=${a}.${s}.0${n} <${a}.${+s+1}.0-0`:`>=${a}.${s}.0${n} <${+a+1}.0.0-0`:c?(In("replaceCaret pr",c),u=a==="0"?s==="0"?`>=${a}.${s}.${o}-${c} <${a}.${s}.${+o+1}-0`:`>=${a}.${s}.${o}-${c} <${a}.${+s+1}.0-0`:`>=${a}.${s}.${o}-${c} <${+a+1}.0.0-0`):(In("no pr"),u=a==="0"?s==="0"?`>=${a}.${s}.${o}${n} <${a}.${s}.${+o+1}-0`:`>=${a}.${s}.${o}${n} <${a}.${+s+1}.0-0`:`>=${a}.${s}.${o} <${+a+1}.0.0-0`),In("caret return",u),u})},kCe=(t,e)=>(In("replaceXRanges",t,e),t.split(/\s+/).map(r=>LCe(r,e)).join(" ")),LCe=(t,e)=>{t=t.trim();let r=e.loose?xa[ta.XRANGELOOSE]:xa[ta.XRANGE];return t.replace(r,(n,i,a,s,o,c)=>{In("xRange",t,n,i,a,s,o,c);let u=qa(a),f=u||qa(s),h=f||qa(o),m=h;return i==="="&&m&&(i=""),c=e.includePrerelease?"-0":"",u?n=i===">"||i==="<"?"<0.0.0-0":"*":i&&m?(f&&(s=0),o=0,i===">"?(i=">=",f?(a=+a+1,s=0,o=0):(s=+s+1,o=0)):i==="<="&&(i="<",f?a=+a+1:s=+s+1),i==="<"&&(c="-0"),n=`${i+a}.${s}.${o}${c}`):f?n=`>=${a}.0.0${c} <${+a+1}.0.0-0`:h&&(n=`>=${a}.${s}.0${c} <${a}.${+s+1}.0-0`),In("xRange return",n),n})},jCe=(t,e)=>(In("replaceStars",t,e),t.trim().replace(xa[ta.STAR],"")),UCe=(t,e)=>(In("replaceGTE0",t,e),t.trim().replace(xa[e.includePrerelease?ta.GTE0PRE:ta.GTE0],"")),FCe=t=>(e,r,n,i,a,s,o,c,u,f,h,m,y)=>`${r=qa(n)?"":qa(i)?`>=${n}.0.0${t?"-0":""}`:qa(a)?`>=${n}.${i}.0${t?"-0":""}`:s?`>=${r}`:`>=${r}${t?"-0":""}`} ${c=qa(u)?"":qa(f)?`<${+u+1}.0.0-0`:qa(h)?`<${u}.${+f+1}.0-0`:m?`<=${u}.${f}.${h}-${m}`:t?`<${u}.${f}.${+h+1}-0`:`<=${c}`}`.trim(),BCe=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(In(t[n].semver),t[n].semver!==gb.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0},qCe=(t,e,r)=>{try{e=new b0(e,r)}catch{return!1}return e.test(t)},{MAX_LENGTH:HCe}=X4,{re:GH,t:KH}=S1,zCe=(t,e)=>{if(e&&typeof e=="object"||(e={loose:!!e,includePrerelease:!1}),t instanceof Zi)return t;if(typeof t!="string"||t.length>HCe||!(e.loose?GH[KH.LOOSE]:GH[KH.FULL]).test(t))return null;try{return new Zi(t,e)}catch{return null}},VCe=zCe,{re:e_,t:t_}=S1,GCe=(t,e)=>{if(t instanceof Zi)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;let r=null;if((e=e||{}).rtl){let n;for(;(n=e_[t_.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),e_[t_.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;e_[t_.COERCERTL].lastIndex=-1}else r=t.match(e_[t_.COERCE]);return r===null?null:VCe(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};function KCe(t){return String.fromCharCode(parseInt(t.slice(1),16))}function WCe(t){return`%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`}function QCe(t){return btoa(encodeURIComponent(t).replace(/%[0-9A-F]{2}/g,KCe))}function YCe(t){return decodeURIComponent(Array.from(atob(t),WCe).join(""))}function JZ(t){return QCe(JSON.stringify(t))}function JCe(t){return JSON.parse(YCe(t))}function sv(t){return typeof t>"u"}function XCe(t){return t===null}function XZ(t){return XCe(t)||sv(t)}function ZCe(t){return XZ(t)?!1:!sv(t.jsonrpc)&&!sv(t.id)&&(!sv(t.result)||!sv(t.error))}function eRe(t){return XZ(t)?!1:typeof t=="number"&&Object.values(W2).includes(t)}function iN(t){if(!t)return!0;for(let e in t)if(Object.hasOwnProperty.call(t,e))return!1;return!0}var Un={};function tRe(t,e){return Object.assign(Un,e),t}var rRe={"magic-sdk":"magic-sdk","@magic-sdk/react-native":"magic-sdk-rn","@magic-sdk/react-native-bare":"magic-sdk-rn-bare","@magic-sdk/react-native-expo":"magic-sdk-rn-expo"},Kf=class extends Error{constructor(e,r){super(`Magic SDK Error: [${e}] ${r}`),this.code=e,this.rawMessage=r,this.__proto__=Error,Object.setPrototypeOf(this,Kf.prototype)}},mb=class extends Error{constructor(t){super(),this.__proto__=Error;let e=Number(t==null?void 0:t.code);this.rawMessage=(t==null?void 0:t.message)||"Internal error",this.code=eRe(e)?e:W2.InternalError,this.message=`Magic RPC Error: [${this.code}] ${this.rawMessage}`,this.data=(t==null?void 0:t.data)||void 0,Object.setPrototypeOf(this,mb.prototype)}},I1=class{constructor(e,r){this.code=e,this.rawMessage=r,this.message=`Magic SDK Warning: [${e}] ${r}`}log(){console.warn(this.message)}},Z4=class extends Error{constructor(t,e,r,n){super(`Magic Extension Error (${t.name}): [${e}] ${r}`),this.code=e,this.rawMessage=r,this.data=n,this.__proto__=Error,Object.setPrototypeOf(this,Z4.prototype)}},aN=class{constructor(t,e,r){this.code=e,this.rawMessage=r,this.message=`Magic Extension Warning (${t.name}): [${e}] ${r}`}log(){console.warn(this.message)}};function nRe(){return new Kf(Gf.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function iRe(){return new Kf(Gf.ModalNotReady,"Modal is not ready.")}function aRe(){return new Kf(Gf.MalformedResponse,"Response from the Magic iframe is malformed.")}function sRe(t){return new Kf(Gf.ExtensionNotInitialized,`Extensions must be initialized with a Magic SDK instance before \`Extension.${t}\` can be accessed. Do not invoke \`Extension.${t}\` inside an extension constructor.`)}function oRe(t){let e=`Some extensions are incompatible with \`${Un.sdkName}@${Un.version}\`:`;return t.filter(r=>typeof r.compat<"u"&&r.compat!==null).forEach(r=>{let n=r.compat[Un.sdkName];typeof n=="string"?e+=`
159
+ - Extension \`${r.name}\` supports version(s) \`${n}\``:n||(e+=`
160
+ - Extension \`${r.name}\` does not support ${Un.platform} environments.`)}),new Kf(Gf.IncompatibleExtensions,e)}function cRe(t){let e=r=>{let n=r+1,i=n%10,a=n%100;return i===1&&a!==11?`${n}st`:i===2&&a!==12?`${n}nd`:i===3&&a!==13?`${n}rd`:`${n}th`};return new Kf(Gf.InvalidArgument,`Invalid ${e(t.argument)} argument given to \`${t.procedure}\`.
161
+ Expected: \`${t.expected}\`
162
+ Received: \`${t.received}\``)}function uRe(){return new I1(sm.DuplicateIframe,"Duplicate iframes found.")}function lRe(){return new I1(sm.SyncWeb3Method,"Non-async web3 methods are deprecated in web3 > 1.0 and are not supported by the Magic web3 provider. Please use an async method instead.")}function fRe(){return new I1(sm.ReactNativeEndpointConfiguration,`CUSTOM DOMAINS ARE NOT SUPPORTED WHEN USING MAGIC SDK WITH REACT NATIVE! The \`endpoint\` parameter SHOULD NOT be provided. The Magic \`<iframe>\` is automatically wrapped by a WebView pointed at \`${Un.defaultEndpoint}\`. Changing this default behavior will lead to unexpected results and potentially security-threatening bugs.`)}function w0(t){let{method:e,removalVersions:r,useInstead:n}=t,i=r[Un.sdkName],a=n?` Use \`${n}\` instead.`:"",s=`\`${e}\` will be removed from \`${Un.sdkName}\` in version \`${i}\`.${a}`;return new I1(sm.DeprecationNotice,s)}function*dRe(){let t=0;for(;;)t<Number.MAX_SAFE_INTEGER?yield++t:t=0}var hRe=dRe();function ZZ(){return hRe.next().value}var eee=Symbol("Payload pre-processed by Magic SDK");function tee(t){return Object.defineProperty(t,eee,{value:!0,enumerable:!1}),t}function pRe(t){return!!t[eee]}function YE(t){var e,r,n;return pRe(t)||(t.jsonrpc=(e=t.jsonrpc)!=null?e:"2.0",t.id=ZZ(),t.method=(r=t.method)!=null?r:"noop",t.params=(n=t.params)!=null?n:[],tee(t)),t}function en(t,e=[]){return tee({params:e,method:t,jsonrpc:"2.0",id:ZZ()})}var eD=class{constructor(e){e instanceof eD?(this._jsonrpc=e.payload.jsonrpc,this._id=e.payload.id,this._result=e.payload.result,this._error=e.payload.error):ZCe(e)?(this._jsonrpc=e.jsonrpc,this._id=e.id,this._result=e.result,this._error=e.error):(this._jsonrpc=e.jsonrpc,this._id=e.id,this._result=void 0,this._error=void 0)}applyError(e){return this._error=e,this}applyResult(e){return this._result=e,this}get hasError(){return typeof this._error<"u"&&this._error!==null}get hasResult(){return typeof this._result<"u"}get payload(){return{jsonrpc:this._jsonrpc,id:this._id,result:this._result,error:this._error}}},gRe=oCe(cCe()),mRe=class extends gRe.default{};function ree(){let t=new mRe;return{emitter:t,createChainingEmitterMethod:(e,r)=>(...n)=>(t[e].apply(t,n),r),createBoundEmitterMethod:e=>(...r)=>t[e].apply(t,r)}}var nee=Symbol("isPromiEvent");function iee(t){return!!t[nee]}function tD(t){let e=aee(t),{createBoundEmitterMethod:r,createChainingEmitterMethod:n}=ree(),i=Symbol("Promise.then"),a=Symbol("Promise.catch"),s=Symbol("Promise.finally"),o=(f,h)=>(...m)=>{let y=h[f].apply(h,m);return c(y)},c=f=>Object.assign(f,{[nee]:!0,[i]:f[i]||f.then,[a]:f[a]||f.catch,[s]:f[s]||f.finally,then:o(i,f),catch:o(a,f),finally:o(s,f),on:n("on",f),once:n("once",f),addListener:n("addListener",f),off:n("off",f),removeListener:n("removeListener",f),removeAllListeners:n("removeAllListeners",f),emit:r("emit"),eventNames:r("eventNames"),listeners:r("listeners"),listenerCount:r("listenerCount")}),u=c(e.then(f=>(u.emit("done",f),u.emit("settled"),f),f=>{throw u.emit("error",f),u.emit("settled"),f}));return u}function aee(t){return new Promise((e,r)=>{let n=t(e,r);Promise.resolve(n).catch(r)})}var Hh=class{constructor(t){this.sdk=t}get overlay(){return this.sdk.overlay}request(t){let e=this.overlay.post(pb.MAGIC_HANDLE_REQUEST,YE(t)),r=tD((i,a)=>{e.then(s=>{if(n(),s.hasError)a(new mb(s.payload.error));else if(s.hasResult)i(s.payload.result);else throw aRe()}).catch(s=>{n(),a(s)})}),n=this.overlay.on(qd.MAGIC_HANDLE_EVENT,i=>{var a;let{response:s}=i.data;if(s.id===t.id&&((a=s.result)!=null&&a.event)){let{event:o,params:c=[]}=s.result;r.emit(o,...c)}});return r}createIntermediaryEvent(t,e){return r=>{let n=en(mr.IntermediaryEvent,[{payloadId:e,eventType:t,args:r}]);this.request(n)}}};function yRe(t,e){let[r]=t.split(".").map(Number);return r>=e}var _0={"magic-sdk":"v18.0.0","@magic-sdk/react-native":"v14.0.0","@magic-sdk/react-native-bare":"v19.0.0","@magic-sdk/react-native-expo":"v19.0.0"},vRe=class extends Hh{loginWithMagicLink(t){let e=Un.sdkName==="@magic-sdk/react-native"||Un.sdkName==="@magic-sdk/react-native-bare"||Un.sdkName==="@magic-sdk/react-native-expo";if(e&&yRe(Un.version,19))throw new Error("loginWithMagicLink() is deprecated for this package, please utlize a passcode method like loginWithSMS or loginWithEmailOTP instead.");e&&w0({method:"auth.loginWithMagicLink()",removalVersions:_0,useInstead:"auth.loginWithEmailOTP()"}).log();let{email:r,showUI:n=!0,redirectURI:i,overrides:a}=t,s=en(this.sdk.testMode?mr.LoginWithMagicLinkTestMode:mr.LoginWithMagicLink,[{email:r,showUI:n,redirectURI:i,overrides:a}]);return this.request(s)}loginWithSMS(t){let{phoneNumber:e}=t,r=en(this.sdk.testMode?mr.LoginWithSmsTestMode:mr.LoginWithSms,[{phoneNumber:e,showUI:!0}]);return this.request(r)}loginWithEmailOTP(t){let{email:e,showUI:r,deviceCheckUI:n,overrides:i}=t,a=en(this.sdk.testMode?mr.LoginWithEmailOTPTestMode:mr.LoginWithEmailOTP,[{email:e,showUI:r,deviceCheckUI:n,overrides:i}]),s=this.request(a);return!n&&s&&s.on(QE.Retry,()=>{this.createIntermediaryEvent(QE.Retry,a.id)()}),!r&&s&&(s.on(Yp.VerifyEmailOtp,o=>{this.createIntermediaryEvent(Yp.VerifyEmailOtp,a.id)(o)}),s.on(Yp.Cancel,()=>{this.createIntermediaryEvent(Yp.Cancel,a.id)()})),s}loginWithCredential(t){let e=t??"";if(!t&&Un.platform==="web"){e=window.location.search;let n=window.location.origin+window.location.pathname;window.history.replaceState(null,"",n)}let r=en(this.sdk.testMode?mr.LoginWithCredentialTestMode:mr.LoginWithCredential,[e]);return this.request(r)}setAuthorizationToken(t){let e=en(mr.SetAuthorizationToken,[{jwt:t}]);return this.request(e)}updateEmailWithUI(t){let{email:e,showUI:r=!0}=t,n=en(this.sdk.testMode?mr.UpdateEmailTestMode:mr.UpdateEmail,[{email:e,showUI:r}]);return this.request(n)}},see={};aCe(see,{clear:()=>bRe,getItem:()=>Rf,iterate:()=>xRe,key:()=>_Re,keys:()=>ERe,length:()=>wRe,removeItem:()=>rD,setItem:()=>Tg});var r_;function Wf(t){return(...e)=>za(this,null,function*(){return r_||(r_=yield Un.configureStorage()),yield r_.ready(),r_[t](...e)})}var Rf=Wf("getItem"),Tg=Wf("setItem"),rD=Wf("removeItem"),bRe=Wf("clear"),wRe=Wf("length"),_Re=Wf("key"),ERe=Wf("keys"),xRe=Wf("iterate"),ARe=class extends Hh{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}getIdToken(e){let r=en(this.sdk.testMode?mr.GetIdTokenTestMode:mr.GetIdToken,[e]);return this.request(r)}generateIdToken(e){let r=en(this.sdk.testMode?mr.GenerateIdTokenTestMode:mr.GenerateIdToken,[e]);return this.request(r)}getInfo(){return za(this,null,function*(){let e=yield Rf(this.localForageKey),r=en(mr.GetInfo,[{walletType:e}]);return this.request(r)})}isLoggedIn(){let e=en(this.sdk.testMode?mr.IsLoggedInTestMode:mr.IsLoggedIn);return this.request(e)}logout(){rD(this.localForageKey);let e=en(this.sdk.testMode?mr.LogoutTestMode:mr.Logout);return this.request(e)}requestInfoWithUI(e){let r=en(mr.RequestUserInfoWithUI,e?[e]:[]);return this.request(r)}showSettings(e){let r=en(this.sdk.testMode?mr.UserSettingsTestMode:mr.UserSettings,[e]);return this.request(r)}recoverAccount(e){let r=en(this.sdk.testMode?mr.RecoverAccountTestMode:mr.RecoverAccount,[e]);return this.request(r)}getMetadata(){w0({method:"user.getMetadata()",removalVersions:_0,useInstead:"user.getInfo()"}).log();let e=en(this.sdk.testMode?mr.GetMetadataTestMode:mr.GetMetadata);return this.request(e)}updateEmail(e){w0({method:"user.updateEmail()",removalVersions:_0,useInstead:"auth.updateEmailWithUI()"}).log();let{email:r,showUI:n=!0}=e,i=en(this.sdk.testMode?mr.UpdateEmailTestMode:mr.UpdateEmail,[{email:r,showUI:n}]);return this.request(i)}};function JE(t,e){return e?new URL(t,e):new URL(t)}function SRe(){let t=window.crypto.getRandomValues(new Uint8Array(16));t[6]=t[6]&15|64,t[8]=t[8]&191|128;let e="";return e+=t[0].toString(16),e+=t[1].toString(16),e+=t[2].toString(16),e+=t[3].toString(16),e+="-",e+=t[4].toString(16),e+=t[5].toString(16),e+="-",e+=t[6].toString(16),e+=t[7].toString(16),e+="-",e+=t[8].toString(16),e+=t[9].toString(16),e+="-",e+=t[10].toString(16),e+=t[11].toString(16),e+=t[12].toString(16),e+=t[13].toString(16),e+=t[14].toString(16),e+=t[15].toString(16),e}var oee="STORE_KEY_PRIVATE_KEY",sN="STORE_KEY_PUBLIC_JWK",cee="ECDSA",IRe="P-256",ORe={name:cee,namedCurve:IRe};function PRe(){return za(this,null,function*(){let t=yield TRe();if(!t){console.info("unable to create public key or webcrypto is unsupported");return}let{subtle:e}=window.crypto,r=yield Rf(oee);if(!r||!e){console.info("unable to find private key or webcrypto unsupported");return}let n={iat:Math.floor(new Date().getTime()/1e3),jti:SRe()},i={typ:"dpop+jwt",alg:"ES256",jwk:t},a={protected:WH(JSON.stringify(i)),claims:WH(JSON.stringify(n))},s=NRe(`${a.protected}.${a.claims}`),o={name:cee,hash:{name:"SHA-256"}},c=MRe(new Uint8Array(yield e.sign(o,r,s)));return`${a.protected}.${a.claims}.${c}`})}function TRe(){return za(this,null,function*(){if(!RRe()){console.info("webcrypto is not supported");return}return(yield Rf(sN))||(yield CRe()),Rf(sN)})}function CRe(){return za(this,null,function*(){let{subtle:t}=window.crypto,e=yield t.generateKey(ORe,!1,["sign"]),r=yield t.exportKey("jwk",e.publicKey);yield Tg(oee,e.privateKey),yield Tg(sN,r)})}function RRe(){let t=typeof window<"u"&&!!window.crypto,e=t&&!!window.crypto.subtle;return t&&e}function WH(t){return uee(DRe(t))}function NRe(t){return new TextEncoder().encode(t)}function uee(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+/g,"")}function DRe(t){return encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,r)=>String.fromCharCode(parseInt(r,16)))}function MRe(t){let e="";return t.forEach(r=>{e+=String.fromCharCode(r)}),uee(e)}var $Re=class extends Hh{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}connectWithUI(){let t=tD((e,r)=>za(this,null,function*(){try{if(this.isMetaMaskBrowser()&&(yield this.isWalletEnabled(so.MetaMask))){let o=yield this.autoConnectIfWalletBrowser(so.MetaMask);e(o);return}if(this.isCoinbaseWalletBrowser()&&(yield this.isWalletEnabled(so.CoinbaseWallet))){let o=yield this.autoConnectIfWalletBrowser(so.CoinbaseWallet);e(o);return}let n=this.getUserEnv(),i=en(mr.Login,[n]),a=this.request(i);a.on(Cv.WalletSelected,o=>this.handleWalletSelected(QZ(J4({},o),{payloadId:i.id}))),a.on("id-token-created",o=>{t.emit("id-token-created",o)});let s=yield a;s.error&&r(s),e(s)}catch(n){r(n)}}));return t}showUI(){return this.request(en(mr.ShowUI))}showAddress(){return this.request(en(mr.ShowAddress))}showSendTokensUI(){return this.request(en(mr.ShowSendTokensUI))}showOnRamp(){return this.request(en(mr.ShowOnRamp))}showNFTs(){return this.request(en(mr.ShowNFTs))}showBalances(){return this.request(en(mr.ShowBalances))}sendGaslessTransaction(t,e){return this.request(en(mr.SendGaslessTransaction,[t,e]))}getInfo(){return za(this,null,function*(){w0({method:"wallet.getInfo()",removalVersions:_0,useInstead:"user.getInfo()"}).log();let t=yield Rf(this.localForageKey),e=en(mr.GetInfo,[{walletType:t}]);return this.request(e)})}disconnect(){w0({method:"wallet.disconnect()",removalVersions:_0,useInstead:"user.logout()"}).log(),rD(this.localForageKey);let t=en(mr.Disconnect);return this.request(t)}requestUserInfoWithUI(t){w0({method:"wallet.requestUserInfoWithUI()",removalVersions:_0,useInstead:"user.requestUserInfoWithUI()"}).log();let e=en(mr.RequestUserInfoWithUI,t?[t]:[]);return this.request(e)}getProvider(){return za(this,null,function*(){switch(yield Rf(this.localForageKey)){case so.MetaMask:return this.getMetaMaskProvider();case so.CoinbaseWallet:return this.getCoinbaseProvider();default:return this.sdk.rpcProvider}})}isMetaMaskInstalled(){var t,e,r;return((t=window.ethereum)==null?void 0:t.isMetaMask)||!!((r=(e=window.ethereum)==null?void 0:e.providers)!=null&&r.find(n=>n==null?void 0:n.isMetaMask))}isMetaMaskBrowser(){return this.isMobile()&&this.isMetaMaskInstalled()}getMetaMaskProvider(){var t,e;return((e=(t=window.ethereum)==null?void 0:t.providers)==null?void 0:e.find(r=>r==null?void 0:r.isMetaMask))||window.ethereum}connectToMetaMask(){if(this.isMobile()&&!this.isMetaMaskInstalled()){let t=`https://metamask.app.link/dapp/${window.location.href.replace(/(^\w+:|^)\/\//,"")}`;window.location.href=t}return this.getMetaMaskProvider().request({method:"eth_requestAccounts"})}isCoinbaseWalletInstalled(){var t,e,r;return((t=window.ethereum)==null?void 0:t.isCoinbaseWallet)||!!((r=(e=window.ethereum)==null?void 0:e.providers)!=null&&r.find(n=>n==null?void 0:n.isCoinbaseWallet))}isCoinbaseWalletBrowser(){var t;return!!((t=window.ethereum)!=null&&t.isCoinbaseBrowser)}getCoinbaseProvider(){var t,e;return((e=(t=window.ethereum)==null?void 0:t.providers)==null?void 0:e.find(r=>r==null?void 0:r.isCoinbaseWallet))||window.ethereum}connectToCoinbaseWallet(){if(this.isMobile()&&!this.isCoinbaseWalletBrowser()){let t=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(window.location.href)}`;window.location.href=t}return this.getCoinbaseProvider().request({method:"eth_requestAccounts"})}isMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Silk|Opera Mini/i.test(navigator.userAgent)}getUserEnv(){return{env:{isMetaMaskInstalled:this.isMetaMaskInstalled(),isCoinbaseWalletInstalled:this.isCoinbaseWalletInstalled()}}}connectToThirdPartyWallet(t){switch(t){case so.MetaMask:return this.connectToMetaMask();case so.CoinbaseWallet:return this.connectToCoinbaseWallet();default:throw new Error(`Invalid provider: ${t}. Must be one of "metamask" or "coinbase_wallet".`)}}isWalletEnabled(t){let e=en("mc_is_wallet_enabled",[{wallet:t}]);return this.request(e)}handleWalletSelected(t){return za(this,null,function*(){try{let e=yield this.connectToThirdPartyWallet(t.wallet);yield Tg(this.localForageKey,t.wallet),this.createIntermediaryEvent(Cv.WalletConnected,t.payloadId)(e)}catch(e){console.error(e),this.createIntermediaryEvent(Cv.WalletRejected,t.payloadId)()}})}autoConnectIfWalletBrowser(t){return za(this,null,function*(){let e;t===so.MetaMask&&(e=yield this.getMetaMaskProvider().request({method:"eth_requestAccounts"})),t===so.CoinbaseWallet&&(e=yield this.getCoinbaseProvider().request({method:"eth_requestAccounts"})),yield Tg(this.localForageKey,t);let r=en(mr.AutoConnect,[{wallet:t,address:e}]);return this.request(r)})}},{createBoundEmitterMethod:n_,createChainingEmitterMethod:Ip}=ree(),kRe=class extends Hh{constructor(){super(...arguments),this.isMagic=!0,this.on=Ip("on",this),this.once=Ip("once",this),this.addListener=Ip("addListener",this),this.off=Ip("off",this),this.removeListener=Ip("removeListener",this),this.removeAllListeners=Ip("removeAllListeners",this),this.emit=n_("emit"),this.eventNames=n_("eventNames"),this.listeners=n_("listeners"),this.listenerCount=n_("listenerCount")}sendAsync(e,r){if(!r)throw cRe({procedure:"Magic.rpcProvider.sendAsync",argument:1,expected:"function",received:r===null?"null":typeof r});if(Array.isArray(e))this.overlay.post(pb.MAGIC_HANDLE_REQUEST,e.map(n=>{let i=YE(n);return this.prefixPayloadMethodForTestMode(i),i})).then(n=>{r(null,n.map(i=>QZ(J4({},i.payload),{error:i.hasError?new mb(i.payload.error):null})))});else{let n=YE(e);this.prefixPayloadMethodForTestMode(n),this.overlay.post(pb.MAGIC_HANDLE_REQUEST,n).then(i=>{r(i.hasError?new mb(i.payload.error):null,i.payload)})}}send(e,r){if(typeof e=="string"){let i=en(e,Array.isArray(r)?r:[]);return this.request(i)}if(Array.isArray(e)||r){this.sendAsync(e,r);return}let n=lRe();return n.log(),new eD(e).applyError({code:-32603,message:n.rawMessage}).payload}enable(){let e=en(mr.Login);return this.request(e)}request(e){return this.prefixPayloadMethodForTestMode(e),super.request(e)}prefixPayloadMethodForTestMode(e){let r="testMode/eth/";this.sdk.testMode&&(e.method=`${r}${e.method}`)}},QH=["request","overlay","sdk"];function LRe(t){let e=Object.getPrototypeOf(t),r=[e];for(;e!==Hh.prototype;)e=Object.getPrototypeOf(e),r.push(e);return r}var lee=class extends Hh{constructor(){super(void 0),this.__sdk_access_field_descriptors__=new Map,this.__is_initialized__=!1,this.utils={createPromiEvent:tD,isPromiEvent:iee,encodeJSON:JZ,decodeJSON:JCe,createJsonRpcRequestPayload:en,standardizeJsonRpcRequestPayload:YE,storage:see};let t=[this,...LRe(this)];QH.forEach(e=>{let r=t.map(s=>Object.getOwnPropertyDescriptor(s,e)),n=r.findIndex(s=>!!s),i=n>0,a=r[n];a&&(this.__sdk_access_field_descriptors__.set(e,{descriptor:a,isPrototypeField:i}),Object.defineProperty(this,e,{configurable:!0,get:()=>{throw sRe(e)}}))})}init(t){this.__is_initialized__||(QH.forEach(e=>{if(this.__sdk_access_field_descriptors__.has(e)){let{descriptor:r,isPrototypeField:n}=this.__sdk_access_field_descriptors__.get(e);n?delete this[e]:Object.defineProperty(this,e,r)}}),this.sdk=t,this.__is_initialized__=!0)}createDeprecationWarning(t){let{method:e,removalVersion:r,useInstead:n}=t,i=n?` Use \`${n}\` instead.`:"",a=`\`${e}\` will be removed from this Extension in version \`${r}\`.${i}`;return new aN(this,"DEPRECATION_NOTICE",a)}createWarning(t,e){return new aN(this,t,e)}createError(t,e,r){return new Z4(this,t,e,r)}},jRe=class extends lee{},ph=class extends lee{};ph.Internal=jRe,ph.Anonymous="anonymous extension";var URe=class extends Hh{purchase(t){let e=en(mr.NFTPurchase,[t]);return this.request(e)}checkout(t){let e=en(mr.NFTCheckout,[t]);return this.request(e)}transfer(t){let e=en(mr.NFTTransfer,[t]);return this.request(e)}};function YH(t){return t.compat&&t.compat[Un.sdkName]!=null?typeof t.compat[Un.sdkName]=="string"?qCe(GCe(Un.version),t.compat[Un.sdkName]):!!t.compat[Un.sdkName]:!0}function FRe(t){var e;let r=(e=t==null?void 0:t.extensions)!=null?e:[],n={},i=[];if(Array.isArray(r)?r.forEach(a=>{YH(a)?(a.init(this),(a.name||a.name!==ph.Anonymous)&&(this[a.name]=a),a instanceof ph.Internal&&(iN(a.config)||(n[a.name]=a.config))):i.push(a)}):Object.keys(r).forEach(a=>{if(YH(r[a])){r[a].init(this);let s=r[a];this[a]=s,s instanceof ph.Internal&&(iN(s.config)||(n[r[a].name]=s.config))}else i.push(r[a])}),i.length)throw oRe(i);return n}var V_=class{constructor(e,r){this.apiKey=e;var n;if(!e)throw nRe();Un.platform==="react-native"&&(r!=null&&r.endpoint)&&fRe().log();let{defaultEndpoint:i,version:a}=Un;this.testMode=!!(r!=null&&r.testMode),this.endpoint=JE((n=r==null?void 0:r.endpoint)!=null?n:i).origin,this.auth=new vRe(this),this.user=new ARe(this),this.wallet=new $Re(this),this.nft=new URe(this),this.rpcProvider=new kRe(this);let s=FRe.call(this,r);this.parameters=JZ(J4({API_KEY:this.apiKey,DOMAIN_ORIGIN:window.location?window.location.origin:"",ETH_NETWORK:r==null?void 0:r.network,host:JE(this.endpoint).host,sdk:rRe[Un.sdkName],version:a,ext:iN(s)?void 0:s,locale:(r==null?void 0:r.locale)||"en_US"},Un.bundleId?{bundleId:Un.bundleId}:{})),r!=null&&r.deferPreload||this.preload()}get overlay(){if(!V_.__overlays__.has(this.parameters)){let e=new Un.ViewController(this.endpoint,this.parameters);e.init(),V_.__overlays__.set(this.parameters,e)}return V_.__overlays__.get(this.parameters)}preload(){return za(this,null,function*(){yield this.overlay.ready})}},fee=V_;fee.__overlays__=new Map;function BRe(t,e){return e&&Array.isArray(t)?t.find(r=>r.id===e):t}function qRe(t,e){var r;let n=(r=e.data.response)==null?void 0:r.id,i=BRe(t,n);if(n&&i){let a=new eD(i).applyResult(e.data.response.result).applyError(e.data.response.error);return{id:n,response:a}}return{}}function HRe(t,e){return za(this,null,function*(){let r=yield Rf("rt"),n;if(Un.platform==="web")try{n=yield PRe()}catch(i){console.error("webcrypto error",i)}return n?r?{msgType:t,payload:e,jwt:n,rt:r}:{msgType:t,payload:e,jwt:n}:{msgType:t,payload:e}})}function zRe(t){return za(this,null,function*(){!t.data.rt||(yield Tg("rt",t.data.rt))})}var VRe=class{constructor(t,e){this.endpoint=t,this.parameters=e,this.messageHandlers=new Set,this.ready=this.waitForReady(),this.listen()}post(t,e){return za(this,null,function*(){return aee(r=>za(this,null,function*(){yield this.ready;let n=[],i=Array.isArray(e)?e.map(c=>c.id):[],a=yield HRe(`${t}-${this.parameters}`,e);yield this._post(a);let s=c=>u=>{let{id:f,response:h}=qRe(e,u);zRe(u),f&&h&&Array.isArray(e)&&i.includes(f)?(n.push(h),n.length===e.length&&(c(),r(n))):f&&h&&!Array.isArray(e)&&f===e.id&&(c(),r(h))},o=this.on(qd.MAGIC_HANDLE_RESPONSE,s(()=>o()))}))})}on(t,e){let r=e.bind(window),n=i=>{i.data.msgType===`${t}-${this.parameters}`&&r(i)};return this.messageHandlers.add(n),()=>this.messageHandlers.delete(n)}waitForReady(){return new Promise(t=>{this.on(qd.MAGIC_OVERLAY_READY,()=>t())})}listen(){this.on(qd.MAGIC_HIDE_OVERLAY,()=>{this.hideOverlay()}),this.on(qd.MAGIC_SHOW_OVERLAY,()=>{this.showOverlay()})}},GRe=Object.create,dee=Object.defineProperty,KRe=Object.getOwnPropertyDescriptor,WRe=Object.getOwnPropertyNames,QRe=Object.getPrototypeOf,YRe=Object.prototype.hasOwnProperty,i_=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),hee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),JRe=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of WRe(e))!YRe.call(t,i)&&i!==r&&dee(t,i,{get:()=>e[i],enumerable:!(n=KRe(e,i))||n.enumerable});return t},pee=(t,e,r)=>(r=t!=null?GRe(QRe(t)):{},JRe(e||!t||!t.__esModule?dee(r,"default",{value:t,enumerable:!0}):r,t)),G_=(t,e,r)=>new Promise((n,i)=>{var a=c=>{try{o(r.next(c))}catch(u){i(u)}},s=c=>{try{o(r.throw(c))}catch(u){i(u)}},o=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,s);o((r=r.apply(t,e)).next())}),XRe=hee((t,e)=>{(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){return function r(n,i,a){function s(u,f){if(!i[u]){if(!n[u]){var h=typeof i_=="function"&&i_;if(!f&&h)return h(u,!0);if(o)return o(u,!0);var m=new Error("Cannot find module '"+u+"'");throw m.code="MODULE_NOT_FOUND",m}var y=i[u]={exports:{}};n[u][0].call(y.exports,function(w){var v=n[u][1][w];return s(v||w)},y,y.exports,r,n,i,a)}return i[u].exports}for(var o=typeof i_=="function"&&i_,c=0;c<a.length;c++)s(a[c]);return s}({1:[function(r,n,i){(function(a){var s=a.MutationObserver||a.WebKitMutationObserver,o;if(s){var c=0,u=new s(w),f=a.document.createTextNode("");u.observe(f,{characterData:!0}),o=function(){f.data=c=++c%2}}else if(!a.setImmediate&&typeof a.MessageChannel<"u"){var h=new a.MessageChannel;h.port1.onmessage=w,o=function(){h.port2.postMessage(0)}}else"document"in a&&"onreadystatechange"in a.document.createElement("script")?o=function(){var g=a.document.createElement("script");g.onreadystatechange=function(){w(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},a.document.documentElement.appendChild(g)}:o=function(){setTimeout(w,0)};var m,y=[];function w(){m=!0;for(var g,_,b=y.length;b;){for(_=y,y=[],g=-1;++g<b;)_[g]();b=y.length}m=!1}n.exports=v;function v(g){y.push(g)===1&&!m&&o()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,n,i){var a=r(1);function s(){}var o={},c=["REJECTED"],u=["FULFILLED"],f=["PENDING"];n.exports=h;function h(I){if(typeof I!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,I!==s&&v(this,I)}h.prototype.catch=function(I){return this.then(null,I)},h.prototype.then=function(I,E){if(typeof I!="function"&&this.state===u||typeof E!="function"&&this.state===c)return this;var p=new this.constructor(s);if(this.state!==f){var O=this.state===u?I:E;y(p,O,this.outcome)}else this.queue.push(new m(p,I,E));return p};function m(I,E,p){this.promise=I,typeof E=="function"&&(this.onFulfilled=E,this.callFulfilled=this.otherCallFulfilled),typeof p=="function"&&(this.onRejected=p,this.callRejected=this.otherCallRejected)}m.prototype.callFulfilled=function(I){o.resolve(this.promise,I)},m.prototype.otherCallFulfilled=function(I){y(this.promise,this.onFulfilled,I)},m.prototype.callRejected=function(I){o.reject(this.promise,I)},m.prototype.otherCallRejected=function(I){y(this.promise,this.onRejected,I)};function y(I,E,p){a(function(){var O;try{O=E(p)}catch(N){return o.reject(I,N)}O===I?o.reject(I,new TypeError("Cannot resolve promise with itself")):o.resolve(I,O)})}o.resolve=function(I,E){var p=g(w,E);if(p.status==="error")return o.reject(I,p.value);var O=p.value;if(O)v(I,O);else{I.state=u,I.outcome=E;for(var N=-1,F=I.queue.length;++N<F;)I.queue[N].callFulfilled(E)}return I},o.reject=function(I,E){I.state=c,I.outcome=E;for(var p=-1,O=I.queue.length;++p<O;)I.queue[p].callRejected(E);return I};function w(I){var E=I&&I.then;if(I&&(typeof I=="object"||typeof I=="function")&&typeof E=="function")return function(){E.apply(I,arguments)}}function v(I,E){var p=!1;function O(de){p||(p=!0,o.reject(I,de))}function N(de){p||(p=!0,o.resolve(I,de))}function F(){E(N,O)}var V=g(F);V.status==="error"&&O(V.value)}function g(I,E){var p={};try{p.value=I(E),p.status="success"}catch(O){p.status="error",p.value=O}return p}h.resolve=_;function _(I){return I instanceof this?I:o.resolve(new this(s),I)}h.reject=b;function b(I){var E=new this(s);return o.reject(E,I)}h.all=S;function S(I){var E=this;if(Object.prototype.toString.call(I)!=="[object Array]")return this.reject(new TypeError("must be an array"));var p=I.length,O=!1;if(!p)return this.resolve([]);for(var N=new Array(p),F=0,V=-1,de=new this(s);++V<p;)ve(I[V],V);return de;function ve(U,L){E.resolve(U).then(Q,function(ne){O||(O=!0,o.reject(de,ne))});function Q(ne){N[L]=ne,++F===p&&!O&&(O=!0,o.resolve(de,N))}}}h.race=A;function A(I){var E=this;if(Object.prototype.toString.call(I)!=="[object Array]")return this.reject(new TypeError("must be an array"));var p=I.length,O=!1;if(!p)return this.resolve([]);for(var N=-1,F=new this(s);++N<p;)V(I[N]);return F;function V(de){E.resolve(de).then(function(ve){O||(O=!0,o.resolve(F,ve))},function(ve){O||(O=!0,o.reject(F,ve))})}}},{1:1}],3:[function(r,n,i){(function(a){typeof a.Promise!="function"&&(a.Promise=r(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,n,i){var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X};function s(X,me){if(!(X instanceof me))throw new TypeError("Cannot call a class as a function")}function o(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var c=o();function u(){try{if(!c||!c.open)return!1;var X=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),me=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!X||me)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function f(X,me){X=X||[],me=me||{};try{return new Blob(X,me)}catch(Ie){if(Ie.name!=="TypeError")throw Ie;for(var re=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,Ee=new re,be=0;be<X.length;be+=1)Ee.append(X[be]);return Ee.getBlob(me.type)}}typeof Promise>"u"&&r(3);var h=Promise;function m(X,me){me&&X.then(function(re){me(null,re)},function(re){me(re)})}function y(X,me,re){typeof me=="function"&&X.then(me),typeof re=="function"&&X.catch(re)}function w(X){return typeof X!="string"&&(console.warn(X+" used as a key, but it is not a string."),X=String(X)),X}function v(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var g="local-forage-detect-blob-support",_=void 0,b={},S=Object.prototype.toString,A="readonly",I="readwrite";function E(X){for(var me=X.length,re=new ArrayBuffer(me),Ee=new Uint8Array(re),be=0;be<me;be++)Ee[be]=X.charCodeAt(be);return re}function p(X){return new h(function(me){var re=X.transaction(g,I),Ee=f([""]);re.objectStore(g).put(Ee,"key"),re.onabort=function(be){be.preventDefault(),be.stopPropagation(),me(!1)},re.oncomplete=function(){var be=navigator.userAgent.match(/Chrome\/(\d+)/),Ie=navigator.userAgent.match(/Edge\//);me(Ie||!be||parseInt(be[1],10)>=43)}}).catch(function(){return!1})}function O(X){return typeof _=="boolean"?h.resolve(_):p(X).then(function(me){return _=me,_})}function N(X){var me=b[X.name],re={};re.promise=new h(function(Ee,be){re.resolve=Ee,re.reject=be}),me.deferredOperations.push(re),me.dbReady?me.dbReady=me.dbReady.then(function(){return re.promise}):me.dbReady=re.promise}function F(X){var me=b[X.name],re=me.deferredOperations.pop();if(re)return re.resolve(),re.promise}function V(X,me){var re=b[X.name],Ee=re.deferredOperations.pop();if(Ee)return Ee.reject(me),Ee.promise}function de(X,me){return new h(function(re,Ee){if(b[X.name]=b[X.name]||q(),X.db)if(me)N(X),X.db.close();else return re(X.db);var be=[X.name];me&&be.push(X.version);var Ie=c.open.apply(c,be);me&&(Ie.onupgradeneeded=function(Ye){var ut=Ie.result;try{ut.createObjectStore(X.storeName),Ye.oldVersion<=1&&ut.createObjectStore(g)}catch(We){if(We.name==="ConstraintError")console.warn('The database "'+X.name+'" has been upgraded from version '+Ye.oldVersion+" to version "+Ye.newVersion+', but the storage "'+X.storeName+'" already exists.');else throw We}}),Ie.onerror=function(Ye){Ye.preventDefault(),Ee(Ie.error)},Ie.onsuccess=function(){var Ye=Ie.result;Ye.onversionchange=function(ut){ut.target.close()},re(Ye),F(X)}})}function ve(X){return de(X,!1)}function U(X){return de(X,!0)}function L(X,me){if(!X.db)return!0;var re=!X.db.objectStoreNames.contains(X.storeName),Ee=X.version<X.db.version,be=X.version>X.db.version;if(Ee&&(X.version!==me&&console.warn('The database "'+X.name+`" can't be downgraded from version `+X.db.version+" to version "+X.version+"."),X.version=X.db.version),be||re){if(re){var Ie=X.db.version+1;Ie>X.version&&(X.version=Ie)}return!0}return!1}function Q(X){return new h(function(me,re){var Ee=new FileReader;Ee.onerror=re,Ee.onloadend=function(be){var Ie=btoa(be.target.result||"");me({__local_forage_encoded_blob:!0,data:Ie,type:X.type})},Ee.readAsBinaryString(X)})}function ne(X){var me=E(atob(X.data));return f([me],{type:X.type})}function j(X){return X&&X.__local_forage_encoded_blob}function B(X){var me=this,re=me._initReady().then(function(){var Ee=b[me._dbInfo.name];if(Ee&&Ee.dbReady)return Ee.dbReady});return y(re,X,X),re}function H(X){N(X);for(var me=b[X.name],re=me.forages,Ee=0;Ee<re.length;Ee++){var be=re[Ee];be._dbInfo.db&&(be._dbInfo.db.close(),be._dbInfo.db=null)}return X.db=null,ve(X).then(function(Ie){return X.db=Ie,L(X)?U(X):Ie}).then(function(Ie){X.db=me.db=Ie;for(var Ye=0;Ye<re.length;Ye++)re[Ye]._dbInfo.db=Ie}).catch(function(Ie){throw V(X,Ie),Ie})}function M(X,me,re,Ee){Ee===void 0&&(Ee=1);try{var be=X.db.transaction(X.storeName,me);re(null,be)}catch(Ie){if(Ee>0&&(!X.db||Ie.name==="InvalidStateError"||Ie.name==="NotFoundError"))return h.resolve().then(function(){if(!X.db||Ie.name==="NotFoundError"&&!X.db.objectStoreNames.contains(X.storeName)&&X.version<=X.db.version)return X.db&&(X.version=X.db.version+1),U(X)}).then(function(){return H(X).then(function(){M(X,me,re,Ee-1)})}).catch(re);re(Ie)}}function q(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function k(X){var me=this,re={db:null};if(X)for(var Ee in X)re[Ee]=X[Ee];var be=b[re.name];be||(be=q(),b[re.name]=be),be.forages.push(me),me._initReady||(me._initReady=me.ready,me.ready=B);var Ie=[];function Ye(){return h.resolve()}for(var ut=0;ut<be.forages.length;ut++){var We=be.forages[ut];We!==me&&Ie.push(We._initReady().catch(Ye))}var Ve=be.forages.slice(0);return h.all(Ie).then(function(){return re.db=be.db,ve(re)}).then(function(ht){return re.db=ht,L(re,me._defaultConfig.version)?U(re):ht}).then(function(ht){re.db=be.db=ht,me._dbInfo=re;for(var Ht=0;Ht<Ve.length;Ht++){var Or=Ve[Ht];Or!==me&&(Or._dbInfo.db=re.db,Or._dbInfo.version=re.version)}})}function $(X,me){var re=this;X=w(X);var Ee=new h(function(be,Ie){re.ready().then(function(){M(re._dbInfo,A,function(Ye,ut){if(Ye)return Ie(Ye);try{var We=ut.objectStore(re._dbInfo.storeName),Ve=We.get(X);Ve.onsuccess=function(){var ht=Ve.result;ht===void 0&&(ht=null),j(ht)&&(ht=ne(ht)),be(ht)},Ve.onerror=function(){Ie(Ve.error)}}catch(ht){Ie(ht)}})}).catch(Ie)});return m(Ee,me),Ee}function G(X,me){var re=this,Ee=new h(function(be,Ie){re.ready().then(function(){M(re._dbInfo,A,function(Ye,ut){if(Ye)return Ie(Ye);try{var We=ut.objectStore(re._dbInfo.storeName),Ve=We.openCursor(),ht=1;Ve.onsuccess=function(){var Ht=Ve.result;if(Ht){var Or=Ht.value;j(Or)&&(Or=ne(Or));var Vr=X(Or,Ht.key,ht++);Vr!==void 0?be(Vr):Ht.continue()}else be()},Ve.onerror=function(){Ie(Ve.error)}}catch(Ht){Ie(Ht)}})}).catch(Ie)});return m(Ee,me),Ee}function pe(X,me,re){var Ee=this;X=w(X);var be=new h(function(Ie,Ye){var ut;Ee.ready().then(function(){return ut=Ee._dbInfo,S.call(me)==="[object Blob]"?O(ut.db).then(function(We){return We?me:Q(me)}):me}).then(function(We){M(Ee._dbInfo,I,function(Ve,ht){if(Ve)return Ye(Ve);try{var Ht=ht.objectStore(Ee._dbInfo.storeName);We===null&&(We=void 0);var Or=Ht.put(We,X);ht.oncomplete=function(){We===void 0&&(We=null),Ie(We)},ht.onabort=ht.onerror=function(){var Vr=Or.error?Or.error:Or.transaction.error;Ye(Vr)}}catch(Vr){Ye(Vr)}})}).catch(Ye)});return m(be,re),be}function Y(X,me){var re=this;X=w(X);var Ee=new h(function(be,Ie){re.ready().then(function(){M(re._dbInfo,I,function(Ye,ut){if(Ye)return Ie(Ye);try{var We=ut.objectStore(re._dbInfo.storeName),Ve=We.delete(X);ut.oncomplete=function(){be()},ut.onerror=function(){Ie(Ve.error)},ut.onabort=function(){var ht=Ve.error?Ve.error:Ve.transaction.error;Ie(ht)}}catch(ht){Ie(ht)}})}).catch(Ie)});return m(Ee,me),Ee}function te(X){var me=this,re=new h(function(Ee,be){me.ready().then(function(){M(me._dbInfo,I,function(Ie,Ye){if(Ie)return be(Ie);try{var ut=Ye.objectStore(me._dbInfo.storeName),We=ut.clear();Ye.oncomplete=function(){Ee()},Ye.onabort=Ye.onerror=function(){var Ve=We.error?We.error:We.transaction.error;be(Ve)}}catch(Ve){be(Ve)}})}).catch(be)});return m(re,X),re}function ce(X){var me=this,re=new h(function(Ee,be){me.ready().then(function(){M(me._dbInfo,A,function(Ie,Ye){if(Ie)return be(Ie);try{var ut=Ye.objectStore(me._dbInfo.storeName),We=ut.count();We.onsuccess=function(){Ee(We.result)},We.onerror=function(){be(We.error)}}catch(Ve){be(Ve)}})}).catch(be)});return m(re,X),re}function T(X,me){var re=this,Ee=new h(function(be,Ie){if(X<0){be(null);return}re.ready().then(function(){M(re._dbInfo,A,function(Ye,ut){if(Ye)return Ie(Ye);try{var We=ut.objectStore(re._dbInfo.storeName),Ve=!1,ht=We.openKeyCursor();ht.onsuccess=function(){var Ht=ht.result;if(!Ht){be(null);return}X===0||Ve?be(Ht.key):(Ve=!0,Ht.advance(X))},ht.onerror=function(){Ie(ht.error)}}catch(Ht){Ie(Ht)}})}).catch(Ie)});return m(Ee,me),Ee}function le(X){var me=this,re=new h(function(Ee,be){me.ready().then(function(){M(me._dbInfo,A,function(Ie,Ye){if(Ie)return be(Ie);try{var ut=Ye.objectStore(me._dbInfo.storeName),We=ut.openKeyCursor(),Ve=[];We.onsuccess=function(){var ht=We.result;if(!ht){Ee(Ve);return}Ve.push(ht.key),ht.continue()},We.onerror=function(){be(We.error)}}catch(ht){be(ht)}})}).catch(be)});return m(re,X),re}function ze(X,me){me=v.apply(this,arguments);var re=this.config();X=typeof X!="function"&&X||{},X.name||(X.name=X.name||re.name,X.storeName=X.storeName||re.storeName);var Ee=this,be;if(!X.name)be=h.reject("Invalid arguments");else{var Ie=X.name===re.name&&Ee._dbInfo.db,Ye=Ie?h.resolve(Ee._dbInfo.db):ve(X).then(function(ut){var We=b[X.name],Ve=We.forages;We.db=ut;for(var ht=0;ht<Ve.length;ht++)Ve[ht]._dbInfo.db=ut;return ut});X.storeName?be=Ye.then(function(ut){if(ut.objectStoreNames.contains(X.storeName)){var We=ut.version+1;N(X);var Ve=b[X.name],ht=Ve.forages;ut.close();for(var Ht=0;Ht<ht.length;Ht++){var Or=ht[Ht];Or._dbInfo.db=null,Or._dbInfo.version=We}var Vr=new h(function(Fr,gn){var Br=c.open(X.name,We);Br.onerror=function(P){var D=Br.result;D.close(),gn(P)},Br.onupgradeneeded=function(){var P=Br.result;P.deleteObjectStore(X.storeName)},Br.onsuccess=function(){var P=Br.result;P.close(),Fr(P)}});return Vr.then(function(Fr){Ve.db=Fr;for(var gn=0;gn<ht.length;gn++){var Br=ht[gn];Br._dbInfo.db=Fr,F(Br._dbInfo)}}).catch(function(Fr){throw(V(X,Fr)||h.resolve()).catch(function(){}),Fr})}}):be=Ye.then(function(ut){N(X);var We=b[X.name],Ve=We.forages;ut.close();for(var ht=0;ht<Ve.length;ht++){var Ht=Ve[ht];Ht._dbInfo.db=null}var Or=new h(function(Vr,Fr){var gn=c.deleteDatabase(X.name);gn.onerror=function(){var Br=gn.result;Br&&Br.close(),Fr(gn.error)},gn.onblocked=function(){console.warn('dropInstance blocked for database "'+X.name+'" until all open connections are closed')},gn.onsuccess=function(){var Br=gn.result;Br&&Br.close(),Vr(Br)}});return Or.then(function(Vr){We.db=Vr;for(var Fr=0;Fr<Ve.length;Fr++){var gn=Ve[Fr];F(gn._dbInfo)}}).catch(function(Vr){throw(V(X,Vr)||h.resolve()).catch(function(){}),Vr})})}return m(be,me),be}var et={_driver:"asyncStorage",_initStorage:k,_support:u(),iterate:G,getItem:$,setItem:pe,removeItem:Y,clear:te,length:ce,key:T,keys:le,dropInstance:ze};function yt(){return typeof openDatabase=="function"}var vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt="~~local_forage_type~",Ut=/^~~local_forage_type~([^~]+)~/,Xt="__lfsc__:",Sr=Xt.length,Ct="arbf",Pt="blob",kt="si08",Rt="ui08",Kt="uic8",Ft="si16",Gt="si32",Dt="ur16",Nt="ui32",zt="fl32",Mt="fl64",cr=Sr+Ct.length,tr=Object.prototype.toString;function ar(X){var me=X.length*.75,re=X.length,Ee,be=0,Ie,Ye,ut,We;X[X.length-1]==="="&&(me--,X[X.length-2]==="="&&me--);var Ve=new ArrayBuffer(me),ht=new Uint8Array(Ve);for(Ee=0;Ee<re;Ee+=4)Ie=vt.indexOf(X[Ee]),Ye=vt.indexOf(X[Ee+1]),ut=vt.indexOf(X[Ee+2]),We=vt.indexOf(X[Ee+3]),ht[be++]=Ie<<2|Ye>>4,ht[be++]=(Ye&15)<<4|ut>>2,ht[be++]=(ut&3)<<6|We&63;return Ve}function nr(X){var me=new Uint8Array(X),re="",Ee;for(Ee=0;Ee<me.length;Ee+=3)re+=vt[me[Ee]>>2],re+=vt[(me[Ee]&3)<<4|me[Ee+1]>>4],re+=vt[(me[Ee+1]&15)<<2|me[Ee+2]>>6],re+=vt[me[Ee+2]&63];return me.length%3===2?re=re.substring(0,re.length-1)+"=":me.length%3===1&&(re=re.substring(0,re.length-2)+"=="),re}function br(X,me){var re="";if(X&&(re=tr.call(X)),X&&(re==="[object ArrayBuffer]"||X.buffer&&tr.call(X.buffer)==="[object ArrayBuffer]")){var Ee,be=Xt;X instanceof ArrayBuffer?(Ee=X,be+=Ct):(Ee=X.buffer,re==="[object Int8Array]"?be+=kt:re==="[object Uint8Array]"?be+=Rt:re==="[object Uint8ClampedArray]"?be+=Kt:re==="[object Int16Array]"?be+=Ft:re==="[object Uint16Array]"?be+=Dt:re==="[object Int32Array]"?be+=Gt:re==="[object Uint32Array]"?be+=Nt:re==="[object Float32Array]"?be+=zt:re==="[object Float64Array]"?be+=Mt:me(new Error("Failed to get type for BinaryArray"))),me(be+nr(Ee))}else if(re==="[object Blob]"){var Ie=new FileReader;Ie.onload=function(){var Ye=gt+X.type+"~"+nr(this.result);me(Xt+Pt+Ye)},Ie.readAsArrayBuffer(X)}else try{me(JSON.stringify(X))}catch(Ye){console.error("Couldn't convert value into a JSON string: ",X),me(null,Ye)}}function En(X){if(X.substring(0,Sr)!==Xt)return JSON.parse(X);var me=X.substring(cr),re=X.substring(Sr,cr),Ee;if(re===Pt&&Ut.test(me)){var be=me.match(Ut);Ee=be[1],me=me.substring(be[0].length)}var Ie=ar(me);switch(re){case Ct:return Ie;case Pt:return f([Ie],{type:Ee});case kt:return new Int8Array(Ie);case Rt:return new Uint8Array(Ie);case Kt:return new Uint8ClampedArray(Ie);case Ft:return new Int16Array(Ie);case Dt:return new Uint16Array(Ie);case Gt:return new Int32Array(Ie);case Nt:return new Uint32Array(Ie);case zt:return new Float32Array(Ie);case Mt:return new Float64Array(Ie);default:throw new Error("Unkown type: "+re)}}var tn={serialize:br,deserialize:En,stringToBuffer:ar,bufferToString:nr};function li(X,me,re,Ee){X.executeSql("CREATE TABLE IF NOT EXISTS "+me.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],re,Ee)}function Mn(X){var me=this,re={db:null};if(X)for(var Ee in X)re[Ee]=typeof X[Ee]!="string"?X[Ee].toString():X[Ee];var be=new h(function(Ie,Ye){try{re.db=openDatabase(re.name,String(re.version),re.description,re.size)}catch(ut){return Ye(ut)}re.db.transaction(function(ut){li(ut,re,function(){me._dbInfo=re,Ie()},function(We,Ve){Ye(Ve)})},Ye)});return re.serializer=tn,be}function $n(X,me,re,Ee,be,Ie){X.executeSql(re,Ee,be,function(Ye,ut){ut.code===ut.SYNTAX_ERR?Ye.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[me.storeName],function(We,Ve){Ve.rows.length?Ie(We,ut):li(We,me,function(){We.executeSql(re,Ee,be,Ie)},Ie)},Ie):Ie(Ye,ut)},Ie)}function Zn(X,me){var re=this;X=w(X);var Ee=new h(function(be,Ie){re.ready().then(function(){var Ye=re._dbInfo;Ye.db.transaction(function(ut){$n(ut,Ye,"SELECT * FROM "+Ye.storeName+" WHERE key = ? LIMIT 1",[X],function(We,Ve){var ht=Ve.rows.length?Ve.rows.item(0).value:null;ht&&(ht=Ye.serializer.deserialize(ht)),be(ht)},function(We,Ve){Ie(Ve)})})}).catch(Ie)});return m(Ee,me),Ee}function Tr(X,me){var re=this,Ee=new h(function(be,Ie){re.ready().then(function(){var Ye=re._dbInfo;Ye.db.transaction(function(ut){$n(ut,Ye,"SELECT * FROM "+Ye.storeName,[],function(We,Ve){for(var ht=Ve.rows,Ht=ht.length,Or=0;Or<Ht;Or++){var Vr=ht.item(Or),Fr=Vr.value;if(Fr&&(Fr=Ye.serializer.deserialize(Fr)),Fr=X(Fr,Vr.key,Or+1),Fr!==void 0){be(Fr);return}}be()},function(We,Ve){Ie(Ve)})})}).catch(Ie)});return m(Ee,me),Ee}function Ur(X,me,re,Ee){var be=this;X=w(X);var Ie=new h(function(Ye,ut){be.ready().then(function(){me===void 0&&(me=null);var We=me,Ve=be._dbInfo;Ve.serializer.serialize(me,function(ht,Ht){Ht?ut(Ht):Ve.db.transaction(function(Or){$n(Or,Ve,"INSERT OR REPLACE INTO "+Ve.storeName+" (key, value) VALUES (?, ?)",[X,ht],function(){Ye(We)},function(Vr,Fr){ut(Fr)})},function(Or){if(Or.code===Or.QUOTA_ERR){if(Ee>0){Ye(Ur.apply(be,[X,We,re,Ee-1]));return}ut(Or)}})})}).catch(ut)});return m(Ie,re),Ie}function Ir(X,me,re){return Ur.apply(this,[X,me,re,1])}function _e(X,me){var re=this;X=w(X);var Ee=new h(function(be,Ie){re.ready().then(function(){var Ye=re._dbInfo;Ye.db.transaction(function(ut){$n(ut,Ye,"DELETE FROM "+Ye.storeName+" WHERE key = ?",[X],function(){be()},function(We,Ve){Ie(Ve)})})}).catch(Ie)});return m(Ee,me),Ee}function ee(X){var me=this,re=new h(function(Ee,be){me.ready().then(function(){var Ie=me._dbInfo;Ie.db.transaction(function(Ye){$n(Ye,Ie,"DELETE FROM "+Ie.storeName,[],function(){Ee()},function(ut,We){be(We)})})}).catch(be)});return m(re,X),re}function ye(X){var me=this,re=new h(function(Ee,be){me.ready().then(function(){var Ie=me._dbInfo;Ie.db.transaction(function(Ye){$n(Ye,Ie,"SELECT COUNT(key) as c FROM "+Ie.storeName,[],function(ut,We){var Ve=We.rows.item(0).c;Ee(Ve)},function(ut,We){be(We)})})}).catch(be)});return m(re,X),re}function Re(X,me){var re=this,Ee=new h(function(be,Ie){re.ready().then(function(){var Ye=re._dbInfo;Ye.db.transaction(function(ut){$n(ut,Ye,"SELECT key FROM "+Ye.storeName+" WHERE id = ? LIMIT 1",[X+1],function(We,Ve){var ht=Ve.rows.length?Ve.rows.item(0).key:null;be(ht)},function(We,Ve){Ie(Ve)})})}).catch(Ie)});return m(Ee,me),Ee}function He(X){var me=this,re=new h(function(Ee,be){me.ready().then(function(){var Ie=me._dbInfo;Ie.db.transaction(function(Ye){$n(Ye,Ie,"SELECT key FROM "+Ie.storeName,[],function(ut,We){for(var Ve=[],ht=0;ht<We.rows.length;ht++)Ve.push(We.rows.item(ht).key);Ee(Ve)},function(ut,We){be(We)})})}).catch(be)});return m(re,X),re}function Je(X){return new h(function(me,re){X.transaction(function(Ee){Ee.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(be,Ie){for(var Ye=[],ut=0;ut<Ie.rows.length;ut++)Ye.push(Ie.rows.item(ut).name);me({db:X,storeNames:Ye})},function(be,Ie){re(Ie)})},function(Ee){re(Ee)})})}function ot(X,me){me=v.apply(this,arguments);var re=this.config();X=typeof X!="function"&&X||{},X.name||(X.name=X.name||re.name,X.storeName=X.storeName||re.storeName);var Ee=this,be;return X.name?be=new h(function(Ie){var Ye;X.name===re.name?Ye=Ee._dbInfo.db:Ye=openDatabase(X.name,"","",0),X.storeName?Ie({db:Ye,storeNames:[X.storeName]}):Ie(Je(Ye))}).then(function(Ie){return new h(function(Ye,ut){Ie.db.transaction(function(We){function Ve(Vr){return new h(function(Fr,gn){We.executeSql("DROP TABLE IF EXISTS "+Vr,[],function(){Fr()},function(Br,P){gn(P)})})}for(var ht=[],Ht=0,Or=Ie.storeNames.length;Ht<Or;Ht++)ht.push(Ve(Ie.storeNames[Ht]));h.all(ht).then(function(){Ye()}).catch(function(Vr){ut(Vr)})},function(We){ut(We)})})}):be=h.reject("Invalid arguments"),m(be,me),be}var dt={_driver:"webSQLStorage",_initStorage:Mn,_support:yt(),iterate:Tr,getItem:Zn,setItem:Ir,removeItem:_e,clear:ee,length:ye,key:Re,keys:He,dropInstance:ot};function Et(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ue(X,me){var re=X.name+"/";return X.storeName!==me.storeName&&(re+=X.storeName+"/"),re}function Z(){var X="_localforage_support_test";try{return localStorage.setItem(X,!0),localStorage.removeItem(X),!1}catch{return!0}}function ge(){return!Z()||localStorage.length>0}function Me(X){var me=this,re={};if(X)for(var Ee in X)re[Ee]=X[Ee];return re.keyPrefix=ue(X,me._defaultConfig),ge()?(me._dbInfo=re,re.serializer=tn,h.resolve()):h.reject()}function Le(X){var me=this,re=me.ready().then(function(){for(var Ee=me._dbInfo.keyPrefix,be=localStorage.length-1;be>=0;be--){var Ie=localStorage.key(be);Ie.indexOf(Ee)===0&&localStorage.removeItem(Ie)}});return m(re,X),re}function wt(X,me){var re=this;X=w(X);var Ee=re.ready().then(function(){var be=re._dbInfo,Ie=localStorage.getItem(be.keyPrefix+X);return Ie&&(Ie=be.serializer.deserialize(Ie)),Ie});return m(Ee,me),Ee}function St(X,me){var re=this,Ee=re.ready().then(function(){for(var be=re._dbInfo,Ie=be.keyPrefix,Ye=Ie.length,ut=localStorage.length,We=1,Ve=0;Ve<ut;Ve++){var ht=localStorage.key(Ve);if(ht.indexOf(Ie)===0){var Ht=localStorage.getItem(ht);if(Ht&&(Ht=be.serializer.deserialize(Ht)),Ht=X(Ht,ht.substring(Ye),We++),Ht!==void 0)return Ht}}});return m(Ee,me),Ee}function hr(X,me){var re=this,Ee=re.ready().then(function(){var be=re._dbInfo,Ie;try{Ie=localStorage.key(X)}catch{Ie=null}return Ie&&(Ie=Ie.substring(be.keyPrefix.length)),Ie});return m(Ee,me),Ee}function ur(X){var me=this,re=me.ready().then(function(){for(var Ee=me._dbInfo,be=localStorage.length,Ie=[],Ye=0;Ye<be;Ye++){var ut=localStorage.key(Ye);ut.indexOf(Ee.keyPrefix)===0&&Ie.push(ut.substring(Ee.keyPrefix.length))}return Ie});return m(re,X),re}function Jr(X){var me=this,re=me.keys().then(function(Ee){return Ee.length});return m(re,X),re}function pr(X,me){var re=this;X=w(X);var Ee=re.ready().then(function(){var be=re._dbInfo;localStorage.removeItem(be.keyPrefix+X)});return m(Ee,me),Ee}function vr(X,me,re){var Ee=this;X=w(X);var be=Ee.ready().then(function(){me===void 0&&(me=null);var Ie=me;return new h(function(Ye,ut){var We=Ee._dbInfo;We.serializer.serialize(me,function(Ve,ht){if(ht)ut(ht);else try{localStorage.setItem(We.keyPrefix+X,Ve),Ye(Ie)}catch(Ht){(Ht.name==="QuotaExceededError"||Ht.name==="NS_ERROR_DOM_QUOTA_REACHED")&&ut(Ht),ut(Ht)}})})});return m(be,re),be}function rn(X,me){if(me=v.apply(this,arguments),X=typeof X!="function"&&X||{},!X.name){var re=this.config();X.name=X.name||re.name,X.storeName=X.storeName||re.storeName}var Ee=this,be;return X.name?be=new h(function(Ie){X.storeName?Ie(ue(X,Ee._defaultConfig)):Ie(X.name+"/")}).then(function(Ie){for(var Ye=localStorage.length-1;Ye>=0;Ye--){var ut=localStorage.key(Ye);ut.indexOf(Ie)===0&&localStorage.removeItem(ut)}}):be=h.reject("Invalid arguments"),m(be,me),be}var sr={_driver:"localStorageWrapper",_initStorage:Me,_support:Et(),iterate:St,getItem:wt,setItem:vr,removeItem:pr,clear:Le,length:Jr,key:hr,keys:ur,dropInstance:rn},$r=function(X,me){return X===me||typeof X=="number"&&typeof me=="number"&&isNaN(X)&&isNaN(me)},fn=function(X,me){for(var re=X.length,Ee=0;Ee<re;){if($r(X[Ee],me))return!0;Ee++}return!1},kr=Array.isArray||function(X){return Object.prototype.toString.call(X)==="[object Array]"},Kn={},_i={},Wn={INDEXEDDB:et,WEBSQL:dt,LOCALSTORAGE:sr},Ei=[Wn.INDEXEDDB._driver,Wn.WEBSQL._driver,Wn.LOCALSTORAGE._driver],xi=["dropInstance"],ei=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(xi),kn={description:"",driver:Ei.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Gi(X,me){X[me]=function(){var re=arguments;return X.ready().then(function(){return X[me].apply(X,re)})}}function Oi(){for(var X=1;X<arguments.length;X++){var me=arguments[X];if(me)for(var re in me)me.hasOwnProperty(re)&&(kr(me[re])?arguments[0][re]=me[re].slice():arguments[0][re]=me[re])}return arguments[0]}var fa=function(){function X(me){s(this,X);for(var re in Wn)if(Wn.hasOwnProperty(re)){var Ee=Wn[re],be=Ee._driver;this[re]=be,Kn[be]||this.defineDriver(Ee)}this._defaultConfig=Oi({},kn),this._config=Oi({},this._defaultConfig,me),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return X.prototype.config=function(me){if((typeof me>"u"?"undefined":a(me))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var re in me){if(re==="storeName"&&(me[re]=me[re].replace(/\W/g,"_")),re==="version"&&typeof me[re]!="number")return new Error("Database version must be a number.");this._config[re]=me[re]}return"driver"in me&&me.driver?this.setDriver(this._config.driver):!0}else return typeof me=="string"?this._config[me]:this._config},X.prototype.defineDriver=function(me,re,Ee){var be=new h(function(Ie,Ye){try{var ut=me._driver,We=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!me._driver){Ye(We);return}for(var Ve=ei.concat("_initStorage"),ht=0,Ht=Ve.length;ht<Ht;ht++){var Or=Ve[ht],Vr=!fn(xi,Or);if((Vr||me[Or])&&typeof me[Or]!="function"){Ye(We);return}}var Fr=function(){for(var Br=function(he){return function(){var Se=new Error("Method "+he+" is not implemented by the current driver"),Ce=h.reject(Se);return m(Ce,arguments[arguments.length-1]),Ce}},P=0,D=xi.length;P<D;P++){var K=xi[P];me[K]||(me[K]=Br(K))}};Fr();var gn=function(Br){Kn[ut]&&console.info("Redefining LocalForage driver: "+ut),Kn[ut]=me,_i[ut]=Br,Ie()};"_support"in me?me._support&&typeof me._support=="function"?me._support().then(gn,Ye):gn(!!me._support):gn(!0)}catch(Br){Ye(Br)}});return y(be,re,Ee),be},X.prototype.driver=function(){return this._driver||null},X.prototype.getDriver=function(me,re,Ee){var be=Kn[me]?h.resolve(Kn[me]):h.reject(new Error("Driver not found."));return y(be,re,Ee),be},X.prototype.getSerializer=function(me){var re=h.resolve(tn);return y(re,me),re},X.prototype.ready=function(me){var re=this,Ee=re._driverSet.then(function(){return re._ready===null&&(re._ready=re._initDriver()),re._ready});return y(Ee,me,me),Ee},X.prototype.setDriver=function(me,re,Ee){var be=this;kr(me)||(me=[me]);var Ie=this._getSupportedDrivers(me);function Ye(){be._config.driver=be.driver()}function ut(ht){return be._extend(ht),Ye(),be._ready=be._initStorage(be._config),be._ready}function We(ht){return function(){var Ht=0;function Or(){for(;Ht<ht.length;){var Vr=ht[Ht];return Ht++,be._dbInfo=null,be._ready=null,be.getDriver(Vr).then(ut).catch(Or)}Ye();var Fr=new Error("No available storage method found.");return be._driverSet=h.reject(Fr),be._driverSet}return Or()}}var Ve=this._driverSet!==null?this._driverSet.catch(function(){return h.resolve()}):h.resolve();return this._driverSet=Ve.then(function(){var ht=Ie[0];return be._dbInfo=null,be._ready=null,be.getDriver(ht).then(function(Ht){be._driver=Ht._driver,Ye(),be._wrapLibraryMethodsWithReady(),be._initDriver=We(Ie)})}).catch(function(){Ye();var ht=new Error("No available storage method found.");return be._driverSet=h.reject(ht),be._driverSet}),y(this._driverSet,re,Ee),this._driverSet},X.prototype.supports=function(me){return!!_i[me]},X.prototype._extend=function(me){Oi(this,me)},X.prototype._getSupportedDrivers=function(me){for(var re=[],Ee=0,be=me.length;Ee<be;Ee++){var Ie=me[Ee];this.supports(Ie)&&re.push(Ie)}return re},X.prototype._wrapLibraryMethodsWithReady=function(){for(var me=0,re=ei.length;me<re;me++)Gi(this,ei[me])},X.prototype.createInstance=function(me){return new X(me)},X}(),Hs=new fa;n.exports=Hs},{3:3}]},{},[4])(4)})}),ZRe=hee((t,e)=>{(function(r,n){typeof t=="object"&&typeof e<"u"?n(t):typeof define=="function"&&define.amd?define("localforage-driver-memory",["exports"],n):n(r.LocalforageDriverMemory={})})(typeof self<"u"?self:t,function(r){var n="localforage-driver-memory";function i(j){var B=typeof Symbol=="function"&&j[Symbol.iterator],H=0;return B?B.call(j):{next:function(){return j&&H>=j.length&&(j=void 0),{value:j&&j[H++],done:!j}}}}function a(j,B){j=j||[],B=B||{};try{return new Blob(j,B)}catch(k){if(k.name!=="TypeError")throw k;for(var H=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,M=new H,q=0;q<j.length;q+=1)M.append(j[q]);return M.getBlob(B.type)}}var s=/^~~local_forage_type~([^~]+)~/,o=9,c=o+4,u=Object.prototype.toString;function f(j){var B=j.length*.75,H=j.length;j[j.length-1]==="="&&(B--,j[j.length-2]==="="&&B--);for(var M=new ArrayBuffer(B),q=new Uint8Array(M),k=0,$=0;k<H;k+=4){var G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(j[k]),pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(j[k+1]),Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(j[k+2]),te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(j[k+3]);q[$++]=G<<2|pe>>4,q[$++]=(pe&15)<<4|Y>>2,q[$++]=(Y&3)<<6|te&63}return M}function h(j){for(var B=new Uint8Array(j),H="",M=0;M<B.length;M+=3)H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[B[M]>>2],H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(B[M]&3)<<4|B[M+1]>>4],H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(B[M+1]&15)<<2|B[M+2]>>6],H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[B[M+2]&63];return B.length%3===2?H=H.substring(0,H.length-1)+"=":B.length%3===1&&(H=H.substring(0,H.length-2)+"=="),H}function m(j,B){var H="";if(j&&(H=u.call(j)),j&&(H==="[object ArrayBuffer]"||j.buffer&&u.call(j.buffer)==="[object ArrayBuffer]")){var M=void 0,q="__lfsc__:";j instanceof ArrayBuffer?(M=j,q+="arbf"):(M=j.buffer,H==="[object Int8Array]"?q+="si08":H==="[object Uint8Array]"?q+="ui08":H==="[object Uint8ClampedArray]"?q+="uic8":H==="[object Int16Array]"?q+="si16":H==="[object Uint16Array]"?q+="ur16":H==="[object Int32Array]"?q+="si32":H==="[object Uint32Array]"?q+="ui32":H==="[object Float32Array]"?q+="fl32":H==="[object Float64Array]"?q+="fl64":B(new Error("Failed to get type for BinaryArray"))),B(q+h(M))}else if(H==="[object Blob]"){var k=new FileReader;k.onload=function(){var $="~~local_forage_type~"+j.type+"~"+h(this.result);B("__lfsc__:blob"+$)},k.readAsArrayBuffer(j)}else try{B(JSON.stringify(j))}catch($){console.error("Couldn't convert value into a JSON string: ",j),B(null,$)}}function y(j){if(j.substring(0,o)!=="__lfsc__:")return JSON.parse(j);var B=j.substring(c),H=j.substring(o,c),M;if(H==="blob"&&s.test(B)){var q=B.match(s);M=q[1],B=B.substring(q[0].length)}var k=f(B);switch(H){case"arbf":return k;case"blob":return a([k],{type:M});case"si08":return new Int8Array(k);case"ui08":return new Uint8Array(k);case"uic8":return new Uint8ClampedArray(k);case"si16":return new Int16Array(k);case"ur16":return new Uint16Array(k);case"si32":return new Int32Array(k);case"ui32":return new Uint32Array(k);case"fl32":return new Float32Array(k);case"fl64":return new Float64Array(k);default:throw new Error("Unkown type: "+H)}}function w(j){var B,H;if(j===null||typeof j!="object"||"isActiveClone"in j)return j;var M=j instanceof Date?new Date(j):j.constructor();try{for(var q=i(Object.keys(j)),k=q.next();!k.done;k=q.next()){var $=k.value;Object.prototype.hasOwnProperty.call(j,$)&&(j.isActiveClone=null,M[$]=w(j[$]),delete j.isActiveClone)}}catch(G){B={error:G}}finally{try{k&&!k.done&&(H=q.return)&&H.call(q)}finally{if(B)throw B.error}}return M}function v(j,B){return(j.name||B.name)+"/"+(j.storeName||B.storeName)+"/"}function g(j,B){B&&j.then(function(H){B(null,H)},function(H){B(H)})}function _(){for(var j=[],B=0;B<arguments.length;B++)j[B]=arguments[B];if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}function b(j,B){var H=this;if(B=_.apply(this,arguments),j=typeof j!="function"&&j||{},!j.name){var M=this.config();j.name=j.name||M.name,j.storeName=j.storeName||M.storeName}var q;return j.name?q=new Promise(function(k){j.storeName?k(v(j,H._defaultConfig)):k(j.name+"/")}):q=Promise.reject("Invalid arguments"),{promise:q,callback:B}}function S(j){return typeof j!="string"&&(console.warn(j+" used as a key, but it is not a string."),j=String(j)),j}var A={bufferToString:h,deserialize:y,serialize:m,stringToBuffer:f},I={},E=function(){function j(B){this.kp=B,this.data={}}return j.resolve=function(B){return I[B]||(I[B]=new j(B)),I[B]},j.prototype.clear=function(){this.data={}},j.prototype.drop=function(){this.clear(),delete I[this.kp]},j.prototype.get=function(B){return this.data[B]},j.prototype.key=function(B){return this.keys()[B]},j.prototype.keys=function(){return Object.keys(this.data)},j.prototype.rm=function(B){delete this.data[B]},j.prototype.set=function(B,H){this.data[B]=H},j}();function p(j){var B=j?w(j):{},H=v(B,this._defaultConfig),M=E.resolve(H);return this._dbInfo=B,this._dbInfo.serializer=A,this._dbInfo.keyPrefix=H,this._dbInfo.mStore=M,Promise.resolve()}function O(j){var B=this,H=this.ready().then(function(){B._dbInfo.mStore.clear()});return g(H,j),H}function N(j,B){var H=b.apply(this,arguments),M=H.promise,q=H.callback,k=M.then(function($){E.resolve($).drop()});return g(k,q),M}function F(j,B){var H=this;j=S(j);var M=this.ready().then(function(){var q=H._dbInfo.mStore.get(j);return q==null?null:H._dbInfo.serializer.deserialize(q)});return g(M,B),M}function V(j,B){var H=this,M=this.ready().then(function(){for(var q=H._dbInfo.mStore,k=q.keys(),$=0;$<k.length;$++){var G=q.get(k[$]);if(G&&(G=H._dbInfo.serializer.deserialize(G)),G=j(G,k[$],$+1),G!==void 0)return G}});return g(M,B),M}function de(j,B){var H=this,M=this.ready().then(function(){var q;try{q=H._dbInfo.mStore.key(j),q===void 0&&(q=null)}catch{q=null}return q});return g(M,B),M}function ve(j){var B=this,H=this.ready().then(function(){return B._dbInfo.mStore.keys()});return g(H,j),H}function U(j){var B=this.keys().then(function(H){return H.length});return g(B,j),B}function L(j,B){var H=this;j=S(j);var M=this.ready().then(function(){H._dbInfo.mStore.rm(j)});return g(M,B),M}function Q(j,B,H){var M=this;j=S(j);var q=this.ready().then(function(){B===void 0&&(B=null);var k=B;return new Promise(function($,G){M._dbInfo.serializer.serialize(B,function(pe,Y){if(Y)G(Y);else try{M._dbInfo.mStore.set(j,pe),$(k)}catch(te){G(te)}})})});return g(q,H),q}var ne=!0;r._support=ne,r._driver=n,r._initStorage=p,r.clear=O,r.dropInstance=N,r.getItem=F,r.iterate=V,r.key=de,r.keys=ve,r.length=U,r.removeItem=L,r.setItem=Q,Object.defineProperty(r,"__esModule",{value:!0})})}),QT=pee(XRe()),JH=pee(ZRe()),e6e={display:"none",position:"fixed",top:"0",right:"0",width:"100%",height:"100%",borderRadius:"0",border:"none",zIndex:"2147483647"};function t6e(t){for(let[e,r]of Object.entries(e6e))t.style[e]=r}function r6e(t){return!![].slice.call(document.querySelectorAll(".magic-iframe")).find(r=>r.src.includes(t))}var n6e=class extends VRe{constructor(){super(...arguments),this.activeElement=null}init(){this.test="hello",this.iframe=new Promise(e=>{let r=()=>{if(r6e(encodeURIComponent(this.parameters)))uRe().log();else{let n=document.createElement("iframe");n.classList.add("magic-iframe"),n.dataset.magicIframeLabel=JE(this.endpoint).host,n.title="Secure Modal",n.src=JE(`/send?params=${encodeURIComponent(this.parameters)}`,this.endpoint).href,t6e(n),document.body.appendChild(n),e(n)}};["loaded","interactive","complete"].includes(document.readyState)?r():window.addEventListener("load",r,!1)}),window.addEventListener("message",e=>{var r;if(e.origin===this.endpoint&&e.data&&e.data.msgType&&this.messageHandlers.size){e.data.response=(r=e.data.response)!=null?r:{};for(let n of this.messageHandlers.values())n(e)}})}showOverlay(){return G_(this,null,function*(){let e=yield this.iframe;e.style.display="block",this.activeElement=document.activeElement,e.focus()})}hideOverlay(){return G_(this,null,function*(){var e;let r=yield this.iframe;r.style.display="none",(e=this.activeElement)!=null&&e.focus&&this.activeElement.focus(),this.activeElement=null})}_post(e){return G_(this,null,function*(){let r=yield this.iframe;if(r&&r.contentWindow)r.contentWindow.postMessage(e,this.endpoint);else throw iRe()})}},i6e=tRe(fee,{platform:"web",sdkName:"magic-sdk",version:"21.2.0",defaultEndpoint:"https://auth.magic.link/",ViewController:n6e,configureStorage:()=>G_(void 0,null,function*(){let t=QT.default.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"});return yield t.defineDriver(JH),yield t.setDriver([QT.default.INDEXEDDB,QT.default.LOCALSTORAGE,JH._driver]),t})});const nD=Object.freeze(Object.defineProperty({__proto__:null,DeepLinkPage:BZ,DeviceVerificationEventEmit:QE,DeviceVerificationEventOnReceived:VZ,EthChainType:GZ,Events:Cv,Extension:ph,ExtensionError:Z4,ExtensionWarning:aN,LoginWithEmailOTPEventEmit:Yp,LoginWithEmailOTPEventOnReceived:zZ,LoginWithMagicLinkEventEmit:qZ,LoginWithMagicLinkEventOnReceived:HZ,Magic:i6e,MagicIncomingWindowMessage:qd,MagicOutgoingWindowMessage:pb,MagicPayloadMethod:mr,RPCError:mb,RPCErrorCode:W2,RecoveryMethodType:KZ,SDKError:Kf,SDKErrorCode:Gf,SDKWarning:I1,SDKWarningCode:sm,Wallets:so,isPromiEvent:iee},Symbol.toStringTag,{value:"Module"})),a6e=js(nD);var s6e=Object.create,gee=Object.defineProperty,o6e=Object.getOwnPropertyDescriptor,c6e=Object.getOwnPropertyNames,u6e=Object.getPrototypeOf,l6e=Object.prototype.hasOwnProperty,iD=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),f6e=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of c6e(e))!l6e.call(t,i)&&i!==r&&gee(t,i,{get:()=>e[i],enumerable:!(n=o6e(e,i))||n.enumerable});return t},mee=(t,e,r)=>(r=t!=null?s6e(u6e(t)):{},f6e(e||!t||!t.__esModule?gee(r,"default",{value:t,enumerable:!0}):r,t)),O1=(t,e,r)=>new Promise((n,i)=>{var a=c=>{try{o(r.next(c))}catch(u){i(u)}},s=c=>{try{o(r.throw(c))}catch(u){i(u)}},o=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,s);o((r=r.apply(t,e)).next())}),yee=iD((t,e)=>{(function(r,n){typeof t=="object"?e.exports=t=n():typeof define=="function"&&define.amd?define([],n):r.CryptoJS=n()})(t,function(){var r=r||function(n,i){var a=Object.create||function(){function g(){}return function(_){var b;return g.prototype=_,b=new g,g.prototype=null,b}}(),s={},o=s.lib={},c=o.Base=function(){return{extend:function(g){var _=a(this);return g&&_.mixIn(g),(!_.hasOwnProperty("init")||this.init===_.init)&&(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var g=this.extend();return g.init.apply(g,arguments),g},init:function(){},mixIn:function(g){for(var _ in g)g.hasOwnProperty(_)&&(this[_]=g[_]);g.hasOwnProperty("toString")&&(this.toString=g.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=o.WordArray=c.extend({init:function(g,_){g=this.words=g||[],_!=i?this.sigBytes=_:this.sigBytes=g.length*4},toString:function(g){return(g||h).stringify(this)},concat:function(g){var _=this.words,b=g.words,S=this.sigBytes,A=g.sigBytes;if(this.clamp(),S%4)for(var I=0;I<A;I++){var E=b[I>>>2]>>>24-I%4*8&255;_[S+I>>>2]|=E<<24-(S+I)%4*8}else for(var I=0;I<A;I+=4)_[S+I>>>2]=b[I>>>2];return this.sigBytes+=A,this},clamp:function(){var g=this.words,_=this.sigBytes;g[_>>>2]&=4294967295<<32-_%4*8,g.length=n.ceil(_/4)},clone:function(){var g=c.clone.call(this);return g.words=this.words.slice(0),g},random:function(g){for(var _=[],b=function(p){var p=p,O=987654321,N=4294967295;return function(){O=36969*(O&65535)+(O>>16)&N,p=18e3*(p&65535)+(p>>16)&N;var F=(O<<16)+p&N;return F/=4294967296,F+=.5,F*(n.random()>.5?1:-1)}},S=0,A;S<g;S+=4){var I=b((A||n.random())*4294967296);A=I()*987654071,_.push(I()*4294967296|0)}return new u.init(_,g)}}),f=s.enc={},h=f.Hex={stringify:function(g){for(var _=g.words,b=g.sigBytes,S=[],A=0;A<b;A++){var I=_[A>>>2]>>>24-A%4*8&255;S.push((I>>>4).toString(16)),S.push((I&15).toString(16))}return S.join("")},parse:function(g){for(var _=g.length,b=[],S=0;S<_;S+=2)b[S>>>3]|=parseInt(g.substr(S,2),16)<<24-S%8*4;return new u.init(b,_/2)}},m=f.Latin1={stringify:function(g){for(var _=g.words,b=g.sigBytes,S=[],A=0;A<b;A++){var I=_[A>>>2]>>>24-A%4*8&255;S.push(String.fromCharCode(I))}return S.join("")},parse:function(g){for(var _=g.length,b=[],S=0;S<_;S++)b[S>>>2]|=(g.charCodeAt(S)&255)<<24-S%4*8;return new u.init(b,_)}},y=f.Utf8={stringify:function(g){try{return decodeURIComponent(escape(m.stringify(g)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(g){return m.parse(unescape(encodeURIComponent(g)))}},w=o.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(g){typeof g=="string"&&(g=y.parse(g)),this._data.concat(g),this._nDataBytes+=g.sigBytes},_process:function(g){var _=this._data,b=_.words,S=_.sigBytes,A=this.blockSize,I=A*4,E=S/I;g?E=n.ceil(E):E=n.max((E|0)-this._minBufferSize,0);var p=E*A,O=n.min(p*4,S);if(p){for(var N=0;N<p;N+=A)this._doProcessBlock(b,N);var F=b.splice(0,p);_.sigBytes-=O}return new u.init(F,O)},clone:function(){var g=c.clone.call(this);return g._data=this._data.clone(),g},_minBufferSize:0});o.Hasher=w.extend({cfg:c.extend(),init:function(g){this.cfg=this.cfg.extend(g),this.reset()},reset:function(){w.reset.call(this),this._doReset()},update:function(g){return this._append(g),this._process(),this},finalize:function(g){g&&this._append(g);var _=this._doFinalize();return _},blockSize:16,_createHelper:function(g){return function(_,b){return new g.init(b).finalize(_)}},_createHmacHelper:function(g){return function(_,b){return new v.HMAC.init(g,b).finalize(_)}}});var v=s.algo={};return s}(Math);return r})}),d6e=iD((t,e)=>{(function(r,n){typeof t=="object"?e.exports=t=n(yee()):typeof define=="function"&&define.amd?define(["./core"],n):n(r.CryptoJS)})(t,function(r){return function(n){var i=r,a=i.lib,s=a.WordArray,o=a.Hasher,c=i.algo,u=[],f=[];(function(){function y(_){for(var b=n.sqrt(_),S=2;S<=b;S++)if(!(_%S))return!1;return!0}function w(_){return(_-(_|0))*4294967296|0}for(var v=2,g=0;g<64;)y(v)&&(g<8&&(u[g]=w(n.pow(v,1/2))),f[g]=w(n.pow(v,1/3)),g++),v++})();var h=[],m=c.SHA256=o.extend({_doReset:function(){this._hash=new s.init(u.slice(0))},_doProcessBlock:function(y,w){for(var v=this._hash.words,g=v[0],_=v[1],b=v[2],S=v[3],A=v[4],I=v[5],E=v[6],p=v[7],O=0;O<64;O++){if(O<16)h[O]=y[w+O]|0;else{var N=h[O-15],F=(N<<25|N>>>7)^(N<<14|N>>>18)^N>>>3,V=h[O-2],de=(V<<15|V>>>17)^(V<<13|V>>>19)^V>>>10;h[O]=F+h[O-7]+de+h[O-16]}var ve=A&I^~A&E,U=g&_^g&b^_&b,L=(g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22),Q=(A<<26|A>>>6)^(A<<21|A>>>11)^(A<<7|A>>>25),ne=p+Q+ve+f[O]+h[O],j=L+U;p=E,E=I,I=A,A=S+ne|0,S=b,b=_,_=g,g=ne+j|0}v[0]=v[0]+g|0,v[1]=v[1]+_|0,v[2]=v[2]+b|0,v[3]=v[3]+S|0,v[4]=v[4]+A|0,v[5]=v[5]+I|0,v[6]=v[6]+E|0,v[7]=v[7]+p|0},_doFinalize:function(){var y=this._data,w=y.words,v=this._nDataBytes*8,g=y.sigBytes*8;return w[g>>>5]|=128<<24-g%32,w[(g+64>>>9<<4)+14]=n.floor(v/4294967296),w[(g+64>>>9<<4)+15]=v,y.sigBytes=w.length*4,this._process(),this._hash},clone:function(){var y=o.clone.call(this);return y._hash=this._hash.clone(),y}});i.SHA256=o._createHelper(m),i.HmacSHA256=o._createHmacHelper(m)}(Math),r.SHA256})}),h6e=iD((t,e)=>{(function(r,n){typeof t=="object"?e.exports=t=n(yee()):typeof define=="function"&&define.amd?define(["./core"],n):n(r.CryptoJS)})(t,function(r){return function(){var n=r,i=n.lib,a=i.WordArray,s=n.enc;s.Base64={stringify:function(c){var u=c.words,f=c.sigBytes,h=this._map;c.clamp();for(var m=[],y=0;y<f;y+=3)for(var w=u[y>>>2]>>>24-y%4*8&255,v=u[y+1>>>2]>>>24-(y+1)%4*8&255,g=u[y+2>>>2]>>>24-(y+2)%4*8&255,_=w<<16|v<<8|g,b=0;b<4&&y+b*.75<f;b++)m.push(h.charAt(_>>>6*(3-b)&63));var S=h.charAt(64);if(S)for(;m.length%4;)m.push(S);return m.join("")},parse:function(c){var u=c.length,f=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var m=0;m<f.length;m++)h[f.charCodeAt(m)]=m}var y=f.charAt(64);if(y){var w=c.indexOf(y);w!==-1&&(u=w)}return o(c,u,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function o(c,u,f){for(var h=[],m=0,y=0;y<u;y++)if(y%4){var w=f[c.charCodeAt(y-1)]<<y%4*2,v=f[c.charCodeAt(y)]>>>6-y%4*2;h[m>>>2]|=(w|v)<<24-m%4*8,m++}return a.create(h,m)}}(),r.enc.Base64})}),vee=(t=>(t.ParseRedirectResult="magic_oauth_parse_redirect_result",t))(vee||{}),bee=(t=>(t.InvalidRequest="invalid_request",t.InvalidClient="invalid_client",t.InvalidScope="invalid_scope",t.InvalidGrant="invalid_grant",t.UnauthorizedClient="unauthorized_client",t.UnsupportedResponseType="unsupported_response_type",t.UnsupportedGrantType="unsupported_grant_type",t.UnsupportedTokenType="unsupported_token_type",t.AccessDenied="access_denied",t.ServerError="server_error",t.TemporarilyUnavailable="temporarily_unavailable",t))(bee||{}),p6e=mee(d6e()),g6e=mee(h6e()),XH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",wee=typeof window<"u"&&!!window.crypto,m6e=wee&&!!window.crypto.subtle;function y6e(t){return Array.from(t).map(e=>XH[e%XH.length]).join("")}function ZH(t){let e=r=>r.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");if(t instanceof ArrayBuffer){let r=new Uint8Array(t),n=Array.from(r).map(a=>String.fromCharCode(a)).join(""),i=btoa(n);return e(i)}return e(g6e.default.stringify(t))}function v6e(t){return O1(this,null,function*(){if(m6e){let e=new TextEncoder().encode(t);return crypto.subtle.digest("SHA-256",e).then(ZH)}return ZH((0,p6e.default)(t))})}function ez(t){let e=new Uint8Array(t);if(wee)window.crypto.getRandomValues(e);else for(let r=0;r<t;r+=1)e[r]=Math.floor(Math.random()*Math.floor(255));return y6e(e)}function b6e(){return O1(this,null,function*(){let t=ez(128),e=ez(128),r=yield v6e(e);return{verifier:e,challenge:r,state:t}})}var w6e=class extends ph.Internal{constructor(){super(...arguments),this.name="oauth",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1}}loginWithRedirect(t){return this.utils.createPromiEvent(e=>O1(this,null,function*(){let{provider:r,query:n}=yield _6e.call(this,t);window.location.href=new URL(`/v1/oauth2/${r}/start?${n}`,this.sdk.endpoint).href,e()}))}getRedirectResult(){let t=window.location.search,e=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",e),E6e.call(this,t)}},XE="oauth_redirect_metadata";function _6e(t){return O1(this,null,function*(){yield this.utils.storage.removeItem(XE);let{provider:e,redirectURI:r,scope:n,loginHint:i}=t,{verifier:a,challenge:s,state:o}=yield b6e(),c=JSON.stringify({verifier:a,state:o});return yield this.utils.storage.setItem(XE,c),{query:[`magic_api_key=${encodeURIComponent(this.sdk.apiKey)}`,`magic_challenge=${encodeURIComponent(s)}`,`state=${encodeURIComponent(o)}`,`platform=${encodeURIComponent("web")}`,n&&`scope=${encodeURIComponent(n.join(" "))}`,r&&`redirect_uri=${encodeURIComponent(r)}`,i&&`login_hint=${encodeURIComponent(i)}`].reduce((u,f)=>f?`${u}&${f}`:u),provider:e,redirectURI:r}})}function E6e(t){return this.utils.createPromiEvent((e,r)=>O1(this,null,function*(){var n;let i=yield this.utils.storage.getItem(XE),{verifier:a,state:s}=JSON.parse(i);this.utils.storage.removeItem(XE);let o=this.utils.createJsonRpcRequestPayload("magic_oauth_parse_redirect_result",[t,a,s]),c=yield this.request(o),u=c,f=c;f.error&&r(this.createError(f.error,(n=f.error_description)!=null?n:"An error occurred.",{errorURI:f.error_uri,provider:f.provider})),e(u)}))}const aD=Object.freeze(Object.defineProperty({__proto__:null,OAuthErrorCode:bee,OAuthExtension:w6e,OAuthPayloadMethods:vee},Symbol.toStringTag,{value:"Module"})),x6e=js(aD);var A6e=ke&&ke.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),S6e=ke&&ke.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tz=ke&&ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&A6e(e,t,r);return S6e(e,t),e};Object.defineProperty(K2,"__esModule",{value:!0});K2.MagicConnector=void 0;const rz=Lh,nz=Io,I6e=w2;class O6e extends I6e.AbstractConnector{constructor(e){super({supportedChainIds:nz.getConfiguration()[rz.ProviderType.MAGIC].chains}),this.activate=async()=>{var r;if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const i=await this.getProvider(),a=await i.request({method:"eth_accounts"});return this.account=(r=a[0])!==null&&r!==void 0?r:null,{provider:i,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const r=await this.magic.wallet.getProvider();return Object.assign(Object.assign({},r),{request:new Proxy(r.request,{apply:async(n,i,a)=>{var s,o,c;if(((s=a[0])===null||s===void 0?void 0:s.method)==="wallet_switchEthereumChain")try{const u=parseInt((c=(o=a[0])===null||o===void 0?void 0:o.params[0])===null||c===void 0?void 0:c.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(u)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(u),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return n.bind(r)(...a)}})})},this.getChainId=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId},this.getAccount=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account},this.deactivate=()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");this.magic.user.logout()},this.buildMagicInstance=async r=>{const{Magic:n}=await Promise.resolve().then(()=>tz(a6e)),{OAuthExtension:i}=await Promise.resolve().then(()=>tz(x6e)),a=nz.getConfiguration()[rz.ProviderType.MAGIC];return new n(a.apiKey,{extensions:[new i],network:{rpcUrl:a.urls[r],chainId:r}})},this.chainId=e,this.account=null}}K2.MagicConnector=O6e;(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a),Object.defineProperty(n,s,{enumerable:!0,get:function(){return i[a]}})}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(w2,t),r(x2,t),r(N2,t),r(D2,t),r(M2,t),r($2,t),r(K2,t)})(l4);var _ee={},P1={};Object.defineProperty(P1,"__esModule",{value:!0});P1.Storage=void 0;class P6e{}P1.Storage=P6e;var Y2={};Object.defineProperty(Y2,"__esModule",{value:!0});Y2.LocalStorage=void 0;const T6e=P1;class C6e extends T6e.Storage{get(e){const r=window.localStorage.getItem(e);return r===null?void 0:r}set(e,r){window.localStorage.setItem(e,r)}remove(e){window.localStorage.removeItem(e)}removeRegExp(e){for(let r=localStorage.length-1;r>=0;r--){const n=localStorage.key(r);n&&e.test(n)&&localStorage.removeItem(n)}}}Y2.LocalStorage=C6e;(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a),Object.defineProperty(n,s,{enumerable:!0,get:function(){return i[a]}})}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(P1,t),r(Y2,t)})(_ee);var J2={};Object.defineProperty(J2,"__esModule",{value:!0});J2.ProviderAdapter=void 0;class sD{constructor(e){this.provider=e,this.id=0,this.on=(r,n)=>this.provider.on(r,n),this.emit=(r,...n)=>this.provider.emit(r,n),this.removeListener=(r,n)=>this.provider.removeListener(r,n),this.request=async({method:r,params:n})=>this.isModernProvider()?this.provider.request({method:r,params:n}):this.send(r,n),this.sendAsync=async(r,n)=>this.hasSendAsync()?this.provider.sendAsync(r,(i,a)=>{a&&!a.hasOwnProperty("result")?n(i,{id:0,jsonrpc:"2.0",result:a}):n(i,a)}):this.send(r,n)}static adapt(e){const r=new sD(e);return Object.assign(Object.assign({},e),{on:r.on,emit:r.emit,removeListener:r.removeListener,request:r.request,sendAsync:r.sendAsync,send:r.send.bind(r)})}async send(e,r){let n,i,a;const s=typeof r=="function";if(s){const o=e;i=o.params||[],n=o.method,a=r}else n=e,i=r||[],a=(o,c)=>{if(o)throw o;return c};if(this.isModernProvider()){const[o,c]=await this.provider.request({method:n,params:i}).then(f=>[null,f]).catch(f=>[f,void 0]);return a(o,s?{id:"",jsonrpc:"2.0",result:c}:c)}else{this.patchOldMobile();const[o,c]=s?await new Promise(u=>this.provider.send(e,(f,h)=>{u([f,h])})):await new Promise(u=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:n,params:i},(f,h)=>{u([h&&h.hasOwnProperty("error")?h.error:f,h&&h.hasOwnProperty("result")?h.result:h])}));return a(o,c)}}isModernProvider(){return typeof this.provider.request=="function"}hasSendAsync(){return typeof this.provider.sendAsync=="function"}patchOldMobile(){this.provider&&!this.provider.isDapper&&!this.provider.isFortmatic&&!this.provider.isMetamask&&this.hasSendAsync()&&this.provider.send!==this.provider.sendAsync&&(this.provider.send=this.provider.sendAsync)}}J2.ProviderAdapter=sD;Object.defineProperty(Sg,"__esModule",{value:!0});Sg.connection=Sg.ConnectionManager=void 0;const iz=Bs(),to=sc,Rl=l4,R6e=_ee,YT=Io,az=J2,sz="Web3ReactDeactivate";class Eee{constructor(e){this.storage=e,this.getWalletName=()=>{if(this.connector instanceof Rl.WalletConnectV2Connector)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:r}=YT.getConfiguration();this.storage.remove(r),Rl.WalletConnectV2Connector.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=()=>{this.connector&&this.connector.removeListener(sz,this.handleWeb3ReactDeactivate),this.disconnect().catch(console.error)}}async connect(e,r=iz.ChainId.ETHEREUM_MAINNET){this.connector=this.buildConnector(e,r),this.connector.on(sz,this.handleWeb3ReactDeactivate);const{provider:n,account:i}=await this.connector.activate();return this.setConnectionData(e,r),{provider:az.ProviderAdapter.adapt(n),providerType:e,account:i||"",chainId:r}}async tryPreviousConnection(){const e=this.getConnectionData();if(!e)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");const r=await this.connect(e.providerType,e.chainId);if(r.providerType===to.ProviderType.INJECTED){const n=await r.provider.request({method:"eth_chainId"}),i=n?parseInt(n,16):null;i&&e.chainId!==i&&this.setConnectionData(e.providerType,i)}return Object.assign(Object.assign({},r),{chainId:this.getConnectionData().chainId})}getAvailableProviders(){const e=[to.ProviderType.FORTMATIC,to.ProviderType.WALLET_CONNECT,to.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?e.unshift(to.ProviderType.INJECTED):e.unshift(to.ProviderType.METAMASK_MOBILE),e}async disconnect(){this.connector&&(this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async createProvider(e,r=iz.ChainId.ETHEREUM_MAINNET){const i=await this.buildConnector(e,r).getProvider();return az.ProviderAdapter.adapt(i)}buildConnector(e,r){switch(e){case to.ProviderType.INJECTED:return new Rl.InjectedConnector(r);case to.ProviderType.FORTMATIC:return new Rl.FortmaticConnector(r);case to.ProviderType.MAGIC:return new Rl.MagicConnector(r);case to.ProviderType.WALLET_LINK:return new Rl.WalletLinkConnector(r);case to.ProviderType.NETWORK:return new Rl.NetworkConnector(r);case to.ProviderType.WALLET_CONNECT_V2:return new Rl.WalletConnectV2Connector(r);default:throw new Error(`Invalid provider ${e}`)}}getConnectionData(){const{storageKey:e}=YT.getConfiguration(),r=this.storage.get(e);return r?JSON.parse(r):void 0}setConnectionData(e,r){const{storageKey:n}=YT.getConfiguration(),i=JSON.stringify({providerType:e,chainId:r});this.storage.set(n,i)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}Sg.ConnectionManager=Eee;Sg.connection=new Eee(new R6e.LocalStorage);var xee={};Object.defineProperty(xee,"__esModule",{value:!0});(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a),Object.defineProperty(n,s,{enumerable:!0,get:function(){return i[a]}})}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(Sg,t),r(l4,t),r(Io,t),r(xee,t)})(Pf);function oz(t){return t!=null&&typeof t=="object"&&"message"in t}const N6e=()=>{const[t,e]=Ze.useState(),[r,n]=Ze.useState(),[i,a]=Ze.useState(),[s,o]=Ze.useState(),c=Ze.useCallback(async()=>{a(void 0),o(void 0);try{const f=await Pf.connection.tryPreviousConnection(),y=await(await new LR(f.provider).getSigner()).signMessage("Hello world");o(y)}catch(f){a(oz(f)?f.message:"Unknown error")}},[]),u=Ze.useCallback(async()=>{n(void 0),e(void 0);try{const f=await Pf.connection.tryPreviousConnection(),m=await new LR(f.provider).getBalance(f.account??"");e(Jle(m))}catch(f){n(oz(f)?f.message:"Unknown error")}},[]);return ft.jsxs("div",{children:[ft.jsx("h1",{children:"This is a simple test page"}),ft.jsxs("div",{children:[ft.jsx("p",{children:"Sign message test"}),ft.jsx(Ah.Button,{primary:!0,size:"small",onClick:c,children:"Sign message"}),s?ft.jsxs("p",{children:["Signed message: ",s]}):null,i?ft.jsxs("p",{children:["Error: ",i]}):null]}),ft.jsxs("div",{children:[ft.jsx("br",{}),ft.jsx("p",{children:"Get balance test"}),ft.jsx(Ah.Button,{primary:!0,size:"small",onClick:u,children:"Get balance"}),t?ft.jsxs("p",{children:["Balance: ",t]}):null,r?ft.jsxs("p",{children:["Error: ",r]}):null]})]})};var oD={},X2={},Z2=yr;X2.__esModule=!0;X2.default=void 0;var D6e=Z2(Dn()),M6e=Z2(Xn);Z2(Rn());var $6e=Z2(Ze),pu=qn();function yb(t){var e=t.active,r=t.children,n=t.className,i=t.content,a=t.disabled,s=t.indeterminate,o=t.inline,c=t.inverted,u=t.size,f=(0,M6e.default)("ui",u,(0,pu.useKeyOnly)(e,"active"),(0,pu.useKeyOnly)(a,"disabled"),(0,pu.useKeyOnly)(s,"indeterminate"),(0,pu.useKeyOnly)(c,"inverted"),(0,pu.useKeyOnly)(r||i,"text"),(0,pu.useKeyOrValueAndKey)(o,"inline"),"loader",n),h=(0,pu.getUnhandledProps)(yb,t),m=(0,pu.getElementType)(yb,t);return $6e.default.createElement(m,(0,D6e.default)({},h,{className:f}),pu.childrenUtils.isNil(r)?i:r)}yb.handledProps=["active","as","children","className","content","disabled","indeterminate","inline","inverted","size"];yb.propTypes={};var k6e=yb;X2.default=k6e;var L6e=ke&&ke.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),oN=ke&&ke.__assign||function(){return oN=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},oN.apply(this,arguments)},j6e=ke&&ke.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),U6e=ke&&ke.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),F6e=ke&&ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&j6e(e,t,r);return U6e(e,t),e},B6e=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oD,"__esModule",{value:!0});var eA=oD.Loader=void 0,cz=F6e(Ze),q6e=B6e(X2),H6e=function(t){L6e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getClassName=function(){return[this.props.className||"",this.props.provider||""].join(" ").trim()},e.prototype.render=function(){return cz.createElement(q6e.default,oN({"aria-live":"polite","aria-label":"Loading",role:"status"},this.props,{className:this.getClassName()}))},e}(cz.PureComponent);eA=oD.Loader=H6e;const z6e=()=>{const t=b8(),e=Ze.useCallback(async()=>{try{const r=await Pf.connection.tryPreviousConnection();return!!(r.account&&r.provider)}catch{return!1}},[]);return Ze.useEffect(()=>{e().then(r=>{t(r?"/user":"/login")})},[e,t]),ft.jsx(eA,{active:!0,size:"huge"})},V6e=/decentraland\.(org|zone|today)$/,Aee=()=>{const t=v8(),r=new URLSearchParams(t.search).get("redirectTo");if(r!==null)try{const n=new URL(r);if(V6e.test(n.hostname))return n.href}catch{console.error("Can't parse redirectTo URL");return}},G6e=Pf.getConfiguration().magic.apiKey,K6e=()=>{const t=Aee(),e=b8(),r=Ze.useCallback(async()=>{const{Magic:n}=await ub(()=>Promise.resolve().then(()=>nD),void 0),{OAuthExtension:i}=await ub(()=>Promise.resolve().then(()=>aD),void 0),a=new n(G6e,{extensions:[new i]});try{await(a==null?void 0:a.oauth.getRedirectResult()),await Pf.connection.connect(Lh.ProviderType.MAGIC),t?window.location.href=t:e("/user")}catch(s){console.log(s),e("/login")}},[e]);return Ze.useEffect(()=>{r()},[]),ft.jsx(eA,{active:!0,size:"huge"})};var See={exports:{}};/*!
163
+ Copyright (c) 2018 Jed Watson.
164
+ Licensed under the MIT License (MIT), see
165
+ http://jedwatson.github.io/classnames
166
+ */(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var n=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var s=typeof a;if(s==="string"||s==="number")n.push(a);else if(Array.isArray(a)){if(a.length){var o=r.apply(null,a);o&&n.push(o)}}else if(s==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){n.push(a.toString());continue}for(var c in a)e.call(a,c)&&a[c]&&n.push(c)}}}return n.join(" ")}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(See);var W6e=See.exports;const Cg=Df(W6e),Q6e="/assets/logo-9a364aec.svg";var Cy={},JT,uz;function Y6e(){if(uz)return JT;uz=1;var t=pc(),e=d2();function r(n){return t(n)&&n.nodeType===1&&!e(n)}return JT=r,JT}var XT,lz;function J6e(){if(lz)return XT;lz=1;function t(e,r,n,i){var a=-1,s=e==null?0:e.length;for(i&&s&&(n=e[++a]);++a<s;)n=r(n,e[a],a,e);return n}return XT=t,XT}var ZT,fz;function X6e(){if(fz)return ZT;fz=1;function t(e,r,n,i,a){return a(e,function(s,o,c){n=i?(i=!1,s):r(n,s,o,c)}),n}return ZT=t,ZT}var eC,dz;function Iee(){if(dz)return eC;dz=1;var t=J6e(),e=l1(),r=qf(),n=X6e(),i=Ii();function a(s,o,c){var u=i(s)?t:n,f=arguments.length<3;return u(s,r(o,4),c,f,e)}return eC=a,eC}var Oee=Ze.createContext(),Pee=Ze.createContext();function Z6e(t){var e=t.children,r=Ze.useState(null),n=r[0],i=r[1],a=Ze.useRef(!1);Ze.useEffect(function(){return function(){a.current=!0}},[]);var s=Ze.useCallback(function(o){a.current||i(o)},[]);return Ze.createElement(Oee.Provider,{value:n},Ze.createElement(Pee.Provider,{value:s},e))}var Tee=function(e){return Array.isArray(e)?e[0]:e},Cee=function(e){if(typeof e=="function"){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return e.apply(void 0,n)}},cN=function(e,r){if(typeof e=="function")return Cee(e,r);e!=null&&(e.current=r)},hz=function(e){return e.reduce(function(r,n){var i=n[0],a=n[1];return r[i]=a,r},{})},pz=typeof window<"u"&&window.document&&window.document.createElement?Ze.useLayoutEffect:Ze.useEffect,bs="top",Oo="bottom",Po="right",ws="left",cD="auto",T1=[bs,Oo,Po,ws],Rg="start",vb="end",eNe="clippingParents",Ree="viewport",Ry="popper",tNe="reference",gz=T1.reduce(function(t,e){return t.concat([e+"-"+Rg,e+"-"+vb])},[]),Nee=[].concat(T1,[cD]).reduce(function(t,e){return t.concat([e,e+"-"+Rg,e+"-"+vb])},[]),rNe="beforeRead",nNe="read",iNe="afterRead",aNe="beforeMain",sNe="main",oNe="afterMain",cNe="beforeWrite",uNe="write",lNe="afterWrite",fNe=[rNe,nNe,iNe,aNe,sNe,oNe,cNe,uNe,lNe];function Wc(t){return t?(t.nodeName||"").toLowerCase():null}function Ls(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Oh(t){var e=Ls(t).Element;return t instanceof e||t instanceof Element}function xo(t){var e=Ls(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function uD(t){if(typeof ShadowRoot>"u")return!1;var e=Ls(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function dNe(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},i=e.attributes[r]||{},a=e.elements[r];!xo(a)||!Wc(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(s){var o=i[s];o===!1?a.removeAttribute(s):a.setAttribute(s,o===!0?"":o)}))})}function hNe(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],a=e.attributes[n]||{},s=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),o=s.reduce(function(c,u){return c[u]="",c},{});!xo(i)||!Wc(i)||(Object.assign(i.style,o),Object.keys(a).forEach(function(c){i.removeAttribute(c)}))})}}const pNe={name:"applyStyles",enabled:!0,phase:"write",fn:dNe,effect:hNe,requires:["computeStyles"]};function Gc(t){return t.split("-")[0]}var gh=Math.max,ZE=Math.min,Ng=Math.round;function uN(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Dee(){return!/^((?!chrome|android).)*safari/i.test(uN())}function Dg(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,a=1;e&&xo(t)&&(i=t.offsetWidth>0&&Ng(n.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Ng(n.height)/t.offsetHeight||1);var s=Oh(t)?Ls(t):window,o=s.visualViewport,c=!Dee()&&r,u=(n.left+(c&&o?o.offsetLeft:0))/i,f=(n.top+(c&&o?o.offsetTop:0))/a,h=n.width/i,m=n.height/a;return{width:h,height:m,top:f,right:u+h,bottom:f+m,left:u,x:u,y:f}}function lD(t){var e=Dg(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function Mee(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&uD(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nl(t){return Ls(t).getComputedStyle(t)}function gNe(t){return["table","td","th"].indexOf(Wc(t))>=0}function Qf(t){return((Oh(t)?t.ownerDocument:t.document)||window.document).documentElement}function tA(t){return Wc(t)==="html"?t:t.assignedSlot||t.parentNode||(uD(t)?t.host:null)||Qf(t)}function mz(t){return!xo(t)||nl(t).position==="fixed"?null:t.offsetParent}function mNe(t){var e=/firefox/i.test(uN()),r=/Trident/i.test(uN());if(r&&xo(t)){var n=nl(t);if(n.position==="fixed")return null}var i=tA(t);for(uD(i)&&(i=i.host);xo(i)&&["html","body"].indexOf(Wc(i))<0;){var a=nl(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function C1(t){for(var e=Ls(t),r=mz(t);r&&gNe(r)&&nl(r).position==="static";)r=mz(r);return r&&(Wc(r)==="html"||Wc(r)==="body"&&nl(r).position==="static")?e:r||mNe(t)||e}function fD(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Rv(t,e,r){return gh(t,ZE(e,r))}function yNe(t,e,r){var n=Rv(t,e,r);return n>r?r:n}function $ee(){return{top:0,right:0,bottom:0,left:0}}function kee(t){return Object.assign({},$ee(),t)}function Lee(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var vNe=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,kee(typeof e!="number"?e:Lee(e,T1))};function bNe(t){var e,r=t.state,n=t.name,i=t.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,o=Gc(r.placement),c=fD(o),u=[ws,Po].indexOf(o)>=0,f=u?"height":"width";if(!(!a||!s)){var h=vNe(i.padding,r),m=lD(a),y=c==="y"?bs:ws,w=c==="y"?Oo:Po,v=r.rects.reference[f]+r.rects.reference[c]-s[c]-r.rects.popper[f],g=s[c]-r.rects.reference[c],_=C1(a),b=_?c==="y"?_.clientHeight||0:_.clientWidth||0:0,S=v/2-g/2,A=h[y],I=b-m[f]-h[w],E=b/2-m[f]/2+S,p=Rv(A,E,I),O=c;r.modifiersData[n]=(e={},e[O]=p,e.centerOffset=p-E,e)}}function wNe(t){var e=t.state,r=t.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||Mee(e.elements.popper,i)&&(e.elements.arrow=i))}const _Ne={name:"arrow",enabled:!0,phase:"main",fn:bNe,effect:wNe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Mg(t){return t.split("-")[1]}var ENe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xNe(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:Ng(r*i)/i||0,y:Ng(n*i)/i||0}}function yz(t){var e,r=t.popper,n=t.popperRect,i=t.placement,a=t.variation,s=t.offsets,o=t.position,c=t.gpuAcceleration,u=t.adaptive,f=t.roundOffsets,h=t.isFixed,m=s.x,y=m===void 0?0:m,w=s.y,v=w===void 0?0:w,g=typeof f=="function"?f({x:y,y:v}):{x:y,y:v};y=g.x,v=g.y;var _=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),S=ws,A=bs,I=window;if(u){var E=C1(r),p="clientHeight",O="clientWidth";if(E===Ls(r)&&(E=Qf(r),nl(E).position!=="static"&&o==="absolute"&&(p="scrollHeight",O="scrollWidth")),E=E,i===bs||(i===ws||i===Po)&&a===vb){A=Oo;var N=h&&E===I&&I.visualViewport?I.visualViewport.height:E[p];v-=N-n.height,v*=c?1:-1}if(i===ws||(i===bs||i===Oo)&&a===vb){S=Po;var F=h&&E===I&&I.visualViewport?I.visualViewport.width:E[O];y-=F-n.width,y*=c?1:-1}}var V=Object.assign({position:o},u&&ENe),de=f===!0?xNe({x:y,y:v},Ls(r)):{x:y,y:v};if(y=de.x,v=de.y,c){var ve;return Object.assign({},V,(ve={},ve[A]=b?"0":"",ve[S]=_?"0":"",ve.transform=(I.devicePixelRatio||1)<=1?"translate("+y+"px, "+v+"px)":"translate3d("+y+"px, "+v+"px, 0)",ve))}return Object.assign({},V,(e={},e[A]=b?v+"px":"",e[S]=_?y+"px":"",e.transform="",e))}function ANe(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,s=a===void 0?!0:a,o=r.roundOffsets,c=o===void 0?!0:o,u={placement:Gc(e.placement),variation:Mg(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,yz(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,yz(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const SNe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ANe,data:{}};var a_={passive:!0};function INe(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,a=i===void 0?!0:i,s=n.resize,o=s===void 0?!0:s,c=Ls(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&u.forEach(function(f){f.addEventListener("scroll",r.update,a_)}),o&&c.addEventListener("resize",r.update,a_),function(){a&&u.forEach(function(f){f.removeEventListener("scroll",r.update,a_)}),o&&c.removeEventListener("resize",r.update,a_)}}const ONe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:INe,data:{}};var PNe={left:"right",right:"left",bottom:"top",top:"bottom"};function K_(t){return t.replace(/left|right|bottom|top/g,function(e){return PNe[e]})}var TNe={start:"end",end:"start"};function vz(t){return t.replace(/start|end/g,function(e){return TNe[e]})}function dD(t){var e=Ls(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function hD(t){return Dg(Qf(t)).left+dD(t).scrollLeft}function CNe(t,e){var r=Ls(t),n=Qf(t),i=r.visualViewport,a=n.clientWidth,s=n.clientHeight,o=0,c=0;if(i){a=i.width,s=i.height;var u=Dee();(u||!u&&e==="fixed")&&(o=i.offsetLeft,c=i.offsetTop)}return{width:a,height:s,x:o+hD(t),y:c}}function RNe(t){var e,r=Qf(t),n=dD(t),i=(e=t.ownerDocument)==null?void 0:e.body,a=gh(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=gh(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),o=-n.scrollLeft+hD(t),c=-n.scrollTop;return nl(i||r).direction==="rtl"&&(o+=gh(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:o,y:c}}function pD(t){var e=nl(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function jee(t){return["html","body","#document"].indexOf(Wc(t))>=0?t.ownerDocument.body:xo(t)&&pD(t)?t:jee(tA(t))}function Nv(t,e){var r;e===void 0&&(e=[]);var n=jee(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),a=Ls(n),s=i?[a].concat(a.visualViewport||[],pD(n)?n:[]):n,o=e.concat(s);return i?o:o.concat(Nv(tA(s)))}function lN(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function NNe(t,e){var r=Dg(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function bz(t,e,r){return e===Ree?lN(CNe(t,r)):Oh(e)?NNe(e,r):lN(RNe(Qf(t)))}function DNe(t){var e=Nv(tA(t)),r=["absolute","fixed"].indexOf(nl(t).position)>=0,n=r&&xo(t)?C1(t):t;return Oh(n)?e.filter(function(i){return Oh(i)&&Mee(i,n)&&Wc(i)!=="body"}):[]}function MNe(t,e,r,n){var i=e==="clippingParents"?DNe(t):[].concat(e),a=[].concat(i,[r]),s=a[0],o=a.reduce(function(c,u){var f=bz(t,u,n);return c.top=gh(f.top,c.top),c.right=ZE(f.right,c.right),c.bottom=ZE(f.bottom,c.bottom),c.left=gh(f.left,c.left),c},bz(t,s,n));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Uee(t){var e=t.reference,r=t.element,n=t.placement,i=n?Gc(n):null,a=n?Mg(n):null,s=e.x+e.width/2-r.width/2,o=e.y+e.height/2-r.height/2,c;switch(i){case bs:c={x:s,y:e.y-r.height};break;case Oo:c={x:s,y:e.y+e.height};break;case Po:c={x:e.x+e.width,y:o};break;case ws:c={x:e.x-r.width,y:o};break;default:c={x:e.x,y:e.y}}var u=i?fD(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(a){case Rg:c[u]=c[u]-(e[f]/2-r[f]/2);break;case vb:c[u]=c[u]+(e[f]/2-r[f]/2);break}}return c}function bb(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=n===void 0?t.placement:n,a=r.strategy,s=a===void 0?t.strategy:a,o=r.boundary,c=o===void 0?eNe:o,u=r.rootBoundary,f=u===void 0?Ree:u,h=r.elementContext,m=h===void 0?Ry:h,y=r.altBoundary,w=y===void 0?!1:y,v=r.padding,g=v===void 0?0:v,_=kee(typeof g!="number"?g:Lee(g,T1)),b=m===Ry?tNe:Ry,S=t.rects.popper,A=t.elements[w?b:m],I=MNe(Oh(A)?A:A.contextElement||Qf(t.elements.popper),c,f,s),E=Dg(t.elements.reference),p=Uee({reference:E,element:S,strategy:"absolute",placement:i}),O=lN(Object.assign({},S,p)),N=m===Ry?O:E,F={top:I.top-N.top+_.top,bottom:N.bottom-I.bottom+_.bottom,left:I.left-N.left+_.left,right:N.right-I.right+_.right},V=t.modifiersData.offset;if(m===Ry&&V){var de=V[i];Object.keys(F).forEach(function(ve){var U=[Po,Oo].indexOf(ve)>=0?1:-1,L=[bs,Oo].indexOf(ve)>=0?"y":"x";F[ve]+=de[L]*U})}return F}function $Ne(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=r.boundary,a=r.rootBoundary,s=r.padding,o=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?Nee:c,f=Mg(n),h=f?o?gz:gz.filter(function(w){return Mg(w)===f}):T1,m=h.filter(function(w){return u.indexOf(w)>=0});m.length===0&&(m=h);var y=m.reduce(function(w,v){return w[v]=bb(t,{placement:v,boundary:i,rootBoundary:a,padding:s})[Gc(v)],w},{});return Object.keys(y).sort(function(w,v){return y[w]-y[v]})}function kNe(t){if(Gc(t)===cD)return[];var e=K_(t);return[vz(t),e,vz(e)]}function LNe(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,s=r.altAxis,o=s===void 0?!0:s,c=r.fallbackPlacements,u=r.padding,f=r.boundary,h=r.rootBoundary,m=r.altBoundary,y=r.flipVariations,w=y===void 0?!0:y,v=r.allowedAutoPlacements,g=e.options.placement,_=Gc(g),b=_===g,S=c||(b||!w?[K_(g)]:kNe(g)),A=[g].concat(S).reduce(function($,G){return $.concat(Gc(G)===cD?$Ne(e,{placement:G,boundary:f,rootBoundary:h,padding:u,flipVariations:w,allowedAutoPlacements:v}):G)},[]),I=e.rects.reference,E=e.rects.popper,p=new Map,O=!0,N=A[0],F=0;F<A.length;F++){var V=A[F],de=Gc(V),ve=Mg(V)===Rg,U=[bs,Oo].indexOf(de)>=0,L=U?"width":"height",Q=bb(e,{placement:V,boundary:f,rootBoundary:h,altBoundary:m,padding:u}),ne=U?ve?Po:ws:ve?Oo:bs;I[L]>E[L]&&(ne=K_(ne));var j=K_(ne),B=[];if(a&&B.push(Q[de]<=0),o&&B.push(Q[ne]<=0,Q[j]<=0),B.every(function($){return $})){N=V,O=!1;break}p.set(V,B)}if(O)for(var H=w?3:1,M=function(G){var pe=A.find(function(Y){var te=p.get(Y);if(te)return te.slice(0,G).every(function(ce){return ce})});if(pe)return N=pe,"break"},q=H;q>0;q--){var k=M(q);if(k==="break")break}e.placement!==N&&(e.modifiersData[n]._skip=!0,e.placement=N,e.reset=!0)}}const jNe={name:"flip",enabled:!0,phase:"main",fn:LNe,requiresIfExists:["offset"],data:{_skip:!1}};function wz(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function _z(t){return[bs,Po,Oo,ws].some(function(e){return t[e]>=0})}function UNe(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,s=bb(e,{elementContext:"reference"}),o=bb(e,{altBoundary:!0}),c=wz(s,n),u=wz(o,i,a),f=_z(c),h=_z(u);e.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const FNe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:UNe};function BNe(t,e,r){var n=Gc(t),i=[ws,bs].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,s=a[0],o=a[1];return s=s||0,o=(o||0)*i,[ws,Po].indexOf(n)>=0?{x:o,y:s}:{x:s,y:o}}function qNe(t){var e=t.state,r=t.options,n=t.name,i=r.offset,a=i===void 0?[0,0]:i,s=Nee.reduce(function(f,h){return f[h]=BNe(h,e.rects,a),f},{}),o=s[e.placement],c=o.x,u=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=s}const HNe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:qNe};function zNe(t){var e=t.state,r=t.name;e.modifiersData[r]=Uee({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const VNe={name:"popperOffsets",enabled:!0,phase:"read",fn:zNe,data:{}};function GNe(t){return t==="x"?"y":"x"}function KNe(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,a=i===void 0?!0:i,s=r.altAxis,o=s===void 0?!1:s,c=r.boundary,u=r.rootBoundary,f=r.altBoundary,h=r.padding,m=r.tether,y=m===void 0?!0:m,w=r.tetherOffset,v=w===void 0?0:w,g=bb(e,{boundary:c,rootBoundary:u,padding:h,altBoundary:f}),_=Gc(e.placement),b=Mg(e.placement),S=!b,A=fD(_),I=GNe(A),E=e.modifiersData.popperOffsets,p=e.rects.reference,O=e.rects.popper,N=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,F=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,de={x:0,y:0};if(E){if(a){var ve,U=A==="y"?bs:ws,L=A==="y"?Oo:Po,Q=A==="y"?"height":"width",ne=E[A],j=ne+g[U],B=ne-g[L],H=y?-O[Q]/2:0,M=b===Rg?p[Q]:O[Q],q=b===Rg?-O[Q]:-p[Q],k=e.elements.arrow,$=y&&k?lD(k):{width:0,height:0},G=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:$ee(),pe=G[U],Y=G[L],te=Rv(0,p[Q],$[Q]),ce=S?p[Q]/2-H-te-pe-F.mainAxis:M-te-pe-F.mainAxis,T=S?-p[Q]/2+H+te+Y+F.mainAxis:q+te+Y+F.mainAxis,le=e.elements.arrow&&C1(e.elements.arrow),ze=le?A==="y"?le.clientTop||0:le.clientLeft||0:0,et=(ve=V==null?void 0:V[A])!=null?ve:0,yt=ne+ce-et-ze,vt=ne+T-et,gt=Rv(y?ZE(j,yt):j,ne,y?gh(B,vt):B);E[A]=gt,de[A]=gt-ne}if(o){var Ut,Xt=A==="x"?bs:ws,Sr=A==="x"?Oo:Po,Ct=E[I],Pt=I==="y"?"height":"width",kt=Ct+g[Xt],Rt=Ct-g[Sr],Kt=[bs,ws].indexOf(_)!==-1,Ft=(Ut=V==null?void 0:V[I])!=null?Ut:0,Gt=Kt?kt:Ct-p[Pt]-O[Pt]-Ft+F.altAxis,Dt=Kt?Ct+p[Pt]+O[Pt]-Ft-F.altAxis:Rt,Nt=y&&Kt?yNe(Gt,Ct,Dt):Rv(y?Gt:kt,Ct,y?Dt:Rt);E[I]=Nt,de[I]=Nt-Ct}e.modifiersData[n]=de}}const WNe={name:"preventOverflow",enabled:!0,phase:"main",fn:KNe,requiresIfExists:["offset"]};function QNe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function YNe(t){return t===Ls(t)||!xo(t)?dD(t):QNe(t)}function JNe(t){var e=t.getBoundingClientRect(),r=Ng(e.width)/t.offsetWidth||1,n=Ng(e.height)/t.offsetHeight||1;return r!==1||n!==1}function XNe(t,e,r){r===void 0&&(r=!1);var n=xo(e),i=xo(e)&&JNe(e),a=Qf(e),s=Dg(t,i,r),o={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Wc(e)!=="body"||pD(a))&&(o=YNe(e)),xo(e)?(c=Dg(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=hD(a))),{x:s.left+o.scrollLeft-c.x,y:s.top+o.scrollTop-c.y,width:s.width,height:s.height}}function ZNe(t){var e=new Map,r=new Set,n=[];t.forEach(function(a){e.set(a.name,a)});function i(a){r.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!r.has(o)){var c=e.get(o);c&&i(c)}}),n.push(a)}return t.forEach(function(a){r.has(a.name)||i(a)}),n}function e8e(t){var e=ZNe(t);return fNe.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function t8e(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function r8e(t){var e=t.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var Ez={placement:"bottom",modifiers:[],strategy:"absolute"};function xz(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function n8e(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,i=e.defaultOptions,a=i===void 0?Ez:i;return function(o,c,u){u===void 0&&(u=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ez,a),modifiersData:{},elements:{reference:o,popper:c},attributes:{},styles:{}},h=[],m=!1,y={state:f,setOptions:function(_){var b=typeof _=="function"?_(f.options):_;v(),f.options=Object.assign({},a,f.options,b),f.scrollParents={reference:Oh(o)?Nv(o):o.contextElement?Nv(o.contextElement):[],popper:Nv(c)};var S=e8e(r8e([].concat(n,f.options.modifiers)));return f.orderedModifiers=S.filter(function(A){return A.enabled}),w(),y.update()},forceUpdate:function(){if(!m){var _=f.elements,b=_.reference,S=_.popper;if(xz(b,S)){f.rects={reference:XNe(b,C1(S),f.options.strategy==="fixed"),popper:lD(S)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(F){return f.modifiersData[F.name]=Object.assign({},F.data)});for(var A=0;A<f.orderedModifiers.length;A++){if(f.reset===!0){f.reset=!1,A=-1;continue}var I=f.orderedModifiers[A],E=I.fn,p=I.options,O=p===void 0?{}:p,N=I.name;typeof E=="function"&&(f=E({state:f,options:O,name:N,instance:y})||f)}}}},update:t8e(function(){return new Promise(function(g){y.forceUpdate(),g(f)})}),destroy:function(){v(),m=!0}};if(!xz(o,c))return y;y.setOptions(u).then(function(g){!m&&u.onFirstUpdate&&u.onFirstUpdate(g)});function w(){f.orderedModifiers.forEach(function(g){var _=g.name,b=g.options,S=b===void 0?{}:b,A=g.effect;if(typeof A=="function"){var I=A({state:f,name:_,instance:y,options:S}),E=function(){};h.push(I||E)}})}function v(){h.forEach(function(g){return g()}),h=[]}return y}}var i8e=[ONe,VNe,SNe,pNe,HNe,jNe,WNe,_Ne,FNe],a8e=n8e({defaultModifiers:i8e}),s8e=typeof Element<"u",o8e=typeof Map=="function",c8e=typeof Set=="function",u8e=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function W_(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!W_(t[n],e[n]))return!1;return!0}var a;if(o8e&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(a=t.entries();!(n=a.next()).done;)if(!e.has(n.value[0]))return!1;for(a=t.entries();!(n=a.next()).done;)if(!W_(n.value[1],e.get(n.value[0])))return!1;return!0}if(c8e&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(a=t.entries();!(n=a.next()).done;)if(!e.has(n.value[0]))return!1;return!0}if(u8e&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(t[n]!==e[n])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;if(s8e&&t instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&t.$$typeof)&&!W_(t[i[n]],e[i[n]]))return!1;return!0}return t!==t&&e!==e}var l8e=function(e,r){try{return W_(e,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const f8e=Df(l8e);var d8e=[],Fee=function(e,r,n){n===void 0&&(n={});var i=Ze.useRef(null),a={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||d8e},s=Ze.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),o=s[0],c=s[1],u=Ze.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(y){var w=y.state,v=Object.keys(w.elements);Qv.flushSync(function(){c({styles:hz(v.map(function(g){return[g,w.styles[g]||{}]})),attributes:hz(v.map(function(g){return[g,w.attributes[g]]}))})})},requires:["computeStyles"]}},[]),f=Ze.useMemo(function(){var m={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[u,{name:"applyStyles",enabled:!1}])};return f8e(i.current,m)?i.current||m:(i.current=m,m)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,u]),h=Ze.useRef();return pz(function(){h.current&&h.current.setOptions(f)},[f]),pz(function(){if(!(e==null||r==null)){var m=n.createPopper||a8e,y=m(e,r,f);return h.current=y,function(){y.destroy(),h.current=null}}},[e,r,n.createPopper]),{state:h.current?h.current.state:null,styles:o.styles,attributes:o.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}},h8e=function(){},p8e=function(){return Promise.resolve(null)},g8e=[];function m8e(t){var e=t.placement,r=e===void 0?"bottom":e,n=t.strategy,i=n===void 0?"absolute":n,a=t.modifiers,s=a===void 0?g8e:a,o=t.referenceElement,c=t.onFirstUpdate,u=t.innerRef,f=t.children,h=Ze.useContext(Oee),m=Ze.useState(null),y=m[0],w=m[1],v=Ze.useState(null),g=v[0],_=v[1];Ze.useEffect(function(){cN(u,y)},[u,y]);var b=Ze.useMemo(function(){return{placement:r,strategy:i,onFirstUpdate:c,modifiers:[].concat(s,[{name:"arrow",enabled:g!=null,options:{element:g}}])}},[r,i,c,s,g]),S=Fee(o||h,y,b),A=S.state,I=S.styles,E=S.forceUpdate,p=S.update,O=Ze.useMemo(function(){return{ref:w,style:I.popper,placement:A?A.placement:r,hasPopperEscaped:A&&A.modifiersData.hide?A.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:A&&A.modifiersData.hide?A.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:I.arrow,ref:_},forceUpdate:E||h8e,update:p||p8e}},[w,_,r,A,I,p,E]);return Tee(f)(O)}var y8e=function(){},v8e=y8e;const b8e=Df(v8e);function w8e(t){var e=t.children,r=t.innerRef,n=Ze.useContext(Pee),i=Ze.useCallback(function(a){cN(r,a),Cee(n,a)},[r,n]);return Ze.useEffect(function(){return function(){return cN(r,null)}},[]),Ze.useEffect(function(){b8e(!!n,"`Reference` should not be used outside of a `Manager` component.")},[n]),Tee(e)({ref:i})}const _8e=Object.freeze(Object.defineProperty({__proto__:null,Manager:Z6e,Popper:m8e,Reference:w8e,usePopper:Fee},Symbol.toStringTag,{value:"Module"})),E8e=js(_8e);var tC,Az;function Bee(){return Az||(Az=1,tC=function(e,r,n,i){var a=n?n.call(i,e,r):void 0;if(a!==void 0)return!!a;if(e===r)return!0;if(typeof e!="object"||!e||typeof r!="object"||!r)return!1;var s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<s.length;u++){var f=s[u];if(!c(f))return!1;var h=e[f],m=r[f];if(a=n?n.call(i,h,m,f):void 0,a===!1||a===void 0&&h!==m)return!1}return!0}),tC}var gu={},rC,Sz;function x8e(){if(Sz)return rC;Sz=1;var t=c5();function e(r,n,i,a){return t(r,function(s,o,c){n(a,i(s),o,c)}),a}return rC=e,rC}var nC,Iz;function A8e(){if(Iz)return nC;Iz=1;var t=x8e();function e(r,n){return function(i,a){return t(i,r,n(a),{})}}return nC=e,nC}var iC,Oz;function S8e(){if(Oz)return iC;Oz=1;var t=FQ(),e=A8e(),r=Uf(),n=Object.prototype,i=n.toString,a=e(function(s,o,c){o!=null&&typeof o.toString!="function"&&(o=i.call(o)),s[o]=c},t(r));return iC=a,iC}var Pz;function I8e(){if(Pz)return gu;Pz=1;var t=yr;gu.__esModule=!0,gu.placementMapping=gu.positions=gu.positionsMapping=void 0;var e=t(S8e()),r=t(ll()),n={"top center":"top","top left":"top-start","top right":"top-end","bottom center":"bottom","bottom left":"bottom-start","bottom right":"bottom-end","right center":"right","left center":"left"};gu.positionsMapping=n;var i=(0,r.default)(n);gu.positions=i;var a=(0,e.default)(n);return gu.placementMapping=a,gu}var Ny={},aC={exports:{}},sC={exports:{}},oC={exports:{}},Tz;function O8e(){return Tz||(Tz=1,function(t){var e=W8.default;function r(n,i){if(e(n)!=="object"||n===null)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var s=a.call(n,i||"default");if(e(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(oC)),oC.exports}var Cz;function P8e(){return Cz||(Cz=1,function(t){var e=W8.default,r=O8e();function n(i){var a=r(i,"string");return e(a)==="symbol"?a:String(a)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(sC)),sC.exports}var Rz;function T8e(){return Rz||(Rz=1,function(t){var e=P8e();function r(i,a){for(var s=0;s<a.length;s++){var o=a[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(i,e(o.key),o)}}function n(i,a,s){return a&&r(i.prototype,a),s&&r(i,s),Object.defineProperty(i,"prototype",{writable:!1}),i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(aC)),aC.exports}var Nz;function C8e(){if(Nz)return Ny;Nz=1;var t=yr;Ny.__esModule=!0,Ny.default=void 0;var e=t(T8e()),r=t(X8()),n=t(No()),i=Ff,a=function(){function c(f){this.ref=f}var u=c.prototype;return u.getBoundingClientRect=function(){return(0,n.default)(this.ref.current,"getBoundingClientRect")||{}},(0,e.default)(c,[{key:"clientWidth",get:function(){return this.getBoundingClientRect().width}},{key:"clientHeight",get:function(){return this.getBoundingClientRect().height}},{key:"parentNode",get:function(){return this.ref.current?this.ref.current.parentNode:void 0}}]),c}(),s=(0,r.default)(function(c){return new a((0,i.isRefObject)(c)?c:{current:c})}),o=s;return Ny.default=o,Ny}var s_={},Dz;function R8e(){if(Dz)return s_;Dz=1;var t=yr;s_.__esModule=!0,s_.default=a;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(s){var o=s.children,c=s.className,u=s.content,f=(0,r.default)("content",c),h=(0,i.getUnhandledProps)(a,s),m=(0,i.getElementType)(a,s);return n.default.createElement(m,(0,e.default)({},h,{className:f}),i.childrenUtils.isNil(o)?u:o)}return a.handledProps=["as","children","className","content"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(s){return{children:s}}),s_}var o_={},Mz;function N8e(){if(Mz)return o_;Mz=1;var t=yr;o_.__esModule=!0,o_.default=a;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(s){var o=s.children,c=s.className,u=s.content,f=(0,r.default)("header",c),h=(0,i.getUnhandledProps)(a,s),m=(0,i.getElementType)(a,s);return n.default.createElement(m,(0,e.default)({},h,{className:f}),i.childrenUtils.isNil(o)?u:o)}return a.handledProps=["as","children","className","content"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(s){return{children:s}}),o_}var $z;function D8e(){if($z)return Cy;$z=1;var t=Ro,e=yr;Cy.__esModule=!0,Cy.default=void 0;var r=e(Dn()),n=e(hc());e(w5());var i=e(ul()),a=e(a5()),s=e(No()),o=e(Y6e()),c=e(Ii()),u=e(y5()),f=e(b5()),h=e(Iee()),m=e(v5()),y=e(Xn);e(Rn());var w=t(Ze),v=E8e,g=e(Bee()),_=qn(),b=e(E5()),S=I8e(),A=e(C8e()),I=e(R8e()),E=e(N8e()),p=function(O){(0,n.default)(N,O);function N(){for(var V,de=arguments.length,ve=new Array(de),U=0;U<de;U++)ve[U]=arguments[U];return V=O.call.apply(O,[this].concat(ve))||this,V.state={},V.open=!1,V.zIndexWasSynced=!1,V.triggerRef=w.default.createRef(),V.elementRef=w.default.createRef(),V.getPortalProps=function(){var L={},Q=V.props,ne=Q.on,j=Q.hoverable,B=(0,c.default)(ne)?ne:[ne];return j&&(L.closeOnPortalMouseLeave=!0,L.mouseLeaveDelay=300),(0,f.default)(B,"hover")&&(L.openOnTriggerClick=!1,L.closeOnTriggerClick=!1,L.openOnTriggerMouseEnter=!0,L.closeOnTriggerMouseLeave=!0,L.mouseLeaveDelay=70,L.mouseEnterDelay=50),(0,f.default)(B,"click")&&(L.openOnTriggerClick=!0,L.closeOnTriggerClick=!0,L.closeOnDocumentClick=!0),(0,f.default)(B,"focus")&&(L.openOnTriggerFocus=!0,L.closeOnTriggerBlur=!0),L},V.hideOnScroll=function(L){(0,o.default)(L.target)&&V.elementRef.current.contains(L.target)||(V.setState({closed:!0}),_.eventStack.unsub("scroll",V.hideOnScroll,{target:window}),V.timeoutId=setTimeout(function(){V.setState({closed:!1})},50),V.handleClose(L))},V.handleClose=function(L){(0,s.default)(V.props,"onClose",L,(0,r.default)({},V.props,{open:!1}))},V.handleOpen=function(L){(0,s.default)(V.props,"onOpen",L,(0,r.default)({},V.props,{open:!0}))},V.handlePortalMount=function(L){(0,s.default)(V.props,"onMount",L,V.props)},V.handlePortalUnmount=function(L){V.positionUpdate=null,(0,s.default)(V.props,"onUnmount",L,V.props)},V.renderContent=function(L){var Q=L.placement,ne=L.ref,j=L.update,B=L.style,H=V.props,M=H.basic,q=H.children,k=H.className,$=H.content,G=H.hideOnScroll,pe=H.flowing,Y=H.header,te=H.inverted,ce=H.popper,T=H.size,le=H.style,ze=H.wide,et=V.state.contentRestProps;V.positionUpdate=j;var yt=(0,y.default)("ui",S.placementMapping[Q],T,(0,_.useKeyOrValueAndKey)(ze,"wide"),(0,_.useKeyOnly)(M,"basic"),(0,_.useKeyOnly)(pe,"flowing"),(0,_.useKeyOnly)(te,"inverted"),"popup transition visible",k),vt=(0,_.getElementType)(N,V.props),gt=(0,r.default)({left:"auto",right:"auto",position:"initial"},le),Ut=w.default.createElement(vt,(0,r.default)({},et,{className:yt,style:gt,ref:V.elementRef}),_.childrenUtils.isNil(q)?w.default.createElement(w.default.Fragment,null,E.default.create(Y,{autoGenerateKey:!1}),I.default.create($,{autoGenerateKey:!1})):q,G&&w.default.createElement(m.default,{on:V.hideOnScroll,name:"scroll",target:"window"}));return(0,_.createHTMLDivision)(ce||{},{overrideProps:{children:Ut,ref:ne,style:(0,r.default)({display:"flex"},B)}})},V}N.getDerivedStateFromProps=function(de,ve){if(ve.closed||ve.disabled)return{};var U=(0,_.getUnhandledProps)(N,de),L=(0,h.default)(U,function(ne,j,B){return(0,f.default)(b.default.handledProps,B)||(ne[B]=j),ne},{}),Q=(0,u.default)(U,b.default.handledProps);return{contentRestProps:L,portalRestProps:Q}};var F=N.prototype;return F.componentDidUpdate=function(de){var ve=(0,g.default)(this.props.popperDependencies,de.popperDependencies);ve||this.handleUpdate()},F.componentWillUnmount=function(){clearTimeout(this.timeoutId)},F.handleUpdate=function(){this.positionUpdate&&this.positionUpdate()},F.render=function(){var de=this,ve=this.props,U=ve.context,L=ve.disabled,Q=ve.eventsEnabled,ne=ve.offset,j=ve.pinned,B=ve.popper,H=ve.popperModifiers,M=ve.position,q=ve.positionFixed,k=ve.trigger,$=this.state,G=$.closed,pe=$.portalRestProps;if(G||L)return k;var Y=[{name:"arrow",enabled:!1},{name:"eventListeners",options:{scroll:!!Q,resize:!!Q}},{name:"flip",enabled:!j},{name:"preventOverflow",enabled:!!ne},{name:"offset",enabled:!!ne,options:{offset:ne}}].concat(H,[{name:"syncZIndex",enabled:!0,phase:"beforeRead",fn:function(le){var ze,et=le.state;if(!de.zIndexWasSynced){var yt=B==null||(ze=B.style)==null?void 0:ze.zIndex;(0,a.default)(yt)&&(et.elements.popper.style.zIndex=window.getComputedStyle(et.elements.popper.firstChild).zIndex),de.zIndexWasSynced=!0}},effect:function(){return function(){de.zIndexWasSynced=!1}}}]),te=(0,A.default)((0,i.default)(U)?this.triggerRef:U),ce=(0,r.default)({},this.getPortalProps(),pe);return w.default.createElement(b.default,(0,r.default)({},ce,{onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount,trigger:k,triggerRef:this.triggerRef}),w.default.createElement(v.Popper,{modifiers:Y,placement:S.positionsMapping[M],strategy:q?"fixed":null,referenceElement:te},this.renderContent))},N}(w.Component);return Cy.default=p,p.handledProps=["as","basic","children","className","content","context","disabled","eventsEnabled","flowing","header","hideOnScroll","hoverable","inverted","offset","on","onClose","onMount","onOpen","onUnmount","pinned","popper","popperDependencies","popperModifiers","position","positionFixed","size","style","trigger","wide"],p.propTypes={},p.defaultProps={disabled:!1,eventsEnabled:!0,on:["click","hover"],pinned:!1,popperModifiers:[],position:"top left"},p.Content=I.default,p.Header=E.default,Cy}var M8e=yr,$8e=M8e(D8e()),k8e=$8e.default;const L8e="_icon_1dxv5_1",kz={icon:L8e,"icon-metamask-mobile":"_icon-metamask-mobile_1dxv5_9","icon-metamask":"_icon-metamask_1dxv5_9","icon-dapper":"_icon-dapper_1dxv5_14","icon-fortmatic":"_icon-fortmatic_1dxv5_18","icon-wallet-connect":"_icon-wallet-connect_1dxv5_22","icon-samsung-blockchain-wallet":"_icon-samsung-blockchain-wallet_1dxv5_26","icon-coinbase":"_icon-coinbase_1dxv5_30","icon-wallet-link":"_icon-wallet-link_1dxv5_31","icon-google":"_icon-google_1dxv5_35","icon-discord":"_icon-discord_1dxv5_39","icon-apple":"_icon-apple_1dxv5_43","icon-x":"_icon-x_1dxv5_47"},qee=t=>{const{className:e,type:r,showTooltip:n,tooltipPosition:i}=t;return ft.jsx(k8e,{position:n&&i?i:"top center",disabled:!n,trigger:ft.jsx("div",{role:"img","aria-label":r,className:Cg(kz.icon,kz[`icon-${r}`],e)}),content:r,on:"hover"})},j8e="social-primary-test-id",U8e="social-secondary-test-id",F8e="web3-primary-test-id",B8e="web3-secondary-test-id",q8e="show-more-button-test-id",H8e="_connection_1820k_3",z8e="_dclLogo_1820k_9",V8e="_title_1820k_15",G8e="_subtitle_1820k_20",K8e="_primaryButton_1820k_29",W8e="_primaryImage_1820k_38",Q8e="_primaryMessage_1820k_42",Y8e="_primaryMagic_1820k_50",J8e="_primaryLearnMore_1820k_61",X8e="_primary_1820k_29",Z8e="_showMore_1820k_76",e5e="_showMoreButton_1820k_80",t5e="_showMoreSecondaryOptions_1820k_84",r5e="_secondaryOptionButton_1820k_98",Aa={connection:H8e,dclLogo:z8e,title:V8e,subtitle:G8e,primaryButton:K8e,primaryImage:W8e,primaryMessage:Q8e,primaryMagic:Y8e,primaryLearnMore:J8e,primary:X8e,showMore:Z8e,showMoreButton:e5e,showMoreSecondaryOptions:t5e,secondaryOptionButton:r5e},Lz=({message:t,children:e,option:r,testId:n,onConnect:i})=>ft.jsxs("div",{className:Aa.primary,"data-testid":n,children:[ft.jsx("div",{className:Aa.primaryMessage,children:t}),ft.jsxs(Ah.Button,{primary:!0,size:"small",fluid:!0,"data-testid":`${n}-button`,className:Cg(Aa.primaryButton,Aa.primaryOption),onClick:()=>i(r),children:[ft.jsx(qee,{className:Aa.primaryImage,type:r}),e]})]}),jz=({options:t,tooltipDirection:e,testId:r,onConnect:n})=>ft.jsx("div",{className:Aa.showMoreSecondaryOptions,"data-testid":r,children:t.map(i=>ft.jsx(Ah.Button,{primary:!0,size:"small","data-testid":`${r}-${i}-button`,className:Cg(Aa.primaryButton,Aa.secondaryOptionButton),onClick:()=>n(i),children:ft.jsx(qee,{className:"dui-connection-primary__image",showTooltip:!0,tooltipPosition:e,type:i})},i))}),n5e={i18n:{title:"Unlock Your Virtual World.",subtitle:"Access your Web3 Account.",accessWith:t=>`Access with ${t}`,connectWith:t=>`Connect with ${t}`,moreOptions:"Show More Options",socialMessage:t=>ft.jsxs(ft.Fragment,{children:["Access secured by ",t]}),web3Message:t=>ft.jsxs(ft.Fragment,{children:["Curious about wallets? ",t("Learn More")]})}},i5e=t=>{const{i18n:e=n5e.i18n,onConnect:r,onLearnMore:n,socialOptions:i,web3Options:a,className:s}=t,[o,c]=Ze.useState(!1),u=Ze.useCallback(()=>{c(!0)},[]),f=i&&i.secondary&&i.secondary.length>0,h=a&&a.secondary&&a.secondary.length>0;return ft.jsxs("div",{className:Cg(s,Aa.connection),children:[ft.jsx("img",{className:Aa.dclLogo,src:Q6e,alt:"Decentraland logo"}),ft.jsxs("div",{children:[ft.jsx("h1",{className:Aa.title,children:e.title}),ft.jsx("h2",{className:Aa.subtitle,children:e.subtitle}),i?ft.jsx(Lz,{onConnect:r,testId:j8e,option:i==null?void 0:i.primary,message:ft.jsx(ft.Fragment,{children:e.socialMessage(ft.jsx("div",{className:Aa.primaryMagic,role:"img","aria-label":"Magic"}))}),children:ft.jsx(ft.Fragment,{children:e.accessWith(i==null?void 0:i.primary)})}):null,a?ft.jsx(Lz,{onConnect:r,testId:F8e,option:a==null?void 0:a.primary,message:e.web3Message(m=>ft.jsx("span",{className:Aa.primaryLearnMore,role:"button",onClick:n,children:m})),children:ft.jsx(ft.Fragment,{children:e.connectWith(a==null?void 0:a.primary)})}):null]}),ft.jsx("div",{className:Aa.showMore,children:!o&&(h||f)?ft.jsx(Ah.Button,{"data-testid":q8e,inverted:!0,secondary:!0,size:"medium",fluid:!0,className:Aa.showMoreButton,onClick:u,children:e.moreOptions}):ft.jsxs(ft.Fragment,{children:[f?ft.jsx(jz,{testId:U8e,options:i.secondary,onConnect:r,tooltipDirection:"top center"}):null,h?ft.jsx(jz,{testId:B8e,options:a.secondary,onConnect:r,tooltipDirection:"bottom center"}):null]})})]})};var mi=(t=>(t.METAMASK="metamask",t.DAPPER="dapper",t.FORTMATIC="fortmatic",t.COINBASE="coinbase",t.SAMSUNG="samsung-blockchain-wallet",t.WALLET_CONNECT="wallet-connect",t.WALLET_LINK="wallet-link",t.METAMASK_MOBILE="metamask-mobile",t.GOOGLE="google",t.APPLE="apple",t.DISCORD="discord",t.X="x",t))(mi||{}),rA={},nA=yr;rA.__esModule=!0;var gD=rA.default=void 0,a5e=nA(Dn()),s5e=nA(Xn);nA(Rn());var o5e=nA(Ze),Lp=qn();function Ph(t){var e=t.children,r=t.className,n=t.content,i=t.image,a=t.scrolling,s=(0,s5e.default)(r,(0,Lp.useKeyOnly)(i,"image"),(0,Lp.useKeyOnly)(a,"scrolling"),"content"),o=(0,Lp.getUnhandledProps)(Ph,t),c=(0,Lp.getElementType)(Ph,t);return o5e.default.createElement(c,(0,a5e.default)({},o,{className:s}),Lp.childrenUtils.isNil(e)?n:e)}Ph.handledProps=["as","children","className","content","image","scrolling"];Ph.propTypes={};Ph.create=(0,Lp.createShorthandFactory)(Ph,function(t){return{content:t}});var c5e=Ph;gD=rA.default=c5e;var mD={},iA={},c_={},Uz;function u5e(){if(Uz)return c_;Uz=1;var t=yr;c_.__esModule=!0;var e=t(_5());return c_.default=e.default,c_}var Dy={},u_={},Fz;function l5e(){if(Fz)return u_;Fz=1;var t=yr;u_.__esModule=!0;var e=t(x5());return u_.default=e.default,u_}var Bz;function f5e(){if(Bz)return Dy;Bz=1;var t=Ro,e=yr;Dy.__esModule=!0,Dy.default=void 0;var r=e(Dn()),n=e(hc()),i=e(h2()),a=e(No()),s=e(Xn);e(Rn());var o=t(Ze),c=qn(),u=e(l5e()),f=function(h){(0,n.default)(m,h);function m(){for(var w,v=arguments.length,g=new Array(v),_=0;_<v;_++)g[_]=arguments[_];return w=h.call.apply(h,[this].concat(g))||this,w.handleButtonOverrides=function(b){return{onClick:function(A,I){(0,a.default)(b,"onClick",A,I),(0,a.default)(w.props,"onActionClick",A,I)}}},w}var y=m.prototype;return y.render=function(){var v=this,g=this.props,_=g.actions,b=g.children,S=g.className,A=g.content,I=(0,s.default)("actions",S),E=(0,c.getUnhandledProps)(m,this.props),p=(0,c.getElementType)(m,this.props);return c.childrenUtils.isNil(b)?c.childrenUtils.isNil(A)?o.default.createElement(p,(0,r.default)({},E,{className:I}),(0,i.default)(_,function(O){return u.default.create(O,{overrideProps:v.handleButtonOverrides})})):o.default.createElement(p,(0,r.default)({},E,{className:I}),A):o.default.createElement(p,(0,r.default)({},E,{className:I}),b)},m}(o.Component);return Dy.default=f,f.handledProps=["actions","as","children","className","content","onActionClick"],f.propTypes={},f.create=(0,c.createShorthandFactory)(f,function(h){return{actions:h}}),Dy}var My={},qz;function d5e(){if(qz)return My;qz=1;var t=yr;My.__esModule=!0,My.default=void 0;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(o){var c=o.children,u=o.className,f=o.content,h=(0,r.default)("description",u),m=(0,i.getUnhandledProps)(a,o),y=(0,i.getElementType)(a,o);return n.default.createElement(y,(0,e.default)({},m,{className:h}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content"],a.propTypes={};var s=a;return My.default=s,My}var $y={},Hz;function h5e(){if(Hz)return $y;Hz=1;var t=yr;$y.__esModule=!0,$y.default=void 0;var e=t(Dn()),r=Ff,n=t(Xn);t(Rn());var i=t(Ze),a=qn();function s(c){var u=c.blurring,f=c.children,h=c.className,m=c.centered,y=c.content,w=c.inverted,v=c.mountNode,g=c.scrolling,_=i.default.useRef(),b=(0,n.default)("ui",(0,a.useKeyOnly)(w,"inverted"),(0,a.useKeyOnly)(!m,"top aligned"),"page modals dimmer transition visible active",h),S=(0,n.default)("dimmable dimmed",(0,a.useKeyOnly)(u,"blurring"),(0,a.useKeyOnly)(g,"scrolling")),A=(0,a.getUnhandledProps)(s,c),I=(0,a.getElementType)(s,c);return(0,a.useClassNamesOnNode)(v,S),i.default.useEffect(function(){_.current&&_.current.style&&_.current.style.setProperty("display","flex","important")},[]),i.default.createElement(r.Ref,{innerRef:_},i.default.createElement(I,(0,e.default)({},A,{className:b}),a.childrenUtils.isNil(f)?y:f))}s.handledProps=["as","blurring","centered","children","className","content","inverted","mountNode","scrolling"],s.propTypes={},s.create=(0,a.createShorthandFactory)(s,function(c){return{content:c}});var o=s;return $y.default=o,$y}var ky={},zz;function p5e(){if(zz)return ky;zz=1;var t=yr;ky.__esModule=!0,ky.default=void 0;var e=t(Dn()),r=t(Xn);t(Rn());var n=t(Ze),i=qn();function a(o){var c=o.children,u=o.className,f=o.content,h=(0,r.default)("header",u),m=(0,i.getUnhandledProps)(a,o),y=(0,i.getElementType)(a,o);return n.default.createElement(y,(0,e.default)({},m,{className:h}),i.childrenUtils.isNil(c)?f:c)}a.handledProps=["as","children","className","content"],a.propTypes={},a.create=(0,i.createShorthandFactory)(a,function(o){return{content:o}});var s=a;return ky.default=s,ky}var mu={},Vz;function g5e(){if(Vz)return mu;Vz=1,mu.__esModule=!0,mu.isLegacy=mu.getLegacyStyles=mu.canFit=void 0;var t=0,e=50,r=function(s){var o=s.height+t,c=s.height+t,u=window.innerHeight,f=u/2,h=-(c/2),m=e,y=f+h;return y+o+m<u};mu.canFit=r;var n=function(s,o,c){var u=o&&s?-(c.height/2):0,f=-(c.width/2);return{marginLeft:f,marginTop:u}};mu.getLegacyStyles=n;var i=function(){return!window.ActiveXObject&&"ActiveXObject"in window};return mu.isLegacy=i,mu}var m5e=Ro,Vi=yr;iA.__esModule=!0;iA.default=void 0;var Op=Vi(Dn()),y5e=Vi(hc()),v5e=Vi(d2()),b5e=Vi(y5()),w5e=Vi(b5()),_5e=Vi(Iee()),E5e=Vi(fY()),Nl=Vi(No()),Gz=Ff,x5e=Vi(Xn);Vi(Rn());var yu=m5e(Ze),A5e=Vi(Bee()),ya=qn(),S5e=Vi(u5e()),Kz=Vi(E5()),Hee=Vi(f5e()),zee=Vi(rA),I5e=Vi(d5e()),Vee=Vi(h5e()),Gee=Vi(p5e()),cC=g5e(),Jc=function(t){(0,y5e.default)(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return n=t.call.apply(t,[this].concat(a))||this,n.legacy=(0,ya.isBrowser)()&&(0,cC.isLegacy)(),n.ref=(0,yu.createRef)(),n.dimmerRef=(0,yu.createRef)(),n.latestDocumentMouseDownEvent=null,n.getMountNode=function(){return(0,ya.isBrowser)()?n.props.mountNode||document.body:null},n.handleActionsOverrides=function(o){return{onActionClick:function(u,f){(0,Nl.default)(o,"onActionClick",u,f),(0,Nl.default)(n.props,"onActionClick",u,n.props),n.handleClose(u)}}},n.handleClose=function(o){n.setState({open:!1}),(0,Nl.default)(n.props,"onClose",o,(0,Op.default)({},n.props,{open:!1}))},n.handleDocumentMouseDown=function(o){n.latestDocumentMouseDownEvent=o},n.handleDocumentClick=function(o){var c=n.props.closeOnDimmerClick,u=n.latestDocumentMouseDownEvent;n.latestDocumentMouseDownEvent=null,!(!c||(0,ya.doesNodeContainClick)(n.ref.current,u)||(0,ya.doesNodeContainClick)(n.ref.current,o))&&(n.setState({open:!1}),(0,Nl.default)(n.props,"onClose",o,(0,Op.default)({},n.props,{open:!1})))},n.handleIconOverrides=function(o){return{onClick:function(u){(0,Nl.default)(o,"onClick",u),n.handleClose(u)}}},n.handleOpen=function(o){(0,Nl.default)(n.props,"onOpen",o,(0,Op.default)({},n.props,{open:!0})),n.setState({open:!0})},n.handlePortalMount=function(o){var c=n.props.eventPool;n.setState({scrolling:!1}),n.setPositionAndClassNames(),ya.eventStack.sub("mousedown",n.handleDocumentMouseDown,{pool:c,target:n.dimmerRef.current}),ya.eventStack.sub("click",n.handleDocumentClick,{pool:c,target:n.dimmerRef.current}),(0,Nl.default)(n.props,"onMount",o,n.props)},n.handlePortalUnmount=function(o){var c=n.props.eventPool;cancelAnimationFrame(n.animationRequestId),ya.eventStack.unsub("mousedown",n.handleDocumentMouseDown,{pool:c,target:n.dimmerRef.current}),ya.eventStack.unsub("click",n.handleDocumentClick,{pool:c,target:n.dimmerRef.current}),(0,Nl.default)(n.props,"onUnmount",o,n.props)},n.setPositionAndClassNames=function(){var o=n.props.centered,c,u={};if(n.ref.current){var f=n.ref.current.getBoundingClientRect(),h=(0,cC.canFit)(f);c=!h;var m=n.legacy?(0,cC.getLegacyStyles)(h,o,f):{};(0,A5e.default)(n.state.legacyStyles,m)||(u.legacyStyles=m),n.state.scrolling!==c&&(u.scrolling=c)}(0,E5e.default)(u)||n.setState(u),n.animationRequestId=requestAnimationFrame(n.setPositionAndClassNames)},n.renderContent=function(o){var c=n.props,u=c.actions,f=c.basic,h=c.children,m=c.className,y=c.closeIcon,w=c.content,v=c.header,g=c.size,_=c.style,b=n.state,S=b.legacyStyles,A=b.scrolling,I=(0,x5e.default)("ui",g,(0,ya.useKeyOnly)(f,"basic"),(0,ya.useKeyOnly)(n.legacy,"legacy"),(0,ya.useKeyOnly)(A,"scrolling"),"modal transition visible active",m),E=(0,ya.getElementType)(e,n.props),p=y===!0?"close":y,O=S5e.default.create(p,{overrideProps:n.handleIconOverrides});return yu.default.createElement(Gz.Ref,{innerRef:n.ref},yu.default.createElement(E,(0,Op.default)({},o,{className:I,style:(0,Op.default)({},S,_)}),O,ya.childrenUtils.isNil(h)?yu.default.createElement(yu.default.Fragment,null,Gee.default.create(v,{autoGenerateKey:!1}),zee.default.create(w,{autoGenerateKey:!1}),Hee.default.create(u,{overrideProps:n.handleActionsOverrides})):h))},n}var r=e.prototype;return r.componentWillUnmount=function(){this.handlePortalUnmount()},r.render=function(){var i=this.props,a=i.centered,s=i.closeOnDocumentClick,o=i.dimmer,c=i.eventPool,u=i.trigger,f=this.state,h=f.open,m=f.scrolling,y=this.getMountNode();if(!(0,ya.isBrowser)())return(0,yu.isValidElement)(u)?u:null;var w=(0,ya.getUnhandledProps)(e,this.props),v=Kz.default.handledProps,g=(0,_5e.default)(w,function(b,S,A){return(0,w5e.default)(v,A)||(b[A]=S),b},{}),_=(0,b5e.default)(w,v);return yu.default.createElement(Kz.default,(0,Op.default)({closeOnDocumentClick:s},_,{trigger:u,eventPool:c,mountNode:y,open:h,onClose:this.handleClose,onMount:this.handlePortalMount,onOpen:this.handleOpen,onUnmount:this.handlePortalUnmount}),yu.default.createElement(Gz.Ref,{innerRef:this.dimmerRef},Vee.default.create((0,v5e.default)(o)?o:{},{autoGenerateKey:!1,defaultProps:{blurring:o==="blurring",inverted:o==="inverted"},overrideProps:{children:this.renderContent(g),centered:a,mountNode:y,scrolling:m}})))},e}(ya.ModernAutoControlledComponent);Jc.handledProps=["actions","as","basic","centered","children","className","closeIcon","closeOnDimmerClick","closeOnDocumentClick","content","defaultOpen","dimmer","eventPool","header","mountNode","onActionClick","onClose","onMount","onOpen","onUnmount","open","size","style","trigger"];Jc.propTypes={};Jc.defaultProps={centered:!0,dimmer:!0,closeOnDimmerClick:!0,closeOnDocumentClick:!1,eventPool:"Modal"};Jc.autoControlledProps=["open"];Jc.Actions=Hee.default;Jc.Content=zee.default;Jc.Description=I5e.default;Jc.Dimmer=Vee.default;Jc.Header=Gee.default;var O5e=Jc;iA.default=O5e;(function(t){var e=ke&&ke.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;var r=iA;Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return e(r).default}})})(mD);var yD={};var P5e=ke&&ke.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),T5e=ke&&ke.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),C5e=ke&&ke.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),R5e=ke&&ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&T5e(e,t,r);return C5e(e,t),e};Object.defineProperty(yD,"__esModule",{value:!0});var vD=yD.ModalNavigation=void 0,_d=R5e(Ze),N5e=function(t){P5e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var r=this.props,n=r.title,i=r.subtitle,a=r.onBack,s=r.onClose,o=r.onInfo;return _d.createElement("div",{className:"dcl modal-navigation"},_d.createElement("div",{className:"dcl modal-navigation-title"},n),i&&_d.createElement("div",{className:"dcl modal-navigation-subtitle"},i),a&&_d.createElement("div",{className:"dcl modal-navigation-button modal-navigation-back",onClick:a}),o&&_d.createElement("div",{className:"dcl modal-navigation-button modal-navigation-info",onClick:o}),s&&_d.createElement("div",{className:"dcl modal-navigation-button modal-navigation-close",onClick:s}))},e}(_d.PureComponent);vD=yD.ModalNavigation=N5e;const D5e="/assets/warning-057948e8.svg";var Bu=(t=>(t.CONNECTING_WALLET="CONNECTING_WALLET",t.WAITING_FOR_SIGNATURE="WAITING_FOR_SIGNATURE",t.ERROR="ERROR",t))(Bu||{});const M5e="_main_1qx1l_1",$5e="_content_1qx1l_8",k5e="_errorImage_1qx1l_16",L5e="_message_1qx1l_22",j5e="_loader_1qx1l_29",Ed={main:M5e,content:$5e,errorImage:k5e,message:L5e,loader:j5e},U5e=t=>{const{open:e,state:r,onClose:n,onTryAgain:i}=t,a=r===Bu.CONNECTING_WALLET||r===Bu.WAITING_FOR_SIGNATURE;return ft.jsxs(mD.Modal,{size:"tiny",open:e,children:[ft.jsx(vD,{title:"",onClose:a?void 0:n}),ft.jsx("div",{className:Ed.main,children:a?ft.jsxs("div",{className:Ed.content,children:[ft.jsx(eA,{className:Ed.loader,size:"huge",inline:!0}),ft.jsx("p",{className:Ed.message,children:r===Bu.CONNECTING_WALLET?ft.jsxs(ft.Fragment,{children:["To move forward, confirm the connect action in your ",ft.jsx("b",{children:"Wallet"}),"."]}):ft.jsxs(ft.Fragment,{children:["To move forward, confirm the signature action in your ",ft.jsx("b",{children:"Wallet"}),"."]})})]}):ft.jsxs("div",{className:Ed.content,children:[ft.jsx("img",{className:Ed.errorImage,src:D5e}),ft.jsxs("p",{className:Ed.message,children:["You rejected the request in your ",ft.jsx("b",{children:"Wallet"}),". To continue, please try again."]}),ft.jsx(Ah.Button,{primary:!0,onClick:i,children:"Try again"})]})}),ft.jsx(gD,{})]})},F5e="_main_1flsd_1",B5e="_title_1flsd_10",q5e="_info_1flsd_14",H5e="_infoImage_1flsd_25",z5e="_assets_1flsd_33",V5e="_login_1flsd_37",Dl={main:F5e,title:B5e,info:q5e,infoImage:H5e,assets:z5e,login:V5e},G5e={i18n:{title:"What's a wallet?",assets:{title:"A home for your digital assets",text:"Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs."},logIn:{title:"A New Way To Log In",text:"Instead of creating new accounts and passwords on every website, just connect your wallet."}}},K5e=t=>{const{i18n:e=G5e.i18n,onClose:r,open:n}=t;return ft.jsxs(mD.Modal,{size:"tiny",open:n,children:[ft.jsx(vD,{title:"",onClose:r}),ft.jsx(gD,{children:ft.jsxs("div",{className:Dl.main,children:[ft.jsx("h1",{className:Dl.title,children:e==null?void 0:e.title}),ft.jsxs("article",{className:Dl.info,children:[ft.jsx("div",{className:Cg(Dl.infoImage,Dl.assets)}),ft.jsx("h3",{children:e==null?void 0:e.assets.title}),ft.jsx("p",{children:e==null?void 0:e.assets.text})]}),ft.jsxs("article",{className:Dl.info,children:[ft.jsx("div",{className:Cg(Dl.infoImage,Dl.login)}),ft.jsx("h3",{children:e==null?void 0:e.logIn.title}),ft.jsx("p",{children:e==null?void 0:e.logIn.text})]})]})})]})};var Kee={},Wee={},fN={exports:{}};/*! eth-connect {
167
+ "date": "2023-07-25T16:54:29.183Z",
168
+ "commit": "1f1f0dd8d57f20ba72bf396bb471e426da394e29",
169
+ "ref": "refs/tags/6.2.1"
170
+ } */(function(t,e){(function(r,n){n(e)})(ke,function(r){function n(P){if(P.jsonrpc="2.0",!P.id||typeof P.id!="number"||Math.floor(P.id)!==P.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(P)}`);if(!P.method||typeof P.method!="string"||P.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(P)}`);if(!P.params||typeof P.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(P)}`);return P}var i={};function a(){let P,D;const K=new Promise((he,Se)=>{P=Ce=>{he(Ce),K.isPending=!1},D=Ce=>{Se(Ce),K.isPending=!1}}).catch(he=>Promise.reject(he));return K.resolve=P,K.reject=D,"finally"in K||(K.finally=he=>{K.then(he),K.catch(he)}),K.isPending=!0,K}Object.defineProperty(i,"__esModule",{value:!0});var s=i.future=a;i.default=a;var o={exports:{}};/**
171
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
172
+ *
173
+ * @version 0.8.0
174
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
175
+ * @copyright Chen, Yi-Cyuan 2015-2018
176
+ * @license MIT
177
+ */(function(P){(function(){var D="input is invalid type",K=typeof window=="object",he=K?window:{};he.JS_SHA3_NO_WINDOW&&(K=!1);var Se=!K&&typeof self=="object";!he.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?he=ke:Se&&(he=self);var Ce=!he.JS_SHA3_NO_COMMON_JS&&P.exports,tt=!he.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",xt="0123456789abcdef".split(""),Lt=[4,1024,262144,67108864],Yt=[0,8,16,24],Ai=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],yn=[224,256,384,512],At=[128,256],ti=["hex","buffer","arrayBuffer","array","digest"],vn={128:168,256:136};!he.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(C){return Object.prototype.toString.call(C)==="[object Array]"}),!tt||!he.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(C){return typeof C=="object"&&C.buffer&&C.buffer.constructor===ArrayBuffer});for(var on=function(C,se,we){return function(oe){return new ir(C,se,C).update(oe)[we]()}},fi=function(C,se,we){return function(oe,Ae){return new ir(C,se,Ae).update(oe)[we]()}},Xa=function(C,se,we){return function(oe,Ae,Oe,Pe){return wr["cshake"+C].update(oe,Ae,Oe,Pe)[we]()}},$i=function(C,se,we){return function(oe,Ae,Oe,Pe){return wr["kmac"+C].update(oe,Ae,Oe,Pe)[we]()}},di=function(C,se,we,oe){for(var Ae=0;Ae<ti.length;++Ae){var Oe=ti[Ae];C[Oe]=se(we,oe,Oe)}return C},Za=function(C,se){var we=on(C,se,"hex");return we.create=function(){return new ir(C,se,C)},we.update=function(oe){return we.create().update(oe)},di(we,on,C,se)},Xr=[{name:"keccak",padding:[1,256,65536,16777216],bits:yn,createMethod:Za},{name:"sha3",padding:[6,1536,393216,100663296],bits:yn,createMethod:Za},{name:"shake",padding:[31,7936,2031616,520093696],bits:At,createMethod:function(C,se){var we=fi(C,se,"hex");return we.create=function(oe){return new ir(C,se,oe)},we.update=function(oe,Ae){return we.create(Ae).update(oe)},di(we,fi,C,se)}},{name:"cshake",padding:Lt,bits:At,createMethod:function(C,se){var we=vn[C],oe=Xa(C,0,"hex");return oe.create=function(Ae,Oe,Pe){return Oe||Pe?new ir(C,se,Ae).bytepad([Oe,Pe],we):wr["shake"+C].create(Ae)},oe.update=function(Ae,Oe,Pe,Ue){return oe.create(Oe,Pe,Ue).update(Ae)},di(oe,Xa,C,se)}},{name:"kmac",padding:Lt,bits:At,createMethod:function(C,se){var we=vn[C],oe=$i(C,0,"hex");return oe.create=function(Ae,Oe,Pe){return new gr(C,se,Oe).bytepad(["KMAC",Pe],we).bytepad([Ae],we)},oe.update=function(Ae,Oe,Pe,Ue){return oe.create(Ae,Pe,Ue).update(Oe)},di(oe,$i,C,se)}}],wr={},fe=[],$e=0;$e<Xr.length;++$e)for(var nt=Xr[$e],Ge=nt.bits,Kr=0;Kr<Ge.length;++Kr){var lr=nt.name+"_"+Ge[Kr];if(fe.push(lr),wr[lr]=nt.createMethod(Ge[Kr],nt.padding),nt.name!=="sha3"){var dn=nt.name+Ge[Kr];fe.push(dn),wr[dn]=wr[lr]}}function ir(C,se,we){this.blocks=[],this.s=[],this.padding=se,this.outputBits=we,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(C<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=we>>5,this.extraBytes=(31&we)>>3;for(var oe=0;oe<50;++oe)this.s[oe]=0}function gr(C,se,we){ir.call(this,C,se,we)}ir.prototype.update=function(C){if(this.finalized)throw new Error("finalize already called");var se,we=typeof C;if(we!=="string"){if(we!=="object")throw new Error(D);if(C===null)throw new Error(D);if(tt&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!(Array.isArray(C)||tt&&ArrayBuffer.isView(C)))throw new Error(D);se=!0}for(var oe,Ae,Oe=this.blocks,Pe=this.byteCount,Ue=C.length,Ke=this.blockCount,qe=0,pt=this.s;qe<Ue;){if(this.reset)for(this.reset=!1,Oe[0]=this.block,oe=1;oe<Ke+1;++oe)Oe[oe]=0;if(se)for(oe=this.start;qe<Ue&&oe<Pe;++qe)Oe[oe>>2]|=C[qe]<<Yt[3&oe++];else for(oe=this.start;qe<Ue&&oe<Pe;++qe)(Ae=C.charCodeAt(qe))<128?Oe[oe>>2]|=Ae<<Yt[3&oe++]:Ae<2048?(Oe[oe>>2]|=(192|Ae>>6)<<Yt[3&oe++],Oe[oe>>2]|=(128|63&Ae)<<Yt[3&oe++]):Ae<55296||Ae>=57344?(Oe[oe>>2]|=(224|Ae>>12)<<Yt[3&oe++],Oe[oe>>2]|=(128|Ae>>6&63)<<Yt[3&oe++],Oe[oe>>2]|=(128|63&Ae)<<Yt[3&oe++]):(Ae=65536+((1023&Ae)<<10|1023&C.charCodeAt(++qe)),Oe[oe>>2]|=(240|Ae>>18)<<Yt[3&oe++],Oe[oe>>2]|=(128|Ae>>12&63)<<Yt[3&oe++],Oe[oe>>2]|=(128|Ae>>6&63)<<Yt[3&oe++],Oe[oe>>2]|=(128|63&Ae)<<Yt[3&oe++]);if(this.lastByteIndex=oe,oe>=Pe){for(this.start=oe-Pe,this.block=Oe[Ke],oe=0;oe<Ke;++oe)pt[oe]^=Oe[oe];ie(pt),this.reset=!0}else this.start=oe}return this},ir.prototype.encode=function(C,se){var we=255&C,oe=1,Ae=[we];for(we=255&(C>>=8);we>0;)Ae.unshift(we),we=255&(C>>=8),++oe;return se?Ae.push(oe):Ae.unshift(oe),this.update(Ae),Ae.length},ir.prototype.encodeString=function(C){var se,we=typeof C;if(we!=="string"){if(we!=="object")throw new Error(D);if(C===null)throw new Error(D);if(tt&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!(Array.isArray(C)||tt&&ArrayBuffer.isView(C)))throw new Error(D);se=!0}var oe=0,Ae=C.length;if(se)oe=Ae;else for(var Oe=0;Oe<C.length;++Oe){var Pe=C.charCodeAt(Oe);Pe<128?oe+=1:Pe<2048?oe+=2:Pe<55296||Pe>=57344?oe+=3:(Pe=65536+((1023&Pe)<<10|1023&C.charCodeAt(++Oe)),oe+=4)}return oe+=this.encode(8*oe),this.update(C),oe},ir.prototype.bytepad=function(C,se){for(var we=this.encode(se),oe=0;oe<C.length;++oe)we+=this.encodeString(C[oe]);var Ae=se-we%se,Oe=[];return Oe.length=Ae,this.update(Oe),this},ir.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var C=this.blocks,se=this.lastByteIndex,we=this.blockCount,oe=this.s;if(C[se>>2]|=this.padding[3&se],this.lastByteIndex===this.byteCount)for(C[0]=C[we],se=1;se<we+1;++se)C[se]=0;for(C[we-1]|=2147483648,se=0;se<we;++se)oe[se]^=C[se];ie(oe)}},ir.prototype.toString=ir.prototype.hex=function(){this.finalize();for(var C,se=this.blockCount,we=this.s,oe=this.outputBlocks,Ae=this.extraBytes,Oe=0,Pe=0,Ue="";Pe<oe;){for(Oe=0;Oe<se&&Pe<oe;++Oe,++Pe)C=we[Oe],Ue+=xt[C>>4&15]+xt[15&C]+xt[C>>12&15]+xt[C>>8&15]+xt[C>>20&15]+xt[C>>16&15]+xt[C>>28&15]+xt[C>>24&15];Pe%se==0&&(ie(we),Oe=0)}return Ae&&(C=we[Oe],Ue+=xt[C>>4&15]+xt[15&C],Ae>1&&(Ue+=xt[C>>12&15]+xt[C>>8&15]),Ae>2&&(Ue+=xt[C>>20&15]+xt[C>>16&15])),Ue},ir.prototype.arrayBuffer=function(){this.finalize();var C,se=this.blockCount,we=this.s,oe=this.outputBlocks,Ae=this.extraBytes,Oe=0,Pe=0,Ue=this.outputBits>>3;C=Ae?new ArrayBuffer(oe+1<<2):new ArrayBuffer(Ue);for(var Ke=new Uint32Array(C);Pe<oe;){for(Oe=0;Oe<se&&Pe<oe;++Oe,++Pe)Ke[Pe]=we[Oe];Pe%se==0&&ie(we)}return Ae&&(Ke[Oe]=we[Oe],C=C.slice(0,Ue)),C},ir.prototype.buffer=ir.prototype.arrayBuffer,ir.prototype.digest=ir.prototype.array=function(){this.finalize();for(var C,se,we=this.blockCount,oe=this.s,Ae=this.outputBlocks,Oe=this.extraBytes,Pe=0,Ue=0,Ke=[];Ue<Ae;){for(Pe=0;Pe<we&&Ue<Ae;++Pe,++Ue)C=Ue<<2,se=oe[Pe],Ke[C]=255&se,Ke[C+1]=se>>8&255,Ke[C+2]=se>>16&255,Ke[C+3]=se>>24&255;Ue%we==0&&ie(oe)}return Oe&&(C=Ue<<2,se=oe[Pe],Ke[C]=255&se,Oe>1&&(Ke[C+1]=se>>8&255),Oe>2&&(Ke[C+2]=se>>16&255)),Ke},gr.prototype=new ir,gr.prototype.finalize=function(){return this.encode(this.outputBits,!0),ir.prototype.finalize.call(this)};var ie=function(C){var se,we,oe,Ae,Oe,Pe,Ue,Ke,qe,pt,er,Vt,Wr,xn,cn,Dr,Qr,_r,ki,zs,mc,Pi,Vs,Ti,si,bn,Xc,$o,zh,Yf,Jf,hl,pl,Xf,Vh,gl,ml,Gh,Zf,Li,yl,yc,ed,td,Kh,Wh,Qh,Yh,Jh,ko,Xh,Zh,vl,rd,xs,Zc,ep,tp,rp,Lo,da,nd,np;for(oe=0;oe<48;oe+=2)Ae=C[0]^C[10]^C[20]^C[30]^C[40],Oe=C[1]^C[11]^C[21]^C[31]^C[41],Pe=C[2]^C[12]^C[22]^C[32]^C[42],Ue=C[3]^C[13]^C[23]^C[33]^C[43],Ke=C[4]^C[14]^C[24]^C[34]^C[44],qe=C[5]^C[15]^C[25]^C[35]^C[45],pt=C[6]^C[16]^C[26]^C[36]^C[46],er=C[7]^C[17]^C[27]^C[37]^C[47],se=(Vt=C[8]^C[18]^C[28]^C[38]^C[48])^(Pe<<1|Ue>>>31),we=(Wr=C[9]^C[19]^C[29]^C[39]^C[49])^(Ue<<1|Pe>>>31),C[0]^=se,C[1]^=we,C[10]^=se,C[11]^=we,C[20]^=se,C[21]^=we,C[30]^=se,C[31]^=we,C[40]^=se,C[41]^=we,se=Ae^(Ke<<1|qe>>>31),we=Oe^(qe<<1|Ke>>>31),C[2]^=se,C[3]^=we,C[12]^=se,C[13]^=we,C[22]^=se,C[23]^=we,C[32]^=se,C[33]^=we,C[42]^=se,C[43]^=we,se=Pe^(pt<<1|er>>>31),we=Ue^(er<<1|pt>>>31),C[4]^=se,C[5]^=we,C[14]^=se,C[15]^=we,C[24]^=se,C[25]^=we,C[34]^=se,C[35]^=we,C[44]^=se,C[45]^=we,se=Ke^(Vt<<1|Wr>>>31),we=qe^(Wr<<1|Vt>>>31),C[6]^=se,C[7]^=we,C[16]^=se,C[17]^=we,C[26]^=se,C[27]^=we,C[36]^=se,C[37]^=we,C[46]^=se,C[47]^=we,se=pt^(Ae<<1|Oe>>>31),we=er^(Oe<<1|Ae>>>31),C[8]^=se,C[9]^=we,C[18]^=se,C[19]^=we,C[28]^=se,C[29]^=we,C[38]^=se,C[39]^=we,C[48]^=se,C[49]^=we,xn=C[0],cn=C[1],Wh=C[11]<<4|C[10]>>>28,Qh=C[10]<<4|C[11]>>>28,$o=C[20]<<3|C[21]>>>29,zh=C[21]<<3|C[20]>>>29,Lo=C[31]<<9|C[30]>>>23,da=C[30]<<9|C[31]>>>23,yc=C[40]<<18|C[41]>>>14,ed=C[41]<<18|C[40]>>>14,Xf=C[2]<<1|C[3]>>>31,Vh=C[3]<<1|C[2]>>>31,Dr=C[13]<<12|C[12]>>>20,Qr=C[12]<<12|C[13]>>>20,Yh=C[22]<<10|C[23]>>>22,Jh=C[23]<<10|C[22]>>>22,Yf=C[33]<<13|C[32]>>>19,Jf=C[32]<<13|C[33]>>>19,nd=C[42]<<2|C[43]>>>30,np=C[43]<<2|C[42]>>>30,rd=C[5]<<30|C[4]>>>2,xs=C[4]<<30|C[5]>>>2,gl=C[14]<<6|C[15]>>>26,ml=C[15]<<6|C[14]>>>26,_r=C[25]<<11|C[24]>>>21,ki=C[24]<<11|C[25]>>>21,ko=C[34]<<15|C[35]>>>17,Xh=C[35]<<15|C[34]>>>17,hl=C[45]<<29|C[44]>>>3,pl=C[44]<<29|C[45]>>>3,Ti=C[6]<<28|C[7]>>>4,si=C[7]<<28|C[6]>>>4,Zc=C[17]<<23|C[16]>>>9,ep=C[16]<<23|C[17]>>>9,Gh=C[26]<<25|C[27]>>>7,Zf=C[27]<<25|C[26]>>>7,zs=C[36]<<21|C[37]>>>11,mc=C[37]<<21|C[36]>>>11,Zh=C[47]<<24|C[46]>>>8,vl=C[46]<<24|C[47]>>>8,td=C[8]<<27|C[9]>>>5,Kh=C[9]<<27|C[8]>>>5,bn=C[18]<<20|C[19]>>>12,Xc=C[19]<<20|C[18]>>>12,tp=C[29]<<7|C[28]>>>25,rp=C[28]<<7|C[29]>>>25,Li=C[38]<<8|C[39]>>>24,yl=C[39]<<8|C[38]>>>24,Pi=C[48]<<14|C[49]>>>18,Vs=C[49]<<14|C[48]>>>18,C[0]=xn^~Dr&_r,C[1]=cn^~Qr&ki,C[10]=Ti^~bn&$o,C[11]=si^~Xc&zh,C[20]=Xf^~gl&Gh,C[21]=Vh^~ml&Zf,C[30]=td^~Wh&Yh,C[31]=Kh^~Qh&Jh,C[40]=rd^~Zc&tp,C[41]=xs^~ep&rp,C[2]=Dr^~_r&zs,C[3]=Qr^~ki&mc,C[12]=bn^~$o&Yf,C[13]=Xc^~zh&Jf,C[22]=gl^~Gh&Li,C[23]=ml^~Zf&yl,C[32]=Wh^~Yh&ko,C[33]=Qh^~Jh&Xh,C[42]=Zc^~tp&Lo,C[43]=ep^~rp&da,C[4]=_r^~zs&Pi,C[5]=ki^~mc&Vs,C[14]=$o^~Yf&hl,C[15]=zh^~Jf&pl,C[24]=Gh^~Li&yc,C[25]=Zf^~yl&ed,C[34]=Yh^~ko&Zh,C[35]=Jh^~Xh&vl,C[44]=tp^~Lo&nd,C[45]=rp^~da&np,C[6]=zs^~Pi&xn,C[7]=mc^~Vs&cn,C[16]=Yf^~hl&Ti,C[17]=Jf^~pl&si,C[26]=Li^~yc&Xf,C[27]=yl^~ed&Vh,C[36]=ko^~Zh&td,C[37]=Xh^~vl&Kh,C[46]=Lo^~nd&rd,C[47]=da^~np&xs,C[8]=Pi^~xn&Dr,C[9]=Vs^~cn&Qr,C[18]=hl^~Ti&bn,C[19]=pl^~si&Xc,C[28]=yc^~Xf&gl,C[29]=ed^~Vh&ml,C[38]=Zh^~td&Wh,C[39]=vl^~Kh&Qh,C[48]=nd^~rd&Zc,C[49]=np^~xs&ep,C[0]^=Ai[oe],C[1]^=Ai[oe+1]};if(Ce)P.exports=wr;else for($e=0;$e<fe.length;++$e)he[fe[$e]]=wr[fe[$e]]})()})(o);var c=o.exports,u=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,f=Math.ceil,h=Math.floor,m="[BigNumber Error] ",y=m+"Number primitive has more than 15 significant digits: ",w=1e14,v=14,g=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,S=1e9;function A(P){var D=0|P;return P>0||P===D?D:D-1}function I(P){for(var D,K,he=1,Se=P.length,Ce=P[0]+"";he<Se;){for(D=P[he++]+"",K=v-D.length;K--;D="0"+D);Ce+=D}for(Se=Ce.length;Ce.charCodeAt(--Se)===48;);return Ce.slice(0,Se+1||1)}function E(P,D){var K,he,Se=P.c,Ce=D.c,tt=P.s,xt=D.s,Lt=P.e,Yt=D.e;if(!tt||!xt)return null;if(K=Se&&!Se[0],he=Ce&&!Ce[0],K||he)return K?he?0:-xt:tt;if(tt!=xt)return tt;if(K=tt<0,he=Lt==Yt,!Se||!Ce)return he?0:!Se^K?1:-1;if(!he)return Lt>Yt^K?1:-1;for(xt=(Lt=Se.length)<(Yt=Ce.length)?Lt:Yt,tt=0;tt<xt;tt++)if(Se[tt]!=Ce[tt])return Se[tt]>Ce[tt]^K?1:-1;return Lt==Yt?0:Lt>Yt^K?1:-1}function p(P,D,K,he){if(P<D||P>K||P!==h(P))throw Error(m+(he||"Argument")+(typeof P=="number"?P<D||P>K?" out of range: ":" not an integer: ":" not a primitive number: ")+String(P))}function O(P){var D=P.c.length-1;return A(P.e/v)==D&&P.c[D]%2!=0}function N(P,D){return(P.length>1?P.charAt(0)+"."+P.slice(1):P)+(D<0?"e":"e+")+D}function F(P,D,K){var he,Se;if(D<0){for(Se=K+".";++D;Se+=K);P=Se+P}else if(++D>(he=P.length)){for(Se=K,D-=he;--D;Se+=K);P+=Se}else D<he&&(P=P.slice(0,D)+"."+P.slice(D));return P}var V=function P(D){var K,he,Se,Ce,tt,xt,Lt,Yt,Ai,yn,At=Ge.prototype={constructor:Ge,toString:null,valueOf:null},ti=new Ge(1),vn=20,on=4,fi=-7,Xa=21,$i=-1e7,di=1e7,Za=!1,Xr=1,wr=0,fe={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$e="0123456789abcdefghijklmnopqrstuvwxyz",nt=!0;function Ge(ie,C){var se,we,oe,Ae,Oe,Pe,Ue,Ke,qe=this;if(!(qe instanceof Ge))return new Ge(ie,C);if(C==null){if(ie&&ie._isBigNumber===!0)return qe.s=ie.s,void(!ie.c||ie.e>di?qe.c=qe.e=null:ie.e<$i?qe.c=[qe.e=0]:(qe.e=ie.e,qe.c=ie.c.slice()));if((Pe=typeof ie=="number")&&0*ie==0){if(qe.s=1/ie<0?(ie=-ie,-1):1,ie===~~ie){for(Ae=0,Oe=ie;Oe>=10;Oe/=10,Ae++);return void(Ae>di?qe.c=qe.e=null:(qe.e=Ae,qe.c=[ie]))}Ke=String(ie)}else{if(!u.test(Ke=String(ie)))return Se(qe,Ke,Pe);qe.s=Ke.charCodeAt(0)==45?(Ke=Ke.slice(1),-1):1}(Ae=Ke.indexOf("."))>-1&&(Ke=Ke.replace(".","")),(Oe=Ke.search(/e/i))>0?(Ae<0&&(Ae=Oe),Ae+=+Ke.slice(Oe+1),Ke=Ke.substring(0,Oe)):Ae<0&&(Ae=Ke.length)}else{if(p(C,2,$e.length,"Base"),C==10&&nt)return ir(qe=new Ge(ie),vn+qe.e+1,on);if(Ke=String(ie),Pe=typeof ie=="number"){if(0*ie!=0)return Se(qe,Ke,Pe,C);if(qe.s=1/ie<0?(Ke=Ke.slice(1),-1):1,Ge.DEBUG&&Ke.replace(/^0\.0*|\./,"").length>15)throw Error(y+ie)}else qe.s=Ke.charCodeAt(0)===45?(Ke=Ke.slice(1),-1):1;for(se=$e.slice(0,C),Ae=Oe=0,Ue=Ke.length;Oe<Ue;Oe++)if(se.indexOf(we=Ke.charAt(Oe))<0){if(we=="."){if(Oe>Ae){Ae=Ue;continue}}else if(!oe&&(Ke==Ke.toUpperCase()&&(Ke=Ke.toLowerCase())||Ke==Ke.toLowerCase()&&(Ke=Ke.toUpperCase()))){oe=!0,Oe=-1,Ae=0;continue}return Se(qe,String(ie),Pe,C)}Pe=!1,(Ae=(Ke=he(Ke,C,10,qe.s)).indexOf("."))>-1?Ke=Ke.replace(".",""):Ae=Ke.length}for(Oe=0;Ke.charCodeAt(Oe)===48;Oe++);for(Ue=Ke.length;Ke.charCodeAt(--Ue)===48;);if(Ke=Ke.slice(Oe,++Ue)){if(Ue-=Oe,Pe&&Ge.DEBUG&&Ue>15&&(ie>g||ie!==h(ie)))throw Error(y+qe.s*ie);if((Ae=Ae-Oe-1)>di)qe.c=qe.e=null;else if(Ae<$i)qe.c=[qe.e=0];else{if(qe.e=Ae,qe.c=[],Oe=(Ae+1)%v,Ae<0&&(Oe+=v),Oe<Ue){for(Oe&&qe.c.push(+Ke.slice(0,Oe)),Ue-=v;Oe<Ue;)qe.c.push(+Ke.slice(Oe,Oe+=v));Oe=v-(Ke=Ke.slice(Oe)).length}else Oe-=Ue;for(;Oe--;Ke+="0");qe.c.push(+Ke)}}else qe.c=[qe.e=0]}function Kr(ie,C,se,we){var oe,Ae,Oe,Pe,Ue;if(se==null?se=on:p(se,0,8),!ie.c)return ie.toString();if(oe=ie.c[0],Oe=ie.e,C==null)Ue=I(ie.c),Ue=we==1||we==2&&(Oe<=fi||Oe>=Xa)?N(Ue,Oe):F(Ue,Oe,"0");else if(Ae=(ie=ir(new Ge(ie),C,se)).e,Pe=(Ue=I(ie.c)).length,we==1||we==2&&(C<=Ae||Ae<=fi)){for(;Pe<C;Ue+="0",Pe++);Ue=N(Ue,Ae)}else if(C-=Oe,Ue=F(Ue,Ae,"0"),Ae+1>Pe){if(--C>0)for(Ue+=".";C--;Ue+="0");}else if((C+=Ae-Pe)>0)for(Ae+1==Pe&&(Ue+=".");C--;Ue+="0");return ie.s<0&&oe?"-"+Ue:Ue}function lr(ie,C){for(var se,we=1,oe=new Ge(ie[0]);we<ie.length;we++){if(!(se=new Ge(ie[we])).s){oe=se;break}C.call(oe,se)&&(oe=se)}return oe}function dn(ie,C,se){for(var we=1,oe=C.length;!C[--oe];C.pop());for(oe=C[0];oe>=10;oe/=10,we++);return(se=we+se*v-1)>di?ie.c=ie.e=null:se<$i?ie.c=[ie.e=0]:(ie.e=se,ie.c=C),ie}function ir(ie,C,se,we){var oe,Ae,Oe,Pe,Ue,Ke,qe,pt=ie.c,er=_;if(pt){e:{for(oe=1,Pe=pt[0];Pe>=10;Pe/=10,oe++);if((Ae=C-oe)<0)Ae+=v,Oe=C,qe=(Ue=pt[Ke=0])/er[oe-Oe-1]%10|0;else if((Ke=f((Ae+1)/v))>=pt.length){if(!we)break e;for(;pt.length<=Ke;pt.push(0));Ue=qe=0,oe=1,Oe=(Ae%=v)-v+1}else{for(Ue=Pe=pt[Ke],oe=1;Pe>=10;Pe/=10,oe++);qe=(Oe=(Ae%=v)-v+oe)<0?0:Ue/er[oe-Oe-1]%10|0}if(we=we||C<0||pt[Ke+1]!=null||(Oe<0?Ue:Ue%er[oe-Oe-1]),we=se<4?(qe||we)&&(se==0||se==(ie.s<0?3:2)):qe>5||qe==5&&(se==4||we||se==6&&(Ae>0?Oe>0?Ue/er[oe-Oe]:0:pt[Ke-1])%10&1||se==(ie.s<0?8:7)),C<1||!pt[0])return pt.length=0,we?(C-=ie.e+1,pt[0]=er[(v-C%v)%v],ie.e=-C||0):pt[0]=ie.e=0,ie;if(Ae==0?(pt.length=Ke,Pe=1,Ke--):(pt.length=Ke+1,Pe=er[v-Ae],pt[Ke]=Oe>0?h(Ue/er[oe-Oe]%er[Oe])*Pe:0),we)for(;;){if(Ke==0){for(Ae=1,Oe=pt[0];Oe>=10;Oe/=10,Ae++);for(Oe=pt[0]+=Pe,Pe=1;Oe>=10;Oe/=10,Pe++);Ae!=Pe&&(ie.e++,pt[0]==w&&(pt[0]=1));break}if(pt[Ke]+=Pe,pt[Ke]!=w)break;pt[Ke--]=0,Pe=1}for(Ae=pt.length;pt[--Ae]===0;pt.pop());}ie.e>di?ie.c=ie.e=null:ie.e<$i&&(ie.c=[ie.e=0])}return ie}function gr(ie){var C,se=ie.e;return se===null?ie.toString():(C=I(ie.c),C=se<=fi||se>=Xa?N(C,se):F(C,se,"0"),ie.s<0?"-"+C:C)}return Ge.clone=P,Ge.ROUND_UP=0,Ge.ROUND_DOWN=1,Ge.ROUND_CEIL=2,Ge.ROUND_FLOOR=3,Ge.ROUND_HALF_UP=4,Ge.ROUND_HALF_DOWN=5,Ge.ROUND_HALF_EVEN=6,Ge.ROUND_HALF_CEIL=7,Ge.ROUND_HALF_FLOOR=8,Ge.EUCLID=9,Ge.config=Ge.set=function(ie){var C,se;if(ie!=null){if(typeof ie!="object")throw Error(m+"Object expected: "+ie);if(ie.hasOwnProperty(C="DECIMAL_PLACES")&&(p(se=ie[C],0,S,C),vn=se),ie.hasOwnProperty(C="ROUNDING_MODE")&&(p(se=ie[C],0,8,C),on=se),ie.hasOwnProperty(C="EXPONENTIAL_AT")&&((se=ie[C])&&se.pop?(p(se[0],-S,0,C),p(se[1],0,S,C),fi=se[0],Xa=se[1]):(p(se,-S,S,C),fi=-(Xa=se<0?-se:se))),ie.hasOwnProperty(C="RANGE"))if((se=ie[C])&&se.pop)p(se[0],-S,-1,C),p(se[1],1,S,C),$i=se[0],di=se[1];else{if(p(se,-S,S,C),!se)throw Error(m+C+" cannot be zero: "+se);$i=-(di=se<0?-se:se)}if(ie.hasOwnProperty(C="CRYPTO")){if((se=ie[C])!==!!se)throw Error(m+C+" not true or false: "+se);if(se){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Za=!se,Error(m+"crypto unavailable");Za=se}else Za=se}if(ie.hasOwnProperty(C="MODULO_MODE")&&(p(se=ie[C],0,9,C),Xr=se),ie.hasOwnProperty(C="POW_PRECISION")&&(p(se=ie[C],0,S,C),wr=se),ie.hasOwnProperty(C="FORMAT")){if(typeof(se=ie[C])!="object")throw Error(m+C+" not an object: "+se);fe=se}if(ie.hasOwnProperty(C="ALPHABET")){if(typeof(se=ie[C])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(se))throw Error(m+C+" invalid: "+se);nt=se.slice(0,10)=="0123456789",$e=se}}return{DECIMAL_PLACES:vn,ROUNDING_MODE:on,EXPONENTIAL_AT:[fi,Xa],RANGE:[$i,di],CRYPTO:Za,MODULO_MODE:Xr,POW_PRECISION:wr,FORMAT:fe,ALPHABET:$e}},Ge.isBigNumber=function(ie){if(!ie||ie._isBigNumber!==!0)return!1;if(!Ge.DEBUG)return!0;var C,se,we=ie.c,oe=ie.e,Ae=ie.s;e:if({}.toString.call(we)=="[object Array]"){if((Ae===1||Ae===-1)&&oe>=-S&&oe<=S&&oe===h(oe)){if(we[0]===0){if(oe===0&&we.length===1)return!0;break e}if((C=(oe+1)%v)<1&&(C+=v),String(we[0]).length==C){for(C=0;C<we.length;C++)if((se=we[C])<0||se>=w||se!==h(se))break e;if(se!==0)return!0}}}else if(we===null&&oe===null&&(Ae===null||Ae===1||Ae===-1))return!0;throw Error(m+"Invalid BigNumber: "+ie)},Ge.maximum=Ge.max=function(){return lr(arguments,At.lt)},Ge.minimum=Ge.min=function(){return lr(arguments,At.gt)},Ge.random=(Ce=9007199254740992,tt=Math.random()*Ce&2097151?function(){return h(Math.random()*Ce)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(ie){var C,se,we,oe,Ae,Oe=0,Pe=[],Ue=new Ge(ti);if(ie==null?ie=vn:p(ie,0,S),oe=f(ie/v),Za)if(crypto.getRandomValues){for(C=crypto.getRandomValues(new Uint32Array(oe*=2));Oe<oe;)(Ae=131072*C[Oe]+(C[Oe+1]>>>11))>=9e15?(se=crypto.getRandomValues(new Uint32Array(2)),C[Oe]=se[0],C[Oe+1]=se[1]):(Pe.push(Ae%1e14),Oe+=2);Oe=oe/2}else{if(!crypto.randomBytes)throw Za=!1,Error(m+"crypto unavailable");for(C=crypto.randomBytes(oe*=7);Oe<oe;)(Ae=281474976710656*(31&C[Oe])+1099511627776*C[Oe+1]+4294967296*C[Oe+2]+16777216*C[Oe+3]+(C[Oe+4]<<16)+(C[Oe+5]<<8)+C[Oe+6])>=9e15?crypto.randomBytes(7).copy(C,Oe):(Pe.push(Ae%1e14),Oe+=7);Oe=oe/7}if(!Za)for(;Oe<oe;)(Ae=tt())<9e15&&(Pe[Oe++]=Ae%1e14);for(oe=Pe[--Oe],ie%=v,oe&&ie&&(Ae=_[v-ie],Pe[Oe]=h(oe/Ae)*Ae);Pe[Oe]===0;Pe.pop(),Oe--);if(Oe<0)Pe=[we=0];else{for(we=-1;Pe[0]===0;Pe.splice(0,1),we-=v);for(Oe=1,Ae=Pe[0];Ae>=10;Ae/=10,Oe++);Oe<v&&(we-=v-Oe)}return Ue.e=we,Ue.c=Pe,Ue}),Ge.sum=function(){for(var ie=1,C=arguments,se=new Ge(C[0]);ie<C.length;)se=se.plus(C[ie++]);return se},he=function(){var ie="0123456789";function C(se,we,oe,Ae){for(var Oe,Pe,Ue=[0],Ke=0,qe=se.length;Ke<qe;){for(Pe=Ue.length;Pe--;Ue[Pe]*=we);for(Ue[0]+=Ae.indexOf(se.charAt(Ke++)),Oe=0;Oe<Ue.length;Oe++)Ue[Oe]>oe-1&&(Ue[Oe+1]==null&&(Ue[Oe+1]=0),Ue[Oe+1]+=Ue[Oe]/oe|0,Ue[Oe]%=oe)}return Ue.reverse()}return function(se,we,oe,Ae,Oe){var Pe,Ue,Ke,qe,pt,er,Vt,Wr,xn=se.indexOf("."),cn=vn,Dr=on;for(xn>=0&&(qe=wr,wr=0,se=se.replace(".",""),er=(Wr=new Ge(we)).pow(se.length-xn),wr=qe,Wr.c=C(F(I(er.c),er.e,"0"),10,oe,ie),Wr.e=Wr.c.length),Ke=qe=(Vt=C(se,we,oe,Oe?(Pe=$e,ie):(Pe=ie,$e))).length;Vt[--qe]==0;Vt.pop());if(!Vt[0])return Pe.charAt(0);if(xn<0?--Ke:(er.c=Vt,er.e=Ke,er.s=Ae,Vt=(er=K(er,Wr,cn,Dr,oe)).c,pt=er.r,Ke=er.e),xn=Vt[Ue=Ke+cn+1],qe=oe/2,pt=pt||Ue<0||Vt[Ue+1]!=null,pt=Dr<4?(xn!=null||pt)&&(Dr==0||Dr==(er.s<0?3:2)):xn>qe||xn==qe&&(Dr==4||pt||Dr==6&&1&Vt[Ue-1]||Dr==(er.s<0?8:7)),Ue<1||!Vt[0])se=pt?F(Pe.charAt(1),-cn,Pe.charAt(0)):Pe.charAt(0);else{if(Vt.length=Ue,pt)for(--oe;++Vt[--Ue]>oe;)Vt[Ue]=0,Ue||(++Ke,Vt=[1].concat(Vt));for(qe=Vt.length;!Vt[--qe];);for(xn=0,se="";xn<=qe;se+=Pe.charAt(Vt[xn++]));se=F(se,Ke,Pe.charAt(0))}return se}}(),K=function(){function ie(we,oe,Ae){var Oe,Pe,Ue,Ke,qe=0,pt=we.length,er=oe%b,Vt=oe/b|0;for(we=we.slice();pt--;)qe=((Pe=er*(Ue=we[pt]%b)+(Oe=Vt*Ue+(Ke=we[pt]/b|0)*er)%b*b+qe)/Ae|0)+(Oe/b|0)+Vt*Ke,we[pt]=Pe%Ae;return qe&&(we=[qe].concat(we)),we}function C(we,oe,Ae,Oe){var Pe,Ue;if(Ae!=Oe)Ue=Ae>Oe?1:-1;else for(Pe=Ue=0;Pe<Ae;Pe++)if(we[Pe]!=oe[Pe]){Ue=we[Pe]>oe[Pe]?1:-1;break}return Ue}function se(we,oe,Ae,Oe){for(var Pe=0;Ae--;)we[Ae]-=Pe,Pe=we[Ae]<oe[Ae]?1:0,we[Ae]=Pe*Oe+we[Ae]-oe[Ae];for(;!we[0]&&we.length>1;we.splice(0,1));}return function(we,oe,Ae,Oe,Pe){var Ue,Ke,qe,pt,er,Vt,Wr,xn,cn,Dr,Qr,_r,ki,zs,mc,Pi,Vs,Ti=we.s==oe.s?1:-1,si=we.c,bn=oe.c;if(!(si&&si[0]&&bn&&bn[0]))return new Ge(we.s&&oe.s&&(si?!bn||si[0]!=bn[0]:bn)?si&&si[0]==0||!bn?0*Ti:Ti/0:NaN);for(cn=(xn=new Ge(Ti)).c=[],Ti=Ae+(Ke=we.e-oe.e)+1,Pe||(Pe=w,Ke=A(we.e/v)-A(oe.e/v),Ti=Ti/v|0),qe=0;bn[qe]==(si[qe]||0);qe++);if(bn[qe]>(si[qe]||0)&&Ke--,Ti<0)cn.push(1),pt=!0;else{for(zs=si.length,Pi=bn.length,qe=0,Ti+=2,(er=h(Pe/(bn[0]+1)))>1&&(bn=ie(bn,er,Pe),si=ie(si,er,Pe),Pi=bn.length,zs=si.length),ki=Pi,Qr=(Dr=si.slice(0,Pi)).length;Qr<Pi;Dr[Qr++]=0);Vs=bn.slice(),Vs=[0].concat(Vs),mc=bn[0],bn[1]>=Pe/2&&mc++;do{if(er=0,(Ue=C(bn,Dr,Pi,Qr))<0){if(_r=Dr[0],Pi!=Qr&&(_r=_r*Pe+(Dr[1]||0)),(er=h(_r/mc))>1)for(er>=Pe&&(er=Pe-1),Wr=(Vt=ie(bn,er,Pe)).length,Qr=Dr.length;C(Vt,Dr,Wr,Qr)==1;)er--,se(Vt,Pi<Wr?Vs:bn,Wr,Pe),Wr=Vt.length,Ue=1;else er==0&&(Ue=er=1),Wr=(Vt=bn.slice()).length;if(Wr<Qr&&(Vt=[0].concat(Vt)),se(Dr,Vt,Qr,Pe),Qr=Dr.length,Ue==-1)for(;C(bn,Dr,Pi,Qr)<1;)er++,se(Dr,Pi<Qr?Vs:bn,Qr,Pe),Qr=Dr.length}else Ue===0&&(er++,Dr=[0]);cn[qe++]=er,Dr[0]?Dr[Qr++]=si[ki]||0:(Dr=[si[ki]],Qr=1)}while((ki++<zs||Dr[0]!=null)&&Ti--);pt=Dr[0]!=null,cn[0]||cn.splice(0,1)}if(Pe==w){for(qe=1,Ti=cn[0];Ti>=10;Ti/=10,qe++);ir(xn,Ae+(xn.e=qe+Ke*v-1)+1,Oe,pt)}else xn.e=Ke,xn.r=+pt;return xn}}(),xt=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Lt=/^([^.]+)\.$/,Yt=/^\.([^.]+)$/,Ai=/^-?(Infinity|NaN)$/,yn=/^\s*\+(?=[\w.])|^\s+|\s+$/g,Se=function(ie,C,se,we){var oe,Ae=se?C:C.replace(yn,"");if(Ai.test(Ae))ie.s=isNaN(Ae)?null:Ae<0?-1:1;else{if(!se&&(Ae=Ae.replace(xt,function(Oe,Pe,Ue){return oe=(Ue=Ue.toLowerCase())=="x"?16:Ue=="b"?2:8,we&&we!=oe?Oe:Pe}),we&&(oe=we,Ae=Ae.replace(Lt,"$1").replace(Yt,"0.$1")),C!=Ae))return new Ge(Ae,oe);if(Ge.DEBUG)throw Error(m+"Not a"+(we?" base "+we:"")+" number: "+C);ie.s=null}ie.c=ie.e=null},At.absoluteValue=At.abs=function(){var ie=new Ge(this);return ie.s<0&&(ie.s=1),ie},At.comparedTo=function(ie,C){return E(this,new Ge(ie,C))},At.decimalPlaces=At.dp=function(ie,C){var se,we,oe,Ae=this;if(ie!=null)return p(ie,0,S),C==null?C=on:p(C,0,8),ir(new Ge(Ae),ie+Ae.e+1,C);if(!(se=Ae.c))return null;if(we=((oe=se.length-1)-A(this.e/v))*v,oe=se[oe])for(;oe%10==0;oe/=10,we--);return we<0&&(we=0),we},At.dividedBy=At.div=function(ie,C){return K(this,new Ge(ie,C),vn,on)},At.dividedToIntegerBy=At.idiv=function(ie,C){return K(this,new Ge(ie,C),0,1)},At.exponentiatedBy=At.pow=function(ie,C){var se,we,oe,Ae,Oe,Pe,Ue,Ke,qe=this;if((ie=new Ge(ie)).c&&!ie.isInteger())throw Error(m+"Exponent not an integer: "+gr(ie));if(C!=null&&(C=new Ge(C)),Oe=ie.e>14,!qe.c||!qe.c[0]||qe.c[0]==1&&!qe.e&&qe.c.length==1||!ie.c||!ie.c[0])return Ke=new Ge(Math.pow(+gr(qe),Oe?ie.s*(2-O(ie)):+gr(ie))),C?Ke.mod(C):Ke;if(Pe=ie.s<0,C){if(C.c?!C.c[0]:!C.s)return new Ge(NaN);(we=!Pe&&qe.isInteger()&&C.isInteger())&&(qe=qe.mod(C))}else{if(ie.e>9&&(qe.e>0||qe.e<-1||(qe.e==0?qe.c[0]>1||Oe&&qe.c[1]>=24e7:qe.c[0]<8e13||Oe&&qe.c[0]<=9999975e7)))return Ae=qe.s<0&&O(ie)?-0:0,qe.e>-1&&(Ae=1/Ae),new Ge(Pe?1/Ae:Ae);wr&&(Ae=f(wr/v+2))}for(Oe?(se=new Ge(.5),Pe&&(ie.s=1),Ue=O(ie)):Ue=(oe=Math.abs(+gr(ie)))%2,Ke=new Ge(ti);;){if(Ue){if(!(Ke=Ke.times(qe)).c)break;Ae?Ke.c.length>Ae&&(Ke.c.length=Ae):we&&(Ke=Ke.mod(C))}if(oe){if((oe=h(oe/2))===0)break;Ue=oe%2}else if(ir(ie=ie.times(se),ie.e+1,1),ie.e>14)Ue=O(ie);else{if((oe=+gr(ie))==0)break;Ue=oe%2}qe=qe.times(qe),Ae?qe.c&&qe.c.length>Ae&&(qe.c.length=Ae):we&&(qe=qe.mod(C))}return we?Ke:(Pe&&(Ke=ti.div(Ke)),C?Ke.mod(C):Ae?ir(Ke,wr,on,void 0):Ke)},At.integerValue=function(ie){var C=new Ge(this);return ie==null?ie=on:p(ie,0,8),ir(C,C.e+1,ie)},At.isEqualTo=At.eq=function(ie,C){return E(this,new Ge(ie,C))===0},At.isFinite=function(){return!!this.c},At.isGreaterThan=At.gt=function(ie,C){return E(this,new Ge(ie,C))>0},At.isGreaterThanOrEqualTo=At.gte=function(ie,C){return(C=E(this,new Ge(ie,C)))===1||C===0},At.isInteger=function(){return!!this.c&&A(this.e/v)>this.c.length-2},At.isLessThan=At.lt=function(ie,C){return E(this,new Ge(ie,C))<0},At.isLessThanOrEqualTo=At.lte=function(ie,C){return(C=E(this,new Ge(ie,C)))===-1||C===0},At.isNaN=function(){return!this.s},At.isNegative=function(){return this.s<0},At.isPositive=function(){return this.s>0},At.isZero=function(){return!!this.c&&this.c[0]==0},At.minus=function(ie,C){var se,we,oe,Ae,Oe=this,Pe=Oe.s;if(C=(ie=new Ge(ie,C)).s,!Pe||!C)return new Ge(NaN);if(Pe!=C)return ie.s=-C,Oe.plus(ie);var Ue=Oe.e/v,Ke=ie.e/v,qe=Oe.c,pt=ie.c;if(!Ue||!Ke){if(!qe||!pt)return qe?(ie.s=-C,ie):new Ge(pt?Oe:NaN);if(!qe[0]||!pt[0])return pt[0]?(ie.s=-C,ie):new Ge(qe[0]?Oe:on==3?-0:0)}if(Ue=A(Ue),Ke=A(Ke),qe=qe.slice(),Pe=Ue-Ke){for((Ae=Pe<0)?(Pe=-Pe,oe=qe):(Ke=Ue,oe=pt),oe.reverse(),C=Pe;C--;oe.push(0));oe.reverse()}else for(we=(Ae=(Pe=qe.length)<(C=pt.length))?Pe:C,Pe=C=0;C<we;C++)if(qe[C]!=pt[C]){Ae=qe[C]<pt[C];break}if(Ae&&(oe=qe,qe=pt,pt=oe,ie.s=-ie.s),(C=(we=pt.length)-(se=qe.length))>0)for(;C--;qe[se++]=0);for(C=w-1;we>Pe;){if(qe[--we]<pt[we]){for(se=we;se&&!qe[--se];qe[se]=C);--qe[se],qe[we]+=w}qe[we]-=pt[we]}for(;qe[0]==0;qe.splice(0,1),--Ke);return qe[0]?dn(ie,qe,Ke):(ie.s=on==3?-1:1,ie.c=[ie.e=0],ie)},At.modulo=At.mod=function(ie,C){var se,we,oe=this;return ie=new Ge(ie,C),!oe.c||!ie.s||ie.c&&!ie.c[0]?new Ge(NaN):!ie.c||oe.c&&!oe.c[0]?new Ge(oe):(Xr==9?(we=ie.s,ie.s=1,se=K(oe,ie,0,3),ie.s=we,se.s*=we):se=K(oe,ie,0,Xr),(ie=oe.minus(se.times(ie))).c[0]||Xr!=1||(ie.s=oe.s),ie)},At.multipliedBy=At.times=function(ie,C){var se,we,oe,Ae,Oe,Pe,Ue,Ke,qe,pt,er,Vt,Wr,xn,cn,Dr=this,Qr=Dr.c,_r=(ie=new Ge(ie,C)).c;if(!(Qr&&_r&&Qr[0]&&_r[0]))return!Dr.s||!ie.s||Qr&&!Qr[0]&&!_r||_r&&!_r[0]&&!Qr?ie.c=ie.e=ie.s=null:(ie.s*=Dr.s,Qr&&_r?(ie.c=[0],ie.e=0):ie.c=ie.e=null),ie;for(we=A(Dr.e/v)+A(ie.e/v),ie.s*=Dr.s,(Ue=Qr.length)<(pt=_r.length)&&(Wr=Qr,Qr=_r,_r=Wr,oe=Ue,Ue=pt,pt=oe),oe=Ue+pt,Wr=[];oe--;Wr.push(0));for(xn=w,cn=b,oe=pt;--oe>=0;){for(se=0,er=_r[oe]%cn,Vt=_r[oe]/cn|0,Ae=oe+(Oe=Ue);Ae>oe;)se=((Ke=er*(Ke=Qr[--Oe]%cn)+(Pe=Vt*Ke+(qe=Qr[Oe]/cn|0)*er)%cn*cn+Wr[Ae]+se)/xn|0)+(Pe/cn|0)+Vt*qe,Wr[Ae--]=Ke%xn;Wr[Ae]=se}return se?++we:Wr.splice(0,1),dn(ie,Wr,we)},At.negated=function(){var ie=new Ge(this);return ie.s=-ie.s||null,ie},At.plus=function(ie,C){var se,we=this,oe=we.s;if(C=(ie=new Ge(ie,C)).s,!oe||!C)return new Ge(NaN);if(oe!=C)return ie.s=-C,we.minus(ie);var Ae=we.e/v,Oe=ie.e/v,Pe=we.c,Ue=ie.c;if(!Ae||!Oe){if(!Pe||!Ue)return new Ge(oe/0);if(!Pe[0]||!Ue[0])return Ue[0]?ie:new Ge(Pe[0]?we:0*oe)}if(Ae=A(Ae),Oe=A(Oe),Pe=Pe.slice(),oe=Ae-Oe){for(oe>0?(Oe=Ae,se=Ue):(oe=-oe,se=Pe),se.reverse();oe--;se.push(0));se.reverse()}for((oe=Pe.length)-(C=Ue.length)<0&&(se=Ue,Ue=Pe,Pe=se,C=oe),oe=0;C;)oe=(Pe[--C]=Pe[C]+Ue[C]+oe)/w|0,Pe[C]=w===Pe[C]?0:Pe[C]%w;return oe&&(Pe=[oe].concat(Pe),++Oe),dn(ie,Pe,Oe)},At.precision=At.sd=function(ie,C){var se,we,oe,Ae=this;if(ie!=null&&ie!==!!ie)return p(ie,1,S),C==null?C=on:p(C,0,8),ir(new Ge(Ae),ie,C);if(!(se=Ae.c))return null;if(we=(oe=se.length-1)*v+1,oe=se[oe]){for(;oe%10==0;oe/=10,we--);for(oe=se[0];oe>=10;oe/=10,we++);}return ie&&Ae.e+1>we&&(we=Ae.e+1),we},At.shiftedBy=function(ie){return p(ie,-9007199254740991,g),this.times("1e"+ie)},At.squareRoot=At.sqrt=function(){var ie,C,se,we,oe,Ae=this,Oe=Ae.c,Pe=Ae.s,Ue=Ae.e,Ke=vn+4,qe=new Ge("0.5");if(Pe!==1||!Oe||!Oe[0])return new Ge(!Pe||Pe<0&&(!Oe||Oe[0])?NaN:Oe?Ae:1/0);if((Pe=Math.sqrt(+gr(Ae)))==0||Pe==1/0?(((C=I(Oe)).length+Ue)%2==0&&(C+="0"),Pe=Math.sqrt(+C),Ue=A((Ue+1)/2)-(Ue<0||Ue%2),se=new Ge(C=Pe==1/0?"5e"+Ue:(C=Pe.toExponential()).slice(0,C.indexOf("e")+1)+Ue)):se=new Ge(Pe+""),se.c[0]){for((Pe=(Ue=se.e)+Ke)<3&&(Pe=0);;)if(oe=se,se=qe.times(oe.plus(K(Ae,oe,Ke,1))),I(oe.c).slice(0,Pe)===(C=I(se.c)).slice(0,Pe)){if(se.e<Ue&&--Pe,(C=C.slice(Pe-3,Pe+1))!="9999"&&(we||C!="4999")){+C&&(+C.slice(1)||C.charAt(0)!="5")||(ir(se,se.e+vn+2,1),ie=!se.times(se).eq(Ae));break}if(!we&&(ir(oe,oe.e+vn+2,0),oe.times(oe).eq(Ae))){se=oe;break}Ke+=4,Pe+=4,we=1}}return ir(se,se.e+vn+1,on,ie)},At.toExponential=function(ie,C){return ie!=null&&(p(ie,0,S),ie++),Kr(this,ie,C,1)},At.toFixed=function(ie,C){return ie!=null&&(p(ie,0,S),ie=ie+this.e+1),Kr(this,ie,C)},At.toFormat=function(ie,C,se){var we,oe=this;if(se==null)ie!=null&&C&&typeof C=="object"?(se=C,C=null):ie&&typeof ie=="object"?(se=ie,ie=C=null):se=fe;else if(typeof se!="object")throw Error(m+"Argument not an object: "+se);if(we=oe.toFixed(ie,C),oe.c){var Ae,Oe=we.split("."),Pe=+se.groupSize,Ue=+se.secondaryGroupSize,Ke=se.groupSeparator||"",qe=Oe[0],pt=Oe[1],er=oe.s<0,Vt=er?qe.slice(1):qe,Wr=Vt.length;if(Ue&&(Ae=Pe,Pe=Ue,Ue=Ae,Wr-=Ae),Pe>0&&Wr>0){for(Ae=Wr%Pe||Pe,qe=Vt.substr(0,Ae);Ae<Wr;Ae+=Pe)qe+=Ke+Vt.substr(Ae,Pe);Ue>0&&(qe+=Ke+Vt.slice(Ae)),er&&(qe="-"+qe)}we=pt?qe+(se.decimalSeparator||"")+((Ue=+se.fractionGroupSize)?pt.replace(new RegExp("\\d{"+Ue+"}\\B","g"),"$&"+(se.fractionGroupSeparator||"")):pt):qe}return(se.prefix||"")+we+(se.suffix||"")},At.toFraction=function(ie){var C,se,we,oe,Ae,Oe,Pe,Ue,Ke,qe,pt,er,Vt=this,Wr=Vt.c;if(ie!=null&&(!(Pe=new Ge(ie)).isInteger()&&(Pe.c||Pe.s!==1)||Pe.lt(ti)))throw Error(m+"Argument "+(Pe.isInteger()?"out of range: ":"not an integer: ")+gr(Pe));if(!Wr)return new Ge(Vt);for(C=new Ge(ti),Ke=se=new Ge(ti),we=Ue=new Ge(ti),er=I(Wr),Ae=C.e=er.length-Vt.e-1,C.c[0]=_[(Oe=Ae%v)<0?v+Oe:Oe],ie=!ie||Pe.comparedTo(C)>0?Ae>0?C:Ke:Pe,Oe=di,di=1/0,Pe=new Ge(er),Ue.c[0]=0;qe=K(Pe,C,0,1),(oe=se.plus(qe.times(we))).comparedTo(ie)!=1;)se=we,we=oe,Ke=Ue.plus(qe.times(oe=Ke)),Ue=oe,C=Pe.minus(qe.times(oe=C)),Pe=oe;return oe=K(ie.minus(se),we,0,1),Ue=Ue.plus(oe.times(Ke)),se=se.plus(oe.times(we)),Ue.s=Ke.s=Vt.s,pt=K(Ke,we,Ae*=2,on).minus(Vt).abs().comparedTo(K(Ue,se,Ae,on).minus(Vt).abs())<1?[Ke,we]:[Ue,se],di=Oe,pt},At.toNumber=function(){return+gr(this)},At.toPrecision=function(ie,C){return ie!=null&&p(ie,1,S),Kr(this,ie,C,2)},At.toString=function(ie){var C,se=this,we=se.s,oe=se.e;return oe===null?we?(C="Infinity",we<0&&(C="-"+C)):C="NaN":(ie==null?C=oe<=fi||oe>=Xa?N(I(se.c),oe):F(I(se.c),oe,"0"):ie===10&&nt?C=F(I((se=ir(new Ge(se),vn+oe+1,on)).c),se.e,"0"):(p(ie,2,$e.length,"Base"),C=he(F(I(se.c),oe,"0"),10,ie,we,!0)),we<0&&se.c[0]&&(C="-"+C)),C},At.valueOf=At.toJSON=function(){return gr(this)},At._isBigNumber=!0,At[Symbol.toStringTag]="BigNumber",At[Symbol.for("nodejs.util.inspect.custom")]=At.valueOf,D!=null&&Ge.set(D),Ge}();const de={ROUNDING_MODE:V.ROUND_DOWN};function ve(P){return new TextEncoder().encode(P)}function U(P){return typeof P=="string"?U(j(P)):new TextDecoder().decode(P)}V.config(de);const L="UNKNOWN_ERROR",Q="INVALID_ARGUMENT";function ne(P,D=L,K={}){const he=[];Object.keys(K).forEach(tt=>{try{he.push(tt+"="+JSON.stringify(K[tt]))}catch{he.push(tt+"="+JSON.stringify(K[tt].toString()))}});const Se=P;he.length&&(P+=" ("+he.join(", ")+")");const Ce=new Error(P);return Ce.reason=Se,Ce.code=D,Object.keys(K).forEach(function(tt){Ce[tt]=K[tt]}),Ce}function j(P){if(typeof P!="string")throw new Error("hexToBytes only accept strings, got: "+typeof P);if(P.substr(0,2)==="0x")return j(P.substr(2));const D=new Uint8Array(Math.ceil(P.length/2));let K=0;for(let he=0;he<P.length;he+=2){const Se=parseInt(P.substr(he,2),16);if(isNaN(Se))throw new Error("Cannot read hex string:"+JSON.stringify(P));D[K]=Se,K++}return D}function B(P){return Array.from(P).map(D=>D.toString(16).padStart(2,"0")).join("")}function H(P,D){if(typeof P=="string"){if(D&&D.encoding==="hex"&&typeof P=="string"){let K=P;K.length>2&&K.substr(0,2)==="0x"&&(K=K.substr(2));const he=j(K);return c.keccak256(he)}return c.keccak256(ve(P))}return c.keccak256(P)}const M={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function q(P,D,K){return new Array(D-P.length+1).join(K||"0")+P}function k(P){let D="",K=0;const he=P.length;for(P.substring(0,2)==="0x"&&(K=2);K<he;K+=2){const Se=parseInt(P.substr(K,2),16);D+=String.fromCharCode(Se)}return D}function $(P){return tr(P)&&P.name&&P.name.indexOf("(")!==-1?P.name:P.name+"("+pe(!1,P.inputs||[]).join(",")+")"}function G(...P){const D=P.reduce((Se,Ce)=>Se+Ce.length,0),K=new Uint8Array(D);let he=0;for(const Se of P)K.set(Se,he),he+=Se.length;return K}function pe(P,D){const K=[];return D.forEach(function(he){if(typeof he.components=="object"){if(he.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let Se="";const Ce=he.type.indexOf("[");Ce>=0&&(Se=he.type.substring(Ce));const tt=pe(P,he.components);nr(tt)&&P?K.push("tuple("+tt.join(",")+")"+Se):P?K.push("("+tt+")"):K.push("("+tt.join(",")+")"+Se)}else K.push(he.type)}),K}function Y(P){const D=P.indexOf("("),K=P.indexOf(")");return D!==-1&&K!==-1?P.substr(0,D):P}function te(P){const D=P.indexOf("("),K=P.indexOf(")");return D!==-1&&K!==-1?P.substr(D+1,K-D-1).replace(" ",""):""}function ce(P){return P==null?P:Xt(P).toNumber()}function T(P){return Xt(P).toNumber()}function le(P){return Mt(P)?P.toString(10):""+P}function ze(P){return typeof P=="string"&&!P.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P)?"0x"+P:gt(P)}function et(P){if(typeof P=="string")return P.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P)?gt(P):"0x"+B(ve(P));if(P instanceof Uint8Array)return"0x"+B(P);throw new Error(`toStringData: Error trying to convert ${P} (${typeof P}) to a hex string.`)}function yt(P){return typeof P=="boolean"?P:Xt(P).toNumber()!==0}function vt(P){const D=Xt(P),K=D.toString(16);return D.isLessThan(0)?"-0x"+K.substr(1):"0x"+K}function gt(P){if(ar(P))return vt(+P);if(Mt(P))return vt(P);if(cr(P)){const D=P;if(D.indexOf("-0x")===0)return vt(D);if(D.indexOf("0x")===0)return D;if(!isFinite(D))return B(ve(D))}if(P instanceof Uint8Array)return"0x"+B(P);if(nr(P)||tr(P))throw new Error("toHex can only be called with scalar values, not objects or arrays");return vt(P)}function Ut(P){const D=P?P.toLowerCase():"ether",K=M[D];if(K===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(M,null,2));return new V(K,10)}function Xt(P){let D=P||0;return Mt(D)?D:(typeof D=="string"&&(D=D.trim()),typeof D!="string"||D.indexOf("0x")!==0&&D.indexOf("-0x")!==0?D instanceof Uint8Array?new V(B(D),16):new V(D,10):new V(D.replace("0x","").toLowerCase(),16))}function Sr(P){return new V(new Array(P).fill("1").join(""),2)}function Ct(P,D=256){const K=Xt(P).integerValue();return K.isLessThan(0)?Sr(D).plus(K).plus(1):K}function Pt(P,D){return q(P.toString(2),D,"0")[0]==="1"}function kt(P){if(typeof P!="string")throw ne("invalid address",Q,{arg:"address",value:P});if(P.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return P.trim().substring(0,2)!=="0x"&&(P="0x"+P),Dt(P);throw ne("invalid address",Q,{arg:"address",value:P})}function Rt(P,D=256){if(Pt(P,D)){const K=Sr(D);return P.minus(K).minus(1)}return P}function Kt(P){return/^0x[0-9a-f]{40}$/i.test(P)}function Ft(P){return!!/^(0x)?[0-9a-f]{40}$/i.test(P)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(P)&&!/^(0x)?[0-9A-F]{40}$/.test(P))||Gt(P))}function Gt(P){const D=P.replace("0x",""),K=H(D.toLowerCase());for(let he=0;he<40;he++)if(parseInt(K[he],16)>7&&D[he].toUpperCase()!==D[he]||parseInt(K[he],16)<=7&&D[he].toLowerCase()!==D[he])return!1;return!0}function Dt(P){if(P===void 0)return"";const D=P.toLowerCase().replace("0x",""),K=H(D);let he="0x";for(let Se=0;Se<D.length;Se++)parseInt(K[Se],16)>7?he+=D[Se].toUpperCase():he+=D[Se];return he}function Nt(P){if(!Array.isArray(P))throw new Error(`Value was not an array: ${JSON.stringify(P)}`);return P}function zt(P){return Kt(P)?P:/^[0-9a-f]{40}$/.test(P)?"0x"+P:"0x"+q(gt(P).substr(2),40)}function Mt(P){return P instanceof V}function cr(P){return typeof P=="string"||P&&P.constructor&&P.constructor.name==="String"}function tr(P){return P!==null&&!Array.isArray(P)&&typeof P=="object"}function ar(P){return typeof P=="boolean"}function nr(P){return Array.isArray(P)}var br,En;function tn(P,D){if(!P)throw new Error("jsonrpc method should be specified!");if(typeof P!="string")throw new Error(`jsonrpc must be a string, got ${typeof P}!`);return r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:P,params:D||[]}}function li(P){return Array.isArray(P)?P.every(D):D(P);function D(K){return!!K&&!("error"in K)&&K.jsonrpc==="2.0"&&typeof K.id=="number"&&K.result!==void 0}}r.TransactionStatus=void 0,(br=r.TransactionStatus||(r.TransactionStatus={})).pending="pending",br.confirmed="confirmed",br.failed="failed",r.TransactionType=void 0,(En=r.TransactionType||(r.TransactionType={})).queued="queued",En.dropped="dropped",En.replaced="replaced",En.pending="pending",En.reverted="reverted",En.confirmed="confirmed",r.messageId=0;function Mn(P){return Xt(P)}function $n(P){return P==="latest"||P==="pending"||P==="earliest"}function Zn(P){return P===void 0?"latest":Tr(P)}function Tr(P){return P==null?null:$n(P)?P:gt(P)}function Ur(P){return P.from&&(P.from=Je(P.from)),P.to&&(P.to=Je(P.to)),P.gasPrice!==void 0&&(P.gasPrice=vt(P.gasPrice)),P.gas!==void 0&&(P.gas=vt(P.gas)),P.value!==void 0&&(P.value=vt(P.value)),P.nonce!==void 0&&(P.nonce=vt(P.nonce)),P.data&&!P.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P.data)&&(P.data="0x"+P.data),P}function Ir(P){if(typeof P!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(P));if(P.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(P));if(P.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(P));return P}function _e(P){if(typeof P!="object")throw new Error("Did not provide transaction options");if(!P.from)throw new Error('Missing "from" in transaction options');return P.from=Je(P.from),P.to&&(P.to=Je(P.to)),P.gasPrice!==void 0&&(P.gasPrice=vt(P.gasPrice)),P.gas!==void 0&&(P.gas=vt(P.gas)),P.value!==void 0&&(P.value=vt(P.value)),P.nonce!==void 0&&(P.nonce=vt(P.nonce)),P.data&&!P.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(P.data)&&(P.data="0x"+P.data),P}function ee(P){return P?(P.blockNumber!==null&&(P.blockNumber=T(P.blockNumber)),P.transactionIndex!==null&&(P.transactionIndex=T(P.transactionIndex)),P.nonce=T(P.nonce),P.gas=T(P.gas),P.gasPrice=Xt(P.gasPrice),P.value=Xt(P.value),P):null}function ye(P){return P?(P.blockNumber!==null&&(P.blockNumber=T(P.blockNumber)),P.transactionIndex!==null&&(P.transactionIndex=T(P.transactionIndex)),P.cumulativeGasUsed=T(P.cumulativeGasUsed),P.gasUsed=T(P.gasUsed),P.logs&&nr(P.logs)&&(P.logs=P.logs.map(function(D){return He(D)})),P.status=T(P.status||""),P):null}function Re(P){return P?(P.gasLimit=T(P.gasLimit),P.gasUsed=T(P.gasUsed),P.size=T(P.size),P.timestamp=T(P.timestamp),P.number!==null&&(P.number=T(P.number)),P.difficulty=Xt(P.difficulty),P.totalDifficulty=Xt(P.totalDifficulty),nr(P.transactions)&&P.transactions.forEach(function(D,K){cr(D)||(P.transactions[K]=ee(D)||P.transactions[K])}),P):null}function He(P){return P&&(P.blockNumber&&(P.blockNumber=T(P.blockNumber)),P.transactionIndex&&(P.transactionIndex=T(P.transactionIndex)),P.logIndex&&(P.logIndex=T(P.logIndex)),P)}function Je(P){if(Kt(P))return P;if(Ft(P))return"0x"+P;throw new Error(`Invalid address: ${JSON.stringify(P)}`)}function ot(P){return P}function dt(P){return P&&(P.startingBlock=T(P.startingBlock),P.currentBlock=T(P.currentBlock),P.highestBlock=T(P.highestBlock),P.knownStates&&(P.knownStates=T(P.knownStates),P.pulledStates=T(P.pulledStates)),P)}function Et(P){if(P===null)throw ne("cannot convert null value to array",Q,{arg:"value",value:P});if(P instanceof Uint8Array)return new Uint8Array(P);if(typeof P=="string"){const D=P.match(/^(0x)?[0-9a-fA-F]*$/);if(!D)throw ne("invalid hexidecimal string",Q,{arg:"value",value:P});if(D[1]!=="0x")throw ne("hex string must have 0x prefix",Q,{arg:"value",value:P});(P=P.substring(2)).length%2&&(P="0"+P);const K=[];for(let he=0;he<P.length;he+=2)K.push(parseInt(P.substr(he,2),16));return new Uint8Array(K)}if(function(D){if(!D||parseInt(String(D.length))!==D.length||typeof D=="string")return!1;for(let K=0;K<D.length;K++){const he=D[K];if(he<0||he>=256||parseInt(String(he))!==he)return!1}return!0}(P))return new Uint8Array(P);throw ne("invalid arrayify value",void 0,{arg:"value",value:P,type:typeof P})}function ue(P,D,K){Object.defineProperty(P,D,{enumerable:!0,value:K,writable:!1})}const Z=new V(-1),ge=new V(0),Me=new V(1),Le=new V("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function wt(P){return function(D,K){function he(tt){return new Error('unexpected character "'+D[tt]+'" at position '+tt+' in "'+D+'"')}const Se={type:"",name:"",state:{allowType:!0}};let Ce=Se;for(let tt=0;tt<D.length;tt++){const xt=D[tt];switch(xt){case"(":if(!Ce.state.allowParams)throw he(tt);Ce.state.allowType=!1,Ce.type=St(Ce.type),Ce.components=[{type:"",name:"",parent:Ce,state:{allowType:!0}}],Ce=Ce.components[0];break;case")":delete Ce.state,K&&Ce.name==="indexed"&&(Ce.indexed=!0,Ce.name=""),Ce.type=St(Ce.type);const Lt=Ce;if(Ce=Ce.parent,!Ce)throw he(tt);delete Lt.parent,Ce.state.allowParams=!1,Ce.state.allowName=!0,Ce.state.allowArray=!0;break;case",":delete Ce.state,K&&Ce.name==="indexed"&&(Ce.indexed=!0,Ce.name=""),Ce.type=St(Ce.type);const Yt={type:"",name:"",parent:Ce.parent,state:{allowType:!0}};Ce.parent.components.push(Yt),delete Ce.parent,Ce=Yt;break;case" ":Ce.state.allowType&&Ce.type!==""&&(Ce.type=St(Ce.type),delete Ce.state.allowType,Ce.state.allowName=!0,Ce.state.allowParams=!0),Ce.state.allowName&&Ce.name!==""&&(K&&Ce.name==="indexed"?(Ce.indexed=!0,Ce.name=""):Ce.state.allowName=!1);break;case"[":if(!Ce.state.allowArray)throw he(tt);Ce.type+=xt,Ce.state.allowArray=!1,Ce.state.allowName=!1,Ce.state.readArray=!0;break;case"]":if(!Ce.state.readArray)throw he(tt);Ce.type+=xt,Ce.state.readArray=!1,Ce.state.allowArray=!0,Ce.state.allowName=!0;break;default:if(Ce.state.allowType)Ce.type+=xt,Ce.state.allowParams=!0,Ce.state.allowArray=!0;else if(Ce.state.allowName)Ce.name+=xt,delete Ce.state.allowArray;else{if(!Ce.state.readArray)throw he(tt);Ce.type+=xt}}}if(Ce.parent)throw new Error("unexpected eof");return delete Se.state,K&&Ce.name==="indexed"&&(Ce.indexed=!0,Ce.name=""),Se.type=St(Se.type),Se}(P,!0)}function St(P){return P.match(/^uint($|[^1-9])/)?P="uint256"+P.substring(4):P.match(/^int($|[^1-9])/)&&(P="int256"+P.substring(3)),P}const hr=new RegExp(/^bytes([0-9]*)$/),ur=new RegExp(/^(u?int)([0-9]*)$/),Jr=new RegExp(/^(.*)\[([0-9]*)\]$/),pr=function(P,D){const K=P.match(ur);return K&&parseInt(K[2])<=48?D.toNumber():D};class vr{constructor(D,K,he,Se="",Ce){this.coerceFunc=D,this.name=K,this.type=he,this.localName=Se,this.dynamic=Ce}}class rn extends vr{constructor(D){super(D.coerceFunc,D.name,D.type,void 0,D.dynamic),ue(this,"coder",D)}encode(D){return this.coder.encode(D)}decode(D,K){return this.coder.decode(D,K)}}class sr extends vr{constructor(D,K){super(D,"null","",K,!1)}encode(D){return Et([])}decode(D,K){if(K>D.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function $r(P,D){return new V(P.toString(2).substr(-D),2)}class fn extends vr{constructor(D,K,he,Se){const Ce=(he?"int":"uint")+8*K;super(D,Ce,Ce,Se,!1),this.size=K,this.signed=he}encode(D){try{let K=Xt(D);if(this.signed){let Se=$r(Le,8*this.size-1);if(K.gt(Se))throw new Error("out-of-bounds");if(Se=Se.plus(Me).multipliedBy(Z),K.lt(Se))throw new Error("out-of-bounds")}else if(K.lt(ge)||K.gt($r(Le,8*this.size)))throw new Error("out-of-bounds");K=$r(Ct(K,8*this.size),8*this.size),this.signed&&(K=Ct(Rt(K,8*this.size),256));const he=q(Ct(K).toString(16),64);if(he.indexOf("NaN")!==-1)throw ne("invalid number value, NaN",Q,{arg:this.localName,coderType:this.name,value:D,v:K,twosComplement:Ct(K),twosComplement16:Ct(K).toString(16),pad:q(Ct(K).toString(16),64),size:this.size});return j(he)}catch(K){throw ne("invalid number value",Q,{arg:this.localName,coderType:this.name,value:D,message:K.toString()})}}decode(D,K){if(D.length<K+32)throw ne("insufficient data for "+this.name+" type",Q,{arg:this.localName,coderType:this.name,value:gt(D.slice(K,K+32))});const he=32-this.size;let Se=new V(B(D.slice(K+he,K+32)),16);return Se=this.signed?Rt(Se,8*this.size):$r(Se,8*this.size),{consumed:32,value:this.coerceFunc(this.name,Se)}}}const kr=new fn(function(P,D){return D},32,!1,"none");class Kn extends vr{constructor(D,K,he){const Se="bytes"+K;super(D,Se,Se,he,!1),this.length=K}encode(D){const K=new Uint8Array(32);try{if(typeof D=="string"&&D.length%2!=0)throw new Error("hex string cannot be odd-length");const he=Et(D);if(he.length>this.length)throw new Error("incorrect data length");K.set(he)}catch(he){throw ne("invalid "+this.name+" value. Use hex strings or Uint8Array",Q,{arg:this.localName,coderType:this.name,value:he.value||D,details:he.message})}return K}decode(D,K){if(D.length<K+32)throw ne("insufficient data for "+this.name+" type",Q,{arg:this.localName,coderType:this.name,value:gt(D.slice(K,K+32))});return{consumed:32,value:this.coerceFunc(this.name,D.slice(K,K+this.length))}}}function _i(P){const D=32*Math.ceil(P.length/32),K=new Uint8Array(D-P.length);return G(kr.encode(P.length),P,K)}function Wn(P,D,K){if(P.length<D+32)throw ne("insufficient data for dynamicBytes length",Q,{arg:K,coderType:"dynamicBytes",value:gt(P.slice(D,D+32))});let he=kr.decode(P,D).value;try{he=he.toNumber()}catch(Se){throw Se("dynamic bytes count too large",Q,{arg:K,coderType:"dynamicBytes",value:he.toString()})}if(P.length<D+32+he)throw ne("insufficient data for dynamicBytes type",Q,{arg:K,coderType:"dynamicBytes",value:gt(P.slice(D,D+32+he))});return{consumed:32+32*Math.ceil(he/32),value:P.slice(D+32,D+32+he)}}function Ei(P){return 32*Math.ceil(P/32)}function xi(P,D){if(!Array.isArray(D)){if(!D||typeof D!="object")throw ne("invalid tuple value",Q,{coderType:"tuple",value:D});{const Lt=[];P.forEach(function(Yt){Lt.push(D[Yt.localName])}),D=Lt}}if(P.length!==D.length)throw ne("types/value length mismatch",Q,{coderType:"tuple",value:D});const K=[];P.forEach(function(Lt,Yt){K.push({dynamic:Lt.dynamic,value:Lt.encode(D[Yt])})});let he=0,Se=0;K.forEach(function(Lt){Lt.dynamic?(he+=32,Se+=Ei(Lt.value.length)):he+=Ei(Lt.value.length)});let Ce=0,tt=he;const xt=new Uint8Array(he+Se);return K.forEach(function(Lt){Lt.dynamic?(xt.set(kr.encode(tt),Ce),Ce+=32,xt.set(Lt.value,tt),tt+=Ei(Lt.value.length)):(xt.set(Lt.value,Ce),Ce+=Ei(Lt.value.length))}),xt}class ei extends Array{}class kn extends vr{constructor(D,K,he,Se){super(D,"array",K.type+"["+(he>=0?he:"")+"]",Se,he===-1||K.dynamic),this.coder=K,this.length=he}encode(D){if(!Array.isArray(D))throw ne("expected array value",Q,{arg:this.localName,coderType:"array",value:D});let K=this.length,he=new Uint8Array(0);K===-1&&(K=D.length,he=kr.encode(K)),function(Ce,tt,xt){if(xt||(xt=""),Ce<tt)throw ne("missing argument"+xt,"MISSING_ARGUMENT",{count:Ce,expectedCount:tt});if(Ce>tt)throw ne("too many arguments"+xt,"UNEXPECTED_ARGUMENT",{count:Ce,expectedCount:tt})}(K,D.length,"in coder array"+(this.localName?" "+this.localName:""));const Se=[];for(let Ce=0;Ce<D.length;Ce++)Se.push(this.coder);return G(he,xi(Se,D))}decode(D,K){let he=0,Se=this.length;if(Se===-1){let xt;try{xt=kr.decode(D,K)}catch(Lt){throw ne("insufficient data for dynamic array length",Q,{arg:this.localName,coderType:"array",value:Lt.value})}try{Se=xt.value.toNumber()}catch{throw ne("array count too large",Q,{arg:this.localName,coderType:"array",value:xt.value.toString()})}he+=xt.consumed,K+=xt.consumed}const Ce=[];for(let xt=0;xt<Se;xt++)Ce.push(new rn(this.coder));const tt=function(xt,Lt,Yt){const Ai=Yt;let yn=0;const At=[];return xt.forEach(function(ti){let vn;if(ti.dynamic){const on=kr.decode(Lt,Yt);vn=ti.decode(Lt,Ai+on.value.toNumber()),vn.consumed=on.consumed}else vn=ti.decode(Lt,Yt);vn.value!==void 0&&At.push(vn.value),Yt+=vn.consumed,yn+=vn.consumed}),{value:At,consumed:yn}}(Ce,D,K);return tt.consumed+=he,tt.value=this.coerceFunc(this.type,tt.value),tt}}class Gi extends vr{constructor(D,K,he){let Se=!1;const Ce=[];K.forEach(function(tt){tt.dynamic&&(Se=!0),Ce.push(tt.type)}),super(D,"tuple","tuple("+Ce.join(",")+")",he,Se),this.coders=K}encode(D){return xi(this.coders,D)}decode(D,K){const he=function(Se,Ce,tt){const xt=tt;let Lt=0;const Yt=new ei;return Se.forEach(function(Ai){let yn;if(Ai.dynamic){const At=kr.decode(Ce,tt);yn=Ai.decode(Ce,xt+At.value.toNumber()),yn.consumed=At.consumed}else yn=Ai.decode(Ce,tt);yn.value!==void 0&&Yt.push(yn.value),tt+=yn.consumed,Lt+=yn.consumed}),Se.forEach(function(Ai,yn){let At=Ai.localName;At&&(At==="length"&&(At="_length"),Yt[At]!==null&&Yt[At]!==void 0||(Yt[At]=Yt[yn]))}),{value:Yt,consumed:Lt}}(this.coders,D,K);return he.value=this.coerceFunc(this.type,he.value),he}}const Oi={address:class extends vr{constructor(P,D){super(P,"address","address",D,!1)}encode(P){const D=new Uint8Array(32),K=P.trim();if(!Ft(K))throw ne("invalid address format",Q,{arg:this.localName,coderType:"address",value:P});try{D.set(j(Je(K)),12)}catch(he){throw ne(`invalid address (${he.message})`,Q,{arg:this.localName,coderType:"address",value:P})}return D}decode(P,D){if(P.length<D+32)throw ne("insufficuent data for address type",Q,{arg:this.localName,coderType:"address",value:gt(P.slice(D,D+32)),missingBytes:D+32-P.length});return{consumed:32,value:this.coerceFunc("address",kt(gt(P.slice(D+12,D+32))))}}},bool:class extends vr{constructor(P,D){super(P,"bool","bool",D,!1)}encode(P){return kr.encode(P?1:0)}decode(P,D){try{const K=kr.decode(P,D);return{consumed:K.consumed,value:this.coerceFunc("bool",!K.value.isZero())}}catch(K){throw K.reason==="insufficient data for uint256 type"?ne("insufficient data for boolean type",Q,{arg:this.localName,coderType:"boolean",value:K.value}):K}}},string:class extends vr{constructor(P,D){super(P,"string","string",D,!0)}encode(P){if(typeof P!="string")throw ne("invalid string value",Q,{arg:this.localName,coderType:"string",value:P});return _i(ve(P))}decode(P,D){const K=Wn(P,D,this.localName);return K.value=this.coerceFunc("string",U(K.value)),K}},bytes:class extends vr{constructor(P,D){super(P,"bytes","bytes",D,!0)}encode(P){try{return _i(Et(P))}catch(D){throw D("invalid bytes value",Q,{arg:this.localName,coderType:"bytes",value:D.value})}}decode(P,D){const K=Wn(P,D,this.localName);return K.value=this.coerceFunc("bytes",K.value),K}},function:class extends Kn{constructor(P,D){super(P,24,D)}}};function fa(P,D){const K=Oi[D.type];if(K)return new K(P,D.name);let he=D.type.match(ur);if(he){const Se=parseInt(he[2]||"256");if(Se===0||Se>256||Se%8!=0)throw ne("invalid "+he[1]+" bit length",Q,{arg:"param",value:D});return new fn(P,Se/8,he[1]==="int",D.name)}if(he=D.type.match(hr),he){const Se=parseInt(he[1]);if(Se===0||Se>32)throw ne("invalid bytes length",Q,{arg:"param",value:D});return new Kn(P,Se,D.name)}if(he=D.type.match(Jr),he){const Se=Object.assign({},D),Ce=parseInt(he[2]||"-1");return Se.type=he[1],new kn(P,fa(P,Se),Ce,D.name)}if(D.type.substring(0,5)==="tuple")return function(Se,Ce,tt){Ce||(Ce=[]);const xt=Ce.map(Lt=>fa(Se,Lt));return new Gi(Se,xt,tt)}(P,D.components,D.name);if(D.type==="")return new sr(P,D.name);throw ne("invalid type",Q,{arg:"type",value:D.type,fullType:D})}class Hs{constructor(D){(function(K,he){if(!(K instanceof he))throw ne("missing new","MISSING_NEW",{name:he.name})})(this,Hs),D||(D=pr),ue(this,"coerceFunc",D)}encode(D,K){if(D.length!==K.length)throw ne("types/values length mismatch",Q,{count:{types:D.length,values:K.length},value:{types:D,values:K}});const he=D.map(Se=>typeof Se=="string"?wt(Se):Se).map(Se=>fa(this.coerceFunc,Se));return new Gi(this.coerceFunc,he,"_").encode(K)}decode(D,K){const he=D.map(Se=>typeof Se=="string"?wt(Se):Se).map(Se=>fa(this.coerceFunc,Se));return new Gi(this.coerceFunc,he,"_").decode(K,0).value}}const X=new Hs;var me,re;function Ee(P,D,K,he){var Se,Ce=arguments.length,tt=Ce<3?D:he===null?he=Object.getOwnPropertyDescriptor(D,K):he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")tt=Reflect.decorate(P,D,K,he);else for(var xt=P.length-1;xt>=0;xt--)(Se=P[xt])&&(tt=(Ce<3?Se(tt):Ce>3?Se(D,K,tt):Se(D,K))||tt);return Ce>3&&tt&&Object.defineProperty(D,K,tt),tt}function be(P,D){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(P,D)}r.coder=void 0,(me=r.coder||(r.coder={})).encodeParams=function(P,D){return B(X.encode(P,D))},me.decodeParams=function(P,D){if(P.length>0&&(!D||D==="0x"||D==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return X.decode(P,j("0x"+D.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class Ie{constructor(D){this.callName=D.callName,this.params=D.params||0,this.inputFormatter=D.inputFormatter||null,this.outputFormatter=D.outputFormatter}validateArgs(D){if(D.length!==this.params)throw K=this.callName,he=D.length,Se=this.params,new Error(`Invalid number of input parameters to RPC method "${K}" given: ${he}, expected: ${Se}`);var K,he,Se}formatInput(D){return this.inputFormatter?this.inputFormatter.map(function(K,he){return K?K(D[he]):D[he]}):D}formatOutput(D){return D!==null?this.outputFormatter(D):null}toPayload(D){const K=this.formatInput(D);return this.validateArgs(K),{method:this.callName,params:K}}async execute(D,...K){const he=this.toPayload(K);if(!D)throw new Error("Missing RequestManager in method#exec");const Se=await D.sendAsync(he);return this.formatOutput(Se)}}class Ye{constructor(D){this.getter=D.getter,this.outputFormatter=D.outputFormatter}formatOutput(D){return this.outputFormatter(D)}async execute(D,...K){const he=await D.sendAsync({method:this.getter,params:[]});return this.formatOutput(he)}}function ut(P){return new Promise(D=>setTimeout(D,P))}r.eth=void 0,(re=r.eth||(r.eth={})).eth_getBalance=new Ie({callName:"eth_getBalance",params:2,inputFormatter:[Je,Zn],outputFormatter:Mn}),re.eth_getStorageAt=new Ie({callName:"eth_getStorageAt",params:3,inputFormatter:[Je,gt,Zn],outputFormatter:ze}),re.eth_getCode=new Ie({callName:"eth_getCode",params:2,inputFormatter:[Je,Zn],outputFormatter:ze}),re.eth_getBlockByHash=new Ie({callName:"eth_getBlockByHash",params:2,inputFormatter:[Tr,function(P){return!!P}],outputFormatter:Re}),re.eth_getBlockByNumber=new Ie({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Tr,function(P){return!!P}],outputFormatter:Re}),re.eth_getUncleByBlockHashAndIndex=new Ie({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Tr,gt],outputFormatter:Re}),re.eth_getUncleByBlockNumberAndIndex=new Ie({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Tr,gt],outputFormatter:Re}),re.eth_getBlockTransactionCountByHash=new Ie({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Tr],outputFormatter:T}),re.eth_getBlockTransactionCountByNumber=new Ie({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Tr],outputFormatter:T}),re.eth_getUncleCountByBlockHash=new Ie({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Tr],outputFormatter:T}),re.eth_getUncleCountByBlockNumber=new Ie({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Tr],outputFormatter:T}),re.eth_getTransactionByHash=new Ie({callName:"eth_getTransactionByHash",params:1,inputFormatter:[Ir],outputFormatter:ee}),re.eth_getTransactionByBlockHashAndIndex=new Ie({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Tr,gt],outputFormatter:ee}),re.eth_getTransactionByBlockNumberAndIndex=new Ie({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Tr,gt],outputFormatter:ee}),re.eth_getTransactionReceipt=new Ie({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[Ir],outputFormatter:ye}),re.eth_getTransactionCount=new Ie({callName:"eth_getTransactionCount",params:2,inputFormatter:[Je,Zn],outputFormatter:T}),re.eth_sendRawTransaction=new Ie({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:ze}),re.web3_sha3=new Ie({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:ze}),re.eth_sendTransaction=new Ie({callName:"eth_sendTransaction",params:1,inputFormatter:[_e],outputFormatter:ze}),re.eth_sign=new Ie({callName:"eth_sign",params:2,inputFormatter:[Je,null],outputFormatter:ze}),re.eth_call=new Ie({callName:"eth_call",params:2,inputFormatter:[Ur,Zn],outputFormatter:ze}),re.eth_estimateGas=new Ie({callName:"eth_estimateGas",params:1,inputFormatter:[Ur],outputFormatter:T}),re.eth_submitWork=new Ie({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:yt}),re.eth_getWork=new Ie({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:Nt}),re.eth_coinbase=new Ye({getter:"eth_coinbase",outputFormatter:zt}),re.eth_mining=new Ye({getter:"eth_mining",outputFormatter:yt}),re.eth_hashrate=new Ye({getter:"eth_hashrate",outputFormatter:T}),re.eth_syncing=new Ye({getter:"eth_syncing",outputFormatter:dt}),re.eth_gasPrice=new Ye({getter:"eth_gasPrice",outputFormatter:Mn}),re.eth_accounts=new Ye({getter:"eth_accounts",outputFormatter:Nt}),re.eth_blockNumber=new Ye({getter:"eth_blockNumber",outputFormatter:T}),re.eth_protocolVersion=new Ye({getter:"eth_protocolVersion",outputFormatter:T}),re.web3_clientVersion=new Ye({getter:"web3_clientVersion",outputFormatter:le}),re.net_version=new Ye({getter:"net_version",outputFormatter:le}),re.shh_version=new Ie({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:T}),re.shh_post=new Ie({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:yt}),re.personal_newAccount=new Ie({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:zt}),re.personal_importRawKey=new Ie({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:zt}),re.personal_sign=new Ie({callName:"personal_sign",params:3,inputFormatter:[et,Je,null],outputFormatter:ze}),re.personal_ecRecover=new Ie({callName:"personal_ecRecover",params:2,inputFormatter:[et,null],outputFormatter:zt}),re.personal_unlockAccount=new Ie({callName:"personal_unlockAccount",params:3,inputFormatter:[Je,null,ce],outputFormatter:yt}),re.personal_sendTransaction=new Ie({callName:"personal_sendTransaction",params:2,inputFormatter:[_e,null],outputFormatter:ze}),re.personal_lockAccount=new Ie({callName:"personal_lockAccount",params:1,inputFormatter:[Je],outputFormatter:yt}),re.personal_listAccounts=new Ye({getter:"personal_listAccounts",outputFormatter:Nt}),re.net_listening=new Ye({getter:"net_listening",outputFormatter:yt}),re.net_peerCount=new Ye({getter:"net_peerCount",outputFormatter:T}),re.eth_newFilter=new Ie({callName:"eth_newFilter",params:1,inputFormatter:[ot],outputFormatter:gt}),re.eth_getLogs=new Ie({callName:"eth_getLogs",params:1,inputFormatter:[Nt],outputFormatter:Nt}),re.eth_newBlockFilter=new Ie({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:gt}),re.eth_newPendingTransactionFilter=new Ie({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:gt}),re.eth_uninstallFilter=new Ie({callName:"eth_uninstallFilter",params:1,inputFormatter:[gt],outputFormatter:yt}),re.eth_getFilterLogs=new Ie({callName:"eth_getFilterLogs",params:1,inputFormatter:[gt],outputFormatter:Nt}),re.eth_getFilterChanges=new Ie({callName:"eth_getFilterChanges",params:1,inputFormatter:[gt],outputFormatter:Nt}),re.eth_submitHashrate=new Ie({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:yt}),re.shh_newIdentity=new Ie({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:ze}),re.shh_hasIdentity=new Ie({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:yt}),re.shh_newGroup=new Ie({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:ze}),re.shh_addToGroup=new Ie({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:yt}),re.shh_newFilter=new Ie({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:gt}),re.shh_uninstallFilter=new Ie({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:yt}),re.shh_getLogs=new Ie({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:Nt}),re.shh_getFilterMessages=new Ie({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:Nt}),re.shh_getFilterChanges=new Ie({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:Nt}),re.shh_getMessages=new Ie({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:Nt});function We(P,D){const K=r.eth[D];if(!K)throw new Error(`Could not find the method/property named ${D.toString()}`);Object.defineProperty(P,D,{value:function(...he){return K.execute(this,...he)}})}class Ve{constructor(D){this.provider=D,this.requests=new Map}async sendAsync(D){const K=await this.provider;if(!K)throw new Error("Provider not set or invalid");const he=tn(D.method,D.params),Se=s();return this.requests.set(he.id,Se),K.sendAsync(he,(Ce,tt)=>{this.requests.delete(he.id),Ce?Se.reject(Ce):li(tt)?Se.resolve(tt.result):Se.reject(function(xt){const Lt=xt&&xt.error&&xt.error.message?xt.error.message:"Invalid JSON RPC response: "+JSON.stringify(xt);return new Error(Lt)}(tt))}),Se}setProvider(D){this.provider=D}async getConfirmedTransaction(D){const K=await this.waitForCompletion(D);if(this.isFailure(K))throw new Error(`Transaction "${D}" failed`);return K}async waitForCompletion(D,K){const he=Ir(D);if(await this.isTxDropped(he,K)){const Se=await this.getTransactionAndReceipt(he);return Object.assign(Object.assign({},Se),{status:r.TransactionStatus.failed})}for(;;){const Se=await this.getTransactionAndReceipt(he);if(!this.isPending(Se)&&Se.receipt)return Object.assign(Object.assign({},Se),{status:this.isFailure(Se)?r.TransactionStatus.failed:r.TransactionStatus.confirmed});await ut(2e3)}}async getTransaction(D){let K,he=null;const Se=Ir(D);try{const tt=(await this.eth_accounts())[0];tt&&(he=await this.eth_getTransactionCount(tt,"latest"))}catch{he=null}try{if(K=await this.eth_getTransactionByHash(Se),K===null)return null}catch{return null}if(K.blockNumber===null){if(he!==null){if(K.nonce<he)return{hash:Se,type:r.TransactionType.replaced,nonce:K.nonce};if(K.nonce>he)return{hash:Se,type:r.TransactionType.queued,nonce:K.nonce}}return Object.assign({type:r.TransactionType.pending},K)}let Ce;try{if(Ce=await this.eth_getTransactionReceipt(Se),Ce===null||Ce.status===0)return Object.assign({type:r.TransactionType.reverted},K)}catch{return null}return Object.assign(Object.assign({type:r.TransactionType.confirmed},K),{receipt:Ce})}async isTxDropped(D,K=15){let he=K;for(;he>0;){if(await this.getTransactionAndReceipt(D)!==null)return!1;he-=1,await ut(2e3)}return!0}async getTransactionAndReceipt(D){D=Ir(D);const[K,he]=await Promise.all([this.eth_getTransactionByHash(D),this.eth_getTransactionReceipt(D)]);return Object.assign(Object.assign({},K),{receipt:he})}isPending(D){return D&&D.blockNumber===null}isFailure(D){return D&&(!D.receipt||D.receipt.status===0)}}Ee([We,be("design:type",Function)],Ve.prototype,"web3_clientVersion",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"web3_sha3",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"net_version",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"net_peerCount",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"net_listening",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_protocolVersion",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_syncing",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_coinbase",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_mining",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_hashrate",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_gasPrice",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_accounts",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_blockNumber",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getBalance",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getStorageAt",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getTransactionCount",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getBlockTransactionCountByHash",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getBlockTransactionCountByNumber",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getUncleCountByBlockHash",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getUncleCountByBlockNumber",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getCode",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_sign",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_sendTransaction",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_sendRawTransaction",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_call",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_estimateGas",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getBlockByHash",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getBlockByNumber",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getTransactionByHash",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getTransactionReceipt",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_newFilter",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_newBlockFilter",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_newPendingTransactionFilter",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_uninstallFilter",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getFilterChanges",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getFilterLogs",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getLogs",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_getWork",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_submitWork",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"eth_submitHashrate",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_post",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_version",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_newIdentity",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_hasIdentity",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_newGroup",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_addToGroup",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_newFilter",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_uninstallFilter",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_getFilterChanges",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"shh_getMessages",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"personal_unlockAccount",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"personal_newAccount",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"personal_listAccounts",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"personal_lockAccount",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"personal_importRawKey",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"personal_sendTransaction",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"personal_sign",void 0),Ee([We,be("design:type",Function)],Ve.prototype,"personal_ecRecover",void 0);class ht{constructor(D){this.json=D,this._inputTypes=D.inputs||[],this._outputTypes=D.outputs||[],this._constant=!!D.constant,this._payable=!!D.payable||D.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in D&&!D.constant||D.stateMutability==="nonpayable",this._name=$(D)}extractDefaultBlock(D){return D.length>this._inputTypes.length&&!tr(D[D.length-1])&&Zn(D.pop())||"latest"}validateArgs(D){if(D.some(Ce=>Ce===void 0))throw new Error("Invalid call, some arguments are undefined");const K=D.filter(function(Ce){return!(tr(Ce)===!0&&nr(Ce)===!1&&Mt(Ce)===!1&&!(Ce instanceof Uint8Array))});if(K.length!==this._inputTypes.length)throw he=K.length,Se=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${he}, expected: ${Se}`);var he,Se}toPayload(D){let K={to:void 0,data:void 0,value:void 0,from:void 0};D.length>this._inputTypes.length&&tr(D[D.length-1])&&(K=D.pop()),this.validateArgs(D);const he=this.signature();let Se=r.coder.encodeParams(this._inputTypes,D);return Se.indexOf("0x")===0&&(Se=Se.substr(2)),K.data="0x"+he+Se,K}signature(){return H(this._name).slice(0,8)}unpackOutput(D){if(!D)return;const K=D.length>=2?D.slice(2):D,he=r.coder.decodeParams(this._outputTypes,K);return he.length===1?he[0]:he}async execute(D,K,...he){if(!D)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const Se=this.toPayload(he);if(Se.to=K,Se.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!Se.from)throw new Error('Missing "from" in transaction options');return await D.eth_sendTransaction(Se)}{const Se=this.extractDefaultBlock(he),Ce=this.toPayload(he);Ce.to=K;const tt=await D.eth_call(Ce,Se);return this.unpackOutput(tt)}}estimateGas(D,K,...he){if(!(D instanceof Ve))throw new Error("estimateGas needs to receive a RequestManager as first argument");const Se=this.toPayload(he);return Se.to=K,D.eth_estimateGas(Se)}displayName(){return Y(this._name)}typeName(){return te(this._name)||"void"}attachToContract(D){const K=this.displayName(),he=Object.assign((...Se)=>this.execute(D.requestManager,D.address,...Se),{estimateGas:this.estimateGas.bind(this,D.requestManager,D.address),toPayload:(...Se)=>this.toPayload(Se),toRPCMessage:(...Se)=>{const Ce=this.extractDefaultBlock(Se),tt=this.toPayload(Se);return tt.to=D.address,{method:"eth_call",params:[tt,Ce]}},unpackOutput:Se=>this.unpackOutput(Se)});D[K]||(D[K]=he),D[K][this.typeName()]=he}}function Ht(P){if(P==null)return null;const D=String(P).toString();return D.indexOf("0x")===0?D:B(ve(D))}class Or{constructor(D){this.requestManager=D,this.isStarted=!1,this.isDisposed=!1,this.formatter=K=>K,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(D){if(this.isDisposed)throw new Error("The filter was disposed");D&&(this.callbacks.push(D),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const D=await this.getNewFilter();if(!D)throw new Error("Could not create a filter, response: "+JSON.stringify(D));this.filterId.resolve(D)}catch(D){throw D}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const D=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${D}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const K=await this.getChanges();K&&this.callbacks.forEach(he=>{this.formatter?K.forEach(Se=>{he(this.formatter(Se))}):K.forEach(Se=>he(Se))})}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((D=()=>this.poll(),function(){D().catch(K=>console.error(K))}),500))}else this.stopSemaphore.resolve(1);var D}}class Vr extends Or{constructor(D,K,he=Se=>Se){super(D),this.requestManager=D,this.options=K,this.formatter=he,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(Se){return Ht(Se)}),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?Tr(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Tr(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const D=await this.filterId;return this.requestManager.eth_getFilterLogs(D)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const D=await this.filterId;return this.requestManager.eth_getFilterChanges(D)}async uninstall(){const D=await this.filterId;return this.requestManager.eth_uninstallFilter(D)}}class Fr{constructor(D,K,he){this.requestManager=D,this.address=he,this._anonymous=!1,this._params=K.inputs||[],this._name=$(K),this._anonymous=K.anonymous||!1}types(D){return this._params.filter(function(K){return K.indexed===D})}displayName(){return Y(this._name)}typeName(){return te(this._name)||"void"}signature(){return H(this._name)}encode(D={},K={}){const he={topics:[],address:this.address};K.fromBlock!==void 0&&(he.fromBlock=Tr(K.fromBlock)||void 0),K.toBlock!==void 0&&(he.toBlock=Tr(K.toBlock)||void 0),he.topics=he.topics||[],this._anonymous||he.topics.push("0x"+this.signature());const Se=this._params.filter(function(Ce){return Ce.indexed===!0}).map(function(Ce){const tt=D[Ce.name];return tt==null?null:nr(tt)?tt.map(function(xt){return"0x"+r.coder.encodeParams([Ce],[xt])}):"0x"+r.coder.encodeParams([Ce],[tt])});return he.topics=he.topics.concat(Se),he}decode(D){D.data=D.data||"",D.topics=D.topics||[];const K=(this._anonymous?D.topics:D.topics.slice(1)).map(function(xt){return xt.slice(2)}).join(""),he=r.coder.decodeParams(this.types(!0),K),Se=D.data.slice(2),Ce=r.coder.decodeParams(this.types(!1),Se),tt=this._params.reduce(function(xt,Lt){return xt[Lt.name]=Lt.indexed?he.shift():Ce.shift(),xt},{});return Object.assign(Object.assign({},He(D)),{event:this.displayName(),address:D.address,args:tt})}async execute(D,K){const he=this.encode(D,K),Se=this.decode.bind(this);return new Vr(this.requestManager,he,Se)}attachToContract(D){const K=this.execute.bind(this),he=this.displayName();D.events[he]||(D.events[he]=K),D.events[he][this.typeName()]=this.execute.bind(this,D)}}class gn{constructor(D,K,he){this._requestManager=D,this._json=K,this._address=he}encode(D={}){const K={address:this._address};return D.fromBlock!==void 0&&(K.fromBlock=Tr(D.fromBlock)||void 0),D.toBlock!==void 0&&(K.toBlock=Tr(D.toBlock)||void 0),K}decode(D){D.data=D.data||"";const K=nr(D.topics)&&cr(D.topics[0])?D.topics[0].slice(2):"",he=this._json.filter(function(Se){return K===H($(Se))})[0];return he?new Fr(this._requestManager,he,this._address).decode(D):He(D)}async execute(D){const K=this.encode(D),he=this.decode.bind(this);return new Vr(this._requestManager,K,he)}getAllEventsFunction(){return this.execute.bind(this)}}class Br{constructor(D,K,he){var Se;this.requestManager=D,this.abi=K,this.address=he,this.events={},this.transactionHash=null,this.address=he,this.abi=K,(Se=this).abi.filter(function(Ce){return Ce.type==="function"}).map(function(Ce){return new ht(Ce)}).forEach(function(Ce){Ce.attachToContract(Se)}),this.allEvents=function(Ce){const tt=Ce.abi.filter(function(Lt){return Lt.type==="event"}),xt=new gn(Ce.requestManager,tt,Ce.address);return tt.map(function(Lt){return new Fr(Ce.requestManager,Lt,Ce.address)}).forEach(function(Lt){Lt.attachToContract(Ce)}),xt.getAllEventsFunction()}(this)}}r.AbstractFilter=Or,r.BigNumber=V,r.Contract=Br,r.ContractFactory=class{constructor(P,D){this.requestManager=P,this.abi=D}async deploy(...P){let D;const K=P[P.length-1];if(tr(K)&&!nr(K)&&(D=P.pop()),!D)throw new Error("Missing options object");if(!D.data||typeof D.data!="string")throw new Error("Invalid options.data");if(T(D.value)>0&&!(this.abi.filter(function(Yt){return Yt.type==="constructor"&&Yt.inputs.length===P.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const he=(Se=this.abi,Ce=P,Se.filter(function(Yt){return Yt.type==="constructor"&&Yt.inputs&&Yt.inputs.length===Ce.length}).map(function(Yt){return Yt.inputs||[]}).map(function(Yt){return r.coder.encodeParams(Yt,Ce)})[0]||"");var Se,Ce;D.data+=he,D.gas||(D.gas=await this.requestManager.eth_estimateGas(D));const tt=await this.requestManager.eth_sendTransaction(D);if(!tt)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const xt=await async function(Yt,Ai){const yn=s();let At=0;const ti=()=>{At++,At>50?yn.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Yt.eth_getTransactionReceipt(Ai).then(fi=>{fi&&fi.blockHash?yn.resolve(fi):setTimeout(ti,1e3)},fi=>yn.reject(fi))};ti();const vn=await yn,on=await Yt.eth_getCode(vn.contractAddress,"latest");if(on&&on.length>3)return vn.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:on,receipt:vn})}(this.requestManager,tt),Lt=await this.at(xt);return Lt.transactionHash=tt,Lt}async at(P){if(!Ft(P))throw new TypeError(`Invalid address ${JSON.stringify(P)}`);return new Br(this.requestManager,this.abi,P)}},r.EthBlockFilter=class extends Vr{constructor(P){super(P,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},r.EthFilter=Vr,r.EthPendingTransactionFilter=class extends Vr{constructor(P){super(P,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},r.HTTPProvider=class{constructor(P,D={}){this.host=P,this.options=D,this.debug=!1,this.host=P||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(P,D){try{let K=null;K=P instanceof Array?P.map(Ce=>n(Ce)):n(P);const he=this.options.fetch||globalThis.fetch;if(he===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const Se={body:JSON.stringify(K),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+Se.body),he(this.host,Se).then(async Ce=>{if(Ce.ok){const tt=await Ce.json();this.debug&&console.log("RECV << "+JSON.stringify(tt)),tt.error?D(Object.assign(new Error(tt.error.json||tt.error),tt.error)):D(null,tt)}else this.debug&&console.log("ERR << "+JSON.stringify(Ce)),D(new Error("External error. response code: "+Ce.status))},Ce=>{this.debug&&console.log("ERR << "+JSON.stringify(Ce)),D(Ce)})}catch(K){this.debug&&console.log("ERR << "+JSON.stringify(K)),D(K)}}},r.Method=Ie,r.Property=Ye,r.RequestManager=Ve,r.SHHFilter=class extends Or{constructor(P,D){super(P),this.requestManager=P,this.options=D,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(K){return Ht(K)}),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const P=await this.filterId;return this.requestManager.shh_getMessages(P)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const P=await this.filterId;return this.requestManager.shh_getFilterChanges(P)}async uninstall(){const P=await this.filterId;return this.requestManager.shh_uninstallFilter(P)}},r.SolidityEvent=Fr,r.SolidityFunction=ht,r.WebSocketProvider=class{constructor(P,D={}){this.url=P,this.options=D,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const P=this.connection;this.timeout(new Error("Provider disposed.")),P.then(D=>D.close()).catch(D=>{this.debug&&console.error(D)})}send(){throw new Error("Sync requests are deprecated")}sendAsync(P,D){const K=[];let he;if(P instanceof Array)he=Promise.all(P.map(Se=>{const Ce=s();try{const tt=n(Se);K.push(tt),this.responseCallbacks.set(tt.id,Ce)}catch(tt){Ce.reject(tt)}return Ce}));else{const Se=s();try{const Ce=n(P);K.push(Ce),this.responseCallbacks.set(Ce.id,Se)}catch(Ce){Se.reject(Ce)}he=Se}he.then(Se=>D(null,Se),Se=>D(Se)),this.connection.then(Se=>{K.forEach(Ce=>{const tt=JSON.stringify(Ce);this.debug&&console.log("SEND >> "+tt),Se.send(tt)})},Se=>{D(Se)})}parseResponse(P){const D=[];return P.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(K=>{let he=K;this.lastChunk&&(he=this.lastChunk+he);let Se=null;try{Se=JSON.parse(he)}catch{return this.lastChunk=he,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout(()=>{this.timeout()},15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",Se&&D.push(Se)}),D}processMessage(P){if("id"in P){const D=P.id,K=this.responseCallbacks.get(D);if(!K)return void console.error("Error: Received a response for an unknown request",P);this.responseCallbacks.delete(D),"error"in P?K.reject(Object.assign(new Error(P.error.message||P.error),P.error)):"result"in P&&K.resolve(P)}else this.notificationCallbacks.forEach(D=>D(null,P))}timeout(P){this.connection&&this.connection.isPending||(this.connection=s());const D=P||new Error("Connection timeout");this.responseCallbacks.forEach(K=>K.reject(D)),this.responseCallbacks.clear(),this.isDisposed||setTimeout(()=>this.connect(),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then(K=>K.close()).catch(K=>{this.debug&&console.error(K)}),this.connection&&this.connection.isPending||(this.connection=s()),this.lastChunk="";const P=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!P)throw new Error("Please provide a WebSocketConstructor");const D=new P(this.url,this.options.protocol);D.onopen=()=>{this.connection.resolve(D)},D.onerror=K=>{const he=new Error("Error in web socket");he.data=K,this.timeout(he)},D.onclose=K=>{this.timeout(new Error(`Connection closed (${K&&K.reason||"Unknown reason"})`))},D.onmessage=K=>{const he=typeof K.data=="string"?K.data:"";this.debug&&console.log("RECV << "+K.data),this.parseResponse(he).forEach(Se=>{Se instanceof Array?Se.forEach(Ce=>this.processMessage(Ce)):this.processMessage(Se)})}}},r.bytesToHex=B,r.bytesToUtf8String=U,r.concatBytes=G,r.default=Ve,r.extractDisplayName=Y,r.extractTypeName=te,r.fromAscii=function(P,D=0){let K="";for(let he=0;he<P.length;he++){const Se=P.charCodeAt(he).toString(16);K+=Se.length<2?"0"+Se:Se}return"0x"+K.padEnd(D,"0")},r.fromDecimal=vt,r.fromTwosComplement=Rt,r.fromWei=function(P,D){const K=Xt(P).dividedBy(Ut(D));return Mt(P)?K:K.toString(10)},r.getAddress=kt,r.getValueOfUnit=Ut,r.hexToBytes=j,r.inputAddressFormatter=Je,r.inputBlockNumberFormatter=Tr,r.inputCallFormatter=Ur,r.inputDefaultBlockNumberFormatter=Zn,r.inputFilterOptions=ot,r.inputPostFormatter=function(P){return P?(P.ttl=vt(P.ttl),P.workToProve=vt(P.workToProve),P.priority=vt(P.priority),nr(P.topics)||(P.topics=P.topics?[P.topics]:[]),P.topics=P.topics.map(function(D){return D.indexOf("0x")===0?D:"0x"+B(ve(D))}),P):null},r.inputTransactionFormatter=_e,r.inputTransactionId=Ir,r.isAddress=Ft,r.isArray=nr,r.isBigNumber=Mt,r.isBloom=function(P){return!!/^(0x)?[0-9a-f]{512}$/i.test(P)&&!!/^(0x)?[0-9a-f]{512}$/i.test(P)},r.isBoolean=ar,r.isChecksumAddress=Gt,r.isFunction=function(P){return typeof P=="function"},r.isHex=function(P){return typeof P=="string"&&/^0x[0-9a-fA-F]+$/.test(P)},r.isJson=function(P){try{return!!JSON.parse(P)}catch{return!1}},r.isObject=tr,r.isPredefinedBlockNumber=$n,r.isStrictAddress=Kt,r.isString=cr,r.isTopic=function(P){return!!/^(0x)?[0-9a-f]{64}$/i.test(P)&&!!/^(0x)?[0-9a-f]{64}$/i.test(P)},r.isValidResponse=li,r.outputBigNumberFormatter=Mn,r.outputBlockFormatter=Re,r.outputLogFormatter=He,r.outputPostFormatter=function(P){return P?(P.expiry=T(P.expiry),P.sent=T(P.sent),P.ttl=T(P.ttl),P.workProved=T(P.workProved),P.topics||(P.topics=[]),P.topics=P.topics.map(function(D){return k(D)}),P):null},r.outputSyncingFormatter=dt,r.outputTransactionFormatter=ee,r.outputTransactionReceiptFormatter=ye,r.padLeft=q,r.padRight=function(P,D,K){return P+new Array(D-P.length+1).join(K||"0")},r.sha3=H,r.signedIsNegative=Pt,r.stringToUtf8Bytes=ve,r.toAddress=zt,r.toArray=Nt,r.toAscii=k,r.toBatchPayload=function(P){return P.map(function(D){return tn(D.method,D.params)})},r.toBigNumber=Xt,r.toBoolean=yt,r.toChecksumAddress=Dt,r.toData=ze,r.toDecimal=T,r.toHex=gt,r.toJsonRpcRequest=tn,r.toNullDecimal=ce,r.toString=le,r.toStringData=et,r.toTwosComplement=Ct,r.toWei=function(P,D){const K=Xt(P).times(Ut(D));return Mt(P)?K:K.toString(10)},r.transformToFullName=$,Object.defineProperty(r,"__esModule",{value:!0})})})(fN,fN.exports);var aA=fN.exports,sA={};Object.defineProperty(sA,"__esModule",{value:!0});sA.SignatureValidator=void 0;const W5e=aA;async function Q5e(t,e){const r=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new W5e.ContractFactory(t,r).at(e)}sA.SignatureValidator=Q5e;var bD={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AuthLink=t.AuthLinkType=t.AuthChain=void 0;const e=Lh;Object.defineProperty(t,"AuthChain",{enumerable:!0,get:function(){return e.AuthChain}}),Object.defineProperty(t,"AuthLinkType",{enumerable:!0,get:function(){return e.AuthLinkType}}),Object.defineProperty(t,"AuthLink",{enumerable:!0,get:function(){return e.AuthLink}})})(bD);var oA={};Object.defineProperty(oA,"__esModule",{value:!0});oA.moveMinutes=void 0;function Y5e(t){const e=new Date;return e.setMinutes(e.getMinutes()+t),e}oA.moveMinutes=Y5e;var wD={};Object.defineProperty(wD,"__esModule",{value:!0});const Ly=aA;class J5e{constructor(e,r=!0){this.requestManager=e,this.checkedBlocks={},this.saveBlocks=r,r&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const e=await this.getBlockWrapper("latest"),r=await this.getBlockWrapper(1);this.blockTime=(e.timestamp-r.timestamp)/Number(e.number)-1,this.firstTimestamp=r.timestamp}async getDate(e,r=!0){const n=e/1e3,i=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),n<this.firstTimestamp)return{block:1,timestamp:n};if(n>=i||n>this.savedBlocks.latest.timestamp)return{block:(0,Ly.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:n};this.checkedBlocks[n]=[];const a=await this.getBlockWrapper(Math.ceil((n-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(n,a,r),timestamp:n}}async findBetter(e,r,n,i=this.blockTime){if(await this.isBetterBlock(e,r,n))return r.number;const a=e-r.timestamp;let s=Math.ceil(a/i);s===0&&(s=a<0?-1:1);const o=await this.getBlockWrapper(this.getNextBlock(e,r.number,s));return i=Math.abs((r.timestamp-o.timestamp)/(r.number-o.number)),this.findBetter(e,o,n,i)}async isBetterBlock(e,r,n){const i=r.timestamp;if(n){if(i<e)return!1;const a=await this.getBlockWrapper(r.number-1);if(i>=e&&a.timestamp<e)return!0}else{if(i>=e)return!1;const a=await this.getBlockWrapper(r.number+1);if(i<e&&a.timestamp>=e)return!0}return!1}getNextBlock(e,r,n){const i=r+n;return this.checkedBlocks[e].includes(i)?this.getNextBlock(e,r,n<0?++n:--n):(this.checkedBlocks[e].push(i),i)}async getBlockWrapper(e){if(!this.saveBlocks){const n=await this.requestManager.eth_getBlockByNumber(e,!1);return{number:(0,Ly.toBigNumber)(n.number).toNumber(),timestamp:(0,Ly.toBigNumber)(n.timestamp).toNumber()}}if(this.savedBlocks[e.toString()])return this.savedBlocks[e];if(typeof e=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=e)return this.savedBlocks.latest;const{timestamp:r}=await this.requestManager.eth_getBlockByNumber(e,!1);return this.savedBlocks[e.toString()]={number:(0,Ly.toBigNumber)(e==="latest"?await this.requestManager.eth_blockNumber():e).toNumber(),timestamp:(0,Ly.toBigNumber)(r).toNumber()},this.requests++,this.savedBlocks[e.toString()]}}wD.default=J5e;var Sa={},_D={},Qee={},aa={};Object.defineProperty(aa,"__esModule",{value:!0});aa.output=aa.exists=aa.hash=aa.bytes=aa.bool=aa.number=void 0;function ex(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}aa.number=ex;function Yee(t){if(typeof t!="boolean")throw new Error(`Expected boolean, not ${t}`)}aa.bool=Yee;function ED(t,...e){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}aa.bytes=ED;function Jee(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");ex(t.outputLen),ex(t.blockLen)}aa.hash=Jee;function Xee(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}aa.exists=Xee;function Zee(t,e){ED(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}aa.output=Zee;const X5e={number:ex,bool:Yee,bytes:ED,hash:Jee,exists:Xee,output:Zee};aa.default=X5e;var $g={},cA={};Object.defineProperty(cA,"__esModule",{value:!0});cA.crypto=void 0;cA.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0};(function(t){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const e=cA,r=A=>new Uint8Array(A.buffer,A.byteOffset,A.byteLength);t.u8=r;const n=A=>new Uint32Array(A.buffer,A.byteOffset,Math.floor(A.byteLength/4));t.u32=n;const i=A=>new DataView(A.buffer,A.byteOffset,A.byteLength);t.createView=i;const a=(A,I)=>A<<32-I|A>>>I;if(t.rotr=a,t.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!t.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},(A,I)=>I.toString(16).padStart(2,"0"));function o(A){if(!(A instanceof Uint8Array))throw new Error("Uint8Array expected");let I="";for(let E=0;E<A.length;E++)I+=s[A[E]];return I}t.bytesToHex=o;function c(A){if(typeof A!="string")throw new TypeError("hexToBytes: expected string, got "+typeof A);if(A.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const I=new Uint8Array(A.length/2);for(let E=0;E<I.length;E++){const p=E*2,O=A.slice(p,p+2),N=Number.parseInt(O,16);if(Number.isNaN(N)||N<0)throw new Error("Invalid byte sequence");I[E]=N}return I}t.hexToBytes=c;const u=async()=>{};t.nextTick=u;async function f(A,I,E){let p=Date.now();for(let O=0;O<A;O++){E(O);const N=Date.now()-p;N>=0&&N<I||(await(0,t.nextTick)(),p+=N)}}t.asyncLoop=f;function h(A){if(typeof A!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof A}`);return new TextEncoder().encode(A)}t.utf8ToBytes=h;function m(A){if(typeof A=="string"&&(A=h(A)),!(A instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof A})`);return A}t.toBytes=m;function y(...A){if(!A.every(p=>p instanceof Uint8Array))throw new Error("Uint8Array list expected");if(A.length===1)return A[0];const I=A.reduce((p,O)=>p+O.length,0),E=new Uint8Array(I);for(let p=0,O=0;p<A.length;p++){const N=A[p];E.set(N,O),O+=N.length}return E}t.concatBytes=y;class w{clone(){return this._cloneInto()}}t.Hash=w;const v=A=>Object.prototype.toString.call(A)==="[object Object]"&&A.constructor===Object;function g(A,I){if(I!==void 0&&(typeof I!="object"||!v(I)))throw new TypeError("Options should be object or undefined");return Object.assign(A,I)}t.checkOpts=g;function _(A){const I=p=>A().update(m(p)).digest(),E=A();return I.outputLen=E.outputLen,I.blockLen=E.blockLen,I.create=()=>A(),I}t.wrapConstructor=_;function b(A){const I=(p,O)=>A(O).update(m(p)).digest(),E=A({});return I.outputLen=E.outputLen,I.blockLen=E.blockLen,I.create=p=>A(p),I}t.wrapConstructorWithOpts=b;function S(A=32){if(e.crypto.web)return e.crypto.web.getRandomValues(new Uint8Array(A));if(e.crypto.node)return new Uint8Array(e.crypto.node.randomBytes(A).buffer);throw new Error("The environment doesn't have randomBytes function")}t.randomBytes=S})($g);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const e=aa,r=$g;class n extends r.Hash{constructor(s,o){super(),this.finished=!1,this.destroyed=!1,e.default.hash(s);const c=(0,r.toBytes)(o);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const u=this.blockLen,f=new Uint8Array(u);f.set(c.length>u?s.create().update(c).digest():c);for(let h=0;h<f.length;h++)f[h]^=54;this.iHash.update(f),this.oHash=s.create();for(let h=0;h<f.length;h++)f[h]^=106;this.oHash.update(f),f.fill(0)}update(s){return e.default.exists(this),this.iHash.update(s),this}digestInto(s){e.default.exists(this),e.default.bytes(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:o,iHash:c,finished:u,destroyed:f,blockLen:h,outputLen:m}=this;return s=s,s.finished=u,s.destroyed=f,s.blockLen=h,s.outputLen=m,s.oHash=o._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(a,s,o)=>new n(a,s).update(o).digest();t.hmac=i,t.hmac.create=(a,s)=>new n(a,s)})(Qee);var Th={},uA={};Object.defineProperty(uA,"__esModule",{value:!0});uA.SHA2=void 0;const uC=aa,jy=$g;function Z5e(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),a=BigInt(4294967295),s=Number(r>>i&a),o=Number(r&a),c=n?4:0,u=n?0:4;t.setUint32(e+c,s,n),t.setUint32(e+u,o,n)}class e4e extends jy.Hash{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,jy.createView)(this.buffer)}update(e){uC.default.exists(this);const{view:r,buffer:n,blockLen:i}=this;e=(0,jy.toBytes)(e);const a=e.length;for(let s=0;s<a;){const o=Math.min(i-this.pos,a-s);if(o===i){const c=(0,jy.createView)(e);for(;i<=a-s;s+=i)this.process(c,s);continue}n.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){uC.default.exists(this),uC.default.output(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:a}=this;let{pos:s}=this;r[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>i-s&&(this.process(n,0),s=0);for(let h=s;h<i;h++)r[h]=0;Z5e(n,i-8,BigInt(this.length*8),a),this.process(n,0);const o=(0,jy.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<u;h++)o.setUint32(4*h,f[h],a)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:a,destroyed:s,pos:o}=this;return e.length=i,e.pos=o,e.finished=a,e.destroyed=s,i%r&&e.buffer.set(n),e}}uA.SHA2=e4e;Object.defineProperty(Th,"__esModule",{value:!0});Th.sha224=Th.sha256=void 0;const t4e=uA,oo=$g,r4e=(t,e,r)=>t&e^~t&r,n4e=(t,e,r)=>t&e^t&r^e&r,i4e=new Uint32Array([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]),Ml=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$l=new Uint32Array(64);class ete extends t4e.SHA2{constructor(){super(64,32,8,!1),this.A=Ml[0]|0,this.B=Ml[1]|0,this.C=Ml[2]|0,this.D=Ml[3]|0,this.E=Ml[4]|0,this.F=Ml[5]|0,this.G=Ml[6]|0,this.H=Ml[7]|0}get(){const{A:e,B:r,C:n,D:i,E:a,F:s,G:o,H:c}=this;return[e,r,n,i,a,s,o,c]}set(e,r,n,i,a,s,o,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=a|0,this.F=s|0,this.G=o|0,this.H=c|0}process(e,r){for(let h=0;h<16;h++,r+=4)$l[h]=e.getUint32(r,!1);for(let h=16;h<64;h++){const m=$l[h-15],y=$l[h-2],w=(0,oo.rotr)(m,7)^(0,oo.rotr)(m,18)^m>>>3,v=(0,oo.rotr)(y,17)^(0,oo.rotr)(y,19)^y>>>10;$l[h]=v+$l[h-7]+w+$l[h-16]|0}let{A:n,B:i,C:a,D:s,E:o,F:c,G:u,H:f}=this;for(let h=0;h<64;h++){const m=(0,oo.rotr)(o,6)^(0,oo.rotr)(o,11)^(0,oo.rotr)(o,25),y=f+m+r4e(o,c,u)+i4e[h]+$l[h]|0,v=((0,oo.rotr)(n,2)^(0,oo.rotr)(n,13)^(0,oo.rotr)(n,22))+n4e(n,i,a)|0;f=u,u=c,c=o,o=s+y|0,s=a,a=i,i=n,n=y+v|0}n=n+this.A|0,i=i+this.B|0,a=a+this.C|0,s=s+this.D|0,o=o+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(n,i,a,s,o,c,u,f)}roundClean(){$l.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class a4e extends ete{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}Th.sha256=(0,oo.wrapConstructor)(()=>new ete);Th.sha224=(0,oo.wrapConstructor)(()=>new a4e);var dN={};(function(t){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.schnorr=t.verify=t.signSync=t.sign=t.getSharedSecret=t.recoverPublicKey=t.getPublicKey=t.Signature=t.Point=t.CURVE=void 0;const e=NX,r=BigInt(0),n=BigInt(1),i=BigInt(2),a=BigInt(3),s=BigInt(8),o=Object.freeze({a:r,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});t.CURVE=o;const c=(_e,ee)=>(_e+ee/i)/ee,u={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(_e){const{n:ee}=o,ye=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),Re=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),He=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Je=ye,ot=BigInt("0x100000000000000000000000000000000"),dt=c(Je*_e,ee),Et=c(-Re*_e,ee);let ue=k(_e-dt*ye-Et*He,ee),Z=k(-dt*Re-Et*Je,ee);const ge=ue>ot,Me=Z>ot;if(ge&&(ue=ee-ue),Me&&(Z=ee-Z),ue>ot||Z>ot)throw new Error("splitScalarEndo: Endomorphism failed, k="+_e);return{k1neg:ge,k1:ue,k2neg:Me,k2:Z}}},f=32,h=32,m=32,y=f+1,w=2*f+1;function v(_e){const{a:ee,b:ye}=o,Re=k(_e*_e),He=k(Re*_e);return k(He+ee*_e+ye)}const g=o.a===r;class _ extends Error{constructor(ee){super(ee)}}function b(_e){if(!(_e instanceof S))throw new TypeError("JacobianPoint expected")}class S{constructor(ee,ye,Re){this.x=ee,this.y=ye,this.z=Re}static fromAffine(ee){if(!(ee instanceof E))throw new TypeError("JacobianPoint#fromAffine: expected Point");return ee.equals(E.ZERO)?S.ZERO:new S(ee.x,ee.y,n)}static toAffineBatch(ee){const ye=Y(ee.map(Re=>Re.z));return ee.map((Re,He)=>Re.toAffine(ye[He]))}static normalizeZ(ee){return S.toAffineBatch(ee).map(S.fromAffine)}equals(ee){b(ee);const{x:ye,y:Re,z:He}=this,{x:Je,y:ot,z:dt}=ee,Et=k(He*He),ue=k(dt*dt),Z=k(ye*ue),ge=k(Je*Et),Me=k(k(Re*dt)*ue),Le=k(k(ot*He)*Et);return Z===ge&&Me===Le}negate(){return new S(this.x,k(-this.y),this.z)}double(){const{x:ee,y:ye,z:Re}=this,He=k(ee*ee),Je=k(ye*ye),ot=k(Je*Je),dt=ee+Je,Et=k(i*(k(dt*dt)-He-ot)),ue=k(a*He),Z=k(ue*ue),ge=k(Z-i*Et),Me=k(ue*(Et-ge)-s*ot),Le=k(i*ye*Re);return new S(ge,Me,Le)}add(ee){b(ee);const{x:ye,y:Re,z:He}=this,{x:Je,y:ot,z:dt}=ee;if(Je===r||ot===r)return this;if(ye===r||Re===r)return ee;const Et=k(He*He),ue=k(dt*dt),Z=k(ye*ue),ge=k(Je*Et),Me=k(k(Re*dt)*ue),Le=k(k(ot*He)*Et),wt=k(ge-Z),St=k(Le-Me);if(wt===r)return St===r?this.double():S.ZERO;const hr=k(wt*wt),ur=k(wt*hr),Jr=k(Z*hr),pr=k(St*St-ur-i*Jr),vr=k(St*(Jr-pr)-Me*ur),rn=k(He*dt*wt);return new S(pr,vr,rn)}subtract(ee){return this.add(ee.negate())}multiplyUnsafe(ee){const ye=S.ZERO;if(typeof ee=="bigint"&&ee===r)return ye;let Re=q(ee);if(Re===n)return this;if(!g){let ge=ye,Me=this;for(;Re>r;)Re&n&&(ge=ge.add(Me)),Me=Me.double(),Re>>=n;return ge}let{k1neg:He,k1:Je,k2neg:ot,k2:dt}=u.splitScalar(Re),Et=ye,ue=ye,Z=this;for(;Je>r||dt>r;)Je&n&&(Et=Et.add(Z)),dt&n&&(ue=ue.add(Z)),Z=Z.double(),Je>>=n,dt>>=n;return He&&(Et=Et.negate()),ot&&(ue=ue.negate()),ue=new S(k(ue.x*u.beta),ue.y,ue.z),Et.add(ue)}precomputeWindow(ee){const ye=g?128/ee+1:256/ee+1,Re=[];let He=this,Je=He;for(let ot=0;ot<ye;ot++){Je=He,Re.push(Je);for(let dt=1;dt<2**(ee-1);dt++)Je=Je.add(He),Re.push(Je);He=Je.double()}return Re}wNAF(ee,ye){!ye&&this.equals(S.BASE)&&(ye=E.BASE);const Re=ye&&ye._WINDOW_SIZE||1;if(256%Re)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let He=ye&&I.get(ye);He||(He=this.precomputeWindow(Re),ye&&Re!==1&&(He=S.normalizeZ(He),I.set(ye,He)));let Je=S.ZERO,ot=S.BASE;const dt=1+(g?128/Re:256/Re),Et=2**(Re-1),ue=BigInt(2**Re-1),Z=2**Re,ge=BigInt(Re);for(let Me=0;Me<dt;Me++){const Le=Me*Et;let wt=Number(ee&ue);ee>>=ge,wt>Et&&(wt-=Z,ee+=n);const St=Le,hr=Le+Math.abs(wt)-1,ur=Me%2!==0,Jr=wt<0;wt===0?ot=ot.add(A(ur,He[St])):Je=Je.add(A(Jr,He[hr]))}return{p:Je,f:ot}}multiply(ee,ye){let Re=q(ee),He,Je;if(g){const{k1neg:ot,k1:dt,k2neg:Et,k2:ue}=u.splitScalar(Re);let{p:Z,f:ge}=this.wNAF(dt,ye),{p:Me,f:Le}=this.wNAF(ue,ye);Z=A(ot,Z),Me=A(Et,Me),Me=new S(k(Me.x*u.beta),Me.y,Me.z),He=Z.add(Me),Je=ge.add(Le)}else{const{p:ot,f:dt}=this.wNAF(Re,ye);He=ot,Je=dt}return S.normalizeZ([He,Je])[0]}toAffine(ee){const{x:ye,y:Re,z:He}=this,Je=this.equals(S.ZERO);ee==null&&(ee=Je?s:pe(He));const ot=ee,dt=k(ot*ot),Et=k(dt*ot),ue=k(ye*dt),Z=k(Re*Et),ge=k(He*ot);if(Je)return E.ZERO;if(ge!==n)throw new Error("invZ was invalid");return new E(ue,Z)}}S.BASE=new S(o.Gx,o.Gy,n),S.ZERO=new S(r,n,r);function A(_e,ee){const ye=ee.negate();return _e?ye:ee}const I=new WeakMap;class E{constructor(ee,ye){this.x=ee,this.y=ye}_setWindowSize(ee){this._WINDOW_SIZE=ee,I.delete(this)}hasEvenY(){return this.y%i===r}static fromCompressedHex(ee){const ye=ee.length===32,Re=H(ye?ee:ee.subarray(1));if(!yt(Re))throw new Error("Point is not on curve");const He=v(Re);let Je=G(He);const ot=(Je&n)===n;ye?ot&&(Je=k(-Je)):(ee[0]&1)===1!==ot&&(Je=k(-Je));const dt=new E(Re,Je);return dt.assertValidity(),dt}static fromUncompressedHex(ee){const ye=H(ee.subarray(1,f+1)),Re=H(ee.subarray(f+1,f*2+1)),He=new E(ye,Re);return He.assertValidity(),He}static fromHex(ee){const ye=M(ee),Re=ye.length,He=ye[0];if(Re===f)return this.fromCompressedHex(ye);if(Re===y&&(He===2||He===3))return this.fromCompressedHex(ye);if(Re===w&&He===4)return this.fromUncompressedHex(ye);throw new Error(`Point.fromHex: received invalid point. Expected 32-${y} compressed bytes or ${w} uncompressed bytes, not ${Re}`)}static fromPrivateKey(ee){return E.BASE.multiply(gt(ee))}static fromSignature(ee,ye,Re){const{r:He,s:Je}=Xt(ye);if(![0,1,2,3].includes(Re))throw new Error("Cannot recover: invalid recovery bit");const ot=ce(M(ee)),{n:dt}=o,Et=Re===2||Re===3?He+dt:He,ue=pe(Et,dt),Z=k(-ot*ue,dt),ge=k(Je*ue,dt),Me=Re&1?"03":"02",Le=E.fromHex(Me+L(Et)),wt=E.BASE.multiplyAndAddUnsafe(Le,Z,ge);if(!wt)throw new Error("Cannot recover signature: point at infinify");return wt.assertValidity(),wt}toRawBytes(ee=!1){return B(this.toHex(ee))}toHex(ee=!1){const ye=L(this.x);return ee?`${this.hasEvenY()?"02":"03"}${ye}`:`04${ye}${L(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const ee="Point is not on elliptic curve",{x:ye,y:Re}=this;if(!yt(ye)||!yt(Re))throw new Error(ee);const He=k(Re*Re),Je=v(ye);if(k(He-Je)!==r)throw new Error(ee)}equals(ee){return this.x===ee.x&&this.y===ee.y}negate(){return new E(this.x,k(-this.y))}double(){return S.fromAffine(this).double().toAffine()}add(ee){return S.fromAffine(this).add(S.fromAffine(ee)).toAffine()}subtract(ee){return this.add(ee.negate())}multiply(ee){return S.fromAffine(this).multiply(ee,this).toAffine()}multiplyAndAddUnsafe(ee,ye,Re){const He=S.fromAffine(this),Je=ye===r||ye===n||this!==E.BASE?He.multiplyUnsafe(ye):He.multiply(ye),ot=S.fromAffine(ee).multiplyUnsafe(Re),dt=Je.add(ot);return dt.equals(S.ZERO)?void 0:dt.toAffine()}}t.Point=E,E.BASE=new E(o.Gx,o.Gy),E.ZERO=new E(r,r);function p(_e){return Number.parseInt(_e[0],16)>=8?"00"+_e:_e}function O(_e){if(_e.length<2||_e[0]!==2)throw new Error(`Invalid signature integer tag: ${ve(_e)}`);const ee=_e[1],ye=_e.subarray(2,ee+2);if(!ee||ye.length!==ee)throw new Error("Invalid signature integer: wrong length");if(ye[0]===0&&ye[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:H(ye),left:_e.subarray(ee+2)}}function N(_e){if(_e.length<2||_e[0]!=48)throw new Error(`Invalid signature tag: ${ve(_e)}`);if(_e[1]!==_e.length-2)throw new Error("Invalid signature: incorrect length");const{data:ee,left:ye}=O(_e.subarray(2)),{data:Re,left:He}=O(ye);if(He.length)throw new Error(`Invalid signature: left bytes after parsing: ${ve(He)}`);return{r:ee,s:Re}}class F{constructor(ee,ye){this.r=ee,this.s=ye,this.assertValidity()}static fromCompact(ee){const ye=ee instanceof Uint8Array,Re="Signature.fromCompact";if(typeof ee!="string"&&!ye)throw new TypeError(`${Re}: Expected string or Uint8Array`);const He=ye?ve(ee):ee;if(He.length!==128)throw new Error(`${Re}: Expected 64-byte hex`);return new F(j(He.slice(0,64)),j(He.slice(64,128)))}static fromDER(ee){const ye=ee instanceof Uint8Array;if(typeof ee!="string"&&!ye)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:Re,s:He}=N(ye?ee:B(ee));return new F(Re,He)}static fromHex(ee){return this.fromDER(ee)}assertValidity(){const{r:ee,s:ye}=this;if(!et(ee))throw new Error("Invalid Signature: r must be 0 < r < n");if(!et(ye))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const ee=o.n>>n;return this.s>ee}normalizeS(){return this.hasHighS()?new F(this.r,k(-this.s,o.n)):this}toDERRawBytes(){return B(this.toDERHex())}toDERHex(){const ee=p(ne(this.s)),ye=p(ne(this.r)),Re=ee.length/2,He=ye.length/2,Je=ne(Re),ot=ne(He);return`30${ne(He+Re+4)}02${ot}${ye}02${Je}${ee}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return B(this.toCompactHex())}toCompactHex(){return L(this.r)+L(this.s)}}t.Signature=F;function V(..._e){if(!_e.every(Re=>Re instanceof Uint8Array))throw new Error("Uint8Array list expected");if(_e.length===1)return _e[0];const ee=_e.reduce((Re,He)=>Re+He.length,0),ye=new Uint8Array(ee);for(let Re=0,He=0;Re<_e.length;Re++){const Je=_e[Re];ye.set(Je,He),He+=Je.length}return ye}const de=Array.from({length:256},(_e,ee)=>ee.toString(16).padStart(2,"0"));function ve(_e){if(!(_e instanceof Uint8Array))throw new Error("Expected Uint8Array");let ee="";for(let ye=0;ye<_e.length;ye++)ee+=de[_e[ye]];return ee}const U=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function L(_e){if(typeof _e!="bigint")throw new Error("Expected bigint");if(!(r<=_e&&_e<U))throw new Error("Expected number 0 <= n < 2^256");return _e.toString(16).padStart(64,"0")}function Q(_e){const ee=B(L(_e));if(ee.length!==32)throw new Error("Error: expected 32 bytes");return ee}function ne(_e){const ee=_e.toString(16);return ee.length&1?`0${ee}`:ee}function j(_e){if(typeof _e!="string")throw new TypeError("hexToNumber: expected string, got "+typeof _e);return BigInt(`0x${_e}`)}function B(_e){if(typeof _e!="string")throw new TypeError("hexToBytes: expected string, got "+typeof _e);if(_e.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+_e.length);const ee=new Uint8Array(_e.length/2);for(let ye=0;ye<ee.length;ye++){const Re=ye*2,He=_e.slice(Re,Re+2),Je=Number.parseInt(He,16);if(Number.isNaN(Je)||Je<0)throw new Error("Invalid byte sequence");ee[ye]=Je}return ee}function H(_e){return j(ve(_e))}function M(_e){return _e instanceof Uint8Array?Uint8Array.from(_e):B(_e)}function q(_e){if(typeof _e=="number"&&Number.isSafeInteger(_e)&&_e>0)return BigInt(_e);if(typeof _e=="bigint"&&et(_e))return _e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function k(_e,ee=o.P){const ye=_e%ee;return ye>=r?ye:ee+ye}function $(_e,ee){const{P:ye}=o;let Re=_e;for(;ee-- >r;)Re*=Re,Re%=ye;return Re}function G(_e){const{P:ee}=o,ye=BigInt(6),Re=BigInt(11),He=BigInt(22),Je=BigInt(23),ot=BigInt(44),dt=BigInt(88),Et=_e*_e*_e%ee,ue=Et*Et*_e%ee,Z=$(ue,a)*ue%ee,ge=$(Z,a)*ue%ee,Me=$(ge,i)*Et%ee,Le=$(Me,Re)*Me%ee,wt=$(Le,He)*Le%ee,St=$(wt,ot)*wt%ee,hr=$(St,dt)*St%ee,ur=$(hr,ot)*wt%ee,Jr=$(ur,a)*ue%ee,pr=$(Jr,Je)*Le%ee,vr=$(pr,ye)*Et%ee,rn=$(vr,i);if(rn*rn%ee!==_e)throw new Error("Cannot find square root");return rn}function pe(_e,ee=o.P){if(_e===r||ee<=r)throw new Error(`invert: expected positive integers, got n=${_e} mod=${ee}`);let ye=k(_e,ee),Re=ee,He=r,Je=n;for(;ye!==r;){const dt=Re/ye,Et=Re%ye,ue=He-Je*dt;Re=ye,ye=Et,He=Je,Je=ue}if(Re!==n)throw new Error("invert: does not exist");return k(He,ee)}function Y(_e,ee=o.P){const ye=new Array(_e.length),Re=_e.reduce((Je,ot,dt)=>ot===r?Je:(ye[dt]=Je,k(Je*ot,ee)),n),He=pe(Re,ee);return _e.reduceRight((Je,ot,dt)=>ot===r?Je:(ye[dt]=k(Je*ye[dt],ee),k(Je*ot,ee)),He),ye}function te(_e){const ee=_e.length*8-h*8,ye=H(_e);return ee>0?ye>>BigInt(ee):ye}function ce(_e,ee=!1){const ye=te(_e);if(ee)return ye;const{n:Re}=o;return ye>=Re?ye-Re:ye}let T,le;class ze{constructor(ee,ye){if(this.hashLen=ee,this.qByteLen=ye,typeof ee!="number"||ee<2)throw new Error("hashLen must be a number");if(typeof ye!="number"||ye<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(ee).fill(1),this.k=new Uint8Array(ee).fill(0),this.counter=0}hmac(...ee){return t.utils.hmacSha256(this.k,...ee)}hmacSync(...ee){return le(this.k,...ee)}checkSync(){if(typeof le!="function")throw new _("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(ee=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),ee),this.v=await this.hmac(this.v),ee.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),ee),this.v=await this.hmac(this.v))}reseedSync(ee=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),ee),this.v=this.hmacSync(this.v),ee.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),ee),this.v=this.hmacSync(this.v))}async generate(){this.incr();let ee=0;const ye=[];for(;ee<this.qByteLen;){this.v=await this.hmac(this.v);const Re=this.v.slice();ye.push(Re),ee+=this.v.length}return V(...ye)}generateSync(){this.checkSync(),this.incr();let ee=0;const ye=[];for(;ee<this.qByteLen;){this.v=this.hmacSync(this.v);const Re=this.v.slice();ye.push(Re),ee+=this.v.length}return V(...ye)}}function et(_e){return r<_e&&_e<o.n}function yt(_e){return r<_e&&_e<o.P}function vt(_e,ee,ye,Re=!0){const{n:He}=o,Je=ce(_e,!0);if(!et(Je))return;const ot=pe(Je,He),dt=E.BASE.multiply(Je),Et=k(dt.x,He);if(Et===r)return;const ue=k(ot*k(ee+ye*Et,He),He);if(ue===r)return;let Z=new F(Et,ue),ge=(dt.x===Z.r?0:2)|Number(dt.y&n);return Re&&Z.hasHighS()&&(Z=Z.normalizeS(),ge^=1),{sig:Z,recovery:ge}}function gt(_e){let ee;if(typeof _e=="bigint")ee=_e;else if(typeof _e=="number"&&Number.isSafeInteger(_e)&&_e>0)ee=BigInt(_e);else if(typeof _e=="string"){if(_e.length!==2*h)throw new Error("Expected 32 bytes of private key");ee=j(_e)}else if(_e instanceof Uint8Array){if(_e.length!==h)throw new Error("Expected 32 bytes of private key");ee=H(_e)}else throw new TypeError("Expected valid private key");if(!et(ee))throw new Error("Expected private key: 0 < key < n");return ee}function Ut(_e){return _e instanceof E?(_e.assertValidity(),_e):E.fromHex(_e)}function Xt(_e){if(_e instanceof F)return _e.assertValidity(),_e;try{return F.fromDER(_e)}catch{return F.fromCompact(_e)}}function Sr(_e,ee=!1){return E.fromPrivateKey(_e).toRawBytes(ee)}t.getPublicKey=Sr;function Ct(_e,ee,ye,Re=!1){return E.fromSignature(_e,ee,ye).toRawBytes(Re)}t.recoverPublicKey=Ct;function Pt(_e){const ee=_e instanceof Uint8Array,ye=typeof _e=="string",Re=(ee||ye)&&_e.length;return ee?Re===y||Re===w:ye?Re===y*2||Re===w*2:_e instanceof E}function kt(_e,ee,ye=!1){if(Pt(_e))throw new TypeError("getSharedSecret: first arg must be private key");if(!Pt(ee))throw new TypeError("getSharedSecret: second arg must be public key");const Re=Ut(ee);return Re.assertValidity(),Re.multiply(gt(_e)).toRawBytes(ye)}t.getSharedSecret=kt;function Rt(_e){const ee=_e.length>f?_e.slice(0,f):_e;return H(ee)}function Kt(_e){const ee=Rt(_e),ye=k(ee,o.n);return Ft(ye<r?ee:ye)}function Ft(_e){return Q(_e)}function Gt(_e,ee,ye){if(_e==null)throw new Error(`sign: expected valid message hash, not "${_e}"`);const Re=M(_e),He=gt(ee),Je=[Ft(He),Kt(Re)];if(ye!=null){ye===!0&&(ye=t.utils.randomBytes(f));const Et=M(ye);if(Et.length!==f)throw new Error(`sign: Expected ${f} bytes of extra data`);Je.push(Et)}const ot=V(...Je),dt=Rt(Re);return{seed:ot,m:dt,d:He}}function Dt(_e,ee){const{sig:ye,recovery:Re}=_e,{der:He,recovered:Je}=Object.assign({canonical:!0,der:!0},ee),ot=He?ye.toDERRawBytes():ye.toCompactRawBytes();return Je?[ot,Re]:ot}async function Nt(_e,ee,ye={}){const{seed:Re,m:He,d:Je}=Gt(_e,ee,ye.extraEntropy),ot=new ze(m,h);await ot.reseed(Re);let dt;for(;!(dt=vt(await ot.generate(),He,Je,ye.canonical));)await ot.reseed();return Dt(dt,ye)}t.sign=Nt;function zt(_e,ee,ye={}){const{seed:Re,m:He,d:Je}=Gt(_e,ee,ye.extraEntropy),ot=new ze(m,h);ot.reseedSync(Re);let dt;for(;!(dt=vt(ot.generateSync(),He,Je,ye.canonical));)ot.reseedSync();return Dt(dt,ye)}t.signSync=zt;const Mt={strict:!0};function cr(_e,ee,ye,Re=Mt){let He;try{He=Xt(_e),ee=M(ee)}catch{return!1}const{r:Je,s:ot}=He;if(Re.strict&&He.hasHighS())return!1;const dt=ce(ee);let Et;try{Et=Ut(ye)}catch{return!1}const{n:ue}=o,Z=pe(ot,ue),ge=k(dt*Z,ue),Me=k(Je*Z,ue),Le=E.BASE.multiplyAndAddUnsafe(Et,ge,Me);return Le?k(Le.x,ue)===Je:!1}t.verify=cr;function tr(_e){return k(H(_e),o.n)}class ar{constructor(ee,ye){this.r=ee,this.s=ye,this.assertValidity()}static fromHex(ee){const ye=M(ee);if(ye.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${ye.length}`);const Re=H(ye.subarray(0,32)),He=H(ye.subarray(32,64));return new ar(Re,He)}assertValidity(){const{r:ee,s:ye}=this;if(!yt(ee)||!et(ye))throw new Error("Invalid signature")}toHex(){return L(this.r)+L(this.s)}toRawBytes(){return B(this.toHex())}}function nr(_e){return E.fromPrivateKey(_e).toRawX()}class br{constructor(ee,ye,Re=t.utils.randomBytes()){if(ee==null)throw new TypeError(`sign: Expected valid message, not "${ee}"`);this.m=M(ee);const{x:He,scalar:Je}=this.getScalar(gt(ye));if(this.px=He,this.d=Je,this.rand=M(Re),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(ee){const ye=E.fromPrivateKey(ee),Re=ye.hasEvenY()?ee:o.n-ee;return{point:ye,scalar:Re,x:ye.toRawX()}}initNonce(ee,ye){return Q(ee^H(ye))}finalizeNonce(ee){const ye=k(H(ee),o.n);if(ye===r)throw new Error("sign: Creation of signature failed. k is zero");const{point:Re,x:He,scalar:Je}=this.getScalar(ye);return{R:Re,rx:He,k:Je}}finalizeSig(ee,ye,Re,He){return new ar(ee.x,k(ye+Re*He,o.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:ee,d:ye,px:Re,rand:He}=this,Je=t.utils.taggedHash,ot=this.initNonce(ye,await Je(Ur.aux,He)),{R:dt,rx:Et,k:ue}=this.finalizeNonce(await Je(Ur.nonce,ot,Re,ee)),Z=tr(await Je(Ur.challenge,Et,Re,ee)),ge=this.finalizeSig(dt,ue,Z,ye);return await $n(ge,ee,Re)||this.error(),ge}calcSync(){const{m:ee,d:ye,px:Re,rand:He}=this,Je=t.utils.taggedHashSync,ot=this.initNonce(ye,Je(Ur.aux,He)),{R:dt,rx:Et,k:ue}=this.finalizeNonce(Je(Ur.nonce,ot,Re,ee)),Z=tr(Je(Ur.challenge,Et,Re,ee)),ge=this.finalizeSig(dt,ue,Z,ye);return Zn(ge,ee,Re)||this.error(),ge}}async function En(_e,ee,ye){return new br(_e,ee,ye).calc()}function tn(_e,ee,ye){return new br(_e,ee,ye).calcSync()}function li(_e,ee,ye){const Re=_e instanceof ar,He=Re?_e:ar.fromHex(_e);return Re&&He.assertValidity(),{...He,m:M(ee),P:Ut(ye)}}function Mn(_e,ee,ye,Re){const He=E.BASE.multiplyAndAddUnsafe(ee,gt(ye),k(-Re,o.n));return!(!He||!He.hasEvenY()||He.x!==_e)}async function $n(_e,ee,ye){try{const{r:Re,s:He,m:Je,P:ot}=li(_e,ee,ye),dt=tr(await t.utils.taggedHash(Ur.challenge,Q(Re),ot.toRawX(),Je));return Mn(Re,ot,He,dt)}catch{return!1}}function Zn(_e,ee,ye){try{const{r:Re,s:He,m:Je,P:ot}=li(_e,ee,ye),dt=tr(t.utils.taggedHashSync(Ur.challenge,Q(Re),ot.toRawX(),Je));return Mn(Re,ot,He,dt)}catch(Re){if(Re instanceof _)throw Re;return!1}}t.schnorr={Signature:ar,getPublicKey:nr,sign:En,verify:$n,signSync:tn,verifySync:Zn},E.BASE._setWindowSize(8);const Tr={node:e,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Ur={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},Ir={};t.utils={bytesToHex:ve,hexToBytes:B,concatBytes:V,mod:k,invert:pe,isValidPrivateKey(_e){try{return gt(_e),!0}catch{return!1}},_bigintTo32Bytes:Q,_normalizePrivateKey:gt,hashToPrivateKey:_e=>{_e=M(_e);const ee=h+8;if(_e.length<ee||_e.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const ye=k(H(_e),o.n-n)+n;return Q(ye)},randomBytes:(_e=32)=>{if(Tr.web)return Tr.web.getRandomValues(new Uint8Array(_e));if(Tr.node){const{randomBytes:ee}=Tr.node;return Uint8Array.from(ee(_e))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>t.utils.hashToPrivateKey(t.utils.randomBytes(h+8)),precompute(_e=8,ee=E.BASE){const ye=ee===E.BASE?ee:new E(ee.x,ee.y);return ye._setWindowSize(_e),ye.multiply(a),ye},sha256:async(..._e)=>{if(Tr.web){const ee=await Tr.web.subtle.digest("SHA-256",V(..._e));return new Uint8Array(ee)}else if(Tr.node){const{createHash:ee}=Tr.node,ye=ee("sha256");return _e.forEach(Re=>ye.update(Re)),Uint8Array.from(ye.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(_e,...ee)=>{if(Tr.web){const ye=await Tr.web.subtle.importKey("raw",_e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),Re=V(...ee),He=await Tr.web.subtle.sign("HMAC",ye,Re);return new Uint8Array(He)}else if(Tr.node){const{createHmac:ye}=Tr.node,Re=ye("sha256",_e);return ee.forEach(He=>Re.update(He)),Uint8Array.from(Re.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(_e,...ee)=>{let ye=Ir[_e];if(ye===void 0){const Re=await t.utils.sha256(Uint8Array.from(_e,He=>He.charCodeAt(0)));ye=V(Re,Re),Ir[_e]=ye}return t.utils.sha256(ye,...ee)},taggedHashSync:(_e,...ee)=>{if(typeof T!="function")throw new _("sha256Sync is undefined, you need to set it");let ye=Ir[_e];if(ye===void 0){const Re=T(Uint8Array.from(_e,He=>He.charCodeAt(0)));ye=V(Re,Re),Ir[_e]=ye}return T(ye,...ee)},_JacobianPoint:S},Object.defineProperties(t.utils,{sha256Sync:{configurable:!1,get(){return T},set(_e){T||(T=_e)}},hmacSha256Sync:{configurable:!1,get(){return le},set(_e){le||(le=_e)}}})})(dN);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.schnorr=t.Signature=t.Point=t.CURVE=t.utils=t.getSharedSecret=t.recoverPublicKey=t.verify=t.signSync=t.sign=t.getPublicKey=void 0;const e=Qee,r=Th,n=dN;var i=dN;Object.defineProperty(t,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(t,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(t,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(t,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(t,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(t,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(t,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(t,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(t,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),n.utils.hmacSha256Sync=(a,...s)=>{const o=e.hmac.create(r.sha256,a);return s.forEach(c=>o.update(c)),o.digest()}})(_D);var Rr={},tx={exports:{}};tx.exports;(function(t,e){var r=ke&&ke.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=e.wrapHash=e.equalsBytes=e.hexToBytes=e.bytesToUtf8=e.utf8ToBytes=e.createView=e.concatBytes=e.toHex=e.bytesToHex=e.assertBytes=e.assertBool=void 0;const n=r(aa),i=$g,a=n.default.bool;e.assertBool=a;const s=n.default.bytes;e.assertBytes=s;var o=$g;Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return o.bytesToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return o.bytesToHex}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return o.concatBytes}}),Object.defineProperty(e,"createView",{enumerable:!0,get:function(){return o.createView}}),Object.defineProperty(e,"utf8ToBytes",{enumerable:!0,get:function(){return o.utf8ToBytes}});function c(m){if(!(m instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof m}`);return new TextDecoder().decode(m)}e.bytesToUtf8=c;function u(m){const y=m.startsWith("0x")?m.substring(2):m;return(0,i.hexToBytes)(y)}e.hexToBytes=u;function f(m,y){if(m.length!==y.length)return!1;for(let w=0;w<m.length;w++)if(m[w]!==y[w])return!1;return!0}e.equalsBytes=f;function h(m){return y=>(n.default.bytes(y),m(y))}e.wrapHash=h,e.crypto=(()=>{const m=typeof self=="object"&&"crypto"in self?self.crypto:void 0,y=typeof H6=="function"&&H6.bind(t);return{node:y&&!m?y("crypto"):void 0,web:m}})()})(tx,tx.exports);var s4e=tx.exports,o4e=ke&&ke.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),c4e=ke&&ke.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u4e=ke&&ke.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&o4e(e,t,r);return c4e(e,t),e};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.contextRandomize=Rr.ecdh=Rr.signatureNormalize=Rr.signatureImport=Rr.signatureExport=Rr.privateKeyTweakMul=Rr.publicKeyTweakMul=Rr.publicKeyTweakAdd=Rr.publicKeyCombine=Rr.publicKeyNegate=Rr.privateKeyNegate=Rr.privateKeyTweakAdd=Rr.ecdsaVerify=Rr.ecdsaRecover=Rr.ecdsaSign=Rr.publicKeyConvert=Rr.publicKeyVerify=Rr.publicKeyCreate=Rr.privateKeyVerify=Rr.createPrivateKey=Rr.createPrivateKeySync=void 0;const l4e=Th,Qn=u4e(_D),Pr=s4e;function f4e(t){if(typeof t!="string")throw new TypeError("hexToNumber: expected string, got "+typeof t);return BigInt(`0x${t}`)}const Nf=t=>f4e((0,Pr.toHex)(t)),lA=t=>t.toString(16).padStart(64,"0"),hN=t=>(0,Pr.hexToBytes)(lA(t)),{mod:tte}=Qn.utils,cc=Qn.CURVE.n;function To(t=n=>new Uint8Array(n),e,r){return typeof t=="function"&&(t=t(e)),(0,Pr.assertBytes)(t,e),r&&t.set(r),t}function wb(t){return(0,Pr.assertBytes)(t,64),Qn.Signature.fromCompact(t)}function rte(){return Qn.utils.randomPrivateKey()}Rr.createPrivateKeySync=rte;async function d4e(){return rte()}Rr.createPrivateKey=d4e;function h4e(t){return(0,Pr.assertBytes)(t,32),Qn.utils.isValidPrivateKey(t)}Rr.privateKeyVerify=h4e;function p4e(t,e=!0,r){(0,Pr.assertBytes)(t,32),(0,Pr.assertBool)(e);const n=Qn.getPublicKey(t,e);return To(r,e?33:65,n)}Rr.publicKeyCreate=p4e;function g4e(t){(0,Pr.assertBytes)(t,33,65);try{return Qn.Point.fromHex(t),!0}catch{return!1}}Rr.publicKeyVerify=g4e;function m4e(t,e=!0,r){(0,Pr.assertBytes)(t,33,65),(0,Pr.assertBool)(e);const n=Qn.Point.fromHex(t).toRawBytes(e);return To(r,e?33:65,n)}Rr.publicKeyConvert=m4e;function y4e(t,e,r={noncefn:void 0,data:void 0},n){if((0,Pr.assertBytes)(t,32),(0,Pr.assertBytes)(e,32),typeof r!="object"||r===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(r&&(r.noncefn!==void 0||r.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[i,a]=Qn.signSync(t,e,{recovered:!0,der:!1});return{signature:To(n,64,i),recid:a}}Rr.ecdsaSign=y4e;function v4e(t,e,r,n=!0,i){(0,Pr.assertBytes)(r,32),(0,Pr.assertBool)(n);const a=wb(t).toHex(),s=Qn.Point.fromSignature(r,a,e);return To(i,n?33:65,s.toRawBytes(n))}Rr.ecdsaRecover=v4e;function b4e(t,e,r){(0,Pr.assertBytes)(t,64),(0,Pr.assertBytes)(e,32),(0,Pr.assertBytes)(r,33,65),(0,Pr.assertBytes)(t,64);const n=Nf(t.slice(0,32)),i=Nf(t.slice(32,64));if(n>=cc||i>=cc)throw new Error("Cannot parse signature");const a=Qn.Point.fromHex(r);let s;try{s=wb(t)}catch{return!1}return Qn.verify(s,e,a)}Rr.ecdsaVerify=b4e;function w4e(t,e){(0,Pr.assertBytes)(t,32),(0,Pr.assertBytes)(e,32);let r=Nf(e);if(r===0n)throw new Error("Tweak must not be zero");if(r>=cc)throw new Error("Tweak bigger than curve order");if(r+=Nf(t),r>=cc&&(r-=cc),r===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return t.set((0,Pr.hexToBytes)(lA(r))),t}Rr.privateKeyTweakAdd=w4e;function _4e(t){(0,Pr.assertBytes)(t,32);const e=tte(-Nf(t),cc);return t.set((0,Pr.hexToBytes)(lA(e))),t}Rr.privateKeyNegate=_4e;function E4e(t,e=!0,r){(0,Pr.assertBytes)(t,33,65),(0,Pr.assertBool)(e);const n=Qn.Point.fromHex(t).negate();return To(r,e?33:65,n.toRawBytes(e))}Rr.publicKeyNegate=E4e;function x4e(t,e=!0,r){if(!Array.isArray(t)||!t.length)throw new TypeError(`Expected array with one or more items, not ${t}`);for(const i of t)(0,Pr.assertBytes)(i,33,65);(0,Pr.assertBool)(e);const n=t.map(i=>Qn.Point.fromHex(i)).reduce((i,a)=>i.add(a),Qn.Point.ZERO);if(n.equals(Qn.Point.ZERO))throw new Error("Combined result must not be zero");return To(r,e?33:65,n.toRawBytes(e))}Rr.publicKeyCombine=x4e;function A4e(t,e,r=!0,n){(0,Pr.assertBytes)(t,33,65),(0,Pr.assertBytes)(e,32),(0,Pr.assertBool)(r);const i=Qn.Point.fromHex(t),a=Qn.Point.fromPrivateKey(e),s=i.add(a);if(a.equals(Qn.Point.ZERO)||s.equals(Qn.Point.ZERO))throw new Error("Tweak must not be zero");return To(n,r?33:65,s.toRawBytes(r))}Rr.publicKeyTweakAdd=A4e;function S4e(t,e,r=!0,n){(0,Pr.assertBytes)(t,33,65),(0,Pr.assertBytes)(e,32),(0,Pr.assertBool)(r);const i=Nf(e);if(i===0n)throw new Error("Tweak must not be zero");if(i<=1||i>=cc)throw new Error("Tweak is zero or bigger than curve order");const a=Qn.Point.fromHex(t).multiply(i);return To(n,r?33:65,a.toRawBytes(r))}Rr.publicKeyTweakMul=S4e;function I4e(t,e){(0,Pr.assertBytes)(t,32),(0,Pr.assertBytes)(e,32);const r=Nf(e);if(r<=1||r>=cc)throw new Error("Tweak is zero or bigger than curve order");const n=tte(r*Nf(t),cc);if(n===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return t.set((0,Pr.hexToBytes)(lA(n))),t}Rr.privateKeyTweakMul=I4e;function O4e(t,e){const r=wb(t).toRawBytes();return To(e,72,wb(t).toRawBytes()).slice(0,r.length)}Rr.signatureExport=O4e;function P4e(t,e){(0,Pr.assertBytes)(t);const r=Qn.Signature.fromDER(t);return To(e,64,(0,Pr.hexToBytes)(r.toCompactHex()))}Rr.signatureImport=P4e;function T4e(t){const e=wb(t);return e.s>cc/2n&&t.set(hN(cc-e.s),32),t}Rr.signatureNormalize=T4e;function C4e(t,e,r={},n){if((0,Pr.assertBytes)(t,33,65),(0,Pr.assertBytes)(e,32),typeof r!="object"||r===null)throw new TypeError("secp256k1.ecdh: options should be object");r.data!==void 0&&(0,Pr.assertBytes)(r.data);const i=Qn.Point.fromHex(Qn.getSharedSecret(e,t));if(r.hashfn===void 0)return To(n,32,(0,l4e.sha256)(i.toRawBytes(!0)));if(typeof r.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");r.xbuf!==void 0&&(0,Pr.assertBytes)(r.xbuf,32),r.ybuf!==void 0&&(0,Pr.assertBytes)(r.ybuf,32),(0,Pr.assertBytes)(n,32);const a=r.xbuf||new Uint8Array(32);a.set(hN(i.x));const s=r.ybuf||new Uint8Array(32);s.set(hN(i.y));const o=r.hashfn(a,s,r.data);if(!(o instanceof Uint8Array)||o.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return To(n,32,o)}Rr.ecdh=C4e;function R4e(t){t!==null&&(0,Pr.assertBytes)(t,32)}Rr.contextRandomize=R4e;Object.defineProperty(Sa,"__esModule",{value:!0});Sa.createUnsafeIdentity=Sa.computeAddress=Sa.ethSign=Sa.createEthereumMessageHash=Sa.sign=Sa.recoverAddressFromEthSignature=Sa.recoverPublicKey=void 0;const Ms=aA,Wz=_D,nte=Rr;function ite(t,e){if(t.length!==65)throw new Error("Invalid signature length"+t.length);const r=t.slice(0,t.length-1),n=t[64]===28?1:0;return(0,nte.ecdsaRecover)(r,n,e,!1).slice(1)}Sa.recoverPublicKey=ite;function N4e(t){if(t.length!==65)throw new Error("Invalid ethereum signature");const e=t[64];if(e===0||e===1){const r=new Uint8Array(t);return r[64]=e+27,r}return t}function ate(t,e){if(typeof t=="string"){if((0,Ms.isHex)(t))return ate((0,Ms.hexToBytes)(t),e);throw new Error("String signatures must be encoded in hex")}return AD(ite(N4e(t),xD(e)))}Sa.recoverAddressFromEthSignature=ate;function ste(t,e){const r=(0,nte.ecdsaSign)(e,t),n=r.recid===1?"1c":"1b";return(0,Ms.toHex)(r.signature)+n}Sa.sign=ste;function xD(t){const e=typeof t=="string"?(0,Ms.stringToUtf8Bytes)(t):t,r=(0,Ms.concatBytes)((0,Ms.stringToUtf8Bytes)(`Ethereum Signed Message:
178
+ `),(0,Ms.stringToUtf8Bytes)(String(e.length)),e);return(0,Ms.hexToBytes)((0,Ms.sha3)(r))}Sa.createEthereumMessageHash=xD;function D4e(t,e){return ste(t,xD(e))}Sa.ethSign=D4e;function AD(t){const e=t.length===65&&t[0]===4?t.slice(1):t;return(0,Ms.getAddress)((0,Ms.sha3)(e).substring(24))}Sa.computeAddress=AD;function M4e(){const t=Wz.utils.randomPrivateKey(),e=(0,Wz.getPublicKey)(t).slice(1),r=AD(e);return{privateKey:(0,Ms.bytesToHex)(t),publicKey:(0,Ms.bytesToHex)(e),address:r}}Sa.createUnsafeIdentity=M4e;(function(t){var e=ke&&ke.__createBinding||(Object.create?function(N,F,V,de){de===void 0&&(de=V);var ve=Object.getOwnPropertyDescriptor(F,V);(!ve||("get"in ve?!F.__esModule:ve.writable||ve.configurable))&&(ve={enumerable:!0,get:function(){return F[V]}}),Object.defineProperty(N,de,ve)}:function(N,F,V,de){de===void 0&&(de=V),N[de]=F[V]}),r=ke&&ke.__setModuleDefault||(Object.create?function(N,F){Object.defineProperty(N,"default",{enumerable:!0,value:F})}:function(N,F){N.default=F}),n=ke&&ke.__importStar||function(N){if(N&&N.__esModule)return N;var F={};if(N!=null)for(var V in N)V!=="default"&&Object.prototype.hasOwnProperty.call(N,V)&&e(F,N,V);return r(F,N),F},i=ke&&ke.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidEIP1271Signature=t.parseEmphemeralPayload=t.getSignedIdentitySignatureType=t.getEphemeralSignatureType=t.EIP_1654_SIGNED_ENTITY_VALIDATOR=t.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=t.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=t.ECDSA_SIGNED_ENTITY_VALIDATOR=t.SIGNER_VALIDATOR=t.Authenticator=t.ERC1654_MAGIC_VALUE=t.VALID_SIGNATURE=void 0;const a=n(aA),s=sA,o=bD,c=oA,u=i(wD),f=Sa;t.VALID_SIGNATURE="VALID_SIGNATURE",t.ERC1654_MAGIC_VALUE="1626ba7e";const h=132;var m;(function(N){async function F(H,M,q,k=Date.now()){let $="";if(!N.isValidAuthChain(M))return{ok:!1,message:"ERROR: Malformed authChain"};for(const pe of M){const Y=O(pe.type);try{const{nextAuthority:te}=await Y($,pe,{provider:q,dateToValidateExpirationInMillis:k});$=te||""}catch(te){return{ok:!1,message:`ERROR. Link type: ${pe.type}. ${te.message}.`}}}const G=$===H;return{ok:G,message:G?void 0:`ERROR: Invalid final authority. Expected: ${H}. Current ${$}.`}}N.validateSignature=F;function V(H){for(const[M,q]of H.entries())if(M===0&&q.type!==o.AuthLinkType.SIGNER||q.type===o.AuthLinkType.SIGNER&&M!==0)return!1;return!0}N.isValidAuthChain=V;function de(H){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(H)))}N.createEIP1271MessageHash=de;function ve(H,M,q){return[{type:o.AuthLinkType.SIGNER,payload:M,signature:""},{type:A(q),payload:H,signature:q}]}N.createSimpleAuthChain=ve;function U(H,M,q,k){const $=(0,c.moveMinutes)(q),G=N.getEphemeralMessage(M.address,$),pe=N.createSignature(H,G),Y=N.createSignature(M,k);return[{type:o.AuthLinkType.SIGNER,payload:H.address,signature:""},{type:o.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:G,signature:pe},{type:o.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:k,signature:Y}]}N.createAuthChain=U;async function L(H,M,q,k){const $=new Date;$.setMinutes($.getMinutes()+q);const G=N.getEphemeralMessage(M.address,$),pe=await k(G),Y=[{type:o.AuthLinkType.SIGNER,payload:H,signature:""},{type:S(pe),payload:G,signature:pe}];return{ephemeralIdentity:M,expiration:$,authChain:Y}}N.initializeAuthChain=L;function Q(H,M){const q=N.createSignature(H.ephemeralIdentity,M);return[...H.authChain,{type:o.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:M,signature:q}]}N.signPayload=Q,N.createEthereumMessageHash=f.createEthereumMessageHash;function ne(H,M){return(0,f.ethSign)((0,a.hexToBytes)(H.privateKey),M)}N.createSignature=ne;function j(H){return H.length>0&&H[0].type===o.AuthLinkType.SIGNER?H[0].payload:"Invalid-Owner-Address"}N.ownerAddress=j;function B(H,M){return`Decentraland Login
179
+ Ephemeral address: ${H}
180
+ Expiration: ${M.toISOString()}`}N.getEphemeralMessage=B})(m=t.Authenticator||(t.Authenticator={}));const y=async(N,F)=>({nextAuthority:F.payload});t.SIGNER_VALIDATOR=y;const w=async(N,F)=>{if(!F.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const V=(0,f.recoverAddressFromEthSignature)(F.signature,F.payload),de=N.toLocaleLowerCase(),ve=V.toLocaleLowerCase();if(de===ve)return{nextAuthority:F.payload};throw new Error(`Invalid signer address. Expected: ${de}. Actual: ${ve}`)};t.ECDSA_SIGNED_ENTITY_VALIDATOR=w;const v=async(N,F,V)=>{if(!F.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:de,ephemeralAddress:ve,expiration:U}=I(F.payload),L=V.dateToValidateExpirationInMillis?V.dateToValidateExpirationInMillis:Date.now();if(U>L){const Q=(0,f.recoverAddressFromEthSignature)(F.signature,de),ne=N.toLocaleLowerCase(),j=Q.toLocaleLowerCase();if(ne===j)return{nextAuthority:ve};throw new Error(`Invalid signer address. Expected: ${ne}. Actual: ${j}`)}throw new Error(`Ephemeral key expired. Expiration: ${U}. Test: ${L}`)};t.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=v;const g=async(N,F,V)=>{if(!F.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:de,ephemeralAddress:ve,expiration:U}=I(F.payload),L=V!=null&&V.dateToValidateExpirationInMillis?V==null?void 0:V.dateToValidateExpirationInMillis:Date.now();if(U>L&&await p(V.provider,N,de,F.signature,L))return{nextAuthority:ve};throw new Error(`Ephemeral key expired. Expiration: ${U}. Test: ${L}`)};t.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=g;const _=async(N,F,V)=>{if(!F.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await p(V.provider,N,F.payload,F.signature,V.dateToValidateExpirationInMillis))return{nextAuthority:F.payload};throw new Error("Invalid validation")};t.EIP_1654_SIGNED_ENTITY_VALIDATOR=_;const b=async(N,F)=>({error:"Error Validator."});function S(N){return N.length===h?o.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:o.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}t.getEphemeralSignatureType=S;function A(N){return N.length===h?o.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:o.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}t.getSignedIdentitySignatureType=A;function I(N){const F=N.replace(/\r/g,""),V=F.split(`
181
+ `),de=V[1].substring(19),ve=V[2].substring(12),U=Date.parse(ve);return{message:F,ephemeralAddress:de,expiration:U}}t.parseEmphemeralPayload=I;async function E(N,F,V,de){const ve=m.createEIP1271MessageHash(F),U=(0,a.hexToBytes)(V);let L;try{L=(0,a.bytesToHex)(await N.isValidSignature(ve,U,de))}catch{}if(L===t.ERC1654_MAGIC_VALUE)return!0;const Q=(0,f.createEthereumMessageHash)(F);try{L=(0,a.bytesToHex)(await N.isValidSignature(Q,U,de))}catch{}return L===t.ERC1654_MAGIC_VALUE}t.isValidEIP1271Signature=E;async function p(N,F,V,de,ve){if(!N)throw new Error("Missing provider");const U=new a.default(N),L=await(0,s.SignatureValidator)(U,F);let Q=await E(L,V,de);if(Q)return!0;const ne=new u.default(U);try{const{block:j}=await ne.getDate(ve,!1);if(Q=await E(L,V,de,j),Q)return!0}catch(j){throw new Error(`Invalid validation. Error: ${j.message}`)}throw new Error(`Invalid validation. Expected: ${t.ERC1654_MAGIC_VALUE}. Actual: ${Q}`)}function O(N){switch(N){case o.AuthLinkType.SIGNER:return t.SIGNER_VALIDATOR;case o.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return t.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case o.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return t.ECDSA_SIGNED_ENTITY_VALIDATOR;case o.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return t.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case o.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return t.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return b}}})(Wee);(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(Wee,t),r(bD,t)})(Kee);var pN={},qc={},gN={exports:{}},mN={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function r(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(s){return typeof s}:r=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},r(i)}function n(i){var a=typeof i=="string"||i instanceof String;if(!a){var s=r(i);throw i===null?s="null":s==="object"&&(s=i.constructor.name),new TypeError("Expected a string but received a ".concat(s))}}t.exports=e.default,t.exports.default=e.default})(mN,mN.exports);var SD=mN.exports,yN={exports:{}},vN={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;for(var a in i)typeof n[a]>"u"&&(n[a]=i[a]);return n}t.exports=e.default,t.exports.default=e.default})(vN,vN.exports);var ote=vN.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var r=i(SD),n=i(ote);function i(o){return o&&o.__esModule?o:{default:o}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function s(o,c){(0,r.default)(o),c=(0,n.default)(c,a),c.allow_trailing_dot&&o[o.length-1]==="."&&(o=o.substring(0,o.length-1)),c.allow_wildcard===!0&&o.indexOf("*.")===0&&(o=o.substring(2));var u=o.split("."),f=u[u.length-1];return c.require_tld&&(u.length<2||!c.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(f)||/\s/.test(f))||!c.allow_numeric_tld&&/^\d+$/.test(f)?!1:u.every(function(h){return!(h.length>63&&!c.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(h)||/[\uff01-\uff5e]/.test(h)||/^-|-$/.test(h)||!c.allow_underscores&&/_/.test(h))})}t.exports=e.default,t.exports.default=e.default})(yN,yN.exports);var $4e=yN.exports,bN={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var r=n(SD);function n(f){return f&&f.__esModule?f:{default:f}}var i="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(i,"[.]){3}").concat(i),s=new RegExp("^".concat(a,"$")),o="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(o,":){7}(?:").concat(o,"|:)|")+"(?:".concat(o,":){6}(?:").concat(a,"|:").concat(o,"|:)|")+"(?:".concat(o,":){5}(?::").concat(a,"|(:").concat(o,"){1,2}|:)|")+"(?:".concat(o,":){4}(?:(:").concat(o,"){0,1}:").concat(a,"|(:").concat(o,"){1,3}|:)|")+"(?:".concat(o,":){3}(?:(:").concat(o,"){0,2}:").concat(a,"|(:").concat(o,"){1,4}|:)|")+"(?:".concat(o,":){2}(?:(:").concat(o,"){0,3}:").concat(a,"|(:").concat(o,"){1,5}|:)|")+"(?:".concat(o,":){1}(?:(:").concat(o,"){0,4}:").concat(a,"|(:").concat(o,"){1,6}|:)|")+"(?::((?::".concat(o,"){0,5}:").concat(a,"|(?::").concat(o,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function u(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,r.default)(f),h=String(h),h?h==="4"?s.test(f):h==="6"?c.test(f):!1:u(f,4)||u(f,6)}t.exports=e.default,t.exports.default=e.default})(bN,bN.exports);var k4e=bN.exports;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=_;var r=s(SD),n=s($4e),i=s(k4e),a=s(ote);function s(b){return b&&b.__esModule?b:{default:b}}function o(b,S){return m(b)||h(b,S)||u(b,S)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
182
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(b,S){if(b){if(typeof b=="string")return f(b,S);var A=Object.prototype.toString.call(b).slice(8,-1);if(A==="Object"&&b.constructor&&(A=b.constructor.name),A==="Map"||A==="Set")return Array.from(b);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return f(b,S)}}function f(b,S){(S==null||S>b.length)&&(S=b.length);for(var A=0,I=new Array(S);A<S;A++)I[A]=b[A];return I}function h(b,S){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(b)))){var A=[],I=!0,E=!1,p=void 0;try{for(var O=b[Symbol.iterator](),N;!(I=(N=O.next()).done)&&(A.push(N.value),!(S&&A.length===S));I=!0);}catch(F){E=!0,p=F}finally{try{!I&&O.return!=null&&O.return()}finally{if(E)throw p}}return A}}function m(b){if(Array.isArray(b))return b}var y={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},w=/^\[([^\]]+)\](?::([0-9]+))?$/;function v(b){return Object.prototype.toString.call(b)==="[object RegExp]"}function g(b,S){for(var A=0;A<S.length;A++){var I=S[A];if(b===I||v(I)&&I.test(b))return!0}return!1}function _(b,S){if((0,r.default)(b),!b||/[\s<>]/.test(b)||b.indexOf("mailto:")===0||(S=(0,a.default)(S,y),S.validate_length&&b.length>=2083)||!S.allow_fragments&&b.includes("#")||!S.allow_query_components&&(b.includes("?")||b.includes("&")))return!1;var A,I,E,p,O,N,F,V;if(F=b.split("#"),b=F.shift(),F=b.split("?"),b=F.shift(),F=b.split("://"),F.length>1){if(A=F.shift().toLowerCase(),S.require_valid_protocol&&S.protocols.indexOf(A)===-1)return!1}else{if(S.require_protocol)return!1;if(b.slice(0,2)==="//"){if(!S.allow_protocol_relative_urls)return!1;F[0]=b.slice(2)}}if(b=F.join("://"),b==="")return!1;if(F=b.split("/"),b=F.shift(),b===""&&!S.require_host)return!0;if(F=b.split("@"),F.length>1){if(S.disallow_auth||F[0]===""||(I=F.shift(),I.indexOf(":")>=0&&I.split(":").length>2))return!1;var de=I.split(":"),ve=o(de,2),U=ve[0],L=ve[1];if(U===""&&L==="")return!1}p=F.join("@"),N=null,V=null;var Q=p.match(w);if(Q?(E="",V=Q[1],N=Q[2]||null):(F=p.split(":"),E=F.shift(),F.length&&(N=F.join(":"))),N!==null&&N.length>0){if(O=parseInt(N,10),!/^[0-9]+$/.test(N)||O<=0||O>65535)return!1}else if(S.require_port)return!1;return S.host_whitelist?g(E,S.host_whitelist):E===""&&!S.require_host?!0:!(!(0,i.default)(E)&&!(0,n.default)(E,S)&&(!V||!(0,i.default)(V,6))||(E=E||V,S.host_blacklist&&g(E,S.host_blacklist)))}t.exports=e.default,t.exports.default=e.default})(gN,gN.exports);var L4e=gN.exports,ID={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.localStorageClearIdentity=t.localStorageStoreIdentity=t.localStorageGetIdentity=t.createMessage=t.SINGLE_SIGN_ON_TARGET=t.Action=void 0;var e;(function(o){o.GET="get",o.STORE="store",o.CLEAR="clear",o.PING="ping"})(e||(t.Action=e={})),t.SINGLE_SIGN_ON_TARGET="single-sign-on";function r(o){return{target:t.SINGLE_SIGN_ON_TARGET,...o}}t.createMessage=r;function n(o){const c=localStorage.getItem(s(o));if(!c)return null;let u;try{u=JSON.parse(c)}catch{return a(o),null}return u.expiration=new Date(u.expiration),u.expiration.getTime()<=Date.now()?(a(o),null):u}t.localStorageGetIdentity=n;function i(o,c){new Date(c.expiration).getTime()>Date.now()&&localStorage.setItem(s(o),JSON.stringify(c))}t.localStorageStoreIdentity=i;function a(o){localStorage.removeItem(s(o))}t.localStorageClearIdentity=a;function s(o){if(!/^0x[a-fA-F0-9]{40}$/.test(o))throw new Error("User must be a valid ethereum address");return`single-sign-on-${o.toLowerCase()}`}})(ID);Object.defineProperty(qc,"__esModule",{value:!0});qc.clearIdentity=qc.storeIdentity=qc.getIdentity=qc.init=void 0;const j4e=L4e,Qc=ID,cte=Qc.SINGLE_SIGN_ON_TARGET,Qz=500,U4e=5;let Yz=0,rx="";const F4e={protocols:["https"],require_protocol:!0};function B4e(t,e={}){if(!(0,j4e.default)(t,{...F4e,...e}))throw new Error(`Invalid url: ${t}`);if(rx)throw new Error("Already initialized");const r=document.createElement("iframe");r.id=cte,r.src=t,r.style.width="0",r.style.height="0",r.style.border="none",r.style.position="absolute",document.body.appendChild(r),rx=t}qc.init=B4e;async function q4e(t){let e;try{e=(await fA(await OD(),Qc.Action.GET,{user:t})).identity??null}catch(r){PD(r),e=(0,Qc.localStorageGetIdentity)(t)}return e}qc.getIdentity=q4e;async function H4e(t,e){try{await fA(await OD(),Qc.Action.STORE,{user:t,identity:e})}catch(r){PD(r),(0,Qc.localStorageStoreIdentity)(t,e)}}qc.storeIdentity=H4e;async function z4e(t){try{await fA(await OD(),Qc.Action.CLEAR,{user:t})}catch(e){PD(e),(0,Qc.localStorageClearIdentity)(t)}}qc.clearIdentity=z4e;async function OD(){if(!rx)throw new Error("Not initialized");for(let t=0;t<U4e;t++){const e=document.getElementById(cte),r=e==null?void 0:e.contentWindow;if(!r){await V4e(Qz);continue}try{await fA(r,Qc.Action.PING,{},Qz)}catch{continue}return r}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function fA(t,e,r,n=0){Yz++;const i=Yz;let a=null;const s=new Promise((o,c)=>{a=({data:u})=>{!u||u.target!==Qc.SINGLE_SIGN_ON_TARGET||u.id!==i||(u.error?c(new Error(u.error)):o(u))},window.addEventListener("message",a)});t.postMessage((0,Qc.createMessage)({id:i,action:e,...r}),rx);try{return await(n?Promise.race([s,new Promise((o,c)=>setTimeout(()=>c(new Error("Did not receive a response in time")),n))]):s)}catch(o){throw o}finally{a&&window.removeEventListener("message",a)}}function V4e(t){return new Promise(e=>setTimeout(e,t))}function PD(t){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",t.message)}(function(t){var e=ke&&ke.__createBinding||(Object.create?function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}:function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]}),r=ke&&ke.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&e(i,n,a)};Object.defineProperty(t,"__esModule",{value:!0}),r(qc,t),r(ID,t)})(pN);const G4e=60*24*30,K4e=Pf.getConfiguration().magic.apiKey;function W4e(t){switch(t){case mi.DISCORD:case mi.X:case mi.GOOGLE:case mi.APPLE:return sc.ProviderType.MAGIC;case mi.WALLET_CONNECT:case mi.METAMASK_MOBILE:return sc.ProviderType.WALLET_CONNECT_V2;case mi.COINBASE:case mi.WALLET_LINK:return sc.ProviderType.WALLET_LINK;case mi.FORTMATIC:return sc.ProviderType.FORTMATIC;case mi.METAMASK:case mi.DAPPER:case mi.SAMSUNG:return sc.ProviderType.INJECTED;default:throw new Error("Invalid provider")}}async function Q4e(t,e){const r=new LR(e),n=BR.createRandom(),i={address:n.address.toString(),publicKey:_t(n.publicKey),privateKey:_t(n.privateKey)},a=await r.getSigner();return Kee.Authenticator.initializeAuthChain(t,i,G4e,s=>a.signMessage(s))}async function Y4e(t){const e=W4e(t);if(sc.ProviderType.MAGIC===e){const{Magic:n}=await ub(()=>Promise.resolve().then(()=>nD),void 0),{OAuthExtension:i}=await ub(()=>Promise.resolve().then(()=>aD),void 0),a=new n(K4e,{extensions:[new i]}),s=new URL(window.location.href);s.pathname="/callback",await a.oauth.loginWithRedirect({provider:t,redirectURI:s.href})}const r=await Pf.connection.connect(e);if(!r.account||!r.provider)throw new Error("Could not get provider");return r}async function J4e(t,e){let r;const n=await pN.getIdentity(t)&&null;return n?r=n:(r=await Q4e(t,e),await pN.storeIdentity(t,r)),r}const X4e="_main_r3wb8_1",Z4e="_left_r3wb8_7",eDe="_connection_r3wb8_16",tDe="_right_r3wb8_20",rDe="_footer_r3wb8_31",Uy={main:X4e,left:Z4e,connection:eDe,right:tDe,footer:rDe},nDe=()=>{const[t,e]=Ze.useState(Bu.CONNECTING_WALLET),[r,n]=Ze.useState(!1),[i,a]=Ze.useState(!1),s=Aee(),o=b8(),c=Ze.useCallback(()=>{n(!r)},[n,r]),u=Ze.useCallback(async h=>{var m;a(!0),e(Bu.CONNECTING_WALLET);try{const y=await Y4e(h);e(Bu.WAITING_FOR_SIGNATURE),await J4e(((m=y.account)==null?void 0:m.toLowerCase())??"",y.provider),s?window.location.href=s:o("/user"),a(!1)}catch{e(Bu.ERROR)}},[e,a,s]),f=Ze.useCallback(()=>{a(!1),e(Bu.CONNECTING_WALLET)},[a]);return ft.jsxs("main",{className:Uy.main,children:[ft.jsx(K5e,{open:r,onClose:c}),ft.jsx(U5e,{open:i,state:t,onClose:f,onTryAgain:()=>console.log("On try again")}),ft.jsx("div",{className:Uy.left,children:ft.jsx(i5e,{className:Uy.connection,onLearnMore:c,onConnect:u,socialOptions:{primary:mi.GOOGLE,secondary:[mi.DISCORD,mi.APPLE,mi.X]},web3Options:{primary:mi.METAMASK,secondary:[mi.FORTMATIC,mi.COINBASE,mi.WALLET_CONNECT]}})}),ft.jsx("div",{className:Uy.right,children:ft.jsxs("div",{className:Uy.footer,children:[ft.jsx("p",{children:"Want better graphics and faster speed?"}),ft.jsxs("span",{children:["👉  ",ft.jsx("a",{href:"https://decentraland.org/download/",target:"_blank",rel:"noreferrer",children:ft.jsx("b",{children:"Download desktop client"})})]})]})})]})};Nue.render(ft.jsx(hV.StrictMode,{children:ft.jsx(xle,{children:ft.jsxs(_le,{children:[ft.jsx(Vy,{path:"/login",element:ft.jsx(nDe,{})}),ft.jsx(Vy,{path:"/callback",element:ft.jsx(K6e,{})}),ft.jsx(Vy,{path:"/user",element:ft.jsx(N6e,{})}),ft.jsx(Vy,{path:"*",element:ft.jsx(z6e,{})})]})})}),document.getElementById("root"));export{V2e as _,Xn as a,Df as b,ke as c,Es as e,js as g,NX as r};